|
|
|
|
@ -29,24 +29,33 @@ |
|
|
|
|
@selection-change="selectionChangeProject" |
|
|
|
|
@select="selectChange" |
|
|
|
|
v-loading="tableLoading" |
|
|
|
|
:height="tableHeight" |
|
|
|
|
> |
|
|
|
|
<el-table-column type="selection" fixed></el-table-column> |
|
|
|
|
<el-table-column label="移交类型" prop="paCode" align="center" width="120"> |
|
|
|
|
<el-table-column label="移交类型" prop="hrTypeBool" align="center" width="120"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input v-model="scope.row.woCode" placeholder="请输入"></el-input> |
|
|
|
|
<!-- <el-input v-model="scope.row.woCode" placeholder="请输入"></el-input> --> |
|
|
|
|
<el-select v-model="scope.row.hrTypeBool" disabled placeholder="请选择" clearable> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in descriptionList" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="转交部门" prop="paCode" align="center" width="100"> |
|
|
|
|
<el-table-column label="转交部门" prop="useDept" align="center" width="100"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>转交部门</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="下级B号" prop="paCode" align="center" width="120"> |
|
|
|
|
<el-table-column label="下级B号" prop="roamNoNext" align="center" width="120"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="下级B号名称" prop="paCode" align="center" width="120"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="单号" prop="paCode" align="center" width="120"> </el-table-column> |
|
|
|
|
<el-table-column label="车间订单" prop="woCode" align="center" width="100"> |
|
|
|
|
<!--<el-table-column label="下级B号名称" prop="paCode" align="center" width="120"> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
<!-- <el-table-column label="单号" prop="paCode" align="center" width="120"> </el-table-column> --> |
|
|
|
|
<el-table-column label="车间订单" prop="woCode" align="center" width="170"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="批次号" prop="batchNo" align="center" width="120"></el-table-column> |
|
|
|
|
<el-table-column |
|
|
|
|
@ -55,19 +64,25 @@ |
|
|
|
|
align="center" |
|
|
|
|
width="120" |
|
|
|
|
></el-table-column> |
|
|
|
|
<el-table-column label="出库班组/供应商" prop="teamCode" width="200" align="center"> |
|
|
|
|
<el-table-column label="入库班组/供应商" prop="teamCode" width="200" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="入库工序号" prop="processCode" align="center" width="100"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="入库工序名称" prop="processName" align="center" width="120"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="出库工序号" prop="processCode" align="center" width="100"> |
|
|
|
|
<el-table-column label="下序号" prop="nextProcessCode" align="center" width="120"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="出库工序名称" prop="ppsName" align="center" width="120"> |
|
|
|
|
<el-table-column label="下序名称" prop="nextProcessName" align="center" width="120"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="下序号" prop="nextOrders" align="center" width="120"> |
|
|
|
|
<el-table-column label="下序班组/供应商" prop="nextTeamCode" width="200" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="下序名称" prop="nextPpsName" align="center" width="120"> |
|
|
|
|
<el-table-column label="入库数量" prop="inQuantity" align="center" width="120"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="下序班组/供应商" prop="nextTsName" width="200" align="center"> |
|
|
|
|
<el-table-column label="重量" prop="weight" align="center" width="120"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input v-model="scope.row.weight" placeholder="请输入"></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="出库数量" prop="quantity" align="center"> </el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
@ -95,6 +110,17 @@ export default { |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
tableHeight: 400, |
|
|
|
|
descriptionList: [ |
|
|
|
|
{ |
|
|
|
|
label: '入库', |
|
|
|
|
value: 1, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '转工', |
|
|
|
|
value: 0, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
sunmitLoading: false, |
|
|
|
|
tableLoading: false, |
|
|
|
|
formError: '', |
|
|
|
|
@ -145,8 +171,32 @@ export default { |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() {}, |
|
|
|
|
mounted() { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.calculateTableHeight(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 计算表格高度 |
|
|
|
|
calculateTableHeight() { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
const dialogContainer = document.querySelector('.el-dialog__body'); |
|
|
|
|
if (!dialogContainer) return; |
|
|
|
|
|
|
|
|
|
const containerHeight = dialogContainer.clientHeight; |
|
|
|
|
|
|
|
|
|
// 减去其他元素高度 |
|
|
|
|
const inputAreaHeight = 50; |
|
|
|
|
const errorHeight = 30; |
|
|
|
|
const formPadding = 40; |
|
|
|
|
const footerHeight = 10; |
|
|
|
|
|
|
|
|
|
const calculatedHeight = |
|
|
|
|
containerHeight - inputAreaHeight - errorHeight - formPadding - footerHeight; |
|
|
|
|
|
|
|
|
|
this.tableHeight = Math.max(300, Math.min(calculatedHeight, 800)); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
open() { |
|
|
|
|
this.cardNo = ''; |
|
|
|
|
this.form.beforePlatingEntryData = []; |
|
|
|
|
@ -155,7 +205,8 @@ export default { |
|
|
|
|
this.tableLoading = true; |
|
|
|
|
getAfterPlatCardNo({ cardNo: this.cardNo }) |
|
|
|
|
.then(res => { |
|
|
|
|
this.form.beforePlatingEntryData = res.data; |
|
|
|
|
this.form.beforePlatingEntryData.push(res.data.data); |
|
|
|
|
this.tableLoading = false; |
|
|
|
|
}) |
|
|
|
|
.catch(err => { |
|
|
|
|
this.tableLoading = false; |
|
|
|
|
@ -190,10 +241,24 @@ export default { |
|
|
|
|
const { _select, ...validData } = row; // 剔除选择状态字段 |
|
|
|
|
return validData; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.sunmitLoading = true; |
|
|
|
|
|
|
|
|
|
// 调用接口提交(实际项目替换) |
|
|
|
|
try { |
|
|
|
|
savePlateAroundPlateAfterEnter(this.form.beforePlatingEntryData) |
|
|
|
|
let query = []; |
|
|
|
|
this.form.beforePlatingEntryData.forEach(item => { |
|
|
|
|
query.push({ |
|
|
|
|
wpId: item.wpId, |
|
|
|
|
tsId: item.teamId, |
|
|
|
|
ocId: item.ocId ? item.ocId : null, |
|
|
|
|
quantity: item.inQuantity, |
|
|
|
|
hrTypeBool:item.hrTypeBool, |
|
|
|
|
useDept:item.useDept, |
|
|
|
|
weight:item.weight |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
savePlateAroundPlateAfterEnter(query) |
|
|
|
|
.then(res => { |
|
|
|
|
this.$message.success('提交成功'); |
|
|
|
|
this.closeDialog(); |
|
|
|
|
|