1 |
- import{_ as U,d as Q,cl as w,m as p,cs as j,Q as L,n as Y,w as $,p as z,r,o as n,A as m,x as t,h as s,u as D,ct as T,c as H,F as O,y as I,d3 as P,cu as G,a as v,b as J,H as g,S as K,ce as W}from"./index.56449854.js";import{c as _}from"./createRequset.56e9fc42.js";const y="admin/exec/";var V={list:_(`${y}listLog`,{defaultData:{type:1,exec_id:31,is_comon:1},url:""}),exce_list:_(`${y}execList`,{defaultData:{type:1},url:""}),create_exec:_(`${y}addExec`,{defaultData:{type:1,is_comon:1},url:""}),delete_exec:_(`${y}deleteLog`)};const X={class:"w-full flex justify-between"},Z=Q({__name:"demand-modify-modal",props:{isBusiness:{type:Boolean,required:!1}},emits:["refresh"],setup(ue,{expose:h,emit:A}){const d=w(!1),x=w(!1),k=p(""),f=j(),b=p(null),F=p([]),B=()=>({exec_id:"31",companyNo:"",depart_id:"",plat_type:"",exec_type:""}),N=L(()=>({date:[{required:!0,message:"\u8BF7\u9009\u62E9\u6570\u636E\u65F6\u95F4",trigger:"change"}],exec_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u4E1A\u52A1\u8868",trigger:"change"}],depart_id:[{required:Number(f.level)!=1,message:"\u8BF7\u9009\u62E9\u6240\u5728\u90E8\u95E8",trigger:"change"}],plat_type:[{required:!0,message:"\u8BF7\u9009\u62E9\u5E73\u53F0\u7C7B\u578B",trigger:"change"}],companyNo:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8",trigger:"change"}],exec_type:[{required:!0,message:"\u8BF7\u9009\u62E9\u6267\u884C\u7C7B\u578B",trigger:"change"}]})),E=p(null),u=p({...B()});async function M(){var a;try{await((a=E.value)==null?void 0:a.validate());let{depart_id:e,...o}=u.value;x.value=!0,e=e||"0";const i=await V.create_exec({depart_id:e,start:"2023-01-01 00:00:00",end:K(new Date).format("YYYY-MM-DD")+" 23:59:59",...o});x.value=!1,i.code===1?(d.value=!1,A("refresh")):W.warning(i.message)}catch{}}function R(){u.value=B(),d.value=!1}return Y(async()=>{const a=await V.exce_list({});a.code===1&&(F.value=a.data.list)}),$(()=>f.level,a=>{const{itemid:e="",depart_name:o}=f.info||{};Number(a)===2&&["57","53","52","56"].includes(String(e))&&(k.value=o),Number(a)===2?u.value.exec_type="2":u.value.exec_type=""},{immediate:!0}),h({onDisplay:a=>{d.value=!0,z(()=>a&&b.value.initialData(a))}}),(a,e)=>{const o=r("el-option"),i=r("el-select"),c=r("el-form-item"),C=r("el-alert"),S=r("el-button"),q=r("el-dialog");return n(),m(q,{modelValue:d.value,"onUpdate:modelValue":e[4]||(e[4]=l=>d.value=l),title:"\u4FEE\u6539\u62A5\u8868\u9700\u6C42",center:"",onClose:R},{default:t(()=>[s(D(T),{"label-width":"90px",rules:N.value,model:u.value,ref_key:"formRef",ref:E},{default:t(()=>[s(c,{label:"\u4E1A\u52A1\u8868:",prop:"exec_id"},{default:t(()=>[s(i,{modelValue:u.value.exec_id,"onUpdate:modelValue":e[0]||(e[0]=l=>u.value.exec_id=l),style:{width:"100%"},placeholder:"\u4E1A\u52A1\u8868",disabled:""},{default:t(()=>[(n(!0),H(O,null,I(F.value,l=>(n(),m(o,{key:l.id,label:l.exec_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),s(c,{label:"\u6267\u884C\u7C7B\u578B",prop:"exec_type"},{default:t(()=>[s(i,{modelValue:u.value.exec_type,"onUpdate:modelValue":e[1]||(e[1]=l=>u.value.exec_type=l),placeholder:"\u6267\u884C\u7C7B\u578B",style:{width:"100%"}},{default:t(()=>[s(o,{value:"1",label:"\u7ACB\u5373\u6267\u884C",disabled:D(f).level!=1},null,8,["disabled"]),s(o,{value:"2",label:"\u5EF6\u8FDF\u6267\u884C"})]),_:1},8,["modelValue"])]),_:1}),s(c,{label:"\u6240\u5728\u90E8\u95E8",prop:"depart_id"},{default:t(()=>[s(P,{ref:"departQueryRef",modelValue:u.value.depart_id,"onUpdate:modelValue":e[2]||(e[2]=l=>u.value.depart_id=l)},null,8,["modelValue"])]),_:1}),a.isBusiness?(n(),m(c,{key:0,label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyNo"},{default:t(()=>[s(G,{ref_key:"businessQueryRef",ref:b,"not-initial":!0,disabled:"",modelValue:u.value.companyNo,"onUpdate:modelValue":e[3]||(e[3]=l=>u.value.companyNo=l)},null,8,["modelValue"])]),_:1})):v("v-if",!0),s(c,null,{default:t(()=>[J("div",X,[String(u.value.exec_type)==="1"?(n(),m(C,{key:0,type:"warning",style:{width:"260px","margin-right":"10px",padding:"0px"},size:"small",closable:!1},{default:t(()=>[g(" \u7ACB\u5373\u6267\u884C:\u6587\u4EF6\u4F1A\u5728\u7533\u8BF7\u540E\u51E0\u5206\u949F\u5185\u751F\u6210; ")]),_:1})):v("v-if",!0),String(u.value.exec_type)==="2"?(n(),m(C,{key:1,type:"warning",style:{width:"260px","margin-right":"10px",padding:"0px"},size:"small",closable:!1},{default:t(()=>[g(" \u5EF6\u8FDF\u6267\u884C:\u6587\u4EF6\u4F1A\u5728\u7533\u8BF7\u5F53\u592920:00\u5F00\u59CB\u6267\u884C; ")]),_:1})):v("v-if",!0),s(S,{class:"float-right",type:"primary",onClick:M},{default:t(()=>[g("\u4FDD\u5B58")]),_:1})])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["modelValue"])}}});var ee=U(Z,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/subscribe/businessReceivableDetails/components/demand-modify-modal.vue"]]),te=Object.freeze(Object.defineProperty({__proto__:null,default:ee},Symbol.toStringTag,{value:"Module"}));export{ee as D,V as a,te as d};
|