Commit faee2000 by wangzhihui

Merge branch 'SAAS+V4.55.0-0730' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.55.0-0730
2 parents 54e48c7e d73d9b03
...@@ -48,3 +48,12 @@ export function refresh(data) { ...@@ -48,3 +48,12 @@ export function refresh(data) {
params: data params: data
}) })
} }
// 判断周期范围内有没有日报数据
export function isexistdata(data) {
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/isexistdata",
method: RequestMethods.GET,
params: data
})
}
...@@ -62,3 +62,15 @@ export function mergePdf(data) { ...@@ -62,3 +62,15 @@ export function mergePdf(data) {
data.method = path2 + `mergePdf` data.method = path2 + `mergePdf`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 发票冲红
export function invoiceRed(data) {
data.method = 'dj.smartcarlife.api.vpt.invoiceInfo.red'
return request(data, RequestMethods.POST)
}
// 冲红管理列表
export function getInvoiceRedList(data) {
data.method = 'dj.smartcarlife.api.vpt.invoiceInfo.red.page'
return request(data)
}
import request from "./request"
const path = "dj.api.smartcarlife."
const djPath = "dj.api."
// 分页查询银企账号记录
export function getListApi(data) {
data.method = `${path}merchantBankEnterpriseAccount.listWithPage`
return request(data, "post")
}
// 渠道级联dj.api.smartcarlife.get.merchant.level
export function getMerchantLevelApi(data) {
data.method = `${djPath}smartcarlife.get.merchant.level`
return request(data, "post")
}
// 银企账号 - 添加或修改记录
export function updateBankAccount(data) {
data.method = `${path}merchantBankEnterpriseAccount.insertOrUpdate`
return request(data, "post")
}
// 银企账号 - 根据商户号查询银企账号详细信息
export function getBankById(data) {
data.method = `${path}merchantBankEnterpriseAccount.getByMerchantId`
return request(data, "post")
}
// 银企账号 - 删除
export function deleteBankAccount(data) {
data.method = `${path}merchantBankEnterpriseAccount.deleteByMerchantId`
return request(data, "post")
}
...@@ -9,9 +9,21 @@ export function taskStaffStudyPage(data) { ...@@ -9,9 +9,21 @@ export function taskStaffStudyPage(data) {
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 长课程配置-已配置课程详情(上周复盘查看课程) // 长课程配置-处罚启停
export function taskStaffStudyDetail(data) { export function studyPunishUpdate(data) {
data.method = `${path}servicecenter.contentmanager.task.staff.study.detail` data.method = `${path}study.punish.update`
return request(data, RequestMethods.POST)
}
// 长课程配置-查询员工已配置课程
export function staffCourse(data) {
data.method = `${path}servicecenter.contentmanager.staff.course`
return request(data, RequestMethods.POST)
}
// 课程配置-指定手机号查询员工信息
export function staffInfo(data) {
data.method = `${path}servicecenter.staff.info`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
......
...@@ -799,6 +799,20 @@ export const rangeType = [ ...@@ -799,6 +799,20 @@ export const rangeType = [
{ confId: 2, confValue: "按订单" } { confId: 2, confValue: "按订单" }
] ]
// 转账管理 - 审批方式
export const approveTypeList = [
{ confId: 1, confValue: "嘀加审批" },
{ confId: 2, confValue: "企微OA审批" }
]
// 转账管理 - 审批状态
export const oaApproveStatusList = [
{ confId: 1, confValue: "审批中" },
{ confId: 2, confValue: "已通过" },
{ confId: 3, confValue: "已驳回" },
{ confId: 4, confValue: "已撤销" }
]
// 规则审核-类型 // 规则审核-类型
export const ruleReview_type = [ export const ruleReview_type = [
{ confId: 1, confValue: "清分" }, { confId: 1, confValue: "清分" },
...@@ -1304,6 +1318,23 @@ export const InvoicingOpt = [ ...@@ -1304,6 +1318,23 @@ export const InvoicingOpt = [
{ confId: "2", confValue: "红票" } { confId: "2", confValue: "红票" }
] ]
// 发票管理 冲红原因
export const redReasonOpt = [
{ confId: "01", confValue: "开票有误" },
{ confId: "02", confValue: "销货退回" },
{ confId: "04", confValue: "销售折让" }
]
// 发票冲红管理 红票状态
export const redCodeOpt = [
{ confId: "0000", confValue: "开票成功" },
{ confId: "6666", confValue: "未开票" },
{ confId: "7777", confValue: "开票中" },
{ confId: "4999", confValue: "申请中" },
{ confId: "5999", confValue: "审核中" },
{ confId: "9999", confValue: "开票失败" }
]
// 待付清单 数据来源 // 待付清单 数据来源
export const transferSourceOpt = [ export const transferSourceOpt = [
{ confId: 1, confValue: "嘀加退款" }, { confId: 1, confValue: "嘀加退款" },
...@@ -1346,9 +1377,9 @@ export const punishFlagOpt = [ ...@@ -1346,9 +1377,9 @@ export const punishFlagOpt = [
] ]
// 服务中心-长课程配置 处罚状态 // 服务中心-长课程配置 处罚状态
export const punishStatusOpt = [ export const punishStatusOpt = [
{ confId: "1", confValue: "未触发" }, { confId: 1, confValue: "未触发" },
{ confId: "2", confValue: "处罚中" }, { confId: 2, confValue: "处罚中" },
{ confId: "3", confValue: "已结束" } { confId: 3, confValue: "已结束" }
] ]
// 服务中心-长课程配置 归属业务 // 服务中心-长课程配置 归属业务
export const course_businessOpt = [ export const course_businessOpt = [
...@@ -1357,10 +1388,6 @@ export const course_businessOpt = [ ...@@ -1357,10 +1388,6 @@ export const course_businessOpt = [
{ confId: "2", confValue: "延保" } { confId: "2", confValue: "延保" }
] ]
export const punishTypeOpt = [
{ confId: 0, confValue: "不处罚" },
{ confId: 1, confValue: "禁止录单" }
]
export const taskStatusOpt = [ export const taskStatusOpt = [
{ confId: "1", confValue: "进行中" }, { confId: "1", confValue: "进行中" },
{ confId: "2", confValue: "已结束" } { confId: "2", confValue: "已结束" }
...@@ -1369,3 +1396,22 @@ export const effectiveTypeOpt = [ ...@@ -1369,3 +1396,22 @@ export const effectiveTypeOpt = [
{ confId: 0, confValue: "立即生效" }, { confId: 0, confValue: "立即生效" },
{ confId: 1, confValue: "隔日生效" } { confId: 1, confValue: "隔日生效" }
] ]
// 服务中心-长课程配置 处罚方式
export const punishTypeOpt = [
{ confId: "0", confValue: "不处罚" },
{ confId: "1", confValue: "限制录单" }
]
// 服务中心-长课程配置 任务状态
export const course_taskStatusOpt = [
{ confId: 0, confValue: "未开始" },
{ confId: 1, confValue: "进行中" },
{ confId: 2, confValue: "已结束" }
]
// 服务中心-长课程配置 任务详情课程列表学习进度
export const learningProgressOpt = [
{ confId: 1, confValue: "未学习" },
{ confId: 2, confValue: "未完成" },
{ confId: 3, confValue: "待考核" },
{ confId: 4, confValue: "未通过" },
{ confId: 5, confValue: "已完成" }
]
...@@ -1325,5 +1325,52 @@ export const routerName = { ...@@ -1325,5 +1325,52 @@ export const routerName = {
} }
], ],
component: _import("systemConfig/downloadReportManage/index") component: _import("systemConfig/downloadReportManage/index")
},
90631: {
path: "/merchantBankAccount",
name: "merchantBankAccount",
meta: {
title: "银企账号",
authId: "90631",
parentId: "906",
cache: false
},
auth: [
{
authId: "9063101",
parentId: "90631",
label: "新增银企账号",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9063102",
parentId: "90631",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9063103",
parentId: "90631",
label: "详情",
handle: "handleDetail"
},
{
authId: "9063104",
parentId: "90631",
label: "修改",
handle: "handleEdit"
},
{
authId: "9063105",
parentId: "90631",
label: "删除",
handle: "handleDelete"
}
],
component: _import("systemConfig/merchantBankAccount/index")
} }
} }
...@@ -96,8 +96,53 @@ export const routerName = { ...@@ -96,8 +96,53 @@ export const routerName = {
parentId: "91702", parentId: "91702",
label: "查看发票", label: "查看发票",
handle: "handleLookInvoice" handle: "handleLookInvoice"
},
{
authId: "9170206",
parentId: "91702",
label: "冲红",
handle: "handleRed"
} }
], ],
component: _import("invoiceManage/invoiceQueryList") component: _import("invoiceManage/invoiceQueryList")
},
91703: {
path: "/invoiceRedManage",
name: "invoiceRedManage",
meta: {
title: "发票冲红管理",
authId: "91703",
parentId: "917",
cache: false
},
auth: [
{
authId: "9170301",
parentId: "91703",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9170302",
parentId: "91703",
label: "查看蓝票",
handle: "handleDetailBlue"
},
{
authId: "9170303",
parentId: "91703",
label: "查看红票",
handle: "handleDetailRed"
},
{
authId: "9170304",
parentId: "91703",
label: "重新冲红",
handle: "handleRed"
}
],
component: _import("invoiceManage/invoiceRedManage")
} }
} }
...@@ -186,8 +186,8 @@ ...@@ -186,8 +186,8 @@
</glsx-combi-form> </glsx-combi-form>
</div> </div>
</baseDialog> </baseDialog>
<choose-order-dialog v-if="chooseVisible" <choose-order-dialog v-if="chooseVisible"
:chooseVisible="chooseVisible" :chooseVisible="chooseVisible"
:infoForm="infoForm" :infoForm="infoForm"
@chooseOrderConfirm="chooseOrderConfirm" @chooseOrderConfirm="chooseOrderConfirm"
@dialogClose="chooseDialogClose"> @dialogClose="chooseDialogClose">
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
</template> </template>
<script> <script>
import { sceneCodeList, transferTypeList, rangeType } from '@/common/constants.js' import { sceneCodeList, transferTypeList, rangeType, approveTypeList } from '@/common/constants.js'
import { getAmount, transferAccountsRecordAdd, getPreviousRecord } from '@api/transferAccountsManage' import { getAmount, transferAccountsRecordAdd, getPreviousRecord } from '@api/transferAccountsManage'
import { getList } from '@api/serviceManage' import { getList } from '@api/serviceManage'
import { getListApi } from '@api/publicAccount' import { getListApi } from '@api/publicAccount'
...@@ -237,7 +237,8 @@ export default { ...@@ -237,7 +237,8 @@ export default {
remark: '', remark: '',
voucherList: [], voucherList: [],
rangeType: 1, // 对账方式 默认是按周期 rangeType: 1, // 对账方式 默认是按周期
orderCodeScope: [] // 订单范围 orderCodeScope: [], // 订单范围
approveType: ''
}, },
oldVal: { oldVal: {
transferTotalAmount: "" transferTotalAmount: ""
...@@ -314,9 +315,11 @@ export default { ...@@ -314,9 +315,11 @@ export default {
// 服务商款项时 对账方式不显示 订单范围不显示 对账周期显示 // 服务商款项时 对账方式不显示 订单范围不显示 对账周期显示
this.showOrHideAttr('editFormData', '对账方式', true) this.showOrHideAttr('editFormData', '对账方式', true)
this.showOrHideAttr('editFormData', '订单范围', true) this.showOrHideAttr('editFormData', '订单范围', true)
this.showOrHideAttr('editFormData', '审批方式', true)
this.showOrHideAttr('editFormData', '对账周期', false) this.showOrHideAttr('editFormData', '对账周期', false)
// 清空已选订单范围 // 清空已选订单范围
this.infoForm.orderCodeScope = [] this.infoForm.orderCodeScope = []
this.infoForm.approveType = ''
this.infoForm.rangeType = 1 this.infoForm.rangeType = 1
} else { } else {
this.showOrHideAttr_transferType('editFormData', 'expenseTypeHtml', true) this.showOrHideAttr_transferType('editFormData', 'expenseTypeHtml', true)
...@@ -392,6 +395,7 @@ export default { ...@@ -392,6 +395,7 @@ export default {
this.getPreviousRecord_Validate() this.getPreviousRecord_Validate()
// 切换流量方将已选的订单清空 // 切换流量方将已选的订单清空
this.infoForm.orderCodeScope = [] this.infoForm.orderCodeScope = []
this.infoForm.approveType = ''
} }
}, { }, {
label: '所属平台方', label: '所属平台方',
...@@ -409,6 +413,16 @@ export default { ...@@ -409,6 +413,16 @@ export default {
addHtml: 'rangeTypeHtml', addHtml: 'rangeTypeHtml',
rules: [{ required: true, message: '请选择对账方式', trigger: 'change' }] rules: [{ required: true, message: '请选择对账方式', trigger: 'change' }]
}, { }, {
label: '审批方式',
name: 'approveType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'approveTypeList',
isHide: true,
rules: [{ required: true, message: '请选择审批方式', trigger: 'change' }]
}, {
label: '对账周期', label: '对账周期',
name: 'reconciliationDate', name: 'reconciliationDate',
type: 'datePicker', type: 'datePicker',
...@@ -501,7 +515,8 @@ export default { ...@@ -501,7 +515,8 @@ export default {
{ confId: 3, confValue: "流量费" } { confId: 3, confValue: "流量费" }
], ],
PlatformMerchantList: [], PlatformMerchantList: [],
rangeTypeList: deepClone(rangeType) rangeTypeList: deepClone(rangeType),
approveTypeList: deepClone(approveTypeList)
}, },
uploadFileList: [], uploadFileList: [],
chooseVisible: false chooseVisible: false
...@@ -550,6 +565,7 @@ export default { ...@@ -550,6 +565,7 @@ export default {
this.infoForm.transferTotalAmount = '' this.infoForm.transferTotalAmount = ''
this.infoForm.reconciliationDate = '' this.infoForm.reconciliationDate = ''
this.infoForm.orderCodeScope = [] this.infoForm.orderCodeScope = []
this.infoForm.approveType = ''
} }
} }
}, },
...@@ -653,6 +669,7 @@ export default { ...@@ -653,6 +669,7 @@ export default {
handleMethodChange(e) { handleMethodChange(e) {
this.showOrHideAttr('editFormData', '对账周期', e != 1) this.showOrHideAttr('editFormData', '对账周期', e != 1)
this.showOrHideAttr('editFormData', '订单范围', e != 2) this.showOrHideAttr('editFormData', '订单范围', e != 2)
this.showOrHideAttr('editFormData', '审批方式', e != 2)
}, },
formatSelected(data, all) { formatSelected(data, all) {
...@@ -1139,6 +1156,7 @@ export default { ...@@ -1139,6 +1156,7 @@ export default {
// 处理按订单对账参数 // 处理按订单对账参数
params.rangeType = infoForm?.rangeType params.rangeType = infoForm?.rangeType
if (infoForm?.rangeType == 2) { if (infoForm?.rangeType == 2) {
params.approveType = infoForm?.approveType
params.orderRefList = infoForm?.orderCodeScope?.map(val => { params.orderRefList = infoForm?.orderCodeScope?.map(val => {
return { return {
orderCode: val.orderCode, orderCode: val.orderCode,
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { transferAccountsStatusList, transferTypeList, sceneCodeList, warningStatus, rangeType } from '@/common/constants.js' import { transferAccountsStatusList, transferTypeList, sceneCodeList, warningStatus, rangeType, approveTypeList, oaApproveStatusList } from '@/common/constants.js'
import { transferAccountsRecordPage, transferAccountsRecordUpdateStatus, reTransfer } from '@api/transferAccountsManage' import { transferAccountsRecordPage, transferAccountsRecordUpdateStatus, reTransfer } from '@api/transferAccountsManage'
import { rewithdraw } from '@api/withdrawalManage' import { rewithdraw } from '@api/withdrawalManage'
import examineDialog from './components/examineDialog' import examineDialog from './components/examineDialog'
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
labelWidth: '100px', labelWidth: '120px',
searchForm: { searchForm: {
orderCode: '', orderCode: '',
merchantName: '', merchantName: '',
...@@ -178,7 +178,10 @@ export default { ...@@ -178,7 +178,10 @@ export default {
createdBy: '', createdBy: '',
createdDate: '', createdDate: '',
rangeType: '', rangeType: '',
refOrderCode: '' refOrderCode: '',
approveType: '',
oaApproveStatus: '',
oaSpNo: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
...@@ -288,6 +291,30 @@ export default { ...@@ -288,6 +291,30 @@ export default {
name: '', name: '',
type: 'slot', type: 'slot',
addHtml: 'orderCodeScope' addHtml: 'orderCodeScope'
}, {
label: '审批方式',
name: 'approveType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'approveTypeList'
}, {
label: '审批状态',
name: 'oaApproveStatus',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'oaApproveStatusList'
}, {
label: '企微审批编号',
name: 'oaSpNo',
type: 'input',
maxlength: '50',
isClear: true
}], }],
getListApi: transferAccountsRecordPage, getListApi: transferAccountsRecordPage,
tableParams: { tableParams: {
...@@ -490,7 +517,28 @@ export default { ...@@ -490,7 +517,28 @@ export default {
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.withdrawTradeNo ? cellValue.withdrawTradeNo : '--' return cellValue.withdrawTradeNo ? cellValue.withdrawTradeNo : '--'
} }
} },
{
label: '审批方式',
prop: 'approveType',
width: '120px',
formatter: (cellValue) => {
return this.baseData.approveTypeList.find(item => item.confId === cellValue.approveType)?.confValue
}
},
{
label: '审批状态',
prop: 'oaApproveStatus',
width: '100px',
formatter: (cellValue) => {
return this.baseData.oaApproveStatusList.find(item => item.confId === cellValue.oaApproveStatus)?.confValue || '--'
}
},
{
label: '企微审批编号',
prop: 'oaSpNo',
width: '140px',
},
] ]
}, },
baseData: { baseData: {
...@@ -499,7 +547,9 @@ export default { ...@@ -499,7 +547,9 @@ export default {
transferTypeList: deepClone(transferTypeList), transferTypeList: deepClone(transferTypeList),
warningStatusList: deepClone(warningStatus), warningStatusList: deepClone(warningStatus),
PlatformMerchantList: [], PlatformMerchantList: [],
rangeTypeList: deepClone(rangeType) rangeTypeList: deepClone(rangeType),
approveTypeList: deepClone(approveTypeList),
oaApproveStatusList: deepClone(oaApproveStatusList),
}, },
examineVisible: false, examineVisible: false,
...@@ -602,7 +652,10 @@ export default { ...@@ -602,7 +652,10 @@ export default {
createdBy: '', createdBy: '',
createdDate: '', createdDate: '',
rangeType: '', rangeType: '',
refOrderCode: '' refOrderCode: '',
approveType: '',
oaApproveStatus: '',
oaSpNo: ''
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
......
<template>
<d2-dialog :title="title" :is-visible="redVisible" class="redDialog" width="680px" @closeDialog="handleRedClose" @confirmDialog="handleRedConfirm">
<div class="red-box">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="180px" default-width="400px" :isBlock="isBlock" :form-ref="editChildRef" :form-obj="editForm" :form-data="editFormData" :form-rules="formRules"></glsx-combi-form>
</div>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
import { redReasonOpt } from "@/common/constants.js"
import { invoiceRed } from "@api/invoiceManage"
export default {
name: 'RedDialog',
props: {
redVisible: {
type: Boolean,
default: false
},
redInfo: {
type: Object,
default: () => { }
}
},
data() {
//这里存放数据
return {
title: '冲红',
isBlock: true,
editChildRef: 'editChildRef',
editForm: {
reason: ''
},
formRules: {
reason: [{ required: true, message: '请选择冲红原因', trigger: 'change' }]
},
editFormData: [{
label: "数电票号码",
name: "electronicInvoiceNo",
type: 'showTxt'
}, {
label: "原发票价税合计金额",
name: "amountWithTax",
type: 'showTxt'
}, {
label: "原发票金额(不含税)",
name: "noTaxAmount",
type: 'showTxt'
}, {
label: "原发票税额",
name: "taxAmount",
type: 'showTxt'
}, {
label: "剩余可冲红金额",
name: "noTaxAmount",
type: 'showTxt'
}, {
label: "剩余可冲红税额",
name: "taxAmount",
type: 'showTxt'
}, {
label: "冲红原因",
name: "reason",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "redReasonOpt"
}],
baseData: {
redReasonOpt: deepClone(redReasonOpt)
}
}
},
methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find((k) => k.name == refreshSigle)
var index = this[formName].findIndex((k) => k.name == refreshSigle)
this.$set(
this[formName][index],
"optionList",
deepClone(this.baseData[item.optionsName])
)
if (
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this[formName][index].optionId] = ""
temp[this[formName][index].optionLabel] = "全部"
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (
item.type === "select" &&
this.baseData[item.optionsName].length
) {
this.$set(
this[formName][index],
"optionList",
deepClone(this.baseData[item.optionsName])
)
if (
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this[formName][index].optionId] = ""
temp[this[formName][index].optionLabel] = "全部"
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleRedClose() {
this.$emit('handleRedClose')
},
handleRedConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) {
this.$confirm('请确认是否要执行当前操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true
const params = {
invoiceReqSerialNo: this.redInfo.invoiceReqSerialNo,
reason: this.editForm.reason
}
invoiceRed(params).then(res => {
this.notice.okTips('冲红成功')
this.$emit('handleRedClose', true)
})
}).catch(err => {
console.log(err)
}).finally(() => {
this.loading = false
})
}
})
}
},
mounted() {
this.editForm = deepClone(this.redInfo)
this.getOptionsList('editFormData', false)
}
};
</script>
<style lang='scss' scoped>
</style>
...@@ -67,7 +67,11 @@ export default { ...@@ -67,7 +67,11 @@ export default {
placeholder: String, placeholder: String,
startPlaceholder: String, startPlaceholder: String,
endPlaceholder: String, endPlaceholder: String,
infinity: Boolean infinity: Boolean,
regRuleStr: {
type: String,
default: 'priceReg'
}
}, },
watch: { watch: {
displayValue(val) { displayValue(val) {
...@@ -81,12 +85,12 @@ export default { ...@@ -81,12 +85,12 @@ export default {
}, },
methods: { methods: {
handleStartInput(event) { handleStartInput(event) {
this.userInput[0] = limitPrice(event, this.oldVal.startInput, 20, 2) this.userInput[0] = limitPrice(event, this.oldVal.startInput, 20, 2, '', '', this.regRuleStr)
this.oldVal.startInput = this.userInput[0] this.oldVal.startInput = this.userInput[0]
}, },
handleEndInput(event) { handleEndInput(event) {
this.userInput[1] = limitPrice(event, this.oldVal.endInput, 20, 2) this.userInput[1] = limitPrice(event, this.oldVal.endInput, 20, 2, '', '', this.regRuleStr)
this.oldVal.endInput = this.userInput[1] this.oldVal.endInput = this.userInput[1]
}, },
handleClickIcon(event) { handleClickIcon(event) {
...@@ -128,6 +132,12 @@ export default { ...@@ -128,6 +132,12 @@ export default {
contrastValue() { contrastValue() {
const val = this.userInput const val = this.userInput
if (Array.isArray(val)) { if (Array.isArray(val)) {
if(val[0] == '-') {
val[0] = null
}
if(val[1] == '-') {
val[1] = null
}
if (+val[0] > +val[1]) { if (+val[0] > +val[1]) {
val[1] = null val[1] = null
this.tipsShow = true this.tipsShow = true
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<div slot="invoiceAmountHtml"> <div slot="invoiceAmountHtml">
<input-range start-placeholder="最小金额" <input-range start-placeholder="最小金额"
end-placeholder="最大金额" end-placeholder="最大金额"
regRuleStr="priceReg_negative_input"
:display-value="searchForm.invoiceAmount"></input-range> :display-value="searchForm.invoiceAmount"></input-range>
</div> </div>
</d2-search> </d2-search>
...@@ -38,9 +39,17 @@ ...@@ -38,9 +39,17 @@
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" <div slot="auth-button" slot-scope="scope">
slot-scope="scope" <span style="margin-right: 10px">
:data="scope.scope" /> <auth-button :data="scope.scope" :show-btn-ids="['9170204']" />
</span>
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9170205']" />
</span>
<span style="margin-right: 10px" v-if="['NOT_RED','RED_FAIL'].includes(scope.scope.redFlag) && scope.scope.invoiceType == '1'">
<auth-button :data="scope.scope" :show-btn-ids="['9170206']" />
</span>
</div>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
...@@ -49,6 +58,8 @@ ...@@ -49,6 +58,8 @@
v-if="detailVisible" v-if="detailVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="closeDetailDialog" /> @dialogClose="closeDetailDialog" />
<!-- 冲红 -->
<RedDialog :redVisible="redVisible" v-if="redVisible" :redInfo="redInfo" @handleRedClose="handleRedClose"></RedDialog>
</div> </div>
</template> </template>
...@@ -64,11 +75,13 @@ import { ...@@ -64,11 +75,13 @@ import {
import inputRange from './components/inputRange' import inputRange from './components/inputRange'
// import refetchDialog from './components/refetchDialog' // import refetchDialog from './components/refetchDialog'
import invoiceQueryDetailDialog from './components/invoiceQueryDetailDialog' import invoiceQueryDetailDialog from './components/invoiceQueryDetailDialog'
import RedDialog from './components/RedDialog'
export default { export default {
name: 'InvoiceQueryList', name: 'InvoiceQueryList',
components: { components: {
inputRange, inputRange,
invoiceQueryDetailDialog invoiceQueryDetailDialog,
RedDialog
}, },
data() { data() {
return { return {
...@@ -86,7 +99,8 @@ export default { ...@@ -86,7 +99,8 @@ export default {
bizOrderCode: '', bizOrderCode: '',
bizTradeNo: '', bizTradeNo: '',
buyerTaxpayerNum: '', buyerTaxpayerNum: '',
invoiceAmount: [] invoiceAmount: [],
invoiceType: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
...@@ -173,6 +187,15 @@ export default { ...@@ -173,6 +187,15 @@ export default {
label: '价税合计金额', label: '价税合计金额',
name: 'invoiceAmount', name: 'invoiceAmount',
addHtml: "invoiceAmountHtml" addHtml: "invoiceAmountHtml"
}, {
label: "开票类型",
name: "invoiceType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "InvoicingOpt"
}], }],
getListApi: invoiceInfoPage, getListApi: invoiceInfoPage,
tableParams: { tableParams: {
...@@ -247,10 +270,6 @@ export default { ...@@ -247,10 +270,6 @@ export default {
return this.baseData.invalidFlagOpt.find(item => item.confId === cellValue.invalidFlag)?.confValue return this.baseData.invalidFlagOpt.find(item => item.confId === cellValue.invalidFlag)?.confValue
} }
}, { }, {
label: "开票人",
prop: "drawerName",
width: "120"
}, {
label: '开票类型', label: '开票类型',
prop: 'invoiceType', prop: 'invoiceType',
width: '100px', width: '100px',
...@@ -258,6 +277,10 @@ export default { ...@@ -258,6 +277,10 @@ export default {
return this.baseData.InvoicingOpt.find(item => item.confId === cellValue.invoiceType)?.confValue return this.baseData.InvoicingOpt.find(item => item.confId === cellValue.invoiceType)?.confValue
} }
}, { }, {
label: "开票人",
prop: "drawerName",
width: "120"
}, {
label: '二维码来源', label: '二维码来源',
prop: 'createdSource', prop: 'createdSource',
width: '100px', width: '100px',
...@@ -289,7 +312,9 @@ export default { ...@@ -289,7 +312,9 @@ export default {
InvoicingOpt: deepClone(InvoicingOpt) InvoicingOpt: deepClone(InvoicingOpt)
}, },
recordInfo: null, recordInfo: null,
detailVisible: false detailVisible: false,
redVisible: false,
redInfo: {}
} }
}, },
computed: { computed: {
...@@ -375,7 +400,8 @@ export default { ...@@ -375,7 +400,8 @@ export default {
bizOrderCode: '', bizOrderCode: '',
bizTradeNo: '', bizTradeNo: '',
buyerTaxpayerNum: '', buyerTaxpayerNum: '',
invoiceAmount: [] invoiceAmount: [],
invoiceType: ''
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
...@@ -472,6 +498,17 @@ export default { ...@@ -472,6 +498,17 @@ export default {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
}, },
handleRedClose(isRefresh = false) {
this.redVisible = !this.redVisible
isRefresh && this.handleReset()
},
// 冲红
handleRed(row) {
this.redInfo = row
this.handleRedClose()
},
closeDetailDialog() { closeDetailDialog() {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
......
<!-- 发票查询 - 列表 -->
<template>
<div>
<d2-container>
<div class="header" slot="header" style="padding: 20px 20px;">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="labelWidth" :form-data="showFormData"></d2-search>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="redTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px" v-if="scope.scope.blueInvoiceDownloadUrl">
<auth-button :data="scope.scope" :show-btn-ids="['9170302']" />
</span>
<span style="margin-right: 10px" v-if="scope.scope.redInvoiceDownloadUrl">
<auth-button :data="scope.scope" :show-btn-ids="['9170303']" />
</span>
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9170304']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
<!-- 冲红 -->
<RedDialog :redVisible="redVisible" v-if="redVisible" :redInfo="redInfo" @handleRedClose="handleRedClose"></RedDialog>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { redCodeOpt } from "@/common/constants.js"
import {
getInvoiceRedList,
downloadZip,
mergePdf
} from "@api/invoiceManage"
import RedDialog from './components/RedDialog'
export default {
name: 'invoiceRedManage',
components: {
RedDialog
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
labelWidth: '120px',
searchForm: {
electronicInvoiceNo: '',
pushData: [],
code: '',
tradeNo: '',
buyerName: ''
},
searchFormSearch: {},
showFormData: [{
label: '蓝字发票号码',
name: 'electronicInvoiceNo',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '填开日期',
name: 'pushData',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: "状态",
name: "code",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "redCodeOpt"
}, {
label: '主订单号',
name: 'tradeNo',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '购买方名称',
name: 'buyerName',
type: 'input',
maxlength: '50',
isClear: true
}],
getListApi: getInvoiceRedList,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
mutiSelectUniqueKey: 'id',
mutiSelectName: 'transferAccounts',
tableOption: { width: '200px' },
tableColumns: [{
label: '状态',
prop: 'code',
width: '120px',
formatter: (cellValue) => {
return this.baseData.redCodeOpt.find(item => item.confId === cellValue.code)?.confValue
},
className: (cellValue) => {
return {
'9999': 'redSpot',
'0000': 'greenSpot',
'7777': "yellowSpot",
'4999': "ashSpot",
'5999': "deepBlueSpot"
}[cellValue.code]
}
}, {
label: '数电票号码',
prop: 'electronicInvoiceNo',
width: '200px'
}, {
label: '填开日期',
prop: 'pushDate',
width: '180px'
}, {
label: '购买方名称',
prop: 'buyerName'
},
{
label: "主订单号",
prop: "tradeNo",
width: "200"
}, {
label: "失败原因",
prop: "failReason"
}]
},
baseData: {
redCodeOpt: deepClone(redCodeOpt),
},
recordInfo: null,
redVisible: false,
redInfo: {}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
getParams() {
var params = deepClone(this.searchForm)
const dateFormatList = [{
attr: 'pushData',
startAttr: 'pushDateStart',
endAttr: 'pushDateEnd',
}]
dateFormatList.forEach(item => {
if (params[item.attr] && params[item.attr].length) {
params[item.startAttr] = Util.dateFormate(params[item.attr][0], 'YYYY-MM-DD 00:00:00')
params[item.endAttr] = Util.dateFormate(params[item.attr][1], 'YYYY-MM-DD 23:59:59')
delete params[item.attr]
}
})
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = this.getParams()
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (
this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部'
) {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
'optionList',
this.baseData[item.optionsName]
)
}
})
},
handleSearch() {
this.$refs.redTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
electronicInvoiceNo: '',
pushData: [],
code: '',
tradeNo: '',
buyerName: ''
}
this.$refs.redTable.refreshTable(false, true)
},
handleExport() {
var params = this.getParams()
// 去除为null的值
for (const key in params) {
if (params[key] === null || params[key] === '' || params[key].length == 0) {
delete params[key]
}
}
params.method = 'dj.smartcarlife.api.vpt.invoiceInfo.red.export.async'
const list = [
...this.dowloadList,
{
name: '发票冲红查询导出',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
handleRedClose() {
this.redVisible = !this.redVisible
},
// 冲红
handleRed(row) {
console.log(row)
this.redInfo = row
this.handleRedClose()
},
// 查看蓝票
handleDetailBlue(row) {
if (row.blueInvoiceDownloadUrl) {
window.open(row.blueInvoiceDownloadUrl)
}
},
// 查看红票
handleDetailRed(row) {
if (row.redInvoiceDownloadUrl) {
window.open(row.redInvoiceDownloadUrl)
}
}
}
}
</script>
<style lang="scss" scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
.tableHeaderBtn {
margin-left: 10px;
}
.importResult-1 {
width: 100%;
height: 40px;
background: #fff3e8;
color: #ff8d1a;
font-size: 14px;
display: flex;
align-items: center; /* 垂直居中 */
.importResult-1-font {
margin-left: 20px;
}
}
.importResult-2 {
width: 100%;
height: 40px;
background: #d4deef;
color: #2a58ad;
font-size: 14px;
display: flex;
align-items: center; /* 垂直居中 */
.importResult-2-font {
margin-left: 20px;
}
}
</style>
...@@ -13,63 +13,61 @@ ...@@ -13,63 +13,61 @@
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="姓名:" <el-form-item label="姓名:"
class="halfItem"> class="halfItem">
<!-- {{ detailInfo.createdDate ? detailInfo.createdDate : "-" }} --> {{ staffInfo.staffName ? staffInfo.staffName : "-" }}
{{ "蒋欣" }}
</el-form-item> </el-form-item>
<el-form-item label="手机号码:" <el-form-item label="手机号码:"
class="halfItem"> class="halfItem">
{{ "13600180567" }} {{ staffInfo.staffPhone ? staffInfo.staffPhone : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="门店:" <el-form-item label="门店:"
class="halfItem"> class="halfItem">
{{ "广州南菱华粤汽车有限公司" }} {{ staffInfo.merchantNames ? staffInfo.merchantNames : "-" }}
</el-form-item> </el-form-item>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="上级:" <el-form-item label="上级:"
class="halfItem"> class="halfItem">
{{ "张天爱" }} {{ staffInfo.superiors ? staffInfo.superiors : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="导师:" <el-form-item label="导师:"
class="halfItem"> class="halfItem">
{{ "周也" }} {{ staffInfo.mentors ? staffInfo.mentors : "-" }}
</el-form-item> </el-form-item>
</div> </div>
<div class="div-title">任务信息</div> <div class="div-title">任务信息</div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="学习任务名称:" <el-form-item label="学习任务名称:"
class="halfItem"> class="halfItem">
{{ "鸿蒙智行客户沟通技巧" }} {{ paramsObj.title ? paramsObj.title : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="任务状态:" <el-form-item label="任务状态:"
class="halfItem"> class="halfItem">
<span :class="colorClass[1]"></span>{{ "已结束" }} <span :class="colorClass[paramsObj.taskStatus]"></span>{{ taskStatusShow }}
</el-form-item> </el-form-item>
<el-form-item label="处罚状态:" <el-form-item label="处罚状态:"
class="halfItem"> class="halfItem">
<span class="ashSpot"></span>{{ "未触发" }} <span :class="colorClass2[paramsObj.punishStatus]"></span>{{ punishStatusShow }}
</el-form-item> </el-form-item>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="课程完成时间:" <el-form-item label="课程完成时间:"
class="halfItem"> class="halfItem">
{{ "2025-06-30 16:30:00" }} {{ paramsObj.passedTime ? paramsObj.passedTime : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="课程配置时间:" <el-form-item label="课程配置时间:"
class="halfItem"> class="halfItem">
{{ "2025-06-30 16:30:00" }} {{ paramsObj.sendTime ? paramsObj.sendTime : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="课程结束时间:" <el-form-item label="课程结束时间:"
class="halfItem"> class="halfItem">
{{ "2025-06-30 16:30:00" }} {{ paramsObj.finishDate ? paramsObj.finishDate : "-" }}
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<div class="div-title">课程列表</div> <div class="div-title">课程列表</div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table ref="recordTable" <d2-table ref="recordTable"
:has-page="false" :get-list-api="getListApi"
:table-data="detailInfo.logList"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
...@@ -82,9 +80,9 @@ ...@@ -82,9 +80,9 @@
</template> </template>
<script> <script>
import { transferDetail, batchRepush, getStatusList } from '@api/pendingPaymentBill' import { staffCourse, staffInfo } from "@api/serviceCentre"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { bill_statusOpt, transferSourceOpt, payTypeOpt, receiptStatusOpt, transferStatusOpt } from '@/common/constants.js' import { course_taskStatusOpt, punishStatusOpt, learningProgressOpt } from '@/common/constants.js'
export default { export default {
name: "CourseDetailDialog", name: "CourseDetailDialog",
components: { components: {
...@@ -112,8 +110,9 @@ export default { ...@@ -112,8 +110,9 @@ export default {
} }
}, },
mounted() { mounted() {
this.getStatusList() this.getStaffInfo()
this.getDetail() // this.getStaffCourse()
this.dataProcess(this.paramsObj)
}, },
data() { data() {
return { return {
...@@ -128,45 +127,58 @@ export default { ...@@ -128,45 +127,58 @@ export default {
width: "1080px" width: "1080px"
} }
}, },
detailInfo: {}, staffInfo: {},
loading: false, loading: false,
searchForm: { searchForm: {},
id: ''
},
searchFormSearch: {}, searchFormSearch: {},
tableData: [], tableData: [],
getListApi: staffCourse,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: false, tableOption: false,
tableColumns: [{ tableColumns: [{
label: '课程名称', label: '课程名称',
prop: 'transferStatus', prop: 'courseName',
formatter: (cellValue) => { width: '300px'
return this.transferStatusOpt.find(item => item.confId === cellValue.transferStatus)?.confValue || '--'
}
}, { }, {
label: '学习时长', label: '学习时长',
prop: 'createdDate' prop: 'learnDuration'
}, { }, {
label: '学习进度', label: '学习进度',
prop: 'failReason' prop: 'failReason',
formatter: (cellValue) => {
return this.learningProgressOpt.find(
(item) => item.confId === cellValue.status
)?.confValue + (cellValue.status == 2 ? `(${cellValue.progress}%)` : '')
},
className: (cellValue) => {
return {
1: 'ashSpot',
2: 'orgenSpot',
5: 'greenSpot'
}[cellValue.status]
}
}, { }, {
label: '成绩', label: '成绩',
prop: 'createdBy' prop: 'totalScore'
}, { }, {
label: '完成时间', label: '完成时间',
prop: 'createdBy' prop: 'finishDate'
}] }]
}, },
statusOpt: deepClone(bill_statusOpt), taskStatusOpt: deepClone(course_taskStatusOpt),
transferSourceOpt: deepClone(transferSourceOpt), punishStatusOpt: deepClone(punishStatusOpt),
payTypeOpt: deepClone(payTypeOpt), learningProgressOpt: deepClone(learningProgressOpt),
receiptStatusOpt: deepClone(receiptStatusOpt), taskStatusShow: '',
transferStatusOpt: deepClone(transferStatusOpt), punishStatusShow: '',
nbTransferStatusOpt: [],
refreshFlag: false, refreshFlag: false,
colorClass: { colorClass: {
0: 'ashSpot',
1: 'orgenSpot',
2: 'greenSpot'
},
colorClass2: {
1: 'ashSpot', 1: 'ashSpot',
2: 'orgenSpot', 2: 'orgenSpot',
3: 'greenSpot' 3: 'greenSpot'
...@@ -176,65 +188,35 @@ export default { ...@@ -176,65 +188,35 @@ export default {
methods: { methods: {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
// this.searchForm.msgId = this.paramsObj.id this.searchForm.staffStudyId = this.paramsObj.id
// this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
resolve() resolve()
}) })
}, },
// 财资付款状态筛选项 getStaffInfo() {
getStatusList() { var params = { staffPhone: this.paramsObj.staffPhone }
getStatusList({}).then(res => { staffInfo(params).then(res => {
if (res && res.length > 0) { this.staffInfo = res
this.nbTransferStatusOpt = res.map(item => {
return {
confId: item.value,
confValue: item.name
}
})
}
}) })
}, },
getStaffCourse() {
getDetail() { var params = { staffStudyId: this.paramsObj.id }
var params = { id: this.paramsObj.id } staffCourse(params).then(res => {
transferDetail(params).then(res => { // this.staffInfo = res
this.detailInfo = res
this.dataProcess(this.detailInfo)
this.loading = false
}) })
}, },
dataProcess(info) { dataProcess(info) {
if (info) { if (info) {
info.statusShow = info.status ? this.statusOpt.find(item => item.confId === info.status)?.confValue : '-' this.taskStatusShow = this.taskStatusOpt.find(
info.transferSourceShow = (info.transferSource || info.transferSource === 0) ? this.transferSourceOpt.find(item => item.confId === info.transferSource)?.confValue : '-' (item) => item.confId === info.taskStatus
info.receiptStatusShow = (info.receiptStatus || info.receiptStatus === 0) ? this.receiptStatusOpt.find(item => item.confId === info.receiptStatus)?.confValue : '-' )?.confValue
info.payTypeShow = (info.payType || info.payType === 0) ? this.payTypeOpt.find(item => item.confId === info.payType)?.confValue : '-' if (info.taskStatus == 1) {
info.nbTransferStatusShow = (info.nbTransferStatus || info.nbTransferStatus === 0) ? this.nbTransferStatusOpt.find(item => item.confId === info.nbTransferStatus)?.confValue : '-' this.taskStatusShow = this.taskStatusShow + `(${info.progress}%)`
}
this.punishStatusShow = this.punishStatusOpt.find(item => item.confId === info.punishStatus)?.confValue
} }
},
dataPush() {
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
const ids = [this.paramsObj.id]
batchRepush({ idList: ids }).then(res => {
this.notice.okTips()
this.getDetail()
this.refreshFlag = true
})
}).catch(err => {
console.log(err)
})
},
handleReceipt(url) {
window.open(url)
} }
} }
} }
</script> </script>
......
...@@ -40,8 +40,9 @@ ...@@ -40,8 +40,9 @@
<el-switch v-model="scope.scope.punishFlag" <el-switch v-model="scope.scope.punishFlag"
active-text="启用" active-text="启用"
inactive-text="停用" inactive-text="停用"
active-value="1" :active-value="1"
inactive-value="0"></el-switch> :inactive-value="0"
@change="switchChange($event,scope.scope)"></el-switch>
<!-- <span>{{ scope.scope.cancelStatus ? "启用" : "停用" }}</span> --> <!-- <span>{{ scope.scope.cancelStatus ? "启用" : "停用" }}</span> -->
</div> </div>
<div slot="auth-button" <div slot="auth-button"
...@@ -72,12 +73,13 @@ ...@@ -72,12 +73,13 @@
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import courseDetailDialog from "./components/courseDetailDialog" import courseDetailDialog from "./components/courseDetailDialog"
// import QRCodeDetailDialog from "../../components/QRCodeDetailDialog" import { taskStaffStudyPage, studyPunishUpdate } from "@api/serviceCentre"
import { invoicePage, batchCancelInvoiceQrcode } from "@api/invoiceManage"
import { import {
punishFlagOpt, punishFlagOpt,
punishStatusOpt, punishStatusOpt,
course_businessOpt course_businessOpt,
punishTypeOpt,
course_taskStatusOpt
} from "@/common/constants.js" } from "@/common/constants.js"
export default { export default {
name: "CourseList", name: "CourseList",
...@@ -95,7 +97,8 @@ export default { ...@@ -95,7 +97,8 @@ export default {
passedTime: "", passedTime: "",
useStatus: "", useStatus: "",
punishStatus: "", punishStatus: "",
punishFlag: "" punishFlag: "",
taskStatus: ""
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [ showFormData: [
...@@ -197,7 +200,7 @@ export default { ...@@ -197,7 +200,7 @@ export default {
optionsName: "punishFlagOpt" optionsName: "punishFlagOpt"
} }
], ],
getListApi: invoicePage, getListApi: taskStaffStudyPage,
// 表格参数 // 表格参数
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...@@ -244,7 +247,10 @@ export default { ...@@ -244,7 +247,10 @@ export default {
{ {
label: "课程信息", label: "课程信息",
prop: "courseName", prop: "courseName",
width: "150" width: "150",
formatter: (cellValue) => {
return (cellValue.courseFinishCount ? cellValue.courseFinishCount : "-") + ' | ' + (cellValue.courseDuration ? cellValue.courseDuration : "-")
}
}, },
{ {
label: "课程配置时间", label: "课程配置时间",
...@@ -263,13 +269,14 @@ export default { ...@@ -263,13 +269,14 @@ export default {
formatter: (cellValue) => { formatter: (cellValue) => {
return this.baseData.taskStatusOpt.find( return this.baseData.taskStatusOpt.find(
(item) => item.confId === cellValue.taskStatus (item) => item.confId === cellValue.taskStatus
)?.confValue )?.confValue + (cellValue.taskStatus == 1 ? `(${cellValue.progress}%)` : '')
}, },
className: (cellValue) => { className: (cellValue) => {
return { return {
N: "redSpot", 0: 'ashSpot',
Y: "greenSpot" 1: 'orgenSpot',
}[cellValue.useStatus] 2: 'greenSpot'
}[cellValue.taskStatus]
} }
}, },
{ {
...@@ -278,9 +285,12 @@ export default { ...@@ -278,9 +285,12 @@ export default {
width: "180" width: "180"
}, },
{ {
label: "处罚规则", label: "处罚方式",
prop: "tradeNo", prop: "punishType",
width: "200" width: "120",
formatter: (cellValue) => {
return this.baseData.punishTypeOpt.find(item => item.confId === cellValue.punishType)?.confValue
}
}, },
{ {
label: "处罚状态", label: "处罚状态",
...@@ -309,7 +319,8 @@ export default { ...@@ -309,7 +319,8 @@ export default {
punishStatusOpt: deepClone(punishStatusOpt), punishStatusOpt: deepClone(punishStatusOpt),
punishFlagOpt: deepClone(punishFlagOpt), punishFlagOpt: deepClone(punishFlagOpt),
businessOpt: deepClone(course_businessOpt), businessOpt: deepClone(course_businessOpt),
taskStatusOpt: deepClone(taskStatusOpt) taskStatusOpt: deepClone(course_taskStatusOpt),
punishTypeOpt: deepClone(punishTypeOpt)
}, },
recordInfo: null, recordInfo: null,
detailVisible: false detailVisible: false
...@@ -343,31 +354,47 @@ export default { ...@@ -343,31 +354,47 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.createTime) { if (this.searchFormSearch.sendTime) {
this.searchFormSearch.createdStartDate = Util.dateFormate( this.searchFormSearch.sendStartTime = Util.dateFormate(
this.searchFormSearch.createTime[0], this.searchFormSearch.sendTime[0],
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
) )
this.searchFormSearch.createdEndDate = this.searchFormSearch.sendEndTime =
Util.dateFormate( Util.dateFormate(
this.searchFormSearch.createTime[1], this.searchFormSearch.sendTime[1],
"YYYY-MM-DD" "YYYY-MM-DD"
) + " 23:59:59" ) + " 23:59:59"
} else { } else {
delete this.searchFormSearch.createdStartDate delete this.searchFormSearch.sendStartTime
delete this.searchFormSearch.createdEndDate delete this.searchFormSearch.sendEndTime
} }
if ( if (this.searchFormSearch.finishTime) {
this.searchFormSearch.invoiceAmount && this.searchFormSearch.finishStartTime = Util.dateFormate(
this.searchFormSearch.invoiceAmount.length > 0 this.searchFormSearch.finishTime[0],
) { "YYYY-MM-DD HH:mm:ss"
this.searchFormSearch.invoiceAmountMin = )
this.searchFormSearch.invoiceAmount[0] this.searchFormSearch.finishEndTime =
this.searchFormSearch.invoiceAmountMax = Util.dateFormate(
this.searchFormSearch.invoiceAmount[1] this.searchFormSearch.finishTime[1],
"YYYY-MM-DD"
) + " 23:59:59"
} else { } else {
delete this.searchFormSearch.invoiceAmountMin delete this.searchFormSearch.finishStartTime
delete this.searchFormSearch.invoiceAmountMax delete this.searchFormSearch.finishEndTime
}
if (this.searchFormSearch.passedTime) {
this.searchFormSearch.passedStartTime = Util.dateFormate(
this.searchFormSearch.passedTime[0],
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.passedEndTime =
Util.dateFormate(
this.searchFormSearch.passedTime[1],
"YYYY-MM-DD"
) + " 23:59:59"
} else {
delete this.searchFormSearch.passedStartTime
delete this.searchFormSearch.passedEndTime
} }
resolve() resolve()
}) })
...@@ -385,7 +412,8 @@ export default { ...@@ -385,7 +412,8 @@ export default {
passedTime: "", passedTime: "",
useStatus: "", useStatus: "",
punishStatus: "", punishStatus: "",
punishFlag: "" punishFlag: "",
taskStatus: ""
} }
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
}, },
...@@ -412,59 +440,6 @@ export default { ...@@ -412,59 +440,6 @@ export default {
}) })
}, },
// 批量作废
handleCancel() {
var selectedData = []
if (this.$refs.recordTable.mutiSelectArr.invoiceCode) {
selectedData = this.$refs.recordTable.mutiSelectArr.invoiceCode
}
this.handleCancel_commit(selectedData)
},
handleCancel_commit(selectedData) {
if (!selectedData?.length) {
this.$message({
message: "请选择要作废的二维码",
type: "warning",
showClose: true
})
return false
}
let _flag = true
selectedData.forEach((item) => {
if (item.cancelStatus == "Y" || item.useStatus == "Y") {
// 包含已作废或已使用的二维码
_flag = false
}
})
if (!_flag) {
this.$message({
message: "包含已作废或已使用的二维码,请重新选择",
type: "warning",
showClose: true
})
return
}
const qrcodeNos = selectedData.map((item) => {
return item.qrcodeNo
})
this.$confirm("请确认是否要执行当前操作?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false
})
.then(() => {
batchCancelInvoiceQrcode({ qrcodeNoList: qrcodeNos }).then((res) => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
})
.catch((err) => {
console.log(err)
})
},
handleDetail(row) { handleDetail(row) {
this.recordInfo = row this.recordInfo = row
this.detailVisible = true this.detailVisible = true
...@@ -472,38 +447,29 @@ export default { ...@@ -472,38 +447,29 @@ export default {
closeDetailDialog() { closeDetailDialog() {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
this.$refs.recordTable.refreshTable(false, true) // this.$refs.recordTable.refreshTable(false, true)
}, },
handleQRCode(row) { switchChange(e, row) {
this.recordInfo = row // this.$confirm("请确认是否要执行当前操作?", "提示", {
this.QRdetailVisible = true // confirmButtonText: "确定",
}, // cancelButtonText: "取消",
// type: "warning",
handleExport() { // closeOnClickModal: false
var params = this.searchFormSearch // })
// 去除为null的值 // .then(() => {
for (const key in params) { console.log(e)
if ( console.log(row)
params[key] === null || studyPunishUpdate({ id: row.id, punishFlag: e }).then((res) => {
params[key] === "" || this.notice.okTips()
params[key].length == 0 this.$refs.recordTable.refreshTable()
) { })
delete params[key] // })
} // .catch((err) => {
} // console.log(err)
params.method = "dj.smartcarlife.api.vpt.invoiceIssueQrcode.export.async" // })
const list = [
...this.dowloadList,
{
name: "开票二维码",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
} }
} }
} }
</script> </script>
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
end-placeholder="结束时间" end-placeholder="结束时间"
value-format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
:picker-options="pickerOptions" /> :picker-options="pickerOptions"
@change="handleDateRangeChange" />
<el-button type="text" <el-button type="text"
class="scBtn" class="scBtn"
@click="handleGenerate">生成</el-button> @click="handleGenerate">生成</el-button>
...@@ -54,7 +55,8 @@ ...@@ -54,7 +55,8 @@
import { import {
remake, remake,
refresh, refresh,
reportExport_download reportExport_download,
isexistdata
} from "@api/downloadReportManage" } from "@api/downloadReportManage"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
export default { export default {
...@@ -154,6 +156,21 @@ export default { ...@@ -154,6 +156,21 @@ export default {
this.form.dateRange = [firstDay, yesterday] this.form.dateRange = [firstDay, yesterday]
}, },
handleDateRangeChange(value) {
if (!Array.isArray(value) || value.length !== 2) return
const [startDateStr, endDateStr] = value
const startDate = new Date(startDateStr)
const endDate = new Date(endDateStr)
const diffMinutes = (endDate - startDate) / (1000 * 60)
if (diffMinutes < 30) {
this.$message.error('时间范围不能小于30分钟')
this.form.dateRange = [] // 清空选择
}
},
handleCancel() { handleCancel() {
this.dialogShow = false this.dialogShow = false
}, },
...@@ -170,8 +187,17 @@ export default { ...@@ -170,8 +187,17 @@ export default {
endTime: Util.dateFormate(this.form.dateRange[1], 'YYYY-MM-DD HH:mm') endTime: Util.dateFormate(this.form.dateRange[1], 'YYYY-MM-DD HH:mm')
} }
// return console.log('params', params) // return console.log('params', params)
remake(params).then(res => { isexistdata(params).then(res => {
this.notice.okTips('操作成功') if (res.isexistdata) {
remake(params).then(res => {
this.notice.okTips('操作成功')
})
} else {
// this.notice.warningTips(
// "周期内无有效数据"
// )
this.$message.error('周期内无有效数据')
}
}) })
} }
}) })
......
...@@ -292,7 +292,7 @@ export default { ...@@ -292,7 +292,7 @@ export default {
closeDateDialog() { closeDateDialog() {
this.dateVisible = !this.dateVisible this.dateVisible = !this.dateVisible
this.$refs.recordTable.refreshTable(false, true) // this.$refs.recordTable.refreshTable(false, true)
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!