moreShopAdmin/dist/admin/assets/import.83d7097e.js

2 lines
8.0 KiB
JavaScript
Raw Normal View History

2024-08-25 21:38:52 +08:00
import{U as Q,G as X,H as ee,k as L,J as oe,K as te,D as ue,C as le,w as ae,M as re,b as se,N as ie,F as ne,I as pe,L as de}from"./element-plus.a63a26dd.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.cf6ad159.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.095dcf75.js";import{k as ce}from"./index.cde98ffa.js";import{a as fe}from"./warehouse_order.512378db.js";import{d as S,s as Ee,r as s,Z as we,ap as ve,o as b,K as B,L as t,a as c,U as e,u as r,j as k,c as he,T as be,a9 as ke,R as n,S as De,M as Ce}from"./@vue.18505fe0.js";import"./lodash.2473fc51.js";import{u as Be,a as ye}from"./vue-router.101084e3.js";import{a as Ve}from"./store_product_unit.55a6fb10.js";import{a as ge}from"./warehouse.c404c695.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.4884cfc2.js";import"./axios.932d3f8a.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import"./usePaging.6a6670f9.js";import"./useDictOptions.5cfa01eb.js";import"./store_product.e62586d9.js";import"./store_branch_product.26fcf8e6.js";import"./warehouse_product_storege.5b79ec79.js";import"./system_store.f3614cdf.js";import"./pinia.a969beab.js";import"./css-color-function.9f6a56f3.js";import"./color.d1bc3784.js";import"./clone.83700f2e.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.fcc9be76.js";import"./vue-clipboard3.9e751565.js";import"./clipboard.dda64e67.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=S({name:"storeProductEdit"}),Fo=S({...Re,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Ie,{emit:Me}){const y=Be(),R=Ee();ce(),s("add");const p=s(""),V=s([]);s(0);const d=we({store_id:"",manufacture:"",remark:""});y.query.warehouse_id&&(p.value=parseInt(y.query.warehouse_id));const I=()=>{ge({}).then(l=>{V.value=l.lists})},E=s(!1),f=s([]),M=l=>{f.value=f.value.filter(u=>u.id!==l)},O=l=>{f.value=[],f.value.push(l),D(),E.value=!1},w=s(!1),m=s([]),P=l=>{m.value=m.value.filter(u=>u.id!==l)},T=l=>{l.forEach(u=>{m.value.find(i=>i.id==u.id)||m.value.push(u)}),w.value=!1},$=s([]);(()=>{Ve({}).then(l=>{$.value=l.lists})})();const h=s(1),N=s(!0),D=()=>{m.value.map(l=>({id:l.product_id,stock:l.new_stock||0,stocks:l.stock||0}))},Y=ye(),j=async()=>{if(p.value==""){L.error("\u8BF7\u9009\u62E9\u4ED3\u5E93");return}if(D(),N.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){L.error("\u95E8\u5E97\u4E0D\u80FD\u8D85\u8FC7\u4E00\u4E2A");return}fe({product_arr:l,store_arr:u,stock_type:h.value,warehouse_id:p.value,delivery_time:d.manufacture,mark:d.remark}).then(i=>{setTimeout(()=>{Y.push({path:"/warehouse/outbound_order"})},2e3)})};return I(),(l,u)=>{const i=oe,q=te,_=ue,G=Q,g=le,v=ae,a=re,F=se,x=ie,U=X,K=ee,W=ne,H=_e,A=pe,J=me,Z=de,z=ve("perms");return b(),B(Z,null,{default:t(()=>[Fe,c("div",null,[e(W,{ref_key:"formRef",ref:R,model:r(d),"label-width":"90px"},{default:t(()=>[e(_,{label:"\u4ED3\u5E93",prop:"uid"},{default:t(()=>[e(q,{modelValue:r(p),"onUpdate:modelValue":u[0]||(u[0]=o=>k(p)?p.value=o:null),style:{width:"240px"}},{default:t(()=>[(b(!0),he(be,null,ke(r(V),o=>(b(),B(i,{key:o.id,label:o.name,value:o.id},null,8,["label","