费用模块

master
sunzehua 10 months ago
parent da228370b6
commit 50780953a3

@ -9,6 +9,7 @@ const getters = {
nickname: state => state.user.name, nickname: state => state.user.name,
welcome: state => state.user.welcome, welcome: state => state.user.welcome,
roles: state => state.user.roles, roles: state => state.user.roles,
feeShow: state => state.user.feeShow,
buttons: state => state.user.buttons, buttons: state => state.user.buttons,
admintype: state => state.user.admintype, admintype: state => state.user.admintype,
userInfo: state => state.user.info, userInfo: state => state.user.info,

@ -15,6 +15,7 @@ const user = {
name: '', name: '',
welcome: '', welcome: '',
firstFlag: true, firstFlag: true,
feeShow: false,
slotShow: false, slotShow: false,
avatar: '', avatar: '',
buttons: [], // 按钮权限 buttons: [], // 按钮权限
@ -82,6 +83,9 @@ const user = {
SET_SLOTSHOW: (state, type) => { SET_SLOTSHOW: (state, type) => {
state.slotShow = type state.slotShow = type
}, },
SET_FEESHOW: (state, type) => {
state.feeShow = type
},
SET_BOOKINGGRIDOPTIONS: (state, obj) => { SET_BOOKINGGRIDOPTIONS: (state, obj) => {
state.bookingGridOptions = obj state.bookingGridOptions = obj
}, },
@ -159,9 +163,17 @@ const user = {
commit('SET_SLOTSHOW', false) commit('SET_SLOTSHOW', false)
} }
} }
if (item.paraCode === 'ENABLE_FEE_ABILITY') {
if (item.paraValue === 'YES') {
commit('SET_FEESHOW', true)
} else {
commit('SET_FEESHOW', false)
}
}
}) })
if (data.tenantParams.length === 0) { if (data.tenantParams.length === 0) {
commit('SET_SLOTSHOW', false) commit('SET_SLOTSHOW', false)
commit('SET_FEESHOW', false)
} }
} }
resolve(data) resolve(data)

