moreShopAdmin/build/admin/assets/add.5b497de4.js

2 lines
7.8 KiB
JavaScript
Raw Normal View History

import{N as q,O as J,D as Q,C as X,w as Y,G as ee,b as oe,H as te,F as le,L as ue,K as ae}from"./element-plus.8e273e86.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.88f32402.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.38c370de.js";import{k as ie,h as de}from"./index.3cbb290e.js";import{b as ne}from"./store_order.1099cb22.js";import{u as pe,a as me}from"./vue-router.10bd5b90.js";import{a as _e}from"./store_product_unit.62cd91ea.js";import{a as fe}from"./warehouse.fd0cf6e7.js";import{d as T,r as i,s as ce,Z as we,o as h,K as V,L as l,a as _,U as o,u as r,c as U,T as L,a9 as S,R as f,S as ve,j as A}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.419e74f2.js";import"./store_product.e5b4f953.js";import"./store_branch_product.83374ece.js";import"./warehouse_product_storege.124613dd.js";import"./lodash.4e6d2a38.js";import"./system_store.35cdeae1.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 he={class:"flex-1 w-full"},be={class:"mb-2"},Ee={class:"flex-1 w-full"},Ce={class:"mb-2"},Ve=T({name:"storeProductEdit"}),bo=T({...Ve,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(ke,{emit:ge}){pe();const k=i([]),$=ce(),{removeTab:R}=ie(),g=i(0),s=we({user_id:"",store_id:"",warehouse_id:"",mark:""}),I=()=>{fe({}).then(u=>{k.value=u.lists})},c=i(!1),n=i([]),O=u=>{n.value=n.value.filter(e=>e.id!==u)},P=u=>{n.value=[],n.value.push(u),s.store_id=u.id,g.value=u.id,c.value=!1},w=i(!1),p=i([]),N=u=>{p.value=p.value.filter(e=>e.id!==u)},j=u=>{u.forEach(e=>{p.value.find(E=>E.id==e.id)||p.value.push(e)}),w.value=!1},K=i([]);(()=>{_e({}).then(u=>{K.value=u.lists})})();const b=i(!1),D=i([]),M=(u="")=>{b.value=!0,de({nickname:u,page_size:10}).then(e=>{D.value=e.lists,setTimeout(()=>{b.value=!1},300)}).catch(e=>{setTimeout(()=>{b.value=!1},300)})};me();const z=async()=>{const u=p.value.map(e=>({id:e.id,product_id:e.product_id,stock:e.new_stock||0,price:e.price||0,purchase:e.purchase||0}));console.log(n.value),ne({product_arr:u,...s}).then(e=>{setTimeout(()=>{R()},2e3)})};return I(),(u,e)=>{const E=q,B=J,m=Q,C=X,v=Y,a=ee,F=oe,y=te,G=le,H=se,x=ue,W=re,Z=ae;return h(),V(Z,null,{default:l(()=>[e[12]||(e[12]=_("div",{class:"mb-4 text-lg font-bold"},"\u65B0\u589E\u8BA2\u5355",-1)),_("div",null,[o(G,{ref_key:"formRef",ref:$,model:r(s),"label-width":"90px"},{default:l(()=>[o(m,{label:"\u4ED3\u5E93",prop:"uid"},{default:l(()=>[o(B,{modelValue:r(s).warehouse_id,"onUpdate:modelValue":e[0]||(e[0]=t=>r(s).warehouse_id=t),style:{width:"240px"}},{default:l(()=>[(h(!0),U(L,null,S(r(k),t=>(h(),V(E,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(m,{label:"\u7528\u6237",prop:"uid"},{default:l(()=>[o(B,{modelValue:r(s).user_id,"onUpdate:modelValue":e[1]||(e[1]=t=>r(s).user_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":M,loading:r(b),style:{width:"240px"}},{default:l(()=>[(h(!0),U(L,null,S(r(D),t=>(h(),V(E,{key:t.id,label