2 lines
7.4 KiB
JavaScript
2 lines
7.4 KiB
JavaScript
import{a6 as H,$ as J,C as Q,D as W,w as X,F as Y,L as ee,M as oe,b as te,N as ae,O as le}from"./element-plus.4a7d92a3.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.196cf12b.js";import{d as R,r as k,Z as se,i as ie,af as ne,ap as pe,o as p,c as me,U as e,L as o,u as t,aa as de,R as m,M as f,K as c,a as q,j as ce}from"./@vue.18505fe0.js";import{u as _e}from"./usePaging.6a6670f9.js";import{u as fe}from"./useDictOptions.69165381.js";import{a as I,f as we}from"./store_product.7de0f890.js";import"./lodash.9dc701ad.js";import{f as he}from"./index.3c35f968.js";import{_ as be}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.81efb880.js";import{a as Ce}from"./store_category.7807e38b.js";import{u as ve}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.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.8a199d83.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.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";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.55c3f0cf.js";import"./system_store.440b1fac.js";import"./warehouse_product_storege.4b1112e3.js";const ge={class:"mt-4"},Fe={class:"flex mt-4 justify-end"},ye=R({name:"storeProductLists"}),fo=R({...ye,setup(Ee){const D=ve(),h=k(null),i=se({store_name:"",class_all:"",bar_code:""}),b=k([]),S=u=>{b.value=u.map(({id:a})=>a)};fe("");let V=1;D.query.page_no&&(V=parseInt(D.query.page_no));const{pager:_,getLists:C,resetParams:U,resetPage:v}=_e({page:V,fetchFun:I,params:i}),A=async u=>{var a,d;(a=h.value)==null||a.open(),(d=h.value)==null||d.setFormData(u)};let g,F;const y=k(!1);let E;const K=u=>(E=u,y.value=!0,x.lazyLoad(F,g),!1),x={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(u,a){g||(g=a),F||(F=u);const d=u.value||0;let n={};y.value?(n={name:E},E||(n={pid:d,page_size:1e4})):n={pid:d,page_size:1e4},Ce({...n}).then(B=>{a(B.lists.map(s=>(s.leaf=!0,y.value=!1,s)))})}},L=async u=>{await he.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await we({id:u}),C()};return ie(()=>{C()}),(u,a)=>{const d=Q,n=W,B=H,s=X,N=ue,T=Y,P=ee,z=ne("router-link"),l=oe,M=te,$=J,j=ae,O=re,w=pe("perms"),Z=le;return p(),me("div",null,[e(P,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(T,{class:"mb-[-16px]",model:t(i),inline:""},{default:o(()=>[e(n,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(d,{class:"w-[280px]",onKeydown:de(t(v),["enter"]),modelValue:t(i).store_name,"onUpdate:modelValue":a[0]||(a[0]=r=>t(i).store_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(n,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:o(()=>[e(d,{class:"w-[280px]",modelValue:t(i).bar_code,"onUpdate:modelValue":a[1]||(a[1]=r=>t(i).bar_code=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:o(()=>[e(B,{class:"w-[280px]",modelValue:t(i).class_all,"onUpdate:modelValue":a[2]||(a[2]=r=>t(i).class_all=r),filterable:"",clearable:"","before-filter":K,props:x,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:t(v)},null,8,["modelValue","onChange"])]),_:1}),e(n,null,{default:o(()=>[e(s,{type:"primary",onClick:t(v)},{default:o(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(s,{onClick:t(U)},{default:o(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(N,{class:"ml-2.5","fetch-fun":t(I),params:t(i),"page-size":t(_).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),f((p(),c(P,{class:"!border-none",shadow:"never"},{default:o(()=>[f((p(),c(z,{to:{path:"store_product_edit",query:{id:0,mode:"add"}},class:"mr-4"},{default:o(()=>[e(s,{type:"primary",icon:"Plus"},{default:o(()=>[m(" \u65B0\u589E ")]),_:1})]),_:1})),[[w,["store_product.store_product/add"]]]),f((p(),c(s,{disabled:!t(b).length,onClick:a[3]||(a[3]=r=>L(t(b)))},{default:o(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["store_product.store_product/delete"]]]),q("div",ge,[e(j,{data:t(_).lists,onSelectionChange:S},{default:o(()=>[e(l,{type:"selection",width:"55"}),e(l,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(l,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:r})=>[e(M,{style:{width:"50px",height:"50px"},src:r.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(l,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(l,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(l,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(l,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),e(l,{label:"\u5546\u6237\u4EF7",prop:"cost","min-width":"120","show-overflow-tooltip":""}),e(l,{label:"\u4F1A\u5458\u4EF7",prop:"vip_price","min-width":"120","show-overflow-tooltip":""}),e(l,{label:"\u7EC8\u7AEF\u96F6\u552E\u4EF7",prop:"price","min-width":"120","show-overflow-tooltip":""}),e(l,{label:"\u8D77\u6279\u91CF",prop:"batch","min-width":"100","show-overflow-tooltip":""}),e(l,{label:"\u6BDB\u5229\u7387",prop:"rose","min-width":"100","show-overflow-tooltip":""}),e(l,{label:"\u552E\u5356\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),e(l,{label:"\u5151\u6362\u5E93\u5B58",prop:"swap","min-width":"100","show-overflow-tooltip":""}),e(l,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""}),e(l,{label:"\u72B6\u6001",prop:"is_show"},{default:o(({row:r})=>[r.is_show?(p(),c($,{key:0,type:"success"},{default:o(()=>[m(" \u4E0A\u67B6 ")]),_:1})):(p(),c($,{key:1,type:"info"},{default:o(()=>[m(" \u4E0B\u67B6 ")]),_:1}))]),_:1}),e(l,{label:"\u6761\u7801",prop:"bar_code","min-width":"200","show-overflow-tooltip":""}),e(l,{label:"\u64CD\u4F5C",width:"180",fixed:"right"},{default:o(({row:r})=>[f((p(),c(z,{to:{path:"store_product_edit",query:{id:r.id,mode:"edit",page:t(_).page}},class:"mr-4"},{default:o(()=>[e(s,{type:"primary",link:""},{default:o(()=>[m(" \u7F16\u8F91 ")]),_:1})]),_:2},1032,["to"])),[[w,["store_product.store_product/edit"]]]),f((p(),c(s,{type:"primary",link:"",onClick:G=>A(r)},{default:o(()=>[m(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[w,["store_product.store_product/edit"]]]),f((p(),c(s,{type:"danger",link:"",onClick:G=>L(r.id)},{default:o(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["store_product.store_product/delete"]]])]),_:1})]),_:1},8,["data"])]),q("div",Fe,[e(O,{modelValue:t(_),"onUpdate:modelValue":a[4]||(a[4]=r=>ce(_)?_.value=r:null),onChange:t(C)},null,8,["modelValue","onChange"])])]),_:1})),[[Z,t(_).loading]]),e(be,{ref_key:"detailsRef",ref:h},null,512)])}}});export{fo as default};
|