2024-11-14 17:23:48 +08:00
|
|
|
import{G as X,H as Y,a8 as h,k as ee,D as ue,C as le,v as te,w as oe,M as ae,b as re,N as se,F as ie,I as de,L as pe}from"./element-plus.91c68cc0.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.a2faa3b3.js";import{_ as me}from"./picker.a99ccd1f.js";import{k as _e}from"./index.0ac48e23.js";import{b as fe,d as be,e as Fe}from"./store_product.1f6a80eb.js";import{d as R,s as Ee,r as F,Z as S,i as ge,ap as ce,o as E,K as g,L as t,a as B,S as L,u as o,U as u,R as i,Q as x,M as Ce,j as Be}from"./@vue.76ce7aa3.js";import"./lodash.4e6d2a38.js";import{a as Ve,u as ve}from"./vue-router.10bd5b90.js";import{a as ye}from"./store_category.a79c0c45.js";import{a as we}from"./store_product_unit.cb591875.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.ce20c81e.js";import"./system_store.01f1e2eb.js";import"./index.965bddae.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./index.9ca9f198.js";import"./index.dbf4dc64.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 De={class:"mb-4 text-lg font-bold"},xe={class:"mb-2"},Ae=R({name:"storeProductEdit"}),Uu=R({...Ae,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Ue,{emit:ke}){const A=Ee();_e();const m=F("add"),l=S({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}),b=F(!1),f=F([]),N=r=>{f.value=f.value.filter(e=>e.id!==r)},I=r=>{r.forEach(e=>{f.value.find(n=>n.id==e.id)||f.value.push(e)}),b.value=!1};let V,v;const y=F(!1);let w;ge(()=>{});const P=r=>(w=r,y.value=!0,U.lazyLoad(v,V),!1),U={value:"id",label:"name",lazy:!0,lazyLoad(r,e){V||(V=e),v||(v=r);const n=r.value||0;let s={};y.value?(s={name:w},w||(s={pid:n,page_size:1e4})):s={pid:n,page_size:1e4},ye({...s}).then(p=>{e(p.lists.map(d=>(d.leaf=d.is_children==0,y.value=!1,d)))})}},k=F([]);(()=>{we({}).then(r=>{k.value=r.lists})})();const z=S({store_name:[{required:!0,message:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",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\u8F93\u5165\u5151\u6362\u5E93\u5B58",trigger:["blur"]}],cost:[{required:!0,message:"\u8BF7\u8F93\u5165\u95E8\u5E97\u96F6\u552E",trigger:["blur"]}],purchase:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F9B\u8D27\u4EF7",trigger:["blur"]}],batch:[{requir
|