|
@@ -43,6 +43,19 @@
|
|
|
dataName="cnName" @selectChange="dicChange('corpName', $event)"
|
|
|
:disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
+ <tempalte slot="contractNo" slot-scope="{ row }">
|
|
|
+ <el-input v-model="form.contractNo" placeholder="请输入 合同号"
|
|
|
+ :disabled="editDisabled || form.agentItemsList.length"></el-input>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="contractDate" slot-scope="{ row }">
|
|
|
+ <el-date-picker v-model="form.contractDate" type="date" placeholder="请选择 合同日期" format="yyyy-MM-dd"
|
|
|
+ valueFormat="yyyy-MM-dd 00:00:00" :disabled="editDisabled || form.agentItemsList.length">
|
|
|
+ </el-date-picker>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="prepaidAmount" slot-scope="{ row }">
|
|
|
+ <el-input v-model="form.prepaidAmount" placeholder="请输入 预付金额"
|
|
|
+ :disabled="editDisabled || form.agentItemsList.length"></el-input>
|
|
|
+ </tempalte>
|
|
|
<tempalte slot="countryOfOrigin" slot-scope="{ row }">
|
|
|
<dic-select v-model="form.countryOfOrigin" placeholder="原产地" key="id" label="cnName" res="records"
|
|
|
url="/blade-los/bcountrys/list" :filterable="true" :remote="true" dataName="cnName"
|
|
@@ -123,15 +136,10 @@
|
|
|
@resetColumn="resetColumn('crud', 'option', 'optionBack', 376)"
|
|
|
@saveColumn="saveColumn('crud', 'option', 'optionBack', 376)">
|
|
|
<template slot="menuLeft">
|
|
|
- <el-button type="primary" size="small" icon="el-icon-plus" :disabled="editDisabled"
|
|
|
- @click="addRow">新 增
|
|
|
- </el-button>
|
|
|
<el-button type="info" plain size="small" :disabled="editDisabled"
|
|
|
@click="allClick('一键保存')">一键保存</el-button>
|
|
|
<el-button type="info" plain size="small" :disabled="editDisabled"
|
|
|
@click="allClick('一键编辑')">一键编辑</el-button>
|
|
|
- <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
|
|
|
- @click="allClick('批量删除')">批量删除</el-button>
|
|
|
<el-button type="success" size="small" :disabled="editDisabled || !form.id"
|
|
|
@click="allClick('首款账单')">首款账单
|
|
|
</el-button>
|
|
@@ -173,6 +181,14 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</template>
|
|
|
+ <template slot="indexHeader" slot-scope="{row,index}">
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
|
|
|
+ @click="addRow()">
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="index" slot-scope="{row,index}">
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ </template>
|
|
|
<template slot="billNo" slot-scope="{ row }">
|
|
|
<!-- <el-input v-if="row.$cellEdit" v-model="row.billNo" placeholder="请输入 提单号"></el-input> -->
|
|
|
<span v-if="!row.$cellEdit" style="color: #1e9fff" @click="rowJump(row)">{{ row.billNo }}</span>
|
|
@@ -217,9 +233,9 @@
|
|
|
<span v-else>{{ row.amount }}</span>
|
|
|
</tempalte>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
- <el-button size="small" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" type="text"
|
|
|
+ <!-- <el-button size="small" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" type="text"
|
|
|
:disabled="editDisabled" @click="rowCell(row, index)">{{ row.$cellEdit ? '保 存' : '编 辑'
|
|
|
- }}</el-button>
|
|
|
+ }}</el-button> -->
|
|
|
<el-button size="small" icon="el-icon-delete" type="text" :disabled="editDisabled"
|
|
|
@click="rowDel(row, index)">删 除</el-button>
|
|
|
</template>
|
|
@@ -293,7 +309,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { submit, getDetail, remove, checkAgent, revokeCheckAgent, copyAgent, generateDownPaymentBill, generateBalancePaymentBill, generatePayment, revokeApplyForPayment, confirmationNotification, generateFreightForwarder, balancePayment } from "@/api/tradeAgency/tradeAgency";
|
|
|
+import { submit, getDetail, removeItem, checkAgent, revokeCheckAgent, copyAgent, generateDownPaymentBill, generateBalancePaymentBill, generatePayment, revokeApplyForPayment, confirmationNotification, generateFreightForwarder, balancePayment } from "@/api/tradeAgency/tradeAgency";
|
|
|
import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
|
|
|
import feeInfo from "@/components/tradeAgency/fee-info";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
@@ -419,10 +435,6 @@ export default {
|
|
|
{
|
|
|
label: '合同日期',
|
|
|
prop: "contractDate",
|
|
|
- type: "date",
|
|
|
- format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd 00:00:00",
|
|
|
- disabled: false,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: " ",
|
|
@@ -594,10 +606,9 @@ export default {
|
|
|
optionBack: {
|
|
|
height: 'auto',
|
|
|
calcHeight: 30,
|
|
|
- menuWidth: 140,
|
|
|
+ menuWidth: 60,
|
|
|
tip: false,
|
|
|
border: true,
|
|
|
- index: true,
|
|
|
addBtn: false,
|
|
|
viewBtn: false,
|
|
|
editBtn: false,
|
|
@@ -607,9 +618,15 @@ export default {
|
|
|
align: 'center',
|
|
|
column: [
|
|
|
{
|
|
|
+ label: "index",
|
|
|
+ prop: "index",
|
|
|
+ width: "55",
|
|
|
+ headerslot: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "提单号",
|
|
|
prop: "billNo",
|
|
|
- width: "160",
|
|
|
+ width: "140",
|
|
|
cell: true,
|
|
|
overHidden: true,
|
|
|
rules: [
|
|
@@ -639,7 +656,7 @@ export default {
|
|
|
{
|
|
|
label: "箱号",
|
|
|
prop: "boxNo",
|
|
|
- width: "160",
|
|
|
+ width: "140",
|
|
|
cell: true,
|
|
|
overHidden: true,
|
|
|
rules: [
|
|
@@ -651,57 +668,23 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- label: "铅封号",
|
|
|
- prop: "leadSealNo",
|
|
|
- width: "120",
|
|
|
- cell: true,
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "放单方式",
|
|
|
- prop: "orderReleaseMethod",
|
|
|
- width: "160",
|
|
|
- cell: true,
|
|
|
- slot: true,
|
|
|
- formslot: true,
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
label: "PI发票号",
|
|
|
prop: "invoiceNo",
|
|
|
- width: "160",
|
|
|
+ width: "100",
|
|
|
cell: true,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "订单号",
|
|
|
prop: "orderNo",
|
|
|
- width: "120",
|
|
|
+ width: "100",
|
|
|
cell: true,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: "开船日期",
|
|
|
- prop: "etd",
|
|
|
- width: "120",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "预计到港",
|
|
|
- prop: "estimateReachHarbor",
|
|
|
- width: "120",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "实际到港",
|
|
|
- prop: "actualReachHarbor",
|
|
|
- width: "120",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
label: "HSCODE",
|
|
|
prop: "hsCode",
|
|
|
- width: "120",
|
|
|
+ width: "100",
|
|
|
overHidden: true,
|
|
|
cell: true,
|
|
|
slot: true,
|
|
@@ -717,20 +700,20 @@ export default {
|
|
|
{
|
|
|
label: "厂号",
|
|
|
prop: "factoryNumber",
|
|
|
- width: "120",
|
|
|
+ width: "100",
|
|
|
cell: true,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "标签品名",
|
|
|
prop: "labelProductName",
|
|
|
- width: "120",
|
|
|
+ width: "100",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "商品类别",
|
|
|
prop: "goodsType",
|
|
|
- width: "120",
|
|
|
+ width: "100",
|
|
|
cell: true,
|
|
|
slot: true,
|
|
|
formslot: true,
|
|
@@ -746,7 +729,7 @@ export default {
|
|
|
{
|
|
|
label: "件数",
|
|
|
prop: "quantity",
|
|
|
- width: "120",
|
|
|
+ width: "100",
|
|
|
cell: true,
|
|
|
type: 'number',
|
|
|
controls: false,
|
|
@@ -762,7 +745,7 @@ export default {
|
|
|
{
|
|
|
label: "净重(kg)",
|
|
|
prop: "netWeight",
|
|
|
- width: "120",
|
|
|
+ width: "100",
|
|
|
cell: true,
|
|
|
slot: true,
|
|
|
formslot: true,
|
|
@@ -778,7 +761,7 @@ export default {
|
|
|
{
|
|
|
label: "单价",
|
|
|
prop: "price",
|
|
|
- width: "120",
|
|
|
+ width: "100",
|
|
|
cell: true,
|
|
|
slot: true,
|
|
|
formslot: true,
|
|
@@ -794,7 +777,7 @@ export default {
|
|
|
{
|
|
|
label: "毛重(kg)",
|
|
|
prop: "grossWeight",
|
|
|
- width: "120",
|
|
|
+ width: "100",
|
|
|
cell: true,
|
|
|
type: 'number',
|
|
|
controls: false,
|
|
@@ -810,16 +793,50 @@ export default {
|
|
|
{
|
|
|
label: "金额",
|
|
|
prop: "amount",
|
|
|
+ width: "100",
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "铅封号",
|
|
|
+ prop: "leadSealNo",
|
|
|
width: "120",
|
|
|
cell: true,
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "放单方式",
|
|
|
+ prop: "orderReleaseMethod",
|
|
|
+ width: "100",
|
|
|
+ cell: true,
|
|
|
slot: true,
|
|
|
formslot: true,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
+ label: "开船日期",
|
|
|
+ prop: "etd",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "预计到港",
|
|
|
+ prop: "estimateReachHarbor",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "实际到港",
|
|
|
+ prop: "actualReachHarbor",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "税率",
|
|
|
prop: "taxRate",
|
|
|
- width: "120",
|
|
|
+ width: "80",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
@@ -849,13 +866,13 @@ export default {
|
|
|
{
|
|
|
label: "库存件数",
|
|
|
prop: "inventoryQuantity",
|
|
|
- width: "120",
|
|
|
+ width: "100",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "货代",
|
|
|
prop: "freightForwarder",
|
|
|
- width: "120",
|
|
|
+ width: "80",
|
|
|
type: 'select',
|
|
|
dicData: [{
|
|
|
label: '是',
|
|
@@ -941,6 +958,10 @@ export default {
|
|
|
align: 'center',
|
|
|
column: [
|
|
|
{
|
|
|
+ label: '合同号',
|
|
|
+ prop: "contractNo",
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '提单号',
|
|
|
prop: 'billNo'
|
|
|
},
|
|
@@ -1037,8 +1058,14 @@ export default {
|
|
|
if (name == 'corpName') {
|
|
|
if (row) {
|
|
|
this.form.corpId = row.id
|
|
|
+ if (row.sourceType == 'SALES') {
|
|
|
+ this.form.srcCnName = row.srcCnName
|
|
|
+ this.form.srcId = row.srcId
|
|
|
+ }
|
|
|
} else {
|
|
|
this.form.corpId = null
|
|
|
+ this.form.srcCnName = null
|
|
|
+ this.form.srcId = null
|
|
|
}
|
|
|
}
|
|
|
if (name == 'polCnName') {
|
|
@@ -1130,8 +1157,10 @@ export default {
|
|
|
if (name == 'hsCode') {
|
|
|
if (row) {
|
|
|
el.labelProductName = row.cnName
|
|
|
+ el.taxRate = row.taxRate
|
|
|
} else {
|
|
|
el.labelProductName = null
|
|
|
+ el.taxRate = null
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1213,7 +1242,7 @@ export default {
|
|
|
addRow() {
|
|
|
if (!this.form.corpId) return this.$message.error("请选择客户名称");
|
|
|
if (this.form.agentItemsList.length == 0) {
|
|
|
- this.form.agentItemsList.push({ $cellEdit: true })
|
|
|
+ this.form.agentItemsList.push({ orderReleaseMethod: '正本', freightForwarder: '0', $cellEdit: true })
|
|
|
} else {
|
|
|
let obj = {}
|
|
|
obj = this.deepClone(this.form.agentItemsList[this.form.agentItemsList.length - 1])
|
|
@@ -1221,7 +1250,7 @@ export default {
|
|
|
billNo: obj.billNo,
|
|
|
boxType: obj.boxType,
|
|
|
leadSealNo: obj.leadSealNo,
|
|
|
- orderReleaseMethod: obj.orderReleaseMethod,
|
|
|
+ orderReleaseMethod: '正本',
|
|
|
orderNo: obj.orderNo,
|
|
|
hsCode: obj.hsCode,
|
|
|
factoryNumber: obj.factoryNumber,
|
|
@@ -1232,22 +1261,23 @@ export default {
|
|
|
price: obj.price,
|
|
|
grossWeight: obj.grossWeight,
|
|
|
amount: obj.amount,
|
|
|
+ freightForwarder: '0',
|
|
|
$cellEdit: true
|
|
|
})
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- rowCell(row, index) {
|
|
|
- if (!row.billNo || !row.boxType || !row.boxNo || !row.hsCode || !row.goodsType || !row.quantity || !row.netWeight || !row.price || !row.grossWeight) {
|
|
|
- this.$refs.crud.rowCell(row, index)
|
|
|
- return this.$message.error("请完善明细信息");
|
|
|
- }
|
|
|
- if (row.$cellEdit == true) {
|
|
|
- this.$set(row, "$cellEdit", false);
|
|
|
- } else {
|
|
|
- this.$set(row, "$cellEdit", true);
|
|
|
- }
|
|
|
- },
|
|
|
+ // rowCell(row, index) {
|
|
|
+ // if (!row.billNo || !row.boxType || !row.boxNo || !row.hsCode || !row.goodsType || !row.quantity || !row.netWeight || !row.price || !row.grossWeight) {
|
|
|
+ // this.$refs.crud.rowCell(row, index)
|
|
|
+ // return this.$message.error("请完善明细信息");
|
|
|
+ // }
|
|
|
+ // if (row.$cellEdit == true) {
|
|
|
+ // this.$set(row, "$cellEdit", false);
|
|
|
+ // } else {
|
|
|
+ // this.$set(row, "$cellEdit", true);
|
|
|
+ // }
|
|
|
+ // },
|
|
|
rowDel(row, index) {
|
|
|
this.$confirm("确定删除数据?", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -1255,7 +1285,7 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
if (row.id) {
|
|
|
- remove({ ids: row.id }).then(res => {
|
|
|
+ removeItem({ ids: row.id }).then(res => {
|
|
|
this.form.agentItemsList.splice(index, 1);
|
|
|
this.$message.success("成功删除");
|
|
|
})
|
|
@@ -1381,7 +1411,6 @@ export default {
|
|
|
return this.$message.error("请完善明细信息");
|
|
|
}
|
|
|
this.$set(row, "$cellEdit", false);
|
|
|
-
|
|
|
}
|
|
|
this.submit()
|
|
|
}
|
|
@@ -1390,51 +1419,17 @@ export default {
|
|
|
this.$set(row, "$cellEdit", true);
|
|
|
}
|
|
|
}
|
|
|
- if (name == '批量删除') {
|
|
|
- let multiList = []
|
|
|
- let arr = []
|
|
|
- this.$confirm("确定将选择数据删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- multiList = this.selectionList
|
|
|
- arr = this.form.agentItemsList
|
|
|
- // 获取有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)'
|
|
|
- });
|
|
|
- remove({ ids: arrIds.join(',') }).then(res => {
|
|
|
- this.$message.success("删除成功");
|
|
|
- }).finally(() => {
|
|
|
- loading.close();
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
if (name == '首款账单') {
|
|
|
if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
|
|
|
bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
|
|
|
res.data.data.forEach(e => {
|
|
|
if (this.form.currency == e.code) {
|
|
|
- this.$prompt('请输入汇率', '首款账单', {
|
|
|
+ this.$prompt('账单金额(' + this.form.currency + '):' + this.form.prepaidAmount + '<br/>请输入汇率', '首款账单', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- inputValue: e.exrate
|
|
|
+ inputValue: e.exrate,
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ closeOnClickModal: false,
|
|
|
}).then(({ value }) => {
|
|
|
let obj = {}
|
|
|
obj = {
|
|
@@ -1451,7 +1446,6 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (name == '尾款账单') {
|
|
|
-
|
|
|
if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
|
|
|
let obj = {}
|
|
|
obj = {
|