lihaiMiddleOfficeAdminWeb/build/admin/assets/product_import.54e6cccb.js
2024-08-11 20:11:29 +08:00

2 lines
5.5 KiB
JavaScript

import{a6 as j,C as A,D as M,J as O,K as J,w as W,F as Z,L as $,M as G,b as H,N as Q,O as X}from"./element-plus.9e22693c.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.153a119f.js";import{d as k,r as C,Z as ee,af as oe,o as v,c as D,U as e,L as t,u as o,aa as te,T as le,a9 as ae,R as E,M as re,K as ne,a as x,j as se}from"./@vue.18505fe0.js";import{u as ue}from"./usePaging.6a6670f9.js";import{u as ie}from"./useDictOptions.edc916f4.js";import{a as pe}from"./warehouse_product_storege.a5bdefa0.js";import"./lodash.419afce2.js";import"./index.56c7da87.js";import{a as me}from"./store_category.d5572f09.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.129a2796.js";import"./axios.d44c8eec.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.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.867692c9.js";import"./vue-clipboard3.d30f83bc.js";import"./clipboard.24da1bd3.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const _e={class:"mt-4"},ce={class:"flex mt-4 justify-end"},fe=k({name:"storeProductLists"}),Ye=k({...fe,setup(we){const i=de();C(null);const n=ee({store_name:"",class_all:"",warehouse_id:"",order_by:"",field:"nums"}),L=C([]),q=u=>{L.value=u.map(({id:l})=>l)};ie("");let y=1;i.query.page_no&&(y=parseInt(i.query.page_no)),i.query.id&&(n.warehouse_id=parseInt(i.query.id)),console.log(i.query.id);const{pager:p,getLists:F,resetParams:P,resetPage:m}=ue({page:y,fetchFun:pe,params:n});let c,f;const w=C(!1);let h;const z=u=>(h=u,w.value=!0,B.lazyLoad(f,c),!1),B={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(u,l){c||(c=l),f||(f=u);const d=u.value||0;let s={};w.value?(s={name:h},h||(s={pid:d,page_size:1e4})):s={pid:d,page_size:1e4},me({...s}).then(b=>{l(b.lists.map(_=>(_.leaf=!0,w.value=!1,_)))})}};return F(),(u,l)=>{const d=A,s=M,b=j,_=O,I=J,g=W,K=Z,V=$,S=oe("router-link"),a=G,U=H,N=Q,T=Y,R=X;return v(),D("div",null,[e(V,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(K,{class:"mb-[-16px]",model:o(n),inline:""},{default:t(()=>[e(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[e(d,{class:"w-[280px]",onKeydown:te(o(m),["enter"]),modelValue:o(n).store_name,"onUpdate:modelValue":l[0]||(l[0]=r=>o(n).store_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(s,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:t(()=>[e(b,{class:"w-[280px]",modelValue:o(n).class_all,"onUpdate:modelValue":l[1]||(l[1]=r=>o(n).class_all=r),filterable:"",clearable:"","before-filter":z,props:B,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:o(m)},null,8,["modelValue","onChange"])]),_:1}),e(s,{label:"\u6392\u5E8F",prop:"order_by"},{default:t(()=>[e(I,{modelValue:o(n).order_by,"onUpdate:modelValue":l[2]||(l[2]=r=>o(n).order_by=r),placeholder:"\u8BF7\u9009\u62E9\u6392\u5E8F",style:{width:"240px"},onChange:o(m)},{default:t(()=>[(v(),D(le,null,ae([{id:"asc",name:"\u5347\u5E8F"},{id:"desc",name:"\u964D\u5E8F"}],r=>e(_,{key:r.id,label:r.name,value:r.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),e(s,null,{default:t(()=>[e(g,{type:"primary",onClick:o(m)},{default:t(()=>[E("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(g,{onClick:o(P)},{default:t(()=>[E("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),re((v(),ne(V,{class:"!border-none",shadow:"never"},{default:t(()=>[e(S,{to:{path:"import",query:{warehouse_id:o(n).warehouse_id}},class:"ml-4"},{default:t(()=>[e(g,{type:"primary"},{default:t(()=>[E(" \u51FA\u5E93 ")]),_:1})]),_:1},8,["to"]),x("div",_e,[e(N,{data:o(p).lists,onSelectionChange:q},{default:t(()=>[e(a,{type:"selection",width:"55"}),e(a,{label:"id",prop:"id","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:t(({row:r})=>[e(U,{style:{width:"50px",height:"50px"},src:r.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(a,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(a,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(a,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),e(a,{label:"\u5546\u6237\u4EF7",prop:"cost","min-width":"120","show-overflow-tooltip":""}),e(a,{label:"\u7EC8\u7AEF\u96F6\u552E\u4EF7",prop:"price","min-width":"120","show-overflow-tooltip":""}),e(a,{label:"\u89C4\u683C",prop:"store_info","min-width":"100","show-overflow-tooltip":""}),e(a,{label:"\u6BDB\u5229\u7387",prop:"rose","min-width":"100","show-overflow-tooltip":""}),e(a,{label:"\u5E93\u5B58",prop:"nums","min-width":"100","show-overflow-tooltip":""}),e(a,{label:"\u6761\u7801",prop:"bar_code","min-width":"200","show-overflow-tooltip":""})]),_:1},8,["data"])]),x("div",ce,[e(T,{modelValue:o(p),"onUpdate:modelValue":l[3]||(l[3]=r=>se(p)?p.value=r:null),onChange:o(F)},null,8,["modelValue","onChange"])])]),_:1})),[[R,o(p).loading]])])}}});export{Ye as default};