1 line
8.4 KiB
JavaScript
1 line
8.4 KiB
JavaScript
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[919],{919:function(t,e,n){n.r(e),n.d(e,{default:function(){return f}});var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"spare-parts-record"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH}}),e("pagination",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,total:t.total},on:{"update:page":function(e){return t.$set(t.listQuery,"current",e)},"update:limit":function(e){return t.$set(t.listQuery,"size",e)},pagination:function(e){return t.getList()}}})],1)},r=[],i=n(475),o=n(147),u=n(381),l=n.n(u);const s=[{prop:"type",label:"类型",filter:(0,i.fW)("materialVoList"),minWidth:120},{prop:"proLineName",label:"产线",minWidth:120},{prop:"sparePartType",label:"备件类别",minWidth:150},{prop:"sparePartName",label:"备件名称",minWidth:150},{prop:"model",label:"备件型号",minWidth:150},{prop:"num",label:"数量/个",minWidth:150},{prop:"batchCode",label:"批次编码",minWidth:140},{prop:"supplier",label:"供应商",minWidth:140},{prop:"stockPosition",label:"库位",minWidth:140},{prop:"recipient",label:"领取人",minWidth:140},{prop:"creatorName",label:"登记人",minWidth:140},{prop:"createTime",label:"登记时间",filter:i.g6,minWidth:160},{prop:"remark",label:"备注",minWidth:150}];var p={name:"SparePartsRecord",data(){return{activeName:"stock",formConfig:[{type:"datePicker",label:"登记时间",dateType:"datetimerange",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-ddTHH:mm:ss",rangeSeparator:"-",startPlaceholder:"开始时间",endPlaceholder:"结束时间",param:"timeVal",defaultSelect:[],width:350},{type:"select",label:"类型",selectOptions:JSON.parse(localStorage.getItem("publicList")).materialVoList,labelField:"dataName",valueField:"dataCode",param:"stockType",defaultSelect:"",width:100},{type:"select",label:"产线",selectOptions:JSON.parse(localStorage.getItem("publicList")).proLineVoList,param:"proLineId",labelField:"dataName",valueField:"dataCode",defaultSelect:"",width:100},{type:"select",label:"备件类别",selectOptions:JSON.parse(localStorage.getItem("publicList")).sparePartsTypeList,param:"type",labelField:"dataName",valueField:"dataName",defaultSelect:"",width:150},{type:"input",label:"备件名称",placeholder:"备件名称",param:"sparePartName"},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"button",btnName:"重置",name:"reset"},{type:"separate"},{type:"button",btnName:"导出",name:"export",color:"primary",plain:!0}],tableProps:s,tableData:[],tableH:(0,i.NC)(320),total:0,listQuery:{current:1,size:20}}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,i.NC)(320)})),this.formConfig[0].defaultSelect=[l()().format("yyyy-MM-DD")+"T00:00:00",l()().format("yyyy-MM-DD")+"T23:59:59"],this.listQuery.startTime=l()().format("yyyy-MM-DD")+"T00:00:00",this.listQuery.endTime=l()().format("yyyy-MM-DD")+"T23:59:59",this.getList()},methods:{getList(){(0,o.OT)({...this.listQuery}).then((t=>{0===t.code&&(this.total=t.data.total,this.tableData=t.data.records)}))},buttonClick(t){console.log(t),"search"===t.btnName?(this.listQuery.startTime=t.timeVal?t.timeVal[0]:"",this.listQuery.endTime=t.timeVal?t.timeVal[1]:"",this.listQuery.stockType=t.stockType,this.listQuery.proLineId=t.proLineId,this.listQuery.type=t.type,this.listQuery.sparePartName=t.sparePartName,this.listQuery.current=1,this.getList()):"reset"===t.btnName?(this.$refs.searchBarForm.resetForm(),this.formConfig[0].defaultSelect=[],this.listQuery.startTime="",this.listQuery.endTime="",this.listQuery.stockType="",this.listQuery.proLineId="",this.listQuery.type="",this.listQuery.sparePartName="",this.listQuery.current=1,this.getList()):"export"===t.btnName&&(this.listQuery.startTime=t.timeVal?t.timeVal[0]:"",this.listQuery.endTime=t.timeVal?t.timeVal[1]:"",this.listQuery.stockType=t.stockType,this.listQuery.proLineId=t.proLineId,this.listQuery.type=t.type,this.listQuery.sparePartName=t.sparePartName,(0,o.co)({...this.listQuery}).then((t=>{console.log(t);let e="";const n=t.headers["content-disposition"];n&&(e=decodeURIComponent(n.slice(n.indexOf("filename=")+9)));const a=new Blob([t.data]),r=new FileReader;r.readAsDataURL(a),r.onload=t=>{const n=document.createElement("a");n.download=e,n.href=t.target.result,document.body.appendChild(n),n.click(),document.body.removeChild(n)}})))}}},m=p,c=n(1001),d=(0,c.Z)(m,a,r,!1,null,"02d6b653",null),f=d.exports},147:function(t,e,n){n.d(e,{$7:function(){return W},$F:function(){return y},$N:function(){return L},$d:function(){return c},A5:function(){return Q},Ah:function(){return o},Dr:function(){return f},HJ:function(){return s},Im:function(){return P},KK:function(){return D},KQ:function(){return q},Ko:function(){return w},Ku:function(){return h},OP:function(){return l},OT:function(){return b},UP:function(){return M},Uw:function(){return I},YG:function(){return N},bO:function(){return m},co:function(){return g},fK:function(){return Z},h:function(){return C},jL:function(){return A},lJ:function(){return d},lZ:function(){return u},pl:function(){return T},rd:function(){return p},uN:function(){return i},yx:function(){return S},zG:function(){return k},zh:function(){return r}});var a=n(8859);function r(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/get",method:"post",data:t})}function i(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/getPlan",method:"post",data:t})}function o(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/updatePlan",method:"post",data:t})}function u(t){return(0,a.Z)({url:"/equipment/PalletIndicatorAnalysis/page",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/equipment/PalletIndicatorAnalysis/getType",method:"post",data:t})}function s(t){return(0,a.Z)({url:"/equipment/SparePartStock/page",method:"post",data:t})}function p(t){return(0,a.Z)({url:"/equipment/SparePartStock/inStock",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/equipment/SparePartStock/get",method:"post",data:t})}function c(t){return(0,a.Z)({url:"/equipment/SparePartStock/update",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/equipment/SparePartStock/outStock",method:"post",data:t})}function f(t){return(0,a.Z)({url:"/equipment/SparePartStock/stockDetail",method:"post",data:t})}function h(t){return(0,a.Z)({url:"/equipment/SparePartStock/getBatchList",method:"post",data:t})}function y(t){return(0,a.Z)({url:"/equipment/SparePartStock/export",method:"post",responseType:"blob",data:t,timeout:6e4})}function b(t){return(0,a.Z)({url:"/equipment/SparePartStock/PageHis",method:"post",data:t})}function g(t){return(0,a.Z)({url:"/equipment/SparePartStock/exportHis",method:"post",responseType:"blob",data:t,timeout:6e4})}function M(t){return(0,a.Z)({url:"/equipment/MaintainManage/pageSelect",method:"post",data:t})}function S(t){return(0,a.Z)({url:"/equipment/MaintainManage/unDistributeGet",method:"post",data:t})}function P(t){return(0,a.Z)({url:"/equipment/MaintainManage/create",method:"post",data:t})}function Z(t){return(0,a.Z)({url:"/equipment/MaintainManage/unDistribute",method:"post",data:t})}function Q(t){return(0,a.Z)({url:"/equipment/MaintainManage/completedDistribute",method:"post",data:t})}function k(t){return(0,a.Z)({url:"/equipment/MaintainManage/dispatch",method:"post",data:t})}function q(t){return(0,a.Z)({url:"/equipment/MaintainManage/confirm",method:"post",data:t})}function T(t){return(0,a.Z)({url:"/equipment/MaintainManage/PlainMaintainDelete",method:"post",data:t})}function N(t){return(0,a.Z)({url:"/equipment/MaintainManage/PlanMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function L(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainPageSelect",method:"post",data:t})}function C(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainAdd",method:"post",data:t})}function D(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainModify",method:"post",data:t})}function A(t){return(0,a.Z)({url:"/equipment/MaintainManage/AUtoMaintainDelete",method:"post",data:t})}function W(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function w(t){return(0,a.Z)({url:"/equipment/AlarmMessage/nowAlertSelect",method:"post",data:t})}function I(t){return(0,a.Z)({url:"/equipment/AlarmMessage/historyAlertSelect",method:"post",data:t})}}}]); |