Commit eb7d25f6 by cen

fix: 活动中心

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