moreShopAdmin/build/admin/assets/add.e9afc925.js

2 lines
7.7 KiB
JavaScript
Raw Normal View History

2024-09-23 15:17:58 +08:00
import{J as G,K as H,D as Q,C as X,w as Y,M as ee,b as oe,N as te,F as le,I as ue,L as ae}from"./element-plus.4a7d92a3.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.3c5d8778.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.2e6fb207.js";import{k as ie,h as de}from"./index.9f0893c4.js";import{b as ne}from"./store_order.069d7270.js";import{u as pe,a as me}from"./vue-router.101084e3.js";import{a as _e}from"./store_product_unit.ab4adad2.js";import{a as ce}from"./warehouse.86d32635.js";import{d as T,r as i,s as fe,Z as he,o as v,K as V,L as l,a as c,U as e,u as r,c as U,T as L,a9 as S,R as _,S as we,j as A}from"./@vue.18505fe0.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.3afb9a75.js";import"./store_product.c235cc05.js";import"./store_branch_product.6e5854c7.js";import"./warehouse_product_storege.6e2def02.js";import"./lodash.9dc701ad.js";import"./system_store.4c1bc0ab.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 ve=c("div",{class:"mb-4 text-lg font-bold"},"\u65B0\u589E\u8BA2\u5355",-1),be={class:"flex-1 w-full"},Ee={class:"mb-2"},Ce={class:"flex-1 w-full"},Ve={class:"mb-2"},ke=T({name:"storeProductEdit"}),wo=T({...ke,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(ge,{emit:De}){pe();const k=i([]),$=fe(),{removeTab:I}=ie(),g=i(0),s=he({user_id:"",store_id:"",warehouse_id:"",mark:""}),R=()=>{ce({}).then(u=>{k.value=u.lists})},f=i(!1),n=i([]),O=u=>{n.value=n.value.filter(t=>t.id!==u)},P=u=>{n.value=[],n.value.push(u),s.store_id=u.id,g.value=u.id,f.value=!1},h=i(!1),p=i([]),N=u=>{p.value=p.value.filter(t=>t.id!==u)},M=u=>{u.forEach(t=>{p.value.find(E=>E.id==t.id)||p.value.push(t)}),h.value=!1},j=i([]);(()=>{_e({}).then(u=>{j.value=u.lists})})();const b=i(!1),D=i([]),K=(u="")=>{b.value=!0,de({nickname:u,page_size:10}).then(t=>{D.value=t.lists,setTimeout(()=>{b.value=!1},300)}).catch(t=>{setTimeout(()=>{b.value=!1},300)})};me();const z=async()=>{const u=p.value.map(t=>({id:t.id,product_id:t.product_id,stock:t.new_stock||0,price:t.price||0,purchase:t.purchase||0}));console.log(n.value),ne({product_arr:u,...s}).then(t=>{setTimeout(()=>{I()},2e3)})};return R(),(u,t)=>{const E=G,B=H,m=Q,C=X,w=Y,a=ee,F=oe,y=te,J=le,W=se,x=ue,Z=re,q=ae;return v(),V(q,null,{default:l(()=>[ve,c("div",null,[e(J,{ref_key:"formRef",ref:$,model:r(s),"label-width":"90px"},{default:l(()=>[e(m,{label:"\u4ED3\u5E93",prop:"uid"},{default:l(()=>[e(B,{modelValue:r(s).warehouse_id,"onUpdate:modelValue":t[0]||(t[0]=o=>r(s).warehouse_id=o),style:{width:"240px"}},{default:l(()=>[(v(!0),U(L,null,S(r(k),o=>(v(),V(E,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(m,{label:"\u7528\u6237",prop:"uid"},{default:l(()=>[e(B,{modelValue:r(s).user_id,"onUpdate:modelValue":t[1]||(t[1]=o=>r(s).user_id=o),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":K,loading:r(b),style:{width:"240px"}},{default:l(()=>[(v(!0),U(L,null,S(r(D),o=>(v(),V(E,{key:o.id,label:`${o.real_name}|${o.mobile} (ID:${o.id})`,value:o.id},null,8,["label","value"]))),128))]),_:1