Commit 9838e398 authored by zhangyichen's avatar zhangyichen

修改bug

parent 7af404a0
// 生产模型api
import request from '@/utils/request'
import Qs from 'qs'
// 分页查询列表
export function listModel(query) {
......@@ -35,3 +36,14 @@ export function queryNltIfsMaterialCopyByPagination(query) {
params: query
})
}
// 修改生产模型状态
export function updateStatus(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/nltmodel/updateStatus/' + businessId,
method: 'put',
data
})
}
......@@ -1000,9 +1000,15 @@ export default {
},
// 返回模型页面
cancelPosition() {
this.$router.push({
name: '/productionInfo/ProductionModel'
})
if (this.htmlType === '2') {
this.$router.push({
name: '/ProductionProcess/workOrder'
})
} else {
this.$router.push({
name: '/productionInfo/ProductionModel'
})
}
},
// 确定返回模型页面
submitPosition() {
......
......@@ -108,7 +108,7 @@
</el-table-column>
<el-table-column
align="center"
width="300"
width="200"
class-name="small-padding fixed-width"
>
<template slot="header">
......@@ -122,12 +122,6 @@
style="margin-left: 10px"
@click="handleUpdate(scope.row)"
>修改</el-link>
<el-link
size="mini"
type="danger"
style="margin-left: 10px"
@click="handleCopy(scope.row)"
>复制</el-link>
<el-link
size="mini"
type="danger"
......@@ -136,10 +130,10 @@
>删除</el-link>
<el-link
size="mini"
type="danger"
type="success"
style="margin-left: 10px"
@click="handleQueryInfo(scope.row)"
>详情</el-link>
@click="handleCopy(scope.row)"
>复制</el-link>
</template>
</el-table-column>
</el-table>
......@@ -236,7 +230,7 @@
</template>
<script>
import { listModel, deleteLogicalId, queryCopyNltModels, queryNltIfsMaterialCopyByPagination } from '@/api/model'
import { listModel, deleteLogicalId, queryCopyNltModels, queryNltIfsMaterialCopyByPagination, updateStatus } from '@/api/model'
export default {
name: 'ProductionModel',
data() {
......@@ -271,6 +265,29 @@ export default {
this.getList()
},
methods: {
handleStatusChange(row) {
const params = {
businessId: row.businessId,
flag: row.flag
}
this.$confirm('确定' + (row.flag === '1' ? '启用' : '停用') + '该生产模型?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateStatus(params).then(res => {
this.$message({
type: 'success',
message: '修改成功!'
})
this.getList()
}).catch(_ => {
row.flag = row.flag === '1' ? '0' : '1'
})
}).catch(() => {
row.flag = row.flag === '1' ? '0' : '1'
})
},
// 确定关闭选择成品料号弹窗
submitChoicePart() {
if (this.addMaterialList.length < 1) {
......
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