data_center/public/admin/assets/edit.5c1f9076.js

2 lines
4.6 KiB
JavaScript

import{B as U,C as q,D as x}from"./element-plus.9c2fdfa8.js";import{P as D}from"./index.6be73b2c.js";import{a as R,b as A,c as h}from"./contract.e67a7a3e.js";import"./lodash.47b8af7d.js";import{d as B,s as _,r as I,e as P,$ as f,o as F,c as j,K,L as p,u as a,U as u}from"./@vue.53f8d7c3.js";import"./@vueuse.038954e7.js";import"./@element-plus.37f92579.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_187b1ead_lang.33043b78.js";import"./index.6e8143ba.js";import"./axios.96be3cef.js";import"./vue-router.e2f4a118.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.efc99072.js";import"./color.e83714e9.js";import"./clone.fb54e01d.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.b4b577c6.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.9cf3e967.js";const L={class:"edit-popup"},N=B({name:"contractEdit"}),we=B({...N,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(O,{expose:y,emit:b}){const s=b,d=_(),n=_(),i=I("add"),g=P(()=>i.value=="edit"?"\u7F16\u8F91\u5408\u540C":"\u65B0\u589E\u5408\u540C"),t=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:""}),C=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 t)o[e]!=null&&o[e]!=null&&(t[e]=o[e])},V=async o=>{const e=await R({id:o.id});c(e)},E=async()=>{var e,l;await((e=d.value)==null?void 0:e.validate());const o={...t};i.value=="edit"?await A(o):await h(o),(l=n.value)==null||l.close(),s("success")},v=(o="add")=>{var e;i.value=o,(e=n.value)==null||e.open()},w=()=>{s("close")};return y({open:v,setFormData:c,getDetail:V}),(o,e)=>{const l=U,m=q,k=x;return F(),j("div",L,[(F(),K(D,{key:0,ref_key:"popupRef",ref:n,title:a(g),async:!0,width:"550px",onConfirm:E,onClose:w},{default:p(()=>[u(k,{ref_key:"formRef",ref:d,model:a(t),"label-width":"90px",rules:a(C)},{default:p(()=>[u(m,{label:"\u5408\u540C\u7C7B\u578B",prop:"contract_type_name"},{default:p(()=>[u(l,{modelValue:a(t).contract_type_name,"onUpdate:modelValue":e[0]||(e[0]=r=>a(t).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:a(t).contract_no,"onUpdate:modelValue":e[1]||(e[1]=r=>a(t).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:a(t).status,"onUpdate:modelValue":e[2]||(e[2]=r=>a(t).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:a(t).party_a_name,"onUpdate:modelValue":e[3]||(e[3]=r=>a(t).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:a(t).party_b_name,"onUpdate:modelValue":e[4]||(e[4]=r=>a(t).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:a(t).area_manager_name,"onUpdate:modelValue":e[5]||(e[5]=r=>a(t).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{we as default};