/* empty css             *//* empty css                   *//* empty css                     *//* empty css                  *//* empty css                 */import{u as e}from"./useCreate-74e0ef9a.js";import{u as a}from"./useShow-02d4fd72.js";import{d as l,x as r,X as m,f as o,o as s,l as p,w as u,a as d,e as n,b as t,t as c,a3 as i,a4 as _,U as V,Z as b,a0 as f}from"./index-0ffeeea6.js";const y=n("label",{style:{color:"red"}},"注意：分成比例为百分比,请输入0到100之间的数字，最小为0最大是100",-1),g={class:"flex justify-end"},h=l({__name:"create",props:{primary:String|Number,api:String},emits:["close"],setup(l,{emit:h}){const U=l,{formData:j,form:k,loading:q,submitForm:x,close:v}=e(U.api,U.primary);return j.value.status=1,j.value.sort=1,U.primary&&a(U.api,U.primary,j),r((()=>{v((()=>h("close")))})),(e,a)=>{const l=i,r=_,h=V,U=b,v=f;return m((s(),p(U,{model:o(j),"label-width":"120px",ref_key:"form",ref:k,class:"pr-4"},{default:u((()=>[d(r,{label:"cp名称",prop:"cp_name",rules:[{required:!0,message:"cp名称必须填写"}]},{default:u((()=>[o(j).cp_id?(s(),p(l,{key:0,modelValue:o(j).cp_name,"onUpdate:modelValue":a[0]||(a[0]=e=>o(j).cp_name=e),readonly:"",name:"cp_name",clearable:""},null,8,["modelValue"])):(s(),p(l,{key:1,modelValue:o(j).cp_name,"onUpdate:modelValue":a[1]||(a[1]=e=>o(j).cp_name=e),name:"cp_name",clearable:""},null,8,["modelValue"]))])),_:1}),d(r,{label:"cp简称",prop:"cp_nick",rules:[{required:!0,message:"cp简称必须填写"}]},{default:u((()=>[d(l,{modelValue:o(j).cp_nick,"onUpdate:modelValue":a[2]||(a[2]=e=>o(j).cp_nick=e),name:"cp_nick",clearable:""},null,8,["modelValue"])])),_:1}),d(r,{label:"所属公司",prop:"cp_company",rules:[{required:!0,message:"所属公司必须填写"}]},{default:u((()=>[d(l,{modelValue:o(j).cp_company,"onUpdate:modelValue":a[3]||(a[3]=e=>o(j).cp_company=e),name:"cp_company",clearable:""},null,8,["modelValue"])])),_:1}),d(r,{label:"联系人",prop:"manager",rules:[]},{default:u((()=>[d(l,{modelValue:o(j).manager,"onUpdate:modelValue":a[4]||(a[4]=e=>o(j).manager=e),name:"manager",clearable:""},null,8,["modelValue"])])),_:1}),d(r,{label:"联系电话",prop:"phone",rules:[{pattern:/^1[3456789]\d{9}$/,message:"联系电话号码格式不正确",trigger:"blur"}]},{default:u((()=>[d(l,{modelValue:o(j).phone,"onUpdate:modelValue":a[5]||(a[5]=e=>o(j).phone=e),name:"phone",clearable:""},null,8,["modelValue"])])),_:1}),d(r,{label:"电子邮箱",prop:"email",rules:[{type:"email",message:"邮箱格式不正确"}]},{default:u((()=>[d(l,{modelValue:o(j).email,"onUpdate:modelValue":a[6]||(a[6]=e=>o(j).email=e),name:"email",clearable:""},null,8,["modelValue"])])),_:1}),d(r,{label:"分成比例:",prop:"share_per",rules:[{required:!0,message:"分成比例必须填写"}]},{default:u((()=>[d(l,{type:"number",modelValue:o(j).share_per,"onUpdate:modelValue":a[7]||(a[7]=e=>o(j).share_per=e),name:"share_per",clearable:""},null,8,["modelValue"]),y])),_:1}),d(r,{label:"公司地址",prop:"address",rules:[{required:!0,message:"公司地址必须填写"}]},{default:u((()=>[d(l,{modelValue:o(j).address,"onUpdate:modelValue":a[8]||(a[8]=e=>o(j).address=e),name:"address",clearable:""},null,8,["modelValue"])])),_:1}),n("div",g,[d(h,{type:"primary",onClick:a[9]||(a[9]=e=>o(x)(o(k)))},{default:u((()=>[t(c(e.$t("system.confirm")),1)])),_:1})])])),_:1},8,["model"])),[[v,o(q)]])}}});export{h as _};
