Commit 299b1d6b authored by jingnan's avatar jingnan 👀

器材待用架次为9300,9008,9160的时候实施生产文件号可以进行手动添加

parent b58dd8c3
......@@ -45,6 +45,7 @@
@click="getData"
>查询</el-button>
<el-button size="mini" @click="reset">重置</el-button>
<el-button v-if="parentSortiesNo.includes(form.serialNo)" type="primary" size="mini" @click="manualAdd">手动添加</el-button>
</div>
</header>
<el-table
......@@ -92,7 +93,8 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="AO号" show-overflow-tooltip align="center">
<template slot-scope="scope">
{{ scope.row.serialNumber }}
<el-input v-if="scope.row.editAo" v-model="scope.row.serialNumber" clearable placeholder="请输入AO" />
<span v-else> {{ scope.row.serialNumber }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center">
......@@ -180,7 +182,8 @@ export default {
},
rules: {
phoneNum: [{ required: true, message: '该项必填', trigger: 'blur' }]
}
},
parentSortiesNo: ['9300', '9008', '9160']
}
},
computed: {
......@@ -345,17 +348,29 @@ export default {
total = 0
this.$message({ message: '器材数量不一致', type: 'warning' })
} else {
const valid = this.determineData.find(row => !row.serialNumber || !row.num)
if (valid) return this.$message({ message: ' AO号必填且数量必须大于0', type: 'warning' })
this.$emit('add', nums)
this.visible = false
}
},
addRow(row) {
const rows = {
editAo: false,
serialNumber: row.serialNumber,
num: 0
}
this.determineData.push(rows)
},
manualAdd() {
const rows = {
editAo: true,
serialNumber: '',
num: 0
}
this.determineData.push(rows)
},
deleteRow(index, rows) {
rows.splice(index, 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