2 lines
6.5 KiB
JavaScript
2 lines
6.5 KiB
JavaScript
import{a6 as O,k as j,C as S,D as q,a2 as G,a3 as H,b as J,H as L,I as Q,F as W}from"./element-plus.ff90c99c.js";import{P as $}from"./index.422d920b.js";import{a as z}from"./examined.6bce4ae2.js";import"./lodash.3e731b89.js";import{d as g,r as f,s as B,b as K,$ as k,o as b,c as v,W as e,Q as l,u as o,F as X,a9 as Y,P as Z,U as C}from"./@vue.f8dfc830.js";import{d as ee}from"./index.71302537.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"./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 te={class:"edit-popup"},ae=g({name:"flowEdit"}),le=g({...ae,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(oe,{expose:w,emit:E}){f(!1);const y=B(),_=B(),p=f("add"),A=K(()=>p.value=="edit"?"\u5BA1\u6838":"\u8BE6\u60C5");f([{content:"\u4EFB\u52A1\u5B8C\u6210",timestamp:"2023-8-28 13:30:00"},{content:"\u5F20\u4E09\u4E09\u5BA1\u6838",timestamp:"2023-8-28 13:30:00"},{content:"\u674E\u601D\u601D\u5BA1\u6838",timestamp:"2023-8-28 13:30:00",type:"primary",hollow:!0}]);const a=k({id:"",task:{extend:[]},company_name:"",area_manager:"",check_status:1,remark:""}),m=k({remark:"",file:[]}),D=k({check_status:[{required:!0,validator:(r,t,n)=>{t!=2&&t!=3?n("\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001"):n()},trigger:["blur"]}]}),U=async r=>{var t,n;typeof r.extend=="string"&&(r.extend=JSON.parse(r.extend));for(const s in a)r[s]!=null&&r[s]!=null&&(a[s]=r[s]);if((n=(t=a.task)==null?void 0:t.extend)!=null&&n.stage)switch(+a.task.extend.stage){case 1:i(a.task.extend.stage1);break;case 2:i(a.task.extend.stage2);break;case 3:i(a.task.extend.stage3);break;case 4:i(a.task.extend.stage4);break}},i=r=>{Object.keys(m).forEach(t=>{r[t]!=null&&r[t]!=null&&(m[t]=r[t])})},R=async r=>{},I=async()=>{var r,t;if(await((r=y.value)==null?void 0:r.validate()),a.check_status==3&&a.remark=="")return j.error("\u9A73\u56DE\u5FC5\u987B\u586B\u5199\u5907\u6CE8");await z({id:a.id,check_status:a.check_status,remark:a.remark}),(t=_.value)==null||t.close(),E("success")},M=(r="add")=>{var t;p.value=r,(t=_.value)==null||t.open()},P=()=>{E("close")};return w({open:M,setFormData:U,getDetail:R}),(r,t)=>{const n=S,s=q,d=G,c=H,V=O,T=J,x=L,h=Q,N=W;return b(),v("div",te,[e($,{ref_key:"popupRef",ref:_,title:o(A),async:!0,width:"800px",onConfirm:I,onClose:P,button:o(p)=="edit",clickModalClose:o(p)=="details"},{default:l(()=>[e(N,{ref_key:"formRef",ref:y,model:o(a),rules:o(D),"label-width":"120px"},{default:l(()=>[e(c,null,{default:l(()=>[e(d,{span:12},{default:l(()=>[e(s,{label:"ID",prop:"id"},{default:l(()=>[e(n,{readonly:"",modelValue:o(a).id,"onUpdate:modelValue":t[0]||(t[0]=u=>o(a).id=u)},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:12},{default:l(()=>[e(s,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"task.title"},{default:l(()=>[e(n,{readonly:"",modelValue:o(a).task.title,"onUpdate:modelValue":t[1]||(t[1]=u=>o(a).task.title=u)},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:12},{default:l(()=>[e(s,{label:"\u4EFB\u52A1\u91D1\u989D",prop:"task.money"},{default:l(()=>[e(n,{readonly:"",modelValue:o(a).task.money,"onUpdate:modelValue":t[2]||(t[2]=u=>o(a).task.money=u)},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:12},{default:l(()=>[e(s,{label:"\u6240\u5C5E\u516C\u53F8",prop:"company_name"},{default:l(()=>[e(n,{readonly:"",modelValue:o(a).company_name,"onUpdate:modelValue":t[3]||(t[3]=u=>o(a).company_name=u)},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:24},{default:l(()=>[e(s,{label:"\u4EFB\u52A1\u63CF\u8FF0",prop:"task.content"},{default:l(()=>[e(n,{readonly:"",modelValue:o(a).task.content,"onUpdate:modelValue":t[4]||(t[4]=u=>o(a).task.content=u),clearable:"",type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:12},{default:l(()=>[e(s,{label:"\u4EFB\u52A1\u63D0\u4EA4\u65F6\u95F4",prop:"id"},{default:l(()=>[e(n,{readonly:"",modelValue:o(a).task.update_time,"onUpdate:modelValue":t[5]||(t[5]=u=>o(a).task.update_time=u)},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:12},{default:l(()=>[e(s,{label:"\u7247\u533A\u7ECF\u7406",prop:"flow_cate"},{default:l(()=>[e(n,{readonly:"",modelValue:o(a).area_manager,"onUpdate:modelValue":t[6]||(t[6]=u=>o(a).area_manager=u)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(V),e(c,null,{default:l(()=>[e(d,{span:24},{default:l(()=>[e(s,{label:"\u8865\u5145\u8BF4\u660E",prop:"remark"},{default:l(()=>[e(n,{readonly:"",value:o(m).remark,clearable:"",type:"textarea"},null,8,["value"])]),_:1})]),_:1}),e(d,{span:24},{default:l(()=>[e(s,{label:"\u5B8C\u6210\u8BC1\u660E"},{default:l(()=>[(b(!0),v(X,null,Y(o(m).file,(u,F)=>(b(),Z(T,{class:"attachment",key:F,src:u,"preview-src-list":o(m).file,"initial-index":F,fit:"cover"},null,8,["src","preview-src-list","initial-index"]))),128))]),_:1})]),_:1})]),_:1}),e(V),e(d,{span:12},{default:l(()=>[e(s,{label:"\u5BA1\u6838",prop:"check_status",clearable:"",style:{width:"100%"}},{default:l(()=>[e(h,{disabled:o(p)=="details",modelValue:o(a).check_status,"onUpdate:modelValue":t[7]||(t[7]=u=>o(a).check_status=u)},{default:l(()=>[e(x,{label:2},{default:l(()=>[C("\u901A\u8FC7")]),_:1}),e(x,{label:3},{default:l(()=>[C("\u9A73\u56DE")]),_:1})]),_:1},8,["disabled","modelValue"])]),_:1})]),_:1}),e(c,null,{default:l(()=>[e(d,null,{default:l(()=>[e(s,{label:"\u5907\u6CE8",prop:"remark"},{default:l(()=>[e(n,{readonly:o(p)=="details",modelValue:o(a).remark,"onUpdate:modelValue":t[8]||(t[8]=u=>o(a).remark=u),clearable:"",type:"textarea"},null,8,["readonly","modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","button","clickModalClose"])])}}});const Le=ee(le,[["__scopeId","data-v-fbe529bf"]]);export{Le as default};
|