tft-fe/dist/js/919.a340f7da.js

1 line
8.5 KiB
JavaScript
Raw Normal View History

2023-06-28 17:05:34 +08:00
"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.proLineI