1 |
- import{_ as Y,d as R,cl as w,m as d,d1 as j,n as L,p as $,r as n,o as i,A as f,x as l,h as o,u as z,cr as I,c as Q,F as T,y as H,d2 as O,a as v,b as G,H as E,S as s,cc as P}from"./index.62ae038d.js";import{c as y}from"./createRequset.2509add7.js";const g="admin/exec/";var h={list:y(`${g}listLog`,{defaultData:{exec_id:27,type:1},url:""}),exce_list:y(`${g}execList`,{defaultData:{type:1},url:""}),create_exec:y(`${g}addExec`,{defaultData:{type:1},url:""}),delete_exec:y(`${g}deleteLog`)};const J={class:"w-full flex justify-between"},K=R({__name:"demand-modify-modal",props:{isBusiness:{type:null,required:!1}},emits:["refresh"],setup(X,{expose:A,emit:V}){const c=w(!1),x=w(!1);d(""),j(),d(null);const D=d(null),B=d([]),C=()=>({exec_id:"27",date:[],companyNo:"",depart_id:"0",plat_type:"",exec_type:"1",No_companyNo:""}),k={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=d(null),u=d({...C()});async function M(){var t;try{await((t=b.value)==null?void 0:t.validate());const{date:e,...p}=u.value;x.value=!0;const _=s(new Date(e)).daysInMonth(),r=s(new Date(e)).format("YYYY-MM")+"-01 00:00:00",F=s(new Date(e)).format("YYYY-MM")+`-${_} 23:59:59`,m=await h.create_exec({addField:["\u4E8C\u6B21\u7ADE\u4EF7\u5355\u4EF7","\u6210\u672C\u5DEE\u989D","\u57FA\u7840\u63D0\u6210\u7CFB\u6570","\u57FA\u7840\u63D0\u6210\u91D1\u989D","\u4E8C\u6B21\u7ADE\u4EF7\u63D0\u6210\u7CFB\u6570","\u6FC0\u52B1\u63D0\u6210\u91D1\u989D","\u63D0\u6210\u5408\u8BA1"],...p,start:r,end:F});x.value=!1,m.code===1?(c.value=!1,V("refresh")):P.warning(m.message)}catch{}}function N(){u.value=C(),c.value=!1}L(async()=>{const t=await h.exce_list({size:100});t.code===1&&(B.value=t.data.list)});const q=t=>s(t).year()<s(Date.now()).year()?!1:s(t).year()===s(Date.now()).year()?s(t).month()>=s(Date.now()).month():!0;return A({onDisplay:t=>{c.value=!0,$(()=>D.value.initialData("GS2302231125079621"))}}),(t,e)=>{const p=n("el-option"),_=n("el-select"),r=n("el-form-item"),F=n("el-date-picker"),m=n("el-alert"),S=n("el-button"),U=n("el-dialog");return i(),f(U,{modelValue:c.value,"onUpdate:modelValue":e[4]||(e[4]=a=>c.value=a),title:"\u4FEE\u6539\u62A5\u8868\u9700\u6C42",center:"",onClose:N},{default:l(()=>[o(z(I),{"label-width":"90px",rules:k,model:u.value,ref_key:"formRef",ref:b},{default:l(()=>[o(r,{label:"\u4E1A\u52A1\u8868:",prop:"exec_id"},{default:l(()=>[o(_,{modelValue:u.value.exec_id,"onUpdate:modelValue":e[0]||(e[0]=a=>u.value.exec_id=a),style:{width:"100%"},placeholder:"\u4E1A\u52A1\u8868",disabled:""},{default:l(()=>[(i(!0),Q(T,null,H(B.value,a=>(i(),f(p,{key:a.id,label:a.exec_name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(r,{label:"\u6570\u636E\u65F6\u95F4:",prop:"date"},{default:l(()=>[o(F,{modelValue:u.value.date,"onUpdate:modelValue":e[1]||(e[1]=a=>u.value.date=a),type:"month",style:{width:"100%"},placeholder:"\u6570\u636E\u65F6\u95F4","disabled-date":q},null,8,["modelValue"])]),_:1}),o(r,{label:"\u6267\u884C\u7C7B\u578B",prop:"exec_type"},{default:l(()=>[o(_,{modelValue:u.value.exec_type,"onUpdate:modelValue":e[2]||(e[2]=a=>u.value.exec_type=a),placeholder:"\u6267\u884C\u7C7B\u578B",style:{width:"100%"}},{default:l(()=>[o(p,{value:"1",label:"\u7ACB\u5373\u6267\u884C"}),o(p,{value:"2",label:"\u5EF6\u8FDF\u6267\u884C"})]),_:1},8,["modelValue"])]),_:1}),t.isBusiness?(i(),f(r,{key:0,label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyNo"},{default:l(()=>[o(O,{ref_key:"businessQueryRef",ref:D,"not-initial":!0,disabled:"",modelValue:u.value.companyNo,"onUpdate:modelValue":e[3]||(e[3]=a=>u.value.companyNo=a)},null,8,["modelValue"])]),_:1})):v("v-if",!0),o(r,null,{default:l(()=>[G("div",J,[String(u.value.exec_type)==="1"?(i(),f(m,{key:0,type:"warning",style:{width:"260px","margin-right":"10px",padding:"0px"},size:"small",closable:!1},{default:l(()=>[E(" \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"?(i(),f(m,{key:1,type:"warning",style:{width:"260px","margin-right":"10px",padding:"0px"},size:"small",closable:!1},{default:l(()=>[E(" \u5EF6\u8FDF\u6267\u884C:\u6587\u4EF6\u4F1A\u5728\u7533\u8BF7\u5F53\u592920:00\u5F00\u59CB\u6267\u884C; ")]),_:1})):v("v-if",!0),o(S,{class:"float-right",type:"primary",onClick:M},{default:l(()=>[E("\u4FDD\u5B58")]),_:1})])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}});var W=Y(K,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/subscribe/procurementCommission/components/demand-modify-modal.vue"]]),ue=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"}));export{W as D,h as a,ue as d};
|