|
@@ -3,6 +3,7 @@
|
|
|
<a-row :gutter="48" slot="extra">
|
|
|
<a-col :md="48" :sm="48">
|
|
|
<span class="table-page-search-submitButtons" style="float: right" >
|
|
|
+ <a-button style="margin-left: 8px" type="primary" @click="finish()">完成</a-button>
|
|
|
<a-button style="margin-left: 8px" type="primary" @click="save()">保存</a-button>
|
|
|
<a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
|
|
|
</span>
|
|
@@ -90,12 +91,14 @@
|
|
|
<a-checkbox :checked="changeRepairPlan" v-model="changeRepairPlan"></a-checkbox>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ </a-row>
|
|
|
+ <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
+ <a-col :lg="24" :md="24" :sm="24">
|
|
|
<a-form-item
|
|
|
label="内容"
|
|
|
v-show="changeRepairPlan"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol2"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
>
|
|
|
<a-textarea
|
|
|
:auto-size="{ minRows: 5 }"
|
|
@@ -112,12 +115,14 @@
|
|
|
<a-checkbox :checked="changeSparePlan" v-model="changeSparePlan"></a-checkbox>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ </a-row>
|
|
|
+ <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
+ <a-col :lg="24" :md="24" :sm="24">
|
|
|
<a-form-item
|
|
|
label="内容"
|
|
|
v-show="changeSparePlan"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol2"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
>
|
|
|
<a-textarea
|
|
|
:auto-size="{ minRows: 5 }"
|
|
@@ -134,12 +139,14 @@
|
|
|
<a-checkbox :checked="userTeach" v-model="userTeach"></a-checkbox>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ </a-row>
|
|
|
+ <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
+ <a-col :lg="24" :md="24" :sm="24">
|
|
|
<a-form-item
|
|
|
label="内容"
|
|
|
v-show="userTeach"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol2"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
>
|
|
|
<a-textarea
|
|
|
:auto-size="{ minRows: 5 }"
|
|
@@ -156,12 +163,14 @@
|
|
|
<a-checkbox :checked="sbChange" v-model="sbChange"></a-checkbox>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ </a-row>
|
|
|
+ <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
+ <a-col :lg="24" :md="24" :sm="24">
|
|
|
<a-form-item
|
|
|
label="内容"
|
|
|
v-show="sbChange"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol2"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
>
|
|
|
<a-textarea
|
|
|
:auto-size="{ minRows: 5 }"
|
|
@@ -178,12 +187,14 @@
|
|
|
<a-checkbox :checked="otherChange" v-model="otherChange"></a-checkbox>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ </a-row>
|
|
|
+ <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
+ <a-col :lg="24" :md="24" :sm="24">
|
|
|
<a-form-item
|
|
|
label="内容"
|
|
|
v-show="otherChange"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol2"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
>
|
|
|
<a-textarea
|
|
|
:auto-size="{ minRows: 5 }"
|
|
@@ -196,7 +207,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { addRepairReason, updateRepairReason } from '@/api/repair/repair-reason'
|
|
|
+import { addRepairReason, updateRepairReason, finishRepairReason} from '@/api/repair/repair-reason'
|
|
|
import pick from 'lodash.pick'
|
|
|
|
|
|
export default {
|
|
@@ -212,6 +223,7 @@ export default {
|
|
|
sbChange: false,
|
|
|
otherChange: false,
|
|
|
addFlag: false,
|
|
|
+ statusMap: {},
|
|
|
form: this.$form.createForm(this),
|
|
|
visible: false
|
|
|
// 下拉框map
|
|
@@ -220,6 +232,7 @@ export default {
|
|
|
props: {},
|
|
|
created () {
|
|
|
// 下拉框map
|
|
|
+ this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_STATUS)
|
|
|
},
|
|
|
methods: {
|
|
|
base (record, repairForm = {}) {
|
|
@@ -269,7 +282,8 @@ export default {
|
|
|
'sbChange',
|
|
|
'sbChangeContent',
|
|
|
'otherChange',
|
|
|
- 'otherChangeContent'
|
|
|
+ 'otherChangeContent',
|
|
|
+ 'status'
|
|
|
])))
|
|
|
})
|
|
|
},
|
|
@@ -312,6 +326,30 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ finish(){
|
|
|
+ const { form: { validateFieldsAndScroll } } = this
|
|
|
+ this.confirmLoading = true
|
|
|
+ validateFieldsAndScroll((errors, values) => {
|
|
|
+ if (errors) {
|
|
|
+ this.confirmLoading = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 日期处理
|
|
|
+ values.changeRepairPlan = this.changeRepairPlan
|
|
|
+ values.changeSparePlan = this.changeSparePlan
|
|
|
+ values.userTeach = this.userTeach
|
|
|
+ values.sbChange = this.sbChange
|
|
|
+ values.otherChange = this.otherChange
|
|
|
+ values.analyzeTime = this.BaseTool.Date.formatter(values.analyzeTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ finishRepairReason(values)
|
|
|
+ .then((res) => {
|
|
|
+ this.confirmLoading = false
|
|
|
+ this.handleCancel()
|
|
|
+ }).catch(() => {
|
|
|
+ this.confirmLoading = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
handleCancel (values) {
|
|
|
this.visible = false
|
|
|
this.confirmLoading = false
|