lihaiMiddleOfficeAdminWeb/build/admin/assets/product_import.7d0bc427.js
2024-10-13 16:36:05 +08:00

2 lines
5.8 KiB
JavaScript

import{a6 as A,C as O,D as $,J,K as W,w as Z,F as G,L as H,M as Q,b as X,N as Y,O as ee}from"./element-plus.a63a26dd.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.69c35136.js";import{d as L,r as C,Z as ae,i as le,af as re,o as v,c as D,U as e,L as t,u as o,aa as se,T as ne,a9 as ue,R as E,M as ie,K as pe,a as x,j as me}from"./@vue.18505fe0.js";import{u as de}from"./usePaging.6a6670f9.js";import{u as _e}from"./useDictOptions.658ed5b6.js";import{a as k}from"./warehouse_product_storege.eaac67da.js";import"./lodash.2473fc51.js";import"./index.f340ee36.js";import{a as ce}from"./store_category.41685c13.js";import{u as fe}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.53010578.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";const he={class:"mt-4"},we={class:"flex mt-4 justify-end"},be=L({name:"storeProductLists"}),ro=L({...be,setup(ge){const p=fe();C(null);const s=ae({store_name:"",class_all:"",warehouse_id:"",bar_code:"",order_by:"",field:"nums"}),z=C([]),q=u=>{z.value=u.map(({id:a})=>a)};_e("");let F=1;p.query.page_no&&(F=parseInt(p.query.page_no)),p.query.id&&(s.warehouse_id=parseInt(p.query.id)),console.log(p.query.id);const{pager:i,getLists:y,resetParams:P,resetPage:m}=de({page:F,fetchFun:k,params:s});let c,f;const h=C(!1);let w;const I=u=>(w=u,h.value=!0,B.lazyLoad(f,c),!1),B={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(u,a){c||(c=a),f||(f=u);const d=u.value||0;let n={};h.value?(n={name:w},w||(n={pid:d,page_size:1e4})):n={pid:d,page_size:1e4},ce({...n}).then(b=>{a(b.lists.map(_=>(_.leaf=!0,h.value=!1,_)))})}};return le(()=>{y()}),(u,a)=>{const d=O,n=$,b=A,_=J,K=W,g=Z,S=te,U=G,V=H,N=re("router-link"),l=Q,T=X,M=Y,R=oe,j=ee;return v(),D("div",null,[e(V,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(U,{class:"mb-[-16px]",model:o(s),inline:""},{default:t(()=>[e(n,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[e(d,{class:"w-[280px]",onKeydown:se(o(m),["enter"]),modelValue:o(s).store_name,"onUpdate:modelValue":a[0]||(a[0]=r=>o(s).store_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(n,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:t(()=>[e(b,{class:"w-[280px]",modelValue:o(s).class_all,"onUpdate:modelValue":a[1]||(a[1]=r=>o(s).class_all=r),filterable:"",clearable:"","before-filter":I,props:B,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:o(m)},null,8,["modelValue","onChange"])]),_:1}),e(n,{label:"\u6392\u5E8F",prop:"order_by"},{default:t(()=>[e(K,{modelValue:o(s).order_by,"onUpdate:modelValue":a[2]||(a[2]=r=>o(s).order_by=r),placeholder:"\u8BF7\u9009\u62E9\u6392\u5E8F",style:{width:"240px"},onChange:o(m)},{default:t(()=>[(v(),D(ne,null,ue([{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(n,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"]),e(S,{class:"ml-2.5","fetch-fun":o(k),params:o(s),"page-size":o(i).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),ie((v(),pe(V,{class:"!border-none",shadow:"never"},{default:t(()=>[e(N,{to:{path:"import",query:{warehouse_id:o(s).warehouse_id}},class:"ml-4"},{default:t(()=>[e(g,{type:"primary"},{default:t(()=>[E(" \u51FA\u5E93 ")]),_:1})]),_:1},8,["to"]),x("div",he,[e(M,{data:o(i).lists,onSelectionChange:q},{default:t(()=>[e(l,{type:"selection",width:"55"}),e(l,{label:"id",prop:"id","show-overflow-tooltip":""}),e(l,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:t(({row:r})=>[e(T,{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:"\u7EC8\u7AEF\u96F6\u552E\u4EF7",prop:"price","min-width":"120","show-overflow-tooltip":""}),e(l,{label:"\u89C4\u683C",prop:"store_info","min-width":"100","show-overflow-tooltip":""}),e(l,{label:"\u6BDB\u5229\u7387",prop:"rose","min-width":"100","show-overflow-tooltip":""}),e(l,{label:"\u5E93\u5B58",prop:"nums","min-width":"100","show-overflow-tooltip":""}),e(l,{label:"\u4EF7\u503C",prop:"total_price","min-width":"200","show-overflow-tooltip":""})]),_:1},8,["data"])]),x("div",we,[e(R,{modelValue:o(i),"onUpdate:modelValue":a[3]||(a[3]=r=>me(i)?i.value=r:null),onChange:o(y)},null,8,["modelValue","onChange"])])]),_:1})),[[j,o(i).loading]])])}}});export{ro as default};