|
@@ -133,15 +133,15 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="node-action">
|
|
<div class="node-action">
|
|
- <el-button type="primary" hc-btn :disabled="!contractId || !isTableForm" :loading="tableFormSaveLoading" @click="saveBussData">
|
|
|
|
|
|
+ <el-button type="primary" hc-btn :disabled="!contractId || !isTableForm||NodeStatus === '3'" :loading="tableFormSaveLoading" @click="saveBussData">
|
|
<HcIcon name="save"/>
|
|
<HcIcon name="save"/>
|
|
<span>保存</span>
|
|
<span>保存</span>
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button hc-btn :disabled="!contractId || !isTableForm || !tableFormId" @click="bussPdfInfo">
|
|
|
|
|
|
+ <el-button hc-btn :disabled="!contractId || !isTableForm || !tableFormId||NodeStatus === '1'" @click="bussPdfInfo">
|
|
<HcIcon name="eye"/>
|
|
<HcIcon name="eye"/>
|
|
<span>预览</span>
|
|
<span>预览</span>
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button hc-btn :disabled="!contractId || !isTableForm || !tableFormId" :loading="reportLoading" @click="reportModalClick">
|
|
|
|
|
|
+ <el-button hc-btn :disabled="!contractId || !isTableForm || !tableFormId||NodeStatus === '3' || NodeStatus === '1'" :loading="reportLoading" @click="reportModalClick">
|
|
<HcIcon name="send-plane-2"/>
|
|
<HcIcon name="send-plane-2"/>
|
|
<span>上报</span>
|
|
<span>上报</span>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -185,7 +185,7 @@ import tasksApi from '~api/tasks/data';
|
|
import {getStoreData, setStoreData} from '~src/utils/storage'
|
|
import {getStoreData, setStoreData} from '~src/utils/storage'
|
|
import {getArrValue, isString, getObjValue, getObjNullValue,deepClone} from "vue-utils-plus"
|
|
import {getArrValue, isString, getObjValue, getObjNullValue,deepClone} from "vue-utils-plus"
|
|
import queryApi from "~api/data-fill/query";
|
|
import queryApi from "~api/data-fill/query";
|
|
-
|
|
|
|
|
|
+import wbsApi from "~api/data-fill/wbs";
|
|
//变量
|
|
//变量
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const useRoutes = useRoute()
|
|
const useRoutes = useRoute()
|
|
@@ -259,7 +259,21 @@ const firstTaskStatus = async () => {
|
|
//处理数据
|
|
//处理数据
|
|
processStatus.value = getArrValue(data)
|
|
processStatus.value = getArrValue(data)
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+//查询状态
|
|
|
|
+const NodeStatus = ref('1')
|
|
|
|
+const queryNodeStatus = async () => {
|
|
|
|
+ const info = treeItem.value;
|
|
|
|
+ const {error, code, data} = await wbsApi.queryNodeStatus({
|
|
|
|
+ primaryKeyId: info['contractIdRelation'] ? info['id'] : info['primaryKeyId'],
|
|
|
|
+ classify: 1
|
|
|
|
+ })
|
|
|
|
+ //1 未填报,2待上报,3已上报
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ NodeStatus.value = data ?? '1'
|
|
|
|
+ } else {
|
|
|
|
+ NodeStatus.value = '1'
|
|
|
|
+ }
|
|
|
|
+}
|
|
//获取上报批次
|
|
//获取上报批次
|
|
const reportBatch = ref([])
|
|
const reportBatch = ref([])
|
|
const getReportNumberByContractId = async (cid) => {
|
|
const getReportNumberByContractId = async (cid) => {
|
|
@@ -399,6 +413,7 @@ const firstReportClick = () => {
|
|
//判断状态
|
|
//判断状态
|
|
if (result) {
|
|
if (result) {
|
|
isFirstReportDrawer.value = true
|
|
isFirstReportDrawer.value = true
|
|
|
|
+ queryNodeStatus()
|
|
tableFileData.value = rows
|
|
tableFileData.value = rows
|
|
getFirstExcelHtml()
|
|
getFirstExcelHtml()
|
|
} else {
|
|
} else {
|
|
@@ -524,11 +539,18 @@ const tableDelButton = (index) => {
|
|
}
|
|
}
|
|
|
|
|
|
//填报数据保存
|
|
//填报数据保存
|
|
|
|
+const pdfId=ref('')
|
|
const saveBussData = async () => {
|
|
const saveBussData = async () => {
|
|
const { id } = treeItem.value
|
|
const { id } = treeItem.value
|
|
const res = await saveExcelBussData(id + '')
|
|
const res = await saveExcelBussData(id + '')
|
|
|
|
+ //刷新页面
|
|
|
|
+ // window?.location?.reload() //刷新页面
|
|
if (res) {
|
|
if (res) {
|
|
|
|
+ pdfId.value=res
|
|
await getBussPdfInfo(res)
|
|
await getBussPdfInfo(res)
|
|
|
|
+ queryNodeStatus()
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -567,7 +589,9 @@ const saveExcelBussData = async (pkeyId) => {
|
|
//pdf预览
|
|
//pdf预览
|
|
const bussPdfInfo = () => {
|
|
const bussPdfInfo = () => {
|
|
const { id } = treeItem.value
|
|
const { id } = treeItem.value
|
|
- getBussPdfInfo(id + '')
|
|
|
|
|
|
+ // getBussPdfInfo(id + '')
|
|
|
|
+ getBussPdfInfo(pdfId.value)
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
//预览PDF请求
|
|
//预览PDF请求
|
|
@@ -655,10 +679,14 @@ const reportTaskTagClose = (index) => {
|
|
const row = tableSelectionKeys.value[index];
|
|
const row = tableSelectionKeys.value[index];
|
|
tableListRef.value?.toggleRowSelection(row,false)
|
|
tableListRef.value?.toggleRowSelection(row,false)
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+const getTableDataAll = () => {
|
|
|
|
+ getTableData()
|
|
|
|
+ firstTaskStatus()
|
|
|
|
+}
|
|
//上报完成
|
|
//上报完成
|
|
const showReportFinish = () => {
|
|
const showReportFinish = () => {
|
|
showReportModal.value = false
|
|
showReportModal.value = false
|
|
|
|
+ getTableDataAll()
|
|
}
|
|
}
|
|
|
|
|
|
//打印
|
|
//打印
|