2025-03-20 10:25:32 +08:00

2 lines
7.2 KiB
JavaScript

import{G as Q,H as Z,L as J,M as X,N as Y,Q as ee,O as oe,k as le,B as te,C as ae,w as ue,D as re,b as ne,t as se}from"./element-plus.2acb577d.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.804ffc77.js";import{d as P,r as C,Z as me,e as de,ah as _e,am as fe,o as g,c as D,a as i,U as e,L as t,u as a,aa as ce,T as k,a9 as ve,R as f,M as B,K as x,S as F,i as S}from"./@vue.821a47ec.js";import{u as Ce}from"./usePaging.23706826.js";import{u as ge}from"./useDictOptions.4fbfb4d7.js";import{c as we,e as he,a as be}from"./warehouse_storege.3c4c7710.js";import"./lodash.6bfd3540.js";import"./index.81df6f20.js";import{u as Fe}from"./vue-router.4c04f9b6.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.f292cd50.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.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.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";const Ee={class:"mt-4"},ye={class:"flex mt-4 justify-end"},Ve={class:"dialog-footer"},De=P({name:"storeProductLists"}),mo=P({...De,setup(ke){const c=Fe(),p=C(!1),r=C({id:"",store_name:"",nums:"",remark:""}),s=me({store_name:"",class_all:"",warehouse_id:"",bar_code:"",order_by:"",field:"nums"}),U=C([]),A=n=>{U.value=n.map(({id:o})=>o)};ge("");let E=1;c.query.page_no&&(E=parseInt(c.query.page_no)),c.query.id&&(s.warehouse_id=parseInt(c.query.id)),console.log(c.query.id);const{pager:m,getLists:w,resetParams:L,resetPage:h}=Ce({page:E,fetchFun:be,params:s}),q=n=>{p.value=!0,r.value.id=n.id,r.value.store_name=n.store_name,r.value.nums=n.nums},I=n=>{if(p.value=!1,r.value.id<=0)return le.error("id\u4E0D\u80FD\u4E3A\u7A7A"),!1;we(r.value).then(o=>{w()})};C(!1);const $=n=>{he({id:n.id,is_verify:n.is_verify})};return de(()=>{w()}),(n,o)=>{const v=te,d=ae,z=Q,K=Z,_=ue,M=pe,y=re,V=J,N=_e("router-link"),u=X,T=ne,W=se,R=Y,O=ie,j=ee,G=fe("perms"),H=oe;return g(),D(k,null,[i("div",null,[e(V,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(y,{class:"mb-[-16px]",model:a(s),inline:""},{default:t(()=>[e(d,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[e(v,{class:"w-[280px]",onKeydown:ce(a(h),["enter"]),modelValue:a(s).store_name,"onUpdate:modelValue":o[0]||(o[0]=l=>a(s).store_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(d,{label:"\u6392\u5E8F",prop:"order_by"},{default:t(()=>[e(K,{modelValue:a(s).order_by,"onUpdate:modelValue":o[1]||(o[1]=l=>a(s).order_by=l),placeholder:"\u8BF7\u9009\u62E9\u6392\u5E8F",style:{width:"240px"},onChange:a(h)},{default:t(()=>[(g(),D(k,null,ve([{id:"asc",name:"\u5347\u5E8F"},{id:"desc",name:"\u964D\u5E8F"}],l=>e(z,{key:l.id,label:l.name,value:l.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),e(d,null,{default:t(()=>[e(_,{type:"primary",onClick:a(h)},{default:t(()=>o[8]||(o[8]=[f("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(_,{onClick:a(L)},{default:t(()=>o[9]||(o[9]=[f("\u91CD\u7F6E")])),_:1},8,["onClick"]),e(M,{class:"ml-2.5","fetch-fun":n.apiWarehouseProductStoregeLists,params:a(s),"page-size":a(m).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),B((g(),x(V,{class:"!border-none",shadow:"never"},{default:t(()=>[e(N,{to:{path:"import",query:{warehouse_id:a(s).warehouse_id}},class:"ml-4"},{default:t(()=>[e(_,{type:"primary"},{default:t(()=>o[10]||(o[10]=[f(" \u51FA\u5E93 ")])),_:1})]),_:1},8,["to"]),i("div",Ee,[e(R,{data:a(m).lists,onSelectionChange:A},{default:t(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"id",prop:"id","show-overflow-tooltip":""}),e(u,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:t(({row:l})=>[e(T,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(u,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(u,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(u,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(u,{label:"\u4EF7\u683C",prop:"price","min-width":"80","show-overflow-tooltip":""},{default:t(({row:l})=>[i("p",null,"\u5546\u6237\u4EF7"+F(l.cost),1),i("p",null,"\u4F9B\u8D27\u4EF7"+F(l.purchase),1),i("p",null,"\u96F6\u552E"+F(l.price),1)]),_:1}),e(u,{label:"\u89C4\u683C",prop:"store_info","min-width":"100","show-overflow-tooltip":""}),e(u,{label:"\u6BDB\u5229\u7387",prop:"rose","min-width":"100","show-overflow-tooltip":""}),e(u,{label:"\u5E93\u5B58",prop:"nums","min-width":"100","show-overflow-tooltip":""}),e(u,{label:"\u4EF7\u503C",prop:"total_price","min-width":"200","show-overflow-tooltip":""}),e(u,{label:"\u5F3A\u5236\u6821\u9A8C",prop:"is_verify"},{default:t(({row:l})=>[e(W,{size:"large",onChange:b=>$(l),modelValue:l.is_verify,"onUpdate:modelValue":b=>l.is_verify=b,"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(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:l})=>[B((g(),x(_,{link:"",onClick:b=>q(l)},{default:t(()=>o[11]||(o[11]=[f(" \u91CD\u7F6E\u6570\u91CF ")])),_:2},1032,["onClick"])),[[G,["warehouse_product_storege.warehouse_product_storege/edit"]]])]),_:1})]),_:1},8,["data"])]),i("div",ye,[e(O,{modelValue:a(m),"onUpdate:modelValue":o[2]||(o[2]=l=>S(m)?m.value=l:null),onChange:a(w)},null,8,["modelValue","onChange"])])]),_:1})),[[H,a(m).loading]])]),e(j,{modelValue:a(p),"onUpdate:modelValue":o[7]||(o[7]=l=>S(p)?p.value=l:null),title:"\u91CD\u7F6E\u6570\u91CF",width:"600"},{footer:t(()=>[i("div",Ve,[e(_,{onClick:o[6]||(o[6]=l=>p.value=!1)},{default:t(()=>o[12]||(o[12]=[f("\u53D6\u6D88")])),_:1}),e(_,{type:"primary",onClick:I},{default:t(()=>o[13]||(o[13]=[f(" \u786E\u8BA4 ")])),_:1})])]),default:t(()=>[e(y,{model:a(r),"label-width":"90px"},{default:t(()=>[e(d,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[e(v,{modelValue:a(r).store_name,"onUpdate:modelValue":o[3]||(o[3]=l=>a(r).store_name=l),clearable:"",readonly:!1,disabled:""},null,8,["modelValue"])]),_:1}),e(d,{label:"\u6570\u91CF",prop:"nums"},{default:t(()=>[e(v,{modelValue:a(r).nums,"onUpdate:modelValue":o[4]||(o[4]=l=>a(r).nums=l),clearable:"",readonly:!1,placeholder:"\u8BF7\u8F93\u5165\u6570\u91CF"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u5907\u6CE8",prop:"remark"},{default:t(()=>[e(v,{modelValue:a(r).remark,"onUpdate:modelValue":o[5]||(o[5]=l=>a(r).remark=l),clearable:"",readonly:!1,placeholder:"\u8BF7\u8F93\u5165\u6570\u91CF"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])],64)}}});export{mo as default};