feat: 多个页面优化与功能增强
1. 磨削页面:添加操作人权限控制,自动填充上次硬度值,移除字典值字段 2. 质保书页面:新增质保书类型筛选与表单字段,移除模板选择弹窗 3. 成本综合页面:添加产线校验、录入/查看切换、表格列控制与快捷操作 4. 质保书条目页面:新增类型筛选与表单字段,移除模板选择弹窗
This commit is contained in:
@@ -109,7 +109,7 @@
|
||||
<div slot="header" class="card-header">
|
||||
<span class="card-title"><i class="el-icon-document" /> 磨削台账</span>
|
||||
<span style="margin-left:auto;display:flex;gap:8px">
|
||||
<el-button size="mini" type="text" icon="el-icon-setting" @click="openOperatorDict">操作人维护</el-button>
|
||||
<el-button v-hasPermi="['system:dict:list']" size="mini" type="text" icon="el-icon-setting" @click="openOperatorDict">操作人维护</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@@ -233,7 +233,6 @@
|
||||
<el-input
|
||||
v-if="isEditing(row)"
|
||||
v-model.number="editRow.hardness"
|
||||
type="number"
|
||||
size="mini"
|
||||
style="width:64px"
|
||||
/>
|
||||
@@ -366,9 +365,7 @@
|
||||
<el-form-item label="姓名" prop="dictLabel">
|
||||
<el-input v-model="operatorForm.dictLabel" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="值" prop="dictValue">
|
||||
<el-input v-model="operatorForm.dictValue" placeholder="请输入值" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="operatorForm.status">
|
||||
<el-radio label="0">在职</el-radio>
|
||||
@@ -532,8 +529,7 @@ export default {
|
||||
operatorFormTitle: '',
|
||||
operatorForm: {},
|
||||
operatorFormRules: {
|
||||
dictLabel: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
||||
dictValue: [{ required: true, message: '值不能为空', trigger: 'blur' }]
|
||||
dictLabel: [{ required: true, message: '姓名不能为空', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -670,6 +666,10 @@ export default {
|
||||
const pad = n => String(n).padStart(2, '0')
|
||||
const grindTime = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())} ` +
|
||||
`${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}`
|
||||
const lastHardness = this.grindList
|
||||
.filter(r => r.hardness != null)
|
||||
.sort((a, b) => new Date(b.grindTime) - new Date(a.grindTime))
|
||||
.map(r => r.hardness)[0]
|
||||
this.editRow = {
|
||||
__isNew: true,
|
||||
rollId: this.selectedRollId,
|
||||
@@ -679,7 +679,7 @@ export default {
|
||||
diaAfter: undefined,
|
||||
rollShape: '平',
|
||||
flawResult: '合格',
|
||||
hardness: undefined,
|
||||
hardness: lastHardness,
|
||||
operator: this.currentUserName,
|
||||
remark: undefined
|
||||
}
|
||||
@@ -827,7 +827,7 @@ export default {
|
||||
}).finally(() => { this.operatorDictLoading = false })
|
||||
},
|
||||
handleAddOperator() {
|
||||
this.operatorForm = { dictType: 'mes_roll_operator', dictLabel: '', dictValue: '', status: '0' }
|
||||
this.operatorForm = { dictType: 'mes_roll_operator', dictLabel: '', status: '0' }
|
||||
this.operatorFormTitle = '新增操作人'
|
||||
this.$nextTick(() => { this.operatorFormOpen = true })
|
||||
},
|
||||
@@ -848,7 +848,7 @@ export default {
|
||||
submitOperatorForm() {
|
||||
this.$refs.operatorForm.validate(valid => {
|
||||
if (!valid) return
|
||||
const form = { ...this.operatorForm }
|
||||
const form = { ...this.operatorForm, dictValue: this.operatorForm.dictLabel }
|
||||
const api = form.dictCode ? updateData : addData
|
||||
api(form).then(() => {
|
||||
this.$modal.msgSuccess(form.dictCode ? '修改成功' : '新增成功')
|
||||
|
||||
Reference in New Issue
Block a user