123 |
- import{_ as L,d as z,cl as T,m as d,cs as Q,n as $,p as H,r as i,o as p,A as m,x as l,h as a,u as O,ct as I,c as P,F as G,y as J,a as g,cu as K,b as W,H as b,S as q,ce as X}from"./index.56449854.js";import{c as f}from"./createRequset.56e9fc42.js";import{i as Z}from"./isBeyondTime.ab735625.js";const v="admin/exec/";var C={list:f(`${v}listLog`,{defaultData:{exec_id:39,type:1},url:""}),exce_list:f(`${v}execList`,{defaultData:{type:1},url:""}),create_exec:f(`${v}addExec`,{defaultData:{type:1},url:""}),getCompanyCode:f("/admin/companylist",{defaultData:{type:1},url:"http://cxinv.api.caixiao365.com"}),delete_exec:f(`${v}deleteLog`)};const ee={class:"w-full flex justify-between"},ue=z({__name:"demand-modify-modal",props:{isBusiness:{type:Boolean,required:!1}},emits:["refresh"],setup(te,{expose:M,emit:N}){const c=T(!1),y=T(!1);d(""),Q(),d(null);const E=d(null),D=d([]),V=()=>({exec_id:"39",date:[],companyNo:"",depart_id:"0",plat_type:"",exec_type:"1",dataType:""}),U={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"}],dataType:[{required:!0,message:"\u8BF7\u9009\u62E9\u6570\u636E\u7C7B\u578B",trigger:"change"}]},h=d([]),w=d(null),t=d({...V()});async function Y(){var o;try{await((o=w.value)==null?void 0:o.validate());const{date:e,...r}=t.value;if(y.value=!0,Z({message:"\u65F6\u95F4\u533A\u95F4\u4E0D\u80FD\u8D85\u8FC7 90 \u5929",start:e[0],end:e[1],len:90}))return;const s=q(e[1]).subtract(-1,"days"),F=q(s).subtract(1,"days").format("YYYY-MM-DD"),n={start:e[0]+" 00:00:00",end:F+" 23:59:59",...r},{companyNo:x,dataType:B}=n,u=h.value.find(j=>j.companyNo===x)||{},{company_license:A}=u;B==="0"?n.buyer_id=A:n.seller_id=A;const k=await C.create_exec(n);y.value=!1,k.code===1?(c.value=!1,N("refresh")):X.warning(k.message)}catch{}}function R(){t.value=V(),c.value=!1}$(async()=>{const o=await C.exce_list({});o.code===1&&(D.value=o.data.list)});async function S(){y.value=!0;const o=await C.getCompanyCode({size:1e3,page:1});y.value=!1,h.value=o.data.list}return M({onDisplay:o=>{c.value=!0,S(),H(()=>o&&E.value.initialData(o))}}),(o,e)=>{const r=i("el-option"),_=i("el-select"),s=i("el-form-item"),F=i("el-date-picker"),n=i("el-alert"),x=i("el-button"),B=i("el-dialog");return p(),m(B,{modelValue:c.value,"onUpdate:modelValue":e[5]||(e[5]=u=>c.value=u),title:"\u4FEE\u6539\u62A5\u8868\u9700\u6C42",center:"",onClose:R},{default:l(()=>[a(O(I),{"label-width":"90px",rules:U,model:t.value,ref_key:"formRef",ref:w},{default:l(()=>[a(s,{label:"\u4E1A\u52A1\u8868:",prop:"exec_id"},{default:l(()=>[a(_,{modelValue:t.value.exec_id,"onUpdate:modelValue":e[0]||(e[0]=u=>t.value.exec_id=u),style:{width:"100%"},placeholder:"\u4E1A\u52A1\u8868",disabled:""},{default:l(()=>[(p(!0),P(G,null,J(D.value,u=>(p(),m(r,{key:u.id,label:u.exec_name,value:u.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(s,{label:"\u6570\u636E\u65F6\u95F4:",prop:"date"},{default:l(()=>[a(F,{modelValue:t.value.date,"onUpdate:modelValue":e[1]||(e[1]=u=>t.value.date=u),type:"daterange","value-format":"YYYY-MM-DD","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4"},null,8,["modelValue"])]),_:1}),a(s,{label:"\u6267\u884C\u7C7B\u578B",prop:"exec_type"},{default:l(()=>[a(_,{modelValue:t.value.exec_type,"onUpdate:modelValue":e[2]||(e[2]=u=>t.value.exec_type=u),placeholder:"\u6267\u884C\u7C7B\u578B",style:{width:"100%"}},{default:l(()=>[a(r,{value:"1",label:"\u7ACB\u5373\u6267\u884C"}),a(r,{value:"2",label:"\u5EF6\u8FDF\u6267\u884C"})]),_:1},8,["modelValue"])]),_:1}),g(` <el-form-item label="\u6240\u5728\u90E8\u95E8" prop="depart_id">\r
- <depart-query ref="departQueryRef" v-model="formData.depart_id" />\r
- </el-form-item> `),o.isBusiness?(p(),m(s,{key:0,label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyNo"},{default:l(()=>[a(K,{ref_key:"businessQueryRef",ref:E,"not-initial":!0,disabled:"",modelValue:t.value.companyNo,"onUpdate:modelValue":e[3]||(e[3]=u=>t.value.companyNo=u)},null,8,["modelValue"])]),_:1})):g("v-if",!0),a(s,{label:"\u6570\u636E\u7C7B\u578B",prop:"dataType"},{default:l(()=>[a(_,{modelValue:t.value.dataType,"onUpdate:modelValue":e[4]||(e[4]=u=>t.value.dataType=u),style:{width:"100%"},placeholder:"\u6570\u636E\u7C7B\u578B"},{default:l(()=>[a(r,{label:"\u8FDB\u9879\u7968",value:"0"}),a(r,{label:"\u9500\u9879\u7968",value:"1"})]),_:1},8,["modelValue"])]),_:1}),a(s,null,{default:l(()=>[W("div",ee,[String(t.value.exec_type)==="1"?(p(),m(n,{key:0,type:"warning",style:{width:"260px","margin-right":"10px",padding:"0px"},size:"small",closable:!1},{default:l(()=>[b(" \u7ACB\u5373\u6267\u884C:\u6587\u4EF6\u4F1A\u5728\u7533\u8BF7\u540E\u51E0\u5206\u949F\u5185\u751F\u6210; ")]),_:1})):g("v-if",!0),String(t.value.exec_type)==="2"?(p(),m(n,{key:1,type:"warning",style:{width:"260px","margin-right":"10px",padding:"0px"},size:"small",closable:!1},{default:l(()=>[b(" \u5EF6\u8FDF\u6267\u884C:\u6587\u4EF6\u4F1A\u5728\u7533\u8BF7\u5F53\u592920:00\u5F00\u59CB\u6267\u884C; ")]),_:1})):g("v-if",!0),a(x,{class:"float-right",type:"primary",onClick:Y},{default:l(()=>[b("\u4FDD\u5B58")]),_:1})])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}});var ae=L(ue,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/subscribe/invoiceApplyDetail/components/demand-modify-modal.vue"]]),re=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"}));export{ae as D,C as a,re as d};
|