|
@@ -130,7 +130,7 @@
|
|
|
v-for="(label,value) in repairFormTypeMap"
|
|
|
:key="value"
|
|
|
:label="label"
|
|
|
- :value="value">{{ label }}
|
|
|
+ :value="parseInt(value)">{{ label }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -492,7 +492,7 @@
|
|
|
<script>
|
|
|
import pick from 'lodash.pick'
|
|
|
import BaseTool from '../../../../utils/tool'
|
|
|
-import { addRepairApplicationForm, updateRepairApplicationForm, getSbPositions, getDispatchUser, receiveProfessor } from '@/api/repair/application-form'
|
|
|
+import { addRepairApplicationForm, againRepairApplicationForm, updateRepairApplicationForm, getSbPositions, getDispatchUser, receiveProfessor } from '@/api/repair/application-form'
|
|
|
import PartInfoSelectModal from '@/views/part/info/modules/PartInfoSelectModal'
|
|
|
import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
|
|
|
import { queryUser } from '@/api/upms/user'
|
|
@@ -546,7 +546,8 @@ export default {
|
|
|
refusedFlag: false,
|
|
|
headers: {
|
|
|
Authorization: 'Bearer ' + Vue.ls.get(ACCESS_TOKEN)
|
|
|
- }
|
|
|
+ },
|
|
|
+ modal: null
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -581,6 +582,7 @@ export default {
|
|
|
base (record) {
|
|
|
this.visible = true
|
|
|
this.refusedFlag = false
|
|
|
+ this.modal = record
|
|
|
fetchErrorTypeTree().then(res => {
|
|
|
this.treeData = res.data
|
|
|
})
|
|
@@ -624,7 +626,6 @@ export default {
|
|
|
}
|
|
|
const { form: { setFieldsValue } } = this
|
|
|
// 日期处理
|
|
|
- record.applyTime = this.BaseTool.Moment(record.applyTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
|
|
|
if (record.limitDate != null) {
|
|
|
record.limitDate = this.BaseTool.Moment(record.limitDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
this.$nextTick(() => {
|
|
@@ -633,6 +634,8 @@ export default {
|
|
|
])))
|
|
|
})
|
|
|
}
|
|
|
+ record.repairType = record.repairType.split(',')
|
|
|
+ record.repairProfessor = record.repairProfessor.split(',')
|
|
|
this.$nextTick(() => {
|
|
|
setFieldsValue(Object.assign(pick(record, [
|
|
|
'id',
|
|
@@ -641,6 +644,7 @@ export default {
|
|
|
'partId',
|
|
|
'repairUserId',
|
|
|
'no',
|
|
|
+ 'repairFormType',
|
|
|
'category',
|
|
|
'limitDate',
|
|
|
'limitHours',
|
|
@@ -650,8 +654,12 @@ export default {
|
|
|
'status',
|
|
|
'sbName',
|
|
|
'needStop',
|
|
|
+ 'repairProfessor',
|
|
|
+ 'planStartTime',
|
|
|
+ 'planEndTime',
|
|
|
'category',
|
|
|
'partName',
|
|
|
+ 'repairType',
|
|
|
'remark',
|
|
|
'repairDeptId'
|
|
|
])))
|
|
@@ -698,6 +706,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
save () {
|
|
|
+ console.log(1222)
|
|
|
+
|
|
|
const { form: { validateFieldsAndScroll } } = this
|
|
|
this.confirmLoading = true
|
|
|
validateFieldsAndScroll((errors, values) => {
|
|
@@ -705,16 +715,24 @@ export default {
|
|
|
this.confirmLoading = false
|
|
|
return
|
|
|
}
|
|
|
- // 日期处理
|
|
|
- values.applyTime = this.BaseTool.Date.formatter(values.applyTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
|
|
|
- values.limitDate = BaseTool.Date.formatter(values.limitDate, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ console.log(values)
|
|
|
+ // // 日期处理
|
|
|
+ // values.limitDate = BaseTool.Date.formatter(values.limitDate, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
values.planStartTime = BaseTool.Date.formatter(values.planStartTime, BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
|
|
|
+
|
|
|
values.planEndTime = BaseTool.Date.formatter(values.planEndTime, BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
|
|
|
// 上传文件
|
|
|
+
|
|
|
values.repairFileList = this.repairFileList
|
|
|
+
|
|
|
values.repairProfessor = values.repairProfessor.join(',')
|
|
|
+ console.log(1)
|
|
|
+
|
|
|
values.repairType = values.repairType.join(',')
|
|
|
+ console.log(1)
|
|
|
values.applicationFileList = this.applicationFileList
|
|
|
+ console.log(11)
|
|
|
+
|
|
|
values.reportFileList = this.reportFileList
|
|
|
// values.sbPosition = values.sbPosition.join('->')
|
|
|
console.log(values)
|
|
@@ -726,6 +744,7 @@ export default {
|
|
|
} else {
|
|
|
values.source = 1
|
|
|
}
|
|
|
+ console.log(111)
|
|
|
if (this.BaseTool.String.isBlank(values.id)) {
|
|
|
addRepairApplicationForm(values)
|
|
|
.then(() => {
|
|
@@ -737,6 +756,18 @@ export default {
|
|
|
}).catch(() => {
|
|
|
this.confirmLoading = false
|
|
|
})
|
|
|
+ } else if (this.modal.status === 23) {
|
|
|
+ console.log(21)
|
|
|
+ againRepairApplicationForm(values)
|
|
|
+ .then(() => {
|
|
|
+ this.$notification.success({
|
|
|
+ message: '报修成功!',
|
|
|
+ duration: 3
|
|
|
+ })
|
|
|
+ this.handleCancel(values)
|
|
|
+ }).catch(() => {
|
|
|
+ this.confirmLoading = false
|
|
|
+ })
|
|
|
} else {
|
|
|
updateRepairApplicationForm(values)
|
|
|
.then(() => {
|