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

2 lines
6.9 KiB
JavaScript

import{G as q,H as G,J as H,L as J,M as K,N as Q,O as Z,C as X,B as ee,w as oe,D as le,b as te}from"./element-plus.2acb577d.js";import{_ as ae}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{u as ue}from"./usePaging.23706826.js";import{u as re}from"./useDictOptions.4fbfb4d7.js";import{c as se}from"./outbound_product.926f9b85.js";import"./lodash.6bfd3540.js";import"./index.81df6f20.js";import{_ as pe}from"./edit.vue_vue_type_script_setup_true_name_psiWarehouseProductEdit_lang.78737ff1.js";import{h as V}from"./moment.40bc58bf.js";import{a as ie}from"./warehouse.77723b1e.js";import{a as ne}from"./system_store.9ac735ff.js";import{d as L,s as de,r as i,Z as me,o as n,c as b,U as e,L as u,u as l,T as B,a9 as D,K as f,i as y,R as k,M as _e,a as x,Q as ce}from"./@vue.821a47ec.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"./vue-router.4c04f9b6.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";import"./index.f292cd50.js";import"./warehouse_product.d57b2a29.js";const fe={class:"mt-4"},we={class:"flex mt-4 justify-end"},Ee=L({name:"psiWarehouseProductLists"}),ro=L({...Ee,setup(be){const A=de(),h=i(!1),v=i([]),S=()=>{ie({page_size:999}).then(d=>{v.value=d.lists})},F=i([]),U=()=>{ne({page_size:999}).then(d=>{F.value=d.lists})};i(!1),i([]);const a=me({warehouse_id:"",supplier_id:"",store_id:"",order_type:"",product_name:"",bar_code:"",oid:"",code:"",pay_type:"",status:"",start_time:"",is_group:"",end_time:""}),p=i([]),Y=()=>{p.value[0]&&p.value[1]?(a.start_time=V(p.value[0]).format("YYYY-MM-DD")+" 00:00:00",a.end_time=V(p.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(a.start_time="",a.end_time=""),_()},P=i([]),M=d=>{P.value=d.map(({id:t})=>t)},{dictData:T}=re("product_type"),{pager:m,getLists:_,resetParams:N,resetPage:R}=ue({fetchFun:se,params:a});return S(),U(),_(),(d,t)=>{const c=q,w=G,s=X,E=ee,I=H,g=oe,O=le,C=J,r=K,W=te,$=Q,z=ae,j=Z;return n(),b("div",null,[e(C,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[e(O,{class:"mb-[-16px]",model:l(a),inline:""},{default:u(()=>[e(s,{class:"w-[220px]",label:"\u4ED3\u5E93",prop:"warehouse_id"},{default:u(()=>[e(w,{modelValue:l(a).warehouse_id,"onUpdate:modelValue":t[0]||(t[0]=o=>l(a).warehouse_id=o),filterable:"",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4ED3\u5E93",style:{width:"240px"}},{default:u(()=>[(n(!0),b(B,null,D(l(v),o=>(n(),f(c,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(s,{class:"w-[220px]",label:"\u95E8\u5E97",prop:"store_id"},{default:u(()=>[e(w,{modelValue:l(a).store_id,"onUpdate:modelValue":t[1]||(t[1]=o=>l(a).store_id=o),filterable:"",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",style:{width:"240px"}},{default:u(()=>[(n(!0),b(B,null,D(l(F),o=>(n(),f(c,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(s,{label:"\u7EDF\u8BA1",prop:"is_group",class:"w-[220px]"},{default:u(()=>[e(w,{modelValue:l(a).is_group,"onUpdate:modelValue":t[2]||(t[2]=o=>l(a).is_group=o),placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u7EDF\u8BA1"},{default:u(()=>[e(c,{label:"\u7EDF\u8BA1",value:"1"}),e(c,{label:"\u4E0D\u7EDF\u8BA1",value:"0"})]),_:1},8,["modelValue"])]),_:1}),e(s,{label:"\u5546\u54C1",prop:"product_name"},{default:u(()=>[e(E,{class:"w-[280px]",modelValue:l(a).product_name,"onUpdate:modelValue":t[3]||(t[3]=o=>l(a).product_name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:u(()=>[e(E,{class:"w-[280px]",modelValue:l(a).bar_code,"onUpdate:modelValue":t[4]||(t[4]=o=>l(a).bar_code=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u51FA\u5E93\u5355\u53F7",prop:"code"},{default:u(()=>[e(E,{class:"w-[280px]",modelValue:l(a).code,"onUpdate:modelValue":t[5]||(t[5]=o=>l(a).code=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5165\u5E93\u5355\u53F7"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u65E5\u671F",prop:"create_time"},{default:u(()=>[e(I,{modelValue:l(p),"onUpdate:modelValue":t[6]||(t[6]=o=>y(p)?p.value=o:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",onChange:Y},null,8,["modelValue"])]),_:1}),e(s,null,{default:u(()=>[e(g,{type:"primary",onClick:l(R)},{default:u(()=>t[9]||(t[9]=[k("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(g,{onClick:l(N)},{default:u(()=>t[10]||(t[10]=[k("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_e((n(),f(C,{class:"!border-none",shadow:"never"},{default:u(()=>[x("div",fe,[e($,{data:l(m).lists,onSelectionChange:M},{default:u(()=>[e(r,{label:"ID",prop:"id","show-overflow-tooltip":"",width:"80"}),e(r,{label:"\u51FA\u5E93\u5355\u53F7",prop:"code","show-overflow-tooltip":"","min-width":"120"}),e(r,{label:"\u64CD\u4F5C\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":"",width:"80"}),e(r,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),e(r,{label:"\u5546\u54C1",prop:"store_name","show-overflow-tooltip":""}),e(r,{label:"\u56FE\u7247",prop:"image","min-width":"80"},{default:u(({row:o})=>[e(W,{style:{width:"50px",height:"50px"},src:o.image,"preview-teleported":!0,"preview-src-list":[o.image]},null,8,["src","preview-src-list"])]),_:1}),e(r,{label:"\u95E8\u5E97",prop:"system_store_name","show-overflow-tooltip":""}),e(r,{label:"\u51FA\u5E93\u7C7B\u578B",prop:"type_name","show-overflow-tooltip":"",width:"100"}),e(r,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"order_type_name","show-overflow-tooltip":"",width:"100"}),e(r,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":"",width:"80"}),e(r,{label:"\u603B\u4EF7\u683C",prop:"total_price","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":"","min-width":"120"}),e(r,{label:"\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""})]),_:1},8,["data"])]),x("div",we,[e(z,{modelValue:l(m),"onUpdate:modelValue":t[7]||(t[7]=o=>y(m)?m.value=o:null),onChange:l(_)},null,8,["modelValue","onChange"])])]),_:1})),[[j,l(m).loading]]),l(h)?(n(),f(pe,{key:0,ref_key:"editRef",ref:A,"dict-data":l(T),onSuccess:l(_),onClose:t[8]||(t[8]=o=>h.value=!1)},null,8,["dict-data","onSuccess"])):ce("",!0)])}}});export{ro as default};