Commit 654df9b3 authored by 张伯涛's avatar 张伯涛

生产模型添加包装测试类型,工单作业添加完结,开启按钮

parent 2fc708cf
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
<span>{{ getStatus(scope.row.status) || '-' }}</span> <span>{{ getStatus(scope.row.status) || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="300px" class-name="small-padding fixed-width">
<template slot="header"> <template slot="header">
<div>操作</div> <div>操作</div>
<div>Operate</div> <div>Operate</div>
...@@ -189,6 +189,22 @@ ...@@ -189,6 +189,22 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>编辑生产模型 >编辑生产模型
</el-link> </el-link>
<el-link
v-if="scope.row.status === 1"
size="mini"
type="primary"
style="margin-right: 10px"
@click="handleEnd(scope.row)"
>完结
</el-link>
<el-link
v-if="scope.row.status === 2"
size="mini"
type="primary"
style="margin-right: 10px"
@click="handleOpen(scope.row)"
>开启
</el-link>
<el-link <el-link
v-if="scope.row.status === 1 " v-if="scope.row.status === 1 "
v-hasPermi="['process:workOrder:clearCache']" v-hasPermi="['process:workOrder:clearCache']"
...@@ -893,6 +909,44 @@ export default { ...@@ -893,6 +909,44 @@ export default {
return '已完成' return '已完成'
} }
}, },
/** 开启操作*/
handleOpen(item) {
this.$confirm('您是否确认此操作?', '提示', {
confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel',
cancelButtonClass: 'btn-custom-cancel',
type: 'warning'
}).then(() => {
const businessId = item.orderModelId
clearCache(businessId).then(res => {
if (res.code === 200) {
this.$message({
type: 'success',
message: '缓存清除成功'
})
}
})
})
},
/** 完结操作*/
handleEnd(item) {
this.$confirm('您是否确认此操作?', '提示', {
confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel',
cancelButtonClass: 'btn-custom-cancel',
type: 'warning'
}).then(() => {
const businessId = item.orderModelId
clearCache(businessId).then(res => {
if (res.code === 200) {
this.$message({
type: 'success',
message: '缓存清除成功'
})
}
})
})
},
/** 清除缓存*/ /** 清除缓存*/
handleClear(item) { handleClear(item) {
this.$confirm('您是否确认此操作?', '提示', { this.$confirm('您是否确认此操作?', '提示', {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<el-option <el-option
v-for="dict in modelOption" v-for="dict in modelOption"
:key="dict.dictValue" :key="dict.dictValue"
:disabled="(dict.dictValue === '2' && (positionList.length > 1 || replaceNum > 0 || replaceNum1 > 1))" :disabled="((dict.dictValue === '2' || dict.dictValue === '3') && (positionList.length > 1 || replaceNum > 0 || replaceNum1 > 1))"
:label="dict.dictLabel" :label="dict.dictLabel"
:value="dict.dictValue" :value="dict.dictValue"
/> />
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
class="redBtn" class="redBtn"
type="danger" type="danger"
size="small" size="small"
:disabled="(form.modelType === '2' && positionList.length > 0)" :disabled="( (form.modelType === '2' && positionList.length > 0) ||(form.modelType === '3' && positionList.length > 1))"
@click="addPosition" @click="addPosition"
>添加工站 Add Position</el-button> >添加工站 Add Position</el-button>
</div> </div>
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="(form.modelType !== '2')" v-if="(form.modelType !== '2' && form.modelType !== '3')"
size="mini" size="mini"
type="primary" type="primary"
@click="choiceOne(scope.row)" @click="choiceOne(scope.row)"
...@@ -526,7 +526,7 @@ export default { ...@@ -526,7 +526,7 @@ export default {
return num return num
}, },
addMaterDisabled() { addMaterDisabled() {
if (this.form.modelType === '2') { if (this.form.modelType === '2' || this.form.modelType === '3') {
if (this.configuringList.length > 0) { if (this.configuringList.length > 0) {
return true return true
} }
...@@ -703,7 +703,7 @@ export default { ...@@ -703,7 +703,7 @@ export default {
}, },
// 工单表样式 // 工单表样式
cellClassMater(row) { cellClassMater(row) {
if (this.type !== '3' && this.form.modelType === '2') { if (this.type !== '3' && (this.form.modelType === '2' || this.form.modelType === '3')) {
return 'disabledSelection' return 'disabledSelection'
} else { } else {
return '' return ''
...@@ -1346,6 +1346,13 @@ export default { ...@@ -1346,6 +1346,13 @@ export default {
return return
} }
} }
console.log('aaaaaaaaaaaaa', this.form.modelType, this.addPositionListOne[0].staType,this.positionList)
if (this.form.modelType === '3' && this.positionList.length === 1) {
if (this.addPositionListOne[0].staType !== '1') {
this.$message.error('包装测试的第二工站必须为测试工站')
return
}
}
this.addPositionListOne.forEach(item => { this.addPositionListOne.forEach(item => {
item.nltModelStationMaters = [] item.nltModelStationMaters = []
item.staId = item.businessId item.staId = item.businessId
...@@ -1367,6 +1374,12 @@ export default { ...@@ -1367,6 +1374,12 @@ export default {
return return
} }
} }
if (this.form.modelType === '3' && index === 1) {
if (this.addPositionListOne[0].staType !== '1') {
this.$message.error('包装测试的第二工站必须为测试工站')
return
}
}
const data = { const data = {
...item, ...item,
...this.addPositionListOne[0] ...this.addPositionListOne[0]
......
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