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

生产管理->生产工单

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