2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
|
import{a2 as X,G as Y,H as ee,k as ue,D as le,C as ae,w as te,M as oe,b as re,N as se,F as ie,I as pe,L as de}from"./element-plus.ea2cdc63.js";import{a as ne,b as me,c as _e,_ as ce}from"./store_product.dbed47e7.js";import{_ as fe}from"./picker.063db92d.js";import{w as Fe}from"./index.88dad86e.js";import{d as L,s as be,r as F,Z as A,i as Ee,ap as ge,o as b,K as E,L as o,a as B,S,u as a,U as u,R as d,Q as h,M as Be,j as Ve}from"./@vue.18505fe0.js";import"./lodash.60201f64.js";import{a as Ce,u as ve}from"./vue-router.101084e3.js";import{a as we}from"./store_category.841c996b.js";import{a as ye}from"./store_product_unit.6a17892d.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.vue_vue_type_script_setup_true_lang.9926caf5.js";import"./usePaging.6a6670f9.js";import"./useDictOptions.f2099dca.js";import"./system_store.cf165f8c.js";import"./index.d76d2d63.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.d312b4d4.js";import"./index.f0cbd500.js";import"./vuedraggable.d1fd737a.js";import"./vue.feef8fd6.js";import"./sortablejs.c8f4cbb7.js";import"./pinia.a969beab.js";import"./css-color-function.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.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.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.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=B("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"},ke=L({name:"storeProductEdit"}),Du=L({...ke,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Ue,{emit:qe}){const x=be(),{removeTab:R}=Fe(),m=F("add"),l=A({id:"",image:"",store_name:"",bar_code:"",cate_arr:[],cate_id:"",price:"",vip_price:"",unit:"",stock:"",swap:"",cost:"",purchase:"1",batch:"",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),_=F([]),z=r=>{_.value=_.value.filter(e=>e.id!==r)},N=r=>{r.forEach(e=>{_.value.find(p=>p.id==e.id)||_.value.push(e)}),f.value=!1};let V,C,v=F(!1),w;Ee(()=>{});const P=r=>(w=r,v.value=!0,k.lazyLoad(C,V),!1),k={value:"id",label:"name",lazy:!0,lazyLoad(r,e){V||(V=e),C||(C=r);let p=r.value||0,s={};v.value?(s={name:w},w||(s={pid:p,page_size:1e4})):s={pid:p,page_size:1e4},we({...s}).then(i=>{e(i.lists.map(c=>(c.leaf=c.is_children==0,v.value=!1,c)))})}},U=F([]);(()=>{ye({}).then(r=>{U.value=r.lists})})();const M=A({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"]}],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\u4EF
|