2 lines
7.4 KiB
JavaScript
2 lines
7.4 KiB
JavaScript
import{a6 as z,k as J,C as K,D as X,a2 as Y,a3 as Z,b as ee,H as te,I as ae,F as le}from"./element-plus.ff90c99c.js";import{P as oe}from"./index.000fc3bb.js";import{a as U}from"./examined.fb26f476.js";import"./lodash.3e731b89.js";import{d as T,r as k,s as R,$ as F,b as ue,o as _,c as y,W as e,Q as o,u as a,F as I,a9 as h,P as V,U as P,T as ne}from"./@vue.f8dfc830.js";import{d as re}from"./index.872975fb.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 se={class:"edit-popup"},de=["src"],pe=T({name:"flowEdit"}),me=T({...pe,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(ie,{expose:M,emit:v}){k(!1);const C=R(),b=R(),p=k("add"),B=F([7,6,8]),N=k("\u9500\u552E\u91D1\u989D"),O=ue(()=>p.value=="edit"?"\u5BA1\u6838":"\u8BE6\u60C5");k([{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 t=F({id:"",task:{},company_name:"",area_manager:"",check_status:1,remark:"",amount:"",type:-1}),j=F({check_status:[{required:!0,validator:(d,l,n)=>{l!=2&&l!=3?n("\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001"):n()},trigger:["blur"]}]}),q=async d=>{for(const l in t)d[l]!=null&&d[l]!=null&&(t[l]=d[l])},G=async d=>{},H=async()=>{var d,l;if(await((d=C.value)==null?void 0:d.validate()),t.check_status==3&&t.remark=="")return J.error("\u9A73\u56DE\u5FC5\u987B\u586B\u5199\u5907\u6CE8");B.includes(t.type)?await U({id:t.id,check_status:t.check_status,remark:t.remark,amount:t.amount}):await U({id:t.id,check_status:t.check_status,remark:t.remark}),(l=b.value)==null||l.close(),v("success")},L=(d="add")=>{var l;p.value=d,(l=b.value)==null||l.open()},Q=()=>{v("close")};return M({open:L,setFormData:q,getDetail:G}),(d,l)=>{const n=K,r=X,s=Y,c=Z,x=z,S=ee,D=te,W=ae,$=le;return _(),y("div",se,[e(oe,{ref_key:"popupRef",ref:b,title:a(O),async:!0,width:"800px",onConfirm:H,onClose:Q,button:a(p)=="edit",clickModalClose:a(p)=="details"},{default:o(()=>[e($,{ref_key:"formRef",ref:C,model:a(t),rules:a(j),"label-width":"120px"},{default:o(()=>[e(c,null,{default:o(()=>[e(s,{span:12},{default:o(()=>[e(r,{label:"ID",prop:"id"},{default:o(()=>[e(n,{readonly:"",modelValue:a(t).id,"onUpdate:modelValue":l[0]||(l[0]=u=>a(t).id=u)},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:12},{default:o(()=>[e(r,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"task.title"},{default:o(()=>[e(n,{readonly:"",modelValue:a(t).task.title,"onUpdate:modelValue":l[1]||(l[1]=u=>a(t).task.title=u)},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:12},{default:o(()=>[e(r,{label:"\u4EFB\u52A1\u91D1\u989D",prop:"task.money"},{default:o(()=>[e(n,{readonly:"",modelValue:a(t).task.money,"onUpdate:modelValue":l[2]||(l[2]=u=>a(t).task.money=u)},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:12},{default:o(()=>[e(r,{label:"\u6240\u5C5E\u516C\u53F8",prop:"company_name"},{default:o(()=>[e(n,{readonly:"",modelValue:a(t).company_name,"onUpdate:modelValue":l[3]||(l[3]=u=>a(t).company_name=u)},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:24},{default:o(()=>[e(r,{label:"\u4EFB\u52A1\u63CF\u8FF0",prop:"task.content"},{default:o(()=>[e(n,{readonly:"",modelValue:a(t).task.content,"onUpdate:modelValue":l[4]||(l[4]=u=>a(t).task.content=u),clearable:"",type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:12},{default:o(()=>[e(r,{label:"\u4EFB\u52A1\u63D0\u4EA4\u65F6\u95F4",prop:"id"},{default:o(()=>[e(n,{readonly:"",modelValue:a(t).task.update_time,"onUpdate:modelValue":l[5]||(l[5]=u=>a(t).task.update_time=u)},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:12},{default:o(()=>[e(r,{label:"\u7247\u533A\u7ECF\u7406",prop:"flow_cate"},{default:o(()=>[e(n,{readonly:"",modelValue:a(t).area_manager,"onUpdate:modelValue":l[6]||(l[6]=u=>a(t).area_manager=u)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(x),e(c,null,{default:o(()=>[e(s,{span:24},{default:o(()=>[e(r,{label:"\u8BE6\u60C5\u63CF\u8FF0",prop:"remark"},{default:o(()=>{var u,m,i;return[e(n,{readonly:"",value:(i=(m=(u=a(t).task)==null?void 0:u.extend)==null?void 0:m.other)==null?void 0:i.note,clearable:"",type:"textarea"},null,8,["value"])]}),_:1})]),_:1}),e(s,{span:24},{default:o(()=>[e(r,{label:"\u56FE\u7247\u9644\u4EF6"},{default:o(()=>{var u,m,i;return[(_(!0),y(I,null,h((i=(m=(u=a(t).task)==null?void 0:u.extend)==null?void 0:m.other)==null?void 0:i.annex,(E,f)=>{var w,A,g;return _(),V(S,{class:"attachment",key:f,src:E,"preview-src-list":(g=(A=(w=a(t).task)==null?void 0:w.extend)==null?void 0:A.other)==null?void 0:g.annex,"initial-index":f,fit:"cover"},null,8,["src","preview-src-list","initial-index"])}),128))]}),_:1})]),_:1}),e(s,{span:24},{default:o(()=>[e(r,{label:"\u89C6\u9891\u9644\u4EF6"},{default:o(()=>{var u,m,i;return[(_(!0),y(I,null,h((i=(m=(u=a(t).task)==null?void 0:u.extend)==null?void 0:m.other)==null?void 0:i.video_annex,(E,f)=>(_(),y("video",{class:"video",src:E,key:f,controls:""},null,8,de))),128))]}),_:1})]),_:1})]),_:1}),e(x),e(s,{span:12},{default:o(()=>[e(r,{label:"\u5BA1\u6838",prop:"check_status",clearable:"",style:{width:"100%"}},{default:o(()=>[e(W,{disabled:a(p)=="details",modelValue:a(t).check_status,"onUpdate:modelValue":l[7]||(l[7]=u=>a(t).check_status=u)},{default:o(()=>[e(D,{label:2},{default:o(()=>[P("\u901A\u8FC7")]),_:1}),e(D,{label:3},{default:o(()=>[P("\u9A73\u56DE")]),_:1})]),_:1},8,["disabled","modelValue"])]),_:1})]),_:1}),a(B).includes(a(t).type)?(_(),V(c,{key:0},{default:o(()=>[e(s,null,{default:o(()=>[a(t).type==6?(_(),V(r,{key:0,label:"\u653F\u7B56\u8865\u8D34\u91D1\u989D",prop:"amount"},{default:o(()=>[e(n,{readonly:a(p)=="details",modelValue:a(t).amount,"onUpdate:modelValue":l[8]||(l[8]=u=>a(t).amount=u),clearable:""},null,8,["readonly","modelValue"])]),_:1})):(_(),V(r,{key:1,label:a(N),prop:"amount"},{default:o(()=>[e(n,{readonly:a(p)=="details",modelValue:a(t).amount,"onUpdate:modelValue":l[9]||(l[9]=u=>a(t).amount=u),clearable:""},null,8,["readonly","modelValue"])]),_:1},8,["label"]))]),_:1})]),_:1})):ne("",!0),e(c,null,{default:o(()=>[e(s,null,{default:o(()=>[e(r,{label:"\u5907\u6CE8",prop:"remark"},{default:o(()=>[e(n,{readonly:a(p)=="details",modelValue:a(t).remark,"onUpdate:modelValue":l[10]||(l[10]=u=>a(t).remark=u),clearable:"",type:"textarea"},null,8,["readonly","modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","button","clickModalClose"])])}}});const Ze=re(me,[["__scopeId","data-v-81ba409a"]]);export{Ze as default};
|