WokerTask/public/admin/assets/edit.8ed020b6.js

2 lines
4.5 KiB
JavaScript

import{B as k,C as U,D as q}from"./element-plus.10e48c93.js";import{P as x}from"./index.1f170085.js";import{a as D,b as R,c as A}from"./contract.480a61bb.js";import"./lodash.08438971.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 a}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"./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.5b774352.js";import"./axios.105476b3.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.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"}),Ee=B({...L,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(N,{expose:y,emit:s}){const d=_(),n=_(),i=h("add"),b=I(()=>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:""}),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 t)o[e]!=null&&o[e]!=null&&(t[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={...t};i.value=="edit"?await R(o):await A(o),(l=n.value)==null||l.close(),s("success")},E=(o="add")=>{var e;i.value=o,(e=n.value)==null||e.open()},v=()=>{s("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:a(b),async:!0,width:"550px",onConfirm:V,onClose:v},{default:p(()=>[u(w,{ref_key:"formRef",ref:d,model:a(t),"label-width":"90px",rules:a(g)},{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{Ee as default};