|
|
@@ -405,15 +405,24 @@ export default {
|
|
|
getDetail(id).then(({ data }) => {
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataForm = data.data
|
|
|
- this.dataForm.coCode = this.coOption.find(
|
|
|
+ let find1 = this.coOption.find(
|
|
|
(t) => t.coId === this.dataForm.coId
|
|
|
- ).coCode
|
|
|
- this.dataForm.typeName = this.productTypeOption.find(
|
|
|
+ )
|
|
|
+ if (find1) {
|
|
|
+ this.dataForm.coCode = find1.coCode
|
|
|
+ }
|
|
|
+ let find2 = this.productTypeOption.find(
|
|
|
(t) => t.value === this.dataForm.type
|
|
|
- ).label
|
|
|
- this.dataForm.productName = this.productIdOption.find(
|
|
|
+ )
|
|
|
+ if (find2) {
|
|
|
+ this.dataForm.typeName = find2.label
|
|
|
+ }
|
|
|
+ let find3 = this.productIdOption.find(
|
|
|
(t) => t.value === this.dataForm.productId
|
|
|
- ).label
|
|
|
+ )
|
|
|
+ if (find3) {
|
|
|
+ this.dataForm.productName = find3.label
|
|
|
+ }
|
|
|
|
|
|
this.productIdChangeHandle(this.dataForm.productId)
|
|
|
|
|
|
@@ -428,7 +437,7 @@ export default {
|
|
|
)
|
|
|
|
|
|
// 初始化审批Form
|
|
|
- this.showApproveForm(businessType, this.id)
|
|
|
+ this.showApproveForm(businessType, id)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -478,6 +487,20 @@ export default {
|
|
|
} else {
|
|
|
this.productList = []
|
|
|
}
|
|
|
+ },
|
|
|
+ // 初始化审批Form
|
|
|
+ showApproveForm (businessType, businessId) {
|
|
|
+ console.log('businessType = ' + businessType + ', businessId = ' + businessId)
|
|
|
+ if (this.isFlow) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.approve.init(businessType, businessId)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 审批完成
|
|
|
+ approveFinished () {
|
|
|
+ this.onChose()
|
|
|
+ this.$emit('approveFinished')
|
|
|
}
|
|
|
}
|
|
|
}
|