moreShopAdmin/dist/admin/assets/import.5a4eea83.js

2 lines
6.2 KiB
JavaScript
Raw Normal View History

2025-01-11 14:56:33 +08:00
import{V as W,P as H,Q,k as v,N as Z,O as z,D as J,C as X,w as ee,G as oe,b as te,H as le,F as ue,L as ae,K as re}from"./element-plus.8e273e86.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.7b2a5a91.js";import{k as ne}from"./index.3f6de77c.js";import{b as ie}from"./warehouse_order.e14cb4eb.js";import"./lodash.4e6d2a38.js";import{u as pe,a as de}from"./vue-router.10bd5b90.js";import{a as me}from"./store_product_unit.c3df507d.js";import{a as _e}from"./warehouse.b2c0679c.js";import{d as B,s as ce,r,Z as fe,o as b,K as g,L as l,a as w,U as o,u as s,j as k,c as we,T as Ee,a9 as ve,R as c}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.vue_vue_type_script_setup_true_lang.d6032bc4.js";import"./usePaging.f8c888e4.js";import"./useDictOptions.067a1b39.js";import"./store_product.d32d563a.js";import"./store_branch_product.9907eaa4.js";import"./warehouse_product_storege.31b0b082.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./pinia.f3529286.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.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 be={class:"flex-1 w-full"},ke={class:"mb-2"},he=B({name:"storeProductEdit"}),wo=B({...he,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Ce,{emit:Ve}){const h=pe(),x=ce(),{removeTab:L}=ne();r("add");const i=r(""),C=r([]);r(0);const p=fe({store_id:"",manufacture:"",remark:""});h.query.warehouse_id&&(i.value=parseInt(h.query.warehouse_id));const U=()=>{_e({}).then(u=>{C.value=u.lists})};r(!1);const R=r([]),_=r(!1),d=r([]),A=u=>{d.value=d.value.filter(e=>e.id!==u)},P=u=>{u.forEach(e=>{d.value.find(a=>a.id==e.id)||d.value.push(e)}),_.value=!1},O=r([]);(()=>{me({}).then(u=>{O.value=u.lists})})();const f=r(1),S=r(!0),V=()=>{d.value.map(u=>({id:u.product_id,stock:u.new_stock||0,stocks:u.stock||0}))};de();const T=async()=>{if(i.value==""){v.error("\u8BF7\u9009\u62E9\u4ED3\u5E93");return}if(V(),S.value==!1)return;const u=d.value.map(a=>({id:a.product_id,stock:a.new_stock||0,batch:a.batch||0})),e=R.value.map(a=>a.id);if(e.length>1){v.error("\u95E8\u5E97\u4E0D\u80FD\u8D85\u8FC7\u4E00\u4E2A");return}ie({product_arr:u,store_arr:e,order_type:f.value,warehouse_id:i.value,delivery_time:p.manufacture,mark:p.remark}).then(a=>{L(),v.success(a.msg)})};return U(),(u,e)=>{const a=Z,I=z,m=J,M=W,F=X,E=ee,n=oe,N=te,Y=le,y=H,$=Q,j=ue,q=se,G=ae,K=re;return b(),g(K,null,{default:l(()=>[e[11]||(e[11]=w("div",{class:"mb-4 text-lg font-bold"},"\u51FA\u5E93\u5546\u54C1",-1)),w("div",null,[o(j,{ref_key:"formRef",ref:x,model:s(p),"label-width":"90px"},{default:l(()=>[o(m,{label:"\u4ED3\u5E93",prop:"uid"},{default:l(()=>[o(I,{modelValue:s(i),"onUpdate:modelValue":e[0]||(e[0]=t=>k(i)?i.value=t:null),style:{width:"240px"}},{default:l(()=>[(b(!0),we(Ee,null,ve(s(C),t=>(b(),g(a,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(m,{label:"\u51FA\u5E93\u65F6\u95F4"},{default:l(()=>[o(M,{readonly:!1,class:"flex-1 !flex",modelValue:s(p).manufacture,"onUpdate:modelValue":e[1]||(e[1]=t=>s(p).manufacture=t),clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u51FA\u5E93\u65E5\u671F"},null,8,["modelValue"])]),_:1}),o(m,{label:"\u5907\u6CE8"},{default:l(()=>[o(F,{modelValue:s(p).remark,"onUpdate:modelValue":e[2]||(e[2]=t=>s(p).remark=t),typ