moreShopAdmin/build/admin/assets/putStorage.131687ff.js

2 lines
3.6 KiB
JavaScript

import{m as y,_ as I,r as f,aT as O,bs as U,bt as G,bu as P,p as _,q as $,t as e,v as l,y as b,a2 as n,A as k,u,x as v,i as g,G as d,b6 as j,ae as z,b7 as L,ad as R,aW as S,b0 as W}from"./.pnpm.1b0299fb.js";import{_ as H}from"./index.vue_vue_type_script_setup_true_lang.b077f234.js";import{u as J}from"./usePaging.00aa976d.js";import{b as K}from"./purchase_order.5befcc51.js";import"./index.689cfa31.js";import"./@vueuse.72d44d91.js";import"./lodash.c3b66c05.js";import"./@vue.9d708d7c.js";const M={class:"flex mt-4 justify-end"},Q={class:"dialog-footer"},X=y({name:"subOrder"}),pe=y({...X,setup(Y,{expose:B}){const F=I();f("");const V=O({order_id:F.query.id,is_storage:1}),{pager:p,getLists:c,resetParams:Z,resetPage:ee}=J({fetchFun:K,params:V});B({getLists:c});const r=f(!1),t=f({id:"",type:0,notes:"",nums:0,q_nums:0}),oe=(m,o)=>{if(t.value=Object.assign({id:"",type:o,notes:"",nums:0},m),o==0)return w();t.value.q_nums=m.nums,r.value=!0},w=()=>{apiOpurchaseclassGoodsOfferUpdate({id:t.value.id,type:t.value.type,notes:t.value.notes,nums:t.value.nums}).then(m=>{c(),r.value=!1})};return(m,o)=>{const s=j,E=U,C=z,h=L,x=H,i=G,D=R,N=S,A=P,T=W;return _(),$("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?(_(),b(E,{key:0,type:"success"},{default:l(()=>o[5]||(o[5]=[n("\u5DF2\u5165\u5E93")])),_:1})):(_(),b(E,{key:1,type:"info"},{default:l(()=>o[6]||(o[6]=[n("\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",M,[u(p).lists?(_(),b(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(T,{modelValue:u(r),"onUpdate:modelValue":o[4]||(o[4]=a=>g(r)?r.value=a:null),title:"\u5165\u5E93",width:"600"},{footer:l(()=>[v("div",Q,[e(C,{onClick:o[3]||(o[3]=a=>r.value=!1)},{default:l(()=>o[9]||(o[9]=[n("\u53D6\u6D88")])),_:1}),e(C,{type:"primary",onClick:w},{default:l(()=>o[10]||(o[10]=[n(" \u786E\u8BA4 ")])),_:1})])]),default:l(()=>[e(A,{class:"margin-top",column:1,border:""},{default:l(()=>[e(i,{label:"\u4F9B\u5E94\u5546\u540D\u79F0"},{default:l(()=>[n(d(u(t).supplier_name),1)]),_:1}),e(i,{label:"\u5546\u54C1\u540D\u79F0"},{default:l(()=>[n(d(u(t).goods_name),1)]),_:1}),e(i,{label:"\u5546\u54C1\u62A5\u4EF7"},{default:l(()=>[n(" \xA5 "+d(u(t).price)+" / "+d(u(t).unit_name),1)]),_:1}),e(i,{label:"\u5E94\u5165\u5E93\u6570\u91CF"},{default:l(()=>[n(d(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{pe as default};