2024-08-25 21:38:52 +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.a63a26dd.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.88ff5ec8.js";import{_ as oo}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.bab3c8c6.js";import{k as to}from"./index.af2b1692.js";import{f as eo}from"./store_product.be1b28fc.js";import{d as k,s as lo,r as i,Z as uo,ap as ao,o as w,K as E,L as e,a as p,U as o,u as m,R as r,S as so,M as y,j as h}from"./@vue.18505fe0.js";import"./lodash.2473fc51.js";import{a as ro}from"./vue-router.101084e3.js";import{a as io}from"./store_product_unit.f05291df.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.ceaaf089.js";import"./store_branch_product.01737b3b.js";import"./warehouse_product_storege.11c6bdc0.js";import"./system_store.7ab9d72e.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 po=p("div",{class:"mb-4 text-lg font-bold"},"\u5BFC\u5165\u5546\u54C1\u5230\u95E8\u5E97",-1),no={class:"flex-1 w-full"},mo={class:"mb-2"},_o={class:"flex-1 w-full"},co={class:"mb-2"},fo=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),vo=k({name:"storeProductEdit"}),rt=k({...vo,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(wo,{emit:Eo}){const x=lo(),{removeTab:F}=to();i("add");const V=uo({store_id:""}),_=i(!1),n=i([]),A=s=>{n.value=n.value.filter(t=>t.id!==s)},S=s=>{s.forEach(t=>{n.value.find(u=>u.id==t.id)||n.value.push(t)}),_.value=!1},c=i(!1),d=i([]),L=s=>{d.value=d.value.filter(t=>t.id!==s)},R=s=>{s.forEach(t=>{d.value.find(u=>u.id==t.id)||d.value.push(t)}),c.value=!1},U=i([]);(()=>{io({}).then(s=>{U.value=s.lists})})();const f=i(1),I=ro(),P=async()=>{const s=d.value.map(u=>({id:u.id,stock:u.new_stock||0})),t=n.value.map(u=>u.id);console.log(s,t),eo({product_arr:s,store_arr:t,stock_type:f.value}).then(u=>{F(),I.push({path:"/store/store_product"})})};return(s,t)=>{const u=K,a=Z,b=q,C=z,v=J,B=G,$=H,T=Q,N=oo,D=W,M=Y,O=X,g=ao("perms");return w(),E(O,null,{default:e(()=>[po,p("div",null,[o(T,{ref_key:"formRef",ref:x,model:m(V),"label-width":"90px"},{default:e(()=>[o(v,{label:"\u95E8\u5E97",prop:"store_id"},{default:e(()=>[p("div",no,[p("div",mo,[o(u,{type:"primary",onClick:t[0]||(t[0]=l=>_.value=!0)},{default:e(()=>[r("\u6DFB\u52A0\u95E8\u5E97")]),_:1})]),o(C,{data:m(n)},{default:e(()=>[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:e(({row:l})=>[o(b,{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:e(({row:l})=>[r(so(l.is_show?"\u8425\u4E1A":"\u6253\u70CA"),1)]),_:1}),o(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:e(({row:l})=>[
|