|
@@ -51,6 +51,12 @@
|
|
<span>批量打印</span>
|
|
<span>批量打印</span>
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
|
|
+ <HcTooltip keys="tentative_detect_test_print">
|
|
|
|
+ <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="reportPdfLoading" @click="reportPdfClick">
|
|
|
|
+ <HcIcon name="printer"/>
|
|
|
|
+ <span>批量上报</span>
|
|
|
|
+ </el-button>
|
|
|
|
+ </HcTooltip>
|
|
<HcTooltip keys="tentative_detect_test_quit">
|
|
<HcTooltip keys="tentative_detect_test_quit">
|
|
<el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="quitPdfLoading" @click="quitPdfClick">
|
|
<el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="quitPdfLoading" @click="quitPdfClick">
|
|
<HcIcon name="printer"/>
|
|
<HcIcon name="printer"/>
|
|
@@ -172,6 +178,9 @@
|
|
<HcDialog :show="samplingRecordModal" title="查看样品信息" widths="60%" :footer="false" isTable @close="samplingRecordModalClose">
|
|
<HcDialog :show="samplingRecordModal" title="查看样品信息" widths="60%" :footer="false" isTable @close="samplingRecordModalClose">
|
|
<HcTable :column="samplingTableColumn" :datas="samplingTableData" :loading="samplingTableLoading" :isIndex="false"></HcTable>
|
|
<HcTable :column="samplingTableColumn" :datas="samplingTableData" :loading="samplingTableLoading" :isIndex="false"></HcTable>
|
|
</HcDialog>
|
|
</HcDialog>
|
|
|
|
+ <!--批量上报审批-->
|
|
|
|
+ <HcReportModal title="批量上报审批" url="informationWriteQuery/batchTask" :show="showReportModal" :projectId="projectId" :contractId="contractId" type="wbs" :typeData="reportTypeData"
|
|
|
|
+ :taskName="reportTaskName" :ids="reportIds" :addition="reportAddition" :trialSelfInspectionRecordId="1" @hide="showReportModal = false" @finish="showReportFinish"/>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -187,6 +196,8 @@ import HcDragUpload from "./components/HcDragUpload.vue"
|
|
import dataApi from "~api/tentative/detect/test";
|
|
import dataApi from "~api/tentative/detect/test";
|
|
import {delMessage, rowsToId} from "~uti/tools";
|
|
import {delMessage, rowsToId} from "~uti/tools";
|
|
import {getDictionary} from "~api/other";
|
|
import {getDictionary} from "~api/other";
|
|
|
|
+import { eVisaTaskCheckApi} from "~api/other"
|
|
|
|
+import wbsApi from "~api/data-fill/wbs"
|
|
|
|
|
|
//变量
|
|
//变量
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -520,6 +531,67 @@ const quitPdfClick = async () => {
|
|
window.$message?.warning('请先勾选需要批量打印的记录')
|
|
window.$message?.warning('请先勾选需要批量打印的记录')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+//批量上报
|
|
|
|
+const reportPdfLoading = ref(false)
|
|
|
|
+//批量上报
|
|
|
|
+const reportIds = ref('')
|
|
|
|
+const reportTaskName = ref('')
|
|
|
|
+const reportAddition = ref({})
|
|
|
|
+const showReportModal = ref(false)
|
|
|
|
+const reportLoading = ref(false)
|
|
|
|
+const reportTypeData = ref([])
|
|
|
|
+const reportPdfClick = async () => {
|
|
|
|
+ const rows = tableCheckedKeys.value;
|
|
|
|
+ if (rows.length > 0) {
|
|
|
|
+ const info = getStoreData('prenodeDataInfo') || {}
|
|
|
|
+ console.log(info,'info');
|
|
|
|
+ const rows = tableCheckedKeys.value;
|
|
|
|
+ if (rows.length > 0) {
|
|
|
|
+ reportLoading.value = true
|
|
|
|
+ const taskCheck = await eVisaTaskCheckApi({
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+ contractId: contractId.value
|
|
|
|
+ })
|
|
|
|
+ //处理数据
|
|
|
|
+ let newArr = [];
|
|
|
|
+ console.log(rows,'rows');
|
|
|
|
+ for (let i = 0; i < rows.length; i++) {
|
|
|
|
+ newArr.push(rows[i]['tableIds'])
|
|
|
|
+ }
|
|
|
|
+ reportTypeData.value = [...newArr];
|
|
|
|
+ console.log( reportTypeData.value,' reportTypeData.value');
|
|
|
|
+ reportLoading.value = false
|
|
|
|
+ if (taskCheck) {
|
|
|
|
+ //初始弹出弹窗,防呆
|
|
|
|
+ reportIds.value = info['primaryKeyId']
|
|
|
|
+ reportAddition.value = {
|
|
|
|
+ classify: authBtnTabKey.value,
|
|
|
|
+ contractIdRelation: info['contractIdRelation'],
|
|
|
|
+ }
|
|
|
|
+ showReportModal.value = true
|
|
|
|
+ //请求文件题名
|
|
|
|
+ const {data} = await wbsApi.queryDocumentTitle({
|
|
|
|
+ // primaryKeyId: info['primaryKeyId'],
|
|
|
|
+ primaryKeyId:info['primaryKeyId'],
|
|
|
|
+ classify: authBtnTabKey.value
|
|
|
|
+ })
|
|
|
|
+ reportTaskName.value = isString(data)? data : ''
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ window.$message?.warning('暂无相关数据')
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ window.$message?.warning('请先勾选需要批量打印的记录')
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+//上报完成
|
|
|
|
+const showReportFinish = () => {
|
|
|
|
+ showReportModal.value = false
|
|
|
|
+ getTableData()
|
|
|
|
+}
|
|
|
|
+
|
|
//打印空表
|
|
//打印空表
|
|
const printNullPdfLoading = ref(false)
|
|
const printNullPdfLoading = ref(false)
|
|
const printNullPdfClick = async () => {
|
|
const printNullPdfClick = async () => {
|