|
@@ -1,118 +1,64 @@
|
|
|
<template>
|
|
|
- <a-modal
|
|
|
- title="报修审核"
|
|
|
- :width="800"
|
|
|
- :visible="visible"
|
|
|
- :confirmLoading="confirmLoading"
|
|
|
- class="ant-modal2"
|
|
|
- @cancel="handleCancel"
|
|
|
- >
|
|
|
+ <a-modal title="报修审核" :width="800" :visible="visible" :confirmLoading="confirmLoading" class="ant-modal2" @cancel="handleCancel">
|
|
|
<a-form :form="form">
|
|
|
|
|
|
- <a-form-item v-show="false" >
|
|
|
- <a-input v-decorator="['id']" type="hidden"/>
|
|
|
+ <a-form-item v-show="false">
|
|
|
+ <a-input v-decorator="['id']" type="hidden" />
|
|
|
</a-form-item>
|
|
|
|
|
|
<row-list :col="1">
|
|
|
<row-item>
|
|
|
- <a-form-item
|
|
|
- label="审核"
|
|
|
- :labelCol="BaseTool.Constant.labelCol2"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
- >
|
|
|
- <a-radio-group v-model="value" >
|
|
|
+ <a-form-item label="审核" :labelCol="BaseTool.Constant.labelCol2" :wrapperCol="BaseTool.Constant.wrapperCol2">
|
|
|
+ <a-radio-group v-model="value">
|
|
|
<a-radio-button :value="1">
|
|
|
通过
|
|
|
</a-radio-button>
|
|
|
<a-radio-button :value="23">
|
|
|
拒绝
|
|
|
</a-radio-button>
|
|
|
+ <a-radio-button :value="27">
|
|
|
+ 自修
|
|
|
+ </a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
<row-item>
|
|
|
- <a-form-item
|
|
|
- label="维修专业"
|
|
|
- :labelCol="BaseTool.Constant.labelCol2"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
- >
|
|
|
- <a-tree-select
|
|
|
- tree-checkable
|
|
|
- :show-checked-strategy="SHOW_PARENT"
|
|
|
- v-decorator="['repairProfessor', { rules: [{required: true, message: '检修专业不能为空'}]}]"
|
|
|
- placeholder="请选择">
|
|
|
- <a-tree-select-node
|
|
|
- v-for="(label,value) in professorMap"
|
|
|
- :key="value"
|
|
|
- :title="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
+ <a-form-item label="维修专业" :labelCol="BaseTool.Constant.labelCol2" :wrapperCol="BaseTool.Constant.wrapperCol2">
|
|
|
+ <a-tree-select tree-checkable :show-checked-strategy="SHOW_PARENT" v-decorator="['repairProfessor', { rules: [{required: true, message: '检修专业不能为空'}]}]" placeholder="请选择">
|
|
|
+ <a-tree-select-node v-for="(label,value) in professorMap" :key="value" :title="label" :value="parseInt(value)">{{ label }}
|
|
|
</a-tree-select-node>
|
|
|
</a-tree-select>
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
<row-item>
|
|
|
- <a-form-item
|
|
|
- label="车间具体位置"
|
|
|
- :labelCol="BaseTool.Constant.labelCol2"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
- >
|
|
|
- <a-input
|
|
|
- placeholder="比如:甲七车间北侧"
|
|
|
- v-decorator="['sbCph']" />
|
|
|
+ <a-form-item label="车间具体位置" :labelCol="BaseTool.Constant.labelCol2" :wrapperCol="BaseTool.Constant.wrapperCol2">
|
|
|
+ <a-input placeholder="比如:甲七车间北侧" v-decorator="['sbCph']" />
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
<row-item>
|
|
|
- <a-form-item
|
|
|
- label="工单类别"
|
|
|
- :labelCol="BaseTool.Constant.labelCol2"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
- >
|
|
|
+ <a-form-item label="工单类别" :labelCol="BaseTool.Constant.labelCol2" :wrapperCol="BaseTool.Constant.wrapperCol2">
|
|
|
<a-select @change="changePlanFlag" v-decorator="['category', {initialValue: 2, rules: [{required: true, message: '工单类别不能为空'}]}]" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
- v-for="(label,value) in categoryMap"
|
|
|
- :key="value"
|
|
|
- :label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
+ <a-select-option v-for="(label,value) in categoryMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
<row-item>
|
|
|
- <a-form-item
|
|
|
- label="维修部门"
|
|
|
- :labelCol="BaseTool.Constant.labelCol2"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
- >
|
|
|
+ <a-form-item label="维修部门" :labelCol="BaseTool.Constant.labelCol2" :wrapperCol="BaseTool.Constant.wrapperCol2">
|
|
|
<a-select v-decorator="['repairDeptId', {rules: [{required: true, message: '维修部门不能为空'}]}]" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
- v-for="(label,value) in repairDeptMap"
|
|
|
- :key="value"
|
|
|
- :label="label"
|
|
|
- :value="value">{{ label }}
|
|
|
+ <a-select-option v-for="(label,value) in repairDeptMap" :key="value" :label="label" :value="value">{{ label }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
<row-item>
|
|
|
- <a-form-item
|
|
|
- label="委托内容描述"
|
|
|
- :labelCol="BaseTool.Constant.labelCol2"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
- >
|
|
|
- <a-textarea
|
|
|
- :rows="4"
|
|
|
- v-decorator="['content', {rules: [{required: true, message: '委托内容描述不能为空'}]}]"/>
|
|
|
+ <a-form-item label="委托内容描述" :labelCol="BaseTool.Constant.labelCol2" :wrapperCol="BaseTool.Constant.wrapperCol2">
|
|
|
+ <a-textarea :rows="4" v-decorator="['content', {rules: [{required: true, message: '委托内容描述不能为空'}]}]" />
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
<row-item>
|
|
|
- <a-form-item
|
|
|
- label="备注"
|
|
|
- :labelCol="BaseTool.Constant.labelCol2"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
- >
|
|
|
- <a-textarea
|
|
|
- :rows="4"
|
|
|
- v-decorator="['verifyRepairRemark']"/>
|
|
|
+ <a-form-item label="备注" :labelCol="BaseTool.Constant.labelCol2" :wrapperCol="BaseTool.Constant.wrapperCol2">
|
|
|
+ <a-textarea :rows="4" v-decorator="['verifyRepairRemark']" />
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
</row-list>
|
|
@@ -129,7 +75,7 @@ import { repairVerify } from '@/api/repair/application-form'
|
|
|
|
|
|
export default {
|
|
|
name: 'BaseRepairApplicationForm',
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
confirmLoading: false,
|
|
|
modalTitle: null,
|
|
@@ -146,14 +92,12 @@ export default {
|
|
|
professorMap: {},
|
|
|
categoryMap: {},
|
|
|
model: null,
|
|
|
- userList: []
|
|
|
+ userList: [],
|
|
|
}
|
|
|
},
|
|
|
- components: {
|
|
|
- },
|
|
|
- props: {
|
|
|
- },
|
|
|
- created () {
|
|
|
+ components: {},
|
|
|
+ props: {},
|
|
|
+ created() {
|
|
|
// 下拉框map
|
|
|
this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
|
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL)
|
|
@@ -164,26 +108,25 @@ export default {
|
|
|
this.categoryMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY)
|
|
|
},
|
|
|
methods: {
|
|
|
- base (record) {
|
|
|
+ base(record) {
|
|
|
this.visible = true
|
|
|
this.model = record
|
|
|
// 如果是空标识添加
|
|
|
- const { form: { setFieldsValue } } = this
|
|
|
+ const {
|
|
|
+ form: { setFieldsValue },
|
|
|
+ } = this
|
|
|
// 日期处理
|
|
|
record.applyTime = this.BaseTool.Moment(record.applyTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
|
|
|
this.$nextTick(() => {
|
|
|
- setFieldsValue(Object.assign(pick(record, [
|
|
|
- 'id',
|
|
|
- 'category',
|
|
|
- 'sbCph',
|
|
|
- 'repairProfessor',
|
|
|
- 'repairDeptId',
|
|
|
- 'content'
|
|
|
- ])))
|
|
|
+ setFieldsValue(
|
|
|
+ Object.assign(pick(record, ['id', 'category', 'sbCph', 'repairProfessor', 'repairDeptId', 'content']))
|
|
|
+ )
|
|
|
})
|
|
|
},
|
|
|
- save () {
|
|
|
- const { form: { validateFieldsAndScroll } } = this
|
|
|
+ save() {
|
|
|
+ const {
|
|
|
+ form: { validateFieldsAndScroll },
|
|
|
+ } = this
|
|
|
this.confirmLoading = true
|
|
|
validateFieldsAndScroll((errors, values) => {
|
|
|
if (errors) {
|
|
@@ -196,20 +139,20 @@ export default {
|
|
|
repairVerify(values)
|
|
|
.then(() => {
|
|
|
this.handleCancel(values)
|
|
|
- }).catch(() => {
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
this.confirmLoading = false
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- handleCancel (values) {
|
|
|
+ handleCancel(values) {
|
|
|
this.visible = false
|
|
|
this.confirmLoading = false
|
|
|
this.form.resetFields()
|
|
|
if (this.BaseTool.Object.isNotBlank(values)) {
|
|
|
this.$emit('ok')
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|