/* empty css             *//* empty css                   *//* empty css                     *//* empty css                  *//* empty css                 */import{u as e}from"./useCreate-d1a919fb.js";import{u as a}from"./useShow-5d0f85e9.js";import{d as l,x as r,W 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,a2 as i,a3 as _,S as V,Y as b,$ as f}from"./index-2b50ecca.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 j=l,{formData:U,form:k,loading:q,submitForm:x,close:S}=e(j.api,j.primary);return U.value.status=1,U.value.sort=1,j.primary&&a(j.api,j.primary,U),r((()=>{S((()=>h("close")))})),(e,a)=>{const l=i,r=_,h=V,j=b,S=f;return m((s(),p(j,{model:o(U),"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(U).cp_id?(s(),p(l,{key:0,modelValue:o(U).cp_name,"onUpdate:modelValue":a[0]||(a[0]=e=>o(U).cp_name=e),readonly:"",name:"cp_name",clearable:""},null,8,["modelValue"])):(s(),p(l,{key:1,modelValue:o(U).cp_name,"onUpdate:modelValue":a[1]||(a[1]=e=>o(U).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(U).cp_nick,"onUpdate:modelValue":a[2]||(a[2]=e=>o(U).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(U).cp_company,"onUpdate:modelValue":a[3]||(a[3]=e=>o(U).cp_company=e),name:"cp_company",clearable:""},null,8,["modelValue"])])),_:1}),d(r,{label:"联系人",prop:"manager",rules:[]},{default:u((()=>[d(l,{modelValue:o(U).manager,"onUpdate:modelValue":a[4]||(a[4]=e=>o(U).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(U).phone,"onUpdate:modelValue":a[5]||(a[5]=e=>o(U).phone=e),name:"phone",clearable:""},null,8,["modelValue"])])),_:1}),d(r,{label:"电子邮箱",prop:"email",rules:[{type:"email",message:"邮箱格式不正确"}]},{default:u((()=>[d(l,{modelValue:o(U).email,"onUpdate:modelValue":a[6]||(a[6]=e=>o(U).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(U).share_per,"onUpdate:modelValue":a[7]||(a[7]=e=>o(U).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(U).address,"onUpdate:modelValue":a[8]||(a[8]=e=>o(U).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"])),[[S,o(q)]])}}});export{h as _};
