master
sunzehua 10 months ago
parent 35219cc2df
commit da228370b6

@ -198,3 +198,140 @@ export function FeeCustTemplateDelete(parameter) {
data: parameter
})
}
export function GetFeeCustomerList(parameter) {
return axios({
url: '/FeeRecord/GetFeeCustomerList',
method: 'get',
params: parameter
})
}
export function FeeCodePage(parameter) {
return axios({
url: '/FeeCode/Page',
method: 'post',
data: parameter
})
}
export function FeeCodeSave(parameter) {
return axios({
url: '/FeeCode/Save',
method: 'post',
data: parameter
})
}
export function FeeCodeDelete(parameter) {
return axios({
url: '/FeeCode/Delete',
method: 'post',
data: parameter
})
}
export function FeeCurrencySave(parameter) {
return axios({
url: '/FeeCurrency/Save',
method: 'post',
data: parameter
})
}
export function FeeCurrencyPage(parameter) {
return axios({
url: '/FeeCurrency/Page',
method: 'post',
data: parameter
})
}
export function FeeCurrencyDelete(parameter) {
return axios({
url: '/FeeCurrency/Delete',
method: 'post',
data: parameter
})
}
export function FeeCurrencyList(parameter) {
return axios({
url: '/FeeCurrency/List',
method: 'get',
data: parameter
})
}
export function FeeCurrencyExchangePage(parameter) {
return axios({
url: '/FeeCurrencyExchange/Page',
method: 'post',
data: parameter
})
}
export function FeeCurrencyExchangeSave(parameter) {
return axios({
url: '/FeeCurrencyExchange/Save',
method: 'post',
data: parameter
})
}
export function FeeCurrencyExchangeDelete(parameter) {
return axios({
url: '/FeeCurrencyExchange/Delete',
method: 'post',
data: parameter
})
}
export function FeeTemplateSave(parameter) {
return axios({
url: '/FeeTemplate/Save',
method: 'post',
data: parameter
})
}
export function FeeTemplateDelete(parameter) {
return axios({
url: '/FeeTemplate/Delete',
method: 'post',
data: parameter
})
}
export function FeeTemplatePage(parameter) {
return axios({
url: '/FeeTemplate/Page',
method: 'post',
data: parameter
})
}
export function FeeTemplateDetail(parameter) {
return axios({
url: '/FeeTemplate/Detail',
method: 'get',
params: parameter
})
}
export function FeeCodeList(parameter) {
return axios({
url: '/FeeCode/List',
method: 'get',
params: parameter
})
}
export function GetFeeUnitList(parameter) {
return axios({
url: '/FeeRecord/GetFeeUnitList',
method: 'get',
params: parameter
})
}

