moreShopAdmin/dist/admin/assets/edit.713c8cce.js

4 lines
12 KiB
JavaScript
Raw Normal View History

2024-09-03 18:00:11 +08:00
import{G as W,H as X,a6 as Y,k as ee,D as ue,C as le,v as ae,w as te,M as oe,b as re,N as se,F as ie,I as de,L as pe}from"./element-plus.4a7d92a3.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.1a8b90a5.js";import{_ as me}from"./picker.43f0ecbd.js";import{k as _e}from"./index.b17b0724.js";import{c as fe,d as ce,e as Fe}from"./store_product.959dd79f.js";import{d as L,s as be,r as F,Z as k,i as Ee,ap as ge,o as b,K as E,L as a,a as C,S,u as t,U as u,R as i,Q as h,M as Be,j as Ce}from"./@vue.18505fe0.js";import"./lodash.9dc701ad.js";import{a as Ve,u as ye}from"./vue-router.101084e3.js";import{a as ve}from"./store_category.0a6f61cf.js";import{a as we}from"./store_product_unit.272cca4e.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.7690fe0d.js";import"./system_store.0064c44e.js";import"./index.bc1a2af8.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.5ae8f8e2.js";import"./index.7996ea58.js";import"./vuedraggable.1648e3a8.js";import"./vue.393dceb0.js";import"./sortablejs.382fadba.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 De={class:"mb-4 text-lg font-bold"},he=C("div",{class:"w-full",style:{color:"#64748b"}},"\u53EF\u9009\u62E9\u5C06\u5546\u54C1\u540C\u6B65\u5230\u54EA\u4E9B\u95E8\u5E97\u4F7F\u7528",-1),xe={class:"mb-2"},Ae=L({name:"storeProductEdit"}),hu=L({...Ae,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Ue,{emit:qe}){const x=be();_e();const m=F("add"),l=k({id:"",image:"",store_name:"",bar_code:"",store_info:"",product_type:0,cate_arr:[],cate_id:"",price:"",vip_price:"",unit:"",stock:"",swap:"",cost:"",purchase:"",batch:1,store_batch:1,manufacturer_information:"",rose:"0",is_return:1,is_store_all:1,is_show:1}),c=F(!1),f=F([]),R=r=>{f.value=f.value.filter(e=>e.id!==r)},N=r=>{r.forEach(e=>{f.value.find(n=>n.id==e.id)||f.value.push(e)}),c.value=!1};let V,y;const v=F(!1);let w;Ee(()=>{});const z=r=>(w=r,v.value=!0,A.lazyLoad(y,V),!1),A={value:"id",label:"name",lazy:!0,lazyLoad(r,e){V||(V=e),y||(y=r);const n=r.value||0;let s={};v.value?(s={name:w},w||(s={pid:n,page_size:1e4})):s={pid:n,page_size:1e4},ve({...s}).then(p=>{e(p.lists.map(d=>(d.leaf=d.is_children==0,v.value=!1,d)))})}},U=F([]);(()=>{we({}).then(r=>{U.value=r.lists})})();const I=k({store_name:[{required:!0,message:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",trigger:["blur"]}],bar_code:[{required:!0,message:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801",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"]}],price:[{required:!0,message:"\u8BF7\u8F93\u5165\u7EC8\u7AEF\u96F6\u552E\u4EF7",trigger:["blur"]}],vip_price:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F1A\u5458\u4EF7",trigger:["blur"]}],unit:[{required:!0,message:"\u8BF7\u8F93\u5165\u5546\u54C1\u5355\u4F4D",trigger:["blur","change"]}],stock:[{required:!0,message:"\u8BF7\u8F93\u5165\u552E\u5356\u5E93\u5B58",trigger:["blur"]}],swap:[{required:!0,message:"\u8BF7\
\u8054\u7CFB\u4EBA\u59D3\u540D
\u8054\u7CFB\u7535\u8BDD`,readonly:!1},null,8,["modelValue"])]),_:1}),u(s,{label:"\u6BDB\u5229\u7387",prop:"rose"},{default:a(()=>[u(j,{modelValue:t(l).rose,"onUpdate:modelValue":e[13]||(e[13]=o=>t(l).rose=o),type:"number",class:"w-[500px]",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6BDB\u5229\u7387",readonly:!1},{suffix:a(()=>[i("%")]),_:1},8,["modelValue"])]),_:1}),u(s,{label:"\u9000\u8D27",prop:"is_return"},{default:a(()=>[u(B,{modelValue:t(l).is_return,"onUpdate:modelValue":e[14]||(e[14]=o=>t(l).is_return=o)},{default:a(()=>[u(d,{label:1},{default:a(()=>[i("\u652F\u6301")]),_:1}),u(d,{label:0},{default:a(()=>[i("\u4E0D\u652F\u6301")]),_:1})]),_:1},8,["modelValue"])]),_:1}),u(s,{label:"\u72B6\u6001",prop:"is_show"},{default:a(()=>[u(B,{modelValue:t(l).is_show,"onUpdate:modelValue":e[15]||(e[15]=o=>t(l).is_show=o)},{default:a(()=>[u(d,{label:1},{default:a(()=>[i("\u4E0A\u67B6")]),_:1}),u(d,{label:0},{default:a(()=>[i("\u4E0B\u67B6")]),_:1})]),_:1},8,["modelValue"])]),_:1}),t(m)=="add"?(b(),E(s,{key:0,label:"\u6240\u5C5E\u95E8\u5E97",prop:"store_id"},{default:a(()=>[u(B,{modelValue:t(l).is_store_all,"onUpdate:modelValue":e[16]||(e[16]=o=>t(l).is_store_all=o)},{default:a(()=>[u(d,{label:1},{default:a(()=>[i("\u5168\u90E8\u95E8\u5E97")]),_:1}),u(d,{label:0},{default:a(()=>[i("\u90E8\u5206\u95E8\u5E97")]),_:1})]),_:1},8,["modelValue"]),he,C("div",xe,[t(l).is_store_all==0?(b(),E(D,{key:0,type:"primary",onClick:e[17]||(e[17]=o=>c.value=!0)},{default:a(()=>[i("\u6DFB\u52A0\u95E8\u5E97")]),_:1})):h("",!0)]),t(l).is_store_all==0?(b(),E(O,{key:0,data:t(f)},{default:a(()=>[u(_,{label:"ID",prop:"id","show-overflow-tooltip":""}),u(_,{label:"\u95E8\u5E97\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),u(_,{label:"\u624B\u673A\u53F7\u7801",prop:"phone","show-overflow-tooltip":""}),u(_,{label:"\u8BE6\u7EC6\u5730\u5740",prop:"detailed_address","show-overflow-tooltip":""}),u(_,{label:"\u95E8\u5E97logo",prop:"image","show-overflow-tooltip":""},{default:a(({row:o})=>[u(G,{src:o.image,class:"w-[50px] h-[50px]","preview-teleported":!0},null,8,["src"])]),_:1}),u(_,{label:"\u8425\u4E1A\u72B6\u6001",prop:"is_show","show-overflow-tooltip":""},{default:a(({row:o})=>[i(S(o.is_show?"\u8425\u4E1A":"\u6253\u70CA"),1)]),_:1}),u(_,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:o})=>[Be((b(),E(D,{type:"danger",link:"",onClick:Se=>R(o.id)},{default:a(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[J,["system_store.system_store/delete"]]])]),_:1})]),_:1},8,["data"])):h("",!0)]),_:1})):h("",!0),u(s,{label:""},{default:a(()=>[u(D,{onClick:$,type:"primary",class:"w-40"},{default:a(()=>[i("\u63D0\u4EA4")]),_:1})]),_:1})]),_:1},8,["model","rules"])]),u(Q,{modelValue:t(c),"onUpdate:modelValue":e[18]||(e[18]=o=>Ce(c)?c.value=o:null),title:"\u9009\u62E9\u95E8\u5E97",width:"70%"},{default:a(()=>[u(K,{onOnBindStore:N})]),_:1},8,["modelValue"])]),_:1})}}});export{hu as default};