|
|
@@ -1,6 +1,6 @@
|
|
|
<script setup lang="ts">
|
|
|
import {ref, computed, onMounted} from "vue";
|
|
|
-import {ElMessage, FormInstance, FormRules} from 'element-plus';
|
|
|
+import {ElMessage, ElMessageBox, FormInstance, FormRules} from 'element-plus';
|
|
|
import { ArrowDown, Printer, Download } from '@element-plus/icons-vue';
|
|
|
import {OrderReportApi} from "@/api/pressure2/orderreport";
|
|
|
import {SpreadViewer} from "@/components/DynamicReport";
|
|
|
@@ -14,6 +14,7 @@ const props = defineProps({
|
|
|
type: String,
|
|
|
serviceFormReceiver: String,
|
|
|
serviceFormReceiverPhone: String,
|
|
|
+ actualAmount: { type: Number, default: 0 },
|
|
|
});
|
|
|
const visible = defineModel('visible', { type: Boolean, default: false });
|
|
|
// 多报告支持
|
|
|
@@ -119,6 +120,20 @@ const handlePushClose = () => { pushDialogVisible.value = false }
|
|
|
const handlePushConfirm = async () => {
|
|
|
const valid = await pushDialogFormRef.value?.validate().catch(() => false)
|
|
|
if (!valid) return
|
|
|
+
|
|
|
+ // 金额为 0 时提醒确认
|
|
|
+ if (!props.actualAmount || props.actualAmount === 0) {
|
|
|
+ try {
|
|
|
+ await ElMessageBox.confirm('任务单中金额为0,是否继续推送', '提示', {
|
|
|
+ confirmButtonText: '继续推送',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ } catch {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
submitting.value = true
|
|
|
try {
|
|
|
if (pushFormType.value === 'wx') {
|