标准检查项增加状态

类目字典和检查项验证是否已被使用
pull/1/head
wangpeng 2024-01-27 18:09:51 +08:00
parent 41d54e8349
commit 2e424eecb3
6 changed files with 46 additions and 22 deletions

View File

@ -9,10 +9,10 @@
<td class="tbg">标准名称</td>
<td colspan="3">{{ form.CHECK_STANDARD_NAME }}</td>
</tr>
<!-- <tr>
<tr>
<td class="tbg">状态</td>
<td colspan="3">{{ form.COMMON_STATUS ? (form.COMMON_STATUS === 1 ? '有效' : '停用') : '' }}</td>
</tr>-->
</tr>
<tr>
<td class="tbg">标准明细</td>
<td colspan="3" style="padding:0;">

View File

@ -43,6 +43,11 @@
<el-form-item label="排序" prop="COMMON_ITEM_SORT">
<el-input-number :min="1" :precision="0" v-model="form.COMMON_ITEM_SORT" style="width: 100%;" controls-position="right" autocomplete="off" placeholder="这里输入排序..." />
</el-form-item>
<el-form-item label="状态" prop="COMMON_ITEM_STATUS">
<el-select v-model="form.COMMON_ITEM_STATUS" placeholder="状态" style="width: 100px" class="filter-item">
<el-option v-for="item in commonItemStatusList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="close"> </el-button>
@ -74,6 +79,10 @@ export default {
{ id: 1, name: '选择' },
{ id: 2, name: '填写' }
],
commonItemStatusList: [
{ id: 1, name: '有效' },
{ id: 2, name: '停用' }
],
tempData: {
CHECK_CATEGORY: '',
CHECK_ITEM: ''
@ -90,7 +99,8 @@ export default {
CHECK_QUALIFIED: '',
CHECK_UNQUALIFIED: '',
OPERATION_TYPE: '',
COMMON_ITEM_SORT: ''
COMMON_ITEM_SORT: '',
COMMON_ITEM_STATUS: ''
},
rules: {
CHECK_CATEGORY: [{ required: true, message: '标准类别不能为空', trigger: 'blur' }],
@ -101,7 +111,8 @@ export default {
CHECK_QUALIFIED: [{ required: true, message: '检查合格项不能为空', trigger: 'blur' }],
CHECK_UNQUALIFIED: [{ required: true, message: '检查不合格项不能为空', trigger: 'blur' }],
OPERATION_TYPE: [{ required: true, message: '操作类型不能为空', trigger: 'blur' }],
COMMON_ITEM_SORT: [{ required: true, message: '排序不能为空', trigger: 'blur' }]
COMMON_ITEM_SORT: [{ required: true, message: '排序不能为空', trigger: 'blur' }],
COMMON_ITEM_STATUS: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
},
listQuery: {
page: 1,
@ -118,6 +129,7 @@ export default {
this.visible = true
this.checkCategoryList = e.checkCategoryList
this.checkItemAllList = e.checkItemAllList
this.form.COMMON_ID = e.form.COMMON_ID
this.form.COMMON_ITEM_SORT = e.form.COMMON_ITEM_SORT
if (e.form.COMMON_ITEM_ID) {
this.checkItemList = this.checkItemAllList.filter(item => item.PARENT_IDS.includes(e.form.CHECK_CATEGORY))
@ -127,8 +139,8 @@ export default {
this.tempData.CHECK_CATEGORY = e.form.CHECK_CATEGORY
this.tempData.CHECK_ITEM = e.form.CHECK_ITEM
this.$set(this.form, 'CHECK_CATEGORY_WAY', 'select')
console.log(this.form)
}
console.log(this.form)
},
changeEditWay() {
this.form.CHECK_CATEGORY_WAY = this.form.CHECK_CATEGORY_WAY === 'select' ? 'value' : 'select'
@ -183,7 +195,8 @@ export default {
CHECK_QUALIFIED: '',
CHECK_UNQUALIFIED: '',
OPERATION_TYPE: '',
COMMON_ITEM_SORT: ''
COMMON_ITEM_SORT: '',
COMMON_ITEM_STATUS: ''
}
},
close() {

View File

@ -3,33 +3,35 @@
<table class="table-ui">
<tr>
<td class="tbg" style="width: 150px">行业类型</td>
<td>{{ form.CHECK_CATEGORY_NAME }}</td>
<td colspan="2">{{ form.CHECK_CATEGORY_NAME }}</td>
<td class="tbg">标准项目</td>
<td>{{ form.CHECK_ITEM_NAME }}</td>
<td colspan="2">{{ form.CHECK_ITEM_NAME }}</td>
</tr>
<tr>
<td class="tbg">检查内容</td>
<td colspan="3">{{ form.CHECK_CONTENT }}</td>
<td colspan="5">{{ form.CHECK_CONTENT }}</td>
</tr>
<tr>
<td class="tbg">检查标准</td>
<td colspan="3">{{ form.CHECK_STANDARD }}</td>
<td colspan="5">{{ form.CHECK_STANDARD }}</td>
</tr>
<tr>
<td class="tbg">参考依据</td>
<td colspan="3">{{ form.REFERENCE_BASIS }}</td>
<td colspan="5">{{ form.REFERENCE_BASIS }}</td>
</tr>
<tr>
<td class="tbg">检查合格项</td>
<td colspan="3">{{ form.CHECK_QUALIFIED }}</td>
<td colspan="5">{{ form.CHECK_QUALIFIED }}</td>
</tr>
<tr>
<td class="tbg">检查不合格项</td>
<td colspan="3">{{ form.CHECK_UNQUALIFIED }}</td>
<td colspan="5">{{ form.CHECK_UNQUALIFIED }}</td>
</tr>
<tr>
<td class="tbg">操作类型</td>
<td>{{ form.OPERATION_TYPE ? (form.OPERATION_TYPE === 1 ? '选择' : '填写') : '' }}</td>
<td class="tbg">状态</td>
<td>{{ form.COMMON_ITEM_STATUS ? (form.COMMON_ITEM_STATUS === 1 ? '有效' : '停用') : '' }}</td>
<td class="tbg">排序</td>
<td>{{ form.COMMON_ITEM_SORT }}</td>
</tr>
@ -59,14 +61,17 @@ export default {
COMMON_ITEM_ID: '',
COMMON_ID: '',
CHECK_CATEGORY: '',
CHECK_CATEGORY_NAME: '',
CHECK_ITEM: '',
CHECK_ITEM_NAME: '',
CHECK_CONTENT: '',
CHECK_STANDARD: '',
REFERENCE_BASIS: '',
CHECK_QUALIFIED: '',
CHECK_UNQUALIFIED: '',
OPERATION_TYPE: '',
COMMON_ITEM_SORT: ''
COMMON_ITEM_SORT: '',
COMMON_ITEM_STATUS: ''
}
}
},

View File

@ -64,12 +64,17 @@
{{ row.OPERATION_TYPE ? (row.OPERATION_TYPE === 1 ? '选择' : '填写') : '' }}
</template>
</el-table-column>
<el-table-column prop="COMMON_ITEM_STATUS" label="状态" width="60" align="center" >
<template slot-scope="{row}">
{{ row.COMMON_ITEM_STATUS ? (row.COMMON_ITEM_STATUS === 1 ? '有效' : '停用') : '' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-row :gutter="20">
<el-button type="success" icon="el-icon-view" size="mini" @click="getInfo(row)"></el-button>
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.COMMON_ITEM_ID)"></el-button>
<el-button v-show="edit" :disabled="row.COUNT_CUSTOM !== 0" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button v-show="del" :disabled="row.COUNT_CUSTOM !== 0" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.COMMON_ITEM_ID)"></el-button>
</el-row>
</template>
</el-table-column>
@ -191,7 +196,7 @@ export default {
},
handleAdd() {
const data = {}
data.form = JSON.parse(JSON.stringify({ COMMON_ITEM_SORT: this.total + 1 }))
data.form = JSON.parse(JSON.stringify({ COMMON_ID: this.$parent.COMMON_ID, COMMON_ITEM_SORT: this.total + 1 }))
data.checkCategoryList = this.checkCategoryList
data.checkItemAllList = this.checkItemAllList
this.$refs.edit.init(data)

View File

@ -88,7 +88,7 @@
<el-button type="primary" icon="el-icon-circle-plus-outline" size="mini" @click="importExcel('appendImport', row)">追加导入</el-button>
<el-button type="success" icon="el-icon-tickets" size="mini" @click="getCommonItem(row)"></el-button>
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.COMMON_ID)"></el-button>
<el-button v-show="del" :disabled="row.COUNT_CUSTOM !== 0" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.COMMON_ID)"></el-button>
</el-row>
</template>
</el-table-column>

View File

@ -55,18 +55,19 @@
<template slot-scope="{row}">
<el-row :gutter="20">
<el-button type="success" icon="el-icon-view" size="mini" @click="getInfo(row)"></el-button>
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.COMMON_ID)"></el-button>
<el-button v-show="edit" :disabled="row.COUNT_USE !== 0" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button v-show="del" :disabled="row.COUNT_USE !== 0" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.COMMON_ID)"></el-button>
</el-row>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button type="primary" icon="el-icon-refresh" @click="getList"></el-button>
<!-- <el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>-->
<el-button v-show="false" type="danger" icon="el-icon-delete" plain @click="batchDel"></el-button>
<!-- <el-button v-show="false" type="danger" icon="el-icon-delete" plain @click="batchDel"></el-button>-->
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
<!-- <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />-->
</div>
<edit ref="edit" :title="title" href="edit" @beforeClose="getList"/>
<info ref="info" :title="title"/>