|
@@ -145,16 +145,18 @@
|
|
|
</div>
|
|
|
|
|
|
<!--批量上报审批-->
|
|
|
- <HcReportModal title="批量上报审批"
|
|
|
- url="informationWriteQuery/batchTask"
|
|
|
- :show="showReportModal"
|
|
|
- :projectId="projectId"
|
|
|
- :contractId="contractId"
|
|
|
- :taskName="reportTaskName"
|
|
|
- :ids="reportIds"
|
|
|
- :addition="reportAddition"
|
|
|
- @hide="showReportModal = false"
|
|
|
- @finish="showReportFinish"
|
|
|
+ <HcReportModal title="批量上报审批"
|
|
|
+ url="informationWriteQuery/batchTask"
|
|
|
+ :show="showReportModal"
|
|
|
+ :projectId="projectId"
|
|
|
+ :contractId="contractId"
|
|
|
+ :taskName="reportTaskName"
|
|
|
+ :ids="reportIds"
|
|
|
+ isDatas
|
|
|
+ :datas="reportDatas"
|
|
|
+ @hide="showReportModal = false"
|
|
|
+ @finish="showReportFinish"
|
|
|
+ @tagClose="reportTaskTagClose"
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -278,9 +280,7 @@ const getReportNumber = async () => {
|
|
|
})
|
|
|
//判断状态
|
|
|
if (!error && code === 200) {
|
|
|
- console.log(data)
|
|
|
- //let res = getArrValue(data);
|
|
|
- reportBatchData.value = []
|
|
|
+ reportBatchData.value = getArrValue(data)
|
|
|
} else {
|
|
|
reportBatchData.value = []
|
|
|
}
|
|
@@ -405,7 +405,7 @@ const tableRowName = (row) => {
|
|
|
//上报
|
|
|
const reportIds = ref('')
|
|
|
const reportTaskName = ref('')
|
|
|
-const reportAddition = ref({})
|
|
|
+const reportDatas = ref([])
|
|
|
const showReportModal = ref(false)
|
|
|
const reportLoading = ref(false)
|
|
|
const reportModalClick = async () => {
|
|
@@ -421,20 +421,37 @@ const reportModalClick = async () => {
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value
|
|
|
})
|
|
|
- reportLoading.value = false
|
|
|
if (taskCheck) {
|
|
|
- //const info = nodeDataInfo.value;
|
|
|
+ //初始ID
|
|
|
const row = getObjValue(rows[0])
|
|
|
reportIds.value = rowsToId(rows)
|
|
|
+ //设置任务数据
|
|
|
+ let reportDataArr = []
|
|
|
+ rows.forEach(item => {
|
|
|
+ reportDataArr.push({
|
|
|
+ id: item?.id,
|
|
|
+ name: item?.name
|
|
|
+ })
|
|
|
+ })
|
|
|
+ reportDatas.value = reportDataArr
|
|
|
//设置任务名称
|
|
|
reportTaskName.value = rows.length > 1 ? `${row.name}等${rows.length}个文件` : row.name
|
|
|
- //reportAddition.value = {contractIdRelation: info['contractIdRelation']}
|
|
|
+ reportLoading.value = false
|
|
|
showReportModal.value = true
|
|
|
+ } else {
|
|
|
+ reportLoading.value = false
|
|
|
}
|
|
|
} else {
|
|
|
window.$message?.warning('已上报的文件不能进行再次上报,若要重新上报,要先撤回之前的上报,再重新上报')
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+//上报的审批内容移除
|
|
|
+const reportTaskTagClose = (index) => {
|
|
|
+ const row = tableCheckedKeys.value[index];
|
|
|
+ tableListRef.value?.toggleRowSelection(row,false)
|
|
|
+}
|
|
|
+
|
|
|
//上报完成
|
|
|
const showReportFinish = () => {
|
|
|
showReportModal.value = false
|