未确认收款
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -27,15 +27,15 @@
|
||||
<el-form-item label="买家ID">
|
||||
<el-input v-model="queryParams.buyerId" clearable placeholder="买家 id" style="width: 140px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="卖家ID">
|
||||
<el-input v-model="queryParams.sellerId" clearable placeholder="卖家 id" style="width: 140px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="昵称">
|
||||
<el-input v-model="queryParams.consignee" clearable placeholder="昵称" style="width: 140px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="电话">
|
||||
<el-input v-model="queryParams.phone" clearable placeholder="电话" style="width: 140px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="卖家ID">
|
||||
<el-input v-model="queryParams.sellerId" clearable placeholder="卖家 id" style="width: 140px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-delete" @click="resetQuery">清空</el-button>
|
||||
@@ -47,15 +47,18 @@
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
<el-button type="default" icon="el-icon-refresh" style="margin-left: 10px" @click="openSyncDialog">同步订单</el-button>
|
||||
<el-button type="default" icon="el-icon-s-data" style="margin-left: 10px" @click="openDailySumDialog">汇总天数据</el-button>
|
||||
<el-button type="default" icon="el-icon-message" style="margin-left: 10px" @click="openDingTalkConfirmDialog">通知确认收款发到钉钉</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card class="table-container" shadow="never">
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%">
|
||||
<el-table-column label="订单号" prop="orderSn" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="买家ID" prop="buyerId" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="卖家ID" prop="sellerId" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="收货人" prop="consignee" min-width="90" show-overflow-tooltip />
|
||||
<el-table-column label="电话" prop="phone" min-width="110" show-overflow-tooltip />
|
||||
<el-table-column label="卖家ID" prop="sellerId" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="卖家姓名" prop="sellerName" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="卖家电话" prop="sellerPhone" min-width="110" show-overflow-tooltip />
|
||||
<el-table-column label="总金额" prop="totalMoney" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="当天未寄卖单数" prop="todayUnresellCount" min-width="130" align="center" />
|
||||
<el-table-column label="当天交易单数" prop="todayOrderCount" min-width="120" align="center" />
|
||||
@@ -117,11 +120,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="卖家ID" prop="sellerId">
|
||||
<el-input v-model="form.sellerId" placeholder="卖家 id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="买家ID" prop="buyerId">
|
||||
<el-input v-model="form.buyerId" placeholder="买家 id" />
|
||||
@@ -173,6 +171,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="卖家ID" prop="sellerId">
|
||||
<el-input v-model="form.sellerId" placeholder="卖家 id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="省" prop="province">
|
||||
@@ -265,6 +270,33 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="通知确认收款发到钉钉" :visible.sync="dingTalkConfirmDialogVisible" width="520px" @close="resetDingTalkConfirmForm">
|
||||
<el-form ref="dingTalkConfirmFormRef" :model="dingTalkConfirmForm" :rules="dingTalkConfirmFormRules" label-width="110px">
|
||||
<el-form-item label="抢购时间" prop="buyTimeRange">
|
||||
<el-date-picker
|
||||
v-model="dingTalkConfirmForm.buyTimeRange"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
@change="handleDingTalkConfirmBuyTimeRangeChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户ID" prop="tenantId">
|
||||
<el-input v-model="dingTalkConfirmForm.tenantId" clearable placeholder="请输入租户ID" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dingTalkConfirmDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="dingTalkConfirmSubmitLoading" @click="handleDingTalkConfirmSubmit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="同步订单" :visible.sync="syncDialogVisible" width="520px" @close="resetSyncForm">
|
||||
<el-form ref="syncFormRef" :model="syncForm" :rules="syncFormRules" label-width="110px">
|
||||
<el-form-item label="购买时间" prop="buyTimeRange">
|
||||
@@ -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
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user