2024-11-19 12:10:58 +08:00
|
|
|
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.99d75aac.js";import{_ as oo}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.af46c0c4.js";import{k as to}from"./index.5347f220.js";import{f as eo}from"./store_product.918bb5df.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.ce937795.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.267beac3.js";import"./store_branch_product.9b86d944.js";import"./warehouse_product_storege.456c35b9.js";import"./system_store.2f4d38fd.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 ")]
|