|
|
@@ -35,14 +35,21 @@
|
|
|
</el-button>
|
|
|
<el-button type="warning" size="small" @click="outExport">导 出
|
|
|
</el-button>
|
|
|
- <el-button type="primary" size="small" @click="templateImport('D')"
|
|
|
- :disabled="!selectionList.length">费用模板(收)
|
|
|
+ <el-button
|
|
|
+ v-if="roleName.indexOf('admin') >= 0 || roleName.indexOf('应付修改') >= 0 || roleName.indexOf('应付查看') >= 0 || roleName.indexOf('应收修改') >= 0 || roleName.indexOf('应收查看') >= 0"
|
|
|
+ type="primary" size="small" @click="templateImport('D')" :disabled="!selectionList.length">收费模板
|
|
|
</el-button>
|
|
|
- <el-button type="warning" size="small" @click="templateImport('C')"
|
|
|
- :disabled="!selectionList.length">费用模板(付)
|
|
|
+ <el-button
|
|
|
+ v-if="roleName.indexOf('admin') >= 0 || roleName.indexOf('应付修改') >= 0 || roleName.indexOf('应付查看') >= 0 || roleName.indexOf('应收修改') >= 0 || roleName.indexOf('应收查看') >= 0"
|
|
|
+ type="warning" size="small" @click="templateImport('C')" :disabled="!selectionList.length">付费模板
|
|
|
</el-button>
|
|
|
- <el-button type="success" size="small" @click="checkBills" :disabled="!selectionList.length">单据请核
|
|
|
+ <el-button type="primary" plain size="small" @click="costSubmit"
|
|
|
+ :disabled="!selectionList.length">提取成本</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="roleName.indexOf('admin') >= 0 || roleName.indexOf('应付修改') >= 0 || roleName.indexOf('应付查看') >= 0 || roleName.indexOf('应收修改') >= 0 || roleName.indexOf('应收查看') >= 0"
|
|
|
+ type="success" size="small" @click="checkBills" :disabled="!selectionList.length">单据请核
|
|
|
</el-button>
|
|
|
+
|
|
|
<!-- <el-dropdown style="line-height: 0">
|
|
|
<el-button size="small" type="success" style="margin-right: 8px"
|
|
|
:disabled="selectionList.length == 0">
|
|
|
@@ -143,7 +150,7 @@
|
|
|
<template slot="eta" slot-scope="scope">
|
|
|
<span>{{
|
|
|
scope.row.eta ? scope.row.eta.slice(0, 10) : ""
|
|
|
- }}</span>
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
<template slot="updateTime" slot-scope="scope">
|
|
|
<span>{{
|
|
|
@@ -294,6 +301,7 @@
|
|
|
<el-button type="primary" @click="importTemplate" size="mini">导 入</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <extraction-cost ref="extractionCost" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -327,6 +335,7 @@ import {
|
|
|
import { bportsList } from "@/api/iosBasicData/bports";
|
|
|
import { blinesList } from "@/api/iosBasicData/blines";
|
|
|
import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
|
|
|
+import extractionCost from "@/components/extractionCost/main.vue";
|
|
|
import { getDeptTree } from "@/api/system/dept";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import { getListTemplate, getListTemplatelist } from "@/api/iosBasicData/losbfeestemplate";
|
|
|
@@ -336,10 +345,12 @@ export default {
|
|
|
SearchQuery,
|
|
|
feesTemplateItems,
|
|
|
billsDetails,
|
|
|
- SplitList
|
|
|
+ SplitList,
|
|
|
+ extractionCost
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ roleName: [], // 当前登录人的角色权限
|
|
|
dcDic: [
|
|
|
{
|
|
|
label: '收',
|
|
|
@@ -527,7 +538,7 @@ export default {
|
|
|
calcHeight: 30,
|
|
|
tip: false,
|
|
|
searchShow: true,
|
|
|
- searchMenuSpan: 12,
|
|
|
+ searchMenuSpan: 6,
|
|
|
searchLabelWidth: "100",
|
|
|
border: true,
|
|
|
index: true,
|
|
|
@@ -625,6 +636,18 @@ export default {
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
+ label: "主单号",
|
|
|
+ prop: "masterBillNo",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "分单数",
|
|
|
+ prop: "splitOrderSum",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "单据类型",
|
|
|
prop: "billType",
|
|
|
type: "select",
|
|
|
@@ -758,13 +781,37 @@ export default {
|
|
|
label: "装货港",
|
|
|
prop: "polEnName",
|
|
|
width: "120",
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
+ type: "select",
|
|
|
+ filterable: true,
|
|
|
+ remote: true,
|
|
|
+ dicUrl: "/api/blade-los/bports/list?enName={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "enName",
|
|
|
+ value: "enName",
|
|
|
+ res: "data.records"
|
|
|
+ },
|
|
|
+ search: true,
|
|
|
+ span: 6,
|
|
|
+ searchOrder: 10.3
|
|
|
},
|
|
|
{
|
|
|
label: "卸货港",
|
|
|
prop: "podEnName",
|
|
|
width: "120",
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
+ type: "select",
|
|
|
+ filterable: true,
|
|
|
+ remote: true,
|
|
|
+ dicUrl: "/api/blade-los/bports/list?enName={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "enName",
|
|
|
+ value: "enName",
|
|
|
+ res: "data.records"
|
|
|
+ },
|
|
|
+ search: true,
|
|
|
+ span: 6,
|
|
|
+ searchOrder: 10.5
|
|
|
},
|
|
|
{
|
|
|
label: "目的港",
|
|
|
@@ -935,19 +982,6 @@ export default {
|
|
|
prop: "bookingAgentCnName",
|
|
|
width: "120",
|
|
|
overHidden: true,
|
|
|
- type: "select",
|
|
|
- filterable: true,
|
|
|
- remote: true,
|
|
|
- dicUrl:
|
|
|
- "/api/blade-los/bcorps/listByType?cnName={{key}}",
|
|
|
- props: {
|
|
|
- label: "cnName",
|
|
|
- value: "cnName",
|
|
|
- res: "data.records"
|
|
|
- },
|
|
|
- search: true,
|
|
|
- span: 6,
|
|
|
- searchOrder: 17
|
|
|
},
|
|
|
{
|
|
|
label: "收货人",
|
|
|
@@ -1492,6 +1526,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ this.roleName = localStorage.getItem('roleName').split(',') // 获取角色数据
|
|
|
// 获取当前登录人个人信息
|
|
|
this.saberUserInfo = JSON.parse(
|
|
|
localStorage.getItem("saber-userInfo")
|
|
|
@@ -1511,7 +1546,7 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
if (this.saberUserInfo.role_name.indexOf('admin') != -1 || this.saberUserInfo.role_name.indexOf('总部') != -1) {
|
|
|
- this.optionBack.searchMenuSpan = 6
|
|
|
+ this.optionBack.searchMenuSpan = 24
|
|
|
this.optionBack.column.forEach(item => {
|
|
|
if (item.prop == 'branchId') {
|
|
|
item.search = true
|
|
|
@@ -1538,6 +1573,51 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ costSubmit() {
|
|
|
+ let podId = []
|
|
|
+ let destinationId = []
|
|
|
+ let airlineId = []
|
|
|
+ let shipNameId = []
|
|
|
+ let shippingCompanyId = []
|
|
|
+ let voyag = []
|
|
|
+ let obj = {}
|
|
|
+ let billsIds=[]
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ if (item.polId) podId.push(item.polId)
|
|
|
+ if (item.podId) destinationId.push(item.podId)
|
|
|
+ if (item.lineId) airlineId.push(item.lineId)
|
|
|
+ if (item.vesselId) shipNameId.push(item.vesselId)
|
|
|
+ if (item.carrierId) shippingCompanyId.push(item.carrierId)
|
|
|
+ if (item.voyageNo) voyag.push(item.voyageNo)
|
|
|
+ billsIds.push(item.id)
|
|
|
+ }
|
|
|
+ if ([...new Set(podId)].length > 1) {
|
|
|
+ return this.$message.error("请选择相同的装货港");
|
|
|
+ }
|
|
|
+ console.log([...new Set(destinationId)])
|
|
|
+ if ([...new Set(destinationId)].length > 1) {
|
|
|
+ return this.$message.error("请选择相同的卸货港");
|
|
|
+ }
|
|
|
+ // if ([...new Set(airlineId)].length > 1) {
|
|
|
+ // return this.$message.error("请选择相同的航线");
|
|
|
+ // }
|
|
|
+ // if ([...new Set(shipNameId)].length > 1) {
|
|
|
+ // return this.$message.error("请选择相同的船名");
|
|
|
+ // }
|
|
|
+ console.log([...new Set(shippingCompanyId)])
|
|
|
+ if ([...new Set(shippingCompanyId)].length > 1) {
|
|
|
+ return this.$message.error("请选择相同的船公司");
|
|
|
+ }
|
|
|
+ // if ([...new Set(voyag)].length > 1) {
|
|
|
+ // return this.$message.error("请选择相同的航次");
|
|
|
+ // }
|
|
|
+ obj = {
|
|
|
+ podId: podId[0],
|
|
|
+ destinationId: destinationId[0],
|
|
|
+ shippingCompanyId: shippingCompanyId[0],
|
|
|
+ }
|
|
|
+ this.$refs.extractionCost.inTemplate(obj,billsIds.join(','))
|
|
|
+ },
|
|
|
checkBills() {
|
|
|
for (let item of this.selectionList) {
|
|
|
if (item.status != 0) {
|
|
|
@@ -1622,7 +1702,7 @@ export default {
|
|
|
let obj = {
|
|
|
status: 0,
|
|
|
type: 'HYCK',
|
|
|
- dc:this.dc,
|
|
|
+ dc: this.dc,
|
|
|
shippingCompanyId: this.selectionList[0].carrierId,
|
|
|
}
|
|
|
const loading = this.$loading({
|
|
|
@@ -2327,7 +2407,7 @@ export default {
|
|
|
this.optionBack = this.$options.data().optionBack;
|
|
|
localStorage.removeItem(this.getColumnName(code));
|
|
|
if (this.saberUserInfo.role_name.indexOf('admin') != -1 || this.saberUserInfo.role_name.indexOf('总部') != -1) {
|
|
|
- this.optionBack.searchMenuSpan = 6
|
|
|
+ this.optionBack.searchMenuSpan = 24
|
|
|
this.optionBack.column.forEach(item => {
|
|
|
if (item.prop == 'branchId') {
|
|
|
item.search = true
|