2 lines
6.7 KiB
JavaScript
2 lines
6.7 KiB
JavaScript
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.a63a26dd.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.25896ae1.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.29ffc48b.js";import{w as ae}from"./index.038cab91.js";import{d as se}from"./store_product.2d7e1c11.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.2473fc51.js";import{u as me,a as _e}from"./vue-router.101084e3.js";import{a as ce}from"./store_product_unit.b764fef2.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.01b6a4d4.js";import"./warehouse_product_storege.5f4584bd.js";import"./system_store.cd137b2d.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 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":""},{default:o(({row:u})=>[i(pe(u.is_show?"\u8425\u4E1A":"\u6253\u70CA"),1)]),_:1}),e(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:u})=>[V((h(),E(l,{type:"danger",link:"",onClick:b=>U(u.id)},{default:o(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[x,["system_store.system_store/delete"]]])]),_:1})]),_:1},8,["data"])])]),_:1}),e(v,{label:"\u5546\u54C1",prop:"store_id"},{default:o(()=>[p("div",he,[p("div",Ee,[e(l,{type:"primary",onClick:t[1]||(t[1]=u=>c.value=!0)},{default:o(()=>[i("\u6DFB\u52A0\u5546\u54C1")]),_:1})]),e(k,{data:n(m)},{default:o(()=>[e(a,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:u})=>[e(D,{style:{width:"50px",height:"50px"},src:u.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(a,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(a,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(a,{label:"\u5206\u914D\u5E93\u5B58","min-width":"150"},{default:o(({row:u})=>[u.stock>0?(h(),E(T,{key:0,modelValue:u.new_stock,"onUpdate:modelValue":b=>u.new_stock=b,min:1,max:u.stock},null,8,["modelValue","onUpdate:modelValue","max"])):de("",!0)]),_:1}),e(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:u})=>[V((h(),E(l,{type:"danger",link:"",onClick:b=>L(u.id)},{default:o(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[x,["system_store.system_store/delete"]]])]),_:1})]),_:1},8,["data"])])]),_:1}),e(v,{label:"\u5E93\u5B58\u7C7B\u578B",prop:"stock_type"},{default:o(()=>[e(M,{modelValue:n(w),"onUpdate:modelValue":t[2]||(t[2]=u=>C(w)?w.value=u:null),class:"ml-6"},{default:o(()=>[e(y,{value:1,label:1},{default:o(()=>[i("\u5206\u914D\u552E\u5356\u5E93\u5B58")]),_:1}),e(y,{value:2,label:2},{default:o(()=>[i("\u5206\u914D\u5151\u6362\u5E93\u5B58")]),_:1})]),_:1},8,["modelValue"]),be]),_:1}),e(v,{label:""},{default:o(()=>[e(l,{onClick:$,type:"primary",class:"w-40"},{default:o(()=>[i("\u63D0\u4EA4")]),_:1})]),_:1})]),_:1},8,["model"])]),e(g,{modelValue:n(_),"onUpdate:modelValue":t[3]||(t[3]=u=>C(_)?_.value=u:null),title:"\u9009\u62E9\u95E8\u5E97",width:"70%"},{default:o(()=>[e(j,{onOnBindStore:I})]),_:1},8,["modelValue"]),e(g,{modelValue:n(c),"onUpdate:modelValue":t[4]||(t[4]=u=>C(c)?c.value=u:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:o(()=>[e(q,{onOnBindStore:N,is_warehouse:"1",warehouse_id:n(f)},null,8,["warehouse_id"])]),_:1},8,["modelValue"])]),_:1})}}});export{mo as default};
|