Commit 24c6802b authored by 沈翠玲's avatar 沈翠玲

生产管理->生产工单

parent f8046a21
......@@ -48,7 +48,7 @@
<el-table v-loading="loading" :data="qctemplateList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
<el-table-column width="50" align="center" >
<template v-slot="scope">
<el-radio v-model="selectedIndexId" :label="scope.row.templateId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
<el-radio v-model="selectedIndexId" :label="scope.row.id" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template>
</el-table-column>
<el-table-column label="检测模板编号" align="center" prop="templateCode" >
......
......@@ -1007,6 +1007,9 @@ export default {
},
};
},
activated () {
this.getList();
},
created() {
this.getList();
},
......@@ -1290,7 +1293,7 @@ export default {
handleSelectionChange(selection) {
// this.selectedRows = val;
this.selectedRows = selection;
this.ids = selection.map(item => item.toolId)
this.ids = selection.map(item => item.workorderId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
......@@ -1313,6 +1316,7 @@ export default {
this.reset();
const workorderId = row.workorderId || this.ids;
console.log('workorderId', workorderId, this.ids)
this.$router.push("/mes/pro/workorder/edit?workorderId=" + workorderId);
// this.reset();
......
......@@ -35,7 +35,7 @@
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="申请单编码" prop="workorderCode">
<el-form-item label="单编码" prop="workorderCode">
<el-input
disabled
v-model="form.workorderCode"
......@@ -64,9 +64,9 @@
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="生产版本" prop="productionSolutionCode">
<el-form-item label="生产版本" prop="group">
<el-input
v-model="form.productionSolutionCode"
v-model="form.group"
readonly
:disabled="mode == 'make'"
placeholder="请选择工艺路线"
......@@ -365,6 +365,8 @@ export default {
workorderCode: null,
workorderName: null,
routeName: null,
groupKey: null,
groupCounter: null,
workorderType: "product",
orderSource: null,
sourceCode: null,
......@@ -401,6 +403,7 @@ export default {
packNum: null,
productionSolutionId: null,
productionSolutionCode: null,
group: null,
productionSolutionName: null,
},
// 表单校验
......@@ -469,7 +472,6 @@ export default {
this.bomList = []
const bomList = this.currentData.bomList.map((item,index) => {
// console.log(item, 'items')
console.log(this.currentData.quantity, 'this.currentData.quantity')
let quantity = parseInt(this.form.quantity*item.quantity*100/this.currentData.quantity)
// console.log(quantity, 'quantity')
return {
......@@ -477,7 +479,6 @@ export default {
quantity: quantity/100
}
})
console.log(bomList, 'bomList')
this.bomList = bomList
this.$refs["ProogingBomRef"].tableData = bomList
}
......@@ -507,7 +508,6 @@ export default {
});
} else if(this.mode === 'make') {
getMakeWorkorderCode(this.form.parentCode).then(res => {
console.log(res, 88899)
if (res.code === 200) {
this.form.workorderCode = res.data.code
}
......@@ -577,7 +577,9 @@ export default {
this.loading = true;
getWorkorder(id)
.then(({ data }) => {
Object.assign(this.form, data);
this.form.group = `${this.form.groupCounter ? this.form.groupCounter: ''}-${this.form.groupKey ? this.form.groupKey: ''}`
this.currentData = {}
if (this.mode == 'make') {
this.currentData = data
......@@ -630,11 +632,13 @@ export default {
//物料选择弹出框
onRoutesProcessSelect(row) {
console.log(row, 'rows444')
if (row != undefined && row != null) {
this.form.productionSolutionId = row.productionSolutionId;
this.form.productionSolutionCode = row.productionSolutionCode;
this.form.group = `${row.groupCounter ? row.groupCounter: ''}-${row.groupKey ? row.groupKey: ''}`
this.form.productCode = row.itemCode;
this.form.groupCounter = row.groupCounter;
this.form.groupKey = row.groupKey;
this.form.productName = row.itemName;
const params = {
pageNum: 1,
......@@ -659,6 +663,7 @@ export default {
saleList,
sizeList,
};
delete params.group
this.$refs.form.validate( valid => {
if (valid) {
this.loading = true;
......@@ -731,6 +736,8 @@ export default {
quantityChanged: null,
quantityScheduled: null,
clientId: null,
groupKey: null,
groupCounter: null,
clientCode: null,
clientName: null,
vendorId: null,
......@@ -747,6 +754,7 @@ export default {
packType: null,
packUnitOfMeasure: null,
lossIndividuallyWrap: null,
group: null,
packNum: null,
};
this.$refs["ProogingBomRef"].resetState();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment