2024-08-06 11:32:42 +08:00
|
|
|
import{G as H,H as K,k as Q,w as Z,M as z,b as J,N as W,D as X,v as Y,F as ee,I as oe,L as te}from"./element-plus.4a7d92a3.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.9957ead3.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.0e13bfca.js";import{w as ae}from"./index.2320852b.js";import{d as se}from"./store_product.c992a5be.js";import{d as F,s as re,r,Z as ie,ap as ne,o as h,K as E,L as o,a as p,U as e,u as n,R as i,S as pe,M as V,Q as de,j as C}from"./@vue.18505fe0.js";import"./lodash.9dc701ad.js";import{u as me,a as _e}from"./vue-router.101084e3.js";import{a as ce}from"./store_product_unit.daf78fbb.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.b515b522.js";import"./warehouse_product_storege.451c57cd.js";import"./system_store.41a4f444.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 fe=p("div",{class:"mb-4 text-lg font-bold"},"\u5BFC\u5165\u5546\u54C1\u5230\u95E8\u5E97",-1),we={class:"flex-1 w-full"},ve={class:"mb-2"},he={class:"flex-1 w-full"},Ee={class:"mb-2"},be=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),Ce=F({name:"storeProductEdit"}),mo=F({...Ce,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Be,{emit:De}){const B=me(),A=re(),{removeTab:R}=ae();r("add");const f=r(""),S=ie({store_id:""});B.query.warehouse_id&&(f.value=parseInt(B.query.warehouse_id));const _=r(!1),d=r([]),U=s=>{d.value=d.value.filter(t=>t.id!==s)},I=s=>{s.forEach(t=>{d.value.find(l=>l.id==t.id)||d.value.push(t)}),_.value=!1},c=r(!1),m=r([]),L=s=>{m.value=m.value.filter(t=>t.id!==s)},N=s=>{s.forEach(t=>{m.value.find(l=>l.id==t.id)||m.value.push(t)}),c.value=!1},P=r([]);(()=>{ce({}).then(s=>{P.value=s.lists})})();const w=r(1);_e();const $=async()=>{if(f.value==""){Q.error("\u8BF7\u9009\u62E9\u4ED3\u5E93");return}const s=m.value.map(l=>({id:l.product_id,stock:l.new_stock||0,batch:l.batch||0})),t=d.value.map(l=>l.id);se({product_arr:s,store_arr:t,stock_type:w.value,warehouse_id:f.value}).then(l=>(R(),!1))};return(s,t)=>{const l=Z,a=z,D=J,k=W,v=X,T=Y,y=H,M=K,O=ee,j=le,g=oe,q=ue,G=te,x=ne("perms");return h(),E(G,null,{default:o(()=>[fe,p("div",null,[e(O,{ref_key:"formRef",ref:A,model:n(S),"label-width":"90px"},{default:o(()=>[e(v,{label:"\u95E8\u5E97",prop:"store_id"},{default:o(()=>[p("div",we,[p("div",ve,[e(l,{type:"primary",onClick:t[0]||(t[0]=u=>_.value=!0)},{default:o(()=>[i("\u6DFB\u52A0\u95E8\u5E97")]),_:1})]),e(k,{data:n(d)},{default:o(()=>[e(a,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(a,{label:"\u95E8\u5E97\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(a,{label:"\u624B\u673A\u53F7\u7801",prop:"phone","show-overflow-tooltip":""}),e(a,{label:"\u8BE6\u7EC6\u5730\u5740",prop:"detailed_address","show-overflow-tooltip":""}),e(a,{label:"\u95E8\u5E97logo",prop:"image","show-overflow-tooltip":""},{default:o(({row:u})=>[e(D,{src:u.image,class:"w-[40px] h-[40px]","preview-teleported":!0},null,8,["src"])]),_:1}),e(a,{label:"\u8425\u4E1A\u72B6\u6001",prop:"is_show","show-overflow-tooltip":""},{defa
|