moreShopAdmin/dist/admin/assets/add.88972f23.js

2 lines
6.6 KiB
JavaScript
Raw Normal View History

2024-08-15 21:33:10 +08:00
import{J,K as Z,D as q,w as G,M as H,b as Q,N as W,v as X,F as Y,I as ee,L as te}from"./element-plus.a63a26dd.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.b9184013.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.8ae71c16.js";import{k as se,h as ae}from"./index.82a85bee.js";import{a as ue}from"./store_order.0040dd51.js";import{d as V,s as ie,r as u,Z as re,ap as ne,o as w,K as b,L as l,a as p,U as e,u as i,c as pe,T as de,a9 as me,R as n,S as _e,M as x,j as F}from"./@vue.18505fe0.js";import"./lodash.2473fc51.js";import{u as ce,a as fe}from"./vue-router.101084e3.js";import{a as we}from"./store_product_unit.c9a9df35.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.52006ef3.js";import"./store_product.7dc808fb.js";import"./store_branch_product.93a34a07.js";import"./warehouse_product_storege.6a221fca.js";import"./system_store.c016e074.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 ve=p("div",{class:"mb-4 text-lg font-bold"},"\u65B0\u589E\u8BA2\u5355",-1),he={class:"flex-1 w-full"},be={class:"mb-2"},Ee={class:"flex-1 w-full"},Ce={class:"mb-2"},ge=V({name:"storeProductEdit"}),ct=V({...ge,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(ke,{emit:De}){ce();const L=ie(),{removeTab:U}=se();u("add"),u(0);const d=re({user_id:"",store_id:""}),m=u(!1),_=u([]),S=a=>{_.value=_.value.filter(o=>o.id!==a)},T=a=>{_.value=[a[0]],d.store_id=a[0].id,m.value=!1},c=u(!1),r=u([]),A=a=>{r.value=r.value.filter(o=>o.id!==a)},$=a=>{a.forEach(o=>{r.value.find(E=>E.id==o.id)||r.value.push(o)}),c.value=!1},I=u([]);(()=>{we({}).then(a=>{I.value=a.lists})})();const v=u(!1),g=u([]),R=(a="")=>{v.value=!0,ae({nickname:a,page_size:10}).then(o=>{g.value=o.lists,setTimeout(()=>{v.value=!1},300)}).catch(o=>{setTimeout(()=>{v.value=!1},300)})};fe();const N=async()=>{const a=r.value.map(o=>({id:o.id,stock:o.new_stock||0}));console.log(_.value),ue({product_arr:a,...d}).then(o=>{setTimeout(()=>{U()},2e3)})};return(a,o)=>{const E=J,O=Z,h=q,f=G,s=H,k=Q,D=W,P=X,M=Y,j=le,y=ee,K=oe,z=te,B=ne("perms");return w(),b(z,null,{default:l(()=>[ve,p("div",null,[e(M,{ref_key:"formRef",ref:L,model:i(d),"label-width":"90px"},{default:l(()=>[e(h,{label:"\u7528\u6237",prop:"uid"},{default:l(()=>[e(O,{modelValue:i(d).user_id,"onUpdate:modelValue":o[0]||(o[0]=t=>i(d).user_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":R,loading:i(v),style:{width:"240px"}},{default:l(()=>[(w(!0),pe(de,null,me(i(g),t=>(w(),b(E,{key:t.id,label:`${t.nickname} (ID:${t.id})`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(h,{label:"\u95E8\u5E97",prop:"store_id"},{default:l(()=>[p("div",he,[p("div",be,[e(f,{type:"primary",onClick:o[1]||(o[1]=t=>m.value=!0)},{default:l(()=>[n("\u9009\u62E9 \u95E8\u5E97")]),_:1})]),e(D,{data:i(_)},{default:l(()=>[e(s,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(s,{label:"\u95E8\u5E97\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(s,{label:"\u624B\u673A\u53F7\u7801",prop:"phone","show-overflow-tooltip":""}),e(s,{label:"\u8BE6\u7EC6\u573