|
|
@@ -1,976 +1,1162 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <avue-crud v-if="feeType == 'D' || feeType == 'All'" :option="optionD" :table-loading="loading"
|
|
|
- :data="form.feeCenterListD" id="out-table" ref="crudD" @selection-change="selectionDChange"
|
|
|
- @resetColumn="resetColumn('crudD', 'optionD', 'optionDBack', 385)"
|
|
|
- @saveColumn="saveColumn('crudD', 'optionD', 'optionDBack', 385)">
|
|
|
- <template slot="menuLeft">
|
|
|
- <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
|
|
|
- <i class="el-icon-coin"></i>
|
|
|
- <span>应收费用</span>
|
|
|
- </div>
|
|
|
- <span style="color: #67C23A;">金额合计:{{ sumDamount }}</span>
|
|
|
- <!-- <el-button type="success" plain size="small" :disabled="disabled"
|
|
|
+ <div>
|
|
|
+ <avue-crud
|
|
|
+ v-if="feeType == 'D' || feeType == 'All'"
|
|
|
+ :option="optionD"
|
|
|
+ :table-loading="loading"
|
|
|
+ :data="form.feeCenterListD"
|
|
|
+ id="out-table"
|
|
|
+ ref="crudD"
|
|
|
+ @selection-change="selectionDChange"
|
|
|
+ @resetColumn="resetColumn('crudD', 'optionD', 'optionDBack', 385)"
|
|
|
+ @saveColumn="saveColumn('crudD', 'optionD', 'optionDBack', 385)"
|
|
|
+ >
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
|
|
|
+ <i class="el-icon-coin"></i>
|
|
|
+ <span>应收费用</span>
|
|
|
+ </div>
|
|
|
+ <span style="color: #67C23A;">金额合计:{{ sumDamount }}</span>
|
|
|
+ <!-- <el-button type="success" plain size="small" :disabled="disabled"
|
|
|
@click="allClick('确认首款', 'D')">确认首款</el-button>
|
|
|
<el-button type="primary" plain size="small" :disabled="disabled"
|
|
|
@click="allClick('确认尾款', 'D')">确认尾款</el-button> -->
|
|
|
- </template>
|
|
|
- <template slot="index" slot-scope="{row,index}">
|
|
|
- <span>{{ index + 1 }}</span>
|
|
|
- </template>
|
|
|
- <template slot="corpCnName" slot-scope="{ row }">
|
|
|
- <dic-select v-if="row.$cellEdit" v-model="row.corpCnName" placeholder="往来单位" key="id" label="cnName"
|
|
|
- res="records" url="/blade-los/bcorps/listByType" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="rowDicChange('corpCnName', $event, row)"></dic-select>
|
|
|
- <span v-else>{{ row.corpCnName }}</span>
|
|
|
- </template>
|
|
|
- <template slot="feeCnName" slot-scope="{ row }">
|
|
|
- <dic-select v-if="row.$cellEdit" v-model="row.feeCnName" placeholder="费用名称" key="id" label="cnName"
|
|
|
- res="records" url="/blade-los/bfees/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="rowDicChange('feeCnName', $event, row)"></dic-select>
|
|
|
- <span v-else>{{ row.feeCnName }}</span>
|
|
|
- </template>
|
|
|
- <template slot="unitNo" slot-scope="{ row }">
|
|
|
- <dic-select v-if="row.$cellEdit" v-model="row.unitNo" placeholder="收费标准" key="id" label="code"
|
|
|
- url="/blade-los/bunits/selectList" :filterable="true"
|
|
|
- @selectChange="rowDicChange('unitNo', $event, row)"></dic-select>
|
|
|
- <span v-else>{{ row.unitNo }}</span>
|
|
|
- </template>
|
|
|
- <tempalte slot="quantity" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.quantity" @change="countChange(row)"
|
|
|
- :controls="false" placeholder="请输入 数量" size="small" style="width: 100%;"></el-input-number>
|
|
|
- <span v-else>{{ row.quantity }}</span>
|
|
|
- </tempalte>
|
|
|
- <tempalte slot="price" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.price" @change="countChange(row)" :controls="false"
|
|
|
- placeholder="请输入 单价" size="small" style="width: 100%;"></el-input-number>
|
|
|
- <span v-else>{{ row.price }}</span>
|
|
|
- </tempalte>
|
|
|
- <template slot="curCode" slot-scope="{ row }">
|
|
|
- <dic-select v-if="row.$cellEdit" v-model="row.curCode" placeholder="币别" key="id" label="code"
|
|
|
- :url="'/blade-los/bcurrency/getExrate?date=' + form.businessDate + '&dc=' + row.dc"
|
|
|
- :filterable="true" @selectChange="rowDicChange('curCode', $event, row)"></dic-select>
|
|
|
- <span v-else>{{ row.curCode }}</span>
|
|
|
- </template>
|
|
|
- <tempalte slot="exrate" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.exrate" @change="countChange(row)" :controls="false"
|
|
|
- placeholder="请输入 汇率" size="small" style="width: 100%;"></el-input-number>
|
|
|
- <span v-else>{{ row.exrate }}</span>
|
|
|
- </tempalte>
|
|
|
- <tempalte slot="stlExrate" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" :controls="false" placeholder="请输入 结算汇率"
|
|
|
- size="small" style="width: 100%;"></el-input-number>
|
|
|
- <span v-else>{{ row.stlExrate }}</span>
|
|
|
- </tempalte>
|
|
|
- <template slot-scope="{type,size,row,index}" slot="menu">
|
|
|
- <el-button v-if="row.feeCnName == '预付款' || row.feeCnName == '手续费'" size="small" type="text"
|
|
|
- :disabled="disabled" @click="tip(row, index)">{{ row.$cellEdit
|
|
|
- ?
|
|
|
- '保 存' : '编 辑' }}</el-button>
|
|
|
- <el-button v-if="row.feeCnName == '预付款'" size="small" type="text" :disabled="disabled"
|
|
|
- @click="rowDel(row, index)">删
|
|
|
- 除</el-button>
|
|
|
- </template>
|
|
|
-
|
|
|
- </avue-crud>
|
|
|
- <avue-crud v-if="feeType == 'C' || feeType == 'All'" style="margin-top: 10px;" :option="optionC"
|
|
|
- :table-loading="loading" :data="form.feeCenterListC" id="out-table" ref="crudC"
|
|
|
- @selection-change="selectionCChange" @resetColumn="resetColumn('crudC', 'optionC', 'optionCBack', 386)"
|
|
|
- @saveColumn="saveColumn('crudC', 'optionC', 'optionCBack', 386)">
|
|
|
- <template slot="menuLeft">
|
|
|
- <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
|
|
|
- <i class="el-icon-coin"></i>
|
|
|
- <span>应付费用</span>
|
|
|
- </div>
|
|
|
- <el-button type="info" plain size="small" :disabled="disabled"
|
|
|
- @click="allClick('一键保存', 'C')">一键保存</el-button>
|
|
|
- <el-button type="info" plain size="small" :disabled="disabled"
|
|
|
- @click="allClick('一键编辑', 'C')">一键编辑</el-button>
|
|
|
- <el-button type="danger" plain size="small" :disabled="disabled || selectionCList.length == 0"
|
|
|
- @click="allClick('批量删除', 'C')">批量删除</el-button>
|
|
|
- <!-- <el-button type="success" plain size="small" :disabled="disabled"
|
|
|
+ </template>
|
|
|
+ <template slot="index" slot-scope="{ row, index }">
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="corpCnName" slot-scope="{ row }">
|
|
|
+ <dic-select
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.corpCnName"
|
|
|
+ placeholder="往来单位"
|
|
|
+ key="id"
|
|
|
+ label="cnName"
|
|
|
+ res="records"
|
|
|
+ url="/blade-los/bcorps/listByType"
|
|
|
+ :filterable="true"
|
|
|
+ :remote="true"
|
|
|
+ dataName="cnName"
|
|
|
+ @selectChange="rowDicChange('corpCnName', $event, row)"
|
|
|
+ ></dic-select>
|
|
|
+ <span v-else>{{ row.corpCnName }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="feeCnName" slot-scope="{ row }">
|
|
|
+ <dic-select
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.feeCnName"
|
|
|
+ placeholder="费用名称"
|
|
|
+ key="id"
|
|
|
+ label="cnName"
|
|
|
+ res="records"
|
|
|
+ url="/blade-los/bfees/list"
|
|
|
+ :filterable="true"
|
|
|
+ :remote="true"
|
|
|
+ dataName="cnName"
|
|
|
+ @selectChange="rowDicChange('feeCnName', $event, row)"
|
|
|
+ ></dic-select>
|
|
|
+ <span v-else>{{ row.feeCnName }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="unitNo" slot-scope="{ row }">
|
|
|
+ <dic-select
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.unitNo"
|
|
|
+ placeholder="收费标准"
|
|
|
+ key="id"
|
|
|
+ label="code"
|
|
|
+ url="/blade-los/bunits/selectList"
|
|
|
+ :filterable="true"
|
|
|
+ @selectChange="rowDicChange('unitNo', $event, row)"
|
|
|
+ ></dic-select>
|
|
|
+ <span v-else>{{ row.unitNo }}</span>
|
|
|
+ </template>
|
|
|
+ <tempalte slot="quantity" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.quantity"
|
|
|
+ @change="countChange(row)"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 数量"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-else>{{ row.quantity }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="price" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.price"
|
|
|
+ @change="countChange(row)"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 单价"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-else>{{ row.price }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <template slot="curCode" slot-scope="{ row }">
|
|
|
+ <dic-select
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.curCode"
|
|
|
+ placeholder="币别"
|
|
|
+ key="id"
|
|
|
+ label="code"
|
|
|
+ :url="'/blade-los/bcurrency/getExrate?date=' + form.businessDate + '&dc=' + row.dc"
|
|
|
+ :filterable="true"
|
|
|
+ @selectChange="rowDicChange('curCode', $event, row)"
|
|
|
+ ></dic-select>
|
|
|
+ <span v-else>{{ row.curCode }}</span>
|
|
|
+ </template>
|
|
|
+ <tempalte slot="exrate" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.exrate"
|
|
|
+ @change="countChange(row)"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 汇率"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-else>{{ row.exrate }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="stlExrate" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.stlExrate"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 结算汇率"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-else>{{ row.stlExrate }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <template slot-scope="{ type, size, row, index }" slot="menu">
|
|
|
+ <el-button size="small" type="text" :disabled="disabled||row.accStatus == 1||row.stlStatus == 1" @click="tip(row, index)">
|
|
|
+ {{ row.$cellEdit ? "保 存" : "编 辑" }}
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="text" :disabled="disabled||row.accStatus == 1||row.stlStatus == 1" @click="rowDel(row, index)">删 除</el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ <avue-crud
|
|
|
+ v-if="feeType == 'C' || feeType == 'All'"
|
|
|
+ style="margin-top: 10px;"
|
|
|
+ :option="optionC"
|
|
|
+ :table-loading="loading"
|
|
|
+ :data="form.feeCenterListC"
|
|
|
+ id="out-table"
|
|
|
+ ref="crudC"
|
|
|
+ @selection-change="selectionCChange"
|
|
|
+ @resetColumn="resetColumn('crudC', 'optionC', 'optionCBack', 386)"
|
|
|
+ @saveColumn="saveColumn('crudC', 'optionC', 'optionCBack', 386)"
|
|
|
+ >
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
|
|
|
+ <i class="el-icon-coin"></i>
|
|
|
+ <span>应付费用</span>
|
|
|
+ </div>
|
|
|
+ <el-button type="info" plain size="small" :disabled="disabled" @click="allClick('一键保存', 'C')">一键保存</el-button>
|
|
|
+ <el-button type="info" plain size="small" :disabled="disabled" @click="allClick('一键编辑', 'C')">一键编辑</el-button>
|
|
|
+ <el-button type="danger" plain size="small" :disabled="disabled || selectionCList.length == 0" @click="allClick('批量删除', 'C')"
|
|
|
+ >批量删除</el-button
|
|
|
+ >
|
|
|
+ <!-- <el-button type="success" plain size="small" :disabled="disabled"
|
|
|
@click="allClick('确认首款', 'C')">确认首款</el-button>
|
|
|
<el-button type="primary" plain size="small" :disabled="disabled"
|
|
|
@click="allClick('确认尾款', 'C')">确认尾款</el-button> -->
|
|
|
- <span style="color: #67C23A;">金额合计:{{ sumCamount }}</span>
|
|
|
- </template>
|
|
|
- <template slot="indexHeader" slot-scope="{row,index}">
|
|
|
- <el-button type="primary" size="mini" icon="el-icon-plus"
|
|
|
- :disabled="disabled || form.firstStatus == '审核通过'" circle @click="addRow('C')">
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <template slot="index" slot-scope="{row,index}">
|
|
|
- <span>{{ index + 1 }}</span>
|
|
|
- </template>
|
|
|
- <template slot="corpCnNameForm" slot-scope="{ row }">
|
|
|
- <dic-select v-if="row.$cellEdit && !row.feeType" v-model="row.corpCnName" placeholder="往来单位" key="id"
|
|
|
- label="cnName" res="records" url="/blade-los/bcorps/listByType" :filterable="true" :remote="true"
|
|
|
- dataName="cnName" @selectChange="rowDicChange('corpCnName', $event, row)"></dic-select>
|
|
|
- <span v-else>{{ row.corpCnName }}</span>
|
|
|
- </template>
|
|
|
- <template slot="cntrNoForm" slot-scope="{ row }">
|
|
|
- <el-input v-if="row.$cellEdit && !row.feeType" v-model="row.cntrNo" placeholder="请输入 箱号"
|
|
|
- size="small"></el-input>
|
|
|
- <span v-else>{{ row.cntrNo }}</span>
|
|
|
- </template>
|
|
|
- <template slot="feeCnNameForm" slot-scope="{ row }">
|
|
|
- <dic-select v-if="row.$cellEdit && !row.feeType" v-model="row.feeCnName" placeholder="费用名称" key="id"
|
|
|
- label="cnName" res="records" url="/blade-los/bfees/list" :filterable="true" :remote="true"
|
|
|
- dataName="cnName" @selectChange="rowDicChange('feeCnName', $event, row)"></dic-select>
|
|
|
- <span v-else>{{ row.feeCnName }}</span>
|
|
|
- </template>
|
|
|
- <template slot="unitNo" slot-scope="{ row }">
|
|
|
- <dic-select v-if="row.$cellEdit && !row.feeType" v-model="row.unitNo" placeholder="收费标准" key="id"
|
|
|
- label="code" url="/blade-los/bunits/selectList" :filterable="true"
|
|
|
- @selectChange="rowDicChange('unitNo', $event, row)"></dic-select>
|
|
|
- <span v-else>{{ row.unitNo }}</span>
|
|
|
- </template>
|
|
|
- <tempalte slot="quantityForm" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit && !row.feeType" v-model="row.quantity" @change="countChange(row)"
|
|
|
- :controls="false" placeholder="请输入 数量" size="small" style="width: 100%;"></el-input-number>
|
|
|
- <span v-else>{{ row.quantity }}</span>
|
|
|
- </tempalte>
|
|
|
- <tempalte slot="priceForm" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit && !row.feeType" v-model="row.price" @change="countChange(row)"
|
|
|
- :controls="false" placeholder="请输入 单价" size="small" style="width: 100%;"></el-input-number>
|
|
|
- <span v-else>{{ row.price }}</span>
|
|
|
- </tempalte>
|
|
|
- <template slot="curCodeForm" slot-scope="{ row }">
|
|
|
- <dic-select v-if="row.$cellEdit && !row.feeType" v-model="row.curCode" placeholder="币别" key="id"
|
|
|
- label="code" :url="'/blade-los/bcurrency/getExrate?date=' + form.businessDate + '&dc=' + row.dc"
|
|
|
- :filterable="true" @selectChange="rowDicChange('curCode', $event, row)"></dic-select>
|
|
|
- <span v-else>{{ row.curCode }}</span>
|
|
|
- </template>
|
|
|
- <tempalte slot="exrate" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit && !row.feeType" v-model="row.exrate" @change="countChange(row)"
|
|
|
- :controls="false" placeholder="请输入 汇率" size="small" style="width: 100%;"></el-input-number>
|
|
|
- <span v-else>{{ row.exrate }}</span>
|
|
|
- </tempalte>
|
|
|
- <tempalte slot="stlExrateForm" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" @change="countChange(row, 'C')"
|
|
|
- :controls="false" placeholder="请输入 结算汇率" size="small" style="width: 100%;"></el-input-number>
|
|
|
- <span v-else>{{ row.stlExrate }}</span>
|
|
|
- </tempalte>
|
|
|
- <tempalte slot="discountExrate" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.discountExrate" @change="countChange(row, 'C')"
|
|
|
- :controls="false" placeholder="请输入 优惠汇率" size="small" style="width: 100%;"></el-input-number>
|
|
|
- <span v-else>{{ row.discountExrate }}</span>
|
|
|
- </tempalte>
|
|
|
- <tempalte slot="discountedHandlingFees" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit&&row.feeCnName == '手续费'" v-model="row.discountedHandlingFees"
|
|
|
- :controls="false" placeholder="请输入 优惠手续费" size="small" style="width: 100%;"></el-input-number>
|
|
|
- <span v-else>{{ row.discountedHandlingFees }}</span>
|
|
|
- </tempalte>
|
|
|
- </avue-crud>
|
|
|
- </div>
|
|
|
+ <span style="color: #67C23A;">金额合计:{{ sumCamount }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="indexHeader" slot-scope="{ row, index }">
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="disabled || form.firstStatus == '审核通过'" circle @click="addRow('C')">
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="index" slot-scope="{ row, index }">
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="corpCnNameForm" slot-scope="{ row }">
|
|
|
+ <dic-select
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.corpCnName"
|
|
|
+ placeholder="往来单位"
|
|
|
+ key="id"
|
|
|
+ label="cnName"
|
|
|
+ res="records"
|
|
|
+ url="/blade-los/bcorps/listByType"
|
|
|
+ :filterable="true"
|
|
|
+ :remote="true"
|
|
|
+ dataName="cnName"
|
|
|
+ @selectChange="rowDicChange('corpCnName', $event, row)"
|
|
|
+ ></dic-select>
|
|
|
+ <span v-else>{{ row.corpCnName }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="cntrNoForm" slot-scope="{ row }">
|
|
|
+ <el-input v-if="row.$cellEdit" v-model="row.cntrNo" placeholder="请输入 箱号" size="small"></el-input>
|
|
|
+ <span v-else>{{ row.cntrNo }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="feeCnNameForm" slot-scope="{ row }">
|
|
|
+ <dic-select
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.feeCnName"
|
|
|
+ placeholder="费用名称"
|
|
|
+ key="id"
|
|
|
+ label="cnName"
|
|
|
+ res="records"
|
|
|
+ url="/blade-los/bfees/list"
|
|
|
+ :filterable="true"
|
|
|
+ :remote="true"
|
|
|
+ dataName="cnName"
|
|
|
+ @selectChange="rowDicChange('feeCnName', $event, row)"
|
|
|
+ ></dic-select>
|
|
|
+ <span v-else>{{ row.feeCnName }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="unitNo" slot-scope="{ row }">
|
|
|
+ <dic-select
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.unitNo"
|
|
|
+ placeholder="收费标准"
|
|
|
+ key="id"
|
|
|
+ label="code"
|
|
|
+ url="/blade-los/bunits/selectList"
|
|
|
+ :filterable="true"
|
|
|
+ @selectChange="rowDicChange('unitNo', $event, row)"
|
|
|
+ ></dic-select>
|
|
|
+ <span v-else>{{ row.unitNo }}</span>
|
|
|
+ </template>
|
|
|
+ <tempalte slot="quantityForm" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.quantity"
|
|
|
+ @change="countChange(row)"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 数量"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-else>{{ row.quantity }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="priceForm" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.price"
|
|
|
+ @change="countChange(row)"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 单价"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-else>{{ row.price }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <template slot="curCodeForm" slot-scope="{ row }">
|
|
|
+ <dic-select
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.curCode"
|
|
|
+ placeholder="币别"
|
|
|
+ key="id"
|
|
|
+ label="code"
|
|
|
+ :url="'/blade-los/bcurrency/getExrate?date=' + form.businessDate + '&dc=' + row.dc"
|
|
|
+ :filterable="true"
|
|
|
+ @selectChange="rowDicChange('curCode', $event, row)"
|
|
|
+ ></dic-select>
|
|
|
+ <span v-else>{{ row.curCode }}</span>
|
|
|
+ </template>
|
|
|
+ <tempalte slot="exrate" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.exrate"
|
|
|
+ @change="countChange(row)"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 汇率"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-else>{{ row.exrate }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="stlExrateForm" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.stlExrate"
|
|
|
+ @change="countChange(row, 'C')"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 结算汇率"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-else>{{ row.stlExrate }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="discountExrate" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.discountExrate"
|
|
|
+ @change="countChange(row, 'C')"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 优惠汇率"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-else>{{ row.discountExrate }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="discountedHandlingFees" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.$cellEdit && row.feeCnName == '手续费'"
|
|
|
+ v-model="row.discountedHandlingFees"
|
|
|
+ :controls="false"
|
|
|
+ placeholder="请输入 优惠手续费"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-else>{{ row.discountedHandlingFees }}</span>
|
|
|
+ </tempalte>
|
|
|
+ </avue-crud>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
|
|
|
-import { submitTradeYfk, removeTradeYfk, submitListTrade, feeRemove, confirmCollectionOfPayments, confirmThePayment, confirmReceived } from "@/api/tradeAgency/exchangePurchasing";
|
|
|
+import {
|
|
|
+ submitTradeYfk,
|
|
|
+ removeTradeYfk,
|
|
|
+ submitListTrade,
|
|
|
+ feeRemove,
|
|
|
+ confirmCollectionOfPayments,
|
|
|
+ confirmThePayment,
|
|
|
+ confirmReceived
|
|
|
+} from "@/api/tradeAgency/exchangePurchasing";
|
|
|
import _ from "lodash";
|
|
|
export default {
|
|
|
- components: {
|
|
|
- dicSelect
|
|
|
+ components: {
|
|
|
+ dicSelect
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ detailData: {},
|
|
|
+ disabled: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
},
|
|
|
- props: {
|
|
|
- detailData: {},
|
|
|
- disabled: {
|
|
|
- type: Boolean,
|
|
|
- default: false,
|
|
|
- },
|
|
|
- feeType: {
|
|
|
- type: String,
|
|
|
- default: 'All'
|
|
|
- },
|
|
|
- form: {
|
|
|
- type: Object,
|
|
|
- default: () => {
|
|
|
- }
|
|
|
+ feeType: {
|
|
|
+ type: String,
|
|
|
+ default: "All"
|
|
|
+ },
|
|
|
+ form: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ optionD: {},
|
|
|
+ optionDBack: {
|
|
|
+ height: "auto",
|
|
|
+ calcHeight: 30,
|
|
|
+ menuWidth: 100,
|
|
|
+ tip: false,
|
|
|
+ border: true,
|
|
|
+ addBtn: false,
|
|
|
+ viewBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ menu: true,
|
|
|
+ refreshBtn: false,
|
|
|
+ selection: true,
|
|
|
+ align: "center",
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "账单",
|
|
|
+ prop: "accStatus",
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: 1
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "收费状态",
|
|
|
+ prop: "stlStatus",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "未确认",
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已确认",
|
|
|
+ value: 1
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "往来单位",
|
|
|
+ prop: "corpCnName",
|
|
|
+ width: "160",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "提单号",
|
|
|
+ prop: "mblno",
|
|
|
+ width: "160",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "箱号",
|
|
|
+ prop: "cntrNo",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "合同号",
|
|
|
+ prop: "billNo",
|
|
|
+ width: "160",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "费用名称",
|
|
|
+ prop: "feeCnName",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "收费标准",
|
|
|
+ prop: "unitNo",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "单价",
|
|
|
+ prop: "price",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "数量",
|
|
|
+ prop: "quantity",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "金额",
|
|
|
+ prop: "amount",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "币别",
|
|
|
+ prop: "curCode",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "外币金额",
|
|
|
+ prop: "amountLoc",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "汇率",
|
|
|
+ prop: "exrate",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "结算汇率",
|
|
|
+ prop: "stlExrate",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "优惠手续费",
|
|
|
+ prop: "discountedHandlingFees",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "结算日期",
|
|
|
+ // prop: "stlDate",
|
|
|
+ width: "120",
|
|
|
+ cell: true,
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd 00:00:00",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
+ cell: true,
|
|
|
+ width: "200",
|
|
|
+ overHidden: true
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ optionC: {},
|
|
|
+ optionCBack: {
|
|
|
+ maxHeight: 400,
|
|
|
+ calcHeight: 30,
|
|
|
+ menuWidth: 140,
|
|
|
+ tip: false,
|
|
|
+ border: true,
|
|
|
+ addBtn: false,
|
|
|
+ viewBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ menu: false,
|
|
|
+ refreshBtn: false,
|
|
|
+ selection: true,
|
|
|
+ align: "center",
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "index",
|
|
|
+ prop: "index",
|
|
|
+ width: "55",
|
|
|
+ headerslot: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "账单",
|
|
|
+ prop: "accStatus",
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: 1
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "付费状态",
|
|
|
+ prop: "stlStatus",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "未确认",
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已确认",
|
|
|
+ value: 1
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "往来单位",
|
|
|
+ prop: "corpCnName",
|
|
|
+ width: "160",
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请选择往来单位",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "提单号",
|
|
|
+ prop: "mblno",
|
|
|
+ width: "160",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "箱号",
|
|
|
+ prop: "cntrNo",
|
|
|
+ width: "100",
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "合同号",
|
|
|
+ prop: "billNo",
|
|
|
+ width: "160",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "费用名称",
|
|
|
+ prop: "feeCnName",
|
|
|
+ width: "120",
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请选择费用名称",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "收费标准",
|
|
|
+ prop: "unitNo",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "单价",
|
|
|
+ prop: "price",
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入单价",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "数量",
|
|
|
+ prop: "quantity",
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入数量",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "金额",
|
|
|
+ prop: "amount",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "币别",
|
|
|
+ prop: "curCode",
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请选择币别",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "外币金额",
|
|
|
+ prop: "amountLoc",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "汇率",
|
|
|
+ prop: "exrate",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "结算汇率",
|
|
|
+ prop: "stlExrate",
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入结算汇率",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "结算日期",
|
|
|
+ prop: "stlDate",
|
|
|
+ width: "120",
|
|
|
+ // cell: true,
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd 00:00:00",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "优惠汇率",
|
|
|
+ prop: "discountExrate",
|
|
|
+ // cell: true,
|
|
|
+ // type: 'number',
|
|
|
+ // controls: false,
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "优惠手续费",
|
|
|
+ prop: "discountedHandlingFees",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "利润",
|
|
|
+ prop: "profit",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
+ cell: true,
|
|
|
+ width: "200",
|
|
|
+ overHidden: true
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ selectionDList: [],
|
|
|
+ selectionCList: [],
|
|
|
+ sumDamount: 0.0,
|
|
|
+ sumCamount: 0.0
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.optionD = await this.getColumnData(this.getColumnName(385), this.optionDBack);
|
|
|
+ this.optionC = await this.getColumnData(this.getColumnName(386), this.optionCBack);
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ tip(row, index) {
|
|
|
+ if (row.feeCnName == "手续费") {
|
|
|
+ this.$prompt("请输入优惠手续费", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ inputValue: row.amount,
|
|
|
+ inputType: "number",
|
|
|
+ closeOnClickModal: false
|
|
|
+ }).then(({ value }) => {
|
|
|
+ row.discountedHandlingFees = value;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (row.$cellEdit) {
|
|
|
+ submitTradeYfk(row).then(res => {
|
|
|
+ row = res.data.data;
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ });
|
|
|
+ this.$set(row, "$cellEdit", false);
|
|
|
+ } else {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
}
|
|
|
+ }
|
|
|
},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- optionD: {},
|
|
|
- optionDBack: {
|
|
|
- height: 'auto',
|
|
|
- calcHeight: 30,
|
|
|
- menuWidth: 100,
|
|
|
- tip: false,
|
|
|
- border: true,
|
|
|
- addBtn: false,
|
|
|
- viewBtn: false,
|
|
|
- editBtn: false,
|
|
|
- delBtn: false,
|
|
|
- menu: true,
|
|
|
- refreshBtn: false,
|
|
|
- selection: true,
|
|
|
- align: 'center',
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: "账单",
|
|
|
- prop: "accStatus",
|
|
|
- width: '80',
|
|
|
- overHidden: true,
|
|
|
- dicData: [{
|
|
|
- label: '否',
|
|
|
- value: 0
|
|
|
- }, {
|
|
|
- label: '是',
|
|
|
- value: 1
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "收费状态",
|
|
|
- prop: "stlStatus",
|
|
|
- width: '120',
|
|
|
- overHidden: true,
|
|
|
- dicData: [{
|
|
|
- label: '未确认',
|
|
|
- value: 0
|
|
|
- }, {
|
|
|
- label: '已确认',
|
|
|
- value: 1
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "往来单位",
|
|
|
- prop: "corpCnName",
|
|
|
- width: '160',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "提单号",
|
|
|
- prop: "mblno",
|
|
|
- width: '160',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "箱号",
|
|
|
- prop: "cntrNo",
|
|
|
- width: '100',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: '合同号',
|
|
|
- prop: "billNo",
|
|
|
- width: '160',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "费用名称",
|
|
|
- prop: "feeCnName",
|
|
|
- width: '120',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "收费标准",
|
|
|
- prop: "unitNo",
|
|
|
- width: '120',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "单价",
|
|
|
- prop: "price",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "数量",
|
|
|
- prop: "quantity",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "金额",
|
|
|
- prop: "amount",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "币别",
|
|
|
- prop: "curCode",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "外币金额",
|
|
|
- prop: "amountLoc",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "汇率",
|
|
|
- prop: "exrate",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "结算汇率",
|
|
|
- prop: "stlExrate",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "优惠手续费",
|
|
|
- prop: "discountedHandlingFees",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "结算日期",
|
|
|
- // prop: "stlDate",
|
|
|
- width: "120",
|
|
|
- cell: true,
|
|
|
- type: "date",
|
|
|
- format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd 00:00:00",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "备注",
|
|
|
- prop: "remarks",
|
|
|
- cell: true,
|
|
|
- width: '200',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- optionC: {},
|
|
|
- optionCBack: {
|
|
|
- maxHeight: 400,
|
|
|
- calcHeight: 30,
|
|
|
- menuWidth: 140,
|
|
|
- tip: false,
|
|
|
- border: true,
|
|
|
- addBtn: false,
|
|
|
- viewBtn: false,
|
|
|
- editBtn: false,
|
|
|
- delBtn: false,
|
|
|
- menu: false,
|
|
|
- refreshBtn: false,
|
|
|
- selection: true,
|
|
|
- align: 'center',
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: "index",
|
|
|
- prop: "index",
|
|
|
- width: "55",
|
|
|
- headerslot: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "账单",
|
|
|
- prop: "accStatus",
|
|
|
- width: '80',
|
|
|
- overHidden: true,
|
|
|
- dicData: [{
|
|
|
- label: '否',
|
|
|
- value: 0
|
|
|
- }, {
|
|
|
- label: '是',
|
|
|
- value: 1
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "付费状态",
|
|
|
- prop: "stlStatus",
|
|
|
- width: '120',
|
|
|
- overHidden: true,
|
|
|
- dicData: [{
|
|
|
- label: '未确认',
|
|
|
- value: 0
|
|
|
- }, {
|
|
|
- label: '已确认',
|
|
|
- value: 1
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "往来单位",
|
|
|
- prop: "corpCnName",
|
|
|
- width: '160',
|
|
|
- cell: true,
|
|
|
- slot: true,
|
|
|
- formslot: true,
|
|
|
- overHidden: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请选择往来单位',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "提单号",
|
|
|
- prop: "mblno",
|
|
|
- width: '160',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "箱号",
|
|
|
- prop: "cntrNo",
|
|
|
- width: '100',
|
|
|
- cell: true,
|
|
|
- slot: true,
|
|
|
- formslot: true,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: '合同号',
|
|
|
- prop: "billNo",
|
|
|
- width: '160',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "费用名称",
|
|
|
- prop: "feeCnName",
|
|
|
- width: '120',
|
|
|
- cell: true,
|
|
|
- slot: true,
|
|
|
- formslot: true,
|
|
|
- overHidden: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请选择费用名称',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "收费标准",
|
|
|
- prop: "unitNo",
|
|
|
- width: '120',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "单价",
|
|
|
- prop: "price",
|
|
|
- cell: true,
|
|
|
- slot: true,
|
|
|
- formslot: true,
|
|
|
- overHidden: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请输入单价',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- label: "数量",
|
|
|
- prop: "quantity",
|
|
|
- cell: true,
|
|
|
- slot: true,
|
|
|
- formslot: true,
|
|
|
- overHidden: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请输入数量',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "金额",
|
|
|
- prop: "amount",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "币别",
|
|
|
- prop: "curCode",
|
|
|
- cell: true,
|
|
|
- slot: true,
|
|
|
- formslot: true,
|
|
|
- overHidden: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请选择币别',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "外币金额",
|
|
|
- prop: "amountLoc",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "汇率",
|
|
|
- prop: "exrate",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "结算汇率",
|
|
|
- prop: "stlExrate",
|
|
|
- cell: true,
|
|
|
- slot: true,
|
|
|
- formslot: true,
|
|
|
- overHidden: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请输入结算汇率',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "结算日期",
|
|
|
- prop: "stlDate",
|
|
|
- width: "120",
|
|
|
- // cell: true,
|
|
|
- type: "date",
|
|
|
- format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd 00:00:00",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "优惠汇率",
|
|
|
- prop: "discountExrate",
|
|
|
- // cell: true,
|
|
|
- // type: 'number',
|
|
|
- // controls: false,
|
|
|
- width: "120",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "优惠手续费",
|
|
|
- prop: "discountedHandlingFees",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "利润",
|
|
|
- prop: "profit",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "备注",
|
|
|
- prop: "remarks",
|
|
|
- cell: true,
|
|
|
- width: '200',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- selectionDList: [],
|
|
|
- selectionCList: [],
|
|
|
- sumDamount: 0.00,
|
|
|
- sumCamount: 0.00
|
|
|
+ rowDel(row, index) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id) {
|
|
|
+ removeTradeYfk({ ids: row.id }).then(res => {
|
|
|
+ this.form.feeCenterListD.splice(index, 1);
|
|
|
+ this.$message.success("成功删除");
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.form.feeCenterListD.splice(index, 1);
|
|
|
}
|
|
|
+ });
|
|
|
},
|
|
|
- async created() {
|
|
|
- this.optionD = await this.getColumnData(this.getColumnName(385), this.optionDBack);
|
|
|
- this.optionC = await this.getColumnData(this.getColumnName(386), this.optionCBack);
|
|
|
+ addRow(type) {
|
|
|
+ if (type == "C") {
|
|
|
+ if (this.form.feeCenterListC.length == 0) {
|
|
|
+ this.form.feeCenterListC.push({
|
|
|
+ $cellEdit: true,
|
|
|
+ pid: this.form.id,
|
|
|
+ dc: type,
|
|
|
+ accStatus: 0,
|
|
|
+ businessType: this.form.businessType,
|
|
|
+ billNo: this.form.businessNo,
|
|
|
+ billDate: this.form.businessDate,
|
|
|
+ discountExrate: 0
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.form.feeCenterListC.push({
|
|
|
+ $cellEdit: true,
|
|
|
+ pid: this.form.id,
|
|
|
+ dc: type,
|
|
|
+ accStatus: 0,
|
|
|
+ businessType: this.form.businessType,
|
|
|
+ billNo: this.form.businessNo,
|
|
|
+ billDate: this.form.businessDate,
|
|
|
+ discountExrate: 0,
|
|
|
+ corpCnName: this.form.feeCenterListC[this.form.feeCenterListC.length - 1].corpCnName,
|
|
|
+ corpId: this.form.feeCenterListC[this.form.feeCenterListC.length - 1].corpId,
|
|
|
+ corpEnName: this.form.feeCenterListC[this.form.feeCenterListC.length - 1].corpEnName,
|
|
|
+ billCorpId: this.form.feeCenterListC[this.form.feeCenterListC.length - 1].billCorpId,
|
|
|
+ billCorpCnName: this.form.feeCenterListC[this.form.feeCenterListC.length - 1].billCorpCnName
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- methods: {
|
|
|
- tip(row, index) {
|
|
|
- if (row.feeCnName == '手续费') {
|
|
|
- this.$prompt('请输入优惠手续费', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- inputValue:row.amount,
|
|
|
- inputType:'number',
|
|
|
- closeOnClickModal:false
|
|
|
- }).then(({ value }) => {
|
|
|
- row.discountedHandlingFees=value
|
|
|
- })
|
|
|
- } else {
|
|
|
- if (row.$cellEdit) {
|
|
|
- submitTradeYfk(row).then(res => {
|
|
|
- row = res.data.data
|
|
|
- this.$message.success("保存成功");
|
|
|
- })
|
|
|
- this.$set(row, '$cellEdit', false)
|
|
|
- } else {
|
|
|
- this.$set(row, '$cellEdit', true)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- rowDel(row, index) {
|
|
|
- this.$confirm("确定将选择数据删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- if (row.id) {
|
|
|
- removeTradeYfk({ ids: row.id }).then(res => {
|
|
|
- this.form.feeCenterListD.splice(index, 1);
|
|
|
- this.$message.success("成功删除");
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.form.feeCenterListD.splice(index, 1);
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
- addRow(type) {
|
|
|
- if (type == 'C') {
|
|
|
- if (this.form.feeCenterListC.length == 0) {
|
|
|
- this.form.feeCenterListC.push({
|
|
|
- $cellEdit: true,
|
|
|
- pid: this.form.id,
|
|
|
- dc: type,
|
|
|
- accStatus: 0,
|
|
|
- businessType: this.form.businessType,
|
|
|
- billNo: this.form.businessNo,
|
|
|
- billDate: this.form.businessDate,
|
|
|
- discountExrate: 0,
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.form.feeCenterListC.push({
|
|
|
- $cellEdit: true,
|
|
|
- pid: this.form.id,
|
|
|
- dc: type,
|
|
|
- accStatus: 0,
|
|
|
- businessType: this.form.businessType,
|
|
|
- billNo: this.form.businessNo,
|
|
|
- billDate: this.form.businessDate,
|
|
|
- discountExrate: 0,
|
|
|
- corpCnName: this.form.feeCenterListC[this.form.feeCenterListC.length - 1].corpCnName,
|
|
|
- corpId: this.form.feeCenterListC[this.form.feeCenterListC.length - 1].corpId,
|
|
|
- corpEnName: this.form.feeCenterListC[this.form.feeCenterListC.length - 1].corpEnName,
|
|
|
- billCorpId: this.form.feeCenterListC[this.form.feeCenterListC.length - 1].billCorpId,
|
|
|
- billCorpCnName: this.form.feeCenterListC[this.form.feeCenterListC.length - 1].billCorpCnName,
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- countChange(row, type) {
|
|
|
- row.amount = _.multiply(Number(row.quantity ? row.quantity : 0), Number(row.price ? row.price : 0))
|
|
|
- if (row.feeCode == 'SFK' || row.feeCode == 'WK') {
|
|
|
- if (type == 'C') {
|
|
|
- row.amount = _.multiply(Number(row.amountLoc ? row.amountLoc : 0), Number(row.stlExrate ? row.stlExrate : 0))
|
|
|
- } else {
|
|
|
- row.amount = _.multiply(Number(row.amountLoc ? row.amountLoc : 0), Number(row.exrate ? row.exrate : 0))
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- if (row.discountExrate > row.stlExrate) {
|
|
|
- row.discountExrate = row.stlExrate
|
|
|
- return this.$message.error("优惠汇率不能超过结算汇率");
|
|
|
- }
|
|
|
- },
|
|
|
- selectionDChange(list) {
|
|
|
- let sum = 0
|
|
|
- list.forEach(e => {
|
|
|
- sum = sum + Number(e.amount)
|
|
|
- })
|
|
|
- this.sumDamount = sum.toFixed(2)
|
|
|
- this.selectionDList = list
|
|
|
- },
|
|
|
- selectionCChange(list) {
|
|
|
- let sum = 0
|
|
|
- list.forEach(e => {
|
|
|
- sum = sum + Number(e.amount)
|
|
|
- })
|
|
|
- this.sumCamount = sum.toFixed(2)
|
|
|
- this.selectionCList = list
|
|
|
- },
|
|
|
- rowDicChange(name, row, el) {
|
|
|
- if (name == 'corpCnName') {
|
|
|
- if (row) {
|
|
|
- el.corpId = row.id
|
|
|
- el.corpEnName = row.enName
|
|
|
- el.billCorpId = row.id
|
|
|
- el.billCorpCnName = row.cnName
|
|
|
- } else {
|
|
|
- el.corpId = null
|
|
|
- el.corpEnName = null
|
|
|
- el.billCorpId = null
|
|
|
- el.billCorpCnName = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'feeCnName') {
|
|
|
- if (row) {
|
|
|
- el.feeId = row.id
|
|
|
- el.feeCode = row.code
|
|
|
- el.feeEnName = row.enName
|
|
|
- el.curCode = row.curNo
|
|
|
- el.elementsId = row.accElementId
|
|
|
- el.elementsCode = row.elementsCode
|
|
|
- el.elementsCnName = row.accElementName
|
|
|
- el.elementsEnName = row.elementsEnName
|
|
|
- bcurrencyGetExrate({ date: this.form.businessDate, dc: el.dc }).then(res => {
|
|
|
- res.data.data.forEach(e => {
|
|
|
- if (row.curNo == e.code) {
|
|
|
- this.$set(el, 'exrate', e.exrate)
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- } else {
|
|
|
- el.feeId = null
|
|
|
- el.feeCode = null
|
|
|
- el.feeEnName = null
|
|
|
- el.curCode = null
|
|
|
- el.elementsId = null
|
|
|
- el.elementsCode = null
|
|
|
- el.elementsCnName = null
|
|
|
- el.elementsEnName = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'curCode') {
|
|
|
- if (row) {
|
|
|
- bcurrencyGetExrate({ date: this.form.businessDate, dc: el.dc }).then(res => {
|
|
|
- res.data.data.forEach(e => {
|
|
|
- if (el.curCode == e.code) {
|
|
|
- this.$set(el, 'exrate', e.exrate)
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- } else {
|
|
|
- el.exrate = null
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- allClick(name, type) {
|
|
|
- if (name == '一键保存') {
|
|
|
- if (type == 'C') {
|
|
|
- for (let row of this.form.feeCenterListC) {
|
|
|
- if (!row.corpCnName || !row.feeCnName || !row.price || !row.quantity || !row.curCode || !Number(row.stlExrate)) {
|
|
|
- this.$refs.crudC.rowCell(row, row.$index)
|
|
|
- return this.$message.error((!row.corpCnName ? "往来单位," : '') + (!row.feeCnName ? "费用名称," : '') + (!row.price ? "单价," : '') + (!row.quantity ? "数量," : '') + (!row.curCode ? "币别," : '') + (!row.stlExrate ? "结算汇率," : '') + "不能为空");
|
|
|
- }
|
|
|
- }
|
|
|
- for (let index in this.form.feeCenterListC) {
|
|
|
- if (this.form.feeCenterListC[index].feeCnName == '首款' || this.form.feeCenterListC[index].feeCnName == '尾款' || this.form.feeCenterListC[index].feeCnName == '手续费') {
|
|
|
- if (!this.form.feeCenterListC[index].discountExrate) return this.$message.error("第" + (Number(index) + 1) + "行" + this.form.feeCenterListC[index].feeCnName + "费用优惠汇率不能为空");
|
|
|
- }
|
|
|
- }
|
|
|
- this.form.feeCenterListC.forEach(e => {
|
|
|
- this.$set(e, '$cellEdit', false)
|
|
|
- })
|
|
|
- // const loading = this.$loading({
|
|
|
- // lock: true,
|
|
|
- // text: '加载中',
|
|
|
- // spinner: 'el-icon-loading',
|
|
|
- // background: 'rgba(255,255,255,0.7)'
|
|
|
- // });
|
|
|
- // submitListTrade(this.form.feeCenterListC).then(res => {
|
|
|
- // this.form.feeCenterListC = res.data.data
|
|
|
- // this.$message.success("保存成功");
|
|
|
- // }).finally(() => {
|
|
|
- // loading.close();
|
|
|
- // })
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == '一键编辑') {
|
|
|
- if (type == 'C') {
|
|
|
- this.form.feeCenterListC.forEach(e => {
|
|
|
- if (e.accStatus == 0) {
|
|
|
- this.$set(e, '$cellEdit', true)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == '批量删除') {
|
|
|
- let multiList = []
|
|
|
- let arr = []
|
|
|
- for (let index in this.selectionCList) {
|
|
|
- if (this.selectionCList[index].feeType == 1 || this.selectionCList[index].feeType == 2) return this.$message.error("第" + (Number(this.selectionCList[index].$index) + 1) + "行不允许删除");
|
|
|
- if (this.selectionCList[index].accStatus == 1) return this.$message.error("第" + (Number(this.selectionCList[index].$index) + 1) + "行不允许删除");
|
|
|
- }
|
|
|
- if (type == 'C') {
|
|
|
- this.$confirm("确定将选择数据删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- multiList = this.selectionCList
|
|
|
- arr = this.form.feeCenterListC
|
|
|
- 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) {
|
|
|
- console.log(arrIds)
|
|
|
- feeRemove({ ids: arrIds.join(',') }).then(res => {
|
|
|
- this.$message.success("删除成功");
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ countChange(row, type) {
|
|
|
+ row.amount = _.multiply(Number(row.quantity ? row.quantity : 0), Number(row.price ? row.price : 0));
|
|
|
+ if (row.feeCode == "SFK" || row.feeCode == "WK") {
|
|
|
+ if (type == "C") {
|
|
|
+ row.amount = _.multiply(Number(row.amountLoc ? row.amountLoc : 0), Number(row.stlExrate ? row.stlExrate : 0));
|
|
|
+ } else {
|
|
|
+ row.amount = _.multiply(Number(row.amountLoc ? row.amountLoc : 0), Number(row.exrate ? row.exrate : 0));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (row.discountExrate > row.stlExrate) {
|
|
|
+ row.discountExrate = row.stlExrate;
|
|
|
+ return this.$message.error("优惠汇率不能超过结算汇率");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectionDChange(list) {
|
|
|
+ let sum = 0;
|
|
|
+ list.forEach(e => {
|
|
|
+ sum = sum + Number(e.amount);
|
|
|
+ });
|
|
|
+ this.sumDamount = sum.toFixed(2);
|
|
|
+ this.selectionDList = list;
|
|
|
+ },
|
|
|
+ selectionCChange(list) {
|
|
|
+ let sum = 0;
|
|
|
+ list.forEach(e => {
|
|
|
+ sum = sum + Number(e.amount);
|
|
|
+ });
|
|
|
+ this.sumCamount = sum.toFixed(2);
|
|
|
+ this.selectionCList = list;
|
|
|
+ },
|
|
|
+ rowDicChange(name, row, el) {
|
|
|
+ if (name == "corpCnName") {
|
|
|
+ if (row) {
|
|
|
+ el.corpId = row.id;
|
|
|
+ el.corpEnName = row.enName;
|
|
|
+ el.billCorpId = row.id;
|
|
|
+ el.billCorpCnName = row.cnName;
|
|
|
+ } else {
|
|
|
+ el.corpId = null;
|
|
|
+ el.corpEnName = null;
|
|
|
+ el.billCorpId = null;
|
|
|
+ el.billCorpCnName = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == "feeCnName") {
|
|
|
+ if (row) {
|
|
|
+ el.feeId = row.id;
|
|
|
+ el.feeCode = row.code;
|
|
|
+ el.feeEnName = row.enName;
|
|
|
+ el.curCode = row.curNo;
|
|
|
+ el.elementsId = row.accElementId;
|
|
|
+ el.elementsCode = row.elementsCode;
|
|
|
+ el.elementsCnName = row.accElementName;
|
|
|
+ el.elementsEnName = row.elementsEnName;
|
|
|
+ bcurrencyGetExrate({ date: this.form.businessDate, dc: el.dc }).then(res => {
|
|
|
+ res.data.data.forEach(e => {
|
|
|
+ if (row.curNo == e.code) {
|
|
|
+ this.$set(el, "exrate", e.exrate);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ el.feeId = null;
|
|
|
+ el.feeCode = null;
|
|
|
+ el.feeEnName = null;
|
|
|
+ el.curCode = null;
|
|
|
+ el.elementsId = null;
|
|
|
+ el.elementsCode = null;
|
|
|
+ el.elementsCnName = null;
|
|
|
+ el.elementsEnName = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == "curCode") {
|
|
|
+ if (row) {
|
|
|
+ bcurrencyGetExrate({ date: this.form.businessDate, dc: el.dc }).then(res => {
|
|
|
+ res.data.data.forEach(e => {
|
|
|
+ if (el.curCode == e.code) {
|
|
|
+ this.$set(el, "exrate", e.exrate);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ el.exrate = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ allClick(name, type) {
|
|
|
+ if (name == "一键保存") {
|
|
|
+ if (type == "C") {
|
|
|
+ for (let row of this.form.feeCenterListC) {
|
|
|
+ if (!row.corpCnName || !row.feeCnName || !row.price || !row.quantity || !row.curCode || !Number(row.stlExrate)) {
|
|
|
+ this.$refs.crudC.rowCell(row, row.$index);
|
|
|
+ return this.$message.error(
|
|
|
+ (!row.corpCnName ? "往来单位," : "") +
|
|
|
+ (!row.feeCnName ? "费用名称," : "") +
|
|
|
+ (!row.price ? "单价," : "") +
|
|
|
+ (!row.quantity ? "数量," : "") +
|
|
|
+ (!row.curCode ? "币别," : "") +
|
|
|
+ (!row.stlExrate ? "结算汇率," : "") +
|
|
|
+ "不能为空"
|
|
|
+ );
|
|
|
}
|
|
|
- if (name == '确认首款') {
|
|
|
- let obj = {}
|
|
|
- obj = {
|
|
|
- ...this.form,
|
|
|
- paidApplication: 'SK'
|
|
|
- }
|
|
|
- if (type == 'D') {
|
|
|
- this.$confirm("是否确认首款?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- confirmCollectionOfPayments(obj).then(res => {
|
|
|
- this.$emit('getDetails', this.form.id)
|
|
|
- this.$message.success("确认成功");
|
|
|
- }).finally(() => {
|
|
|
- loading.close();
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- if (type == 'C') {
|
|
|
- confirmReceived(obj).then(res => {
|
|
|
- this.$confirm(res.data.data, {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- confirmThePayment(obj).then(res => {
|
|
|
- this.$emit('getDetails', this.form.id)
|
|
|
- this.$message.success("确认成功");
|
|
|
- }).finally(() => {
|
|
|
- loading.close();
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ for (let index in this.form.feeCenterListC) {
|
|
|
+ if (
|
|
|
+ this.form.feeCenterListC[index].feeCnName == "首款" ||
|
|
|
+ this.form.feeCenterListC[index].feeCnName == "尾款" ||
|
|
|
+ this.form.feeCenterListC[index].feeCnName == "手续费"
|
|
|
+ ) {
|
|
|
+ if (!this.form.feeCenterListC[index].discountExrate)
|
|
|
+ return this.$message.error("第" + (Number(index) + 1) + "行" + this.form.feeCenterListC[index].feeCnName + "费用优惠汇率不能为空");
|
|
|
}
|
|
|
- if (name == '确认尾款') {
|
|
|
- let obj = {}
|
|
|
- obj = {
|
|
|
- ...this.form,
|
|
|
- paidApplication: 'WK'
|
|
|
- }
|
|
|
- if (type == 'D') {
|
|
|
- this.$confirm("是否确认尾款?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- confirmCollectionOfPayments(obj).then(res => {
|
|
|
- this.$emit('getDetails', this.form.id)
|
|
|
- this.$message.success("确认成功");
|
|
|
- }).finally(() => {
|
|
|
- loading.close();
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
- if (type == 'C') {
|
|
|
- confirmReceived(obj).then(res => {
|
|
|
- this.$confirm(res.data.data, {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- confirmThePayment(obj).then(res => {
|
|
|
- this.$emit('getDetails', this.form.id)
|
|
|
- this.$message.success("确认成功");
|
|
|
- }).finally(() => {
|
|
|
- loading.close();
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
+ }
|
|
|
+ this.form.feeCenterListC.forEach(e => {
|
|
|
+ this.$set(e, "$cellEdit", false);
|
|
|
+ });
|
|
|
+ // const loading = this.$loading({
|
|
|
+ // lock: true,
|
|
|
+ // text: '加载中',
|
|
|
+ // spinner: 'el-icon-loading',
|
|
|
+ // background: 'rgba(255,255,255,0.7)'
|
|
|
+ // });
|
|
|
+ // submitListTrade(this.form.feeCenterListC).then(res => {
|
|
|
+ // this.form.feeCenterListC = res.data.data
|
|
|
+ // this.$message.success("保存成功");
|
|
|
+ // }).finally(() => {
|
|
|
+ // loading.close();
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == "一键编辑") {
|
|
|
+ if (type == "C") {
|
|
|
+ this.form.feeCenterListC.forEach(e => {
|
|
|
+ if (e.accStatus == 0&&e.stlStatus==0) {
|
|
|
+ this.$set(e, "$cellEdit", true);
|
|
|
}
|
|
|
- },
|
|
|
- submitValidate() {
|
|
|
- if (this.form.feeCenterListC.length) {
|
|
|
- for (let row of this.form.feeCenterListC) {
|
|
|
- if (!row.corpCnName || !row.feeCnName || !row.price || !row.quantity || !row.curCode || !Number(row.stlExrate)) {
|
|
|
- this.$refs.crudC.rowCell(row, row.$index)
|
|
|
- this.$message.error((!row.corpCnName ? "往来单位," : '') + (!row.feeCnName ? "费用名称," : '') + (!row.price ? "单价," : '') + (!row.quantity ? "数量," : '') + (!row.curCode ? "币别," : '') + (!row.stlExrate ? "结算汇率," : '') + "不能为空");
|
|
|
- return false
|
|
|
- }
|
|
|
- if (row.feeCnName == '首款' || row.feeCnName == '尾款' || row.feeCnName == '手续费') {
|
|
|
- if (Number(row.discountExrate) == 0) {
|
|
|
- row.discountExrate = this.form.exchangeRate
|
|
|
- }
|
|
|
- }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == "批量删除") {
|
|
|
+ let multiList = [];
|
|
|
+ let arr = [];
|
|
|
+ for (let index in this.selectionCList) {
|
|
|
+ if (this.selectionCList[index].feeType == 1 || this.selectionCList[index].feeType == 2)
|
|
|
+ return this.$message.error("第" + (Number(this.selectionCList[index].$index) + 1) + "行不允许删除");
|
|
|
+ if (this.selectionCList[index].accStatus == 1||this.selectionCList[index].stlStatus == 1)
|
|
|
+ return this.$message.error("第" + (Number(this.selectionCList[index].$index) + 1) + "行不允许删除");
|
|
|
+ }
|
|
|
+ if (type == "C") {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ multiList = this.selectionCList;
|
|
|
+ arr = this.form.feeCenterListC;
|
|
|
+ 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) {
|
|
|
+ console.log(arrIds);
|
|
|
+ feeRemove({ ids: arrIds.join(",") }).then(res => {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ });
|
|
|
}
|
|
|
- return true
|
|
|
- },
|
|
|
- //自定义列保存
|
|
|
- async saveColumn(ref, option, optionBack, code) {
|
|
|
- /**
|
|
|
- * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
- * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
- * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
- */
|
|
|
- const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
- if (inSave) {
|
|
|
- this.$message.success("保存成功");
|
|
|
- //关闭窗口
|
|
|
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
- }
|
|
|
- },
|
|
|
- //自定义列重置
|
|
|
- async resetColumn(ref, option, optionBack, code) {
|
|
|
- this[option] = this[optionBack];
|
|
|
- const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
- if (inSave) {
|
|
|
- this.$message.success("重置成功");
|
|
|
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == "确认首款") {
|
|
|
+ let obj = {};
|
|
|
+ obj = {
|
|
|
+ ...this.form,
|
|
|
+ paidApplication: "SK"
|
|
|
+ };
|
|
|
+ if (type == "D") {
|
|
|
+ this.$confirm("是否确认首款?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
+ });
|
|
|
+ confirmCollectionOfPayments(obj)
|
|
|
+ .then(res => {
|
|
|
+ this.$emit("getDetails", this.form.id);
|
|
|
+ this.$message.success("确认成功");
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (type == "C") {
|
|
|
+ confirmReceived(obj).then(res => {
|
|
|
+ this.$confirm(res.data.data, {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
+ });
|
|
|
+ confirmThePayment(obj)
|
|
|
+ .then(res => {
|
|
|
+ this.$emit("getDetails", this.form.id);
|
|
|
+ this.$message.success("确认成功");
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == "确认尾款") {
|
|
|
+ let obj = {};
|
|
|
+ obj = {
|
|
|
+ ...this.form,
|
|
|
+ paidApplication: "WK"
|
|
|
+ };
|
|
|
+ if (type == "D") {
|
|
|
+ this.$confirm("是否确认尾款?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
+ });
|
|
|
+ confirmCollectionOfPayments(obj)
|
|
|
+ .then(res => {
|
|
|
+ this.$emit("getDetails", this.form.id);
|
|
|
+ this.$message.success("确认成功");
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (type == "C") {
|
|
|
+ confirmReceived(obj).then(res => {
|
|
|
+ this.$confirm(res.data.data, {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
+ });
|
|
|
+ confirmThePayment(obj)
|
|
|
+ .then(res => {
|
|
|
+ this.$emit("getDetails", this.form.id);
|
|
|
+ this.$message.success("确认成功");
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ submitValidate() {
|
|
|
+ if (this.form.feeCenterListC.length) {
|
|
|
+ for (let row of this.form.feeCenterListC) {
|
|
|
+ if (!row.corpCnName || !row.feeCnName || !row.price || !row.quantity || !row.curCode || !Number(row.stlExrate)) {
|
|
|
+ this.$refs.crudC.rowCell(row, row.$index);
|
|
|
+ this.$message.error(
|
|
|
+ (!row.corpCnName ? "往来单位," : "") +
|
|
|
+ (!row.feeCnName ? "费用名称," : "") +
|
|
|
+ (!row.price ? "单价," : "") +
|
|
|
+ (!row.quantity ? "数量," : "") +
|
|
|
+ (!row.curCode ? "币别," : "") +
|
|
|
+ (!row.stlExrate ? "结算汇率," : "") +
|
|
|
+ "不能为空"
|
|
|
+ );
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (row.feeCnName == "首款" || row.feeCnName == "尾款" || row.feeCnName == "手续费") {
|
|
|
+ if (Number(row.discountExrate) == 0) {
|
|
|
+ row.discountExrate = this.form.exchangeRate;
|
|
|
}
|
|
|
- },
|
|
|
-
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
},
|
|
|
-}
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumn(ref, option, optionBack, code) {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumn(ref, option, optionBack, code) {
|
|
|
+ this[option] = this[optionBack];
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
.disabledBox {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
|
|
|
.fontSize {
|
|
|
- font-size: 16px;
|
|
|
- color: #81B337;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #81b337;
|
|
|
}
|
|
|
|
|
|
.meetSize {
|
|
|
- font-size: 16px;
|
|
|
- color: #54BCBD;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #54bcbd;
|
|
|
}
|
|
|
|
|
|
::v-deep#out-table .back-one {
|
|
|
- background: #ecf5ff !important;
|
|
|
- text-align: center;
|
|
|
- padding: 4px 0;
|
|
|
+ background: #ecf5ff !important;
|
|
|
+ text-align: center;
|
|
|
+ padding: 4px 0;
|
|
|
}
|
|
|
|
|
|
::v-deep#out-table .back-two {
|
|
|
- background: #ecf5ff !important;
|
|
|
- text-align: center;
|
|
|
- padding: 4px 0;
|
|
|
+ background: #ecf5ff !important;
|
|
|
+ text-align: center;
|
|
|
+ padding: 4px 0;
|
|
|
}
|
|
|
|
|
|
::v-deep .el-table--small td,
|
|
|
.el-table--small th {
|
|
|
- padding: 2px !important;
|
|
|
+ padding: 2px !important;
|
|
|
}
|
|
|
</style>
|