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

2 lines
7.1 KiB
JavaScript

import{G as ee,H as oe,J as te,L as ae,M as le,N as re,O as se,B as ue,C as ne,w as ie,D as pe}from"./element-plus.2acb577d.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang.804ffc77.js";import{u as _e}from"./usePaging.23706826.js";import{u as ce}from"./useDictOptions.4fbfb4d7.js";import{b as B,c as fe}from"./purchase_order.3f111107.js";import"./lodash.6bfd3540.js";import{f as ve}from"./index.81df6f20.js";import{_ as we}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.e2c9c874.js";import{h as x}from"./moment.40bc58bf.js";import{a as he}from"./supplier.62efcbb1.js";import{d as Y,r as i,s as Fe,Z as Ce,e as Ee,ah as De,am as be,o as m,c as L,U as o,L as l,u as t,T as ke,a9 as ge,K as w,i as T,R as f,M as E,a as M,Q as Ve,n as U}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"./index.f292cd50.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.vue_vue_type_script_setup_true_name_systemStoreLists_lang.58202ffc.js";import"./store_product.b6de24f6.js";import"./warehouse_storege.3c4c7710.js";import"./purchase_product.d1fc5db6.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.941f28f1.js";import"./warehouse.77723b1e.js";const ye={class:"mt-4"},Be={class:"flex mt-4 justify-end"},xe=Y({name:"warehouseOrderLists"}),ko=Y({...xe,setup(Le){const D=i(),F=Fe(),S=i(!1),C=i(!1),r=Ce({id:"",warehouse_id:"",product_name:"",financial_pm:1,store_id:"",start_time:"",end_time:"",code:"",supplier_id:""}),$=i([]),R=s=>{$.value=s.map(({id:e})=>e)},{dictData:N}=ce(""),{pager:d,getLists:v,resetParams:O,resetPage:b}=_e({fetchFun:B,params:r}),P=async s=>{var e,u;S.value=!0,await U(),(e=D.value)==null||e.open("edit"),(u=D.value)==null||u.setFormData(s)},I=async s=>{await ve.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await fe({id:s}),v()},z=async s=>{var e,u;C.value=!0,await U(),(e=F.value)==null||e.open(),(u=F.value)==null||u.getDetail(s)},p=i([]),A=()=>{p.value[0]&&p.value[1]?(r.start_time=x(p.value[0]).format("YYYY-MM-DD")+" 00:00:00",r.end_time=x(p.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(r.start_time="",r.end_time=""),v()};i(!1),i([]);const h=i(!1),k=i([]),W=(s="")=>{h.value=!0,he({mer_name:s}).then(e=>{k.value=e.lists,setTimeout(()=>{h.value=!1},300)}).catch(e=>{setTimeout(()=>{h.value=!1},300)})};return Ee(()=>{v()}),(s,e)=>{const u=ue,_=ne,j=ee,q=oe,G=te,c=ie,H=de,J=pe,g=ae,K=De("router-link"),n=le,Q=re,Z=me,V=be("perms"),X=se;return m(),L("div",null,[o(g,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[o(J,{class:"mb-[-16px]",model:t(r),inline:""},{default:l(()=>[o(_,{label:"ID",prop:"id"},{default:l(()=>[o(u,{class:"w-[280px]",modelValue:t(r).id,"onUpdate:modelValue":e[0]||(e[0]=a=>t(r).id=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165id"},null,8,["modelValue"])]),_:1}),o(_,{label:"\u5355\u53F7",prop:"code"},{default:l(()=>[o(u,{class:"w-[280px]",modelValue:t(r).code,"onUpdate:modelValue":e[1]||(e[1]=a=>t(r).code=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u53F7",onChange:t(b)},null,8,["modelValue","onChange"])]),_:1}),o(_,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:l(()=>[o(u,{class:"w-[280px]",modelValue:t(r).warehouse_id,"onUpdate:modelValue":e[2]||(e[2]=a=>t(r).warehouse_id=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),o(_,{label:"\u4F9B\u5E94\u5546",prop:"supplier_id"},{default:l(()=>[o(q,{modelValue:t(r).supplier_id,"onUpdate:modelValue":e[3]||(e[3]=a=>t(r).supplier_id=a),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":W,loading:t(h),style:{width:"240px"}},{default:l(()=>[(m(!0),L(ke,null,ge(t(k),a=>(m(),w(j,{key:a.id,label:a.mer_name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),o(_,{label:"\u65E5\u671F",prop:"create_time"},{default:l(()=>[o(G,{modelValue:t(p),"onUpdate:modelValue":e[4]||(e[4]=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:A},null,8,["modelValue"])]),_:1}),o(_,null,{default:l(()=>[o(c,{type:"primary",onClick:t(b)},{default:l(()=>e[7]||(e[7]=[f("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(c,{onClick:t(O)},{default:l(()=>e[8]||(e[8]=[f("\u91CD\u7F6E")])),_:1},8,["onClick"]),o(H,{class:"ml-2.5","fetch-fun":t(B),params:t(r),"page-size":t(d).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),E((m(),w(g,{class:"!border-none",shadow:"never"},{default:l(()=>[o(K,{to:{path:"purchase_order_add"},class:"ml-4"},{default:l(()=>[o(c,{type:"primary"},{default:l(()=>e[9]||(e[9]=[f(" \u6DFB\u52A0 ")])),_:1})]),_:1}),M("div",ye,[o(Q,{data:t(d).lists,onSelectionChange:R},{default:l(()=>[o(n,{label:"id",prop:"id","show-overflow-tooltip":"",width:"70"}),o(n,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),o(n,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),o(n,{label:"\u5355\u53F7",prop:"code","show-overflow-tooltip":""}),o(n,{label:"\u72B6\u6001",prop:"financial_pm_name","show-overflow-tooltip":""}),o(n,{label:"\u586B\u5199\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),o(n,{label:"\u603B\u4EF7\u683C",prop:"total_price","show-overflow-tooltip":""}),o(n,{label:"\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),o(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:a})=>[o(c,{type:"primary",link:"",onClick:y=>z(a)},{default:l(()=>e[10]||(e[10]=[f("\u8BE6\u60C5")])),_:2},1032,["onClick"]),E((m(),w(c,{type:"primary",link:"",onClick:y=>P(a)},{default:l(()=>e[11]||(e[11]=[f(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[V,["warehouse_order.warehouse_order/edit"]]]),E((m(),w(c,{type:"danger",link:"",onClick:y=>I(a.id)},{default:l(()=>e[12]||(e[12]=[f(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[V,["warehouse_order.warehouse_order/delete"]]])]),_:1})]),_:1},8,["data"])]),M("div",Be,[o(Z,{modelValue:t(d),"onUpdate:modelValue":e[5]||(e[5]=a=>T(d)?d.value=a:null),onChange:t(v)},null,8,["modelValue","onChange"])])]),_:1})),[[X,t(d).loading]]),t(C)?(m(),w(we,{key:0,ref_key:"detailsRef",ref:F,onSuccess:t(v),onClose:e[6]||(e[6]=a=>C.value=!1),dictData:t(N)},null,8,["onSuccess","dictData"])):Ve("",!0)])}}});export{ko as default};