moreShopAdmin/dist/admin/assets/edit11.b9d157ea.js

4 lines
13 KiB
JavaScript
Raw Permalink Normal View History

2024-11-11 11:30:56 +08:00
import{G as ce,H as fe,a8 as be,x as Fe,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 he,F as ke,I as Ue,L as xe}from"./element-plus.7e347b00.js";import{_ as Ae}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.bfaac421.js";import{_ as Re}from"./picker.f4b9a12a.js";import{k as Se}from"./index.fd76ab8a.js";import{b as Le,d as qe,e as Te}from"./store_product.0382114d.js";import{d as G,s as Ne,r as c,Z as $,i as Pe,ap as ze,o as i,K as f,L as a,a as k,S as T,u as t,U as e,j as O,R as p,c as h,T as N,Q as V,a9 as j,M as Ie}from"./@vue.18505fe0.js";import"./lodash.4e6d2a38.js";import{a as Me,u as $e}from"./vue-router.101084e3.js";import{a as Oe}from"./store_category.7157b13b.js";import{a as je}from"./store_product_unit.d815827b.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.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.af250dfd.js";import"./usePaging.6a6670f9.js";import"./useDictOptions.dc8aa87e.js";import"./system_store.0aadec73.js";import"./index.1071aff1.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.4f5760e6.js";import"./index.209f4c2d.js";import"./vuedraggable.c5026861.js";import"./vue.1715f83d.js";import"./sortablejs.c62bcaf8.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.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.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.b0c09b66.js";const Ge={class:"mb-4 text-lg font-bold"},Ke={key:1},He=k("div",{class:"w-full",style:{color:"#64748b"}}," \u53EF\u9009\u62E9\u5C06\u5546\u54C1\u540C\u6B65\u5230\u54EA\u4E9B\u95E8\u5E97\u4F7F\u7528 ",-1),Je={class:"mb-2"},Qe=G({name:"storeProductEdit"}),Qu=G({...Qe,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Ze,{emit:We}){const P=Ne(),U=c("info");Se();const E=c("add"),K=(o,u)=>{console.log(o,u)},v=c([]),d=c([]),H=c([{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=c(!1),C=c([]),Z=o=>{C.value=C.value.filter(u=>u.id!==o)},W=o=>{o.forEach(u=>{C.value.find(b=>b.id==u.id)||C.value.push(u)}),y.value=!1};let x,A;const R=c(!1);let S;Pe(()=>{});const X=o=>(S=o,R.value=!0,z.lazyLoad(A,x),!1),z={value:"id",label:"name",lazy:!0,lazyLoad(o,u){x||(x=u),A||(A=o);const b=o.value||0;let r={};R.value?(r={name:S},S||(r={pid:b,page_size:1e4})):r={pid:b,page_size:1e4},Oe({...r}).then(m=>{u(m.lists.map(n=>(n.leaf=n.is_children==0,R.value=!1,n)))})}},L=c([]);(()=>{je({}).then(o=>{L.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",t
2024-11-08 12:27:11 +08:00
\u8054\u7CFB\u4EBA\u59D3\u540D
\u8054\u7CFB\u7535\u8BDD`,readonly:!1},null,8,["modelValue"])]),_:1}),e(r,{label:"\u9000\u8D27",prop:"is_return"},{default:a(()=>[e(g,{modelValue:t(s).is_return,"onUpdate:modelValue":u[5]||(u[5]=l=>t(s).is_return=l)},{default:a(()=>[e(n,{label:1},{default:a(()=>[p("\u652F\u6301")]),_:1}),e(n,{label:0},{default:a(()=>[p("\u4E0D\u652F\u6301")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(q,{label:"\u5546\u54C1\u89C4\u683C",name:"spec"},{default:a(()=>[e(r,{label:"\u89C4\u683C\u7C7B\u578B"},{default:a(()=>[e(g,{modelValue:t(s).spec_type,"onUpdate:modelValue":u[6]||(u[6]=l=>t(s).spec_type=l)},{default:a(()=>[e(n,{label:0},{default:a(()=>[p("\u5355\u89C4\u683C")]),_:1}),e(n,{label:1},{default:a(()=>[p("\u591A\u89C4\u683C")]),_:1})]),_:1},8,["modelValue"])]),_:1}),t(s).spec_type==0?(i(),h(N,{key:0},[e(r,{label:"\u89C4\u683C\u540D\u79F0",prop:"sku_name"},{default:a(()=>[e(m,{modelValue:t(d).sku_name,"onUpdate:modelValue":u[7]||(u[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}),e(r,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit"},{default:a(()=>[e(I,{class:"w-[500px]",modelValue:t(d).unit,"onUpdate:modelValue":u[8]||(u[8]=l=>t(d).unit=l),options:t(L),props:{value:"id",label:"name",emitPath:!1},placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5355\u4F4D"},null,8,["modelValue","options"])]),_:1}),e(r,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase"},{default:a(()=>[e(m,{modelValue:t(d).purchase,"onUpdate:modelValue":u[9]||(u[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}),e(r,{label:"\u5546\u6237\u4EF7",prop:"cost"},{default:a(()=>[e(m,{modelValue:t(d).cost,"onUpdate:modelValue":u[10]||(u[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}),e(r,{label:"\u4F1A\u5458\u4EF7",prop:"vip_price"},{default:a(()=>[e(m,{modelValue:t(d).vip_price,"onUpdate:modelValue":u[11]||(u[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}),e(r,{label:"\u7EC8\u7AEF\u96F6\u552E\u4EF7",prop:"price"},{default:a(()=>[e(m,{modelValue:t(d).price,"onUpdate:modelValue":u[12]||(u[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}),e(r,{label:"\u96F6\u552E\u8D77\u6279\u91CF",prop:"batch"},{default:a(()=>[e(m,{modelValue:t(d).batch,"onUpdate:modelValue":u[13]||(u[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}),e(r,{label:"\u95E8\u5E97\u8D77\u6279\u91CF",prop:"store_batch"},{default:a(()=>[e(m,{modelValue:t(d).store_batch,"onUpdate:modelValue":u[14]||(u[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(),f(r,{key:1},{default:a(()=>[e(w,{onClick:J,class:"mb-2"},{default:a(()=>[p("\u6DFB\u52A0\u89C4\u683C")]),_:1}),e(M,{data:t(v),style:{width:"100%"}},{default:a(()=>[e(_,{label:"\u5355\u4F4D",width:"180"},{default:a(l=>[l.row.editable?(i(),f(oe,{key:0,modelValue:l.row.unit,"onUpdate:modelValue":F=>l.row.unit=F,placeholder:"\u8BF7\u9009\u62E9\u5355\u4F4D"},{default:a(()=>[(i(!0),h(N,null,j(t(L),F=>(i(),f(te,{key:F.id,label:F.name,value:F.id},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):V("",!0)]),_:1}),(i(!0),h(N,null,j(t(H),(l,F)=>(i(),f(_,{key:F,prop:l.prop,label:l.label,width:l.width},{default:a(D=>[D.row.editable?(i(),f(m,{key:0,modelValue:D.row[l.prop],"onUpdate:modelValue":_e=>D.row[l.prop]=_e},null,8,["modelValue","onUpdate:modelValue"])):(i(),h("span",Ke,T(D.row[l.prop]),1))]),_:2},1032,["