对接Pre-Homo流程

This commit is contained in:
范强强
2023-06-13 17:46:46 +08:00
parent 137daea3d6
commit b7c27bbd35
@@ -60,7 +60,7 @@
</div> </div>
<div class="content-box-type-text-one" <div class="content-box-type-text-one"
v-else v-else
@click="dataSourceFileClick(item)" @click="deliverablesResultFileClick(item)"
v-for="item in dataSourceFile"> v-for="item in dataSourceFile">
{{item.fileName}} {{item.fileName}}
</div> </div>
@@ -71,17 +71,23 @@
<!-- {{queryProject[queryData.remarks] || '&#45;&#45;'}}--> <!-- {{queryProject[queryData.remarks] || '&#45;&#45;'}}-->
<!-- </div>--> <!-- </div>-->
</van-collapse-item> </van-collapse-item>
<van-collapse-item v-if="queryForm.deliveryResult" :title="$t('DeliverablesResult')" name="3"> <van-collapse-item v-if="queryForm.deliveryResult"
:title="$t('DeliverablesResult')" name="3">
<!-- v-for="item in deliverablesResultFile"--> <!-- v-for="item in deliverablesResultFile"-->
<!-- {{item.fileName}}--> <!-- {{item.fileName}}-->
<div class="content-box-type-text-one" <div class="content-box-type-text-one"
v-if="queryForm.valueType == 'file'"
v-for="item in deliveryResultList"
@click="deliverablesResultFileClick(item)"> @click="deliverablesResultFileClick(item)">
客户收到付款就的航空技术的发货的收费但是.pdf {{item.fileName}}
</div> </div>
<div class="content-box-type-text-one" <div class="content-box-type-text-one-select"
@click="deliverablesResultFileClick(item)"> v-if="queryForm.valueType == 'select'">
客户收到付款就的航空技术的发货的收费但是.pdf {{queryForm.deliveryResult == '1' ? $t('yes') :$t('not')}}
</div>
<div class="content-box-type-text-one-select"
v-if="queryForm.valueType == 'text'">
{{queryForm.deliveryResult}}
</div> </div>
</van-collapse-item> </van-collapse-item>
<van-collapse-item :title="$t('sponsorReview')" name="4"> <van-collapse-item :title="$t('sponsorReview')" name="4">
@@ -228,6 +234,7 @@
import { Dialog, Toast } from 'vant' import { Dialog, Toast } from 'vant'
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import { kkFileView } from '@/utils/kkfileView'
import axios from 'axios' import axios from 'axios'
export default { export default {
@@ -245,6 +252,7 @@
queryProject: {}, queryProject: {},
dataSourceFile: [], dataSourceFile: [],
deliverablesResultFile: [], deliverablesResultFile: [],
deliveryResultList: [],
url: { url: {
queryProjectCertificationInventoryById: '/phone/toDoCenter/queryProjectCertificationInventoryById', queryProjectCertificationInventoryById: '/phone/toDoCenter/queryProjectCertificationInventoryById',
saveBatch: '/project/projectCertificationInventoryEO/saveBatch' saveBatch: '/project/projectCertificationInventoryEO/saveBatch'
@@ -259,6 +267,39 @@
iconClick() { iconClick() {
this.$router.go(-1) this.$router.go(-1)
}, },
getFileInfos(item) {
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) {
this.deliveryResultList = res.result
this.deliveryResultList.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
} else {
this.deliveryResultList = []
}
})
},
getDeliveryResult(item) {
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) {
this.dataSourceFile = res.result
this.dataSourceFile.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
} else {
this.dataSourceFile = []
}
})
},
disposeResultChange(value) { disposeResultChange(value) {
if (value == 'rzgcssc_tg') { if (value == 'rzgcssc_tg') {
this.form.reasonForReturn = '' this.form.reasonForReturn = ''
@@ -274,6 +315,8 @@
this.form = { ...this.form } this.form = { ...this.form }
}, },
onSubmit() { onSubmit() {
this.textLoading = this.$t('Submitting')
this.show = true
if (this.$route.query.taskDefinitionKey == 'Task Review') { if (this.$route.query.taskDefinitionKey == 'Task Review') {
this.ApprovedClick() this.ApprovedClick()
} else if (this.$route.query.taskDefinitionKey == 'Task handling') { } else if (this.$route.query.taskDefinitionKey == 'Task handling') {
@@ -293,6 +336,7 @@
if (res.success) { if (res.success) {
Toast(this.$t('OperationSuccessful')) Toast(this.$t('OperationSuccessful'))
this.$router.go(-1) this.$router.go(-1)
this.show = false
} else { } else {
Toast(this.$t('operationFailed')) Toast(this.$t('operationFailed'))
} }
@@ -326,6 +370,7 @@
if (res.success) { if (res.success) {
Toast(this.$t('OperationSuccessful')) Toast(this.$t('OperationSuccessful'))
this.$router.go(-1) this.$router.go(-1)
this.show = false
} else { } else {
Toast(this.$t('operationFailed')) Toast(this.$t('operationFailed'))
} }
@@ -342,6 +387,13 @@
getAction(this.url.queryProjectCertificationInventoryById, { id: this.$route.query.id }).then((res) => { getAction(this.url.queryProjectCertificationInventoryById, { id: this.$route.query.id }).then((res) => {
if (res.success) { if (res.success) {
this.queryForm = res.result || {} this.queryForm = res.result || {}
if (this.queryForm.deliveryResult && this.queryForm.valueType == 'file') {
this.getFileInfos(this.queryForm.deliveryResult)
}
if (this.queryForm.deliverableTemplate) {
this.getDeliveryResult(this.queryForm.deliverableTemplate)
}
this.queryForm = { ...this.queryForm }
} else { } else {
this.queryForm = {} this.queryForm = {}
} }
@@ -381,6 +433,9 @@
this.fileList.splice(index, 1) this.fileList.splice(index, 1)
this.form.disposeResult.splice(index, 1) this.form.disposeResult.splice(index, 1)
this.form = { ...this.form } this.form = { ...this.form }
},
deliverablesResultFileClick(item) {
kkFileView(item.fileName, item.id)
} }
} }
} }
@@ -500,6 +555,14 @@
word-break: break-all; word-break: break-all;
} }
.content-box-type-text-one-select {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
word-break: break-all;
}
.content-box-type-text-one:last-child { .content-box-type-text-one:last-child {
margin-bottom: 0.1rem; margin-bottom: 0.1rem;
} }