moreShopAdmin/dist/admin/assets/import.ee77e9c7.js

2 lines
6.4 KiB
JavaScript

import{G as H,H as K,w as Z,M as q,b as z,N as J,D as Q,v as W,F as X,I as Y,L as oo}from"./element-plus.a63a26dd.js";import{_ as to}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.39a74ead.js";import{_ as eo}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.6b17c29d.js";import{w as lo}from"./index.09bf43f7.js";import{d as uo}from"./store_product.07e042ce.js";import{d as x,s as ao,r as i,Z as so,ap as ro,o as E,K as h,L as t,a as p,U as o,u as m,R as r,S as io,M as k,j as b}from"./@vue.18505fe0.js";import"./lodash.2473fc51.js";import{a as po}from"./vue-router.101084e3.js";import{a as no}from"./store_product_unit.b8966153.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.477fb29e.js";import"./warehouse_product_storege.9c5f85fa.js";import"./system_store.9b72011a.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 mo=p("div",{class:"mb-4 text-lg font-bold"}," \u5BFC\u5165\u5546\u54C1\u5230\u95E8\u5E97 ",-1),_o={class:"flex-1 w-full"},co={class:"mb-2"},fo={class:"flex-1 w-full"},vo={class:"mb-2"},wo=p("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),Eo=x({name:"storeProductEdit"}),it=x({...Eo,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(ho,{emit:bo}){const V=ao(),{removeTab:F}=lo();i("add");const A=so({store_id:""}),_=i(!1),n=i([]),S=s=>{n.value=n.value.filter(e=>e.id!==s)},U=s=>{s.forEach(e=>{n.value.find(u=>u.id==e.id)||n.value.push(e)}),_.value=!1},c=i(!1),d=i([]),L=s=>{d.value=d.value.filter(e=>e.id!==s)},R=s=>{s.forEach(e=>{d.value.find(u=>u.id==e.id)||d.value.push(e)}),c.value=!1},I=i([]);(()=>{no({}).then(s=>{I.value=s.lists})})();const f=i(1),P=po(),$=async()=>{const s=d.value.map(u=>({id:u.id,stock:u.new_stock||0})),e=n.value.map(u=>u.id);console.log(s,e),uo({product_arr:s,store_arr:e,stock_type:f.value}).then(u=>{F(),P.push({path:"/store/store_product"})})};return(s,e)=>{const u=Z,a=q,C=z,B=J,v=Q,N=W,D=H,T=K,M=X,O=eo,g=Y,j=to,G=oo,y=ro("perms");return E(),h(G,null,{default:t(()=>[mo,p("div",null,[o(M,{ref_key:"formRef",ref:V,model:m(A),"label-width":"90px"},{default:t(()=>[o(v,{label:"\u95E8\u5E97",prop:"store_id"},{default:t(()=>[p("div",_o,[p("div",co,[o(u,{type:"primary",onClick:e[0]||(e[0]=l=>_.value=!0)},{default:t(()=>[r("\u6DFB\u52A0\u95E8\u5E97")]),_:1})]),o(B,{data:m(n)},{default:t(()=>[o(a,{label:"ID",prop:"id","show-overflow-tooltip":""}),o(a,{label:"\u95E8\u5E97\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(a,{label:"\u624B\u673A\u53F7\u7801",prop:"phone","show-overflow-tooltip":""}),o(a,{label:"\u8BE6\u7EC6\u5730\u5740",prop:"detailed_address","show-overflow-tooltip":""}),o(a,{label:"\u95E8\u5E97logo",prop:"image","show-overflow-tooltip":""},{default:t(({row:l})=>[o(C,{src:l.image,class:"w-[40px] h-[40px]","preview-teleported":!0},null,8,["src"])]),_:1}),o(a,{label:"\u8425\u4E1A\u72B6\u6001",prop:"is_show","show-overflow-tooltip":""},{default:t(({row:l})=>[r(io(l.is_show?"\u8425\u4E1A":"\u6253\u70CA"),1)]),_:1}),o(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:l})=>[k((E(),h(u,{type:"danger",link:"",onClick:w=>S(l.id)},{default:t(()=>[r(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["system_store.system_store/delete"]]])]),_:1})]),_:1},8,["data"])])]),_:1}),o(v,{label:"\u5546\u54C1",prop:"store_id"},{default:t(()=>[p("div",fo,[p("div",vo,[o(u,{type:"primary",onClick:e[1]||(e[1]=l=>c.value=!0)},{default:t(()=>[r("\u6DFB\u52A0\u5546\u54C1")]),_:1})]),o(B,{data:m(d)},{default:t(()=>[o(a,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),o(a,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:t(({row:l})=>[o(C,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),o(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),o(a,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),o(a,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),o(a,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),o(a,{label:"\u5206\u914D\u5E93\u5B58","min-width":"150"},{default:t(({row:l})=>[o(N,{modelValue:l.new_stock,"onUpdate:modelValue":w=>l.new_stock=w,min:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),o(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:l})=>[k((E(),h(u,{type:"danger",link:"",onClick:w=>L(l.id)},{default:t(()=>[r(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["system_store.system_store/delete"]]])]),_:1})]),_:1},8,["data"])])]),_:1}),o(v,{label:"\u5E93\u5B58\u7C7B\u578B",prop:"stock_type"},{default:t(()=>[o(T,{modelValue:m(f),"onUpdate:modelValue":e[2]||(e[2]=l=>b(f)?f.value=l:null),class:"ml-6"},{default:t(()=>[o(D,{value:1,label:1},{default:t(()=>[r("\u5206\u914D\u552E\u5356\u5E93\u5B58")]),_:1}),o(D,{value:2,label:2},{default:t(()=>[r("\u5206\u914D\u5151\u6362\u5E93\u5B58")]),_:1})]),_:1},8,["modelValue"]),wo]),_:1}),o(v,{label:""},{default:t(()=>[o(u,{onClick:$,type:"primary",class:"w-40"},{default:t(()=>[r("\u63D0\u4EA4")]),_:1})]),_:1})]),_:1},8,["model"])]),o(g,{modelValue:m(_),"onUpdate:modelValue":e[3]||(e[3]=l=>b(_)?_.value=l:null),title:"\u9009\u62E9\u95E8\u5E97",width:"70%"},{default:t(()=>[o(O,{onOnBindStore:U})]),_:1},8,["modelValue"]),o(g,{modelValue:m(c),"onUpdate:modelValue":e[4]||(e[4]=l=>b(c)?c.value=l:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:t(()=>[o(j,{onOnBindStore:R})]),_:1},8,["modelValue"])]),_:1})}}});export{it as default};