2024-09-03 18:00:11 +08:00
|
|
|
import{$ as O,a0 as T,a1 as q,M as P,w as $,N as G,v as j,C as L,I as R}from"./element-plus.4a7d92a3.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{u as S}from"./usePaging.6a6670f9.js";import{b as K}from"./purchase_order.8606fa4e.js";import{u as M}from"./vue-router.101084e3.js";import{d as h,r as f,Z as Q,o as _,c as Z,U as e,L as t,K as w,R as r,Q as k,u as l,a as v,j as g,S as m}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.b17b0724.js";import"./lodash.9dc701ad.js";import"./pinia.a969beab.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const H={class:"flex mt-4 justify-end"},J={class:"dialog-footer"},W=h({name:"subOrder"}),qe=h({...W,setup(X,{expose:y}){const B=M();f("");const F=Q({order_id:B.query.id,is_storage:1}),{pager:p,getLists:c,resetParams:Y,resetPage:ee}=S({fetchFun:K,params:F});y({getLists:c});const n=f(!1),o=f({id:"",type:0,notes:"",nums:0,q_nums:0}),oe=(d,u)=>{if(o.value=Object.assign({id:"",type:u,notes:"",nums:0},d),u==0)return E();o.value.q_nums=d.nums,n.value=!0},E=()=>{apiOpurchaseclassGoodsOfferUpdate({id:o.value.id,type:o.value.type,notes:o.value.notes,nums:o.value.nums}).then(d=>{c(),n.value=!1})};return(d,u)=>{const s=P,b=O,C=$,V=G,x=z,i=T,D=j,N=L,I=q,U=R;return _(),Z("div",null,[e(V,{data:l(p).lists,border:"",style:{width:"100%","margin-top":"10px"}},{default:t(()=>[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:t(({row:a})=>[a.is_storage?(_(),w(b,{key:0,type:"success"},{default:t(()=>[r("\u5DF2\u5165\u5E93")]),_:1})):(_(),w(b,{key:1,type:"info"},{default:t(()=>[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",H,[l(p).lists?(_(),w(x,{key:0,modelValue:l(p),"onUpdate:modelValue":u[0]||(u[0]=a=>g(p)?p.value=a:null),onChange:l(c)},null,8,["modelValue","onChange"])):k("",!0)]),e(U,{modelValue:l(n),"onUpdate:modelValue":u[4]||(u[4]=a=>g(n)?n.value=a:null),title:"\u5165\u5E93",width:"600"},{footer:t(()=>[v("div",J,[e(C,{onClick:u[3]||(u[3]=a=>n.value=!1)},{default:t(()=>[r("\u53D6\u6D88")]),_:1}),e(C,{type:"primary",onClick:E},{default:t(()=>[r(" \u786E\u8BA4 ")]),_:1})])]),default:t(()=>[e(I,{class:"margin-top",column:1,border:""},{default:t(()=>[e(i,{label:"\u4F9B\u5E94\u5546\u540D\u79F0"},{default:t(()=>[r(m(l(o).supplier_name),1)]),_:1}),e(i,{label:"\u5546\u54C1\u540D\u79F0"},{default:t(()=>[r(m(l(o).goods_name),1)]),_:1}),e(i,{label:"\u5546\u54C1\u62A5\u4EF7"},{default:t(()=>[r(" \xA5 "+m(l(o).price)+" / "+m(l(o).unit_name),1)]),_:1}),e(i,{label:"\u5E94\u5165\u5E93\u6570\u91CF"},{default:t(()=>[r(m(l(o).q_nums),1)]),_:1}),e(i,{label:"\u5B9E\u9645\u5165\u5E93\u6570\u91CF"},{default:t(()=>[e(D,{modelValue:l(o).nums,"onUpdat
|