Commit eb7d25f6 by cen

fix: 活动中心

1 parent 29738c7c
......@@ -273,34 +273,58 @@ export function exportMerchantList(data) {
export function getReportList(data) {
data.method = "dj.api.smartcarlife.staff.missing.reception.report.list"
return new Promise((resolve, reject) => {
resolve({
pageNum: 0,
pageSize: 10,
total: 25,
pages: 1,
list: [
{
id: 0,
staffUuid: "string",
staffName: "string",
staffPhone: "string",
merchantId: 0,
merchantName: "string",
reportDate: "string",
customerName: "string",
reason: "string",
reportRemark: "string",
auditStatus: "string",
auditUser: "string",
auditTime: "2025-10-28T06:03:41.538Z",
auditOpinion: "string",
createdBy: "string",
createdDate: "2025-10-28T06:03:41.538Z",
updatedBy: "string",
updatedDate: "2025-10-28T06:03:41.538Z"
}
]
})
})
return request(data, RequestMethods.POST)
}
/**
*
* 批量通过/驳回
*/
export function reportBatchApproval(data) {
data.method =
"dj.api.smartcarlife.staff.missing.reception.report.batch.approval"
return request(data, RequestMethods.POST)
}
/**
*
* 审核/重新审核
*/
export function reportApproval(data) {
data.method = "dj.api.smartcarlife.staff.missing.reception.report.approval"
return request(data, RequestMethods.POST)
}
/**
*
* 重新审核拿历史审核记录
*/
export function reportDetail(data) {
data.method = "dj.api.smartcarlife.staff.missing.reception.report.detail"
return request(data, RequestMethods.POST)
}
/**
*
* 接待缺失报备导出
*/
export function reportExport(data) {
data.method = "dj.api.smartcarlife.staff.missing.reception.report.export"
return request(data, RequestMethods.POST)
}
/**
*
* 查询直营门店
*/
export function merchantList(data) {
data.method =
"dj.api.smartcarlife.staff.missing.reception.report.merchant.list"
return request(data, RequestMethods.POST)
}
/**
*
* 查询所有缺失原因
*/
export function reasonList(data) {
data.method = "dj.api.smartcarlife.staff.missing.reception.report.reason.list"
return request(data, RequestMethods.POST)
}
......@@ -51,7 +51,7 @@ process.env.NODE_ENV === "production" &&
tracesSampleRate: 1.0,
logErrors: true,
// 解决火狐浏览器 无法捕获错误的问题
beforeSend (event, hint) {
beforeSend(event, hint) {
const isNonErrorException =
event.exception.values[0].value.startsWith(
"Non-Error exception captured"
......@@ -135,7 +135,6 @@ fetch(
baseConfig = data
// console.log("baseConfig", baseConfig)
// window.$fetchConfig = data
} else {
baseConfig = response
window.$fetchConfig = response
......@@ -146,7 +145,7 @@ fetch(
// baseURL: 'http://192.168.1.103:5006',
session: {
requiresSession: true,
sessionId: _ => util.cookies.get("token")
sessionId: (_) => util.cookies.get("token")
},
events: {
error: (error, config) => {
......@@ -156,17 +155,17 @@ fetch(
store.dispatch("d2admin/user/clear")
util.cookies.remove("token")
router.replace("/login")
Vue.prototype.$message.error('登录超时,请重新登录')
Vue.prototype.$message.error("登录超时,请重新登录")
}
}
})
console.log(window.$gscApi, '========')
console.log(window.$gscApi, "========")
}
})
.finally(() => {
init()
})
function init () {
function init() {
new Vue({
router,
store,
......@@ -179,7 +178,7 @@ function init () {
Vue.prototype.baseConfig = baseConfig
return h(App)
},
created () {
created() {
// 系统配置
Vue.config.devtools = true
// 展示系统信息
......@@ -191,7 +190,7 @@ function init () {
// 初始化全屏监听
this.$store.dispatch("d2admin/fullscreen/listen")
},
mounted () { }
mounted() {}
}).$mount("#app")
}
export { baseConfig }
......@@ -205,6 +205,7 @@ export default {
{
required: true,
validator: (rule, value, callback) => {
console.log(value)
// 检查是否所有周期都有值
const hasEmpty = value.some(
(item) => !item.cycleName || item.cycleName.trim() === ""
......@@ -414,6 +415,7 @@ export default {
var params = {}
params.method =
"dj.api.script.activity.award.winner.import.template.export.async"
params.moduleName = "script"
const list = [
...this.dowloadList,
{
......
......@@ -13,7 +13,7 @@
ref="formRef"
label-width="150px"
default-width="350px"
:form-ref="examineRef"
:form-ref="rejectRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"
......@@ -26,10 +26,7 @@
</template>
<script>
import {
transferAccountsRecordUpdateStatus,
batchOperatorAudit
} from "@api/transferAccountsManage"
import { reportBatchApproval } from "@/api/earlyWarningManager"
import { deepClone } from "@/common/util"
export default {
name: "ExamineDialog",
......@@ -51,6 +48,7 @@ export default {
formRules: {
// sendOutMerchantId: [{ required: true, message: '请选择发货主体', trigger: 'change' }]
},
rejectRef: "rejectRef",
editFormData: [
{
label: "审核意见",
......@@ -84,6 +82,10 @@ export default {
infoList: {
type: Array,
default: () => {}
},
auditStatus: {
type: Number,
default: 1
}
},
computed: {
......@@ -97,29 +99,39 @@ export default {
}
},
mounted() {},
mounted() {
this.dialogConfig.title =
this.auditStatus === 1 ? "批量通过审核" : "批量驳回审核"
this.formRules =
this.auditStatus === 2
? {
remark: [
{ required: true, message: "请填写审核意见", trigger: "blur" }
]
}
: {}
},
methods: {
handleAddConfirm() {
var params = {}
params.remark = this.infoForm.remark
params.status = 2
if (this.infoList.length > 1) {
params.orderCodeList = this.infoList.map((item) => {
return item.orderCode
})
} else {
params.orderCode = this.infoList[0].orderCode
}
console.log(params)
const _api =
this.infoList.length > 1
? batchOperatorAudit
: transferAccountsRecordUpdateStatus
_api(params).then((res) => {
this.notice.okTips("操作成功")
this.visible = true
this.$refs.formRef.$refs[this.rejectRef].validate((valid) => {
if (valid) {
var params = {}
params.remark = this.infoForm.remark
params.auditStatus = this.auditStatus
if (this.infoList.length > 1) {
params.ids = this.infoList.map((item) => {
return item.id
})
} else {
params.id = this.infoList[0].id
}
console.log(params)
reportBatchApproval(params).then((res) => {
this.notice.okTips("操作成功")
this.visible = true
})
}
})
}
}
......
......@@ -18,10 +18,10 @@
</div>
<div class="d2-container-content">
<d2-table-header title="审核列表">
<el-button size="small" type="primary" @click="handleBatchExamine">
<el-button size="small" type="primary" @click="handleBatchExamine(1)">
批量通过
</el-button>
<el-button size="small" type="primary" @click="handleReject">
<el-button size="small" type="primary" @click="handleBatchExamine(2)">
批量驳回
</el-button>
<el-button size="small" type="primary" @click="jumpAdd">
......@@ -29,10 +29,11 @@
</el-button>
</d2-table-header>
<d2-table
ref="detailListTable"
:search-form="searchForm"
ref="table"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
>
<template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleAudits(scope.scope)">
......@@ -50,6 +51,7 @@
<examine-dialog
:examine-visible="examineVisible"
:info-list="infos"
:audit-status="auditStatus"
v-if="examineVisible"
@dialogClose="examineDialogClose"
/>
......@@ -73,10 +75,14 @@
import examineDialog from "./components/examineDialog"
import rejectDialog from "./components/rejectDialog"
import auditsDialog from "./components/auditsDialog"
import { getReportList } from "@/api/earlyWarningManager"
import {
getReportList,
reasonList,
merchantList
} from "@/api/earlyWarningManager"
import dayjs from "dayjs"
// import { ACTIVITY_STATUS_OPTIONS } from "../constant"
import { Util } from "@/common/util"
import { Util, deepClone } from "@/common/util"
export default {
name: "FailureToReportReception",
components: {
......@@ -97,32 +103,44 @@ export default {
type: "input",
keyFn: this.keyDowmGetList,
placeholder: "请输入",
maxlength: 20,
isClear: true
},
{
label: "员工手机号",
name: "staffPhone",
type: "input",
maxlength: 11,
inputType: "number",
keyFn: this.keyDowmGetList,
placeholder: "请输入",
isClear: true
},
{
label: "审核状态",
name: "auditStatus",
type: "select",
optionList: [],
optionId: "merchantId",
optionLabel: "merchantName",
optionsName: "parkServiceList",
changeAttr: (value, targetItem) => {
value
? this.getServiceStore(value)
: (this.baseData.storeIdList = [])
this.searchForm.merchantId = ""
this.getOptionsList()
}
optionList: [
{
id: "",
label: "全部"
},
{
id: 1,
label: "待审核"
},
{
id: 2,
label: "已通过"
},
{
id: 3,
label: "已驳回"
}
],
optionId: "id",
optionLabel: "label",
optionsName: "parkServiceList"
},
{
label: "所属门店",
......@@ -136,7 +154,7 @@ export default {
},
{
label: "缺失原因",
name: "customerStatus",
name: "reasonCode",
type: "select",
optionList: [],
optionId: "confId",
......@@ -146,15 +164,17 @@ export default {
{
label: "报备时间",
name: "successTime",
name: "createdDate",
type: "datePicker",
isClear: true,
dateType: "datetimerange",
pickerOptions: "rangePickerOptions"
},
{
label: "创建时间",
name: "createTime",
label: "创建日期",
name: "reportDate",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
}
......@@ -163,8 +183,10 @@ export default {
customerStatus: "",
sellerMerchantId: "",
merchantId: "",
source: ""
createdDate: [new Date().getTime() - 3600 * 1000 * 24 * 90, new Date()],
reportDate: []
},
searchFormSearch: {},
getListApi: getReportList,
tableParams: {
listName: "list",
......@@ -242,15 +264,20 @@ export default {
prop: "auditOpinion"
}
]
}
},
auditStatus: 1
}
},
mounted() {
this.getOptionsList()
},
methods: {
handleAudits() {
this.auditsVisible = true
},
handleBatchExamine() {
handleBatchExamine(type) {
this.examineVisible = true
this.auditStatus = type
},
handleReject() {
this.rejectVisible = true
......@@ -288,6 +315,67 @@ export default {
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
getOptionsList() {
merchantList().then((res) => {
this.showFormData.forEach((item, index) => {
if (item.name === "merchantId") {
const options = res.map((item) => ({
merchantId: item.merchantId,
merchantName: item.merchantName
}))
this.$set(this.showFormData[index], "optionList", options)
}
})
})
reasonList().then((res) => {
this.showFormData.forEach((item, index) => {
if (item.name === "reasonCode") {
const options = res.map((item) => ({
reason: item.reasonCode,
reasonCode: item.reasonCode
}))
this.$set(this.showFormData[index], "optionList", options)
}
})
})
},
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchForm?.reportDate?.length) {
const [searchStartDate, searchEndDate] = this.searchForm.reportDate
this.searchFormSearch.reportStartDate = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD"
)
this.searchFormSearch.reportEndDate = Util.dateFormate(
searchEndDate,
"YYYY-MM-DD"
)
}
if (this.searchForm?.createdDate?.length) {
const [searchStartDate, searchEndDate] = this.searchForm.createdDate
this.searchFormSearch.createdStartDate = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD HH:mm"
)
this.searchFormSearch.createdEndDate = Util.dateFormate(
searchEndDate,
"YYYY-MM-DD HH:mm"
)
}
delete this.searchFormSearch.reportDate
delete this.searchFormSearch.createdDate
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
},
examineDialogClose() {
this.examineVisible = false
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!