import{a0 as O,a1 as T,a2 as q,G,w as P,H as L,v as $,C as j,L as R}from"./element-plus.8e273e86.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{u as S}from"./usePaging.f8c888e4.js";import{b as H}from"./purchase_order.82531d6a.js";import{u as K}from"./vue-router.10bd5b90.js";import{d as y,r as f,Z as Q,o as _,c as Z,U as e,L as l,K as w,R as r,Q as k,u,a as v,j as g,S as m}from"./@vue.76ce7aa3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.2078eb25.js";import"./lodash.41b9567d.js";import"./axios.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.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"./nprogress.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";const J={class:"flex mt-4 justify-end"},M={class:"dialog-footer"},W=y({name:"subOrder"}),Le=y({...W,setup(X,{expose:B}){const F=K();f("");const V=Q({order_id:F.query.id,is_storage:1}),{pager:p,getLists:c,resetParams:Y,resetPage:ee}=S({fetchFun:H,params:V});B({getLists:c});const n=f(!1),t=f({id:"",type:0,notes:"",nums:0,q_nums:0}),oe=(d,o)=>{if(t.value=Object.assign({id:"",type:o,notes:"",nums:0},d),o==0)return E();t.value.q_nums=d.nums,n.value=!0},E=()=>{apiOpurchaseclassGoodsOfferUpdate({id:t.value.id,type:t.value.type,notes:t.value.notes,nums:t.value.nums}).then(d=>{c(),n.value=!1})};return(d,o)=>{const s=G,b=O,C=P,h=L,x=z,i=T,D=$,N=j,U=q,A=R;return _(),Z("div",null,[e(h,{data:u(p).lists,border:"",style:{width:"100%","margin-top":"10px"}},{default:l(()=>[e(s,{prop:"id",label:"ID",width:"120"}),e(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"goods_name","show-overflow-tooltip":"",width:"220"}),e(s,{label:"\u5355\u4F4D",prop:"unit_name",width:"80","show-overflow-tooltip":""}),e(s,{label:"\u4F9B\u5E94\u5546",prop:"supplier_name","show-overflow-tooltip":"",width:"160"}),e(s,{label:"\u5165\u5E93\u6570\u91CF",prop:"nums","show-overflow-tooltip":"",width:"100"}),e(s,{label:"\u62A5\u4EF7",prop:"price","show-overflow-tooltip":""}),e(s,{label:"\u72B6\u6001",prop:"is_storage","show-overflow-tooltip":""},{default:l(({row:a})=>[a.is_storage?(_(),w(b,{key:0,type:"success"},{default:l(()=>o[5]||(o[5]=[r("\u5DF2\u5165\u5E93")])),_:1})):(_(),w(b,{key:1,type:"info"},{default:l(()=>o[6]||(o[6]=[r("\u672A\u5165\u5E93")])),_:1}))]),_:1}),e(s,{label:"\u5907\u6CE8",prop:"notes","show-overflow-tooltip":""}),e(s,{label:"\u5165\u5E93\u65F6\u95F4",prop:"update_time","show-overflow-tooltip":"",width:"160"}),k("",!0)]),_:1},8,["data"]),v("div",J,[u(p).lists?(_(),w(x,{key:0,modelValue:u(p),"onUpdate:modelValue":o[0]||(o[0]=a=>g(p)?p.value=a:null),onChange:u(c)},null,8,["modelValue","onChange"])):k("",!0)]),e(A,{modelValue:u(n),"onUpdate:modelValue":o[4]||(o[4]=a=>g(n)?n.value=a:null),title:"\u5165\u5E93",width:"600"},{footer:l(()=>[v("div",M,[e(C,{onClick:o[3]||(o[3]=a=>n.value=!1)},{default:l(()=>o[9]||(o[9]=[r("\u53D6\u6D88")])),_:1}),e(C,{type:"primary",onClick:E},{default:l(()=>o[10]||(o[10]=[r(" \u786E\u8BA4 ")])),_:1})])]),default:l(()=>[e(U,{class:"margin-top",column:1,border:""},{default:l(()=>[e(i,{label:"\u4F9B\u5E94\u5546\u540D\u79F0"},{default:l(()=>[r(m(u(t).supplier_name),1)]),_:1}),e(i,{label:"\u5546\u54C1\u540D\u79F0"},{default:l(()=>[r(m(u(t).goods_name),1)]),_:1}),e(i,{label:"\u5546\u54C1\u62A5\u4EF7"},{default:l(()=>[r(" \xA5 "+m(u(t).price)+" / "+m(u(t).unit_name),1)]),_:1}),e(i,{label:"\u5E94\u5165\u5E93\u6570\u91CF"},{default:l(()=>[r(m(u(t).q_nums),1)]),_:1}),e(i,{label:"\u5B9E\u9645\u5165\u5E93\u6570\u91CF"},{default:l(()=>[e(D,{modelValue:u(t).nums,"onUpdate:modelValue":o[1]||(o[1]=a=>u(t).nums=a),step:1,min:1},null,8,["modelValue"])]),_:1}),e(i,{label:"\u5907\u6CE8"},{default:l(()=>[e(N,{modelValue:u(t).notes,"onUpdate:modelValue":o[2]||(o[2]=a=>u(t).notes=a),type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}});export{Le as default};
