2 lines
7.0 KiB
JavaScript
2 lines
7.0 KiB
JavaScript
import{m as N,s as $,r as i,aT as se,b as ue,bg as ne,B as re,b2 as ie,p as r,q as F,t as o,v as a,u as t,x as D,V as M,W as U,y as m,i as R,a2 as w,L as k,A as P,n as de,bh as z,aW as me,aX as pe,b3 as _e,b4 as ce,ae as fe,aY as ve,b5 as we,b6 as he,b7 as be,b8 as Ee}from"./.pnpm.1b0299fb.js";import{_ as Ce}from"./index.vue_vue_type_script_setup_true_lang.b077f234.js";import{_ as ge}from"./index.vue_vue_type_script_setup_true_lang.7b0278dc.js";import{u as Fe}from"./usePaging.00aa976d.js";import{u as De}from"./useDictOptions.e9843f63.js";import{i as A,j as ke}from"./warehouse_order.5e450039.js";import"./lodash.c3b66c05.js";import{f as ye}from"./index.689cfa31.js";import{_ as Ve}from"./edit.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.f353a14f.js";import{_ as Be}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.9801a950.js";import{a as xe}from"./system_store.e6c50bcf.js";import{a as Se}from"./supplier.f974764b.js";import"./index.6c48d0ba.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.abac7546.js";import"./@vueuse.72d44d91.js";import"./@vue.9d708d7c.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.cac2da5b.js";import"./store_product.90b19113.js";import"./store_branch_product.063beab6.js";import"./warehouse_product_storege.b9f73c92.js";import"./warehouse_product.cf564a3e.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.01c00cfd.js";const Te={class:"flex items-center mr-4"},Le={class:"mt-4"},Ye={class:"flex mt-4 justify-end"},$e=N({name:"warehouseOrderLists"}),ao=N({...$e,setup(Me){const O=$(),E=$(),y=i(!1),C=i(!1),s=se({warehouse_id:"",product_name:"",financial_pm:0,store_id:"",start_time:"",end_time:"",code:"",supplier_id:""}),W=i([]),I=n=>{W.value=n.map(({id:e})=>e)},{dictData:V}=De(""),{pager:p,getLists:_,resetParams:j,resetPage:g}=Fe({fetchFun:A,params:s}),q=async n=>{await ye.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ke({id:n}),_()},X=async n=>{var e,f;C.value=!0,await de(),(e=E.value)==null||e.open(),(f=E.value)==null||f.getDetail(n)},d=i([]),G=()=>{d.value[0]&&d.value[1]?(s.start_time=z(d.value[0]).format("YYYY-MM-DD")+" 00:00:00",s.end_time=z(d.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(s.start_time="",s.end_time=""),_()},h=i(!1),B=i([]),H=(n="")=>{h.value=!0,xe({name:n,page_size:50}).then(e=>{B.value=e.lists,setTimeout(()=>{h.value=!1},300)}).catch(e=>{setTimeout(()=>{h.value=!1},300)})},b=i(!1),x=i([]),J=(n="")=>{b.value=!0,Se({mer_name:n}).then(e=>{x.value=e.lists,setTimeout(()=>{b.value=!1},300)}).catch(e=>{setTimeout(()=>{b.value=!1},300)})};return ue(()=>{_()}),(n,e)=>{const f=me,c=pe,S=_e,T=ce,K=ne,v=fe,Q=ge,Z=ve,L=we,ee=re("router-link"),u=he,oe=be,te=Ce,Y=ie("perms"),le=Ee;return r(),F("div",null,[o(L,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(Z,{class:"mb-[-16px]",model:t(s),inline:""},{default:a(()=>[o(c,{label:"\u5355\u53F7",prop:"code"},{default:a(()=>[o(f,{class:"w-[280px]",modelValue:t(s).code,"onUpdate:modelValue":e[0]||(e[0]=l=>t(s).code=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u53F7",onChange:t(g)},null,8,["modelValue","onChange"])]),_:1}),o(c,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:a(()=>[D("div",Te,[o(T,{modelValue:t(s).store_id,"onUpdate:modelValue":e[1]||(e[1]=l=>t(s).store_id=l),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":H,loading:t(h),style:{width:"240px"},onChange:t(g)},{default:a(()=>[(r(!0),F(M,null,U(t(B),l=>(r(),m(S,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])])]),_:1}),o(c,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:a(()=>[o(f,{class:"w-[280px]",modelValue:t(s).warehouse_id,"onUpdate:modelValue":e[2]||(e[2]=l=>t(s).warehouse_id=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),o(c,{label:"\u4F9B\u5E94\u5546",prop:"supplier_id"},{default:a(()=>[o(T,{modelValue:t(s).supplier_id,"onUpdate:modelValue":e[3]||(e[3]=l=>t(s).supplier_id=l),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":J,loading:t(b),style:{width:"240px"}},{default:a(()=>[(r(!0),F(M,null,U(t(x),l=>(r(),m(S,{key:l.id,label:l.mer_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),o(c,{label:"\u65E5\u671F",prop:"create_time"},{default:a(()=>[o(K,{modelValue:t(d),"onUpdate:modelValue":e[4]||(e[4]=l=>R(d)?d.value=l:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",onChange:G},null,8,["modelValue"])]),_:1}),o(c,null,{default:a(()=>[o(v,{type:"primary",onClick:t(g)},{default:a(()=>e[8]||(e[8]=[w("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(v,{onClick:t(j)},{default:a(()=>e[9]||(e[9]=[w("\u91CD\u7F6E")])),_:1},8,["onClick"]),o(Q,{class:"ml-2.5","fetch-fun":t(A),params:t(s),"page-size":t(p).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),k((r(),m(L,{class:"!border-none",shadow:"never"},{default:a(()=>[k((r(),m(ee,{to:{path:"import"},class:"ml-4"},{default:a(()=>[o(v,{type:"primary"},{default:a(()=>e[10]||(e[10]=[w(" \u51FA\u5E93 ")])),_:1})]),_:1})),[[Y,["import"]]]),D("div",Le,[o(oe,{data:t(p).lists,onSelectionChange:I},{default:a(()=>[o(u,{type:"selection",width:"55"}),o(u,{label:"id",prop:"id","show-overflow-tooltip":"",width:"55"}),o(u,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),o(u,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),o(u,{label:"\u95E8\u5E97",prop:"system_store","show-overflow-tooltip":""}),o(u,{label:"\u5355\u53F7",prop:"code","show-overflow-tooltip":""}),o(u,{label:"\u72B6\u6001",prop:"financial_pm_name","show-overflow-tooltip":""}),o(u,{label:"\u586B\u5199\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),o(u,{label:"\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),o(u,{label:"\u603B\u4EF7\u683C",prop:"total_price","show-overflow-tooltip":""}),o(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[o(v,{type:"primary",link:"",onClick:ae=>X(l)},{default:a(()=>e[11]||(e[11]=[w("\u8BE6\u60C5")])),_:2},1032,["onClick"]),k((r(),m(v,{type:"danger",link:"",onClick:ae=>q(l.id)},{default:a(()=>e[12]||(e[12]=[w(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[Y,["warehouse_order.warehouse_order/delete"]]])]),_:1})]),_:1},8,["data"])]),D("div",Ye,[o(te,{modelValue:t(p),"onUpdate:modelValue":e[5]||(e[5]=l=>R(p)?p.value=l:null),onChange:t(_)},null,8,["modelValue","onChange"])])]),_:1})),[[le,t(p).loading]]),t(y)?(r(),m(Ve,{key:0,ref_key:"editRef",ref:O,"dict-data":t(V),onSuccess:t(_),onClose:e[6]||(e[6]=l=>y.value=!1)},null,8,["dict-data","onSuccess"])):P("",!0),t(C)?(r(),m(Be,{key:1,ref_key:"detailsRef",ref:E,onSuccess:t(_),onClose:e[7]||(e[7]=l=>C.value=!1),dictData:t(V)},null,8,["onSuccess","dictData"])):P("",!0)])}}});export{ao as default};
|