Commit c937f05f authored by zhangyichen's avatar zhangyichen

完善生产模型

parent 25cc6096
......@@ -9,3 +9,11 @@ export function listModel(query) {
params: query
})
}
// 删除
export function deleteLogicalId(data) {
return request({
url: '/nltmodel/deleteLogical/' + data.businessId,
method: 'delete',
})
}
......@@ -455,7 +455,9 @@ export default {
// 物料查询类型
materQueryType: '',
// 替换物料时 禁用自己的id判断
disabledId: ''
disabledId: '',
// 物料已被选中但是可编辑多选且提前查的id组 用于回显替换物料 状态1的时候传值
selectMaterIdStr: ''
}
},
watch: {
......@@ -592,6 +594,7 @@ export default {
this.queryParams.materCode = ''
this.queryParams.page = 1
this.queryParams.rows = 10
this.selectMaterIdStr = ''
this.openPartNo = true
this.title = '选择成品料号'
this.type = '3'
......@@ -604,6 +607,7 @@ export default {
this.queryParams.page = 1
this.queryParams.rows = 10
this.materQueryType = ''
this.selectMaterIdStr = ''
if (row) {
this.type = '1'
this.materQueryType = (row.configureOrNot === null || row.configureOrNot === undefined || row.configureOrNot === '') ? '0' : '1'
......@@ -621,6 +625,7 @@ export default {
this.disabledId = row.businessId
this.replaceMaterialList.forEach(item => {
this.materIdList.push(item.businessId)
this.selectMaterIdStr += item.businessId
})
} else {
this.materIdList = []
......@@ -656,7 +661,8 @@ export default {
...this.queryParams,
businessIdList: str,
totalType: this.materQueryType,
type: ''
type: '',
selectMaterIdStr: this.selectMaterIdStr
}
if (this.type === '3') {
params.type = '3'
......@@ -1039,6 +1045,11 @@ export default {
})
},
initData() {
for (let i = 0; i < this.positionList.length; i++) {
console.log(i)
this.positionList[i].sort = i
}
const data = {
materId: this.form.materId,
modelType: this.form.modelType,
......
......@@ -157,7 +157,7 @@
</template>
<script>
import { listModel } from '@/api/model'
import { listModel, deleteLogicalId } from '@/api/model'
export default {
name: 'ProductionModel',
......@@ -224,6 +224,23 @@ export default {
}
})
},
// 删除生产模型
handleDelete(row) {
this.$confirm('确定删除该生产模型?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteLogicalId({ businessId: row.businessId }).then(res => {
this.$message({
type: 'success',
message: '删除成功!'
})
this.handleQuery()
})
}).catch(() => {
})
},
// 详情
handleQueryInfo(row) {
this.$router.push({
......
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