moreShopAdmin/build/admin/assets/edit11.3d806dc9.js

4 lines
14 KiB
JavaScript
Raw Normal View History

2024-11-14 15:18:16 +08:00
import{G as fe,H as be,a8 as Fe,x as ce,y as Ee,k as Ce,D as Ve,C as ye,w as we,J as ve,K as Be,M as ge,N as De,b as ke,F as Ue,I as xe,L as Ae}from"./element-plus.91c68cc0.js";import{_ as Re}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.f552bb58.js";import{_ as Se}from"./picker.fc9ee208.js";import{k as Le}from"./index.8ef6d2b1.js";import{b as qe,d as Te,e as he}from"./store_product.45835fd0.js";import{d as G,s as Ne,r as f,Z as $,i as Pe,ap as ze,o as i,K as b,L as a,a as k,S as h,u as t,U as u,j as O,R as p,c as U,T as N,Q as V,a9 as j,M as Ie}from"./@vue.76ce7aa3.js";import"./lodash.4e6d2a38.js";import{a as Me,u as $e}from"./vue-router.10bd5b90.js";import{a as Oe}from"./store_category.45e5e6f1.js";import{a as je}from"./store_product_unit.b9a14603.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.9157b0c8.js";import"./system_store.21c77d4d.js";import"./index.0afc6829.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./index.0616caec.js";import"./index.8a556760.js";import"./vuedraggable.c04c7c0c.js";import"./vue.3299ef77.js";import"./sortablejs.c62bcaf8.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 Ge={class:"mb-4 text-lg font-bold"},Ke={key:1},He={class:"mb-2"},Je=G({name:"storeProductEdit"}),Ju=G({...Je,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Qe,{emit:Ze}){const P=Ne(),x=f("info");Le();const E=f("add"),K=(o,e)=>{console.log(o,e)},v=f([]),d=f([]),H=f([{label:"\u89C4\u683C\u540D\u79F0",prop:"sku_name",width:"180"},{label:"\u4F9B\u8D27\u4EF7",prop:"purchase",width:"180"},{label:"\u5546\u6237\u4EF7",prop:"cost",width:"180"},{label:"\u96F6\u552E\u4EF7",prop:"price",width:"180"},{label:"\u6761\u7801",prop:"bar_code",width:"180"}]),J=()=>{v.value.push({sku_name:"",purchase:0,cost:0,price:0,bar_code:"",editable:!0})},Q=o=>{v.value.splice(o,1)},s=$({id:"",image:"",store_name:"",store_info:"",product_type:0,cate_arr:[],cate_id:"",swap:"",batch:1,store_batch:1,manufacturer_information:"",rose:"0",is_return:1,is_store_all:1,spec_type:0}),y=f(!1),C=f([]),Z=o=>{C.value=C.value.filter(e=>e.id!==o)},W=o=>{o.forEach(e=>{C.value.find(F=>F.id==e.id)||C.value.push(e)}),y.value=!1};let A,R;const S=f(!1);let L;Pe(()=>{});const X=o=>(L=o,S.value=!0,z.lazyLoad(R,A),!1),z={value:"id",label:"name",lazy:!0,lazyLoad(o,e){A||(A=e),R||(R=o);const F=o.value||0;let r={};S.value?(r={name:L},L||(r={pid:F,page_size:1e4})):r={pid:F,page_size:1e4},Oe({...r}).then(m=>{e(m.lists.map(n=>(n.leaf=n.is_children==0,S.value=!1,n)))})}},q=f([]);(()=>{je({}).then(o=>{q.value=o.lists})})();const Y=$({store_name:[{required:!0,message:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",trigger:["blur"]}],store_info:[{required:!0,message:"\u8BF7\u8F93\u5165\u5546\u54C1\u89C4\u683C",trigger:["blur"]}],cate_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u5546\u54C1\u5206\u7C7B",trigger:["blur","change"]}],cate_arr:[{required:!0,message:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",trigger:["blur","change"]}],image:[{required:!0,message:"\u8BF7\u8F93\u5165\u5546\u54C1\u56FE\u7247",trigger:["blur","change"]}]}),ee=async o=>{for(cons
\u8054\u7CFB\u4EBA\u59D3\u540D
\u8054\u7CFB\u7535\u8BDD`,readonly:!1},null,8,["modelValue"])]),_:1}),u(r,{label:"\u9000\u8D27",prop:"is_return"},{default:a(()=>[u(g,{modelValue:t(s).is_return,"onUpdate:modelValue":e[5]||(e[5]=l=>t(s).is_return=l)},{default:a(()=>[u(n,{label:1},{default:a(()=>e[23]||(e[23]=[p("\u652F\u6301")])),_:1}),u(n,{label:0},{default:a(()=>e[24]||(e[24]=[p("\u4E0D\u652F\u6301")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),u(T,{label:"\u5546\u54C1\u89C4\u683C",name:"spec"},{default:a(()=>[u(r,{label:"\u89C4\u683C\u7C7B\u578B"},{default:a(()=>[u(g,{modelValue:t(s).spec_type,"onUpdate:modelValue":e[6]||(e[6]=l=>t(s).spec_type=l)},{default:a(()=>[u(n,{label:0},{default:a(()=>e[25]||(e[25]=[p("\u5355\u89C4\u683C")])),_:1}),u(n,{label:1},{default:a(()=>e[26]||(e[26]=[p("\u591A\u89C4\u683C")])),_:1})]),_:1},8,["modelValue"])]),_:1}),t(s).spec_type==0?(i(),U(N,{key:0},[u(r,{label:"\u89C4\u683C\u540D\u79F0",prop:"sku_name"},{default:a(()=>[u(m,{modelValue:t(d).sku_name,"onUpdate:modelValue":e[7]||(e[7]=l=>t(d).sku_name=l),class:"w-[500px]",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u89C4\u683C\u540D\u79F0",readonly:!1},null,8,["modelValue"])]),_:1}),u(r,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit"},{default:a(()=>[u(I,{class:"w-[500px]",modelValue:t(d).unit,"onUpdate:modelValue":e[8]||(e[8]=l=>t(d).unit=l),options:t(q),props:{value:"id",label:"name",emitPath:!1},placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5355\u4F4D"},null,8,["modelValue","options"])]),_:1}),u(r,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase"},{default:a(()=>[u(m,{modelValue:t(d).purchase,"onUpdate:modelValue":e[9]||(e[9]=l=>t(d).purchase=l),type:"number",class:"w-[500px]",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4F9B\u8D27\u4EF7",readonly:!1},null,8,["modelValue"])]),_:1}),u(r,{label:"\u5546\u6237\u4EF7",prop:"cost"},{default:a(()=>[u(m,{modelValue:t(d).cost,"onUpdate:modelValue":e[10]||(e[10]=l=>t(d).cost=l),type:"number",class:"w-[500px]",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u4EF7",readonly:!1},null,8,["modelValue"])]),_:1}),u(r,{label:"\u4F1A\u5458\u4EF7",prop:"vip_price"},{default:a(()=>[u(m,{modelValue:t(d).vip_price,"onUpdate:modelValue":e[11]||(e[11]=l=>t(d).vip_price=l),type:"number",class:"w-[500px]",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4F1A\u5458\u4EF7",readonly:!1},null,8,["modelValue"])]),_:1}),u(r,{label:"\u7EC8\u7AEF\u96F6\u552E\u4EF7",prop:"price"},{default:a(()=>[u(m,{modelValue:t(d).price,"onUpdate:modelValue":e[12]||(e[12]=l=>t(d).price=l),type:"number",class:"w-[500px]",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7EC8\u7AEF\u96F6\u552E\u4EF7",readonly:!1},null,8,["modelValue"])]),_:1}),u(r,{label:"\u96F6\u552E\u8D77\u6279\u91CF",prop:"batch"},{default:a(()=>[u(m,{modelValue:t(d).batch,"onUpdate:modelValue":e[13]||(e[13]=l=>t(d).batch=l),type:"number",class:"w-[500px]",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u96F6\u552E\u8D77\u6279\u91CF",readonly:!1},null,8,["modelValue"])]),_:1}),u(r,{label:"\u95E8\u5E97\u8D77\u6279\u91CF",prop:"store_batch"},{default:a(()=>[u(m,{modelValue:t(d).store_batch,"onUpdate:modelValue":e[14]||(e[14]=l=>t(d).store_batch=l),type:"number",class:"w-[500px]",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u8D77\u6279\u91CF",readonly:!1},null,8,["modelValue"])]),_:1})],64)):V("",!0),t(s).spec_type==1?(i(),b(r,{key:1},{default:a(()=>[u(w,{onClick:J,class:"mb-2"},{default:a(()=>e[27]||(e[27]=[p("\u6DFB\u52A0\u89C4\u683C")])),_:1}),u(M,{data:t(v),style:{width:"100%"}},{default:a(()=>[u(_,{label:"\u5355\u4F4D",width:"180"},{default:a(l=>[l.row.editable?(i(),b(oe,{key:0,modelValue:l.row.unit,"onUpdate:modelValue":c=>l.row.unit=c,placeholder:"\u8BF7\u9009\u62E9\u5355\u4F4D"},{default:a(()=>[(i(!0),U(N,null,j(t(q),c=>(i(),b(te,{key:c.id,label:c.name,value:c.id},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):V("",!0)]),_:1}),(i(!0),U(N,null,j(t(H),(l,c)=>(i(),b(_,{key:c,prop:l.prop,label:l.label,width:l.width},{default:a(D=>[D.row.editable?(i(),b(m,{key:0,modelValue:D.row[l.prop],"onUpdate:modelValue":_e=>D.row[l.prop]=_e},null,8,["modelValue","o