2 lines
8.7 KiB
JavaScript
2 lines
8.7 KiB
JavaScript
import{C as $,D as L,a4 as Q,F as W,M as z}from"./element-plus.ff90c99c.js";import{u as G}from"./vue-router.6d4cf914.js";import{P as H}from"./index.0edf4687.js";import{a as J,b as K}from"./task.50da664c.js";import X from"./list_two.a08de9b6.js";import{B as C,d as Y}from"./index.a6925776.js";import{d as h,s as Z,r as f,$ as E,o as p,c as ee,W as a,Q as o,P as r,T as n,u as _,U as i,j as te}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.vue_vue_type_script_setup_true_lang.44dbc460.js";import"./usePaging.bd7a7dec.js";import"./useDictOptions.364d5821.js";import"./task_template.01fdaebd.js";import"./lodash.3e731b89.js";import"./edit.vue_vue_type_style_index_0_lang.4bc19407.js";import"./dialog_index_personnel.vue_vue_type_script_setup_true_name_companyLists_lang.c724d13f.js";import"./map.vue_vue_type_script_setup_true_name_taskTemplateEdit_lang.342566ca.js";import"./axios.c2babb35.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 le={class:"edit-popup"},ue=h({name:"taskEidt"}),ae=h({...ue,props:{task:{type:Object,defualt:()=>{}},company_id:{type:String,default:""}},emits:["success","close"],setup(w,{expose:k,emit:I}){const A=w,D=G(),B=Z(),s=f("add");f({});const c=f(!1),v=f("\u521B\u5EFA\u65E5\u7A0B\u5B89\u6392"),U=m=>{e.start_time=C(m[0]).split(" ")[0],e.end_time=C(m[1]).split(" ")[0]},e=E({id:"",create_user_id:"",status:"",template_id:"",scheduling_id:"",template_name:"",start_time:"",end_time:"",datetime:"",content:"",templateInfo:{}}),x=E({datetime:{required:!0,message:"\u8BF7\u9009\u62E9\u65F6\u95F4\u8303\u56F4",trigger:"blur"},template_id:{required:!0,message:"\u8BF7\u9009\u62E9\u4EFB\u52A1\u5B89\u6392",trigger:"change"}}),T=E([31,32,33,34,35,45,48,49]),g=m=>!T.includes(m);function R(m){c.value=!1,e.template_id=m.id,e.template_name=m.title}const y=f(null),V=f(!1),j=async(m=null)=>{var t;try{y.value.clearValidate&&((t=y.value)==null||t.clearValidate())}catch(u){console.log(u)}s.value=="show"?(v.value="\u67E5\u770B\u65E5\u7A0B\u5B89\u6392",V.value=!0,Object.keys(e).forEach(u=>{m[u]!=null&&m[u]!=null&&(e[u]=m[u])}),e.datetime=[e.start_time.split(" ")[0],e.end_time.split(" ")[0]]):(V.value=!1,Object.keys(e).forEach(u=>{e[u]=""}))},q=()=>{var m;if(s.value=="show")return(m=B.value)==null?void 0:m.close();y.value.validate(async t=>{var u;if(t){const d={...e};D.query.id&&(d.scheduling_id=D.query.id.toString()),d.start_time=d.start_time.split(" ")[0],d.end_time=d.end_time.split(" ")[0],s.value=="edit"?await J(d):await K(d),(u=B.value)==null||u.close(),I("success")}})},P=(m="add")=>{var t;s.value=m,(t=B.value)==null||t.open()},S=()=>{I("close")};return k({open:P,updatedForm:j}),(m,t)=>{const u=$,d=L,M=Q,N=W,O=z;return p(),ee("div",le,[a(H,{ref_key:"popupRef",ref:B,title:_(v),async:!0,width:"800px",onConfirm:q,onClose:S,clickModalClose:_(s)=="show",button:_(s)!="show"},{default:o(()=>[a(N,{ref_key:"formRef",ref:y,rules:x,class:"formdata",model:e,"label-width":"120px"},{default:o(()=>[e.id?(p(),r(d,{key:0,label:"\u4EFB\u52A1ID",prop:"id"},{default:o(()=>[a(u,{disabled:!0,modelValue:e.id,"onUpdate:modelValue":t[0]||(t[0]=l=>e.id=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1ID"},null,8,["modelValue"])]),_:1})):n("",!0),a(d,{label:"\u4EFB\u52A1\u65E5\u671F",prop:"datetime"},{default:o(()=>[a(M,{disabled:_(V),modelValue:e.datetime,"onUpdate:modelValue":t[1]||(t[1]=l=>e.datetime=l),name:"datetime",type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4",onChange:U},null,8,["disabled","modelValue"])]),_:1}),a(d,{label:"\u4EFB\u52A1\u5B89\u6392",prop:"template_id"},{default:o(()=>[a(u,{disabled:_(V),modelValue:e.template_name,"onUpdate:modelValue":t[2]||(t[2]=l=>e.template_name=l),onClick:t[3]||(t[3]=l=>c.value=!0),name:"template_id",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u5B89\u6392"},null,8,["disabled","modelValue"])]),_:1}),e.template_name?(p(),r(d,{key:1,label:"\u4EFB\u52A1\u63CF\u8FF0"},{default:o(()=>[a(u,{disabled:"",modelValue:e.templateInfo.content,"onUpdate:modelValue":t[4]||(t[4]=l=>e.templateInfo.content=l),placeholder:"\u6CA1\u6709\u4EFB\u52A1\u63CF\u8FF0"},null,8,["modelValue"])]),_:1})):n("",!0),a(d,{label:"\u4E00\u9636\u6BB5\u5929\u6570"},{default:o(()=>[a(u,{disabled:"",modelValue:e.templateInfo.stage_day_one,"onUpdate:modelValue":t[5]||(t[5]=l=>e.templateInfo.stage_day_one=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5929\u6570",type:"number"},{append:o(()=>[i("\u5929")]),_:1},8,["modelValue"])]),_:1}),a(d,{label:"\u4E00\u9636\u6BB5\u91D1\u989D"},{default:o(()=>[a(u,{disabled:"",modelValue:e.templateInfo.money,"onUpdate:modelValue":t[6]||(t[6]=l=>e.templateInfo.money=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91D1\u989D",type:"number"},{append:o(()=>[i("\u5143")]),_:1},8,["modelValue"])]),_:1}),a(d,{label:"\u4E8C\u9636\u6BB5\u5929\u6570"},{default:o(()=>[a(u,{disabled:"",modelValue:e.templateInfo.stage_day_two,"onUpdate:modelValue":t[7]||(t[7]=l=>e.templateInfo.stage_day_two=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5929\u6570",type:"number"},{append:o(()=>[i("\u5929")]),_:1},8,["modelValue"])]),_:1}),a(d,{label:"\u4E8C\u9636\u6BB5\u91D1\u989D"},{default:o(()=>[a(u,{disabled:"",modelValue:e.templateInfo.money_two,"onUpdate:modelValue":t[8]||(t[8]=l=>e.templateInfo.money_two=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91D1\u989D",type:"number"},{append:o(()=>[i("\u5143")]),_:1},8,["modelValue"])]),_:1}),g(+e.templateInfo.type)?(p(),r(d,{key:2,label:"\u4E09\u9636\u6BB5\u5929\u6570"},{default:o(()=>[a(u,{disabled:"",modelValue:e.templateInfo.stage_day_three,"onUpdate:modelValue":t[9]||(t[9]=l=>e.templateInfo.stage_day_three=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5929\u6570",type:"number"},{append:o(()=>[i("\u5929")]),_:1},8,["modelValue"])]),_:1})):n("",!0),g(+e.templateInfo.type)?(p(),r(d,{key:3,label:"\u4E09\u9636\u6BB5\u91D1\u989D"},{default:o(()=>[a(u,{disabled:"",modelValue:e.templateInfo.new_money_three,"onUpdate:modelValue":t[10]||(t[10]=l=>e.templateInfo.new_money_three=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91D1\u989D",type:"number"},{append:o(()=>[i("\u5143")]),_:1},8,["modelValue"])]),_:1})):n("",!0),+e.templateInfo.types==2?(p(),r(d,{key:4,label:"\u957F\u671F\u91D1\u989D"},{default:o(()=>[a(u,{disabled:"",modelValue:e.templateInfo.money_three,"onUpdate:modelValue":t[11]||(t[11]=l=>e.templateInfo.money_three=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91D1\u989D",type:"number"},{append:o(()=>[i("\u5143")]),_:1},8,["modelValue"])]),_:1})):n("",!0),e.templateInfo.type==32?(p(),r(d,{key:5,label:"\u4E2D\u8F6C\u70B9"},{default:o(()=>{var l,b,F;return[a(u,{disabled:"",placeholder:"\u8BF7\u9009\u62E9\u4E2D\u8F6C\u70B9",value:(F=(b=(l=e.templateInfo)==null?void 0:l.extend)==null?void 0:b.transfer)==null?void 0:F.address},null,8,["value"])]}),_:1})):n("",!0),e.templateInfo.type==32?(p(),r(d,{key:6,label:"\u7EC8\u70B9"},{default:o(()=>{var l,b,F;return[a(u,{disabled:"",placeholder:"\u8BF7\u9009\u62E9\u7EC8\u70B9",value:(F=(b=(l=e.templateInfo)==null?void 0:l.extend)==null?void 0:b.terminus)==null?void 0:F.address},null,8,["value"])]}),_:1})):n("",!0),e.templateInfo.type==35?(p(),r(d,{key:7,label:"\u5145\u503C\u91D1\u989D(\u5143)",prop:"recharge"},{default:o(()=>[a(u,{disabled:"",placeholder:"\u8BF7\u8F93\u5165\u5145\u503C\u91D1\u989D(\u5143)",modelValue:e.templateInfo.recharge,"onUpdate:modelValue":t[12]||(t[12]=l=>e.templateInfo.recharge=l),type:"number"},null,8,["modelValue"])]),_:1})):n("",!0)]),_:1},8,["rules","model"])]),_:1},8,["title","clickModalClose","button"]),a(O,{modelValue:_(c),"onUpdate:modelValue":t[13]||(t[13]=l=>te(c)?c.value=l:null),title:"\u9009\u62E9\u4EFB\u52A1\u5B89\u6392",width:"60%"},{default:o(()=>[a(X,{onCustomEvent:R,company_id:A.company_id},null,8,["company_id"])]),_:1},8,["modelValue"])])}}});const Ze=Y(ae,[["__scopeId","data-v-cb07b410"]]);export{Ze as default};
|