Commit e509c083 by wangzhihui

Merge branch 'SAAS+V5.6.1' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into SAAS+V5.6.1
2 parents 53241381 0d47db96
...@@ -367,6 +367,19 @@ export const rangePickerOptions_outputValue = { ...@@ -367,6 +367,19 @@ export const rangePickerOptions_outputValue = {
} }
/** /**
* 时间控件-限制只能选当前年份的上一年1月1日至今
*/
export const rangePickerOptions_lastOneYear = {
disabledDate(date) {
const now = new Date()
const lastYearStart = new Date(now.getFullYear() - 1, 0, 1)
lastYearStart.setHours(0, 0, 0, 0)
// 禁用:大于今天 OR 小于去年1月1日
return date > now || date < lastYearStart
}
}
/**
* 店面配置-门店主机厂交付数/个人交付成交率 * 店面配置-门店主机厂交付数/个人交付成交率
* 限制:当前日期>10号‌:仅允许选择当前月份;当前日期≤10号‌:允许选择当前月份和上个月;其他情况‌:禁用所有其他月份‌ * 限制:当前日期>10号‌:仅允许选择当前月份;当前日期≤10号‌:允许选择当前月份和上个月;其他情况‌:禁用所有其他月份‌
*/ */
......
...@@ -195,7 +195,8 @@ import { ...@@ -195,7 +195,8 @@ import {
rangePickerOptions_30day2, rangePickerOptions_30day2,
todayEndPickerOptions, todayEndPickerOptions,
rangePickertwoMonthOptions, rangePickertwoMonthOptions,
rangePickertwoMonthOptionsWithCurrentLimit rangePickertwoMonthOptionsWithCurrentLimit,
rangePickerOptions_lastOneYear
} from "@/common/format" } from "@/common/format"
export default { export default {
name: "D2Search", name: "D2Search",
...@@ -208,7 +209,8 @@ export default { ...@@ -208,7 +209,8 @@ export default {
todayEndPickerOptions: todayEndPickerOptions, todayEndPickerOptions: todayEndPickerOptions,
rangePickertwoMonthOptions: rangePickertwoMonthOptions, rangePickertwoMonthOptions: rangePickertwoMonthOptions,
rangePickertwoMonthOptionsWithCurrentLimit: rangePickertwoMonthOptionsWithCurrentLimit:
rangePickertwoMonthOptionsWithCurrentLimit rangePickertwoMonthOptionsWithCurrentLimit,
rangePickerOptions_lastOneYear: rangePickerOptions_lastOneYear
} }
} }
}, },
......
...@@ -133,16 +133,34 @@ ...@@ -133,16 +133,34 @@
:formRules="confirmRules" :formRules="confirmRules"
:editData="confirmForm" :editData="confirmForm"
:editFormData="confirmFormData" :editFormData="confirmFormData"
:slotArr="['transTimeHtml']" :slotArr="['transTimeHtml', 'bankAccHtml', 'oppAccNoHtml']"
@handleClose="handleConfirmClose" @handleClose="handleConfirmClose"
@handleConfirm="handleConfirmSubmit" @handleConfirm="debouncedConfirmSubmit"
> >
<template slot="bankAccHtml">
<el-input
v-model="confirmForm.bankAcc"
placeholder="请输入本方账号"
:maxlength="50"
style="width: 500px"
@input="(val) => (confirmForm.bankAcc = val.replace(/[^\d]/g, ''))"
></el-input>
</template>
<template slot="oppAccNoHtml">
<el-input
v-model="confirmForm.oppAccNo"
placeholder="请输入对方账号"
:maxlength="50"
style="width: 500px"
@input="(val) => (confirmForm.oppAccNo = val.replace(/[^\d]/g, ''))"
></el-input>
</template>
<template slot="transTimeHtml"> <template slot="transTimeHtml">
<el-time-picker <el-time-picker
v-model="confirmForm.transTime" v-model="confirmForm.transTime"
placeholder="请选择交易时间" placeholder="请选择交易时间"
value-format="HH:mm:ss" value-format="HH:mm:ss"
style="width: 100%" style="width: 500px"
> >
</el-time-picker> </el-time-picker>
</template> </template>
...@@ -181,6 +199,7 @@ import { ...@@ -181,6 +199,7 @@ import {
getPendingCorporateOrderDetail getPendingCorporateOrderDetail
} from "@/api/finance" } from "@/api/finance"
import { Util } from "@/common/util" import { Util } from "@/common/util"
import { debounce } from "@/views/index/debounce"
import detailComp from "./components/detailComp.vue" import detailComp from "./components/detailComp.vue"
export default { export default {
...@@ -265,8 +284,7 @@ export default { ...@@ -265,8 +284,7 @@ export default {
{ {
label: "本方账号", label: "本方账号",
name: "bankAcc", name: "bankAcc",
type: "input", addHtml: "bankAccHtml",
maxlength: "50",
required: true required: true
}, },
{ {
...@@ -299,8 +317,7 @@ export default { ...@@ -299,8 +317,7 @@ export default {
{ {
label: "对方账号", label: "对方账号",
name: "oppAccNo", name: "oppAccNo",
type: "input", addHtml: "oppAccNoHtml",
maxlength: "50",
required: true required: true
}, },
{ {
...@@ -355,8 +372,16 @@ export default { ...@@ -355,8 +372,16 @@ export default {
tableColumns: [ tableColumns: [
// { label: "序号", prop: "index", width: "60px" }, // { label: "序号", prop: "index", width: "60px" },
{ label: "交易参考号", prop: "outTradeNo", width: "150px" }, { label: "交易参考号", prop: "outTradeNo", width: "150px" },
{ label: "原支付金额", prop: "totalPrice" }, {
{ label: "结余金额", prop: "notRefundedTotalPrice" }, label: "原支付金额",
prop: "totalPrice",
formatter: (row) => "¥" + row.totalPrice
},
{
label: "结余金额",
prop: "notRefundedTotalPrice",
formatter: (row) => "¥" + row.notRefundedTotalPrice
},
{ label: "支付时间", prop: "payDate", width: "160px" }, { label: "支付时间", prop: "payDate", width: "160px" },
{ label: "支付渠道", prop: "payChannel" }, { label: "支付渠道", prop: "payChannel" },
{ label: "收款来源", prop: "payType", addHtml: "payType" }, { label: "收款来源", prop: "payType", addHtml: "payType" },
...@@ -380,7 +405,11 @@ export default { ...@@ -380,7 +405,11 @@ export default {
{ label: "客户名称", prop: "customerName" }, { label: "客户名称", prop: "customerName" },
{ label: "转化人员", prop: "sellerName" }, { label: "转化人员", prop: "sellerName" },
{ label: "销售顾问", prop: "employeeName" }, { label: "销售顾问", prop: "employeeName" },
{ label: "订单金额", prop: "totalAmount" }, {
label: "订单金额",
prop: "totalAmount",
formatter: (row) => "¥" + row.totalAmount
},
{ label: "订单时间", prop: "orderDate", width: "160px" }, { label: "订单时间", prop: "orderDate", width: "160px" },
{ label: "交易参考号", prop: "outTradeNo", width: "150px" }, { label: "交易参考号", prop: "outTradeNo", width: "150px" },
{ label: "支付时间", prop: "payDate", width: "160px" }, { label: "支付时间", prop: "payDate", width: "160px" },
...@@ -406,7 +435,11 @@ export default { ...@@ -406,7 +435,11 @@ export default {
{ label: "客户名称", prop: "customerName" }, { label: "客户名称", prop: "customerName" },
{ label: "转化人员", prop: "sellerName" }, { label: "转化人员", prop: "sellerName" },
{ label: "销售顾问", prop: "employeeName" }, { label: "销售顾问", prop: "employeeName" },
{ label: "订单金额", prop: "totalAmount" }, {
label: "订单金额",
prop: "totalAmount",
formatter: (row) => "¥" + row.totalAmount
},
{ label: "订单时间", prop: "orderDate", width: "160px" }, { label: "订单时间", prop: "orderDate", width: "160px" },
{ label: "交易参考号", prop: "outTradeNo", width: "150px" }, { label: "交易参考号", prop: "outTradeNo", width: "150px" },
{ label: "支付时间", prop: "payDate", width: "160px" }, { label: "支付时间", prop: "payDate", width: "160px" },
...@@ -477,6 +510,7 @@ export default { ...@@ -477,6 +510,7 @@ export default {
}, },
created() { created() {
this.fetchStatData() this.fetchStatData()
this.debouncedConfirmSubmit = debounce(this.handleConfirmSubmit, 300)
}, },
methods: { methods: {
async fetchStatData() { async fetchStatData() {
...@@ -497,7 +531,10 @@ export default { ...@@ -497,7 +531,10 @@ export default {
goBack() { goBack() {
this.$router.push({ this.$router.push({
path: "exceptionOrderManage", path: "exceptionOrderManage",
query: {} query: {
startTime: this.routerInfo.startTime,
endTime: this.routerInfo.endTime
}
}) })
}, },
getStatusLabel(status) { getStatusLabel(status) {
...@@ -536,7 +573,8 @@ export default { ...@@ -536,7 +573,8 @@ export default {
}, },
getDistributionStatusLabel(status) { getDistributionStatusLabel(status) {
const map = { const map = {
1: "待分账", 0: "未分账",
1: "已分账",
2: "分账中", 2: "分账中",
3: "分账成功", 3: "分账成功",
4: "分账失败" 4: "分账失败"
......
...@@ -8,6 +8,30 @@ ...@@ -8,6 +8,30 @@
:form-data="showFormData" :form-data="showFormData"
label-width="100px" label-width="100px"
> >
<template slot="timeRangeSlot">
<el-date-picker
v-model="searchForm.timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
style="width: 100%"
clearable
>
</el-date-picker>
</template>
<template slot="merchantIdInput">
<el-input
v-model="searchForm.merchantId"
placeholder="请输入"
clearable
:maxlength="10"
@input="
(val) => (searchForm.merchantId = val.replace(/[^\d]/g, ''))
"
></el-input>
</template>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button :id="tableParams.btnId" size="small" type="primary">
查询 查询
...@@ -76,7 +100,7 @@ ...@@ -76,7 +100,7 @@
title="对公流水导入" title="对公流水导入"
:is-visible="fileVisible" :is-visible="fileVisible"
@closeDialog="fileVisible = false" @closeDialog="fileVisible = false"
@confirmDialog="confirmBtn" @confirmDialog="debouncedConfirmBtn"
> >
<el-form <el-form
:model="fileForm" :model="fileForm"
...@@ -145,13 +169,46 @@ import { ...@@ -145,13 +169,46 @@ import {
getAbnormalOrderStat getAbnormalOrderStat
} from "@/api/finance" } from "@/api/finance"
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import { debounce } from "@/views/index/debounce"
import dayjs from "dayjs" import dayjs from "dayjs"
import { mapActions, mapState, mapMutations } from "vuex" import { mapActions, mapState, mapMutations } from "vuex"
export default { export default {
name: "exceptionOrderManage", name: "exceptionOrderManage",
data() { data() {
let timeOptionRange = null
return { return {
pickerOptions: {
onPick: ({ maxDate, minDate }) => {
if (minDate && !maxDate) {
timeOptionRange = minDate
}
if (maxDate) {
timeOptionRange = null
}
},
disabledDate: (time) => {
const today = new Date()
const todayStart = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate()
).getTime()
if (timeOptionRange) {
const oneYearAfter = dayjs(timeOptionRange).add(1, "year").valueOf()
const oneYearBefore = dayjs(timeOptionRange)
.subtract(1, "year")
.valueOf()
return (
time.getTime() >= oneYearAfter ||
time.getTime() <= oneYearBefore ||
time.getTime() > todayStart
)
}
return time.getTime() > todayStart
}
},
fileInfo: null, fileInfo: null,
fileVisible: false, fileVisible: false,
fileForm: { fileForm: {
...@@ -182,21 +239,22 @@ export default { ...@@ -182,21 +239,22 @@ export default {
{ {
label: "时间", label: "时间",
name: "timeRange", name: "timeRange",
type: "datePicker", type: "custom",
isClear: true, addHtml: "timeRangeSlot",
pickerOptions: "rangePickerOptions" isClear: true
}, },
{ {
label: "门店名称", label: "门店名称",
name: "merchantName", name: "merchantName",
type: "input", type: "input",
isClear: true, isClear: true,
placeholder: "请输入" placeholder: "请输入",
maxlength: 50
}, },
{ {
label: "门店商户号", label: "门店商户号",
name: "merchantId", name: "merchantId",
type: "input", addHtml: "merchantIdInput",
isClear: true, isClear: true,
placeholder: "请输入" placeholder: "请输入"
} }
...@@ -281,6 +339,19 @@ export default { ...@@ -281,6 +339,19 @@ export default {
} }
} }
}, },
created() {
this.debouncedConfirmBtn = debounce(this.confirmBtn, 300)
if (this.$route.query.startTime && this.$route.query.endTime) {
this.searchForm.timeRange = [
dayjs(this.$route.query.startTime).toDate(),
dayjs(this.$route.query.endTime).toDate()
]
const query = JSON.parse(JSON.stringify(this.$route.query))
delete query.startTime
delete query.endTime
this.$router.replace({ query })
}
},
mounted() { mounted() {
// this.onPageShow() // this.onPageShow()
// this.getOptionsList() // this.getOptionsList()
...@@ -418,17 +489,26 @@ export default { ...@@ -418,17 +489,26 @@ export default {
}, },
importFile(e) { importFile(e) {
// console.log(e) // console.log(e)
const size = e.target.files[0].size / 1024 / 1024 const file = e.target.files[0]
const isExcel =
file.type ===
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
file.type === "application/vnd.ms-excel"
if (!isExcel) {
this.$message.error("文件格式错误")
document.getElementById("fileUpload").value = ""
return
}
const size = file.size / 1024 / 1024
if (size < 9) { if (size < 9) {
this.$set(this.fileForm, "fileName", e.target.files[0].name) this.$set(this.fileForm, "fileName", file.name)
// // 转码base64 // // 转码base64
const reader = new FileReader() const reader = new FileReader()
reader.readAsDataURL(e.target.files[0]) reader.readAsDataURL(file)
reader.onload = (event) => { reader.onload = (event) => {
const imgFile = event.target.result const imgFile = event.target.result
const arrBase64 = imgFile.split(",") const arrBase64 = imgFile.split(",")
this.fileInfo = this.fileInfo = file.name.split(".")[1] + "@" + arrBase64[1]
e.target.files[0].name.split(".")[1] + "@" + arrBase64[1]
document.getElementById("fileUpload").value = "" document.getElementById("fileUpload").value = ""
} }
} else { } else {
...@@ -477,7 +557,7 @@ export default { ...@@ -477,7 +557,7 @@ export default {
.catch((res) => { .catch((res) => {
console.log(res, "上传文件失败") console.log(res, "上传文件失败")
this.uploadFlag = false this.uploadFlag = false
this.$message.error("导入失败") // this.$message.error("导入失败")
}) })
} else { } else {
this.uploadFlag = false this.uploadFlag = false
...@@ -751,3 +831,5 @@ export default { ...@@ -751,3 +831,5 @@ export default {
left: 0; left: 0;
} }
</style> </style>
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!