2 lines
7.9 KiB
JavaScript
2 lines
7.9 KiB
JavaScript
import{a6 as W,$ as X,C as Y,D as ee,w as oe,F as te,L as ae,M as le,b as re,N as se,O as ue}from"./element-plus.4a7d92a3.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang.9d071c48.js";import{d as T,s as pe,r as C,Z as me,i as de,af as ce,ap as _e,o as n,c as fe,U as e,L as t,u as a,aa as we,R as p,M as f,K as c,a as I,j as he,Q as Ce,n as ve}from"./@vue.18505fe0.js";import{u as be}from"./usePaging.6a6670f9.js";import{u as ye}from"./useDictOptions.2501ee85.js";import{a as N,g as ge}from"./store_product.75c7e4ef.js";import"./lodash.9dc701ad.js";import{f as Fe}from"./index.1bc00f65.js";import{_ as Ee}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.8fedbb44.js";import{_ as ke}from"./copy.vue_vue_type_script_setup_true_name_storeProductEdit_lang.a1570406.js";import{a as Be}from"./store_category.d8c78c73.js";import{u as De}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.c28c2057.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.9edf1288.js";import"./system_store.cf259033.js";import"./warehouse_product_storege.983abbf7.js";const Ve={class:"mt-4"},xe={class:"flex mt-4 justify-end"},$e=T({name:"storeProductLists"}),Fo=T({...$e,setup(Le){const x=De(),v=pe(),b=C(null),y=C(!1),m=me({store_name:"",class_all:"",bar_code:""}),g=C([]),U=s=>{g.value=s.map(({id:o})=>o)};ye("");let $=1;x.query.page_no&&($=parseInt(x.query.page_no));const{pager:_,getLists:h,resetParams:A,resetPage:F}=be({page:$,fetchFun:N,params:m}),K=async s=>{var o,u;(o=b.value)==null||o.open(),(u=b.value)==null||u.setFormData(s)},M=async s=>{var o,u;y.value=!0,await ve(),(o=v.value)==null||o.open("edit"),(u=v.value)==null||u.setFormData(s)};let E,k;const B=C(!1);let D;const j=s=>(D=s,B.value=!0,L.lazyLoad(k,E),!1),L={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(s,o){E||(E=o),k||(k=s);const u=s.value||0;let d={};B.value?(d={name:D},D||(d={pid:u,page_size:1e4})):d={pid:u,page_size:1e4},Be({...d}).then(V=>{o(V.lists.map(i=>(i.leaf=!0,B.value=!1,i)))})}},P=async s=>{await Fe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ge({id:s}),h()};return de(()=>{h()}),(s,o)=>{const u=Y,d=ee,V=W,i=oe,O=ne,Q=te,z=ae,R=ce("router-link"),l=le,Z=re,S=X,G=se,H=ie,w=_e("perms"),J=ue;return n(),fe("div",null,[e(z,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(Q,{class:"mb-[-16px]",model:a(m),inline:""},{default:t(()=>[e(d,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[e(u,{class:"w-[280px]",onKeydown:we(a(F),["enter"]),modelValue:a(m).store_name,"onUpdate:modelValue":o[0]||(o[0]=r=>a(m).store_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(d,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:t(()=>[e(u,{class:"w-[280px]",modelValue:a(m).bar_code,"onUpdate:modelValue":o[1]||(o[1]=r=>a(m).bar_code=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:t(()=>[e(V,{class:"w-[280px]",modelValue:a(m).class_all,"onUpdate:modelValue":o[2]||(o[2]=r=>a(m).class_all=r),filterable:"",clearable:"","before-filter":j,props:L,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:a(F)},null,8,["modelValue","onChange"])]),_:1}),e(d,null,{default:t(()=>[e(i,{type:"primary",onClick:a(F)},{default:t(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(i,{onClick:a(A)},{default:t(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(O,{class:"ml-2.5","fetch-fun":a(N),params:a(m),"page-size":a(_).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),f((n(),c(z,{class:"!border-none",shadow:"never"},{default:t(()=>[f((n(),c(R,{to:{path:"store_product_edit",query:{id:0,mode:"add"}},class:"mr-4"},{default:t(()=>[e(i,{type:"primary",icon:"Plus"},{default:t(()=>[p(" \u65B0\u589E ")]),_:1})]),_:1})),[[w,["store_product.store_product/add"]]]),f((n(),c(i,{disabled:!a(g).length,onClick:o[3]||(o[3]=r=>P(a(g)))},{default:t(()=>[p(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["store_product.store_product/delete"]]]),I("div",Ve,[e(G,{data:a(_).lists,onSelectionChange:U},{default:t(()=>[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:t(({row:r})=>[e(Z,{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:t(({row:r})=>[r.is_show?(n(),c(S,{key:0,type:"success"},{default:t(()=>[p(" \u4E0A\u67B6 ")]),_:1})):(n(),c(S,{key:1,type:"info"},{default:t(()=>[p(" \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:t(({row:r})=>[f((n(),c(R,{to:{path:"store_product_edit",query:{id:r.id,mode:"edit",page:a(_).page}},class:"mr-4"},{default:t(()=>[e(i,{type:"primary",link:""},{default:t(()=>[p(" \u7F16\u8F91 ")]),_:1})]),_:2},1032,["to"])),[[w,["store_product.store_product/edit"]]]),f((n(),c(i,{type:"primary",link:"",onClick:q=>K(r)},{default:t(()=>[p(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[w,["store_product.store_product/edit"]]]),e(i,{type:"primary",link:"",onClick:q=>M(r)},{default:t(()=>[p(" \u590D\u5236 ")]),_:2},1032,["onClick"]),f((n(),c(i,{type:"danger",link:"",onClick:q=>P(r.id)},{default:t(()=>[p(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["store_product.store_product/delete"]]])]),_:1})]),_:1},8,["data"])]),I("div",xe,[e(H,{modelValue:a(_),"onUpdate:modelValue":o[4]||(o[4]=r=>he(_)?_.value=r:null),onChange:a(h)},null,8,["modelValue","onChange"])])]),_:1})),[[J,a(_).loading]]),e(Ee,{ref_key:"detailsRef",ref:b},null,512),a(y)?(n(),c(ke,{key:0,ref_key:"copyRef",ref:v,onSuccess:a(h),onClose:o[5]||(o[5]=r=>y.value=!1)},null,8,["onSuccess"])):Ce("",!0)])}}});export{Fo as default};
|