@ -0,0 +1,489 @@
<template>
<div>
<!-- <a-card :bordered="false" :bodyStyle="tstyle">
<div class="table-page-search-wrapper" :class="advanced ? 'Open' : 'Close'">
<a-form :model="form" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
<a-row>
<a-col :span="6">
<a-form-item label="邮箱主题">
<a-input v-model="form.mailSubject" allow-clear placeholder="请输入邮箱主题" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
</a-card> -->
<a-card :bordered="false">
<div style="margin-bottom: 10px;display: flex;justify-content: space-between;">
<div>
<a-button type="primary" @click="handleAdd"></a-button>
</div>
<div>
<a-button type="primary" @click="FnGetData"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
</div>
</div>
<vxe-table
:data="loadData"
stripe
resizable
round
:loading="loading"
ref="xTable1"
empty-text="没有更多数据了!">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column
v-for="item in columns"
:key="`${item.dataIndex}3`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:fixed="item.fixed"
:align="item.align">
<template #default="{ row }">
<div v-if="item.dataIndex == 'isSea'">
<span v-if="row.isSea"></span>
<span v-else></span>
</div>
<div v-else-if="item.dataIndex == 'isAir'">
<span v-if="row.isAir"></span>
<span v-else></span>
</div>
<div v-else-if="item.dataIndex == 'isTrucking'">
<span v-if="row.isTrucking"></span>
<span v-else></span>
</div>
<div v-else-if="item.dataIndex == 'isWMS'">
<span v-if="row.isWMS"></span>
<span v-else></span>
</div>
<span v-else>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="120" align="center">
<template #default="{ row }">
<a-icon style="margin:0 12px" @click="handleEdit(row)" type="form" :style="{ color: '#13c2c2' }" />
<a-popconfirm
title="请确认删除?"
ok-text="是"
cancel-text="否"
@confirm="e => {
confirm(e, row.id)
}
">
<a-icon type="delete" :style="{ color: '#13c2c2' }" />
</a-popconfirm>
</template>
</vxe-column>
</vxe-table>
<vxe-pager
:loading="loading"
:current-page="queryParam.pageNo"
:page-size="queryParam.pageSize"
:total="queryParam.totalResult"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
@page-change="handlePageChange">
</vxe-pager>
</a-card>
<a-modal :title="title" @ok="handleSave" width="1200px" @cancel="visible = false" :visible="visible">
<a-spin :spinning="formLoad">
<a-form-model :rules="rules" ref="addForm" :model="addForm" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row>
<a-col :span="8">
<a-form-model-item label="费用代码">
<a-input v-model="addForm.code" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="费用名称">
<a-input v-model="addForm.name" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="费用英文名称">
<a-input v-model="addForm.description" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-model-item label="默认计费标准">
<a-input v-model="addForm.defaultUnit" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="默认收费客户类型">
<a-select v-model="addForm.defaultDebit" style="width: 100%" >
<a-select-option v-for="(item,index) in customerTypeList" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="默认付费客户类型">
<a-select v-model="addForm.defaultCredit" style="width: 100%" >
<a-select-option v-for="(item,index) in customerTypeList" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-model-item label="默认币别">
<a-select v-model="addForm.defaultCurr" style="width: 100%" >
<a-select-option v-for="(item,index) in currencyList" :key="index" :value="item.codeName">{{ item.codeName }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="默认FRT">
<a-select v-model="addForm.feeFrt" style="width: 100%" >
<a-select-option v-for="(item,index) in customerTypeList" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="默认税率">
<a-input-number style="width: 100%;" v-model="addForm.taxRate" :precision="2" :min="0" :step="0.1" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-model-item label="费用分组">
<a-input v-model="addForm.feeGroup" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="对账类别">
<a-input v-model="addForm.duiType" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="发票商品名称">
<a-input v-model="addForm.goodName" />
</a-form-model-item>
</a-col>
</a-row>
<div style="padding-left: 50px;">
<a-checkbox v-model="addForm.isSea"></a-checkbox>
<a-checkbox v-model="addForm.isAir"></a-checkbox>
<a-checkbox v-model="addForm.isTrucking"></a-checkbox>
<a-checkbox>是否陆运固定费用</a-checkbox>
<a-checkbox v-model="addForm.isWMS"></a-checkbox>
<a-checkbox >是否垫付费用</a-checkbox>
<a-checkbox v-model="addForm.isOpen"></a-checkbox>
<a-checkbox v-model="addForm.isInvoice"></a-checkbox>
</div>
</a-form-model>
</a-spin>
</a-modal>
</div>
</template>
<script>
import {
FeeCodePage,
FeeCodeSave,
FeeCodeDelete,
GetFeeCustomerList,
FeeCurrencyList
} from '@/api/modular/main/mailSetting'
import columnSetting from '@/components/tableColumnSetting'
export default {
components: {
columnSetting
},
data() {
return {
TypeData: [],
// /
advanced: false,
visible: false,
loading: false,
selectedRowKeys: [],
title: '',
againVisible: false,
fileList: [],
setVisible: false,
setVisible1: false,
customerList: [],
addSettingFlag: false,
customerTypeList: [],
formLoad: false,
againLoad: false,
labelCol: { span: 8 },
wrapperCol: { span: 14 },
addForm: {
},
queryParam: {
pageNo: 1,
pageSize: 10,
totalResult: 1
},
parserList: [],
form: {},
mailHtml: '',
ColumnsQuery: [],
currencyList: [],
columns: [
{
title: '费用代码',
align: 'center',
width: '100',
dataIndex: 'code'
},
{
title: '费用名称',
align: 'center',
width: '100',
dataIndex: 'name'
},
{
title: '费用英文名称',
align: 'center',
width: '110',
dataIndex: 'description'
},
{
title: '默认币别',
align: 'center',
width: '80',
dataIndex: 'defaultCurr'
},
{
title: '是否海运',
align: 'center',
width: '80',
dataIndex: 'isSea'
},
{
title: '是否空运',
align: 'center',
width: '80',
dataIndex: 'isAir'
},
{
title: '是否陆运',
align: 'center',
width: '80',
dataIndex: 'isTrucking'
},
{
title: '是否陆运固定费用',
align: 'center',
width: '150',
dataIndex: 'accTaxRate'
},
{
title: '是否仓储费用',
align: 'center',
width: '150',
dataIndex: 'isWMS'
},
{
title: '是否垫付费用',
align: 'center',
width: '150',
dataIndex: 'isAdvancedPay'
},
{
title: '默认计费标准',
align: 'center',
width: '110',
dataIndex: 'defaultUnit'
},
{
title: '默认收费客户类型',
align: 'center',
width: '140',
dataIndex: 'defaultDebit'
},
{
title: '默认付费客户类型',
align: 'center',
width: '140',
dataIndex: 'defaultCredit'
},
{
title: '默认FRT',
align: 'center',
width: '80',
dataIndex: 'feeFrt'
},
{
title: '默认税率',
align: 'center',
width: '80',
dataIndex: 'taxRate'
},
{
title: '创建人',
align: 'center',
width: '80',
dataIndex: 'remark1'
},
{
title: '创建时间',
align: 'center',
width: '150',
dataIndex: 'remark2'
},
{
title: '费用分组',
align: 'center',
width: '80',
dataIndex: 'feeGroup'
}
],
rules: {
emailAccount: [{ required: true, message: '请输入邮箱账号', trigger: 'blur' }],
password: [{ required: true, message: '请输入邮箱密码', trigger: 'blur' }],
useIMAP: [{ required: true, message: '请选择接收服务器类型', trigger: 'change' }],
smtpServer: [{ required: true, message: '请输入发件服务器', trigger: 'change' }],
receiveServer: [{ required: true, message: '请输入收件服务器', trigger: 'change' }]
},
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
loadData: []
}
},
created() { },
mounted() {
this.FnGetData()
this.customerTypeList = this.$options.filters['dictData']('djy_cust_prop')
this.getCurrency()
},
methods: {
toggleAdvanced() {
this.advanced = !this.advanced
},
getCurrency() {
FeeCurrencyList().then(res => {
this.currencyList = res.data
})
},
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
handleChange(val) {
GetFeeCustomerList({ code: val }).then(res => {
this.customerList = res.data
})
},
handleEdit(row) {
this.title = '费用代码编辑'
this.addForm = JSON.parse(JSON.stringify(row))
this.visible = true
},
handleSave() {
this.$refs.addForm.validate(valid => {
if (valid) {
this.formLoad = true
this.customerList.forEach(item => {
if (item.code === this.addForm.customerCode) {
this.addForm.customerName = item.name
}
})
FeeCodeSave(this.addForm).then(res => {
if (res.success) {
this.$message.success('保存成功')
this.FnGetData()
this.visible = false
} else {
this.$message.error(res.message)
}
this.formLoad = false
})
} else {
return false;
}
});
},
init() {
this.form = {}
},
handlePageChange({ currentPage, pageSize }) {
this.queryParam.pageNo = currentPage
this.queryParam.pageSize = pageSize
this.FnGetData()
},
FnGetData() {
this.loading = true
this.form.pageNo = this.queryParam.pageNo
this.form.pageSize = this.queryParam.pageSize
FeeCodePage(this.form).then(res => {
if (res.success) {
this.loadData = res.data.rows
this.queryParam.totalResult = res.data.totalRows
}
this.loading = false
})
},
confirm(e, data) {
this.handleDelete(data)
},
handleDelete(record) {
FeeCodeDelete([record]).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.FnGetData()
} else {
this.$message.error(`删除失败,${res.message}`)
}
})
},
handleAdd() {
this.title = '费用代码新增'
this.visible = true
this.addForm = {
}
}
}
}
</script>
<style lang="less" scoped>
/deep/ .ant-descriptions-item-label {
font-weight: bold;
}
.table-operator {
margin-bottom: 18px;
}
.Close {
height: 45px;
overflow: hidden;
}
.vxe-table--render-default .vxe-body--row.row--stripe {
background: #f5f9fe;
}
.ant-card-body {
padding-top: 10px;
}
.inline {
position: relative;
}
.inline-right {
position: absolute;
top: 6px;
right: 25px;
}
.look-item {
display: flex;
align-items: center;
margin-bottom: 5px;
.look-left {
font-weight: bold;
display: inline-block;
margin-right: 10px;
width: 80px;
color: black;
text-align: right;
}
}
</style>

