Commit 1ad268ed authored by 沈翠玲's avatar 沈翠玲

保密发料单

parent dfaa1b88
......@@ -64,6 +64,14 @@
:disabled="multiple"
@click="handleSubmit"
>完成</el-button>
<el-button
size="mini"
plain
type="primary"
:disabled="multiple"
icon="el-icon-edit"
@click="handleSend()"
>发料</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -98,18 +106,12 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="120">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleSend(scope.row)"
>发料</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleSubmit(scope.row)"
>完成</el-button>
@click="handleCancel(scope.row)"
>取消</el-button>
</template>
</el-table-column>
</el-table>
......@@ -223,6 +225,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
selectRows: [],
// 查询参数
queryParams: {
pageNum: 1,
......@@ -263,7 +266,7 @@ export default {
const params = {
... this.form,
itemList,
secrecyIssueCode: this.form.secrecyIssueCode
secrecyIssueCodes: this.form.secrecyIssueCodes
}
addMaterial(params).then(response => {
this.$modal.msgSuccess("新增成功");
......@@ -308,22 +311,16 @@ export default {
this.queryParams.pageNum = 1;
this.getList();
},
handleSend(row) {
// const ids = row.id ? [row.id] : this.ids;
// this.$modal.confirm('是否发料?').then(function() {
// return putSecrecyissue({
// status: 0,
// ids: ids
// });
// }).then((res) => {
// if(res.code === 200) {
// this.getList()
// }
// })
handleSend() {
console.log('this.selectRows11', this.selectRows)
const arr = this.selectRows.filter( v=> v.seRouteCode !== this.selectRows[0].seRouteCode)
if (arr.length) {
return this.$modal.msgWarning("发料选择的工单需要是同一个工艺编码");
}
this.reset();
this.form.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
this.form.workorderCode = row.workorderCode
this.form.secrecyIssueCode = row.secrecyIssueCode
this.form.workorderCode = this.selectRows.map(v => v.workorderCode).join(',')
this.form.secrecyIssueCodes = this.selectRows.map(v => v.secrecyIssueCode)
this.open = true;
this.gCode();
this.title = "发料申请";
......@@ -341,6 +338,19 @@ export default {
}
})
},
handleCancel(row) {
const ids = row.id ? [row.id] : this.ids;
this.$modal.confirm('是否取消发料申请?').then(function() {
return putSecrecyissue({
status: 4,
ids: ids
});
}).then((res) => {
if(res.code === 200) {
this.getList()
}
})
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
......@@ -348,6 +358,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
this.selectRows = selection
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
......
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