WokerTask/public/admin/assets/edit.76ec07e7.js

2 lines
4.6 KiB
JavaScript

import{C as k,D as q,F as x}from"./element-plus.74337649.js";import{_ as D}from"./index.3b74a81e.js";import{a as R,b as U,c as A}from"./contract.03410f05.js";import"./lodash.3e731b89.js";import{d as B,s as c,r as h,b as I,$ as F,o as f,c as j,P as N,Q as p,W as u,u as a}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import"./index.59d2be02.js";import"./axios.c2babb35.js";import"./vue-router.6d4cf914.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.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.79024f1a.js";const O={class:"edit-popup"},P=B({name:"contractEdit"}),ke=B({...P,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Q,{expose:b,emit:s}){const d=c(),n=c(),i=h("add"),y=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"]}]}),_=async o=>{for(const e in t)o[e]!=null&&o[e]!=null&&(t[e]=o[e])},C=async o=>{const e=await R({id:o.id});_(e)},V=async()=>{var e,l;await((e=d.value)==null?void 0:e.validate());const o={...t};i.value=="edit"?await U(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 b({open:E,setFormData:_,getDetail:C}),(o,e)=>{const l=k,m=q,w=x;return f(),j("div",O,[(f(),N(D,{key:0,ref_key:"popupRef",ref:n,title:a(y),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{ke as default};