|
|
@@ -34,10 +34,11 @@
|
|
|
<el-tab-pane label="基础信息">
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
- <tempalte slot="boxEastName">
|
|
|
- <dic-select v-model="form.boxEastName" placeholder="箱东" key="id" label="cnName" res="records"
|
|
|
- @selectChange="dicChange('boxEastName', $event)" url="/blade-los/bcorps/selectList?corpTypeName=箱东"
|
|
|
- :filterable="true" :remote="true" dataName="cnName">
|
|
|
+ <tempalte slot="purchaseCompanyName">
|
|
|
+ <dic-select v-model="form.purchaseCompanyName" placeholder="箱东" key="id" label="cnName" res="records"
|
|
|
+ @selectChange="dicChange('purchaseCompanyName', $event)"
|
|
|
+ url="/blade-los/bcorps/selectList?corpTypeName=箱东" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName">
|
|
|
</dic-select>
|
|
|
</tempalte>
|
|
|
<tempalte slot="polStationCname">
|
|
|
@@ -66,11 +67,14 @@
|
|
|
:collapseTags="true" dataType="string" @selectChange="dicChange('podCname', $event)"
|
|
|
:disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
- <template slot="boxType">
|
|
|
- <dic-select v-model="form.boxType" key="id" label="cnName" res="records"
|
|
|
+ <template slot="boxTypeQuantityOne">
|
|
|
+ <dic-select v-model="form.boxTypeQuantityOne" key="id" label="cnName" res="records"
|
|
|
url="/blade-los/bcntrtypes/list?status=0¤t=1&size=20" :filterable="true" :remote="true"
|
|
|
dataName="cnName"></dic-select>
|
|
|
</template>
|
|
|
+ <template slot="perDiemAfterFreeDays">
|
|
|
+ <el-link type="primary" :underline="false" @click.stop="rtDialog = true">箱租金条款</el-link>
|
|
|
+ </template>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
<trade-card title="基础明细">
|
|
|
@@ -89,8 +93,7 @@
|
|
|
<el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
|
|
|
@click="allClick('批量删除')">批量删除</el-button>
|
|
|
<el-button type="success" size="small" @click="allClick('导入')">导入</el-button>
|
|
|
- <el-button type="info" size="small" @click="allClick('启用')"
|
|
|
- :disabled="selectionList.length == 0">启用</el-button>
|
|
|
+ <el-button type="info" size="small" @click="allClick('启用')">启用</el-button>
|
|
|
<!-- <el-button type="primary" size="small" @click="allClick('卖箱')">卖箱</el-button> -->
|
|
|
<!-- <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
|
|
|
@click="$refs.print.openDialog()">打印账单
|
|
|
@@ -118,6 +121,12 @@
|
|
|
dataName="cnName" @selectChange="rowDicChange('corpName', $event, row)"></dic-select>
|
|
|
<span v-else>{{ row.corpName }}</span>
|
|
|
</tempalte>
|
|
|
+ <tempalte slot="stationCnameForm" slot-scope="{ row }">
|
|
|
+ <dic-select v-if="row.$cellEdit" v-model="row.stationCname" placeholder="场站" key="id" label="cnName"
|
|
|
+ res="records" url="/blade-los/blocations/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
+ @selectChange="rowDicChange('stationCname', $event, row)"></dic-select>
|
|
|
+ <span v-else>{{ row.stationCname }}</span>
|
|
|
+ </tempalte>
|
|
|
<tempalte slot="shipCnameForm" slot-scope="{ row }">
|
|
|
<dic-select v-if="row.$cellEdit" v-model="row.shipCname" placeholder="船名" key="id" label="cnName"
|
|
|
res="records" url="/blade-los/bvessels/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
@@ -160,21 +169,21 @@
|
|
|
<el-card
|
|
|
v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1 ? true : roleName.indexOf('应付查看') != -1"
|
|
|
class="box-card" style="margin: 2px 0">
|
|
|
- <avue-crud :option="feedOption" :data="form.feeCenterList" id="out-table" ref="crud2"
|
|
|
+ <avue-crud :option="feedOption" :data="feeCenterListD" id="out-table" ref="crud2"
|
|
|
:header-cell-class-name="headerClassName" :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }"
|
|
|
- @selection-change="feecChange" @row-update="rowUpdate"
|
|
|
+ @selection-change="feedChange" @row-update="rowUpdate"
|
|
|
@resetColumn="resetColumn('crud2', 'feedOption', 'feedOptionBack', 463)"
|
|
|
@saveColumn="saveColumn('crud2', 'feedOption', 'feedOptionBack', 463)">
|
|
|
<template slot="menuLeft">
|
|
|
- <div style="display: inline-block;margin-right: 20px" class="disabledBox meetSize">
|
|
|
+ <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
|
|
|
<i class="el-icon-coin"></i>
|
|
|
- <span>应付费用</span>
|
|
|
+ <span>应收费用</span>
|
|
|
</div>
|
|
|
<el-button type="info" plain size="small" :disabled="editDisabled"
|
|
|
@click="allClick('D费用一键保存')">一键保存</el-button>
|
|
|
<el-button type="info" plain size="small" :disabled="editDisabled"
|
|
|
@click="allClick('D费用一键编辑')">一键编辑</el-button>
|
|
|
- <el-button type="danger" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
|
|
|
+ <el-button type="danger" plain size="small" :disabled="editDisabled || selectionfeedList.length == 0"
|
|
|
@click="allClick('D费用批量删除')">批量删除</el-button>
|
|
|
<!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
|
|
|
</template>
|
|
|
@@ -211,7 +220,7 @@
|
|
|
</template>
|
|
|
<template slot="curCodeForm" slot-scope="{ row }">
|
|
|
<dic-select v-if="row.$cellEdit" v-model="row.curCode" placeholder="币别" label="code"
|
|
|
- :url="'/blade-los/bcurrency/getExrate?date=' + form.purchaseDate + '&dc=C'" :filterable="true"
|
|
|
+ :url="'/blade-los/bcurrency/getExrate?date=' + form.effectiveDate + '&dc=D'" :filterable="true"
|
|
|
@selectChange="rowDicChange('curCode', $event, row)"></dic-select>
|
|
|
<span v-else>{{ row.curCode }}</span>
|
|
|
</template>
|
|
|
@@ -240,7 +249,7 @@
|
|
|
<el-card
|
|
|
v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1 ? true : roleName.indexOf('应付查看') != -1"
|
|
|
class="box-card" style="margin: 2px 0">
|
|
|
- <avue-crud :option="feecOption" :data="form.feeCenterList" id="out-table" ref="crud3"
|
|
|
+ <avue-crud :option="feecOption" :data="feeCenterListC" id="out-table" ref="crud3"
|
|
|
:header-cell-class-name="headerClassName" :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }"
|
|
|
@selection-change="feecChange" @row-update="rowUpdate"
|
|
|
@resetColumn="resetColumn('crud3', 'feecOption', 'feecOptionBack', 464)"
|
|
|
@@ -291,7 +300,7 @@
|
|
|
</template>
|
|
|
<template slot="curCodeForm" slot-scope="{ row }">
|
|
|
<dic-select v-if="row.$cellEdit" v-model="row.curCode" placeholder="币别" label="code"
|
|
|
- :url="'/blade-los/bcurrency/getExrate?date=' + form.purchaseDate + '&dc=C'" :filterable="true"
|
|
|
+ :url="'/blade-los/bcurrency/getExrate?date=' + form.effectiveDate + '&dc=C'" :filterable="true"
|
|
|
@selectChange="rowDicChange('curCode', $event, row)"></dic-select>
|
|
|
<span v-else>{{ row.curCode }}</span>
|
|
|
</template>
|
|
|
@@ -317,6 +326,74 @@
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</el-card>
|
|
|
+ <avue-crud id="out-table" class="box-card" :header-cell-class-name="headerClassName" ref="crud4"
|
|
|
+ :row-style="{ height: '16px' }" :cell-style="{ padding: '0px' }" :option="sumOption"
|
|
|
+ :data="sumData"></avue-crud>
|
|
|
+ <div
|
|
|
+ v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('利润查看') != -1 || ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) && (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))"
|
|
|
+ style="display: flex;align-items: center;justify-content: space-around">
|
|
|
+ <div style="width: 30%">
|
|
|
+ <div style="display: flex;align-items: center;justify-content: space-around">
|
|
|
+ <div>
|
|
|
+ <div style="color: #81B337">
|
|
|
+ <span>应收:</span>
|
|
|
+ <span class="weightnum">¥{{ form.amountD ? form.amountD : 0 }}元</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div style="color: #6BBCD1">
|
|
|
+ <span>应付:</span>
|
|
|
+ <span class="weightnum">¥{{ form.amountC ? form.amountC : 0 }}元</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bottomFlex">
|
|
|
+ <span>利润</span>
|
|
|
+ <span>¥{{ form.profit ? form.profit : 0 }}元</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 30%">
|
|
|
+ <div style="display: flex;align-items: center;justify-content: space-around">
|
|
|
+ <div>
|
|
|
+ <div style="color: #81B337">
|
|
|
+ <span>应收:</span>
|
|
|
+ <span class="weightnum">${{ form.amountDUsd ? form.amountDUsd : 0 }}元</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div style="color: #6BBCD1">
|
|
|
+ <span>应付:</span>
|
|
|
+ <span class="weightnum">${{ form.amountCUsd ? form.amountCUsd : 0 }}元</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bottomFlex">
|
|
|
+ <span>利润</span>
|
|
|
+ <span>${{ form.profitUsd ? form.profitUsd : 0 }}元</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 30%">
|
|
|
+ <div style="display: flex;align-items: center;justify-content: space-around">
|
|
|
+ <div>
|
|
|
+ <div style="color: #81B337">
|
|
|
+ <span>应收:</span>
|
|
|
+ <span class="weightnum">¥{{ form.totalAmountD ? form.totalAmountD : 0 }}元</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div style="color: #6BBCD1">
|
|
|
+ <span>应付:</span>
|
|
|
+ <span class="weightnum">¥{{ form.totalAmountC ? form.totalAmountC : 0 }}元</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bottomFlex">
|
|
|
+ <span>利润</span>
|
|
|
+ <span>¥{{ form.totalProfit ? form.totalProfit : 0 }}元</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="文件中心">
|
|
|
<containerTitle title="上传附件"></containerTitle>
|
|
|
@@ -341,12 +418,12 @@
|
|
|
<tempalte slot="polCname">
|
|
|
<dic-select v-model="activationForm.polCname" placeholder="港口" key="id" label="cnName" res="records"
|
|
|
url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('polCname', $event)"></dic-select>
|
|
|
+ @selectChange="dicChange('polCname2', $event)"></dic-select>
|
|
|
</tempalte>
|
|
|
<tempalte slot="podCname">
|
|
|
<dic-select v-model="activationForm.podCname" placeholder="港口" key="id" label="cnName" res="records"
|
|
|
url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('podCname', $event)" :disabled="editDisabled"></dic-select>
|
|
|
+ @selectChange="dicChange('podCname2', $event)" :disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
</avue-form>
|
|
|
</span>
|
|
|
@@ -369,6 +446,26 @@
|
|
|
温馨提示 第一次导入时请先下载模板
|
|
|
</p>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="箱租金条款" append-to-body :visible.sync="rtDialog" width="50%" :close-on-click-modal="false"
|
|
|
+ v-dialog-drag>
|
|
|
+ <avue-crud :option="rtOption" :data="form.rentTermList" id="out-table" ref="crud"
|
|
|
+ :header-cell-class-name="headerClassName" :row-style="{ height: '20px', padding: '0px' }"
|
|
|
+ :cell-style="{ height: '20px', padding: '0px' }">
|
|
|
+ <template slot="indexHeader" slot-scope="{row,index}">
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle @click="rtAddRow()">
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="index" slot-scope="{row,index}">
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="menu" slot-scope="{ row, index }">
|
|
|
+ <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">编辑</el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="rtDialog = false" size="mini">关 闭</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -396,6 +493,7 @@ export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ rtDialog: false,
|
|
|
excelBox: false,
|
|
|
excelForm: {},
|
|
|
excelLoading: false,
|
|
|
@@ -479,6 +577,7 @@ export default {
|
|
|
itemCIds: null,
|
|
|
feeType: null,
|
|
|
selectionList: [],
|
|
|
+ selectionfeedList: [],
|
|
|
selectionfeecList: [],
|
|
|
checkId: '', // 审核需要的id
|
|
|
batchNo: '',
|
|
|
@@ -491,8 +590,8 @@ export default {
|
|
|
feeCenterList: [],
|
|
|
tradingBoxFilesList: [],
|
|
|
},
|
|
|
- feeCenterListD:[],
|
|
|
- feeCenterListC:[],
|
|
|
+ feeCenterListD: [],
|
|
|
+ feeCenterListC: [],
|
|
|
oldForm: {},
|
|
|
optionForm: {
|
|
|
menuBtn: false,
|
|
|
@@ -502,7 +601,7 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
label: '箱东',
|
|
|
- prop: 'boxEastName',
|
|
|
+ prop: 'purchaseCompanyName',
|
|
|
disabled: false
|
|
|
},
|
|
|
{
|
|
|
@@ -523,12 +622,22 @@ export default {
|
|
|
{
|
|
|
label: '起运港',
|
|
|
prop: 'polCname',
|
|
|
- disabled: false
|
|
|
+ disabled: false,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
},
|
|
|
{
|
|
|
label: '目的港',
|
|
|
prop: 'podCname',
|
|
|
- disabled: false
|
|
|
+ disabled: false,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
},
|
|
|
{
|
|
|
label: '起运港提/送箱场站',
|
|
|
@@ -548,11 +657,16 @@ export default {
|
|
|
{
|
|
|
label: '箱量',
|
|
|
prop: 'boxNumber',
|
|
|
- disabled: false
|
|
|
+ disabled: false,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
},
|
|
|
{
|
|
|
label: '箱型',
|
|
|
- prop: 'boxType',
|
|
|
+ prop: 'boxTypeQuantityOne',
|
|
|
disabled: false
|
|
|
},
|
|
|
{
|
|
|
@@ -572,15 +686,10 @@ export default {
|
|
|
label: '旧',
|
|
|
value: '旧',
|
|
|
}],
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
},
|
|
|
{
|
|
|
label: '有效日期启',
|
|
|
- prop: 'effectiveStartDate',
|
|
|
+ prop: 'effectiveDate',
|
|
|
type: "date",
|
|
|
format: "yyyy-MM-dd",
|
|
|
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
@@ -588,7 +697,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: '有效日期止',
|
|
|
- prop: 'effectiveEndDate',
|
|
|
+ prop: 'expiryDate',
|
|
|
type: "date",
|
|
|
format: "yyyy-MM-dd",
|
|
|
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
@@ -700,16 +809,11 @@ export default {
|
|
|
selection: true,
|
|
|
align: 'center',
|
|
|
menu: false,
|
|
|
+ index: true,
|
|
|
column: [
|
|
|
{
|
|
|
- label: "index",
|
|
|
- prop: "index",
|
|
|
- width: "55",
|
|
|
- headerslot: true,
|
|
|
- },
|
|
|
- {
|
|
|
label: '箱号',
|
|
|
- prop: 'boxCode',
|
|
|
+ prop: 'code',
|
|
|
width: 100,
|
|
|
cell: true,
|
|
|
overHidden: true,
|
|
|
@@ -767,7 +871,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: '箱种类',
|
|
|
- prop: 'boxClass',
|
|
|
+ prop: 'boxCategory',
|
|
|
overHidden: true,
|
|
|
cell: true,
|
|
|
width: 100,
|
|
|
@@ -1466,6 +1570,112 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
+ sumData: [],
|
|
|
+ sumOption: {
|
|
|
+ border: true,
|
|
|
+ align: 'center',
|
|
|
+ menuAlign: 'center',
|
|
|
+ menu: false,
|
|
|
+ header: false,
|
|
|
+ addBtn: false,
|
|
|
+ // height: '100px',
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '客户',
|
|
|
+ prop: 'corpCnName',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: 'RMB应收',
|
|
|
+ prop: 'rmbD',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: 'RMB应付',
|
|
|
+ prop: 'rmbC',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: 'USD应收',
|
|
|
+ prop: 'usdD',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: 'USD应付',
|
|
|
+ prop: 'usdC',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: '合计应收',
|
|
|
+ prop: 'sumD',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: '合计应付',
|
|
|
+ prop: 'sumC',
|
|
|
+ overHidden: true,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ rtOption: {
|
|
|
+ border: true,
|
|
|
+ align: 'center',
|
|
|
+ menuWidth:80,
|
|
|
+ // menu: false,
|
|
|
+ editBtn:false,
|
|
|
+ delBtn:false,
|
|
|
+ header: false,
|
|
|
+ addBtn: false,
|
|
|
+ height: '400px',
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "index",
|
|
|
+ prop: "index",
|
|
|
+ width: "55",
|
|
|
+ headerslot: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '起',
|
|
|
+ prop: 'riseDays',
|
|
|
+ cell: true,
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '止',
|
|
|
+ prop: 'stopDays',
|
|
|
+ cell: true,
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '费率',
|
|
|
+ prop: 'rate',
|
|
|
+ cell: true,
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '无货返空费率',
|
|
|
+ prop: 'emptyRate',
|
|
|
+ cell: true,
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '币别',
|
|
|
+ prop: 'curCode',
|
|
|
+ cell: true,
|
|
|
+ type: 'select',
|
|
|
+ dicData: [{
|
|
|
+ label: 'CNY',
|
|
|
+ value: 'CNY',
|
|
|
+ }, {
|
|
|
+ label: 'USD',
|
|
|
+ value: 'USD',
|
|
|
+ }],
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
roleName: []
|
|
|
}
|
|
|
},
|
|
|
@@ -1497,6 +1707,56 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getSum() {
|
|
|
+ let sumArr = []
|
|
|
+ let corpArr = []
|
|
|
+ let newArr = []
|
|
|
+ this.sumData = []
|
|
|
+ sumArr = this.feeCenterListD.concat(this.feeCenterListC)
|
|
|
+ sumArr.forEach(e => {
|
|
|
+ if (e.shortName) {
|
|
|
+ corpArr.push(e.shortName)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ newArr = [... new Set(corpArr)]
|
|
|
+ newArr.forEach(e => {
|
|
|
+ let rmbD = 0
|
|
|
+ let rmbC = 0
|
|
|
+ let usdD = 0
|
|
|
+ let usdC = 0
|
|
|
+ let sumD = 0
|
|
|
+ let sumC = 0
|
|
|
+ sumArr.forEach(item => {
|
|
|
+ if (e == item.shortName) {
|
|
|
+ if (item.curCode == 'CNY' && item.dc == 'D') {
|
|
|
+ rmbD += Number(item.amount)
|
|
|
+ sumD += Number(item.amount)
|
|
|
+ }
|
|
|
+ if (item.curCode == 'CNY' && item.dc == 'C') {
|
|
|
+ rmbC += Number(item.amount)
|
|
|
+ sumC += Number(item.amount)
|
|
|
+ }
|
|
|
+ if (item.curCode == 'USD' && item.dc == 'D') {
|
|
|
+ usdD += Number(item.amountLoc)
|
|
|
+ sumD += Number(item.amountLoc) * Number(item.exrate)
|
|
|
+ }
|
|
|
+ if (item.curCode == 'USD' && item.dc == 'C') {
|
|
|
+ usdC += Number(item.amountLoc)
|
|
|
+ sumC += Number(item.amountLoc) * Number(item.exrate)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.sumData.push({
|
|
|
+ corpCnName: e,
|
|
|
+ rmbD: _.round(rmbD, 2),
|
|
|
+ rmbC: _.round(rmbC, 2),
|
|
|
+ usdD: _.round(usdD, 2),
|
|
|
+ usdC: _.round(usdC, 2),
|
|
|
+ sumD: _.round(sumD, 2),
|
|
|
+ sumC: _.round(sumC, 2)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
countChange(row) {
|
|
|
if (row.curCode == 'CNY') {
|
|
|
row.amount = _.round(_.multiply(row.price, row.quantity), 2)
|
|
|
@@ -1553,12 +1813,12 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
dicChange(name, row) {
|
|
|
- if (name == 'boxEastName') {
|
|
|
+ if (name == 'purchaseCompanyName') {
|
|
|
if (row) {
|
|
|
- this.form.boxEastId = row.id
|
|
|
+ this.form.purchaseCompanyId = row.id
|
|
|
} else {
|
|
|
- this.form.boxEastId = null
|
|
|
- this.form.boxEastName = null
|
|
|
+ this.form.purchaseCompanyId = null
|
|
|
+ this.form.purchaseCompanyName = null
|
|
|
}
|
|
|
}
|
|
|
if (name == 'polStationCname') {
|
|
|
@@ -1615,6 +1875,30 @@ export default {
|
|
|
this.form.podCname = null
|
|
|
}
|
|
|
}
|
|
|
+ if (name == 'polCname2') {
|
|
|
+ if (row) {
|
|
|
+ this.activationForm.polId = row.id
|
|
|
+ this.activationForm.polCode = row.code
|
|
|
+ this.activationForm.polEname = row.enName
|
|
|
+ } else {
|
|
|
+ this.activationForm.polId = null
|
|
|
+ this.activationForm.polCode = null
|
|
|
+ this.activationForm.polEname = null
|
|
|
+ this.activationForm.polCname = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'podCname2') {
|
|
|
+ if (row) {
|
|
|
+ this.activationForm.podId = row.id
|
|
|
+ this.activationForm.podCode = row.code
|
|
|
+ this.activationForm.podEname = row.enName
|
|
|
+ } else {
|
|
|
+ this.activationForm.podId = null
|
|
|
+ this.activationForm.podCode = null
|
|
|
+ this.activationForm.podEname = null
|
|
|
+ this.activationForm.podCname = null
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
rowDicChange(name, row, el) {
|
|
|
if (name == 'boxEastName') {
|
|
|
@@ -1720,12 +2004,22 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
rowEdit(row) {
|
|
|
+ if (row.$cellEdit == true) {
|
|
|
+ this.$set(row, "$cellEdit", false);
|
|
|
+ } else {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rtAddRow() {
|
|
|
+ this.form.rentTermList.push({
|
|
|
+ $cellEdit: true
|
|
|
+ })
|
|
|
},
|
|
|
feedAddRow() {
|
|
|
if (!this.form.id) {
|
|
|
return this.$message.error("请保存数据");
|
|
|
}
|
|
|
- this.form.feeCenterListD.push({
|
|
|
+ this.feeCenterListD.push({
|
|
|
pid: this.form.id,
|
|
|
feesType: 1,
|
|
|
dc: 'D',
|
|
|
@@ -1739,7 +2033,7 @@ export default {
|
|
|
if (!this.form.id) {
|
|
|
return this.$message.error("请保存数据");
|
|
|
}
|
|
|
- this.form.feeCenterListC.push({
|
|
|
+ this.feeCenterListC.push({
|
|
|
pid: this.form.id,
|
|
|
feesType: 1,
|
|
|
dc: 'C',
|
|
|
@@ -1752,6 +2046,18 @@ export default {
|
|
|
selectionChange(list) {
|
|
|
this.selectionList = list;
|
|
|
},
|
|
|
+ feedChange(list) {
|
|
|
+ let ids = []
|
|
|
+ list.forEach(e => {
|
|
|
+ ids.push(e.id)
|
|
|
+ })
|
|
|
+ if (ids.length) {
|
|
|
+ this.itemCIds = ids.join(',')
|
|
|
+ } else {
|
|
|
+ this.itemCIds = null
|
|
|
+ }
|
|
|
+ this.selectionfeedList = list;
|
|
|
+ },
|
|
|
feecChange(list) {
|
|
|
let ids = []
|
|
|
list.forEach(e => {
|
|
|
@@ -1772,6 +2078,8 @@ export default {
|
|
|
background: 'rgba(255,255,255,0.7)'
|
|
|
});
|
|
|
detail({ id: id }).then(res => {
|
|
|
+ this.feeCenterListD = res.data.data.feeCenterList.filter(item => item.dc == "D")
|
|
|
+ this.feeCenterListC = res.data.data.feeCenterList.filter(item => item.dc == "C")
|
|
|
this.form = res.data.data
|
|
|
// if (res.data.data.status != '录入') {
|
|
|
// this.editButton = true
|
|
|
@@ -1826,7 +2134,7 @@ export default {
|
|
|
return this.$message.error("请添加数据");
|
|
|
}
|
|
|
for (let row of this.form.tradingBoxItemsList) {
|
|
|
- if (!row.boxCode || !row.boxType || !row.boxBelongsTo || !row.boxEastName || !row.boxClass || !row.boxStatus || !row.boxCondition) {
|
|
|
+ if (!row.code || !row.boxType || !row.boxBelongsTo || !row.boxEastName || !row.boxCategory || !row.boxStatus || !row.boxCondition) {
|
|
|
this.$refs.crud.rowCell(row, row.$index)
|
|
|
return this.$message.error("请完善明细信息");
|
|
|
}
|
|
|
@@ -1906,12 +2214,75 @@ export default {
|
|
|
this.activationForm = {}
|
|
|
this.activationDialog = true
|
|
|
}
|
|
|
-
|
|
|
- if (name == '费用一键保存') {
|
|
|
- if (!this.form.feeCenterList.length) {
|
|
|
+ if (name == 'D费用一键保存') {
|
|
|
+ if (!this.feeCenterListD.length) {
|
|
|
+ return this.$message.error("请添加数据");
|
|
|
+ }
|
|
|
+ for (let row of this.feeCenterListD) {
|
|
|
+ if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
|
|
|
+ this.$refs.crud2.rowCell(row, row.$index)
|
|
|
+ return this.$message.error("请完善费用明细");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submitFeeList(this.feeCenterListD).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.feeCenterListD = res.data.data
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == 'D费用一键编辑') {
|
|
|
+ for (let row of this.feeCenterListD) {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'D费用批量删除') {
|
|
|
+ let multiList = []
|
|
|
+ let arr = []
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ multiList = this.selectionfeedList
|
|
|
+ arr = this.feeCenterListD
|
|
|
+ // 获取有id 的数据
|
|
|
+ const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
|
|
|
+ let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
|
|
|
+ // 把选中的删除掉
|
|
|
+ multiList.forEach((item) => {
|
|
|
+ for (let index in arr) {
|
|
|
+ if (JSON.stringify(item) == JSON.stringify(arr[index])) {
|
|
|
+ arr.splice(Number(index), 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (itemsWithId.length != 0) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ tradingBoxFees({ ids: arrIds.join(',') }).then(res => {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == 'C费用一键保存') {
|
|
|
+ if (!this.feeCenterListC.length) {
|
|
|
return this.$message.error("请添加数据");
|
|
|
}
|
|
|
- for (let row of this.form.feeCenterList) {
|
|
|
+ for (let row of this.feeCenterListC) {
|
|
|
if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
|
|
|
this.$refs.crud2.rowCell(row, row.$index)
|
|
|
return this.$message.error("请完善费用明细");
|
|
|
@@ -1923,19 +2294,19 @@ export default {
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(255,255,255,0.7)'
|
|
|
});
|
|
|
- submitFeeList(this.form.feeCenterList).then(res => {
|
|
|
+ submitFeeList(this.form.feeCenterListC).then(res => {
|
|
|
this.$message.success("保存成功");
|
|
|
- this.form.feeCenterList = res.data.data
|
|
|
+ this.form.feeCenterListC = res.data.data
|
|
|
}).finally(() => {
|
|
|
loading.close();
|
|
|
})
|
|
|
}
|
|
|
- if (name == '费用一键编辑') {
|
|
|
- for (let row of this.form.feeCenterList) {
|
|
|
+ if (name == 'C费用一键编辑') {
|
|
|
+ for (let row of this.feeCenterListC) {
|
|
|
this.$set(row, "$cellEdit", true);
|
|
|
}
|
|
|
}
|
|
|
- if (name == '费用批量删除') {
|
|
|
+ if (name == 'C费用批量删除') {
|
|
|
let multiList = []
|
|
|
let arr = []
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
@@ -1944,7 +2315,7 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
multiList = this.selectionfeecList
|
|
|
- arr = this.form.feeCenterList
|
|
|
+ arr = this.feeCenterListC
|
|
|
// 获取有id 的数据
|
|
|
const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
|
|
|
let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
|
|
|
@@ -1977,17 +2348,24 @@ export default {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
for (let row of this.form.tradingBoxItemsList) {
|
|
|
- if (!row.boxCode || !row.boxType || !row.boxBelongsTo || !row.boxEastName || !row.boxClass || !row.boxStatus || !row.boxCondition) {
|
|
|
+ if (!row.code || !row.boxType || !row.boxBelongsTo || !row.boxEastName || !row.boxCategory || !row.boxStatus || !row.boxCondition) {
|
|
|
this.$refs.crud.rowCell(row, row.$index)
|
|
|
return this.$message.error("请完善明细信息");
|
|
|
}
|
|
|
}
|
|
|
- for (let row of this.form.feeCenterList) {
|
|
|
+ for (let row of this.feeCenterListD) {
|
|
|
if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
|
|
|
this.$refs.crud2.rowCell(row, row.$index)
|
|
|
- return this.$message.error("请完善费用明细");
|
|
|
+ return this.$message.error("请完善应收费用明细");
|
|
|
}
|
|
|
}
|
|
|
+ for (let row of this.feeCenterListC) {
|
|
|
+ if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
|
|
|
+ this.$refs.crud3.rowCell(row, row.$index)
|
|
|
+ return this.$message.error("请完善应付费用明细");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.form.feeCenterList = [...this.feeCenterListD, ...this.feeCenterListC]
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: '加载中',
|
|
|
@@ -2097,6 +2475,26 @@ export default {
|
|
|
goBack(type) {
|
|
|
this.$emit("goBack");
|
|
|
},
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ // 监听业务类型 如果不是分单 可以编辑分单号
|
|
|
+ 'form.feeCenterListD': {
|
|
|
+ // 执行方法
|
|
|
+ handler(oldValue, newValue) {
|
|
|
+ this.getSum()
|
|
|
+ },
|
|
|
+ deep: true, // 深度监听
|
|
|
+ immediate: true // 第一次改变就执行
|
|
|
+ },
|
|
|
+ // 监听箱信息数据 箱信息中有温度 自动切换 冻货
|
|
|
+ 'form.feeCenterListC': {
|
|
|
+ // 执行方法
|
|
|
+ handler(oldValue, newValue) {
|
|
|
+ this.getSum()
|
|
|
+ },
|
|
|
+ deep: true, // 深度监听
|
|
|
+ immediate: true // 第一次改变就执行,
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
@@ -2158,6 +2556,11 @@ export default {
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
+.fontSize {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #81B337;
|
|
|
+}
|
|
|
+
|
|
|
.meetSize {
|
|
|
font-size: 16px;
|
|
|
color: #54BCBD;
|