@ -39,7 +39,7 @@
<input type="radio" name="tabs" id="tab2" checked="false" /> <input type="radio" name="tabs" id="tab2" checked="false" />
<label class="tabs-label" for="tab2">EDI补充信息</label> <label class="tabs-label" for="tab2">EDI补充信息</label>
</li> </li>
<li @click="changeParentTabs('3-3')"> <li @click="changeParentTabs('3-3')" v-if="feeShow">
<input type="radio" name="tabs" id="tab3" checked="false" /> <input type="radio" name="tabs" id="tab3" checked="false" />
<label class="tabs-label" for="tab3">费用信息</label> <label class="tabs-label" for="tab3">费用信息</label>
</li> </li>
@ -114,7 +114,7 @@
<iframe <iframe
ref="iframe" ref="iframe"
style="width: 100%;height: 1400px;" style="width: 100%;height: 1400px;"
src="http://60.209.125.238:35103/#/index" src="http://localhost:8080/#/index"
frameborder="0"></iframe> frameborder="0"></iframe>
</div> </div>
</div> </div>
@ -474,7 +474,8 @@ export default {
'issuetypeList', 'issuetypeList',
'blfrtList', 'blfrtList',
'inBookingDetailsSave', 'inBookingDetailsSave',
'topDown' 'topDown',
'feeShow'
]) ])
}, },
created() { created() {
@ -639,6 +640,7 @@ export default {
kgs: this.bookingDetails.kgs, kgs: this.bookingDetails.kgs,
pkgs: this.bookingDetails.pkgs, pkgs: this.bookingDetails.pkgs,
customername: this.bookingDetails.customername, customername: this.bookingDetails.customername,
customerid: this.bookingDetails.customerid,
portdischarge: this.bookingDetails.portdischarge, portdischarge: this.bookingDetails.portdischarge,
vessel: this.bookingDetails.vessel, vessel: this.bookingDetails.vessel,
voyno: this.bookingDetails.voyno, voyno: this.bookingDetails.voyno,
@ -647,15 +649,29 @@ export default {
blfrt: this.bookingDetails.blfrt, blfrt: this.bookingDetails.blfrt,
destination: this.bookingDetails.destination, destination: this.bookingDetails.destination,
portload: this.bookingDetails.portload, portload: this.bookingDetails.portload,
truckerid: this.bookingDetails.truckerid,
trucker: this.bookingDetails.trucker,
customser: this.bookingDetails.customser,
customserid: this.bookingDetails.customserid,
forwarder: this.bookingDetails.forwarder,
forwarderid: this.bookingDetails.forwarderid,
agentname: this.bookingDetails.agentname,
agentnameid: this.bookingDetails.agentnameid,
yard: this.bookingDetails.yard,
yardid: this.bookingDetails.yardid,
shipagency: this.bookingDetails.shipagency,
shipagencyid: this.bookingDetails.shipagencyid,
id: this.bookingDetails.id id: this.bookingDetails.id
} }
const iframeWin = mapFrame.contentWindow if (this.feeShow) {
console.log(mapFrame.contentWindow) const iframeWin = mapFrame.contentWindow
iframeWin.postMessage( iframeWin.postMessage(
{ {
token: localStorage.getItem('pro__Access-Token'), token: localStorage.getItem('pro__Access-Token'),
data: data data: data,
customerTypeList: this.$options.filters['dictData']('djy_cust_prop')
}, '*') }, '*')
}
}, },
...mapActions(['setNeedSavePages', 'setBookingList', 'setBookingGridOptions', 'setInBookingDetailsSave', 'setSET_SAVEFLAG']), ...mapActions(['setNeedSavePages', 'setBookingList', 'setBookingGridOptions', 'setInBookingDetailsSave', 'setSET_SAVEFLAG']),
getRouterHis() { getRouterHis() {

@ -5,18 +5,18 @@
<a-form layout="inline"> <a-form layout="inline">
<a-row :gutter="48"> <a-row :gutter="48">
<a-col :md="18"> <a-col :md="18">
<a-row :gutter="48"> <a-row :gutter="12">
<a-col :md="8" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item :label="`主提单号`"> <a-form-item :label="`主提单号`">
<a-input allow-clear v-model="SearchContent" /> <a-input allow-clear v-model="SearchContent" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="8" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item :label="`创建人`"> <a-form-item :label="`创建人`">
<a-input allow-clear v-model="createdUserName" /> <a-input allow-clear v-model="createdUserName" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="8" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item label="删除时间"> <a-form-item label="删除时间">
<a-range-picker <a-range-picker
v-model="delDate" v-model="delDate"
@ -24,6 +24,11 @@
format="YYYY-MM-DD" /> format="YYYY-MM-DD" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24">
<a-form-item :label="`委托单位`">
<a-input allow-clear v-model="customername" />
</a-form-item>
</a-col>
</a-row> </a-row>
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
@ -274,6 +279,7 @@ export default {
searchData: {}, searchData: {},
formAllData: null, formAllData: null,
createdUserName:'', createdUserName:'',
customername:'',
formMoreData: null, formMoreData: null,
formBtnCol: 8, formBtnCol: 8,
delDate: [], delDate: [],
@ -924,6 +930,7 @@ export default {
tableRefresh() { tableRefresh() {
this.formRes.MBLNO = this.SearchContent this.formRes.MBLNO = this.SearchContent
this.formRes.createdUserName = this.createdUserName this.formRes.createdUserName = this.createdUserName
this.formRes.customername = this.customername
const data = { ...this.formRes } const data = { ...this.formRes }
this.searchData = JSON.parse(JSON.stringify(data)) this.searchData = JSON.parse(JSON.stringify(data))
if (this.delDate) { if (this.delDate) {
@ -972,6 +979,7 @@ export default {
tableReset() { tableReset() {
this.SearchContent = '' this.SearchContent = ''
this.createdUserName = '' this.createdUserName = ''
this.customername = ''
this.delDate = [] this.delDate = []
}, },

@ -108,20 +108,22 @@
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<a-form-model-item label="默认计费标准"> <a-form-model-item label="默认计费标准">
<a-input v-model="addForm.defaultUnit" /> <a-select v-model="addForm.defaultUnit" style="width: 100%" >
<a-select-option v-for="(item,index) in unitList" :key="index" :value="item.name">{{ item.name }}</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-model-item label="默认收费客户类型"> <a-form-model-item label="默认收费客户类型">
<a-select v-model="addForm.defaultDebit" style="width: 100%" > <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-option v-for="(item,index) in customerTypeList" :key="index" :value="item.name">{{ item.name }}</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-model-item label="默认付费客户类型"> <a-form-model-item label="默认付费客户类型">
<a-select v-model="addForm.defaultCredit" style="width: 100%" > <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-option v-for="(item,index) in customerTypeList" :key="index" :value="item.name">{{ item.name }}</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@ -137,7 +139,8 @@
<a-col :span="8"> <a-col :span="8">
<a-form-model-item label="默认FRT"> <a-form-model-item label="默认FRT">
<a-select v-model="addForm.feeFrt" style="width: 100%" > <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-option value="PP">PP</a-select-option>
<a-select-option value="CC">CC</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@ -186,7 +189,8 @@
FeeCodeSave, FeeCodeSave,
FeeCodeDelete, FeeCodeDelete,
GetFeeCustomerList, GetFeeCustomerList,
FeeCurrencyList FeeCurrencyList,
GetFeeUnitList
} from '@/api/modular/main/mailSetting' } from '@/api/modular/main/mailSetting'
import columnSetting from '@/components/tableColumnSetting' import columnSetting from '@/components/tableColumnSetting'
export default { export default {
@ -204,6 +208,7 @@
title: '', title: '',
againVisible: false, againVisible: false,
fileList: [], fileList: [],
unitList:[],
setVisible: false, setVisible: false,
setVisible1: false, setVisible1: false,
customerList: [], customerList: [],
@ -351,6 +356,7 @@
this.FnGetData() this.FnGetData()
this.customerTypeList = this.$options.filters['dictData']('djy_cust_prop') this.customerTypeList = this.$options.filters['dictData']('djy_cust_prop')
this.getCurrency() this.getCurrency()
this.GetFeeUnit()
}, },
methods: { methods: {
toggleAdvanced() { toggleAdvanced() {
@ -369,6 +375,16 @@
this.customerList = res.data this.customerList = res.data
}) })
}, },
GetFeeUnit() {
GetFeeUnitList().then(res => {
res.data.forEach((item, index) => {
if (!item.name) {
res.data.splice(index, 1)
}
})
this.unitList = res.data
})
},
handleEdit(row) { handleEdit(row) {
this.title = '费用代码编辑' this.title = '费用代码编辑'
this.addForm = JSON.parse(JSON.stringify(row)) this.addForm = JSON.parse(JSON.stringify(row))

@ -6,7 +6,7 @@
<a-row> <a-row>
<a-col :span="6"> <a-col :span="6">
<a-form-item label="费用类型"> <a-form-item label="费用类型">
<a-select v-model="form.defaultDebit" placeholder="请选择费用类型" style="width: 100%"> <a-select v-model="form.feeType" placeholder="请选择费用类型" style="width: 100%">
<a-select-option value="应收">应收</a-select-option> <a-select-option value="应收">应收</a-select-option>
<a-select-option value="应付">应付</a-select-option> <a-select-option value="应付">应付</a-select-option>
</a-select> </a-select>
@ -49,8 +49,8 @@
:fixed="item.fixed" :fixed="item.fixed"
:align="item.align"> :align="item.align">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="item.dataIndex == 'isSea'"> <div v-if="item.dataIndex == 'isPublic'">
<span v-if="row.isSea"></span> <span v-if="row.isPublic"></span>
<span v-else></span> <span v-else></span>
</div> </div>
<span v-else>{{ row[item.dataIndex] }}</span> <span v-else>{{ row[item.dataIndex] }}</span>
@ -486,9 +486,9 @@ export default {
{ {
field: 'unitPrice', field: 'unitPrice',
key: 'unitPrice', key: 'unitPrice',
title: '单价', title: '不含税单价',
align: 'center', align: 'center',
width: '80px', width: '110px',
edit: true edit: true
}, },
{ {
@ -669,25 +669,52 @@ export default {
}, },
afterCellValueChange: ({ row, column, changeValue }) => { afterCellValueChange: ({ row, column, changeValue }) => {
if (column.key === 'unitPrice') { if (column.key === 'amount') {
changeValue = changeValue.toString() changeValue = changeValue.toString()
row['unitPrice'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') row['amount'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
row['unitPrice'] = (row['amount'] / row['quantity']).toFixed(4)
row['taxUnitPrice'] = (row['unitPrice'] / (1 + (row['taxRate'] / 100))).toFixed(4)
row['noTaxAmount'] = (row['taxUnitPrice'] * row['quantity']).toFixed(2)
} }
if (column.key === 'accTaxRate') { if (column.key === 'noTaxAmount') {
changeValue = changeValue.toString() changeValue = changeValue.toString()
row['accTaxRate'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') row['noTaxAmount'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
row['taxUnitPrice'] = (row['noTaxAmount'] / row['quantity']).toFixed(4)
row['unitPrice'] = ((1 + (row['taxRate'] / 100)) * row['taxUnitPrice']).toFixed(4)
row['amount'] = (row['unitPrice'] * row['quantity']).toFixed(2)
} }
if (column.key === 'taxRate') { if (column.key === 'taxRate') {
changeValue = changeValue.toString() changeValue = changeValue.toString()
row['taxRate'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') row['taxRate'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
row['unitPrice'] = ((1 + (row['taxRate'] / 100)) * row['taxUnitPrice']).toFixed(4)
row['amount'] = (row['unitPrice'] * row['quantity']).toFixed(2)
row['noTaxAmount'] = (row['taxUnitPrice'] * row['quantity']).toFixed(2)
} }
if (column.key === 'exchangeRate') { if (column.key === 'exchangeRate') {
changeValue = changeValue.toString() changeValue = changeValue.toString()
row['exchangeRate'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, '$1$2.$3') row['exchangeRate'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, '$1$2.$3')
} }
if (column.key === 'unitPrice') {
changeValue = changeValue.toString()
row['unitPrice'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, '$1$2.$3')
row['amount'] = (row['unitPrice'] * row['quantity']).toFixed(2)
row['taxUnitPrice'] = (row['unitPrice'] / (1 + (row['taxRate'] / 100))).toFixed(4)
row['noTaxAmount'] = (row['taxUnitPrice'] * row['quantity']).toFixed(2)
}
if (column.key === 'quantity') {
changeValue = changeValue.toString()
row['quantity'] = changeValue.replace(/[^0-9]/g, '')
row['noTaxAmount'] = (row['taxUnitPrice'] * row['quantity']).toFixed(2)
row['unitPrice'] = ((1 + (row['taxRate'] / 100)) * row['taxUnitPrice']).toFixed(4)
row['amount'] = (row['unitPrice'] * row['quantity']).toFixed(2)
}
if (column.key === 'taxUnitPrice') { if (column.key === 'taxUnitPrice') {
changeValue = changeValue.toString() changeValue = changeValue.toString()
row['taxUnitPrice'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') row['taxUnitPrice'] = changeValue.replace(/[^\d.]/g, '').replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, '$1$2.$3')
row['noTaxAmount'] = (row['taxUnitPrice'] * row['quantity']).toFixed(2)
row['unitPrice'] = ((1 + (row['taxRate'] / 100)) * row['taxUnitPrice']).toFixed(4)
row['amount'] = (row['unitPrice'] * row['quantity']).toFixed(2)
} }
} }
}, },
@ -792,6 +819,7 @@ export default {
let startColKey = null let startColKey = null
if (this.$refs['tableRef'].getRangeCellSelection()) { if (this.$refs['tableRef'].getRangeCellSelection()) {
index = this.$refs['tableRef'].getRangeCellSelection().selectionRangeKeys.startRowKey index = this.$refs['tableRef'].getRangeCellSelection().selectionRangeKeys.startRowKey
console.log(this.$refs['tableRef'].getRangeCellSelection())
startColKey = this.$refs['tableRef'].getRangeCellSelection().selectionRangeKeys.startColKey startColKey = this.$refs['tableRef'].getRangeCellSelection().selectionRangeKeys.startColKey
} }
setTimeout(() => { setTimeout(() => {

Loading…
Cancel
Save