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

保密发料单

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