1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
|
webpackJsonp([319],{KoWT:function(t,e){},PbYN:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("mvHQ"),i=a.n(s),l=a("Dd8w"),o=a.n(l),n=a("ysqt"),r=a("NYxO"),c=a("OG67"),h=(a("t4zo"),a("bzuE")),u={components:{btnInput:n.a,dialogChooseSingleParts:c.a},data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:20},config:h.a,accountNumberList:[],settlementTypeList:[],tableData:[],paymentReceivedIds:[],btndisable:!0,prDate:"",dialogTitle:"",time:"",selectDeptId:"",formDataTime:"",auditSignList:[],companyList:[],createByList:[],depOptions:[],formData:{},usingList:[],typeList:[],btnDelDisabled:!0,btnOtherDisabled:!0,chooseClientrVisible:!1,dialogLoading:!1,chooseUserVisible:!1,chooseMaterielVisible:!1,columnSetDialogVisible:!1,advanceQueryDialogVisible:!1,chooseSupplierVisible:!1,columnSetDialogTitle:"设置显示字段列表",tableId:"smartManufacturing_productionBatch1_table",pictLoading:!1,showTableColumnsDefault:[{title:"追溯方向",prop_:"way",select:!0},{title:"单据类型",prop_:"typeName",select:!0},{title:"物料代码",prop_:"serialNo",select:!0},{title:"物料名称",prop_:"materielName",select:!0},{title:"规格型号",prop_:"specification",select:!0},{title:"计量单位",prop_:"unitUomName",select:!0},{title:"批号",prop_:"batch",select:!0},{title:"数量",prop_:"count",select:!0},{title:"单据日期",prop_:"time",select:!0}],showTableColumns:[{title:"追溯方向",prop_:"way",select:!0},{title:"单据类型",prop_:"typeName",select:!0},{title:"物料代码",prop_:"serialNo",select:!0},{title:"物料名称",prop_:"materielName",select:!0},{title:"规格型号",prop_:"specification",select:!0},{title:"计量单位",prop_:"unitUomName",select:!0},{title:"批号",prop_:"batch",select:!0},{title:"数量",prop_:"count",select:!0},{title:"单据日期",prop_:"time",select:!0}],showTableColumnsTemp:[],formTableData:[]}},created:function(){var t=this;document.onkeydown=function(e){"Enter"===e.key&&t.search()}},computed:o()({},Object(r.c)({userInfo:"user/getUserInfo"})),mounted:function(){this.showTableColumns=JSON.parse(i()(this.showTableColumns)),this.showTableColumnsTemp=JSON.parse(i()(this.showTableColumns)),this.getShowColumns()},methods:{productionBatchGetOut:function(){this.$api.smartManufacturingAPI.productionBatchGetOut(this.search_data).then(function(t){console.log(t)})},getPart:function(t){console.log(t),t?(this.$set(this.search_data,"materielSerialNo",t.serialNo),this.$set(this.search_data,"materielId",t.id)):(this.$set(this.search_data,"materielSerialNo",""),this.$set(this.search_data,"materielId",""))},search:function(){this.search_data.startTime&&this.search_data.endTime&&this.search_data.materielSerialNo?(this.search_data.pageno=1,this.getList()):this.$message({message:"查询时必须选择物料和时间",type:"warning"})},handleSizeChange:function(t){this.search_data.pagesize=t,this.getList()},handleCurrentChange:function(t){this.search_data.pageno=t,this.getList()},getList:function(){var t=this;this.pictLoading=!0,this.$api.smartManufacturingAPI.productionBatch(this.search_data).then(function(e){t.pictLoading=!1,e.data?(t.total=e.total,t.tableData=e.data?e.data:[],t.tableData.forEach(function(t){t.time=/\d{4}-\d{1,2}-\d{1,2}/g.exec(t.time)}),t.tableData.forEach(function(t){"in"==t.way&&(t.way="来源"),"out"==t.way&&(t.way="去向")})):(t.total=0,t.tableData=[])}).catch(function(t){console.log(t)})},addClass:function(t){t.row,t.column;var e=t.rowIndex;t.columnIndex;return"1"===this.tableData[e].sign?"background-color:#E6F7FF":"end"===this.tableData[e].sign?"background-color:#FFF9E8":void 0},showColumnSetDialog:function(){this.columnSetDialogVisible=!0,this.showTableColumnsTemp=JSON.parse(i()(this.showTableColumns))},toUp:function(t){if(0==t.$index)return!1;for(var e=void 0,a=0;a<this.showTableColumns.length;a++)this.showTableColumns[a].prop_==t.row.prop_&&(e=a);var s=this.showTableColumns[e];this.showTableColumns[e]=this.showTableColumns[e-1],this.showTableColumns[e-1]=s,this.$forceUpdate()},toDown:function(t){if(t.$index==this.showTabl
|