2 lines
6.6 KiB
JavaScript
2 lines
6.6 KiB
JavaScript
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.4a7d92a3.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.743a84f7.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.08147728.js";import{k as se,h as ue}from"./index.2d3bad82.js";import{b as ae}from"./store_order.65472187.js";import{d as V,s as ie,r as a,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.9dc701ad.js";import{u as ce,a as fe}from"./vue-router.101084e3.js";import{a as we}from"./store_product_unit.e1c6f68c.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.9ec13c7b.js";import"./store_product.e8e77923.js";import"./store_branch_product.1ac2317e.js";import"./warehouse_product_storege.f79283e2.js";import"./system_store.ffc99544.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=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();a("add"),a(0);const d=re({user_id:"",store_id:""}),m=a(!1),_=a([]),S=u=>{_.value=_.value.filter(o=>o.id!==u)},T=u=>{_.value=[u[0]],d.store_id=u[0].id,m.value=!1},c=a(!1),r=a([]),A=u=>{r.value=r.value.filter(o=>o.id!==u)},$=u=>{u.forEach(o=>{r.value.find(E=>E.id==o.id)||r.value.push(o)}),c.value=!1},I=a([]);(()=>{we({}).then(u=>{I.value=u.lists})})();const v=a(!1),g=a([]),R=(u="")=>{v.value=!0,ue({nickname:u,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 u=r.value.map(o=>({id:o.id,stock:o.new_stock||0}));console.log(_.value),ae({product_arr:u,...d}).then(o=>{setTimeout(()=>{U()},2e3)})};return(u,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\u5730\u5740",prop:"detailed_address","show-overflow-tooltip":""}),e(s,{label:"\u95E8\u5E97logo",prop:"image","show-overflow-tooltip":""},{default:l(({row:t})=>[e(k,{src:t.image,class:"w-[40px] h-[40px]","preview-teleported":!0},null,8,["src"])]),_:1}),e(s,{label:"\u8425\u4E1A\u72B6\u6001",prop:"is_show","show-overflow-tooltip":""},{default:l(({row:t})=>[n(_e(t.is_show?"\u8425\u4E1A":"\u6253\u70CA"),1)]),_:1}),e(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:t})=>[x((w(),b(f,{type:"danger",link:"",onClick:C=>S(t.id)},{default:l(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[B,["system_store.system_store/delete"]]])]),_:1})]),_:1},8,["data"])])]),_:1}),e(h,{label:"\u5546\u54C1",prop:"store_id"},{default:l(()=>[p("div",Ee,[p("div",Ce,[e(f,{type:"primary",onClick:o[2]||(o[2]=t=>c.value=!0)},{default:l(()=>[n("\u6DFB\u52A0\u5546\u54C1")]),_:1})]),e(D,{data:i(r)},{default:l(()=>[e(s,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(s,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:l(({row:t})=>[e(k,{style:{width:"50px",height:"50px"},src:t.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(s,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(s,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(s,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(s,{label:"\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),e(s,{label:"\u9700\u6C42\u91CF","min-width":"150"},{default:l(({row:t})=>[e(P,{modelValue:t.new_stock,"onUpdate:modelValue":C=>t.new_stock=C,min:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:t})=>[x((w(),b(f,{type:"danger",link:"",onClick:C=>A(t.id)},{default:l(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[B,["system_store.system_store/delete"]]])]),_:1})]),_:1},8,["data"])])]),_:1}),e(h,{label:""},{default:l(()=>[e(f,{onClick:N,type:"primary",class:"w-40"},{default:l(()=>[n("\u63D0\u4EA4")]),_:1})]),_:1})]),_:1},8,["model"])]),e(y,{modelValue:i(m),"onUpdate:modelValue":o[3]||(o[3]=t=>F(m)?m.value=t:null),title:"\u9009\u62E9\u95E8\u5E97",width:"70%"},{default:l(()=>[e(j,{onOnBindStore:T})]),_:1},8,["modelValue"]),e(y,{modelValue:i(c),"onUpdate:modelValue":o[4]||(o[4]=t=>F(c)?c.value=t:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:l(()=>[e(K,{onOnBindStore:$})]),_:1},8,["modelValue"])]),_:1})}}});export{ct as default};
|