@ -0,0 +1,344 @@
<template>
<div>
<!-- <a-card :bordered="false" :bodyStyle="tstyle">
<div class="table-page-search-wrapper" :class="advanced ? 'Open' : 'Close'">
<a-form :model="form" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
<a-row>
<a-col :span="6">
<a-form-item label="邮箱主题">
<a-input v-model="form.mailSubject" allow-clear placeholder="请输入邮箱主题" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
</a-card> -->
<a-card :bordered="false">
<div style="margin-bottom: 10px;display: flex;justify-content: space-between;">
<div>
<a-button type="primary" @click="handleAdd"></a-button>
</div>
<div>
<a-button type="primary" @click="FnGetData"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
</div>
</div>
<vxe-table
:data="loadData"
stripe
resizable
round
:loading="loading"
ref="xTable1"
empty-text="没有更多数据了!">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column
v-for="item in columns"
:key="`${item.dataIndex}3`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:fixed="item.fixed"
:align="item.align">
<template #default="{ row }">
<div v-if="item.dataIndex == 'isSea'">
<span v-if="row.isSea"></span>
<span v-else></span>
</div>
<span v-else>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="120" align="center">
<template #default="{ row }">
<a-icon style="margin:0 12px" @click="handleEdit(row)" type="form" :style="{ color: '#13c2c2' }" />
<a-popconfirm
title="请确认删除?"
ok-text="是"
cancel-text="否"
@confirm="e => {
confirm(e, row.id)
}
">
<a-icon type="delete" :style="{ color: '#13c2c2' }" />
</a-popconfirm>
</template>
</vxe-column>
</vxe-table>
<vxe-pager
:loading="loading"
:current-page="queryParam.pageNo"
:page-size="queryParam.pageSize"
:total="queryParam.totalResult"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
@page-change="handlePageChange">
</vxe-pager>
</a-card>
<a-modal :title="title" @ok="handleSave" width="1200px" @cancel="visible = false" :visible="visible">
<a-spin :spinning="formLoad">
<a-form-model :rules="rules" ref="addForm" :model="addForm" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row>
<a-col :span="8">
<a-form-model-item label="币别代码">
<a-input v-model="addForm.codeName" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="英文名称">
<a-input v-model="addForm.name" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="中文描述名称">
<a-input v-model="addForm.description" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-model-item label="对人民币汇率">
<a-input v-model="addForm.defaultRate" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="财务软件代码">
<a-input v-model="addForm.financeSoftCode" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</a-spin>
</a-modal>
</div>
</template>
<script>
import {
FeeCurrencyPage,
FeeCurrencySave,
FeeCurrencyDelete,
GetFeeCustomerList
} from '@/api/modular/main/mailSetting'
import columnSetting from '@/components/tableColumnSetting'
export default {
components: {
columnSetting
},
data() {
return {
TypeData: [],
// /
advanced: false,
visible: false,
loading: false,
selectedRowKeys: [],
againVisible: false,
fileList: [],
setVisible: false,
title:'',
setVisible1: false,
customerList: [],
addSettingFlag: false,
customerTypeList: [],
formLoad: false,
againLoad: false,
labelCol: { span: 8 },
wrapperCol: { span: 14 },
addForm: {
},
queryParam: {
pageNo: 1,
pageSize: 10,
totalResult: 1
},
parserList: [],
form: {},
mailHtml: '',
ColumnsQuery: [],
columns: [
{
title: '币别代码',
align: 'center',
width: '100',
dataIndex: 'codeName'
},
{
title: '英文名称',
align: 'center',
width: '100',
dataIndex: 'name'
},
{
title: '中文描述名称',
align: 'center',
width: '110',
dataIndex: 'description'
},
{
title: '对人民币汇率',
align: 'center',
width: '80',
dataIndex: 'defaultRate'
},
{
title: '财务软件代码',
align: 'center',
width: '80',
dataIndex: 'financeSoftCode'
}
],
rules: {
emailAccount: [{ required: true, message: '请输入邮箱账号', trigger: 'blur' }],
password: [{ required: true, message: '请输入邮箱密码', trigger: 'blur' }],
useIMAP: [{ required: true, message: '请选择接收服务器类型', trigger: 'change' }],
smtpServer: [{ required: true, message: '请输入发件服务器', trigger: 'change' }],
receiveServer: [{ required: true, message: '请输入收件服务器', trigger: 'change' }]
},
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
loadData: []
}
},
created() { },
mounted() {
this.FnGetData()
this.customerTypeList = this.$options.filters['dictData']('djy_cust_prop')
},
methods: {
toggleAdvanced() {
this.advanced = !this.advanced
},
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
handleChange(val) {
GetFeeCustomerList({ code: val }).then(res => {
this.customerList = res.data
})
},
handleEdit(row) {
this.title = '币别编辑'
if (row.isAdvancedPay) {
row.isAdvancedPay = 'true'
} else {
row.isAdvancedPay = 'false'
}
if (row.isInvoice) {
row.isInvoice = 'true'
} else {
row.isInvoice = 'false'
}
this.addForm = JSON.parse(JSON.stringify(row))
this.visible = true
},
handleSave() {
this.$refs.addForm.validate(valid => {
if (valid) {
this.formLoad = true
this.customerList.forEach(item => {
if (item.code === this.addForm.customerCode) {
this.addForm.customerName = item.name
}
})
FeeCurrencySave(this.addForm).then(res => {
if (res.success) {
this.$message.success('保存成功')
this.FnGetData()
this.visible = false
} else {
this.$message.error(res.message)
}
this.formLoad = false
})
} else {
return false;
}
});
},
init() {
this.form = {}
},
handlePageChange({ currentPage, pageSize }) {
this.queryParam.pageNo = currentPage
this.queryParam.pageSize = pageSize
this.FnGetData()
},
FnGetData() {
this.loading = true
this.form.pageNo = this.queryParam.pageNo
this.form.pageSize = this.queryParam.pageSize
FeeCurrencyPage(this.form).then(res => {
if (res.success) {
this.loadData = res.data.rows
this.queryParam.totalResult = res.data.totalRows
}
this.loading = false
})
},
confirm(e, data) {
this.handleDelete(data)
},
handleDelete(record) {
FeeCurrencyDelete([record]).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.FnGetData()
} else {
this.$message.error(`删除失败,${res.message}`)
}
})
},
handleAdd() {
this.title = '币别新增'
this.visible = true
this.addForm = {
}
}
}
}
</script>
<style lang="less" scoped>
/deep/ .ant-descriptions-item-label {
font-weight: bold;
}
.table-operator {
margin-bottom: 18px;
}
.Close {
height: 45px;
overflow: hidden;
}
.vxe-table--render-default .vxe-body--row.row--stripe {
background: #f5f9fe;
}
.ant-card-body {
padding-top: 10px;
}
.inline {
position: relative;
}
.inline-right {
position: absolute;
top: 6px;
right: 25px;
}
.look-item {
display: flex;
align-items: center;
margin-bottom: 5px;
.look-left {
font-weight: bold;
display: inline-block;
margin-right: 10px;
width: 80px;
color: black;
text-align: right;
}
}
</style>

