1 |
- import{_ as U,d as j,cl as w,m as F,n as L,r,o as d,A as p,x as a,h as t,u as $,ct as z,c as R,F as I,y as H,a as v,b as O,H as x,S as s,ce as T}from"./index.56449854.js";import{c as f}from"./createRequset.56e9fc42.js";const y="admin/exec/";var D={list:f(`${y}listLog`,{defaultData:{exec_id:28,type:1},url:""}),exce_list:f(`${y}execList`,{defaultData:{type:1},url:""}),create_exec:f(`${y}addExec`,{defaultData:{type:1},url:""}),delete_exec:f(`${y}deleteLog`)};const P={class:"w-full flex justify-between"},Q=j({__name:"demand-modify-modal",props:{isBusiness:{type:null,required:!1}},emits:["refresh"],setup(J,{expose:V,emit:A}){const i=w(!1),E=w(!1),B=F([]),C=()=>({exec_id:"28",date:[],supplierNo:"QS2203150147013805",depart_id:"0",plat_type:"",exec_type:"1",No_companyNo:""}),M={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:!0,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"}]},b=F(null),l=F({...C()});async function k(){var u;try{await((u=b.value)==null?void 0:u.validate());const{date:e,...c}=l.value,m=s(new Date(e)).daysInMonth(),n=s(new Date(e)).format("YYYY-MM")+"-01 00:00:00",g=s(new Date(e)).format("YYYY-MM")+`-${m} 23:59:59`;E.value=!0;const _=await D.create_exec({addField:[],...c,start:n,end:g});E.value=!1,_.code===1?(i.value=!1,A("refresh")):T.warning(_.message)}catch{}}function N(){l.value=C(),i.value=!1}L(async()=>{const u=await D.exce_list({size:100});u.code===1&&(B.value=u.data.list)});const q=u=>s(u).year()<s(Date.now()).year()?!1:s(u).year()===s(Date.now()).year()?s(u).month()>=s(Date.now()).month():!0;return V({onDisplay:u=>{i.value=!0}}),(u,e)=>{const c=r("el-option"),m=r("el-select"),n=r("el-form-item"),g=r("el-date-picker"),_=r("el-input"),h=r("el-alert"),S=r("el-button"),Y=r("el-dialog");return d(),p(Y,{modelValue:i.value,"onUpdate:modelValue":e[3]||(e[3]=o=>i.value=o),title:"\u4FEE\u6539\u62A5\u8868\u9700\u6C42",center:"",onClose:N},{default:a(()=>[t($(z),{"label-width":"90px",rules:M,model:l.value,ref_key:"formRef",ref:b},{default:a(()=>[t(n,{label:"\u4E1A\u52A1\u8868:",prop:"exec_id"},{default:a(()=>[t(m,{modelValue:l.value.exec_id,"onUpdate:modelValue":e[0]||(e[0]=o=>l.value.exec_id=o),style:{width:"100%"},placeholder:"\u4E1A\u52A1\u8868",disabled:""},{default:a(()=>[(d(!0),R(I,null,H(B.value,o=>(d(),p(c,{key:o.id,label:o.exec_name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(n,{label:"\u6570\u636E\u65F6\u95F4:",prop:"date"},{default:a(()=>[t(g,{modelValue:l.value.date,"onUpdate:modelValue":e[1]||(e[1]=o=>l.value.date=o),type:"month",style:{width:"100%"},placeholder:"\u6570\u636E\u65F6\u95F4","disabled-date":q},null,8,["modelValue"])]),_:1}),t(n,{label:"\u6267\u884C\u7C7B\u578B",prop:"exec_type"},{default:a(()=>[t(m,{modelValue:l.value.exec_type,"onUpdate:modelValue":e[2]||(e[2]=o=>l.value.exec_type=o),placeholder:"\u6267\u884C\u7C7B\u578B",style:{width:"100%"}},{default:a(()=>[t(c,{value:"1",label:"\u7ACB\u5373\u6267\u884C"}),t(c,{value:"2",label:"\u5EF6\u8FDF\u6267\u884C"})]),_:1},8,["modelValue"])]),_:1}),u.isBusiness?(d(),p(n,{key:0,label:"\u4F9B\u5E94\u5546",prop:"supplierNo"},{default:a(()=>[t(_,{modelValue:"\u5317\u4EAC\u767E\u8FB0\u8363\u8FBE\u56FD\u9645\u79D1\u8D38\u6709\u9650\u516C\u53F8",disabled:""})]),_:1})):v("v-if",!0),t(n,null,{default:a(()=>[O("div",P,[String(l.value.exec_type)==="1"?(d(),p(h,{key:0,type:"warning",style:{width:"260px","margin-right":"10px",padding:"0px"},size:"small",closable:!1},{default:a(()=>[x(" \u7ACB\u5373\u6267\u884C:\u6587\u4EF6\u4F1A\u5728\u7533\u8BF7\u540E\u51E0\u5206\u949F\u5185\u751F\u6210; ")]),_:1})):v("v-if",!0),String(l.value.exec_type)==="2"?(d(),p(h,{key:1,type:"warning",style:{width:"260px","margin-right":"10px",padding:"0px"},size:"small",closable:!1},{default:a(()=>[x(" \u5EF6\u8FDF\u6267\u884C:\u6587\u4EF6\u4F1A\u5728\u7533\u8BF7\u5F53\u592920:00\u5F00\u59CB\u6267\u884C; ")]),_:1})):v("v-if",!0),t(S,{class:"float-right",type:"primary",onClick:k},{default:a(()=>[x("\u4FDD\u5B58")]),_:1})])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}});var G=U(Q,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/subscribe/procurementCommissionSup/components/demand-modify-modal.vue"]]),X=Object.freeze(Object.defineProperty({__proto__:null,default:G},Symbol.toStringTag,{value:"Module"}));export{G as D,D as a,X as d};
|