2024-08-31 21:39:10 +08:00
|
|
|
import{a6 as ee,C as oe,D as te,J as ae,K as le,w as se,F as ue,L as ne,M as re,b as ie,t as pe,N as de,O as me}from"./element-plus.a63a26dd.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_lang.bf7e1513.js";import{d as I,s as fe,r as g,Z as he,i as we,af as ve,ap as Ce,o as d,c as be,U as e,L as a,u as o,aa as ge,R as m,M as f,K as _,a as A,j as ye,Q as Ee,n as Fe}from"./@vue.18505fe0.js";import{u as ke}from"./usePaging.6a6670f9.js";import{u as Ve}from"./useDictOptions.60cb6700.js";import{a as q,g as Be,h as De}from"./store_product.a2515d68.js";import"./lodash.2473fc51.js";import{f as xe}from"./index.7bd09517.js";import{_ as Se}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.94ddeb6c.js";import{_ as Pe}from"./copy.vue_vue_type_script_setup_true_name_storeProductEdit_lang.2975ad0d.js";import{a as $e}from"./store_category.ef01f1df.js";import{u as ze}from"./vue-router.101084e3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.4884cfc2.js";import"./axios.932d3f8a.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.ba32e0cf.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./pinia.a969beab.js";import"./css-color-function.9f6a56f3.js";import"./color.d1bc3784.js";import"./clone.83700f2e.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.fcc9be76.js";import"./vue-clipboard3.9e751565.js";import"./clipboard.dda64e67.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.55537360.js";import"./system_store.9a9f9261.js";import"./warehouse_product_storege.e3c0c4ef.js";const Le={class:"mt-4"},Re={class:"flex mt-4 justify-end"},Ue=I({name:"storeProductLists"}),xo=I({...Ue,setup(Ae){const P=ze(),y=fe(),E=g(null),F=g(!1),n=he({store_name:"",class_all:"",is_show:"",bar_code:""}),k=g([]),K=s=>{k.value=s.map(({id:t})=>t)};Ve("");let $=1;P.query.page_no&&($=parseInt(P.query.page_no));const{pager:c,getLists:C,resetParams:N,resetPage:b}=ke({page:$,fetchFun:q,params:n}),T=async s=>{var t,r;(t=E.value)==null||t.open(),(r=E.value)==null||r.setFormData(s)},M=async s=>{var t,r;F.value=!0,await Fe(),(t=y.value)==null||t.open("edit"),(r=y.value)==null||r.setFormData(s)};let V,B;const D=g(!1);let x;const j=s=>(x=s,D.value=!0,z.lazyLoad(B,V),!1),z={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(s,t){V||(V=t),B||(B=s);const r=s.value||0;let i={};D.value?(i={name:x},x||(i={pid:r,page_size:1e4})):i={pid:r,page_size:1e4},$e({...i}).then(S=>{t(S.lists.map(h=>(h.leaf=!0,D.value=!1,h)))})}},O=s=>{Be({id:s.id,is_show:s.is_show})},L=async s=>{await xe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await De({id:s}),C()};return we(()=>{C()}),(s,t)=>{const r=oe,i=te,S=ee,h=ae,J=le,p=se,Q=_e,Z=ue,R=ne,U=ve("router-link"),u=re,G=ie,H=pe,W=de,X=ce,w=Ce("perms"),Y=me;return d(),be("div",null,[e(R,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(Z,{class:"mb-[-16px]",model:o(n),inline:""},{default:a(()=>[e(i,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:a(()=>[e(r,{class:"w-[280px]",onKeydown:ge(o(b),["enter"]),modelValue:o(n).store_name,"onUpdate:modelValue":t[0]||(t[0]=l=>o(n).store_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(i,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:o(n).bar_code,"onUpdate:modelValue":t[1]||(t[1]=l=>o(n).bar_code=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue"])]),_:1}),e(i,{label:"\u5546\u54C1\
|