2025-03-20 10:46:42 +08:00

2 lines
7.2 KiB
JavaScript

import{G as X,H as Y,L as ee,M as oe,N as te,O as le,C as ae,B as re,w as ue,D as se}from"./element-plus.2acb577d.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{u as ne}from"./usePaging.23706826.js";import{u as pe}from"./useDictOptions.4fbfb4d7.js";import{f as de,g as me}from"./warehouse_order.f55e8b52.js";import{a as _e}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 we}from"./edit.vue_vue_type_script_setup_true_name_psiWarehouseOrderEdit_lang.a305c863.js";import{_ as ve}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.ee9378b8.js";import{e as be}from"./enums.91892b5c.js";import{d as N,s as A,r as w,Z as Ee,ah as Ce,am as ye,o as r,c as b,U as o,L as a,u as l,T as D,a9 as g,K as p,R as _,M as E,a as R,i as he,Q as U,n as T}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"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.58202ffc.js";import"./store_product.b6de24f6.js";import"./warehouse_storege.3c4c7710.js";import"./warehouse_product.d57b2a29.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.da9c24ca.js";import"./supplier.62efcbb1.js";const ke={class:"mt-4"},Fe={class:"flex mt-4 justify-end"},Be=N({name:"psiWarehouseOrderLists"}),yo=N({...Be,setup(De){const C=A(),y=w(!1),h=A(),k=w(!1),u=Ee({warehouse_id:"",store_id:"",oid:"",order_type:"",code:"",status:"",create_time:""}),O=w([]),W=s=>{O.value=s.map(({id:e})=>e)},{dictData:V}=pe("product_type,warehouse_produc_pm"),{pager:c,getLists:f,resetParams:P,resetPage:I}=ne({fetchFun:me,params:u}),x=w([]),M=()=>{_e({}).then(s=>{x.value=s.lists})},L=w([]),j=()=>{ce({}).then(s=>{L.value=s.lists})},q=async s=>{var e,i;k.value=!0,await T(),(e=h.value)==null||e.open(),(i=h.value)==null||i.getDetail(s)},G=async s=>{var e,i;y.value=!0,await T(),(e=C.value)==null||e.open("edit"),(i=C.value)==null||i.setFormData(s)},H=async s=>{await fe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await de({id:s}),f()};return M(),j(),f(),(s,e)=>{const i=X,F=Y,d=ae,S=re,m=ue,K=se,$=ee,Q=Ce("router-link"),n=oe,Z=te,z=ie,B=ye("perms"),J=le;return r(),b("div",null,[o($,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(K,{class:"mb-[-16px]",model:l(u),inline:""},{default:a(()=>[o(d,{class:"w-[220px]",label:"\u4ED3\u5E93",prop:"warehouse_id"},{default:a(()=>[o(F,{modelValue:l(u).warehouse_id,"onUpdate:modelValue":e[0]||(e[0]=t=>l(u).warehouse_id=t),filterable:"",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4ED3\u5E93",style:{width:"240px"}},{default:a(()=>[(r(!0),b(D,null,g(l(x),t=>(r(),p(i,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(d,{class:"w-[220px]",label:"\u95E8\u5E97",prop:"store_id"},{default:a(()=>[o(F,{modelValue:l(u).store_id,"onUpdate:modelValue":e[1]||(e[1]=t=>l(u).store_id=t),filterable:"",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",style:{width:"240px"}},{default:a(()=>[(r(!0),b(D,null,g(l(L),t=>(r(),p(i,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(d,{label:"\u8BA2\u5355id",prop:"oid"},{default:a(()=>[o(S,{class:"w-[280px]",modelValue:l(u).oid,"onUpdate:modelValue":e[2]||(e[2]=t=>l(u).oid=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355id"},null,8,["modelValue"])]),_:1}),o(d,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"order_type",class:"w-[220px]"},{default:a(()=>[o(F,{modelValue:l(u).order_type,"onUpdate:modelValue":e[3]||(e[3]=t=>l(u).order_type=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8BA2\u5355\u7C7B\u578B"},{default:a(()=>[o(i,{label:"\u5168\u90E8",value:""}),(r(!0),b(D,null,g(l(be).orderType,(t,v)=>(r(),p(i,{key:v,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(d,{label:"\u5355\u53F7",prop:"code"},{default:a(()=>[o(S,{class:"w-[280px]",modelValue:l(u).code,"onUpdate:modelValue":e[4]||(e[4]=t=>l(u).code=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u53F7"},null,8,["modelValue"])]),_:1}),o(d,null,{default:a(()=>[o(m,{type:"primary",onClick:l(I)},{default:a(()=>e[8]||(e[8]=[_("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(m,{onClick:l(P)},{default:a(()=>e[9]||(e[9]=[_("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),E((r(),p($,{class:"!border-none",shadow:"never"},{default:a(()=>[E((r(),p(Q,{to:{path:"warehousing"},class:"ml-4"},{default:a(()=>[o(m,{type:"primary"},{default:a(()=>e[10]||(e[10]=[_(" \u5165\u5E93 ")])),_:1})]),_:1})),[[B,["warehousing"]]]),R("div",ke,[o(Z,{data:l(c).lists,onSelectionChange:W},{default:a(()=>[o(n,{label:"ID",prop:"id","show-overflow-tooltip":""}),o(n,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),o(n,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"order_type_name"}),o(n,{label:"\u5355\u53F7",prop:"code","show-overflow-tooltip":"","min-width":"100"}),o(n,{label:"\u603B\u4EF7\u683C",prop:"total_price","show-overflow-tooltip":""}),o(n,{label:"\u5DF2\u7ED3",prop:"completed_amount","show-overflow-tooltip":""}),o(n,{label:"\u672A\u7ED3",prop:"outstanding_amount","show-overflow-tooltip":""}),o(n,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":"","min-width":"90"}),o(n,{label:"\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),o(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:t})=>[o(m,{type:"primary",link:"",onClick:v=>q(t)},{default:a(()=>e[11]||(e[11]=[_("\u8BE6\u60C5")])),_:2},1032,["onClick"]),E((r(),p(m,{type:"primary",link:"",onClick:v=>G(t)},{default:a(()=>e[12]||(e[12]=[_(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[B,["psi/warehouse_order/edit"]]]),E((r(),p(m,{type:"danger",link:"",onClick:v=>H(t.id)},{default:a(()=>e[13]||(e[13]=[_(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[B,["psi/warehouse_order/delete"]]])]),_:1})]),_:1},8,["data"])]),R("div",Fe,[o(z,{modelValue:l(c),"onUpdate:modelValue":e[5]||(e[5]=t=>he(c)?c.value=t:null),onChange:l(f)},null,8,["modelValue","onChange"])])]),_:1})),[[J,l(c).loading]]),l(y)?(r(),p(we,{key:0,ref_key:"editRef",ref:C,"dict-data":l(V),onSuccess:l(f),onClose:e[6]||(e[6]=t=>y.value=!1)},null,8,["dict-data","onSuccess"])):U("",!0),l(k)?(r(),p(ve,{key:1,ref_key:"detailsRef",ref:h,onSuccess:l(f),onClose:e[7]||(e[7]=t=>k.value=!1),dictData:l(V)},null,8,["onSuccess","dictData"])):U("",!0)])}}});export{yo as default};