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 = {
}
/**
* 时间控件-限制只能选当前年份的上一年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号‌:允许选择当前月份和上个月;其他情况‌:禁用所有其他月份‌
*/
......
......@@ -195,7 +195,8 @@ import {
rangePickerOptions_30day2,
todayEndPickerOptions,
rangePickertwoMonthOptions,
rangePickertwoMonthOptionsWithCurrentLimit
rangePickertwoMonthOptionsWithCurrentLimit,
rangePickerOptions_lastOneYear
} from "@/common/format"
export default {
name: "D2Search",
......@@ -208,7 +209,8 @@ export default {
todayEndPickerOptions: todayEndPickerOptions,
rangePickertwoMonthOptions: rangePickertwoMonthOptions,
rangePickertwoMonthOptionsWithCurrentLimit:
rangePickertwoMonthOptionsWithCurrentLimit
rangePickertwoMonthOptionsWithCurrentLimit,
rangePickerOptions_lastOneYear: rangePickerOptions_lastOneYear
}
}
},
......
......@@ -133,16 +133,34 @@
:formRules="confirmRules"
:editData="confirmForm"
:editFormData="confirmFormData"
:slotArr="['transTimeHtml']"
:slotArr="['transTimeHtml', 'bankAccHtml', 'oppAccNoHtml']"
@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">
<el-time-picker
v-model="confirmForm.transTime"
placeholder="请选择交易时间"
value-format="HH:mm:ss"
style="width: 100%"
style="width: 500px"
>
</el-time-picker>
</template>
......@@ -181,6 +199,7 @@ import {
getPendingCorporateOrderDetail
} from "@/api/finance"
import { Util } from "@/common/util"
import { debounce } from "@/views/index/debounce"
import detailComp from "./components/detailComp.vue"
export default {
......@@ -265,8 +284,7 @@ export default {
{
label: "本方账号",
name: "bankAcc",
type: "input",
maxlength: "50",
addHtml: "bankAccHtml",
required: true
},
{
......@@ -299,8 +317,7 @@ export default {
{
label: "对方账号",
name: "oppAccNo",
type: "input",
maxlength: "50",
addHtml: "oppAccNoHtml",
required: true
},
{
......@@ -355,8 +372,16 @@ export default {
tableColumns: [
// { label: "序号", prop: "index", width: "60px" },
{ 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: "payChannel" },
{ label: "收款来源", prop: "payType", addHtml: "payType" },
......@@ -380,7 +405,11 @@ export default {
{ label: "客户名称", prop: "customerName" },
{ label: "转化人员", prop: "sellerName" },
{ label: "销售顾问", prop: "employeeName" },
{ label: "订单金额", prop: "totalAmount" },
{
label: "订单金额",
prop: "totalAmount",
formatter: (row) => "¥" + row.totalAmount
},
{ label: "订单时间", prop: "orderDate", width: "160px" },
{ label: "交易参考号", prop: "outTradeNo", width: "150px" },
{ label: "支付时间", prop: "payDate", width: "160px" },
......@@ -406,7 +435,11 @@ export default {
{ label: "客户名称", prop: "customerName" },
{ label: "转化人员", prop: "sellerName" },
{ label: "销售顾问", prop: "employeeName" },
{ label: "订单金额", prop: "totalAmount" },
{
label: "订单金额",
prop: "totalAmount",
formatter: (row) => "¥" + row.totalAmount
},
{ label: "订单时间", prop: "orderDate", width: "160px" },
{ label: "交易参考号", prop: "outTradeNo", width: "150px" },
{ label: "支付时间", prop: "payDate", width: "160px" },
......@@ -477,6 +510,7 @@ export default {
},
created() {
this.fetchStatData()
this.debouncedConfirmSubmit = debounce(this.handleConfirmSubmit, 300)
},
methods: {
async fetchStatData() {
......@@ -497,7 +531,10 @@ export default {
goBack() {
this.$router.push({
path: "exceptionOrderManage",
query: {}
query: {
startTime: this.routerInfo.startTime,
endTime: this.routerInfo.endTime
}
})
},
getStatusLabel(status) {
......@@ -536,7 +573,8 @@ export default {
},
getDistributionStatusLabel(status) {
const map = {
1: "待分账",
0: "未分账",
1: "已分账",
2: "分账中",
3: "分账成功",
4: "分账失败"
......
......@@ -8,6 +8,30 @@
:form-data="showFormData"
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">
<el-button :id="tableParams.btnId" size="small" type="primary">
查询
......@@ -76,7 +100,7 @@
title="对公流水导入"
:is-visible="fileVisible"
@closeDialog="fileVisible = false"
@confirmDialog="confirmBtn"
@confirmDialog="debouncedConfirmBtn"
>
<el-form
:model="fileForm"
......@@ -145,13 +169,46 @@ import {
getAbnormalOrderStat
} from "@/api/finance"
import { deepClone } from "@/common/util"
import { debounce } from "@/views/index/debounce"
import dayjs from "dayjs"
import { mapActions, mapState, mapMutations } from "vuex"
export default {
name: "exceptionOrderManage",
data() {
let timeOptionRange = null
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,
fileVisible: false,
fileForm: {
......@@ -182,21 +239,22 @@ export default {
{
label: "时间",
name: "timeRange",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
type: "custom",
addHtml: "timeRangeSlot",
isClear: true
},
{
label: "门店名称",
name: "merchantName",
type: "input",
isClear: true,
placeholder: "请输入"
placeholder: "请输入",
maxlength: 50
},
{
label: "门店商户号",
name: "merchantId",
type: "input",
addHtml: "merchantIdInput",
isClear: true,
placeholder: "请输入"
}
......@@ -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() {
// this.onPageShow()
// this.getOptionsList()
......@@ -418,17 +489,26 @@ export default {
},
importFile(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) {
this.$set(this.fileForm, "fileName", e.target.files[0].name)
this.$set(this.fileForm, "fileName", file.name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.readAsDataURL(file)
reader.onload = (event) => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(",")
this.fileInfo =
e.target.files[0].name.split(".")[1] + "@" + arrBase64[1]
this.fileInfo = file.name.split(".")[1] + "@" + arrBase64[1]
document.getElementById("fileUpload").value = ""
}
} else {
......@@ -477,7 +557,7 @@ export default {
.catch((res) => {
console.log(res, "上传文件失败")
this.uploadFlag = false
this.$message.error("导入失败")
// this.$message.error("导入失败")
})
} else {
this.uploadFlag = false
......@@ -751,3 +831,5 @@ export default {
left: 0;
}
</style>
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!