Commit 92d2565d by 前端

版本代码提交

1 parent c7c12577
...@@ -2,6 +2,7 @@ import request from "./request" ...@@ -2,6 +2,7 @@ import request from "./request"
import RequestMethods from "./request.methods" import RequestMethods from "./request.methods"
const path = "dj.smartcarlife.api.vpt.invoiceIssueQrcode." const path = "dj.smartcarlife.api.vpt.invoiceIssueQrcode."
const path2 = "dj.smartcarlife.api.vpt.invoiceInfo." const path2 = "dj.smartcarlife.api.vpt.invoiceInfo."
const path3 = "dj.smartcarlife.api.vpt.invoice.rule."
// 查询订单开票项目 // 查询订单开票项目
export function getInvoiceIssueItems(data) { export function getInvoiceIssueItems(data) {
...@@ -65,12 +66,50 @@ export function mergePdf(data) { ...@@ -65,12 +66,50 @@ export function mergePdf(data) {
// 发票冲红 // 发票冲红
export function invoiceRed(data) { export function invoiceRed(data) {
data.method = 'dj.smartcarlife.api.vpt.invoiceInfo.red' data.method = "dj.smartcarlife.api.vpt.invoiceInfo.red"
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 冲红管理列表 // 冲红管理列表
export function getInvoiceRedList(data) { export function getInvoiceRedList(data) {
data.method = 'dj.smartcarlife.api.vpt.invoiceInfo.red.page' data.method = "dj.smartcarlife.api.vpt.invoiceInfo.red.page"
return request(data) return request(data)
} }
/** 发票切换规则配置管理start */
// 新增规则
export function createRule(data) {
data.method = `${path3}create`
return request(data)
}
// 删除规则
export function deleteRule(data) {
data.method = `${path3}delete`
return request(data)
}
// 查询规则详情
export function getByIdForRule(data) {
data.method = `${path3}getById`
return request(data)
}
// 查询配置日志列表
export function getLogsForRule(data) {
data.method = `${path3}getLogs`
return request(data)
}
// 分页查询切换规则
export function getRulePage(data) {
data.method = `${path3}page`
return request(data)
}
// 更新规则
export function updateRule(data) {
data.method = `${path3}update`
return request(data)
}
// 查询开票主体下拉项
export function getSaleCompany(data) {
data.method = `${path3}saleCompany`
return request(data)
}
/** 发票切换规则配置管理end */
...@@ -1429,3 +1429,13 @@ export const long_businessOpt = [ ...@@ -1429,3 +1429,13 @@ export const long_businessOpt = [
{ confId: "3", confValue: "权益" }, { confId: "3", confValue: "权益" },
{ confId: "2", confValue: "轻改" } { confId: "2", confValue: "轻改" }
] ]
export const isActiveOpt = [
{ confId: "Y", confValue: "生效" },
{ confId: "N", confValue: "不生效" }
]
export const actionOpt = [
{ confId: "create", confValue: "创建" },
{ confId: "update", confValue: "更新" },
{ confId: "enable", confValue: "生效" },
{ confId: "disable", confValue: "不生效" }
]
...@@ -144,5 +144,53 @@ export const routerName = { ...@@ -144,5 +144,53 @@ export const routerName = {
} }
], ],
component: _import("invoiceManage/invoiceRedManage") component: _import("invoiceManage/invoiceRedManage")
},
91704: {
path: "/ruleChangeSet",
name: "ruleChangeSet",
meta: {
title: "开票主体切换规则配置",
authId: "91704",
parentId: "917",
cache: false
},
auth: [
{
authId: "9170401",
parentId: "91704",
label: "新增规则",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9170402",
parentId: "91704",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9170403",
parentId: "91704",
label: "详情",
handle: "handleDetail"
},
{
authId: "9170404",
parentId: "91704",
label: "修改",
handle: "handleEdit"
},
{
authId: "9170405",
parentId: "91704",
label: "删除",
handle: "handleDelete"
}
],
component: _import("invoiceManage/ruleChangeSet")
} }
} }
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div v-loading="loading">
<div class="imgCon">
<img src="../images/step.png"
class="imgSize">
</div>
<div class="form_div">
<el-form class="edit-sub-block"
label-width="160px"
:inline="true">
<div class="itemDiv">
<el-form-item label="开票主体:"
class="halfItem">
{{ infoForm.invoiceSubjectCode ? infoForm.invoiceSubjectCode : "-" }}
</el-form-item>
<el-form-item label="月开票总额上限/元:"
class="halfItem">
{{ infoForm.monthlyLimit ? infoForm.monthlyLimit : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="切换主体:"
class="halfItem">
{{ infoForm.switchSubjectCode ? infoForm.switchSubjectCode : "-" }}
</el-form-item>
<el-form-item label="预警通知邮箱:"
class="halfItem"
:title="infoForm.warningEmails">
{{ infoForm.warningEmails ? (infoForm.warningEmails.length > 30 ? (infoForm.warningEmails.slice(0, 30) + '...') : infoForm.warningEmails) : '' }}
</el-form-item>
</div>
</el-form>
<div class="div-optShow">
<div class="div-optShow-title">操作结果</div>
<div class="div-optShow-content">
当前开票主体<span class="contentSpan">{{ infoForm.invoiceSubjectName }}</span>,
月开票额上限达到<span class="contentSpan">{{ infoForm.monthlyLimitShow }}</span>时,
切换开票主体为<span class="contentSpan">{{ infoForm.switchSubjectName }}</span>时,
并邮件通知<span class="contentSpan">{{ infoForm.warningEmailsShow }}</span>
</div>
</div>
<div>
<el-form label-width="160px"
:model="infoForm"
:inline="true">
<el-form-item label="规则生效状态:">
<el-switch v-model="infoForm.isActive"
active-value="Y"
inactive-value="N"
disabled>
</el-switch>
</el-form-item>
</el-form>
</div>
<div v-if="paramsObj">
<div class="div-title">操作日志</div>
<div class="d2-container-content">
<d2-table ref="recordTable"
:has-page="false"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
</d2-table>
</div>
</div>
</div>
</div>
</baseDialog>
</div>
</template>
<script>
import {
getSaleCompany,
getByIdForRule,
getLogsForRule
} from "@api/invoiceManage"
import { Util, deepClone } from "@/common/util"
import {
actionOpt
} from "@/common/constants.js"
export default {
name: "EditRuleDialog",
components: {},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("dialogClose", { flag: val })
}
}
},
mounted() {
this.getSaleCompany()
if (this.paramsObj) {
this.getByIdForRule()
}
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "规则详情",
width: "1080px"
}
},
infoForm: {
invoiceSubjectCode: '',
invoiceSubjectName: '__________',
switchSubjectCode: '',
switchSubjectName: '__________',
monthlyLimit: '',
warningEmails: '',
monthlyLimitShow: '__________',
warningEmailsShow: '__________',
isActive: 'Y'
},
options: [],
loading: true,
searchForm: {},
searchFormSearch: {},
getListApi: getLogsForRule,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: false,
tableColumns: [
{
label: "操作项",
prop: "action",
formatter: (cellValue) => {
return this.actionOpt.find(item => item.confId === cellValue.action)?.confValue
}
},
{
label: '操作时间',
prop: 'actionTime',
formatter: (cellValue) => {
return cellValue.actionTime ? Util.dateFormate(cellValue.actionTime, 'YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: "操作人",
prop: "actionBy"
}
]
},
actionOpt: deepClone(actionOpt)
}
},
methods: {
beforeSearchFn() {
return new Promise((resolve) => {
this.searchForm.id = this.paramsObj.id
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getByIdForRule() {
getByIdForRule({ id: this.paramsObj.id }).then((res) => {
this.infoForm = res
this.infoForm.monthlyLimitShow = deepClone(this.infoForm.monthlyLimit)
this.infoForm.warningEmailsShow = deepClone(this.infoForm.warningEmails)
this.loading = false
})
},
getSaleCompany() {
getSaleCompany({}).then((res) => {
this.options = res
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.div-title {
width: 1040px;
height: 30px;
border-bottom: 1px solid #e5e5e5;
font-size: 16px;
font-weight: 600;
color: #333333;
margin: 10px 0 20px 0;
}
.form_div {
color: #333333;
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
}
.imgCon {
text-align: center;
margin-bottom: 50px;
}
.imgSize {
width: 1040px;
}
.default-width {
width: 350px;
}
.div-optShow {
margin-bottom: 20px;
width: 1040px;
border-radius: 4px;
opacity: 1;
border: 1px solid #e5e5e5;
background: #fafafa;
.div-optShow-title {
color: #333333;
font-size: 16px;
font-weight: 600;
margin: 16px 0 8px 20px;
}
.div-optShow-content {
margin: 0 20px 20px 20px;
color: #333333;
font-size: 14px;
.contentSpan {
padding: 0 5px;
line-height: 30px;
color: #eb4e4e;
}
}
}
}
</style>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div slot="invoiceAmountHtml"> <div slot="invoiceAmountHtml">
<input-range start-placeholder="最小金额" <input-range start-placeholder="最小金额"
end-placeholder="最大金额" end-placeholder="最大金额"
regRuleStr="priceReg_negative_input" reg-rule-str="priceReg_negative_input"
:display-value="searchForm.invoiceAmount"></input-range> :display-value="searchForm.invoiceAmount"></input-range>
</div> </div>
</d2-search> </d2-search>
...@@ -39,15 +39,20 @@ ...@@ -39,15 +39,20 @@
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button"
slot-scope="scope">
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9170204']" /> <auth-button :data="scope.scope"
:show-btn-ids="['9170204']" />
</span> </span>
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9170205']" /> <auth-button :data="scope.scope"
:show-btn-ids="['9170205']" />
</span> </span>
<span style="margin-right: 10px" v-if="['NOT_RED','RED_FAIL'].includes(scope.scope.redFlag) && scope.scope.invoiceType == '1'"> <span style="margin-right: 10px"
<auth-button :data="scope.scope" :show-btn-ids="['9170206']" /> v-if="['NOT_RED','RED_FAIL'].includes(scope.scope.redFlag) && scope.scope.invoiceType == '1'">
<auth-button :data="scope.scope"
:show-btn-ids="['9170206']" />
</span> </span>
</div> </div>
</d2-table> </d2-table>
...@@ -59,7 +64,10 @@ ...@@ -59,7 +64,10 @@
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="closeDetailDialog" /> @dialogClose="closeDetailDialog" />
<!-- 冲红 --> <!-- 冲红 -->
<RedDialog :redVisible="redVisible" v-if="redVisible" :redInfo="redInfo" @handleRedClose="handleRedClose"></RedDialog> <RedDialog :red-visible="redVisible"
v-if="redVisible"
:red-info="redInfo"
@handleRedClose="handleRedClose"></RedDialog>
</div> </div>
</template> </template>
...@@ -100,7 +108,8 @@ export default { ...@@ -100,7 +108,8 @@ export default {
bizTradeNo: '', bizTradeNo: '',
buyerTaxpayerNum: '', buyerTaxpayerNum: '',
invoiceAmount: [], invoiceAmount: [],
invoiceType: '' invoiceType: '',
taxpayerChineseName: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
...@@ -196,6 +205,12 @@ export default { ...@@ -196,6 +205,12 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "InvoicingOpt" optionsName: "InvoicingOpt"
}, {
label: '销售方名称',
name: 'taxpayerChineseName',
type: 'input',
maxlength: '50',
isClear: true
}], }],
getListApi: invoiceInfoPage, getListApi: invoiceInfoPage,
tableParams: { tableParams: {
...@@ -224,6 +239,10 @@ export default { ...@@ -224,6 +239,10 @@ export default {
prop: 'buyerTaxpayerNum', prop: 'buyerTaxpayerNum',
width: '200px' width: '200px'
}, { }, {
label: '销售方名称',
prop: 'taxpayerChineseName',
width: '200px'
}, {
label: '数电票号码', label: '数电票号码',
prop: 'electronicInvoiceNo', prop: 'electronicInvoiceNo',
width: '200px' width: '200px'
...@@ -401,7 +420,8 @@ export default { ...@@ -401,7 +420,8 @@ export default {
bizTradeNo: '', bizTradeNo: '',
buyerTaxpayerNum: '', buyerTaxpayerNum: '',
invoiceAmount: [], invoiceAmount: [],
invoiceType: '' invoiceType: '',
taxpayerChineseName: ''
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
......
<!-- 门店产值 --> <!-- 已配置课程 -->
<template> <template>
<d2-container> <d2-container>
<div class="header" <div class="header"
...@@ -9,11 +9,6 @@ ...@@ -9,11 +9,6 @@
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData" :form-data="showFormData"
label-width="120px"> label-width="120px">
<div slot="invoiceAmountHtml">
<!-- <input-range start-placeholder="最小金额"
end-placeholder="最大金额"
:display-value="searchForm.invoiceAmount"></input-range> -->
</div>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId"
...@@ -25,7 +20,6 @@ ...@@ -25,7 +20,6 @@
@click="handleReset"> 重置 </el-button> @click="handleReset"> 重置 </el-button>
</div> </div>
</div> </div>
<!-- </div> -->
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header title="课程配置列表"> <d2-table-header title="课程配置列表">
<span> <auth-button category="Button" /></span> <span> <auth-button category="Button" /></span>
...@@ -103,7 +97,6 @@ ...@@ -103,7 +97,6 @@
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
@change="switchChange($event, scope.scope)"></el-switch> @change="switchChange($event, scope.scope)"></el-switch>
<!-- <span>{{ scope.scope.cancelStatus ? "启用" : "停用" }}</span> -->
</div> </div>
<div slot="auth-button" <div slot="auth-button"
slot-scope="scope"> slot-scope="scope">
...@@ -112,12 +105,6 @@ ...@@ -112,12 +105,6 @@
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9190102']" /> :show-btn-ids="['9190102']" />
</span> </span>
<!-- 启停 -->
<!-- <span style="margin-right: 10px"
v-if="scope.scope.invoiceQrCode">
<auth-button :data="scope.scope"
:show-btn-ids="['9190102']" />
</span> -->
</div> </div>
</d2-table> </d2-table>
</div> </div>
...@@ -264,8 +251,6 @@ export default { ...@@ -264,8 +251,6 @@ export default {
// 表格参数 // 表格参数
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
// mutiSelectUniqueKey: 'id',
// mutiSelectName: 'invoiceCode',
listName: "list", listName: "list",
tableOption: { width: "150px" }, tableOption: { width: "150px" },
tableColumns: [ tableColumns: [
...@@ -512,27 +497,15 @@ export default { ...@@ -512,27 +497,15 @@ export default {
closeDetailDialog() { closeDetailDialog() {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
// this.$refs.recordTable.refreshTable(false, true)
}, },
switchChange(e, row) { switchChange(e, row) {
// this.$confirm("请确认是否要执行当前操作?", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning",
// closeOnClickModal: false
// })
// .then(() => {
console.log(e) console.log(e)
console.log(row) console.log(row)
studyPunishUpdate({ id: row.id, punishFlag: e }).then((res) => { studyPunishUpdate({ id: row.id, punishFlag: e }).then((res) => {
this.notice.okTips() this.notice.okTips()
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
}) })
// })
// .catch((err) => {
// console.log(err)
// })
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!