moreShopAdmin/build/admin/assets/edit.964a092c.js

4 lines
12 KiB
JavaScript
Raw Normal View History

2024-08-07 15:52:47 +08:00
import{G as Y,H as ee,a6 as ue,k as le,D as ae,C as te,v as oe,w as re,M as se,b as ie,N as de,F as pe,I as ne,L as me}from"./element-plus.5e1c7f35.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.18075365.js";import{_ as ce}from"./picker.91e06c76.js";import{w as fe}from"./index.a5553a36.js";import{a as Fe,b as be,c as Ee}from"./store_product.017e048c.js";import{d as L,s as ge,r as F,Z as q,i as Be,ap as Ce,o as b,K as E,L as o,a as B,S,u as a,U as u,R as i,Q as x,M as Ve,j as ye}from"./@vue.18505fe0.js";import"./lodash.ded88a20.js";import{a as ve,u as we}from"./vue-router.101084e3.js";import{a as De}from"./store_category.300cc891.js";import{a as xe}from"./store_product_unit.20e14c67.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.bd46d7f4.js";import"./axios.345d042e.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.vue_vue_type_script_setup_true_lang.bbcdb30d.js";import"./usePaging.6a6670f9.js";import"./useDictOptions.0eff167b.js";import"./system_store.3d3d4720.js";import"./index.6bd94c31.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.463bd726.js";import"./index.e45aa4bb.js";import"./vuedraggable.da6d0225.js";import"./vue.e9263565.js";import"./sortablejs.390053a7.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.e66da42e.js";import"./vue-clipboard3.70972c27.js";import"./clipboard.1a1f8bfc.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const he={class:"mb-4 text-lg font-bold"},Ue=B("div",{class:"w-full",style:{color:"#64748b"}},"\u53EF\u9009\u62E9\u5C06\u5546\u54C1\u540C\u6B65\u5230\u54EA\u4E9B\u95E8\u5E97\u4F7F\u7528",-1),Ae={class:"mb-2"},ke=L({name:"storeProductEdit"}),Uu=L({...ke,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(qe,{emit:Se}){const h=ge();fe();const m=F("add"),R=r=>{let e="\u5E93\u5B58";return r==1&&(e="\u4F9B\u9500\u5E93\u5B58"),r==2&&(e="\u5151\u6362\u5E93\u5B58"),r==3&&(e="\u8D60\u54C1\u5E93\u5B58"),e},l=q({id:"",image:"",store_name:"",bar_code:"",store_info:"",product_type:0,cate_arr:[],cate_id:"",price:"",vip_price:"",unit:"",stock:"",swap:"",cost:"",purchase:"",batch:"",manufacturer_information:"",rose:"0",is_return:1,is_store_all:1}),I=()=>{const e=l.bar_code.replace(/[^a-zA-Z0-9]/g,"");l.bar_code=e},f=F(!1),c=F([]),N=r=>{c.value=c.value.filter(e=>e.id!==r)},z=r=>{r.forEach(e=>{c.value.find(n=>n.id==e.id)||c.value.push(e)}),f.value=!1};let C,V;const y=F(!1);let v;Be(()=>{});const P=r=>(v=r,y.value=!0,U.lazyLoad(V,C),!1),U={value:"id",label:"name",lazy:!0,lazyLoad(r,e){C||(C=e),V||(V=r);const n=r.value||0;let s={};y.value?(s={name:v},v||(s={pid:n,page_size:1e4})):s={pid:n,page_size:1e4},De({...s}).then(d=>{e(d.lists.map(p=>(p.leaf=p.is_children==0,y.value=!1,p)))})}},A=F([]);(()=>{xe({}).then(r=>{A.value=r.lists})})();const M=q({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:"\u8B
2024-08-02 21:09:02 +08:00
\u8054\u7CFB\u4EBA\u59D3\u540D
\u8054\u7CFB\u7535\u8BDD`,readonly:!1},null,8,["modelValue"])]),_:1}),u(s,{label:"\u6BDB\u5229\u7387",prop:"rose"},{default:o(()=>[u(O,{modelValue:a(l).rose,"onUpdate:modelValue":e[14]||(e[14]=t=>a(l).rose=t),type:"number",class:"w-[500px]",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6BDB\u5229\u7387",readonly:!1},{suffix:o(()=>[i("%")]),_:1},8,["modelValue"])]),_:1}),u(s,{label:"\u9000\u8D27",prop:"is_return"},{default:o(()=>[u(w,{modelValue:a(l).is_return,"onUpdate:modelValue":e[15]||(e[15]=t=>a(l).is_return=t)},{default:o(()=>[u(p,{label:1},{default:o(()=>[i("\u652F\u6301")]),_:1}),u(p,{label:0},{default:o(()=>[i("\u4E0D\u652F\u6301")]),_:1})]),_:1},8,["modelValue"])]),_:1}),a(m)=="add"?(b(),E(s,{key:0,label:"\u6240\u5C5E\u95E8\u5E97",prop:"store_id"},{default:o(()=>[u(w,{modelValue:a(l).is_store_all,"onUpdate:modelValue":e[16]||(e[16]=t=>a(l).is_store_all=t)},{default:o(()=>[u(p,{label:1},{default:o(()=>[i("\u5168\u90E8\u95E8\u5E97")]),_:1}),u(p,{label:0},{default:o(()=>[i("\u90E8\u5206\u95E8\u5E97")]),_:1})]),_:1},8,["modelValue"]),Ue,B("div",Ae,[a(l).is_store_all==0?(b(),E(D,{key:0,type:"primary",onClick:e[17]||(e[17]=t=>f.value=!0)},{default:o(()=>[i("\u6DFB\u52A0\u95E8\u5E97")]),_:1})):x("",!0)]),a(l).is_store_all==0?(b(),E(H,{key:0,data:a(c)},{default:o(()=>[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:o(({row:t})=>[u(Z,{src:t.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:o(({row:t})=>[i(S(t.is_show?"\u8425\u4E1A":"\u6253\u70CA"),1)]),_:1}),u(_,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:t})=>[Ve((b(),E(D,{type:"danger",link:"",onClick:Re=>N(t.id)},{default:o(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[X,["system_store.system_store/delete"]]])]),_:1})]),_:1},8,["data"])):x("",!0)]),_:1})):x("",!0),u(s,{label:""},{default:o(()=>[u(D,{onClick:G,type:"primary",class:"w-40"},{default:o(()=>[i("\u63D0\u4EA4")]),_:1})]),_:1})]),_:1},8,["model","rules"])]),u(J,{modelValue:a(f),"onUpdate:modelValue":e[18]||(e[18]=t=>ye(f)?f.value=t:null),title:"\u9009\u62E9\u95E8\u5E97",width:"70%"},{default:o(()=>[u(Q,{onOnBindStore:z})]),_:1},8,["modelValue"])]),_:1})}}});export{Uu as default};