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