import{_ as O,W as G,X as I,O as q,w as L,Q as P,v as R,C as $,G as j,T as z,R as Q}from"./element-plus.681b9893.js";import{_ as S}from"./index.vue_vue_type_script_setup_true_lang.58d80c54.js";import{u as K}from"./usePaging.6a6670f9.js";import{o as M,C as W}from"./index.0c8416f0.js";import{u as X}from"./vue-router.101084e3.js";import{d as k,r as w,Z,o as m,K as d,L as e,M as H,u as l,U as o,R as s,Q as v,a as g,j as h,S as _}from"./@vue.18505fe0.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.466e9fe4.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./vue-plugin-hiprint.a2d84e76.js";import"./jquery.c3f97e49.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.0b5a7289.js";import"./engine.io-client.81030771.js";import"./engine.io-parser.c748e159.js";import"./@socket.io.77accf6a.js";import"./debug.b392f131.js";import"./socket.io-parser.b7256298.js";import"./html2canvas.0f5947bc.js";import"./canvg.a673c4b2.js";import"./core-js.97b94d69.js";import"./raf.407ad6ad.js";import"./performance-now.a710f6e4.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.eba17832.js";import"./stackblur-canvas.0fb5df18.js";import"./nprogress.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const J={class:"flex mt-4 justify-end"},Y={class:"dialog-footer"},oo=k({name:"subOrder"}),re=k({...oo,setup(eo){X(),w("");const B=Z({is_storage:1}),{pager:i,getLists:f,resetParams:to,resetPage:lo}=K({fetchFun:W,params:B});f();const p=w(!1),t=w({id:"",type:0,notes:"",nums:0,q_nums:0}),uo=(c,u)=>{if(t.value=Object.assign({id:"",type:u,notes:"",nums:0},c),u==0)return E();t.value.q_nums=c.nums,p.value=!0},E=()=>{M({id:t.value.id,type:t.value.type,notes:t.value.notes,nums:t.value.nums}).then(c=>{f(),p.value=!1})};return(c,u)=>{const a=q,C=O,b=L,y=P,F=S,n=G,V=R,D=$,x=I,A=j,N=z,T=Q;return m(),d(N,null,{default:e(()=>[H((m(),d(y,{data:l(i).lists,border:"",style:{width:"100%","margin-top":"10px"}},{default:e(()=>[o(a,{prop:"id",label:"ID",width:"120"}),o(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"goods_name","show-overflow-tooltip":"",width:"220"}),o(a,{label:"\u5355\u4F4D",prop:"unit_name",width:"80","show-overflow-tooltip":""}),o(a,{label:"\u4F9B\u5E94\u5546",prop:"supplier_name","show-overflow-tooltip":"",width:"160"}),o(a,{label:"\u5165\u5E93\u6570\u91CF",prop:"nums","show-overflow-tooltip":"",width:"100"}),o(a,{label:"\u62A5\u4EF7",prop:"price","show-overflow-tooltip":""}),o(a,{label:"\u7269\u6D41/\u9001\u8D27\u4EBA",prop:"delivery_name","show-overflow-tooltip":""}),o(a,{label:"\u5355\u53F7/\u624B\u673A",prop:"delivery_id","show-overflow-tooltip":""}),o(a,{label:"\u72B6\u6001",prop:"is_storage","show-overflow-tooltip":""},{default:e(({row:r})=>[r.is_storage?(m(),d(C,{key:0,type:"success"},{default:e(()=>[s("\u5DF2\u5165\u5E93")]),_:1})):(m(),d(C,{key:1,type:"info"},{default:e(()=>[s("\u672A\u5165\u5E93")]),_:1}))]),_:1}),o(a,{label:"\u64CD\u4F5C\u4EBA\u5458",prop:"storage_admin_name","show-overflow-tooltip":""}),o(a,{label:"\u5907\u6CE8",prop:"notes","show-overflow-tooltip":""}),o(a,{label:"\u5165\u5E93\u65F6\u95F4",prop:"update_time","show-overflow-tooltip":"",width:"160"}),v("",!0)]),_:1},8,["data"])),[[T,l(i).loading]]),g("div",J,[l(i).lists?(m(),d(F,{key:0,modelValue:l(i),"onUpdate:modelValue":u[0]||(u[0]=r=>h(i)?i.value=r:null),onChange:l(f)},null,8,["modelValue","onChange"])):v("",!0)]),o(A,{modelValue:l(p),"onUpdate:modelValue":u[4]||(u[4]=r=>h(p)?p.value=r:null),title:"\u5165\u5E93",width:"600"},{footer:e(()=>[g("div",Y,[o(b,{onClick:u[3]||(u[3]=r=>p.value=!1)},{default:e(()=>[s("\u53D6\u6D88")]),_:1}),o(b,{type:"primary",onClick:E},{default:e(()=>[s(" \u786E\u8BA4 ")]),_:1})])]),default:e(()=>[o(x,{class:"margin-top",column:1,border:""},{default:e(()=>[o(n,{label:"\u4F9B\u5E94\u5546\u540D\u79F0"},{default:e(()=>[s(_(l(t).supplier_name),1)]),_:1}),o(n,{label:"\u5546\u54C1\u540D\u79F0"},{default:e(()=>[s(_(l(t).goods_name),1)]),_:1}),o(n,{label:"\u5546\u54C1\u62A5\u4EF7"},{default:e(()=>[s(" \xA5 "+_(l(t).price)+" / "+_(l(t).unit_name),1)]),_:1}),o(n,{label:"\u5E94\u5165\u5E93\u6570\u91CF"},{default:e(()=>[s(_(l(t).q_nums),1)]),_:1}),o(n,{label:"\u5B9E\u9645\u5165\u5E93\u6570\u91CF"},{default:e(()=>[o(V,{modelValue:l(t).nums,"onUpdate:modelValue":u[1]||(u[1]=r=>l(t).nums=r),step:1,min:1},null,8,["modelValue"])]),_:1}),o(n,{label:"\u5907\u6CE8"},{default:e(()=>[o(D,{modelValue:l(t).notes,"onUpdate:modelValue":u[2]||(u[2]=r=>l(t).notes=r),type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}}});export{re as default};