import{d as T,u as j,r as b,f as E,h as S,i as e,w as l,p as u,v as I,x as m,m as h,k as v,t as w,j as C,l as f,_ as A}from"./index-GCZD4BFP.js";const G={class:"dark:!bg-[#060818] p-4 bg-white"},q={class:"search-module"},F=["src"],H=T({__name:"purchaseOrder",setup(J){j();const V=I(),y=b("all"),i=b({}),x=b(!1),n=b({searchQuery:"",selectedSupplier:"",selectedWarehouse:"",selectedSKU:"",dateRange:[],selectedStatus:""}),g=t=>!0,$=()=>{},U=t=>{},z=(t,o)=>{},K=t=>{},B=t=>{},D=t=>{};return(t,o)=>{const N=u("el-input"),r=u("el-form-item"),s=u("el-option"),c=u("el-select"),R=u("el-date-picker"),_=u("el-button"),W=u("el-form"),p=u("el-tab-pane"),O=u("el-tabs"),d=u("el-table-column"),P=u("el-pagination"),Q=u("en-table-layout");return m(),E("div",G,[S("div",q,[e(W,{model:n.value,ref:"searchformRef",inline:""},{default:l(()=>[e(r,null,{default:l(()=>[e(N,{modelValue:n.value.searchQuery,"onUpdate:modelValue":o[0]||(o[0]=a=>n.value.searchQuery=a),placeholder:"采购单号",clearable:"",style:{width:"200px"}},null,8,["modelValue"])]),_:1}),e(r,null,{default:l(()=>[e(c,{modelValue:n.value.selectedSupplier,"onUpdate:modelValue":o[1]||(o[1]=a=>n.value.selectedSupplier=a),placeholder:"供应商",style:{"min-width":"120px","max-width":"200px"}},{default:l(()=>[e(s,{label:"供应商1",value:"supplier1"}),e(s,{label:"供应商2",value:"supplier2"})]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:l(()=>[e(c,{modelValue:n.value.selectedWarehouse,"onUpdate:modelValue":o[2]||(o[2]=a=>n.value.selectedWarehouse=a),placeholder:"采购仓库",style:{"min-width":"120px","max-width":"200px"}},{default:l(()=>[e(s,{label:"仓库1",value:"warehouse1"}),e(s,{label:"仓库2",value:"warehouse2"})]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:l(()=>[e(c,{modelValue:n.value.selectedSKU,"onUpdate:modelValue":o[3]||(o[3]=a=>n.value.selectedSKU=a),placeholder:"SKU",style:{"min-width":"120px","max-width":"200px"}},{default:l(()=>[e(s,{label:"SKU1",value:"sku1"}),e(s,{label:"SKU2",value:"sku2"})]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:l(()=>[e(R,{modelValue:n.value.dateRange,"onUpdate:modelValue":o[4]||(o[4]=a=>n.value.dateRange=a),type:"daterange",placeholder:"创建日期",style:{"min-width":"200px","max-width":"300px"}},null,8,["modelValue"])]),_:1}),e(r,null,{default:l(()=>[e(c,{modelValue:n.value.selectedStatus,"onUpdate:modelValue":o[5]||(o[5]=a=>n.value.selectedStatus=a),placeholder:"付款状态",style:{"min-width":"120px","max-width":"200px"}},{default:l(()=>[e(s,{label:"状态1",value:"status1"}),e(s,{label:"状态2",value:"status2"})]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:l(()=>[e(_,{type:"primary",onClick:$},{default:l(()=>[h("搜索")]),_:1})]),_:1})]),_:1},8,["model"])]),e(O,{modelValue:y.value,"onUpdate:modelValue":o[6]||(o[6]=a=>y.value=a)},{default:l(()=>[e(p,{label:"全部",name:"all"}),e(p,{label:"待审核",name:"pending"}),e(p,{label:"待下单",name:"toOrder"}),e(p,{label:"待发货",name:"toShip"}),e(p,{label:"已完成",name:"completed"}),e(p,{label:"已回款",name:"paidBack"}),e(p,{label:"已作废",name:"canceled"})]),_:1},8,["modelValue"]),e(Q,{tableData:i.value.records,toolbar:!1,loading:x.value},{"table-columns":l(()=>[e(d,{prop:"name",label:t.$t("order_sn")},null,8,["label"]),e(d,{prop:"brand",label:t.$t("custom")},null,8,["label"]),e(d,{prop:"bar_code",label:t.$t("order_time")},null,8,["label"]),e(d,{prop:"sku",label:t.$t("warechouse_name")},null,8,["label"]),e(d,{prop:"weight",label:t.$t("delivery_method")},null,8,["label"]),e(d,{prop:"unit",label:t.$t("order_type")},null,8,["label"]),e(d,{prop:"image",label:t.$t("user_state")},{default:l(a=>[S("img",{src:a.row.image,alt:""},null,8,F)]),_:1},8,["label"]),e(d,{label:t.$t("operate"),fixed:"right",width:"450"},{default:l(a=>[g(["warehouse:update"])?(m(),v(_,{key:0,size:"small",onClick:k=>U(a.row)},{default:l(()=>[h(w(t.$t("view")),1)]),_:2},1032,["onClick"])):f("",!0),g(["warehouse:update"])&&C(V).state.user.user.founder!==1?(m(),v(_,{key:1,size:"small",onClick:k=>z(a.$index,a.row)},{default:l(()=>[h(w(t.$t("edit")),1)]),_:2},1032,["onClick"])):f("",!0),g(["removeAreaType:delete"])&&C(V).state.user.user.founder!==1?(m(),v(_,{key:2,type:"success",size:"small",onClick:k=>K(a.row)},{default:l(()=>[h(w(t.$t("delete")),1)]),_:2},1032,["onClick"])):f("",!0)]),_:1},8,["label"])]),pagination:l(()=>[i.value.records&&i.value.records.length?(m(),v(P,{key:0,onSizeChange:B,onCurrentChange:D,"current-page":i.value.page_no,"page-sizes":[10,20,50,100],"page-size":i.value.page_size,layout:"total, sizes, prev, pager, next, jumper",total:i.value.data_total},null,8,["current-page","page-size","total"])):f("",!0)]),_:1},8,["tableData","loading"])])}}}),M=A(H,[["__scopeId","data-v-c82aa3a4"]]);export{M as default};
