|
|
@@ -1,32 +1,58 @@
|
|
|
<!-- eslint-disable vue/require-valid-default-prop -->
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body width="80%" :before-close="handleClose"
|
|
|
- :close-on-click-modal="false">
|
|
|
+ <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body width="80%" :before-close="handleClose" :close-on-click-modal="false">
|
|
|
<div v-if="dialogVisible">
|
|
|
<el-divider>费用原来信息</el-divider>
|
|
|
<avue-form :option="oldOption" v-model="oldForm" ref="form"></avue-form>
|
|
|
<el-divider>费用修改信息</el-divider>
|
|
|
<avue-form :option="newOption" v-model="newForm" ref="form">
|
|
|
<template slot="corpTypeUpdate">
|
|
|
- <dic-select v-model="newForm.corpTypeUpdate" key="id" label="cnName" res="records"
|
|
|
- url="/blade-los/bcorpstypedefine/list?status=0¤t=1&size=20" :filterable="true" :remote="true"
|
|
|
- dataName="cnName" @selectChange="dicChange('corpTypeUpdate', $event)" :disabled="newOption.disabled"></dic-select></dic-select>
|
|
|
+ <dic-select
|
|
|
+ v-model="newForm.corpTypeUpdate"
|
|
|
+ key="id"
|
|
|
+ label="cnName"
|
|
|
+ res="records"
|
|
|
+ url="/blade-los/bcorpstypedefine/list?status=0¤t=1&size=20"
|
|
|
+ :filterable="true"
|
|
|
+ :remote="true"
|
|
|
+ dataName="cnName"
|
|
|
+ @selectChange="dicChange('corpTypeUpdate', $event)"
|
|
|
+ :disabled="newOption.disabled"
|
|
|
+ ></dic-select>
|
|
|
</template>
|
|
|
<template slot="shortNameUpdate">
|
|
|
- <dic-select v-model="newForm.shortNameUpdate" placeholder="结算单位" :key="newForm.corpTypeUpdate"
|
|
|
- label="shortName" res="records"
|
|
|
+ <dic-select
|
|
|
+ v-model="newForm.shortNameUpdate"
|
|
|
+ placeholder="结算单位"
|
|
|
+ :key="newForm.corpTypeUpdate"
|
|
|
+ label="shortName"
|
|
|
+ res="records"
|
|
|
:url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + newForm.corpTypeUpdate"
|
|
|
- :filterable="true" :remote="true" dataName="shortName"
|
|
|
- @selectChange="dicChange('shortNameUpdate', $event)" :slotRight="true" rightLabel="code"
|
|
|
- :disabled="newOption.disabled"></dic-select>
|
|
|
+ :filterable="true"
|
|
|
+ :remote="true"
|
|
|
+ dataName="shortName"
|
|
|
+ @selectChange="dicChange('shortNameUpdate', $event)"
|
|
|
+ :slotRight="true"
|
|
|
+ rightLabel="code"
|
|
|
+ :disabled="newOption.disabled"
|
|
|
+ ></dic-select>
|
|
|
</template>
|
|
|
<template slot="generationCorpCnNameUpdate">
|
|
|
- <dic-select v-model="newForm.generationCorpCnNameUpdate" placeholder="代收客户" label="cnName" res="records"
|
|
|
+ <dic-select
|
|
|
+ v-model="newForm.generationCorpCnNameUpdate"
|
|
|
+ placeholder="代收客户"
|
|
|
+ label="cnName"
|
|
|
+ res="records"
|
|
|
url="/blade-los/bcorps/listByType?status=0¤t=1&size=5&corpTypeName=国内直接客户,国内同行及代理,国外直接客户,国外同行及代理"
|
|
|
- :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('generationCorpCnNameUpdate', $event)" :slotRight="true" rightLabel="code"
|
|
|
- :disabled="newOption.disabled"></dic-select>
|
|
|
+ :filterable="true"
|
|
|
+ :remote="true"
|
|
|
+ dataName="cnName"
|
|
|
+ @selectChange="dicChange('generationCorpCnNameUpdate', $event)"
|
|
|
+ :slotRight="true"
|
|
|
+ rightLabel="code"
|
|
|
+ :disabled="newOption.disabled"
|
|
|
+ ></dic-select>
|
|
|
</template>
|
|
|
<!-- <template slot="billShortNameUpdate">
|
|
|
<dic-select v-model="newForm.billShortNameUpdate" placeholder="客户名称" label="shortName" res="records"
|
|
|
@@ -35,41 +61,82 @@
|
|
|
rightLabel="code" :disabled="newOption.disabled"></dic-select>
|
|
|
</template> -->
|
|
|
<template slot="feeCnNameUpdate">
|
|
|
- <dic-select v-model="newForm.feeCnNameUpdate" placeholder="费用名称" label="cnName" res="records"
|
|
|
- url="/blade-los/bfees/list?status=0¤t=1&size=20" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('feeCnNameUpdate', $event)" :slotRight="true" rightLabel="code"
|
|
|
- :disabled="newOption.disabled||newForm.automaticGenerated==1"></dic-select>
|
|
|
+ <dic-select
|
|
|
+ v-model="newForm.feeCnNameUpdate"
|
|
|
+ placeholder="费用名称"
|
|
|
+ label="cnName"
|
|
|
+ res="records"
|
|
|
+ url="/blade-los/bfees/list?status=0¤t=1&size=20"
|
|
|
+ :filterable="true"
|
|
|
+ :remote="true"
|
|
|
+ dataName="cnName"
|
|
|
+ @selectChange="dicChange('feeCnNameUpdate', $event)"
|
|
|
+ :slotRight="true"
|
|
|
+ rightLabel="code"
|
|
|
+ :disabled="newOption.disabled || newForm.automaticGenerated == 1"
|
|
|
+ ></dic-select>
|
|
|
</template>
|
|
|
<template slot="unitNoUpdate">
|
|
|
<!-- <dic-select v-model="newForm.unitNoUpdate" :key="updateFormKey" placeholder="计量单位" label="code"
|
|
|
:filterable="true" :mockData="unitNoData" :disabled="newOption.disabled"
|
|
|
@selectChange="dicChange('unitNoUpdate', $event)" @visibleChange="visibleChange"></dic-select> -->
|
|
|
- <el-select v-model="newForm.unitNoUpdate" placeholder="请选择 计量单位" size="small"
|
|
|
- @visible-change="visibleChange" @change="dicChange('unitNoUpdate', $event)" :disabled="newOption.disabled">
|
|
|
- <el-option v-for="item in unitNoData" :key="item.code" :label="item.code" :value="item.code">
|
|
|
- </el-option>
|
|
|
+ <el-select
|
|
|
+ v-model="newForm.unitNoUpdate"
|
|
|
+ placeholder="请选择 计量单位"
|
|
|
+ size="small"
|
|
|
+ @visible-change="visibleChange"
|
|
|
+ @change="dicChange('unitNoUpdate', $event)"
|
|
|
+ :disabled="newOption.disabled"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in unitNoData" :key="item.code" :label="item.code" :value="item.code"> </el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
<template slot="curCodeUpdate">
|
|
|
- <dic-select v-model="newForm.curCodeUpdate" placeholder="币别" label="code"
|
|
|
+ <dic-select
|
|
|
+ v-model="newForm.curCodeUpdate"
|
|
|
+ placeholder="币别"
|
|
|
+ label="code"
|
|
|
:url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + curCodeDate + '&type=1'"
|
|
|
- :filterable="true" @selectChange="dicChange('curCodeUpdate', $event, row)"
|
|
|
- :disabled="newOption.disabled"></dic-select>
|
|
|
+ :filterable="true"
|
|
|
+ @selectChange="dicChange('curCodeUpdate', $event, row)"
|
|
|
+ :disabled="newOption.disabled"
|
|
|
+ ></dic-select>
|
|
|
</template>
|
|
|
<template slot="priceUpdate">
|
|
|
- <el-input-number v-model="newForm.priceUpdate" :controls="false" placeholder="请输入 单价" size="small"
|
|
|
- style="width: 100%;" :precision="2" @change="countChange()"
|
|
|
- :disabled="newOption.disabled"></el-input-number>
|
|
|
+ <el-input-number
|
|
|
+ v-model="newForm.priceUpdate"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 单价"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ :precision="2"
|
|
|
+ @change="countChange()"
|
|
|
+ :disabled="newOption.disabled"
|
|
|
+ ></el-input-number>
|
|
|
</template>
|
|
|
<template slot="quantityUpdate">
|
|
|
- <el-input-number v-model="newForm.quantityUpdate" :controls="false" placeholder="请输入 数量" size="small"
|
|
|
- style="width: 100%;" :precision="0" @change="countChange()"
|
|
|
- :disabled="newOption.disabled"></el-input-number>
|
|
|
+ <el-input-number
|
|
|
+ v-model="newForm.quantityUpdate"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 数量"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ :precision="0"
|
|
|
+ @change="countChange()"
|
|
|
+ :disabled="newOption.disabled"
|
|
|
+ ></el-input-number>
|
|
|
</template>
|
|
|
<template slot="taxRateUpdate">
|
|
|
- <el-input-number v-model="newForm.taxRateUpdate" :controls="false" placeholder="请输入 税率" size="small"
|
|
|
- style="width: 100%;" :precision="0" @change="countChange()"
|
|
|
- :disabled="newOption.disabled"></el-input-number>
|
|
|
+ <el-input-number
|
|
|
+ v-model="newForm.taxRateUpdate"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 税率"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ :precision="0"
|
|
|
+ @change="countChange()"
|
|
|
+ :disabled="newOption.disabled"
|
|
|
+ ></el-input-number>
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
</div>
|
|
|
@@ -82,7 +149,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { applyUpdate, revokeapplyUpdate, getDetail, applyUpdateCheck } from '@/api/iosBasicData/feeModify.js'
|
|
|
+import { applyUpdate, revokeapplyUpdate, getDetail, applyUpdateCheck } from "@/api/iosBasicData/feeModify.js";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import { getBunitsPage } from "@/api/iosBasicData/bunits";
|
|
|
import _ from "lodash";
|
|
|
@@ -93,24 +160,24 @@ export default {
|
|
|
props: {
|
|
|
form: {
|
|
|
type: Object,
|
|
|
- default: () => { },
|
|
|
+ default: () => {}
|
|
|
},
|
|
|
url: {
|
|
|
- type: String,
|
|
|
+ type: String
|
|
|
},
|
|
|
pageStatus: {
|
|
|
- type: String,
|
|
|
+ type: String
|
|
|
},
|
|
|
pageLabel: {
|
|
|
- type: String,
|
|
|
+ type: String
|
|
|
},
|
|
|
curCodeDate: {
|
|
|
- type: String,
|
|
|
- },
|
|
|
+ type: String
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- deptId: JSON.parse(localStorage.getItem('sysitemData')).deptId,
|
|
|
+ deptId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
|
|
|
oldForm: {},
|
|
|
newForm: {},
|
|
|
unitNoData: [],
|
|
|
@@ -123,15 +190,15 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
label: "类别",
|
|
|
- prop: "corpType",
|
|
|
+ prop: "corpType"
|
|
|
},
|
|
|
{
|
|
|
label: "结算单位",
|
|
|
- prop: "shortName",
|
|
|
+ prop: "shortName"
|
|
|
},
|
|
|
{
|
|
|
label: "代收客户",
|
|
|
- prop: "generationCorpCnName",
|
|
|
+ prop: "generationCorpCnName"
|
|
|
},
|
|
|
// {
|
|
|
// label: "客户名称",
|
|
|
@@ -139,44 +206,44 @@ export default {
|
|
|
// },
|
|
|
{
|
|
|
label: "费用名称",
|
|
|
- prop: "feeCnName",
|
|
|
+ prop: "feeCnName"
|
|
|
},
|
|
|
{
|
|
|
label: "计量单位",
|
|
|
- prop: "unitNo",
|
|
|
+ prop: "unitNo"
|
|
|
},
|
|
|
{
|
|
|
label: "币别",
|
|
|
- prop: "curCode",
|
|
|
+ prop: "curCode"
|
|
|
},
|
|
|
{
|
|
|
label: "汇率",
|
|
|
- prop: "exrate",
|
|
|
+ prop: "exrate"
|
|
|
},
|
|
|
{
|
|
|
label: "数量",
|
|
|
- prop: "quantity",
|
|
|
+ prop: "quantity"
|
|
|
},
|
|
|
{
|
|
|
label: "单价",
|
|
|
- prop: "price",
|
|
|
+ prop: "price"
|
|
|
},
|
|
|
{
|
|
|
label: "税率",
|
|
|
- prop: "taxRate",
|
|
|
+ prop: "taxRate"
|
|
|
},
|
|
|
{
|
|
|
label: "税额",
|
|
|
- prop: "amountTax",
|
|
|
+ prop: "amountTax"
|
|
|
},
|
|
|
{
|
|
|
label: "金额",
|
|
|
- prop: "amount",
|
|
|
+ prop: "amount"
|
|
|
},
|
|
|
{
|
|
|
label: "备注",
|
|
|
prop: "remarks",
|
|
|
- minRows: 2,
|
|
|
+ minRows: 2
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
@@ -188,116 +255,115 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
label: "类别",
|
|
|
- prop: "corpTypeUpdate",
|
|
|
+ prop: "corpTypeUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "结算单位",
|
|
|
- prop: "shortNameUpdate",
|
|
|
+ prop: "shortNameUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "代收客户",
|
|
|
- prop: "generationCorpCnNameUpdate",
|
|
|
+ prop: "generationCorpCnNameUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "费用名称",
|
|
|
- prop: "feeCnNameUpdate",
|
|
|
+ prop: "feeCnNameUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "计量单位",
|
|
|
- prop: "unitNoUpdate",
|
|
|
+ prop: "unitNoUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "币别",
|
|
|
- prop: "curCodeUpdate",
|
|
|
+ prop: "curCodeUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "汇率",
|
|
|
prop: "exrateUpdate",
|
|
|
- disabled: true,
|
|
|
+ disabled: true
|
|
|
},
|
|
|
{
|
|
|
label: "数量",
|
|
|
- prop: "quantityUpdate",
|
|
|
+ prop: "quantityUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "单价",
|
|
|
- prop: "priceUpdate",
|
|
|
+ prop: "priceUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "税率",
|
|
|
- prop: "taxRateUpdate",
|
|
|
+ prop: "taxRateUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "税额",
|
|
|
- prop: "amountTaxUpdate",
|
|
|
+ prop: "amountTaxUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "金额",
|
|
|
prop: "amountUpdate",
|
|
|
- disabled: true,
|
|
|
+ disabled: true
|
|
|
},
|
|
|
{
|
|
|
label: "备注",
|
|
|
prop: "remarksUpdate",
|
|
|
- minRows: 2,
|
|
|
+ minRows: 2
|
|
|
},
|
|
|
{
|
|
|
label: "修改原因",
|
|
|
prop: "updateReason",
|
|
|
- minRows: 2,
|
|
|
+ minRows: 2
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
type: null,
|
|
|
title: null,
|
|
|
- updateFormKey: new Date().getTime(),
|
|
|
- }
|
|
|
+ updateFormKey: new Date().getTime()
|
|
|
+ };
|
|
|
},
|
|
|
created() {
|
|
|
// this.option = await this.getColumnData(this.getColumnName(309.6), this.optionBack);
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取计算属性
|
|
|
async getBunitsPagefun(type, feeRow) {
|
|
|
- let srcBillId = null
|
|
|
- if (this.form.billType == 'MH') {
|
|
|
- srcBillId = this.form.masterId
|
|
|
+ let srcBillId = null;
|
|
|
+ if (this.form.billType == "MH") {
|
|
|
+ srcBillId = this.form.masterId;
|
|
|
} else {
|
|
|
- srcBillId = this.form.id
|
|
|
+ srcBillId = this.form.id;
|
|
|
}
|
|
|
- const res = await getBunitsPage({ srcBillId })
|
|
|
- this.unitNoData = []
|
|
|
+ const res = await getBunitsPage({ srcBillId });
|
|
|
+ this.unitNoData = [];
|
|
|
let boxarr40 = ["40HC", "40GP", "40FB", "40RF", "40RH"];
|
|
|
- let boxarr20 = ["20GP","20HC"];
|
|
|
+ let boxarr20 = ["20GP", "20HC"];
|
|
|
let teunum = 0;
|
|
|
for (let item of res.data.data) {
|
|
|
// 按箱型
|
|
|
- if (item.quantityRule != '按箱量') {
|
|
|
+ if (item.quantityRule != "按箱量") {
|
|
|
// TEU
|
|
|
- if (item.quantityRule == '按TEU') {
|
|
|
+ if (item.quantityRule == "按TEU") {
|
|
|
for (let data of this.form.preContainersList) {
|
|
|
// 40*2 20*1
|
|
|
if (boxarr40.indexOf(data.cntrTypeCode) != -1) {
|
|
|
- teunum += Number(data.quantity) * 2
|
|
|
+ teunum += Number(data.quantity) * 2;
|
|
|
} else if (boxarr20.indexOf(data.cntrTypeCode) != -1) {
|
|
|
- teunum += Number(data.quantity)
|
|
|
+ teunum += Number(data.quantity);
|
|
|
}
|
|
|
}
|
|
|
- this.unitNoData.push({ ...item, quantity: teunum })
|
|
|
+ this.unitNoData.push({ ...item, quantity: teunum });
|
|
|
} else {
|
|
|
- this.unitNoData.push(item) // 不是TEU和不是箱的走这个
|
|
|
+ this.unitNoData.push(item); // 不是TEU和不是箱的走这个
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
let arr = this.form.preContainersList.map(item => {
|
|
|
return {
|
|
|
- quantityRule:'按箱量', // 1 是按箱量
|
|
|
+ quantityRule: "按箱量", // 1 是按箱量
|
|
|
code: item.cntrTypeCode,
|
|
|
- quantity: item.quantity,
|
|
|
- }
|
|
|
- })
|
|
|
- this.unitNoData = [...arr, ...this.unitNoData]
|
|
|
+ quantity: item.quantity
|
|
|
+ };
|
|
|
+ });
|
|
|
+ this.unitNoData = [...arr, ...this.unitNoData];
|
|
|
// this.updateFormKey = new Date().getTime()
|
|
|
// // 选择费用时带出第一条
|
|
|
// if (type) {
|
|
|
@@ -311,8 +377,8 @@ export default {
|
|
|
// }
|
|
|
},
|
|
|
openDialog(row, type) {
|
|
|
- if (type == 'fix') {
|
|
|
- this.oldForm = row
|
|
|
+ if (type == "fix") {
|
|
|
+ this.oldForm = row;
|
|
|
this.newForm = {
|
|
|
corpIdUpdate: row.corpId,
|
|
|
corpCnNameUpdate: row.corpCnName,
|
|
|
@@ -338,17 +404,17 @@ export default {
|
|
|
quantityUpdate: row.quantity,
|
|
|
priceUpdate: row.price,
|
|
|
amountUpdate: row.amount,
|
|
|
- automaticGenerated:row.automaticGenerated
|
|
|
- }
|
|
|
- this.checkRate(null, this.curCodeDate, this.oldForm.dc, 1, this.form.branchId)
|
|
|
- this.type = type
|
|
|
- this.title = '费用申请修改'
|
|
|
+ automaticGenerated: row.automaticGenerated
|
|
|
+ };
|
|
|
+ this.checkRate(null, this.curCodeDate, this.oldForm.dc, 1, this.form.branchId);
|
|
|
+ this.type = type;
|
|
|
+ this.title = "费用申请修改";
|
|
|
let obj = {
|
|
|
...this.oldForm,
|
|
|
...this.newForm,
|
|
|
- billDate: this.oldForm.billDate ? this.oldForm.billDate + ' 00:00:00' : null,
|
|
|
- etd: this.oldForm.etd ? this.oldForm.etd + ' 00:00:00' : null,
|
|
|
- eta: this.oldForm.eta ? this.oldForm.eta + ' 00:00:00' : null,
|
|
|
+ billDate: this.oldForm.billDate ? this.oldForm.billDate + " 00:00:00" : null,
|
|
|
+ etd: this.oldForm.etd ? this.oldForm.etd + " 00:00:00" : null,
|
|
|
+ eta: this.oldForm.eta ? this.oldForm.eta + " 00:00:00" : null,
|
|
|
id: null,
|
|
|
pid: this.form.id,
|
|
|
itemId: this.oldForm.id,
|
|
|
@@ -356,183 +422,221 @@ export default {
|
|
|
branchName: this.form.branchName,
|
|
|
url: this.url,
|
|
|
pageStatus: this.pageStatus,
|
|
|
- pageLabel: this.pageLabel,
|
|
|
- }
|
|
|
+ pageLabel: this.pageLabel
|
|
|
+ };
|
|
|
applyUpdateCheck(obj).then(res => {
|
|
|
- this.dialogVisible = true
|
|
|
- })
|
|
|
-
|
|
|
+ this.dialogVisible = true;
|
|
|
+ });
|
|
|
}
|
|
|
- if (type == 'del') {
|
|
|
- this.$confirm('是否申请费用删除?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.oldForm = row
|
|
|
- let obj = {
|
|
|
- ...this.oldForm,
|
|
|
- ...this.newForm,
|
|
|
- billDate: this.oldForm.billDate ? this.oldForm.billDate + ' 00:00:00' : null,
|
|
|
- etd: this.oldForm.etd ? this.oldForm.etd + ' 00:00:00' : null,
|
|
|
- eta: this.oldForm.eta ? this.oldForm.eta + ' 00:00:00' : null,
|
|
|
- type: 1,
|
|
|
- id: null,
|
|
|
- pid: this.form.id,
|
|
|
- itemId: this.oldForm.id,
|
|
|
- branchId: this.form.branchId,
|
|
|
- branchName: this.form.branchName,
|
|
|
- url: this.url,
|
|
|
- pageStatus: this.pageStatus,
|
|
|
- pageLabel: this.pageLabel,
|
|
|
+ if (type == "del") {
|
|
|
+ this.$DialogForm.show({
|
|
|
+ title: "申请删除",
|
|
|
+ width: "50%",
|
|
|
+ menuPosition: "right",
|
|
|
+ option: {
|
|
|
+ submitText: "确定",
|
|
|
+ emptyText: "取消",
|
|
|
+ labelWidth: "100",
|
|
|
+ span: 24,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "删除原因",
|
|
|
+ prop: "updateReason",
|
|
|
+ type: "textarea",
|
|
|
+ rows: 5
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ beforeClose: done => {
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ callback: res => {
|
|
|
+ res.done();
|
|
|
+ this.oldForm = row;
|
|
|
+ let obj = {
|
|
|
+ ...this.oldForm,
|
|
|
+ ...this.newForm,
|
|
|
+ billDate: this.oldForm.billDate ? this.oldForm.billDate + " 00:00:00" : null,
|
|
|
+ etd: this.oldForm.etd ? this.oldForm.etd + " 00:00:00" : null,
|
|
|
+ eta: this.oldForm.eta ? this.oldForm.eta + " 00:00:00" : null,
|
|
|
+ type: 1,
|
|
|
+ id: null,
|
|
|
+ pid: this.form.id,
|
|
|
+ itemId: this.oldForm.id,
|
|
|
+ branchId: this.form.branchId,
|
|
|
+ branchName: this.form.branchName,
|
|
|
+ url: this.url,
|
|
|
+ pageStatus: this.pageStatus,
|
|
|
+ pageLabel: this.pageLabel,
|
|
|
+ updateReason:res.data.updateReason
|
|
|
+ };
|
|
|
+ applyUpdateCheck(obj).then(res => {
|
|
|
+ applyUpdate(obj).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.$emit("updateDetail");
|
|
|
+ });
|
|
|
+ });
|
|
|
+ res.close();
|
|
|
}
|
|
|
- applyUpdateCheck(obj).then(res => {
|
|
|
- applyUpdate(obj).then(res => {
|
|
|
- this.$message.success('操作成功');
|
|
|
- this.$emit('updateDetail')
|
|
|
- })
|
|
|
- })
|
|
|
+ });
|
|
|
+ // this.$confirm('是否申请费用删除?', '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // type: 'warning'
|
|
|
+ // }).then(() => {
|
|
|
|
|
|
- })
|
|
|
+ // })
|
|
|
}
|
|
|
- if (type == 'view') {
|
|
|
+ if (type == "view") {
|
|
|
const obj = {
|
|
|
- id: row.id,
|
|
|
- }
|
|
|
+ id: row.id
|
|
|
+ };
|
|
|
getDetail(obj).then(res => {
|
|
|
- this.oldForm = res.data.data
|
|
|
- this.newForm = res.data.data
|
|
|
- this.newOption.disabled = true
|
|
|
- this.title = '查看费用'
|
|
|
- this.dialogVisible = true
|
|
|
- })
|
|
|
+ this.oldForm = res.data.data;
|
|
|
+ this.newForm = res.data.data;
|
|
|
+ this.newOption.disabled = true;
|
|
|
+ this.title = "查看费用";
|
|
|
+ this.dialogVisible = true;
|
|
|
+ });
|
|
|
}
|
|
|
- if (type == 'revoke') {
|
|
|
+ if (type == "revoke") {
|
|
|
let obj = {
|
|
|
billId: this.form.id,
|
|
|
itemId: row.id
|
|
|
- }
|
|
|
+ };
|
|
|
revokeapplyUpdate(obj).then(res => {
|
|
|
- this.$message.success('操作成功');
|
|
|
- this.$emit('updateDetail')
|
|
|
- })
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.$emit("updateDetail");
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
countChange() {
|
|
|
// this.newForm.amountUpdate = _.round(_.multiply(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0, this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0), 2)
|
|
|
- this.newForm.amountTaxUpdate=_.round(Number(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0) * (Number(this.newForm.taxRateUpdate ? this.newForm.taxRateUpdate : 0) / 100) * Number(this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0), 2)
|
|
|
- this.newForm.amountUpdate = _.round(Number(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0) * (1 + Number(this.newForm.taxRateUpdate ? this.newForm.taxRateUpdate : 0) / 100) * Number(this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0), 2)
|
|
|
+ this.newForm.amountTaxUpdate = _.round(
|
|
|
+ Number(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0) *
|
|
|
+ (Number(this.newForm.taxRateUpdate ? this.newForm.taxRateUpdate : 0) / 100) *
|
|
|
+ Number(this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0),
|
|
|
+ 2
|
|
|
+ );
|
|
|
+ this.newForm.amountUpdate = _.round(
|
|
|
+ Number(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0) *
|
|
|
+ (1 + Number(this.newForm.taxRateUpdate ? this.newForm.taxRateUpdate : 0) / 100) *
|
|
|
+ Number(this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0),
|
|
|
+ 2
|
|
|
+ );
|
|
|
},
|
|
|
dicChange(name, row) {
|
|
|
- if (name == 'corpTypeUpdate') {
|
|
|
- console.log(row)
|
|
|
- if (row.cnName == '国内直接客户' || row.cnName == '国内同行及代理' || row.cnName == '国外直接客户') {
|
|
|
- this.newForm.corpIdUpdate = this.form.corpId
|
|
|
- this.newForm.shortNameUpdate = this.form.shortName
|
|
|
- this.newForm.corpCnNameUpdate = this.form.corpCnName
|
|
|
- this.newForm.corpEnNameUpdate = this.form.corpEnName
|
|
|
- } else if (row.cnName == '国外同行及代理') {
|
|
|
- this.newForm.corpIdUpdate = this.form.foreignAgencyId
|
|
|
- this.newForm.shortNameUpdate = this.form.foreignAgencyCnName
|
|
|
- this.newForm.corpCnNameUpdate = this.form.foreignAgencyCnName
|
|
|
- this.newForm.corpEnNameUpdate = this.form.foreignAgencyEnName
|
|
|
- } else if (row.cnName == '船公司') {
|
|
|
- this.newForm.corpIdUpdate = this.form.carrierId
|
|
|
- this.newForm.shortNameUpdate = this.form.carrierShortName
|
|
|
- this.newForm.corpCnNameUpdate = this.form.carrierCnName
|
|
|
- this.newForm.corpEnNameUpdate = this.form.carrierEnName
|
|
|
- } else if (row.cnName == '场站') {
|
|
|
- this.newForm.corpIdUpdate = this.form.cyId
|
|
|
- this.newForm.shortNameUpdate = this.form.cyShortName
|
|
|
- this.newForm.corpCnNameUpdate = this.form.cyCnName
|
|
|
- this.newForm.corpEnNameUpdate = this.form.cyEnName
|
|
|
- } else if (row.cnName == '船代') {
|
|
|
- this.newForm.corpIdUpdate = this.form.shippingAgencyId
|
|
|
- this.newForm.shortNameUpdate = this.form.shippingAgencyCname
|
|
|
- this.newForm.corpCnNameUpdate = this.form.shippingAgencyCname
|
|
|
- this.newForm.corpEnNameUpdate = this.form.shippingAgencyEname
|
|
|
+ if (name == "corpTypeUpdate") {
|
|
|
+ console.log(row);
|
|
|
+ if (row.cnName == "国内直接客户" || row.cnName == "国内同行及代理" || row.cnName == "国外直接客户") {
|
|
|
+ this.newForm.corpIdUpdate = this.form.corpId;
|
|
|
+ this.newForm.shortNameUpdate = this.form.shortName;
|
|
|
+ this.newForm.corpCnNameUpdate = this.form.corpCnName;
|
|
|
+ this.newForm.corpEnNameUpdate = this.form.corpEnName;
|
|
|
+ } else if (row.cnName == "国外同行及代理") {
|
|
|
+ this.newForm.corpIdUpdate = this.form.foreignAgencyId;
|
|
|
+ this.newForm.shortNameUpdate = this.form.foreignAgencyCnName;
|
|
|
+ this.newForm.corpCnNameUpdate = this.form.foreignAgencyCnName;
|
|
|
+ this.newForm.corpEnNameUpdate = this.form.foreignAgencyEnName;
|
|
|
+ } else if (row.cnName == "船公司") {
|
|
|
+ this.newForm.corpIdUpdate = this.form.carrierId;
|
|
|
+ this.newForm.shortNameUpdate = this.form.carrierShortName;
|
|
|
+ this.newForm.corpCnNameUpdate = this.form.carrierCnName;
|
|
|
+ this.newForm.corpEnNameUpdate = this.form.carrierEnName;
|
|
|
+ } else if (row.cnName == "场站") {
|
|
|
+ this.newForm.corpIdUpdate = this.form.cyId;
|
|
|
+ this.newForm.shortNameUpdate = this.form.cyShortName;
|
|
|
+ this.newForm.corpCnNameUpdate = this.form.cyCnName;
|
|
|
+ this.newForm.corpEnNameUpdate = this.form.cyEnName;
|
|
|
+ } else if (row.cnName == "船代") {
|
|
|
+ this.newForm.corpIdUpdate = this.form.shippingAgencyId;
|
|
|
+ this.newForm.shortNameUpdate = this.form.shippingAgencyCname;
|
|
|
+ this.newForm.corpCnNameUpdate = this.form.shippingAgencyCname;
|
|
|
+ this.newForm.corpEnNameUpdate = this.form.shippingAgencyEname;
|
|
|
} else {
|
|
|
- this.newForm.corpIdUpdate = null
|
|
|
- this.newForm.shortNameUpdate = null
|
|
|
- this.newForm.corpCnNameUpdate = null
|
|
|
- this.newForm.corpEnNameUpdate = null
|
|
|
+ this.newForm.corpIdUpdate = null;
|
|
|
+ this.newForm.shortNameUpdate = null;
|
|
|
+ this.newForm.corpCnNameUpdate = null;
|
|
|
+ this.newForm.corpEnNameUpdate = null;
|
|
|
}
|
|
|
}
|
|
|
- if (name == 'shortNameUpdate') {
|
|
|
+ if (name == "shortNameUpdate") {
|
|
|
if (row) {
|
|
|
- this.newForm.corpIdUpdate = row.id
|
|
|
- this.newForm.corpCnNameUpdate = row.cnName
|
|
|
- this.newForm.corpEnNameUpdate = row.enName
|
|
|
- this.newForm.generationCorpIdUpdate = row.bookingAgentId
|
|
|
- this.newForm.generationCorpEnNameUpdate = row.bookingAgentEnName
|
|
|
- this.newForm.generationCorpCnNameUpdate = row.bookingAgentCnName
|
|
|
+ this.newForm.corpIdUpdate = row.id;
|
|
|
+ this.newForm.corpCnNameUpdate = row.cnName;
|
|
|
+ this.newForm.corpEnNameUpdate = row.enName;
|
|
|
+ this.newForm.generationCorpIdUpdate = row.bookingAgentId;
|
|
|
+ this.newForm.generationCorpEnNameUpdate = row.bookingAgentEnName;
|
|
|
+ this.newForm.generationCorpCnNameUpdate = row.bookingAgentCnName;
|
|
|
} else {
|
|
|
- this.newForm.corpIdUpdate = null
|
|
|
- this.newForm.corpCnNameUpdate = null
|
|
|
- this.newForm.corpEnNameUpdate = null
|
|
|
- this.newForm.shortNameUpdate = null
|
|
|
- this.newForm.generationCorpIdUpdate = null
|
|
|
- this.newForm.generationCorpEnNameUpdate = null
|
|
|
- this.newForm.generationCorpCnNameUpdate = null
|
|
|
+ this.newForm.corpIdUpdate = null;
|
|
|
+ this.newForm.corpCnNameUpdate = null;
|
|
|
+ this.newForm.corpEnNameUpdate = null;
|
|
|
+ this.newForm.shortNameUpdate = null;
|
|
|
+ this.newForm.generationCorpIdUpdate = null;
|
|
|
+ this.newForm.generationCorpEnNameUpdate = null;
|
|
|
+ this.newForm.generationCorpCnNameUpdate = null;
|
|
|
}
|
|
|
}
|
|
|
- if (name == 'generationCorpCnNameUpdate') {
|
|
|
+ if (name == "generationCorpCnNameUpdate") {
|
|
|
if (row) {
|
|
|
- this.newForm.generationCorpIdUpdate = row.id
|
|
|
- this.newForm.generationCorpEnNameUpdate = row.enName
|
|
|
- this.newForm.generationCorpCnNameUpdate = row.cnName
|
|
|
+ this.newForm.generationCorpIdUpdate = row.id;
|
|
|
+ this.newForm.generationCorpEnNameUpdate = row.enName;
|
|
|
+ this.newForm.generationCorpCnNameUpdate = row.cnName;
|
|
|
} else {
|
|
|
- this.newForm.generationCorpIdUpdate = null
|
|
|
- this.newForm.generationCorpEnNameUpdate = null
|
|
|
- this.newForm.generationCorpCnNameUpdate = null
|
|
|
+ this.newForm.generationCorpIdUpdate = null;
|
|
|
+ this.newForm.generationCorpEnNameUpdate = null;
|
|
|
+ this.newForm.generationCorpCnNameUpdate = null;
|
|
|
}
|
|
|
}
|
|
|
- if (name == 'billShortNameUpdate') {
|
|
|
+ if (name == "billShortNameUpdate") {
|
|
|
if (row) {
|
|
|
- this.newForm.billCorpIdUpdate = row.id
|
|
|
- this.newForm.billCorpCnNameUpdate = row.cnName
|
|
|
- this.newForm.billCorpEnNameUpdate = row.enName
|
|
|
+ this.newForm.billCorpIdUpdate = row.id;
|
|
|
+ this.newForm.billCorpCnNameUpdate = row.cnName;
|
|
|
+ this.newForm.billCorpEnNameUpdate = row.enName;
|
|
|
} else {
|
|
|
- this.newForm.billCorpIdUpdate = null
|
|
|
- this.newForm.billCorpCnNameUpdate = null
|
|
|
- this.newForm.billCorpEnNameUpdate = null
|
|
|
- this.newForm.billShortNameUpdate = null
|
|
|
+ this.newForm.billCorpIdUpdate = null;
|
|
|
+ this.newForm.billCorpCnNameUpdate = null;
|
|
|
+ this.newForm.billCorpEnNameUpdate = null;
|
|
|
+ this.newForm.billShortNameUpdate = null;
|
|
|
}
|
|
|
}
|
|
|
- if (name == 'feeCnNameUpdate') {
|
|
|
+ if (name == "feeCnNameUpdate") {
|
|
|
if (row) {
|
|
|
- this.newForm.feeIdUpdate = row.id
|
|
|
- this.newForm.feeCodeUpdate = row.code
|
|
|
- this.newForm.feeEnNameUpdate = row.enName
|
|
|
- this.newForm.curCodeUpdate = row.curNo
|
|
|
- this.newForm.exrateUpdate = this.getExchangeRate(row.curNo, this.oldForm.dc, 1)
|
|
|
+ this.newForm.feeIdUpdate = row.id;
|
|
|
+ this.newForm.feeCodeUpdate = row.code;
|
|
|
+ this.newForm.feeEnNameUpdate = row.enName;
|
|
|
+ this.newForm.curCodeUpdate = row.curNo;
|
|
|
+ this.newForm.exrateUpdate = this.getExchangeRate(row.curNo, this.oldForm.dc, 1);
|
|
|
// this.getBunitsPagefun(true, row)
|
|
|
} else {
|
|
|
- this.newForm.feeIdUpdate = null
|
|
|
- this.newForm.feeCodeUpdate = null
|
|
|
- this.newForm.feeEnNameUpdate = null
|
|
|
- this.newForm.feeCnNameUpdate = null
|
|
|
- this.newForm.exrateUpdate = null
|
|
|
- this.newForm.exrateUpdate = null
|
|
|
+ this.newForm.feeIdUpdate = null;
|
|
|
+ this.newForm.feeCodeUpdate = null;
|
|
|
+ this.newForm.feeEnNameUpdate = null;
|
|
|
+ this.newForm.feeCnNameUpdate = null;
|
|
|
+ this.newForm.exrateUpdate = null;
|
|
|
+ this.newForm.exrateUpdate = null;
|
|
|
}
|
|
|
}
|
|
|
- if (name == 'curCodeUpdate') {
|
|
|
+ if (name == "curCodeUpdate") {
|
|
|
if (row) {
|
|
|
// console.log()
|
|
|
- this.newForm.exrateUpdate = this.getExchangeRate(row.code, this.oldForm.dc, 1)
|
|
|
+ this.newForm.exrateUpdate = this.getExchangeRate(row.code, this.oldForm.dc, 1);
|
|
|
} else {
|
|
|
- this.newForm.exrateUpdate = null
|
|
|
+ this.newForm.exrateUpdate = null;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- if (name == 'unitNoUpdate') {
|
|
|
+ if (name == "unitNoUpdate") {
|
|
|
// console.log(row)
|
|
|
this.unitNoData.forEach(item => {
|
|
|
if (item.code == row) {
|
|
|
- this.newForm.quantityUpdate = item.quantity
|
|
|
- this.newForm.amountUpdate = _.round(_.multiply(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0, this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0), 2)
|
|
|
+ this.newForm.quantityUpdate = item.quantity;
|
|
|
+ this.newForm.amountUpdate = _.round(
|
|
|
+ _.multiply(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0, this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0),
|
|
|
+ 2
|
|
|
+ );
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
// if (row) {
|
|
|
// this.newForm.quantityUpdate = row.quantity
|
|
|
// this.newForm.amountUpdate = _.round(_.multiply(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0, this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0), 2)
|
|
|
@@ -540,15 +644,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
visibleChange() {
|
|
|
- this.getBunitsPagefun()
|
|
|
+ this.getBunitsPagefun();
|
|
|
},
|
|
|
submit() {
|
|
|
let obj = {
|
|
|
...this.oldForm,
|
|
|
...this.newForm,
|
|
|
- billDate: this.oldForm.billDate ? this.oldForm.billDate + ' 00:00:00' : null,
|
|
|
- etd: this.oldForm.etd ? this.oldForm.etd + ' 00:00:00' : null,
|
|
|
- eta: this.oldForm.eta ? this.oldForm.eta + ' 00:00:00' : null,
|
|
|
+ billDate: this.oldForm.billDate ? this.oldForm.billDate + " 00:00:00" : null,
|
|
|
+ etd: this.oldForm.etd ? this.oldForm.etd + " 00:00:00" : null,
|
|
|
+ eta: this.oldForm.eta ? this.oldForm.eta + " 00:00:00" : null,
|
|
|
type: 0,
|
|
|
id: null,
|
|
|
pid: this.form.id,
|
|
|
@@ -557,16 +661,16 @@ export default {
|
|
|
branchName: this.form.branchName,
|
|
|
url: this.url,
|
|
|
pageStatus: this.pageStatus,
|
|
|
- pageLabel: this.pageLabel,
|
|
|
- }
|
|
|
+ pageLabel: this.pageLabel
|
|
|
+ };
|
|
|
applyUpdate(obj).then(res => {
|
|
|
- this.$message.success('操作成功');
|
|
|
- this.dialogVisible = false
|
|
|
- this.$emit('updateDetail')
|
|
|
- })
|
|
|
- },
|
|
|
- },
|
|
|
-}
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.$emit("updateDetail");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|