外协不合格处理

This commit is contained in:
zhangdingyu
2018-12-30 11:33:42 +08:00
parent fbb57f02be
commit 144b5f9c8a
2 changed files with 20 additions and 14 deletions

View File

@@ -7,7 +7,7 @@
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button> <el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox> <el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button> <el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button>
<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button> <!--<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button>-->
</el-row> </el-row>
</el-card> </el-card>

View File

@@ -138,6 +138,7 @@ import { initOutHelp, searchTable, editList } from '@/api/Outsourcing/Unqualifie
export default { export default {
data() { data() {
return { return {
num_bhg: '',
count2: 0, count2: 0,
form: { form: {
wasteQuantity: '', // 废品数量 wasteQuantity: '', // 废品数量
@@ -219,11 +220,15 @@ export default {
} }
this.number = row.外协加工任务单明细流水号 this.number = row.外协加工任务单明细流水号
this.form.wasteQuantity = row.废品数量 this.form.wasteQuantity = row.废品数量
this.num_bhg = row.批次数量
this.form.processingMethod = row.不合格处理方式 this.form.processingMethod = row.不合格处理方式
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
}, },
// 提交编辑 // 提交编辑
submitEdit() { submitEdit() {
if (this.form.wasteQuantity > this.num_bhg) {
this.$message.error('废品数量大于总数量')
} else {
editList(this.number, this.form.wasteQuantity, this.form.processingMethod).then(response => { editList(this.number, this.form.wasteQuantity, this.form.processingMethod).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.dialogFormVisible1 = false this.dialogFormVisible1 = false
@@ -237,6 +242,7 @@ export default {
this.$message.error('信息更新失败') this.$message.error('信息更新失败')
} }
}) })
}
}, },
// 提交添加或者修改 // 提交添加或者修改
submit(formName) { submit(formName) {