From 9bf390b3471c3c7ef5fef96fc7407bfa4d85003d Mon Sep 17 00:00:00 2001 From: "zhonghua.li" Date: Mon, 18 May 2026 17:00:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E7=A1=AE=E8=AE=A4=E6=94=B6=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/lb-daily-user-trade.js | 2 +- src/api/lb-order-row.js | 9 ++ src/views/lb-business/order-manage/index.vue | 123 +++++++++++++++++-- 3 files changed, 124 insertions(+), 10 deletions(-) diff --git a/src/api/lb-daily-user-trade.js b/src/api/lb-daily-user-trade.js index 9bbe6fd..5611c7f 100644 --- a/src/api/lb-daily-user-trade.js +++ b/src/api/lb-daily-user-trade.js @@ -73,7 +73,7 @@ export function calculateReportByDateAndTenant(reportDate, tenantId) { return request({ url: '/lbDailyUserTrade/calculate-report/by-date-and-tenant', method: 'post', - timeout: LONG_REQUEST_TIMEOUT, + timeout: 2 * 60 * 1000, params: { reportDate, tenantId diff --git a/src/api/lb-order-row.js b/src/api/lb-order-row.js index 35d06bc..99fafd2 100644 --- a/src/api/lb-order-row.js +++ b/src/api/lb-order-row.js @@ -48,3 +48,12 @@ export function generateLbOrderRowDailySum(data) { data }) } + +/** 按购买时间区间、租户 id 发送卖家确认通知到钉钉 */ +export function sendSellerConfirmToDingTalk(data) { + return request({ + url: '/lbOrderRow/send-seller-confirm-to-dingtalk', + method: 'post', + data + }) +} diff --git a/src/views/lb-business/order-manage/index.vue b/src/views/lb-business/order-manage/index.vue index 93dd55c..33f2706 100644 --- a/src/views/lb-business/order-manage/index.vue +++ b/src/views/lb-business/order-manage/index.vue @@ -27,15 +27,15 @@ - - - + + + 查询 清空 @@ -47,15 +47,18 @@ 新增 同步订单 汇总天数据 + 通知确认收款发到钉钉 - + + + @@ -117,11 +120,6 @@ - - - - - @@ -173,6 +171,13 @@ + + + + + + + @@ -265,6 +270,33 @@ + + + + + + + + + + + + @@ -306,6 +338,7 @@ import { deleteLbOrderRow, generateLbOrderRowDailySum, getLbOrderRowList, + sendSellerConfirmToDingTalk, syncLbOrderRowFromThird, updateLbOrderRow } from '@/api/lb-order-row' @@ -387,6 +420,20 @@ export default { { required: true, message: '请填写租户ID', trigger: 'blur' } ] }, + dingTalkConfirmDialogVisible: false, + dingTalkConfirmSubmitLoading: false, + dingTalkConfirmForm: { + buyTimeRange: null, + tenantId: '' + }, + dingTalkConfirmFormRules: { + buyTimeRange: [ + { required: true, message: '请选择抢购时间区间', trigger: 'change' } + ], + tenantId: [ + { required: true, message: '请填写租户ID', trigger: 'blur' } + ] + }, syncDialogVisible: false, syncSubmitLoading: false, syncForm: { @@ -761,6 +808,64 @@ export default { this.dailySumSubmitLoading = false }) }) + }, + handleDingTalkConfirmBuyTimeRangeChange(range) { + const normalized = this.normalizeSyncBuyTimeRange(range) + if (normalized !== range) { + this.dingTalkConfirmForm.buyTimeRange = normalized + } + }, + openDingTalkConfirmDialog() { + this.dingTalkConfirmForm = { + buyTimeRange: null, + tenantId: this.getTenantIdFromBusinessHeaders() + } + this.dingTalkConfirmDialogVisible = true + this.$nextTick(() => { + this.$refs.dingTalkConfirmFormRef && this.$refs.dingTalkConfirmFormRef.clearValidate() + }) + }, + resetDingTalkConfirmForm() { + this.dingTalkConfirmForm = { + buyTimeRange: null, + tenantId: '' + } + this.$refs.dingTalkConfirmFormRef && this.$refs.dingTalkConfirmFormRef.resetFields() + }, + handleDingTalkConfirmSubmit() { + this.$refs.dingTalkConfirmFormRef.validate((valid) => { + if (!valid) return + const range = this.normalizeSyncBuyTimeRange(this.dingTalkConfirmForm.buyTimeRange) + if (!Array.isArray(range) || range.length !== 2 || !range[0] || !range[1]) { + this.$message.warning('请选择完整的抢购时间区间') + return + } + const tenantId = String(this.dingTalkConfirmForm.tenantId || '').trim() + if (!tenantId) { + this.$message.error('请填写租户ID') + return + } + const payload = { + buyTimeStart: range[0], + buyTimeEnd: range[1], + tenantId + } + this.dingTalkConfirmSubmitLoading = true + sendSellerConfirmToDingTalk(payload) + .then((res) => { + const ok = res && (res.code === 20000 || res.code === 200 || res.success === true) + if (ok) { + this.$message.success((res && res.message) || '发送成功') + this.dingTalkConfirmDialogVisible = false + } else { + this.$message.error((res && res.message) || '发送失败') + } + }) + .catch(() => {}) + .finally(() => { + this.dingTalkConfirmSubmitLoading = false + }) + }) } } }