2 lines
8.1 KiB
JavaScript
2 lines
8.1 KiB
JavaScript
|
import{U as X,G as ee,H as oe,k as S,J as te,K as ue,D as le,C as ae,w as se,M as re,b as ie,N as ne,F as pe,I as de,L as me}from"./element-plus.4a7d92a3.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.c41a09ce.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.2dc4dfc2.js";import{k as fe}from"./index.5488da9c.js";import{a as Ee}from"./warehouse_order.7c95276b.js";import{d as I,s as we,r,Z as ve,ap as he,o as h,K as k,L as t,a as c,U as e,u as s,j as D,c as be,T as ke,a9 as De,R as n,S as Ce,M as R}from"./@vue.18505fe0.js";import"./lodash.9dc701ad.js";import{u as ye,a as Be}from"./vue-router.101084e3.js";import{a as Ve}from"./store_product_unit.87ce7958.js";import{a as ge}from"./warehouse.61826842.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.vue_vue_type_script_setup_true_lang.5d4e738c.js";import"./usePaging.6a6670f9.js";import"./useDictOptions.d26b50f5.js";import"./store_product.4d10c196.js";import"./store_branch_product.2381a090.js";import"./warehouse_product_storege.698b1116.js";import"./system_store.5b8f6d2d.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 Fe=c("div",{class:"mb-4 text-lg font-bold"},"\u51FA\u5E93\u5546\u54C1\u5230\u95E8\u5E97",-1),xe={class:"flex-1 w-full"},Ue={class:"mb-2"},Ae={class:"flex-1 w-full"},Le={class:"mb-2"},Se=c("span",{class:"text-info text-xs ml-6"},"\u9ED8\u8BA4\u4E3A\u5206\u914D\u552E\u5356\u5E93\u5B58, \u5982\u9700\u5206\u914D\u5151\u6362\u5E93\u5B58\u8BF7\u9009\u62E9\u5206\u914D\u5151\u6362\u5E93\u5B58",-1),Re=I({name:"storeProductEdit"}),Fo=I({...Re,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Ie,{emit:Me}){const B=ye(),M=we();fe(),r("add");const p=r(""),V=r([]);r(0);const d=ve({store_id:"",manufacture:"",remark:""});B.query.warehouse_id&&(p.value=parseInt(B.query.warehouse_id));const O=()=>{ge({}).then(l=>{V.value=l.lists})},E=r(!1),f=r([]),P=l=>{f.value=f.value.filter(u=>u.id!==l)},T=l=>{f.value=[],f.value.push(l),C(),E.value=!1},w=r(!1),m=r([]),$=l=>{m.value=m.value.filter(u=>u.id!==l)},N=l=>{l.forEach(u=>{m.value.find(i=>i.id==u.id)||m.value.push(u)}),w.value=!1},Y=r([]);(()=>{Ve({}).then(l=>{Y.value=l.lists})})();const b=r(1),j=r(!0),C=()=>{m.value.map(l=>({id:l.product_id,stock:l.new_stock||0,stocks:l.stock||0}))},q=Be(),G=async()=>{if(p.value==""){S.error("\u8BF7\u9009\u62E9\u4ED3\u5E93");return}if(C(),j.value==!1)return;const l=m.value.map(i=>({id:i.product_id,stock:i.new_stock||0,batch:i.batch||0})),u=f.value.map(i=>i.id);if(u.length>1){S.error("\u95E8\u5E97\u4E0D\u80FD\u8D85\u8FC7\u4E00\u4E2A");return}Ee({product_arr:l,store_arr:u,stock_type:b.value,warehouse_id:p.value,delivery_time:d.manufacture,mark:d.remark}).then(i=>{setTimeout(()=>{q.push({path:"/warehouse/outbound_order"})},2e3)})};return O(),(l,u)=>{const i=te,K=ue,_=le,W=X,g=ae,v=se,a=re,F=ie,x=ne,U=ee,H=oe,J=pe,Z=ce,A=de,z=_e,Q=me,L=he("perms");return h(),k(Q,null,{default:t(()=>[Fe,c("div",null,[e(J,{ref_key:"formRef",ref:M,model:s(d),"label-width":"90px"},{default:t(()=>[e(_,{label:"\u4ED3\u5E93",prop:"uid"},{default:t(()=>[e(K,{modelValue:s(p),"onUpdate:modelValue":u[0]||(u[0]=o=>D(p)?p.value=o:null),style:{width:"240px"}},{default:t(()=>[(h(!0),be(ke,null,De(s(V),o=>(h(),k(i,{key:o.id,label:o.name,value:o.id},null,8,["label","valu
|