lihaiMiddleOfficeAdminWeb/dist/admin/assets/product_import.0cbd564a.js

2 lines
8.1 KiB
JavaScript

import{M as te,k as ae,C as ue,D as re,N as se,O as ne,w as ie,F as pe,K as me,G as de,b as _e,t as fe,H as ce,L as ve,I as Ce}from"./element-plus.8e273e86.js";import{_ as ge}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{_ as we}from"./index.vue_vue_type_script_setup_true_lang.9f429894.js";import{d as $,r as w,Z as be,i as he,af as Fe,ap as ye,o as b,c as L,a as m,U as e,L as a,u as t,aa as Ee,T as z,a9 as Ve,R as c,M as A,K as q,S as B,j as I}from"./@vue.76ce7aa3.js";import{u as De}from"./usePaging.f8c888e4.js";import{u as ke}from"./useDictOptions.e81cb944.js";import{a as K,b as Be,c as xe}from"./warehouse_product_storege.ece6c4af.js";import"./lodash.41b9567d.js";import"./index.7b6cc783.js";import{a as Se}from"./store_category.831e1c87.js";import{u as Pe}from"./vue-router.10bd5b90.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.df8e66da.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./axios.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";const Ue={class:"mt-4"},Le={class:"flex mt-4 justify-end"},ze={class:"dialog-footer"},Ae=$({name:"storeProductLists"}),Do=$({...Ae,setup(qe){const v=Pe(),d=w(!1),s=w({id:"",store_name:"",nums:"",remark:""}),i=be({store_name:"",class_all:"",warehouse_id:"",bar_code:"",order_by:"",field:"nums"}),M=w([]),N=u=>{M.value=u.map(({id:o})=>o)};ke("");let x=1;v.query.page_no&&(x=parseInt(v.query.page_no)),v.query.id&&(i.warehouse_id=parseInt(v.query.id)),console.log(v.query.id);const{pager:_,getLists:h,resetParams:T,resetPage:C}=De({page:x,fetchFun:K,params:i}),R=u=>{d.value=!0,s.value.id=u.id,s.value.store_name=u.store_name,s.value.nums=u.nums},W=u=>{if(d.value=!1,s.value.id<=0)return ae.error("id\u4E0D\u80FD\u4E3A\u7A7A"),!1;Be(s.value).then(o=>{h()})};let F,y;const E=w(!1);let V;const j=u=>(V=u,E.value=!0,S.lazyLoad(y,F),!1),S={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(u,o){F||(F=o),y||(y=u);const p=u.value||0;let n={};E.value?(n={name:V},V||(n={pid:p,page_size:1e4})):n={pid:p,page_size:1e4},Se({...n}).then(D=>{o(D.lists.map(g=>(g.leaf=!0,E.value=!1,g)))})}},O=u=>{xe({id:u.id,is_verify:u.is_verify})};return he(()=>{h()}),(u,o)=>{const p=ue,n=re,D=te,g=se,G=ne,f=ie,H=we,P=pe,U=me,Z=Fe("router-link"),r=de,J=_e,Q=fe,X=ce,Y=ge,ee=ve,oe=ye("perms"),le=Ce;return b(),L(z,null,[m("div",null,[e(U,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(P,{class:"mb-[-16px]",model:t(i),inline:""},{default:a(()=>[e(n,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:a(()=>[e(p,{class:"w-[280px]",onKeydown:Ee(t(C),["enter"]),modelValue:t(i).store_name,"onUpdate:modelValue":o[0]||(o[0]=l=>t(i).store_name=l),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:a(()=>[e(D,{class:"w-[280px]",modelValue:t(i).class_all,"onUpdate:modelValue":o[1]||(o[1]=l=>t(i).class_all=l),filterable:"",clearable:"","before-filter":j,props:S,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:t(C)},null,8,["modelValue","onChange"])]),_:1}),e(n,{label:"\u6392\u5E8F",prop:"order_by"},{default:a(()=>[e(G,{modelValue:t(i).order_by,"onUpdate:modelValue":o[2]||(o[2]=l=>t(i).order_by=l),placeholder:"\u8BF7\u9009\u62E9\u6392\u5E8F",style:{width:"240px"},onChange:t(C)},{default:a(()=>[(b(),L(z,null,Ve([{id:"asc",name:"\u5347\u5E8F"},{id:"desc",name:"\u964D\u5E8F"}],l=>e(g,{key:l.id,label:l.name,value:l.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),e(n,null,{default:a(()=>[e(f,{type:"primary",onClick:t(C)},{default:a(()=>o[9]||(o[9]=[c("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(f,{onClick:t(T)},{default:a(()=>o[10]||(o[10]=[c("\u91CD\u7F6E")])),_:1},8,["onClick"]),e(H,{class:"ml-2.5","fetch-fun":t(K),params:t(i),"page-size":t(_).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),A((b(),q(U,{class:"!border-none",shadow:"never"},{default:a(()=>[e(Z,{to:{path:"import",query:{warehouse_id:t(i).warehouse_id}},class:"ml-4"},{default:a(()=>[e(f,{type:"primary"},{default:a(()=>o[11]||(o[11]=[c(" \u51FA\u5E93 ")])),_:1})]),_:1},8,["to"]),m("div",Ue,[e(X,{data:t(_).lists,onSelectionChange:N},{default:a(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"id",prop:"id","show-overflow-tooltip":""}),e(r,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:a(({row:l})=>[e(J,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(r,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(r,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(r,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(r,{label:"\u4EF7\u683C",prop:"price","min-width":"80","show-overflow-tooltip":""},{default:a(({row:l})=>[m("p",null,"\u5546\u6237\u4EF7"+B(l.cost),1),m("p",null,"\u4F9B\u8D27\u4EF7"+B(l.purchase),1),m("p",null,"\u96F6\u552E"+B(l.price),1)]),_:1}),e(r,{label:"\u89C4\u683C",prop:"store_info","min-width":"100","show-overflow-tooltip":""}),e(r,{label:"\u6BDB\u5229\u7387",prop:"rose","min-width":"100","show-overflow-tooltip":""}),e(r,{label:"\u5E93\u5B58",prop:"nums","min-width":"100","show-overflow-tooltip":""}),e(r,{label:"\u4EF7\u503C",prop:"total_price","min-width":"200","show-overflow-tooltip":""}),e(r,{label:"\u5F3A\u5236\u6821\u9A8C",prop:"is_verify"},{default:a(({row:l})=>[e(Q,{size:"large",onChange:k=>O(l),modelValue:l.is_verify,"onUpdate:modelValue":k=>l.is_verify=k,"active-value":1,"inactive-value":0,"active-text":"\u6821\u9A8C","inactive-text":"\u4E0D\u6821\u9A8C","inline-prompt":""},null,8,["onChange","modelValue","onUpdate:modelValue"])]),_:1}),e(r,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[A((b(),q(f,{link:"",onClick:k=>R(l)},{default:a(()=>o[12]||(o[12]=[c(" \u91CD\u7F6E\u6570\u91CF ")])),_:2},1032,["onClick"])),[[oe,["warehouse_product_storege.warehouse_product_storege/edit"]]])]),_:1})]),_:1},8,["data"])]),m("div",Le,[e(Y,{modelValue:t(_),"onUpdate:modelValue":o[3]||(o[3]=l=>I(_)?_.value=l:null),onChange:t(h)},null,8,["modelValue","onChange"])])]),_:1})),[[le,t(_).loading]])]),e(ee,{modelValue:t(d),"onUpdate:modelValue":o[8]||(o[8]=l=>I(d)?d.value=l:null),title:"\u91CD\u7F6E\u6570\u91CF",width:"600"},{footer:a(()=>[m("div",ze,[e(f,{onClick:o[7]||(o[7]=l=>d.value=!1)},{default:a(()=>o[13]||(o[13]=[c("\u53D6\u6D88")])),_:1}),e(f,{type:"primary",onClick:W},{default:a(()=>o[14]||(o[14]=[c(" \u786E\u8BA4 ")])),_:1})])]),default:a(()=>[e(P,{model:t(s),"label-width":"90px"},{default:a(()=>[e(n,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:a(()=>[e(p,{modelValue:t(s).store_name,"onUpdate:modelValue":o[4]||(o[4]=l=>t(s).store_name=l),clearable:"",readonly:!1,disabled:""},null,8,["modelValue"])]),_:1}),e(n,{label:"\u6570\u91CF",prop:"nums"},{default:a(()=>[e(p,{modelValue:t(s).nums,"onUpdate:modelValue":o[5]||(o[5]=l=>t(s).nums=l),clearable:"",readonly:!1,placeholder:"\u8BF7\u8F93\u5165\u6570\u91CF"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u5907\u6CE8",prop:"remark"},{default:a(()=>[e(p,{modelValue:t(s).remark,"onUpdate:modelValue":o[6]||(o[6]=l=>t(s).remark=l),clearable:"",readonly:!1,placeholder:"\u8BF7\u8F93\u5165\u6570\u91CF"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])],64)}}});export{Do as default};