|
@@ -137,11 +137,11 @@
|
|
|
<HcIcon name="save"/>
|
|
|
<span>保存</span>
|
|
|
</el-button>
|
|
|
- <el-button hc-btn :disabled="!contractId || !isTableForm" @click="bussPdfInfo">
|
|
|
+ <el-button hc-btn :disabled="!contractId || !isTableForm || !tableFormId" @click="bussPdfInfo">
|
|
|
<HcIcon name="eye"/>
|
|
|
<span>预览</span>
|
|
|
</el-button>
|
|
|
- <el-button hc-btn :disabled="!contractId || !isTableForm" :loading="reportLoading" @click="reportModalClick">
|
|
|
+ <el-button hc-btn :disabled="!contractId || !isTableForm || !tableFormId" :loading="reportLoading" @click="reportModalClick">
|
|
|
<HcIcon name="send-plane-2"/>
|
|
|
<span>上报</span>
|
|
|
</el-button>
|
|
@@ -497,11 +497,12 @@ const saveBussData = async () => {
|
|
|
|
|
|
//保存请求
|
|
|
const tableFormSaveLoading = ref(false)
|
|
|
+const tableFormId = ref('')
|
|
|
const saveExcelBussData = async (pkeyId) => {
|
|
|
+ tableFormId.value = ''
|
|
|
const { primaryKeyId } = treeItem.value
|
|
|
tableFormSaveLoading.value = true
|
|
|
const linkIds = rowsToArr(tableFileData.value);
|
|
|
- console.log(tableFormData.value)
|
|
|
const { error, code, data } = await firstApi.saveBussData({
|
|
|
...tableFormData.value,
|
|
|
projectId: projectId.value,
|
|
@@ -517,9 +518,11 @@ const saveExcelBussData = async (pkeyId) => {
|
|
|
tableFormSaveLoading.value = false
|
|
|
if (!error && code === 200 && isString(data)) {
|
|
|
window.$message?.success('保存成功')
|
|
|
+ tableFormId.value = data
|
|
|
return data
|
|
|
} else {
|
|
|
window.$message?.error('保存失败')
|
|
|
+ tableFormId.value = ''
|
|
|
return ''
|
|
|
}
|
|
|
}
|
|
@@ -532,7 +535,6 @@ const bussPdfInfo = () => {
|
|
|
|
|
|
//预览PDF请求
|
|
|
const getBussPdfInfo = async (pkeyId) => {
|
|
|
- //const liunkIds = rowsToId(tableFileData.value)
|
|
|
const { error, code, data } = await firstApi.getFirstBussPdfInfo({
|
|
|
firstId: pkeyId
|
|
|
})
|
|
@@ -552,14 +554,23 @@ const reportLoading = ref(false)
|
|
|
const reportTypeData = ref('')
|
|
|
const reportModalClick = async () => {
|
|
|
const { primaryKeyId, contractIdRelation } = treeItem.value
|
|
|
- const rows = tableFileData.value
|
|
|
+ let rows = [];
|
|
|
+ //处理获取流程的条件
|
|
|
+ if (tabTypeKey.value === 'mark') {
|
|
|
+ reportTypeData.value = tableFormId.value
|
|
|
+ rows = tableFileData.value
|
|
|
+ } else {
|
|
|
+ rows = tableSelectionKeys.value
|
|
|
+ }
|
|
|
if (rows.length > 0) {
|
|
|
reportLoading.value = true
|
|
|
const taskCheck = await eVisaTaskCheckApi({
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value
|
|
|
})
|
|
|
- reportTypeData.value = rows[0]['id']
|
|
|
+ if (tabTypeKey.value === 'query') {
|
|
|
+ reportTypeData.value = rows[0]['id']
|
|
|
+ }
|
|
|
reportLoading.value = false
|
|
|
if (taskCheck) {
|
|
|
reportIds.value = rowsToId(rows)
|