Commit 0f1bd5da by chenwq

财资数据(优加)功能迁移

1 parent 8216aa96
...@@ -314,7 +314,7 @@ export const routerName = { ...@@ -314,7 +314,7 @@ export const routerName = {
path: "/theAssetData", path: "/theAssetData",
name: "theAssetData", name: "theAssetData",
meta: { meta: {
title: "财资数据", title: "财资数据(广联)",
authId: "90509", authId: "90509",
parentId: "905", parentId: "905",
cache: false, cache: false,
...@@ -918,4 +918,53 @@ export const routerName = { ...@@ -918,4 +918,53 @@ export const routerName = {
}, },
component: _import("financeManage/exceptionOrderManage/detail"), component: _import("financeManage/exceptionOrderManage/detail"),
}, },
90519: {
path: "/YJTheAssetData",
name: "YJTheAssetData",
meta: {
title: "财资数据(优加)",
authId: "90519",
parentId: "905",
cache: false,
},
auth: [
{
authId: "9051901",
parentId: "90519",
label: "重取明细",
category: "Button",
type: "primary",
handle: "handleRefetchDetail",
},
{
authId: "9051902",
parentId: "90519",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport",
},
{
authId: "9051903",
parentId: "90519",
label: "详情",
handle: "handleDetail",
},
{
authId: "9051904",
parentId: "90519",
label: "回单",
handle: "handleReceipt",
},
{
authId: "9051905",
parentId: "90519",
label: "批量打印",
category: "Button",
type: "primary",
handle: "handleBatchPrint",
},
],
component: _import("financeManage/YJTheAssetData/index"),
},
}; };
<!-- 导入明细&回单 第三步 -->
<template>
<d2-container>
<div class="infoDiv">
<div class="imgCon">
<img src="../image/threeStep.png"
class="imgSize">
</div>
<div class="describe">
<div class="describe-title">
<div><img src="../image/info-circle-fill.png"></div>
<div class="describe-title-text">操作成功</div>
<div class="describe-title-tips">请关注企微机器人通知</div>
</div>
<div class="describe-text">
流水明细状态:{{ resultInfo.detailSuccessCount ? resultInfo.detailSuccessCount : '-' }}条</div>
<div class="describe-text">
导入回单:{{ resultInfo.receiptSuccessCount ? resultInfo.receiptSuccessCount : '-' }}条</div>
</div>
<div class="footer">
<el-button @click="submitForm"
type="primary"
:loading="$store.state.d2admin.loading.value">再导一次</el-button>
<el-button @click="routerBack">返回</el-button>
</div>
</div>
</d2-container>
</template>
<script>
import { mapActions, mapState } from 'vuex'
export default {
name: 'ImportThree',
props: {
resultInfo: {
type: Object,
default: () => { }
}
},
components: {
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info
}
},
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() {
},
routerBack() {
this.$emit('goBackListPage')
},
submitForm() {
this.$emit('importAgain')
}
}
}
</script>
<style scoped>
.infoDiv {
width: 100%;
/* height: 100%; */
background-color: #fff;
}
.imgCon {
text-align: center;
/* margin-bottom: 50px; */
}
.imgSize {
width: 1200px;
}
.describe {
border-radius: 4px;
opacity: 1;
background: #fafafa;
width: 98%;
height: 110px;
/* margin: 0 auto 20px; */
.describe-title {
display: flex;
justify-content: center; /* 水平居中 */
padding: 17px 0 0 9px;
.describe-title-text {
font-size: 16px;
font-weight: 600;
padding-left: 10px;
}
.describe-title-tips {
font-size: 14px;
color: #999999;
padding-left: 8px;
}
}
.describe-text {
font-size: 14px;
color: #333333;
text-align: center;
padding-top: 5px;
}
}
.footer {
text-align: center;
padding: 20px 0 20px 0;
}
</style>
<template>
<div class="range">
<div :class="[
' el-date-editor',
'el-range-editor',
'el-input__inner',
'el-date-editor--daterange',
'el-range-editor--small',
pickerVisible ? 'is-active' : ''
]"
@click="handleRangeClick"
@mouseleave="showClose = false"
@mousemove="handleMove"
ref="reference">
<template v-if="infinity">
<el-input-number class="el-range-input hide-btn"
:placeholder="startPlaceholder"
v-model="userInput[0]"
@blur="handleBlur(0)"></el-input-number>
<span class="el-range-separator">至</span>
<el-input-number class="el-range-input hide-btn"
:placeholder="endPlaceholder"
v-model="userInput[1]"
@blur="handleBlur(1)"></el-input-number>
</template>
<template v-else>
<el-input v-model="userInput[0]"
:placeholder="startPlaceholder"
@blur="handleBlur(0)"
@input="handleStartInput"
class="el-range-input"></el-input>
<span class="el-range-separator">至</span>
<el-input v-model="userInput[1]"
:placeholder="endPlaceholder"
@input="handleEndInput"
@focus="handleFocus"
@blur="handleBlur(1)"
class="el-range-input"></el-input>
</template>
<i v-show="showClose"
@click="handleClickIcon"
class="el-icon-circle-close"></i>
</div>
<div class="errorTips"
v-if="tipsShow">最大金额需大于最小金额</div>
</div>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
data() {
return {
pickerVisible: false,
showClose: false,
userInput: this.displayValue,
oldVal: {
startInput: '',
endInput: ''
},
tipsShow: false
}
},
props: {
displayValue: Array,
placeholder: String,
startPlaceholder: String,
endPlaceholder: String,
infinity: Boolean
},
watch: {
displayValue(val) {
if (val) {
this.userInput = val
if (val.length == 0) {
this.tipsShow = false
}
}
}
},
methods: {
handleStartInput(event) {
// const isNumber = /^\d+$/.test(event)
// if (!isNumber) {
// event = null
// }
// if (event > 100) event = 100
// this.userInput[0] = event
this.userInput[0] = limitPrice(event, this.oldVal.startInput, 20, 2)
this.oldVal.startInput = this.userInput[0]
},
handleEndInput(event) {
// const isNumber = /^\d+$/.test(event)
// if (!isNumber) {
// event = null
// }
// if (event > 100) event = 100
// this.userInput[1] = event
this.userInput[1] = limitPrice(event, this.oldVal.endInput, 20, 2)
this.oldVal.endInput = this.userInput[1]
},
handleClickIcon(event) {
this.userInput[0] = null
this.userInput[1] = null
this.tipsShow = false
},
valueIsEmpty() {
const val = this.userInput
if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; i++) {
if (val[i]) {
return false
}
}
}
return true
},
handleRangeClick() {
this.pickerVisible = true
},
handleMove() {
if (this.valueIsEmpty()) {
this.showClose = false
} else {
this.showClose = true
}
},
handleFocus() {
if (!this.pickerVisible) {
this.pickerVisible = true
this.$emit("focus", this)
}
},
handleBlur(index) {
this.pickerVisible = false
this.contrastValue()
},
contrastValue() {
const val = this.userInput
if (Array.isArray(val)) {
if (+val[0] > +val[1]) {
val[1] = null
this.tipsShow = true
} else {
this.tipsShow = false
}
}
}
}
}
</script>
<style scoped lang="scss">
.range {
.el-range-input {
::v-deep {
input {
border: 0;
margin-top: -2px;
height: 28px;
}
}
}
.el-icon-circle-close {
color: #dcdfe6;
margin-left: 10px;
}
.hide-btn {
::v-deep {
span {
display: none;
}
input {
padding: 0;
}
}
}
.errorTips {
color: red;
// text-align: center;
font-size: 12px;
}
}
</style>
<!-- 重取明细 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="dialogShow"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="tipFont">重新获取银行明细与回单,需等待15分钟,且接口限制单次获取上限1000条,请谨慎选择筛选条件!</div>
<div class="add-dialog">
<glsx-combi-form class="edit-form-container"
ref="editFormRef"
label-width="150px"
default-width="400px"
:form-ref="handleFormRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules">
<div slot="accHtml">
<el-select v-model="infoForm.accNameList"
clearable
:style="{ width: '400px'}"
placeholder="请选择单位名称"
multiple
collapse-tags>
<span class="select-all">
<el-checkbox v-model="allSelected"
@change="toggleAll">全选</el-checkbox>
</span>
<el-option v-for="item in baseData.accNameList"
:key="item.confId"
:label="item.confValue"
:value="item.confId"></el-option>
</el-select>
</div>
</glsx-combi-form>
</div>
<!-- <span class="dialog-footer">
<el-button size="small"
@click="dialogShow = false">取 消</el-button>
<el-button size="small"
type="primary"
@click="handleSelect">确 定</el-button>
</span> -->
</baseDialog>
</template>
<script>
import { nbcbAccDetailConfig, nbcbAccDetailRefetch } from '@api/theAssetData'
import { Util, deepClone } from '@/common/util'
export default {
name: 'RefetchDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
accNameList: [],
bankType: '',
bankAcc: '',
transactionTime: ''
},
dialogConfig: {
title: '重取明细',
width: '720px'
// isShowFooter: false
},
config: {
// isShowFooter: false
},
handleFormRef: 'handleFormRef',
formRules: {
transactionTime: [{ required: true, message: '请选择交易时间', trigger: 'change' }]
},
editFormData: [
{
label: '单位名称',
addHtml: 'accHtml'
},
// {
// label: '单位名称',
// name: 'accNameList',
// type: 'select',
// isClear: true,
// multiple: true,
// collapseTags: true,
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confValue',
// optionsName: 'accNameList'
// },
{
label: '银行类别',
name: 'bankType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'bankTypeList'
}, {
label: '本方账号',
name: 'bankAcc',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'bankAccList'
}, {
label: '交易时间',
name: 'transactionTime',
type: 'datePicker',
isClear: true,
// pickerOptions: 'beforeRangePickerOptions'
pickerOptions: "rangePickerOptions_30day2"
}],
baseData: {
accNameList: [],
bankTypeList: [],
bankAccList: []
},
allSelected: false
}
},
props: {
visible: {
type: Boolean,
default: false
}
// paramsObj: {
// type: Object,
// default: {}
// }
},
watch: {
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'visible' })
}
}
},
mounted() {
this.nbcbAccDetailConfig()
// this.getOptionsList()
},
methods: {
getOptionsList() {
this.editFormData.forEach((item, index) => {
if (item.type === 'select') {
// if (
// this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部' && item.label != '单位名称'
// ) {
// const temp = {}
// temp[this.showFormData[index].optionId] = ''
// temp[this.showFormData[index].optionLabel] = '全部'
// this.baseData[item.optionsName].unshift(temp)
// }
this.$set(
this.editFormData[index],
'optionList',
this.baseData[item.optionsName]
)
}
})
},
// 财资数据筛选项列表
nbcbAccDetailConfig() {
nbcbAccDetailConfig({}).then(res => {
for (var key in res) {
if (this.baseData[key]) {
this.baseData[key] = res[key]
this.baseData[key] = this.baseData[key].map(item => {
return {
confId: item,
confValue: item
}
})
}
}
this.getOptionsList()
})
},
// 实现全选功能的方法
toggleAll() {
console.log('this.allSelected', this.allSelected)
if (this.allSelected) {
this.infoForm.accNameList = this.baseData.accNameList.map(option => option.confId)
} else {
this.infoForm.accNameList = []
}
// 更新allSelected状态,确保下一次操作时状态正确
// this.allSelected = !this.allSelected
},
handleAddConfirm() {
this.$refs.editFormRef.$refs[this.handleFormRef].validate(valid => {
if (valid) {
var params = deepClone(this.infoForm)
if (params.accNameList.length == 0 && params.bankType == '' && params.bankAcc == '') {
// this.notice.warningTips('请选择除日期外的任意一个或多个条件!')
this.$message({
message: "请选择除日期外的任意一个或多个条件!",
type: "warning",
showClose: true
})
return
}
if (params.transactionTime) {
params.transTimeStart = Util.dateFormate(params.transactionTime[0], 'YYYY-MM-DD')
params.transTimeEnd = Util.dateFormate(params.transactionTime[1], 'YYYY-MM-DD')
} else {
delete params.transTimeStart
delete params.transTimeEnd
}
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
nbcbAccDetailRefetch(params).then(res => {
this.notice.okTips()
this.dialogShow = true
})
}).catch(err => {
console.log(err)
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.add-dialog {
margin: 20px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
.down-cla {
width: 56px;
height: 32px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #185efe;
text-align: right;
line-height: 32px;
padding-left: 8px;
// cursor: pointer;
}
.upload-file {
::v-deep .el-upload-dragger {
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
width: 300px;
height: 160px;
background: #f7f7f7;
.el-icon-upload {
margin: 0;
}
.el-upload__text {
font-size: 14px;
color: #000000;
}
.item-tips {
font-size: 12px;
color: #999999;
height: 22px;
line-height: 22px;
}
.text-tips {
font-size: 14px;
}
}
}
.file-box {
width: 350px;
.file-item {
margin-top: 6px;
position: relative;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
::v-deep .el-progress-bar {
width: 320px;
background: #ffffff;
border: 1px solid #f4f6fc;
border-radius: 4px;
.el-progress-bar__outer {
background: transparent;
border-radius: 4px;
.el-progress-bar__inner {
background: #f5f7fa;
border-radius: 4px;
}
}
}
::v-deep .el-image-viewer__wrapper {
width: 100vw;
height: 100vh;
}
.file-name {
position: absolute;
left: 12px;
top: 6px;
transform: translateY(-50%);
color: #333333;
font-size: 14px;
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.image-file {
z-index: -1;
}
}
.file-item:first-child {
margin-top: 15px;
.file-name {
position: absolute;
left: 12px;
top: 15px;
transform: translateY(-50%);
color: #333333;
font-size: 14px;
}
}
}
}
.tipFont {
margin: 10px 0 0 60px;
width: 535px;
height: 22px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 12px;
color: #eb4e4e;
}
.select-all {
margin: 0 0 20px 20px;
}
</style>
<!-- 导入明细&回单主页面 -->
<template>
<div class="importDetail">
<div class="header"
slot="header">
<div>
<import-one ref="importOne"
v-if="activeName === 'one'"
@oneStepComplete="oneStepComplete" />
<import-two v-if="activeName === 'two'"
:task-info="taskInfo"
@twoStepComplete="twoStepComplete"
@goBackOneStep="goBackOneStep" />
<import-three v-if="activeName === 'three'"
:result-info="resultInfo"
@importAgain="importAgain"
@goBackListPage="goBackListPage" />
</div>
</div>
</div>
</template>
<script>
import importOne from './components/importOne'
import importTwo from './components/importTwo'
import importThree from './components/importThree'
import { mapActions } from 'vuex'
export default {
name: 'StaffIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'one',
taskInfo: null,
resultInfo: null
}
},
components: {
importOne,
importTwo,
importThree
},
mounted() {
if (this.$route.query.step) {
console.log('step', this.$route.query.step)
this.activeName = this.$route.query.step
this.taskInfo = this.$route.query.taskInfo
}
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
oneStepComplete(data) {
console.log('data', data)
this.activeName = 'two'
},
goBackOneStep() {
this.activeName = 'one'
},
twoStepComplete(data) {
this.resultInfo = data
this.activeName = 'three'
},
importAgain() {
this.activeName = 'one'
},
goBackListPage() {
this.close({ tagName: "/importDetailControl" })
this.$router.push({
name: "theAssetData"
})
}
}
}
</script>
<style lang="scss" scoped>
.importDetail {
padding: 0 20px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!