|
|
|
@ -1,11 +1,38 @@ |
|
|
|
<template> |
|
|
|
<div class="customer-css"> |
|
|
|
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners" |
|
|
|
width="755px" style="height: 530px;" class="customer-dialog"> |
|
|
|
width="755px" style="height: 560px;" class="customer-dialog"> |
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" style="height: 400px;" |
|
|
|
label-width="80px"> |
|
|
|
<fieldset class="customer-fieldset" style="width: 730px;"> |
|
|
|
<el-table height="100" |
|
|
|
:data="orderPartList" |
|
|
|
border ref="orderPartTable" highlight-current-row |
|
|
|
v-loading="dataListLoading" |
|
|
|
@current-change="changePartRow" |
|
|
|
style="width: 730px; margin-left: 0px; margin-top: 0px;"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnPartArray" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed" |
|
|
|
:width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!--<el-input type="number" class="table-input" align="right" @blur="checkValidQty(scope.row)"--> |
|
|
|
<el-input type="number" class="table-input" align="right" v-if="item.columnHidden" |
|
|
|
v-model="scope.row[item.columnProp]"></el-input> |
|
|
|
<span v-else>{{scope.row[item.columnProp]}}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-row style="margin-left: 5px; margin-top: -5px;"> |
|
|
|
<el-col :span="4" > |
|
|
|
<el-form-item :label="''"> |
|
|
|
@ -65,7 +92,7 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
<el-table height="300" |
|
|
|
<el-table height="200" |
|
|
|
:data="sfdcMaterialList" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
@ -94,7 +121,7 @@ |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer" > |
|
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
|
<el-button type="primary" @click="closeDialog" style="margin-bottom: 5px;">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<!--列表的组件--> |
|
|
|
@ -107,6 +134,7 @@ |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/ |
|
|
|
/*js请求*/ |
|
|
|
import { |
|
|
|
getSplitOrderParts,/*获取分切工单的物料信息*/ |
|
|
|
refreshCurrentPageData, |
|
|
|
refreshCurrentPageTable, |
|
|
|
checkCreateSeparateRoll,/*检查是否可以创建分卷*/ |
|
|
|
@ -136,6 +164,7 @@ export default { |
|
|
|
supplierName: '', |
|
|
|
rollQty: 0, |
|
|
|
rollNums: 1, |
|
|
|
bomItemNo: 0, |
|
|
|
splitType: 'S' |
|
|
|
}, |
|
|
|
operatorData: { |
|
|
|
@ -147,14 +176,89 @@ export default { |
|
|
|
seqNo: '', |
|
|
|
showFlag: false |
|
|
|
}, |
|
|
|
orderPartList: [], |
|
|
|
columnPartArray: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5303, |
|
|
|
serialNumber: '5309PartBomItemNo', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "bomItemNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "行号", |
|
|
|
columnWidth: '', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5305, |
|
|
|
serialNumber: '5309PartPartNo', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "partNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "物料编码", |
|
|
|
columnWidth: '', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5305, |
|
|
|
serialNumber: '5309PartPartDesc', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "partDesc", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "物料描述", |
|
|
|
columnWidth: '', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5305, |
|
|
|
serialNumber: '5309PartOrderQty', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "orderQty", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "数量", |
|
|
|
columnWidth: '', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
], |
|
|
|
sfdcMaterialList: [], |
|
|
|
columnMaterialArray: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5303, |
|
|
|
serialNumber: '5303MaterialRollNo', |
|
|
|
tableId: "5303Material", |
|
|
|
tableName: "材料", |
|
|
|
serialNumber: '5309PartRollNo', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "rollNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -170,9 +274,9 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5305, |
|
|
|
serialNumber: '5305MaterialRollQty', |
|
|
|
tableId: "5305Material", |
|
|
|
tableName: "材料", |
|
|
|
serialNumber: '5309PartRollQty', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "rollQty", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -188,9 +292,9 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5305, |
|
|
|
serialNumber: '5305MaterialSuppDeliveryNote', |
|
|
|
tableId: "5305Material", |
|
|
|
tableName: "材料", |
|
|
|
serialNumber: '5309PartSuppDeliveryNote', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "suppDeliveryNote", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -206,9 +310,9 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5305, |
|
|
|
serialNumber: '5305MaterialRollDate', |
|
|
|
tableId: "5305Material", |
|
|
|
tableName: "材料", |
|
|
|
serialNumber: '5309PartRollDate', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "rollDate", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -224,9 +328,9 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5305, |
|
|
|
serialNumber: '5305MaterialCreatedDate', |
|
|
|
tableId: "5305Material", |
|
|
|
tableName: "材料", |
|
|
|
serialNumber: '5309PartCreatedDate', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "createdDate", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -242,9 +346,9 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5305, |
|
|
|
serialNumber: '5305MaterialCreatedBy', |
|
|
|
tableId: "5305Material", |
|
|
|
tableName: "材料", |
|
|
|
serialNumber: '5309PartCreatedBy', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "createdBy", |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -260,9 +364,9 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5305, |
|
|
|
serialNumber: '5305MaterialSuppRollNoFlag', |
|
|
|
tableId: "5305Material", |
|
|
|
tableName: "材料", |
|
|
|
serialNumber: '5309PartSuppRollNoFlag', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "suppRollNoFlag", |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -278,9 +382,9 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5305, |
|
|
|
serialNumber: '5305MaterialSuppRollNo', |
|
|
|
tableId: "5305Material", |
|
|
|
tableName: "材料", |
|
|
|
serialNumber: '5309PartSuppRollNo', |
|
|
|
tableId: "5309Part", |
|
|
|
tableName: "分切工单", |
|
|
|
columnProp: "suppRollNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -303,105 +407,116 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
/*初始化页面参数*/ |
|
|
|
init(scheduleData, operatorData) { |
|
|
|
init (scheduleData, operatorData) { |
|
|
|
//设置参数 |
|
|
|
this.pageData.partNo = scheduleData.partNo; |
|
|
|
this.pageData.partDesc = scheduleData.partDesc; |
|
|
|
this.pageData.orderNo = scheduleData.orderNo; |
|
|
|
this.pageData.itemNo = scheduleData.itemNo; |
|
|
|
this.pageData.seqNo = scheduleData.seqNo; |
|
|
|
this.pageData.rollNo = scheduleData.rollNo; |
|
|
|
this.pageData.operatorId = operatorData.operatorId; |
|
|
|
this.pageData.customerId = '无'; |
|
|
|
this.pageData.customerName = ''; |
|
|
|
this.pageData.fgPartNo = '无'; |
|
|
|
this.pageData.fgPartDesc = ''; |
|
|
|
this.pageData.supplierId = '*'; |
|
|
|
this.pageData.supplierName = ''; |
|
|
|
this.pageData.partNo = '' |
|
|
|
this.pageData.partDesc = '' |
|
|
|
this.pageData.orderNo = scheduleData.orderNo |
|
|
|
this.pageData.itemNo = scheduleData.itemNo |
|
|
|
this.pageData.seqNo = scheduleData.seqNo |
|
|
|
this.pageData.rollNo = scheduleData.rollNo |
|
|
|
this.pageData.operatorId = operatorData.operatorId |
|
|
|
this.pageData.customerId = '无' |
|
|
|
this.pageData.customerName = '' |
|
|
|
this.pageData.fgPartNo = '无' |
|
|
|
this.pageData.fgPartDesc = '' |
|
|
|
this.pageData.supplierId = '*' |
|
|
|
this.pageData.supplierName = '' |
|
|
|
//清空列表 |
|
|
|
this.sfdcMaterialList = []; |
|
|
|
this.sfdcMaterialList = [] |
|
|
|
//初始化操作员对象 |
|
|
|
this.operatorData = JSON.parse(JSON.stringify(operatorData)); |
|
|
|
this.operatorData = JSON.parse(JSON.stringify(operatorData)) |
|
|
|
//初始化标题 |
|
|
|
this.titleCon = '创建分卷'; |
|
|
|
this.titleCon = '创建分卷' |
|
|
|
//刷新分切工单的物料信息 |
|
|
|
this.refreshSplitOrderParts(); |
|
|
|
//刷新当前派工单的信息 |
|
|
|
this.refreshPageData(); |
|
|
|
this.refreshPageData() |
|
|
|
}, |
|
|
|
|
|
|
|
/*关闭modal*/ |
|
|
|
closeDialog(){ |
|
|
|
this.$emit('update:visible', false); |
|
|
|
closeDialog () { |
|
|
|
this.$emit('update:visible', false) |
|
|
|
}, |
|
|
|
|
|
|
|
/*刷新分期工单的*/ |
|
|
|
refreshSplitOrderParts () { |
|
|
|
getSplitOrderParts(this.pageData).then(({data}) => { |
|
|
|
this.orderPartList = data.rows; |
|
|
|
setTimeout(() => { |
|
|
|
this.$refs.orderPartTable.setCurrentRow(this.orderPartList[0]); |
|
|
|
}, 300) |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*刷新当前的页面参数*/ |
|
|
|
refreshPageData(){ |
|
|
|
refreshPageData () { |
|
|
|
//获取页面显示的参数 |
|
|
|
this.getCurrentPageData(); |
|
|
|
this.getCurrentPageData() |
|
|
|
//刷新页面的table数据 |
|
|
|
this.getCurrentPageTable(); |
|
|
|
this.getCurrentPageTable() |
|
|
|
}, |
|
|
|
|
|
|
|
//获取当前页面的参数 |
|
|
|
getCurrentPageData(){ |
|
|
|
getCurrentPageData () { |
|
|
|
refreshCurrentPageData(this.pageData).then(({data}) => { |
|
|
|
//填充数据 |
|
|
|
this.pageData.customerId = data.pageMap.customerId; |
|
|
|
this.pageData.customerName = data.pageMap.customerName; |
|
|
|
this.pageData.fgPartNo = data.pageMap.fgPartNo; |
|
|
|
this.pageData.fgPartDesc = data.pageMap.fgPartDesc; |
|
|
|
this.pageData.referName = data.pageMap.referName; |
|
|
|
this.pageData.supplierId = data.pageMap.supplierId; |
|
|
|
this.pageData.supplierName = data.pageMap.supplierDesc; |
|
|
|
}); |
|
|
|
this.pageData.customerId = data.pageMap.customerId |
|
|
|
this.pageData.customerName = data.pageMap.customerName |
|
|
|
this.pageData.fgPartNo = data.pageMap.fgPartNo |
|
|
|
this.pageData.fgPartDesc = data.pageMap.fgPartDesc |
|
|
|
this.pageData.referName = data.pageMap.referName |
|
|
|
this.pageData.supplierId = data.pageMap.supplierId |
|
|
|
this.pageData.supplierName = data.pageMap.supplierDesc |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//刷新当前页面的表格数据 |
|
|
|
getCurrentPageTable(){ |
|
|
|
getCurrentPageTable () { |
|
|
|
refreshCurrentPageTable(this.pageData).then(({data}) => { |
|
|
|
this.sfdcMaterialList = data.rows; |
|
|
|
}); |
|
|
|
this.sfdcMaterialList = data.rows |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*列表方法的回调*/ |
|
|
|
getBaseData(val){ |
|
|
|
if (this.tagNo === 92){ |
|
|
|
this.pageData.customerId = val.ConfigurationTemplateID; |
|
|
|
this.pageData.customerName = val.CustDesc; |
|
|
|
}else if(this.tagNo == 5){ |
|
|
|
this.pageData.fgPartNo = val.PartNo; |
|
|
|
this.pageData.fgPartDesc = val.PartDescSpec; |
|
|
|
getBaseData (val) { |
|
|
|
if (this.tagNo === 92) { |
|
|
|
this.pageData.customerId = val.ConfigurationTemplateID |
|
|
|
this.pageData.customerName = val.CustDesc |
|
|
|
} else if (this.tagNo == 5) { |
|
|
|
this.pageData.fgPartNo = val.PartNo |
|
|
|
this.pageData.fgPartDesc = val.PartDescSpec |
|
|
|
} |
|
|
|
//触发页面参数初始化 |
|
|
|
this.getCurrentPageData(); |
|
|
|
this.getCurrentPageData() |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取基础数据列表 |
|
|
|
getBaseList(val){ |
|
|
|
getBaseList (val) { |
|
|
|
this.tagNo = val |
|
|
|
this.$nextTick(() => { |
|
|
|
let strVal = ""; |
|
|
|
if (val === 92){ |
|
|
|
strVal = this.pageData.customerId; |
|
|
|
}else if(val === 5){ |
|
|
|
strVal = this.pageData.fgPartNo; |
|
|
|
let strVal = '' |
|
|
|
if (val === 92) { |
|
|
|
strVal = this.pageData.customerId |
|
|
|
} else if (val === 5) { |
|
|
|
strVal = this.pageData.fgPartNo |
|
|
|
} |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//首先检查是否可以创建分卷 |
|
|
|
checkCreateSeparateRoll(){ |
|
|
|
checkCreateSeparateRoll () { |
|
|
|
//调用创建分卷的方法 |
|
|
|
checkCreateSeparateRoll(this.pageData).then(({data}) => { |
|
|
|
//判断操作是否成功 |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} else { |
|
|
|
//调用创建分卷的方法 |
|
|
|
this.createSeparateRollBun(); |
|
|
|
this.createSeparateRollBun() |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/*处理材料下料的记录*/ |
|
|
|
@ -452,12 +567,23 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*触发修改的时间*/ |
|
|
|
changePartRow(row, oldRow){ |
|
|
|
//判断是否是获取焦点的事件 |
|
|
|
if(row){ |
|
|
|
this.pageData.partNo = row.partNo; |
|
|
|
this.pageData.partDesc = row.partDesc; |
|
|
|
//触发刷新当前页面参数的操作 |
|
|
|
this.refreshPageData(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
created() { |
|
|
|
// |
|
|
|
} |
|
|
|
//刷新分切工单的物料信息 |
|
|
|
//this.refreshSplitOrderParts(); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
|