2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
import{B as k,C as U,D as q}from"./element-plus.b0ecf6ae.js";import{P as x}from"./index.fb62f914.js";import{a as D,b as R,c as A}from"./contract.d0a20d95.js";import"./lodash.ffb5376d.js";import{d as B,s as _,r as h,e as I,$ as f,o as F,c as P,K as j,L as p,U as u,u as t}from"./@vue.51d7f2d8.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";import"./index.2ce58885.js";import"./axios.f9df025a.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.4b0c77cb.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const K={class:"edit-popup"},L=B({name:"contractEdit"}),Ce=B({...L,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(N,{expose:y,emit:i}){const d=_(),n=_(),s=h("add"),b=I(()=>s.value=="edit"?"\u7F16\u8F91\u5408\u540C":"\u65B0\u589E\u5408\u540C"),a=f({id:"",company_id:"",contract_type:"",contract_type_name:"",contract_no:"",file:"",status:"",party_a:"",party_a_name:"",party_b:"",party_b_name:"",area_manager:"",area_manager_name:""}),g=f({company_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u516C\u53F8",trigger:["blur"]}],contract_type:[{required:!0,message:"\u8BF7\u8F93\u5165\u5408\u540C\u7C7B\u578B",trigger:["blur"]}],contract_no:[{required:!0,message:"\u8BF7\u8F93\u5165\u5408\u540C\u7F16\u53F7",trigger:["blur"]}],file:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6",trigger:["blur"]}],party_a:[{required:!0,message:"\u8BF7\u8F93\u5165\u7532\u65B9",trigger:["blur"]}],party_b:[{required:!0,message:"\u8BF7\u8F93\u5165\u4E59\u65B9",trigger:["blur"]}]}),c=async o=>{for(const e in a)o[e]!=null&&o[e]!=null&&(a[e]=o[e])},C=async o=>{const e=await D({id:o.id});c(e)},V=async()=>{var e,l;await((e=d.value)==null?void 0:e.validate());const o={...a};s.value=="edit"?await R(o):await A(o),(l=n.value)==null||l.close(),i("success")},E=(o="add")=>{var e;s.value=o,(e=n.value)==null||e.open()},v=()=>{i("close")};return y({open:E,setFormData:c,getDetail:C}),(o,e)=>{const l=k,m=U,w=q;return F(),P("div",K,[(F(),j(x,{key:0,ref_key:"popupRef",ref:n,title:t(b),async:!0,width:"550px",onConfirm:V,onClose:v},{default:p(()=>[u(w,{ref_key:"formRef",ref:d,model:t(a),"label-width":"90px",rules:t(g)},{default:p(()=>[u(m,{label:"\u5408\u540C\u7C7B\u578B",prop:"contract_type_name"},{default:p(()=>[u(l,{modelValue:t(a).contract_type_name,"onUpdate:modelValue":e[0]||(e[0]=r=>t(a).contract_type_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5408\u540C\u7C7B\u578B"},null,8,["modelValue"])]),_:1}),u(m,{label:"\u5408\u540C\u7F16\u53F7",prop:"contract_no"},{default:p(()=>[u(l,{modelValue:t(a).contract_no,"onUpdate:modelValue":e[1]||(e[1]=r=>t(a).contract_no=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5408\u540C\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),u(m,{label:"\u72B6\u6001",prop:"status"},{default:p(()=>[u(l,{modelValue:t(a).status,"onUpdate:modelValue":e[2]||(e[2]=r=>t(a).status=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u72B6\u6001"},null,8,["modelValue"])]),_:1}),u(m,{label:"\u7532\u65B9",prop:"party_a_name"},{default:p(()=>[u(l,{modelValue:t(a).party_a_name,"onUpdate:modelValue":e[3]||(e[3]=r=>t(a).party_a_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7532\u65B9"},null,8,["modelValue"])]),_:1}),u(m,{label:"\u4E59\u65B9",prop:"party_b_name"},{default:p(()=>[u(l,{modelValue:t(a).party_b_name,"onUpdate:modelValue":e[4]||(e[4]=r=>t(a).party_b_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4E59\u65B9"},null,8,["modelValue"])]),_:1}),u(m,{label:"\u7247\u533A\u7ECF\u7406",prop:"area_manager_name"},{default:p(()=>[u(l,{modelValue:t(a).area_manager_name,"onUpdate:modelValue":e[5]||(e[5]=r=>t(a).area_manager_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7247\u533A\u7ECF\u7406"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title"]))])}}});export{Ce as default};
|