1 line
9.1 KiB
JavaScript
1 line
9.1 KiB
JavaScript
|
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[2033],{2033:function(t,e,a){a.r(e),a.d(e,{default:function(){return h}});var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-box"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick,"select-changed":t.selectChanged}}),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:t.getList}})],1)},n=[],i=a(475),o=a(4770),u=a(910),l=a(381),s=a.n(l);const d=[{prop:"type",label:"类型",minWidth:120,filter:(0,i.fW)("materialVoList")},{prop:"line",label:"产线",minWidth:120},{prop:"sidelibraryName",label:"所属线边库",minWidth:120},{prop:"materialName",label:"耗材名称",minWidth:150},{prop:"spec",label:"规格",minWidth:150},{prop:"batchCode",label:"批次编码",minWidth:140},{prop:"num",label:"数量",minWidth:100},{prop:"unit",label:"单位",minWidth:100},{prop:"supplier",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 c={name:"InAndOutRecords",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:"type",defaultSelect:"",width:100},{type:"select",label:"产线",selectOptions:JSON.parse(localStorage.getItem("publicList")).proLineVoList,labelField:"dataName",valueField:"dataName",onchange:!0,param:"line",defaultSelect:"",width:100},{type:"select",label:"线边库名称",selectOptions:[],param:"sidelibraryName",labelField:"name",valueField:"name",defaultSelect:"",width:180},{type:"select",label:"耗材名称",selectOptions:[],param:"materialName",labelField:"name",valueField:"name",defaultSelect:"",width:180},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"button",btnName:"重置",name:"reset"}],tableProps:d,tableData:[],tableH:(0,i.NC)(275),total:0,listQuery:{current:1,size:20}}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,i.NC)(275)})),this.formConfig[0].defaultSelect=[s()().format("yyyy-MM-DD")+"T00:00:00",s()().format("yyyy-MM-DD")+"T23:59:59"],this.listQuery.startTime=s()().format("yyyy-MM-DD")+"T00:00:00",this.listQuery.endTime=s()().format("yyyy-MM-DD")+"T23:59:59",this.getMaterialList(),this.getList()},methods:{getList(){(0,o.jp)({...this.listQuery}).then((t=>{0===t.code&&(this.total=t.data.total,this.tableData=t.data.records)}))},selectChanged(t){if(t.value){let e=null,a=JSON.parse(localStorage.getItem("publicList")).proLineVoList;a&&a.map((a=>{a.dataName===t.value&&(e=a.dataCode)})),(0,u.A0)({id:e}).then((t=>{0===t.code&&(this.formConfig[0].defaultSelect=this.$refs.searchBarForm.formInline.timeVal,this.formConfig[3].selectOptions=t.data,this.formConfig[3].defaultSelect=null)}))}},getMaterialList(){(0,u._1)().then((t=>{0===t.code&&(this.formConfig[4].selectOptions=t.data)}))},buttonClick(t){"search"===t.btnName?(this.listQuery.startTime=t.timeVal?t.timeVal[0]:"",this.listQuery.endTime=t.timeVal?t.timeVal[1]:"",this.listQuery.type=t.type,this.listQuery.line=t.line,this.listQuery.sidelibraryName=t.sidelibraryName,this.listQuery.materialName=t.materialName,this.listQuery.current=1,this.getList()):"reset"===t.btnName&&(this.formConfig[0].defaultSelect=[],this.$refs.searchBarForm.resetForm(),this.listQuery.startTime="",
|