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

2 lines
7.5 KiB
JavaScript

import{G as ae,H as re,J as se,L as ue,M as ie,N as ne,O as pe,C as me,B as de,w as _e,D as ce}from"./element-plus.2acb577d.js";import{_ as fe}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{u as ve}from"./usePaging.23706826.js";import{u as we}from"./useDictOptions.4fbfb4d7.js";import{d as Ee,e as be}from"./outbound_order.dff54b80.js";import{a as he}from"./warehouse.77723b1e.js";import{a as Ce}from"./system_store.9ac735ff.js";import"./lodash.6bfd3540.js";import{f as Fe}from"./index.81df6f20.js";import{_ as ke}from"./edit.vue_vue_type_script_setup_true_name_psiWarehouseOrderEdit_lang.351fd987.js";import{_ as De}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.2171dc64.js";import"./enums.91892b5c.js";import{h as Y}from"./moment.40bc58bf.js";import{a as ye}from"./supplier.62efcbb1.js";import{d as $,s as M,r as n,Z as ge,ah as Ve,am as Be,o as u,c as b,U as t,L as a,u as l,T as k,a9 as D,K as p,i as O,R as w,M as y,a as R,Q as U,n as Le}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_order.f55e8b52.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.58202ffc.js";import"./store_product.b6de24f6.js";import"./warehouse_storege.3c4c7710.js";import"./outbound_product.926f9b85.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.7c2652ec.js";const xe={class:"mt-4"},Se={class:"flex mt-4 justify-end"},Te=$({name:"psiWarehouseOrderLists"}),Lt=$({...Te,setup(Ye){const N=M(),g=n(!1),h=M(),C=n(!1),r=ge({warehouse_id:"",store_id:"",supplier_id:"",oid:"",order_type:"",code:"",status:"",start_time:"",end_time:""}),m=n([]),P=()=>{m.value[0]&&m.value[1]?(r.start_time=Y(m.value[0]).format("YYYY-MM-DD")+" 00:00:00",r.end_time=Y(m.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(r.start_time="",r.end_time="")},A=n([]),I=s=>{A.value=s.map(({id:e})=>e)},{dictData:V}=we("product_type,warehouse_produc_pm"),{pager:c,getLists:f,resetParams:W,resetPage:j}=ve({fetchFun:be,params:r}),E=n(!1),B=n([]),q=(s="")=>{E.value=!0,ye({mer_name:s}).then(e=>{B.value=e.lists,setTimeout(()=>{E.value=!1},300)}).catch(e=>{setTimeout(()=>{E.value=!1},300)})},L=n([]),G=()=>{he({}).then(s=>{L.value=s.lists})},x=n([]),H=()=>{Ce({}).then(s=>{x.value=s.lists})},J=async s=>{var e,d;C.value=!0,await Le(),(e=h.value)==null||e.open(),(d=h.value)==null||d.getDetail(s)},K=async s=>{await Fe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Ee({id:s}),f()};return G(),H(),f(),(s,e)=>{const d=ae,F=re,_=me,Q=de,Z=se,v=_e,z=ce,S=ue,X=Ve("router-link"),i=ie,ee=ne,te=fe,T=Be("perms"),oe=pe;return u(),b("div",null,[t(S,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[t(z,{class:"mb-[-16px]",model:l(r),inline:""},{default:a(()=>[t(_,{class:"w-[220px]",label:"\u4ED3\u5E93",prop:"warehouse_id"},{default:a(()=>[t(F,{modelValue:l(r).warehouse_id,"onUpdate:modelValue":e[0]||(e[0]=o=>l(r).warehouse_id=o),filterable:"",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4ED3\u5E93",style:{width:"240px"}},{default:a(()=>[(u(!0),b(k,null,D(l(L),o=>(u(),p(d,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(_,{class:"w-[220px]",label:"\u95E8\u5E97",prop:"store_id"},{default:a(()=>[t(F,{modelValue:l(r).store_id,"onUpdate:modelValue":e[1]||(e[1]=o=>l(r).store_id=o),filterable:"",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",style:{width:"240px"}},{default:a(()=>[(u(!0),b(k,null,D(l(x),o=>(u(),p(d,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(_,{class:"w-[220px]",label:"\u4F9B\u5E94\u5546",prop:"store_id"},{default:a(()=>[t(F,{modelValue:l(r).supplier_id,"onUpdate:modelValue":e[2]||(e[2]=o=>l(r).supplier_id=o),filterable:"",clearable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":q,loading:l(E)},{default:a(()=>[(u(!0),b(k,null,D(l(B),o=>(u(),p(d,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),t(_,{label:"\u5355\u53F7",prop:"code"},{default:a(()=>[t(Q,{class:"w-[280px]",modelValue:l(r).code,"onUpdate:modelValue":e[3]||(e[3]=o=>l(r).code=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u53F7"},null,8,["modelValue"])]),_:1}),t(_,{label:"\u65E5\u671F",prop:"create_time"},{default:a(()=>[t(Z,{modelValue:l(m),"onUpdate:modelValue":e[4]||(e[4]=o=>O(m)?m.value=o:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",onChange:P},null,8,["modelValue"])]),_:1}),t(_,null,{default:a(()=>[t(v,{type:"primary",onClick:l(j)},{default:a(()=>e[8]||(e[8]=[w("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(v,{onClick:l(W)},{default:a(()=>e[9]||(e[9]=[w("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),y((u(),p(S,{class:"!border-none",shadow:"never"},{default:a(()=>[y((u(),p(X,{to:{path:"import"},class:"ml-4"},{default:a(()=>[t(v,{type:"primary"},{default:a(()=>e[10]||(e[10]=[w(" \u51FA\u5E93 ")])),_:1})]),_:1})),[[T,["import"]]]),R("div",xe,[t(ee,{data:l(c).lists,onSelectionChange:I},{default:a(()=>[t(i,{label:"ID",prop:"id","show-overflow-tooltip":""}),t(i,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),t(i,{label:"\u95E8\u5E97",prop:"system_store","show-overflow-tooltip":""}),t(i,{label:"\u586B\u5199\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),t(i,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"order_type_name"}),t(i,{label:"\u5355\u53F7",prop:"code","show-overflow-tooltip":"","min-width":"100"}),t(i,{label:"\u603B\u4EF7\u683C",prop:"total_price","show-overflow-tooltip":""}),t(i,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":"","min-width":"90"}),t(i,{label:"\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),t(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:o})=>[t(v,{type:"primary",link:"",onClick:le=>J(o)},{default:a(()=>e[11]||(e[11]=[w("\u8BE6\u60C5")])),_:2},1032,["onClick"]),y((u(),p(v,{type:"danger",link:"",onClick:le=>K(o.id)},{default:a(()=>e[12]||(e[12]=[w(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[T,["psi/outbound_order/delete"]]])]),_:1})]),_:1},8,["data"])]),R("div",Se,[t(te,{modelValue:l(c),"onUpdate:modelValue":e[5]||(e[5]=o=>O(c)?c.value=o:null),onChange:l(f)},null,8,["modelValue","onChange"])])]),_:1})),[[oe,l(c).loading]]),l(g)?(u(),p(ke,{key:0,ref_key:"editRef",ref:N,"dict-data":l(V),onSuccess:l(f),onClose:e[6]||(e[6]=o=>g.value=!1)},null,8,["dict-data","onSuccess"])):U("",!0),l(C)?(u(),p(De,{key:1,ref_key:"detailsRef",ref:h,onSuccess:l(f),onClose:e[7]||(e[7]=o=>C.value=!1),dictData:l(V)},null,8,["onSuccess","dictData"])):U("",!0)])}}});export{Lt as default};