|
|
@@ -24,7 +24,7 @@
|
|
|
:disabled="isSaveBtn || form.issueStatus == 1 || form.status == 3" @click="submit">保 存
|
|
|
</el-button>
|
|
|
<el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
- :disabled="form.issueStatus == 1" @click="allClick('生成订单')">生成订单
|
|
|
+ :disabled="form.issueStatus == 1||form.status == 1" @click="allClick('生成订单')">生成订单
|
|
|
</el-button>
|
|
|
<el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
:disabled="form.status != 0 || form.issueStatus == 1" @click="application">运费申请
|
|
|
@@ -128,7 +128,8 @@
|
|
|
<el-col span="12">
|
|
|
<el-form-item label="ETD" prop="etd" :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
|
|
|
<el-date-picker v-model="form.etd" type="date" placeholder="请选择 ETD" :disabled="editDisabled"
|
|
|
- size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
|
|
|
+ size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;"
|
|
|
+ @selectChange="dicChange('ETD', $event)">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -247,11 +248,11 @@
|
|
|
@click="allClick('一键编辑')">一键编辑</el-button>
|
|
|
<el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
|
|
|
@click="allClick('批量删除')">批量删除</el-button>
|
|
|
- <el-button type="success" plain size="small" :disabled="editDisabled|| !form.id"
|
|
|
+ <el-button type="success" plain size="small" :disabled="editDisabled || form.preContainersList.length==0"
|
|
|
@click="allClick('提取价格')">提取价格</el-button>
|
|
|
</template>
|
|
|
<template slot="indexHeader" slot-scope="{row,index}">
|
|
|
- <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled|| !form.id" circle
|
|
|
@click="addRow()">
|
|
|
</el-button>
|
|
|
</template>
|
|
|
@@ -272,11 +273,11 @@
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="费用信息">
|
|
|
+ <el-tab-pane label="费用信息" v-if="false">
|
|
|
<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="crud2"
|
|
|
+ <avue-crud :option="feecOption" :data="form.feeCenterListC" id="out-table" ref="crud2"
|
|
|
:header-cell-class-name="headerClassName" :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }"
|
|
|
@selection-change="feecChange" @row-update="rowUpdate"
|
|
|
@resetColumn="resetColumn('crud2', 'feecOption', 'feecOptionBack', 235.2)"
|
|
|
@@ -286,38 +287,37 @@
|
|
|
<i class="el-icon-coin"></i>
|
|
|
<span>应付费用</span>
|
|
|
</div>
|
|
|
- <el-button type="info" plain size="small" :disabled="false" @click="allClick('费用一键保存')">一键保存</el-button>
|
|
|
- <el-button type="info" plain size="small" :disabled="false" @click="allClick('费用一键编辑')">一键编辑</el-button>
|
|
|
+ <el-button type="info" plain size="small" :disabled="editDisabled || !form.id" @click="allClick('费用一键保存')">一键保存</el-button>
|
|
|
+ <el-button type="info" plain size="small" :disabled="editDisabled || !form.id" @click="allClick('费用一键编辑')">一键编辑</el-button>
|
|
|
<el-button type="danger" plain size="small" :disabled="selectionfeecList.length == 0"
|
|
|
@click="allClick('费用批量删除')">批量删除</el-button>
|
|
|
- <el-button type="primary" plain size="small" :disabled="selectionfeecList.length == 0"
|
|
|
- @click="allClick('费用申请')">请核费用</el-button>
|
|
|
+ <!-- <el-button type="primary" plain size="small" :disabled="selectionfeecList.length == 0"
|
|
|
+ @click="allClick('费用申请')">请核费用</el-button> -->
|
|
|
<!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
|
|
|
</template>
|
|
|
<template slot="indexHeader" slot-scope="{row,index}">
|
|
|
- <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="false" circle
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled || !form.id" circle
|
|
|
@click="feecAddRow()">
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot="index" slot-scope="{row,index}">
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
</template>
|
|
|
- <template slot="billTypeForm" slot-scope="{row,index}">
|
|
|
- <dic-select v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.billType" key="id"
|
|
|
- label="cnName" res="records" url="/blade-los/bcorpstypedefine/list?status=0¤t=1&size=20"
|
|
|
- :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="rowDicChange('billType', $event, row, index)"></dic-select>
|
|
|
- <span v-else>{{ row.billType }}</span>
|
|
|
+ <template slot="corpTypeForm" slot-scope="{row,index}">
|
|
|
+ <dic-select v-if="row.$cellEdit" v-model="row.corpType" key="id" label="cnName" res="records"
|
|
|
+ url="/blade-los/bcorpstypedefine/list?status=0¤t=1&size=20" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="rowDicChange('corpType', $event, row, index)"></dic-select>
|
|
|
+ <span v-else>{{ row.corpType }}</span>
|
|
|
</template>
|
|
|
<template slot="cntrNoForm" slot-scope="{row,index}">
|
|
|
- <dic-select v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.cntrNo" key="id"
|
|
|
- label="code" :mockData="form.tradingBoxItemsList" :filterable="true"></dic-select>
|
|
|
+ <dic-select v-if="row.$cellEdit" v-model="row.cntrNo" key="id" label="code"
|
|
|
+ :mockData="form.tradingBoxItemsList" :filterable="true"></dic-select>
|
|
|
<span v-else>{{ row.cntrNo }}</span>
|
|
|
</template>
|
|
|
<template slot="corpCnNameForm" slot-scope="{ row,index }">
|
|
|
- <dic-select v-if="row.$cellEdit && !(row.automaticGenerated == 1)" :key="updateSearchKey"
|
|
|
- v-model="row.corpCnName" placeholder="付费对象" label="shortName" res="records"
|
|
|
- :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + row.billType"
|
|
|
+ <dic-select v-if="row.$cellEdit" :key="row.corpType" v-model="row.corpCnName" placeholder="付费对象"
|
|
|
+ label="shortName" res="records"
|
|
|
+ :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + row.corpType"
|
|
|
:filterable="true" :remote="true" dataName="shortName"
|
|
|
@selectChange="rowDicChange('corpCnName', $event, row)" :slotRight="true"
|
|
|
rightLabel="code"></dic-select>
|
|
|
@@ -329,10 +329,9 @@
|
|
|
<span v-else>{{ row.corpCnName }}</span> -->
|
|
|
</template>
|
|
|
<template slot="feeCnNameForm" slot-scope="{ row }">
|
|
|
- <dic-select v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.feeCnName" key="id"
|
|
|
- placeholder="费用名称" label="cnName" res="records" url="/blade-los/bfees/list?status=0¤t=1&size=20"
|
|
|
- :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="rowDicChange('feeCnName', $event, row)"></dic-select>
|
|
|
+ <dic-select v-if="row.$cellEdit" v-model="row.feeCnName" key="id" placeholder="费用名称" label="cnName"
|
|
|
+ res="records" url="/blade-los/bfees/list?status=0¤t=1&size=20" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="rowDicChange('feeCnName', $event, row)"></dic-select>
|
|
|
<span v-else>{{ row.feeCnName }}</span>
|
|
|
</template>
|
|
|
<template slot="curCodeForm" slot-scope="{ row }">
|
|
|
@@ -342,30 +341,28 @@
|
|
|
<span v-else>{{ row.curCode }}</span>
|
|
|
</template>
|
|
|
<template slot="exrateForm" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.exrate"
|
|
|
- :controls="false" placeholder="请输入 汇率" size="small" style="width: 100%;"></el-input-number>
|
|
|
+ <el-input-number v-if="row.$cellEdit" v-model="row.exrate" :controls="false" placeholder="请输入 汇率"
|
|
|
+ size="small" style="width: 100%;"></el-input-number>
|
|
|
<span v-else>{{ row.exrate }}</span>
|
|
|
</template>
|
|
|
<template slot="unitNoForm" slot-scope="{row,index}">
|
|
|
- <dic-select v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.unitNo" label="cnName"
|
|
|
+ <dic-select v-if="row.$cellEdit" v-model="row.unitNo" label="cnName"
|
|
|
url="/blade-los/bunits/listAll?status=0" :filterable="true"></dic-select>
|
|
|
<span v-else>{{ row.unitNo }}</span>
|
|
|
</template>
|
|
|
<template slot="priceForm" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.price"
|
|
|
- :controls="false" placeholder="请输入 成本价" size="small" style="width: 100%;" :precision="2"
|
|
|
- @change="countChange(row)"></el-input-number>
|
|
|
+ <el-input-number v-if="row.$cellEdit" v-model="row.price" :controls="false" placeholder="请输入 成本价"
|
|
|
+ size="small" style="width: 100%;" :precision="2" @change="countChange(row)"></el-input-number>
|
|
|
<span v-else>{{ row.price }}</span>
|
|
|
</template>
|
|
|
<template slot="quantityForm" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.quantity"
|
|
|
- :controls="false" placeholder="请输入 成本价" size="small" style="width: 100%;" :precision="0"
|
|
|
- @change="countChange(row)"></el-input-number>
|
|
|
+ <el-input-number v-if="row.$cellEdit" v-model="row.quantity" :controls="false" placeholder="请输入 成本价"
|
|
|
+ size="small" style="width: 100%;" :precision="0" @change="countChange(row)"></el-input-number>
|
|
|
<span v-else>{{ row.quantity }}</span>
|
|
|
</template>
|
|
|
<template slot="remarks" slot-scope="{ row }">
|
|
|
- <el-input v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.remarks"
|
|
|
- placeholder="请输入 备注" size="small" style="width: 100%;"></el-input>
|
|
|
+ <el-input v-if="row.$cellEdit" v-model="row.remarks" placeholder="请输入 备注" size="small"
|
|
|
+ style="width: 100%;"></el-input>
|
|
|
<span v-else>{{ row.remarks }}</span>
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
@@ -392,7 +389,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { submit, getDetail, submitBookingCabin, sendMessageBooking, copyAgent, pleaseCheck, repealCancel, submitItemList, itemRemove } from "@/api/iosBasicData/businessCenter/bookingCabin.js";
|
|
|
+import { submit, getDetail, submitBookingCabin, sendMessageBooking, copyAgent, pleaseCheck, repealCancel, submitItemList, itemRemove, submitFeeList, itemFeeRemove } from "@/api/iosBasicData/businessCenter/bookingCabin.js";
|
|
|
import { losbfeestemplateGetListTemplate } from "@/api/iosBasicData/bills";
|
|
|
import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
@@ -487,7 +484,7 @@ export default {
|
|
|
mpaymode: 'PP',
|
|
|
detail: {},
|
|
|
preContainersList: [],
|
|
|
- feeCenterList: [],
|
|
|
+ feeCenterListC: [],
|
|
|
filesList: [],
|
|
|
},
|
|
|
polFeeList: [],
|
|
|
@@ -706,43 +703,43 @@ export default {
|
|
|
fixed: true,
|
|
|
headerslot: true,
|
|
|
},
|
|
|
- {
|
|
|
- label: '账单状态',
|
|
|
- prop: 'accStatus',
|
|
|
- overHidden: true,
|
|
|
- width: 80,
|
|
|
- type: 'select',
|
|
|
- dicData: [{
|
|
|
- label: '未生成',
|
|
|
- value: 0,
|
|
|
- }, {
|
|
|
- label: '已生成',
|
|
|
- value: 1,
|
|
|
- }],
|
|
|
- },
|
|
|
- {
|
|
|
- label: '审核状态',
|
|
|
- prop: 'auditStatus',
|
|
|
- overHidden: true,
|
|
|
- width: 80,
|
|
|
- type: 'select',
|
|
|
- dicData: [{
|
|
|
- label: '录入',
|
|
|
- value: '0',
|
|
|
- }, {
|
|
|
- label: '提交审核',
|
|
|
- value: '1',
|
|
|
- }, {
|
|
|
- label: '审核中',
|
|
|
- value: '2',
|
|
|
- }, {
|
|
|
- label: '审核通过',
|
|
|
- value: '4',
|
|
|
- }],
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // label: '账单状态',
|
|
|
+ // prop: 'accStatus',
|
|
|
+ // overHidden: true,
|
|
|
+ // width: 80,
|
|
|
+ // type: 'select',
|
|
|
+ // dicData: [{
|
|
|
+ // label: '未生成',
|
|
|
+ // value: 0,
|
|
|
+ // }, {
|
|
|
+ // label: '已生成',
|
|
|
+ // value: 1,
|
|
|
+ // }],
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: '审核状态',
|
|
|
+ // prop: 'auditStatus',
|
|
|
+ // overHidden: true,
|
|
|
+ // width: 80,
|
|
|
+ // type: 'select',
|
|
|
+ // dicData: [{
|
|
|
+ // label: '录入',
|
|
|
+ // value: '0',
|
|
|
+ // }, {
|
|
|
+ // label: '提交审核',
|
|
|
+ // value: '1',
|
|
|
+ // }, {
|
|
|
+ // label: '审核中',
|
|
|
+ // value: '2',
|
|
|
+ // }, {
|
|
|
+ // label: '审核通过',
|
|
|
+ // value: '4',
|
|
|
+ // }],
|
|
|
+ // },
|
|
|
{
|
|
|
label: "类别",
|
|
|
- prop: "billType",
|
|
|
+ prop: "corpType",
|
|
|
width: 100,
|
|
|
overHidden: true,
|
|
|
cell: true,
|
|
|
@@ -772,15 +769,15 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- {
|
|
|
- label: "箱号",
|
|
|
- prop: "cntrNo",
|
|
|
- width: "100",
|
|
|
- cell: true,
|
|
|
- slot: true,
|
|
|
- formslot: true,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // label: "箱号",
|
|
|
+ // prop: "cntrNo",
|
|
|
+ // width: "100",
|
|
|
+ // cell: true,
|
|
|
+ // slot: true,
|
|
|
+ // formslot: true,
|
|
|
+ // overHidden: true,
|
|
|
+ // },
|
|
|
{
|
|
|
label: "费用名称",
|
|
|
prop: "feeCnName",
|
|
|
@@ -972,6 +969,15 @@ export default {
|
|
|
this.saveLocalCurrency(this.deptId)
|
|
|
},
|
|
|
methods: {
|
|
|
+ countChange(row) {
|
|
|
+ if (row.curCode == this.getLocalCurrency()) {
|
|
|
+ row.amountCNY = _.round(_.multiply(row.price, row.quantity), 2)
|
|
|
+ row.amountUSD = 0
|
|
|
+ } else {
|
|
|
+ row.amountCNY = 0
|
|
|
+ row.amountUSD = _.round(_.multiply(row.price, row.quantity), 2)
|
|
|
+ }
|
|
|
+ },
|
|
|
importData(row) {
|
|
|
console.log(row)
|
|
|
this.form.preContainersList.forEach(item => {
|
|
|
@@ -1007,6 +1013,47 @@ export default {
|
|
|
el.teu = null
|
|
|
}
|
|
|
}
|
|
|
+ if (name == 'curCodeC') {
|
|
|
+ if (row) {
|
|
|
+ el.exrate = row.exratePayable
|
|
|
+ this.countChange(el)
|
|
|
+ } else {
|
|
|
+ el.exrate = null
|
|
|
+ el.amountCNY = 0
|
|
|
+ el.amountUSD = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'feeCnName') {
|
|
|
+ if (row) {
|
|
|
+ el.feeId = row.id
|
|
|
+ el.feeCode = row.code
|
|
|
+ } else {
|
|
|
+ el.feeId = null
|
|
|
+ el.feeCode = null
|
|
|
+ el.feeCnName = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'corpType') {
|
|
|
+ el.corpId = null
|
|
|
+ el.corpCode = null
|
|
|
+ el.shortName = null
|
|
|
+ el.corpCnName = null
|
|
|
+ el.corpEnName = null
|
|
|
+ }
|
|
|
+ if (name == 'corpCnName') {
|
|
|
+ if (row) {
|
|
|
+ el.corpId = row.id
|
|
|
+ el.corpCode = row.code
|
|
|
+ el.shortName = row.shortName
|
|
|
+ el.corpEnName = row.enName
|
|
|
+ } else {
|
|
|
+ el.corpId = null
|
|
|
+ el.corpCode = null
|
|
|
+ el.shortName = null
|
|
|
+ el.corpCnName = null
|
|
|
+ el.corpEnName = null
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
,
|
|
|
async dicChange(name, row) {
|
|
|
@@ -1077,6 +1124,14 @@ export default {
|
|
|
this.form.podNamePrint = null
|
|
|
}
|
|
|
}
|
|
|
+ if (name == 'ETD') {
|
|
|
+ if (row) {
|
|
|
+ await this.checkRate(null, row, null, 1, this.deptId)
|
|
|
+ this.form.feeCenterListC.forEach(item => {
|
|
|
+ item.exrate = this.getExchangeRate(item.curCode, 'C', 1)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
rowEdit(row) {
|
|
|
},
|
|
|
@@ -1094,14 +1149,30 @@ export default {
|
|
|
return this.$message.error("请保存数据");
|
|
|
}
|
|
|
await this.checkRate(null, this.form.purchaseDate, null, 1, this.deptId)
|
|
|
- this.form.feeCenterList.push({
|
|
|
+ this.form.feeCenterListC.push({
|
|
|
pid: this.form.id,
|
|
|
- feesType: 1,
|
|
|
dc: 'C',
|
|
|
- billType: '箱东',
|
|
|
- corpId: this.form.purchaseCompanyId,
|
|
|
- shortName: this.form.purchaseCompanyName,
|
|
|
- corpCnName: this.form.purchaseCompanyName,
|
|
|
+ paymode: 'C',
|
|
|
+ sort: Number(this.form.feeCenterListC.length) + 1,
|
|
|
+ businessType: this.form.businessType, // 业务类型
|
|
|
+ billType: this.form.billType, // 单据类型
|
|
|
+ billNo: this.form.billNo, // 单据编号
|
|
|
+ billDate: this.form.etd,
|
|
|
+ branchId: this.form.branchId,
|
|
|
+ branchName: this.form.branchName,
|
|
|
+ corpId: this.form.corpId,
|
|
|
+ shortName: this.form.shortName,
|
|
|
+ corpCnName: this.form.corpCnName,
|
|
|
+ corpEnName: this.form.corpCnName,
|
|
|
+ etd: this.form.etd, // 开船日期
|
|
|
+ polId: this.form.polId, // 装货港 id
|
|
|
+ polCode: this.form.polCode, // 装货港代码
|
|
|
+ polCnName: this.form.polCnName, // 装货港中文名称
|
|
|
+ polEnName: this.form.polEnName, // 装货港英文名称
|
|
|
+ podId: this.form.podId,// 卸货港 id
|
|
|
+ podCode: this.form.podCode,// 卸货港代码
|
|
|
+ podCnName: this.form.podCnName, // 卸货港中文名称
|
|
|
+ podEnName: this.form.podEnName, // 卸货港英文名称
|
|
|
curCode: this.getLocalCurrency(),
|
|
|
exrate: this.getExchangeRate(this.getLocalCurrency(), 'C', 1),
|
|
|
$cellEdit: true
|
|
|
@@ -1113,6 +1184,18 @@ export default {
|
|
|
selectionChange(list) {
|
|
|
this.selectionList = list;
|
|
|
},
|
|
|
+ feecChange(list) {
|
|
|
+ let ids = []
|
|
|
+ list.forEach(e => {
|
|
|
+ ids.push(e.id)
|
|
|
+ })
|
|
|
+ if (ids.length) {
|
|
|
+ this.itemCIds = ids.join(',')
|
|
|
+ } else {
|
|
|
+ this.itemCIds = null
|
|
|
+ }
|
|
|
+ this.selectionfeecList = list;
|
|
|
+ },
|
|
|
getDetails(id) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
@@ -1121,8 +1204,18 @@ export default {
|
|
|
background: 'rgba(255,255,255,0.7)'
|
|
|
});
|
|
|
getDetail({ id: id }).then(res => {
|
|
|
+ res.data.data.feeCenterListC.forEach(row => {
|
|
|
+ if (row.curCode == this.getLocalCurrency()) {
|
|
|
+ row.amountCNY = row.amount
|
|
|
+ row.amountUSD = 0
|
|
|
+ }
|
|
|
+ if (row.curCode != this.getLocalCurrency()) {
|
|
|
+ row.amountUSD = row.amount
|
|
|
+ row.amountCNY = 0
|
|
|
+ }
|
|
|
+ })
|
|
|
this.form = res.data.data
|
|
|
- if (res.data.data.issueStatus == 1 || res.data.data.status == 3) {
|
|
|
+ if (res.data.data.issueStatus == 1 || res.data.data.status >0) {
|
|
|
// this.editButton = true
|
|
|
this.editDisabled = true
|
|
|
this.optionForm.disabled = true
|
|
|
@@ -1276,6 +1369,83 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ if (name == '费用一键保存') {
|
|
|
+ if (!this.form.feeCenterListC.length) {
|
|
|
+ return this.$message.error("请添加数据");
|
|
|
+ }
|
|
|
+ for (let row of this.form.feeCenterListC) {
|
|
|
+ row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
|
|
|
+ row.amountNet = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
|
|
|
+ if (!row.corpType || !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.form.feeCenterListC).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '费用一键编辑') {
|
|
|
+ for (let row of this.form.feeCenterListC) {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == '费用批量删除') {
|
|
|
+ // for (let row of this.selectionfeecList) {
|
|
|
+ // if (row.automaticGenerated == 1) {
|
|
|
+ // return this.$message.error("系统自动生成的费用不允许删除");
|
|
|
+ // }
|
|
|
+ // if (row.stlPid && row.accStatus != 0) {
|
|
|
+ // return this.$message.error("已生成账单,不允许删除");
|
|
|
+ // }
|
|
|
+ // if (row.stlPid && row.auditStatus != 0) {
|
|
|
+ // return this.$message.error("已申请费用,不允许删除");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ let multiList = []
|
|
|
+ let arr = []
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ multiList = this.selectionfeecList
|
|
|
+ arr = this.form.feeCenterListC
|
|
|
+ // 获取有id 的数据
|
|
|
+ const itemsWithId = multiList.filter(item => item.id != null);
|
|
|
+ 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)'
|
|
|
+ });
|
|
|
+ itemFeeRemove({ ids: arrIds.join(',') }).then(res => {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
submit(type) {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
@@ -1287,6 +1457,14 @@ export default {
|
|
|
return this.$message.error("请完善明细信息");
|
|
|
}
|
|
|
}
|
|
|
+ // for (let row of this.form.feeCenterListC) {
|
|
|
+ // row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
|
|
|
+ // row.amountNet = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
|
|
|
+ // if (!row.corpType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
|
|
|
+ // this.$refs.crud2.rowCell(row, row.$index)
|
|
|
+ // return this.$message.error("请完善费用明细");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
this.form.businessType = 'KHTS'
|
|
|
this.form.billNoFormat = 'KHTS'
|
|
|
this.form.businessTypeCode = 'KHTS'
|