|
|
@@ -1,25 +1,41 @@
|
|
|
<!-- 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)"></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)"
|
|
|
+ ></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="billShortNameUpdate">
|
|
|
<dic-select v-model="newForm.billShortNameUpdate" placeholder="客户名称" label="shortName" res="records"
|
|
|
@@ -28,15 +44,32 @@
|
|
|
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"></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"
|
|
|
+ ></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)"></dic-select>
|
|
|
+ <dic-select
|
|
|
+ v-model="newForm.unitNoUpdate"
|
|
|
+ :key="updateFormKey"
|
|
|
+ placeholder="计量单位"
|
|
|
+ label="code"
|
|
|
+ :filterable="true"
|
|
|
+ :mockData="unitNoData"
|
|
|
+ :disabled="newOption.disabled"
|
|
|
+ @selectChange="dicChange('unitNoUpdate', $event)"
|
|
|
+ ></dic-select>
|
|
|
<!-- <el-select v-model="newForm.unitNoUpdate" placeholder="请选择 计量单位" size="small"
|
|
|
@visible-change="visibleChange" @change="dicChange('unitNoUpdate', $event)">
|
|
|
<el-option v-for="item in unitNoData" :key="item.code" :label="item.code" :value="item.code">
|
|
|
@@ -44,20 +77,39 @@
|
|
|
</el-select> -->
|
|
|
</template>
|
|
|
<template slot="curCodeUpdate">
|
|
|
- <dic-select v-model="newForm.curCodeUpdate" placeholder="币别" label="code"
|
|
|
- :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.etd + ' 00:00:00' + '&type=1'"
|
|
|
- :filterable="true" @selectChange="dicChange('curCodeUpdate', $event, row)"
|
|
|
- :disabled="newOption.disabled"></dic-select>
|
|
|
+ <dic-select
|
|
|
+ v-model="newForm.curCodeUpdate"
|
|
|
+ placeholder="币别"
|
|
|
+ label="code"
|
|
|
+ :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + (form.etd ? form.etd + ' 00:00:00' : nowDate) + '&type=1'"
|
|
|
+ :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>
|
|
|
</avue-form>
|
|
|
</div>
|
|
|
@@ -70,9 +122,10 @@
|
|
|
</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 { getCurrentDate } from "@/util/date";
|
|
|
import _ from "lodash";
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -81,21 +134,21 @@ export default {
|
|
|
props: {
|
|
|
form: {
|
|
|
type: Object,
|
|
|
- default: () => { },
|
|
|
+ default: () => {}
|
|
|
},
|
|
|
url: {
|
|
|
- type: String,
|
|
|
+ type: String
|
|
|
},
|
|
|
pageStatus: {
|
|
|
- type: String,
|
|
|
+ type: String
|
|
|
},
|
|
|
pageLabel: {
|
|
|
- type: String,
|
|
|
+ type: String
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- deptId: JSON.parse(localStorage.getItem('sysitemData')).deptId,
|
|
|
+ deptId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
|
|
|
oldForm: {},
|
|
|
newForm: {},
|
|
|
unitNoData: [],
|
|
|
@@ -108,11 +161,11 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
label: "类别",
|
|
|
- prop: "corpType",
|
|
|
+ prop: "corpType"
|
|
|
},
|
|
|
{
|
|
|
label: "结算单位",
|
|
|
- prop: "shortName",
|
|
|
+ prop: "shortName"
|
|
|
},
|
|
|
// {
|
|
|
// label: "客户名称",
|
|
|
@@ -120,36 +173,36 @@ 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: "amount",
|
|
|
+ prop: "amount"
|
|
|
},
|
|
|
{
|
|
|
label: "备注",
|
|
|
prop: "remarks",
|
|
|
- minRows: 2,
|
|
|
+ minRows: 2
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
@@ -161,62 +214,62 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
label: "类别",
|
|
|
- prop: "corpTypeUpdate",
|
|
|
+ prop: "corpTypeUpdate"
|
|
|
},
|
|
|
{
|
|
|
label: "结算单位",
|
|
|
- prop: "shortNameUpdate",
|
|
|
+ prop: "shortNameUpdate"
|
|
|
},
|
|
|
{
|
|
|
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: "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(),
|
|
|
- }
|
|
|
+ nowDate: getCurrentDate()
|
|
|
+ };
|
|
|
},
|
|
|
created() {
|
|
|
// this.option = await this.getColumnData(this.getColumnName(309.6), this.optionBack);
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取计算属性
|
|
|
@@ -272,8 +325,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,
|
|
|
@@ -293,17 +346,17 @@ export default {
|
|
|
exrateUpdate: row.exrate,
|
|
|
quantityUpdate: row.quantity,
|
|
|
priceUpdate: row.price,
|
|
|
- amountUpdate: row.amount,
|
|
|
- }
|
|
|
- this.checkRate(null, (this.form.etd ? this.form.etd + ' 00:00:00' : null), this.oldForm.dc, 1, this.form.branchId)
|
|
|
- this.type = type
|
|
|
- this.title = '费用申请修改'
|
|
|
+ amountUpdate: row.amount
|
|
|
+ };
|
|
|
+ this.checkRate(null, this.form.etd ? this.form.etd + " 00:00:00" : null, 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,
|
|
|
@@ -311,26 +364,25 @@ 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'
|
|
|
+ if (type == "del") {
|
|
|
+ this.$confirm("是否申请费用删除?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
}).then(() => {
|
|
|
- this.oldForm = row
|
|
|
+ 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,
|
|
|
+ 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,
|
|
|
@@ -339,129 +391,130 @@ export default {
|
|
|
branchName: this.form.branchName,
|
|
|
url: this.url,
|
|
|
pageStatus: this.pageStatus,
|
|
|
- pageLabel: this.pageLabel,
|
|
|
- }
|
|
|
+ pageLabel: this.pageLabel
|
|
|
+ };
|
|
|
applyUpdateCheck(obj).then(res => {
|
|
|
applyUpdate(obj).then(res => {
|
|
|
- this.$message.success('操作成功');
|
|
|
- this.$emit('updateDetail')
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- })
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.$emit("updateDetail");
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
- 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.amountUpdate = _.round(
|
|
|
+ _.multiply(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0, 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.corpIdUpdate = row.id;
|
|
|
+ this.newForm.corpCnNameUpdate = row.cnName;
|
|
|
+ this.newForm.corpEnNameUpdate = row.enName;
|
|
|
} else {
|
|
|
- this.newForm.corpIdUpdate = null
|
|
|
- this.newForm.corpCnNameUpdate = null
|
|
|
- this.newForm.corpEnNameUpdate = null
|
|
|
- this.newForm.shortNameUpdate = null
|
|
|
+ this.newForm.corpIdUpdate = null;
|
|
|
+ this.newForm.corpCnNameUpdate = null;
|
|
|
+ this.newForm.corpEnNameUpdate = null;
|
|
|
+ this.newForm.shortNameUpdate = 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) {
|
|
|
@@ -470,8 +523,11 @@ export default {
|
|
|
// }
|
|
|
// })
|
|
|
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)
|
|
|
+ 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
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -482,9 +538,9 @@ export default {
|
|
|
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,
|
|
|
@@ -493,16 +549,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>
|