@ -0,0 +1,411 @@
<template>
<div>
<a-card :bordered="false" :bodyStyle="tstyle">
<div class="table-page-search-wrapper" :class="advanced ? 'Open' : 'Close'">
<a-form :model="form" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
<a-row>
<a-col :span="6">
<a-form-item label="币别">
<a-select v-model="form.currency" style="width: 100%">
<a-select-option
v-for="(item, index) in currencyList"
:key="index"
:value="item.codeName">{{ item.codeName }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
</a-card>
<a-card :bordered="false">
<div style="margin-bottom: 10px;display: flex;justify-content: space-between;">
<div>
<a-button type="primary" @click="handleAdd"></a-button>
</div>
<div>
<a-button type="primary" @click="FnGetData"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
</div>
</div>
<vxe-table
:data="loadData"
stripe
resizable
round
:loading="loading"
ref="xTable1"
empty-text="没有更多数据了!">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column
v-for="item in columns"
:key="`${item.dataIndex}3`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:fixed="item.fixed"
:align="item.align">
<template #default="{ row }">
<div v-if="item.dataIndex == 'startTime'">
{{ row.startTime.substring(0,11) }}
</div>
<div v-else-if="item.dataIndex == 'endTime'">
{{ row.endTime.substring(0,11) }}
</div>
<span v-else>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="120" align="center">
<template #default="{ row }">
<a-icon style="margin:0 12px" @click="handleEdit(row)" type="form" :style="{ color: '#13c2c2' }" />
<a-popconfirm
title="请确认删除?"
ok-text="是"
cancel-text="否"
@confirm="e => {
confirm(e, row.id)
}
">
<a-icon type="delete" :style="{ color: '#13c2c2' }" />
</a-popconfirm>
</template>
</vxe-column>
</vxe-table>
<vxe-pager
:loading="loading"
:current-page="queryParam.pageNo"
:page-size="queryParam.pageSize"
:total="queryParam.totalResult"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
@page-change="handlePageChange">
</vxe-pager>
</a-card>
<a-modal :title="title" @ok="handleSave" width="1200px" @cancel="visible = false" :visible="visible">
<a-spin :spinning="formLoad">
<a-form-model :rules="rules" ref="addForm" :model="addForm" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row>
<a-col :span="8">
<a-form-model-item label="币别代码">
<a-select v-model="addForm.currency" style="width: 100%">
<a-select-option
v-for="(item, index) in currencyList"
:key="index"
:value="item.codeName">{{ item.codeName }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="开始日期">
<a-date-picker style="width: 100%;" v-model="addForm.startTime" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="结束日期">
<a-date-picker style="width: 100%;" v-model="addForm.endTime" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-model-item label="应收汇率">
<a-input-number
style="width: 100%;"
v-model="addForm.drValue"
:precision="6"
:min="0"
:step="0.1" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="应付汇率">
<a-input-number
style="width: 100%;"
v-model="addForm.crValue"
:precision="6"
:min="0"
:step="0.1" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="海关汇率">
<a-input-number style="width: 100%;" :precision="6" :min="0" :step="0.1" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-model-item label="本位币">
<a-input v-model="addForm.localCurr" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="备注">
<a-input v-model="addForm.remark" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</a-spin>
</a-modal>
</div>
</template>
<script>
import {
FeeCurrencyExchangePage,
FeeCurrencyExchangeSave,
FeeCurrencyExchangeDelete,
GetFeeCustomerList,
FeeCurrencyList
} from '@/api/modular/main/mailSetting'
import columnSetting from '@/components/tableColumnSetting'
export default {
components: {
columnSetting
},
data() {
return {
TypeData: [],
// /
advanced: false,
visible: false,
loading: false,
selectedRowKeys: [],
againVisible: false,
fileList: [],
title:'',
currencyList: [],
setVisible: false,
setVisible1: false,
customerList: [],
addSettingFlag: false,
customerTypeList: [],
formLoad: false,
againLoad: false,
labelCol: { span: 8 },
wrapperCol: { span: 14 },
addForm: {
},
queryParam: {
pageNo: 1,
pageSize: 10,
totalResult: 1
},
parserList: [],
form: {},
mailHtml: '',
ColumnsQuery: [],
columns: [
{
title: '币别',
align: 'center',
width: '100',
dataIndex: 'currency'
},
{
title: '开始日期',
align: 'center',
width: '100',
dataIndex: 'startTime'
},
{
title: '结束日期',
align: 'center',
width: '110',
dataIndex: 'endTime'
},
{
title: '应收汇率',
align: 'center',
width: '80',
dataIndex: 'drValue'
},
{
title: '应付汇率',
align: 'center',
width: '80',
dataIndex: 'crValue'
},
{
title: '海关汇率',
align: 'center',
width: '80',
dataIndex: 'localCurr1'
},
{
title: '本位币',
align: 'center',
width: '80',
dataIndex: 'localCurr'
},
{
title: '录入人',
align: 'center',
width: '80',
dataIndex: 'financeSoftCode1'
},
{
title: '录入时间',
align: 'center',
width: '80',
dataIndex: 'financeSoftCode2'
},
{
title: '备注',
align: 'center',
width: '80',
dataIndex: 'remark'
}
],
rules: {
emailAccount: [{ required: true, message: '请输入邮箱账号', trigger: 'blur' }],
password: [{ required: true, message: '请输入邮箱密码', trigger: 'blur' }],
useIMAP: [{ required: true, message: '请选择接收服务器类型', trigger: 'change' }],
smtpServer: [{ required: true, message: '请输入发件服务器', trigger: 'change' }],
receiveServer: [{ required: true, message: '请输入收件服务器', trigger: 'change' }]
},
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
loadData: []
}
},
created() { },
mounted() {
this.FnGetData()
this.customerTypeList = this.$options.filters['dictData']('djy_cust_prop')
this.getCurrency()
},
methods: {
toggleAdvanced() {
this.advanced = !this.advanced
},
getCurrency() {
FeeCurrencyList().then(res => {
this.currencyList = res.data
})
},
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
handleChange(val) {
GetFeeCustomerList({ code: val }).then(res => {
this.customerList = res.data
})
},
handleEdit(row) {
this.title = '汇率编辑'
this.addForm = JSON.parse(JSON.stringify(row))
this.visible = true
},
handleSave() {
this.$refs.addForm.validate(valid => {
if (valid) {
this.formLoad = true
this.customerList.forEach(item => {
if (item.code === this.addForm.customerCode) {
this.addForm.customerName = item.name
}
})
FeeCurrencyExchangeSave(this.addForm).then(res => {
if (res.success) {
this.$message.success('保存成功')
this.FnGetData()
this.visible = false
} else {
this.$message.error(res.message)
}
this.formLoad = false
})
} else {
return false;
}
});
},
init() {
this.form = {}
},
handlePageChange({ currentPage, pageSize }) {
this.queryParam.pageNo = currentPage
this.queryParam.pageSize = pageSize
this.FnGetData()
},
FnGetData() {
this.loading = true
this.form.pageNo = this.queryParam.pageNo
this.form.pageSize = this.queryParam.pageSize
FeeCurrencyExchangePage(this.form).then(res => {
if (res.success) {
this.loadData = res.data.rows
this.queryParam.totalResult = res.data.totalRows
}
this.loading = false
})
},
confirm(e, data) {
this.handleDelete(data)
},
handleDelete(record) {
FeeCurrencyExchangeDelete([record]).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.FnGetData()
} else {
this.$message.error(`删除失败,${res.message}`)
}
})
},
handleAdd() {
this.visible = true
this.title = '汇率新增'
this.addForm = {
}
}
}
}
</script>
<style lang="less" scoped>
/deep/ .ant-descriptions-item-label {
font-weight: bold;
}
.table-operator {
margin-bottom: 18px;
}
.Close {
height: 45px;
overflow: hidden;
}
.vxe-table--render-default .vxe-body--row.row--stripe {
background: #f5f9fe;
}
.ant-card-body {
padding-top: 10px;
}
.inline {
position: relative;
}
.inline-right {
position: absolute;
top: 6px;
right: 25px;
}
.look-item {
display: flex;
align-items: center;
margin-bottom: 5px;
.look-left {
font-weight: bold;
display: inline-block;
margin-right: 10px;
width: 80px;
color: black;
text-align: right;
}
}
</style>

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
<template>
<div>
<a-card :bordered="false" :bodyStyle="tstyle">
<!-- <a-card :bordered="false" :bodyStyle="tstyle">
<div class="table-page-search-wrapper" :class="advanced ? 'Open' : 'Close'">
<a-form :model="form" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
<a-row>
@ -12,7 +12,7 @@
</a-row>
</a-form>
</div>
</a-card>
</a-card> -->
<a-card :bordered="false">
<div style="margin-bottom: 10px;display: flex;justify-content: space-between;">
<div>
@ -77,13 +77,22 @@
@page-change="handlePageChange">
</vxe-pager>
</a-card>
<a-modal @ok="handleSave" width="1000px" @cancel="visible = false" :visible="visible">
<a-modal :title="title" @ok="handleSave" width="1000px" @cancel="visible = false" :visible="visible">
<a-spin :spinning="formLoad">
<a-form-model :rules="rules" ref="addForm" :model="addForm" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row>
<a-col :span="12">
<a-form-model-item label="客户类别">
<a-select @change="handleChange" v-model="addForm.customerTypeCode" style="width: 100%" >
<a-select-option v-for="(item,index) in customerTypeList" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="往来单位">
<a-input v-model="addForm.feeName" />
<a-select v-model="addForm.customerCode" style="width: 100%" >
<a-select-option v-for="(item,index) in customerList" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
@ -177,7 +186,8 @@
import {
FeeCustTemplatePage,
FeeCustTemplateSave,
FeeCustTemplateDelete
FeeCustTemplateDelete,
GetFeeCustomerList
} from '@/api/modular/main/mailSetting'
import columnSetting from '@/components/tableColumnSetting'
export default {
@ -192,11 +202,14 @@ export default {
visible: false,
loading: false,
selectedRowKeys: [],
title:'',
againVisible: false,
fileList: [],
setVisible: false,
setVisible1: false,
customerList: [],
addSettingFlag: false,
customerTypeList: [],
formLoad: false,
againLoad: false,
labelCol: { span: 4 },
@ -216,13 +229,19 @@ export default {
{
title: '费用名称',
align: 'center',
width: '200',
width: '150',
dataIndex: 'feeName'
},
{
title: '标准',
title: '往来单位',
align: 'center',
width: '150',
dataIndex: 'customerName'
},
{
title: '标准',
align: 'center',
width: '100',
dataIndex: 'unit'
},
{
@ -294,6 +313,7 @@ export default {
created() { },
mounted() {
this.FnGetData()
this.customerTypeList = this.$options.filters['dictData']('djy_cust_prop')
},
methods: {
toggleAdvanced() {
@ -302,7 +322,13 @@ export default {
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
handleChange(val) {
GetFeeCustomerList({ code: val }).then(res => {
this.customerList = res.data
})
},
handleEdit(row) {
this.title = '固定费用编辑'
if (row.isAdvancedPay) {
row.isAdvancedPay = 'true'
} else {
@ -313,13 +339,18 @@ export default {
} else {
row.isInvoice = 'false'
}
this.addForm = row
this.addForm = JSON.parse(JSON.stringify(row))
this.visible = true
},
handleSave() {
this.$refs.addForm.validate(valid => {
if (valid) {
this.formLoad = true
this.customerList.forEach(item => {
if (item.code === this.addForm.customerCode) {
this.addForm.customerName = item.name
}
})
FeeCustTemplateSave(this.addForm).then(res => {
if (res.success) {
this.$message.success('保存成功')
@ -370,6 +401,7 @@ export default {
},
handleAdd() {
this.visible = true
this.title = '固定费用新增'
this.addForm = {
}
}

Loading…
Cancel
Save