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