|
@@ -29,7 +29,9 @@
|
|
|
>
|
|
|
<a-input
|
|
|
disabled
|
|
|
+ style="width:70%"
|
|
|
v-decorator="['repairNo']" />
|
|
|
+ <a-button style="width: 30%;" type="primary" @click="handleAppNoSelect">选择</a-button>
|
|
|
</a-form-item>
|
|
|
<a-form-item
|
|
|
label="委外单号"
|
|
@@ -150,6 +152,7 @@
|
|
|
<template slot="footer">
|
|
|
<a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
|
|
|
</template>
|
|
|
+ <repair-application-form-select-modal ref="rafSelectModal" @selected="handleAppNoSelected"/>
|
|
|
</a-modal>
|
|
|
</template>
|
|
|
|
|
@@ -159,11 +162,13 @@ import { addRepairFee, updateRepairFee } from '@/api/repair/fee'
|
|
|
import { uploadUrl } from '@/api/upms/file'
|
|
|
import Vue from 'vue'
|
|
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|
|
+import RepairApplicationFormSelectModal from '@/views/repair/application-form/modules/RepairApplicationFormSelectModal'
|
|
|
|
|
|
export default {
|
|
|
name: 'BaseRepairFee',
|
|
|
data () {
|
|
|
return {
|
|
|
+ sbId: null,
|
|
|
confirmLoading: false,
|
|
|
modalTitle: null,
|
|
|
defaultImageList: [],
|
|
@@ -181,6 +186,9 @@ export default {
|
|
|
typeMap: {}
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ RepairApplicationFormSelectModal
|
|
|
+ },
|
|
|
props: {
|
|
|
},
|
|
|
created () {
|
|
@@ -194,13 +202,16 @@ export default {
|
|
|
// 如果是空标识添加
|
|
|
const { form: { setFieldsValue } } = this
|
|
|
if (this.BaseTool.Object.isBlank(record)) {
|
|
|
- this.$nextTick(() => {
|
|
|
- setFieldsValue({
|
|
|
- 'sbId': repairForm.sbId,
|
|
|
- 'repairId': repairForm.id,
|
|
|
- 'repairNo': repairForm.no
|
|
|
+ if (repairForm != null) {
|
|
|
+ this.sbId = repairForm.sbId
|
|
|
+ this.$nextTick(() => {
|
|
|
+ setFieldsValue({
|
|
|
+ 'sbId': repairForm.sbId,
|
|
|
+ 'repairId': repairForm.id,
|
|
|
+ 'repairNo': repairForm.no
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
this.imageList = []
|
|
|
this.fileList = []
|
|
|
this.defaultImageList = []
|
|
@@ -275,7 +286,7 @@ export default {
|
|
|
},
|
|
|
handleFileChange (info) {
|
|
|
this.defaultFileList = info.fileList
|
|
|
- this.fileList = this.setFileList(info, 18)
|
|
|
+ this.fileList = this.setFileList(info, 19)
|
|
|
},
|
|
|
setFileList (info, type) {
|
|
|
const file = info.file
|
|
@@ -289,6 +300,21 @@ export default {
|
|
|
return []
|
|
|
}
|
|
|
},
|
|
|
+ handleAppNoSelect () {
|
|
|
+ this.$refs.rafSelectModal.base(null, { sbId: this.sbId })
|
|
|
+ },
|
|
|
+ handleAppNoSelected (record, keys, rows) {
|
|
|
+ console.log(keys, rows)
|
|
|
+ const [ key ] = keys
|
|
|
+ const [ row ] = rows
|
|
|
+ const { form: { setFieldsValue } } = this
|
|
|
+ this.$nextTick(() => {
|
|
|
+ setFieldsValue(Object.assign({
|
|
|
+ 'repairId': key,
|
|
|
+ 'repairNo': row.no
|
|
|
+ }))
|
|
|
+ })
|
|
|
+ },
|
|
|
handleCancel (values) {
|
|
|
this.visible = false
|
|
|
this.confirmLoading = false
|