费用模块

master
sunzehua 10 months ago
parent da228370b6
commit 50780953a3

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

@ -15,6 +15,7 @@ const user = {
name: '',
welcome: '',
firstFlag: true,
feeShow: false,
slotShow: false,
avatar: '',
buttons: [], // 按钮权限
@ -82,6 +83,9 @@ const user = {
SET_SLOTSHOW: (state, type) => {
state.slotShow = type
},
SET_FEESHOW: (state, type) => {
state.feeShow = type
},
SET_BOOKINGGRIDOPTIONS: (state, obj) => {
state.bookingGridOptions = obj
},
@ -159,9 +163,17 @@ const user = {
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) {
commit('SET_SLOTSHOW', false)
commit('SET_FEESHOW', false)
}
}
resolve(data)

@ -39,7 +39,7 @@
<input type="radio" name="tabs" id="tab2" checked="false" />
<label class="tabs-label" for="tab2">EDI补充信息</label>
</li>
<li @click="changeParentTabs('3-3')">
<li @click="changeParentTabs('3-3')" v-if="feeShow">
<input type="radio" name="tabs" id="tab3" checked="false" />
<label class="tabs-label" for="tab3">费用信息</label>
</li>
@ -114,7 +114,7 @@
<iframe
ref="iframe"
style="width: 100%;height: 1400px;"
src="http://60.209.125.238:35103/#/index"
src="http://localhost:8080/#/index"
frameborder="0"></iframe>
</div>
</div>
@ -474,7 +474,8 @@ export default {
'issuetypeList',
'blfrtList',
'inBookingDetailsSave',
'topDown'
'topDown',
'feeShow'
])
},
created() {
@ -639,6 +640,7 @@ export default {
kgs: this.bookingDetails.kgs,
pkgs: this.bookingDetails.pkgs,
customername: this.bookingDetails.customername,
customerid: this.bookingDetails.customerid,
portdischarge: this.bookingDetails.portdischarge,
vessel: this.bookingDetails.vessel,
voyno: this.bookingDetails.voyno,
@ -647,15 +649,29 @@ export default {
blfrt: this.bookingDetails.blfrt,
destination: this.bookingDetails.destination,
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
}
const iframeWin = mapFrame.contentWindow
console.log(mapFrame.contentWindow)
if (this.feeShow) {
const iframeWin = mapFrame.contentWindow
iframeWin.postMessage(
{
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']),
getRouterHis() {

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

@ -108,20 +108,22 @@
<a-row>
<a-col :span="8">
<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-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-option v-for="(item,index) in customerTypeList" :key="index" :value="item.name">{{ 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-option v-for="(item,index) in customerTypeList" :key="index" :value="item.name">{{ item.name }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
@ -137,7 +139,8 @@
<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-option value="PP">PP</a-select-option>
<a-select-option value="CC">CC</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
@ -186,7 +189,8 @@
FeeCodeSave,
FeeCodeDelete,
GetFeeCustomerList,
FeeCurrencyList
FeeCurrencyList,
GetFeeUnitList
} from '@/api/modular/main/mailSetting'
import columnSetting from '@/components/tableColumnSetting'
export default {
@ -204,6 +208,7 @@
title: '',
againVisible: false,
fileList: [],
unitList:[],
setVisible: false,
setVisible1: false,
customerList: [],
@ -351,6 +356,7 @@
this.FnGetData()
this.customerTypeList = this.$options.filters['dictData']('djy_cust_prop')
this.getCurrency()
this.GetFeeUnit()
},
methods: {
toggleAdvanced() {
@ -369,6 +375,16 @@
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) {
this.title = '费用代码编辑'
this.addForm = JSON.parse(JSON.stringify(row))

@ -6,7 +6,7 @@
<a-row>
<a-col :span="6">
<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>
@ -49,8 +49,8 @@
:fixed="item.fixed"
:align="item.align">
<template #default="{ row }">
<div v-if="item.dataIndex == 'isSea'">
<span v-if="row.isSea"></span>
<div v-if="item.dataIndex == 'isPublic'">
<span v-if="row.isPublic"></span>
<span v-else></span>
</div>
<span v-else>{{ row[item.dataIndex] }}</span>
@ -486,9 +486,9 @@ export default {
{
field: 'unitPrice',
key: 'unitPrice',
title: '单价',
title: '不含税单价',
align: 'center',
width: '80px',
width: '110px',
edit: true
},
{
@ -669,25 +669,52 @@ export default {
},
afterCellValueChange: ({ row, column, changeValue }) => {
if (column.key === 'unitPrice') {
if (column.key === 'amount') {
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()
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') {
changeValue = changeValue.toString()
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') {
changeValue = changeValue.toString()
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') {
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
if (this.$refs['tableRef'].getRangeCellSelection()) {
index = this.$refs['tableRef'].getRangeCellSelection().selectionRangeKeys.startRowKey
console.log(this.$refs['tableRef'].getRangeCellSelection())
startColKey = this.$refs['tableRef'].getRangeCellSelection().selectionRangeKeys.startColKey
}
setTimeout(() => {

Loading…
Cancel
Save