|
@@ -15,28 +15,13 @@
|
|
|
class="sTable"
|
|
|
ref="table"
|
|
|
size="small"
|
|
|
- :rowKey="(record) => record.allocateSn"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
:columns="nowColumns"
|
|
|
:dataSource="loadData"
|
|
|
:loading="loading"
|
|
|
:scroll="{ y: 200 }"
|
|
|
:pagination="false"
|
|
|
bordered>
|
|
|
- <!-- 费用承担方 -->
|
|
|
- <template slot="fycdf" slot-scope="text,record">
|
|
|
- <div v-for="(item,index) in record.detailSplitList" :key="item.id+'-'+index">
|
|
|
- {{ item.splitObjName }}<span v-if="item.childDetailSplit&&item.childDetailSplit.splitObjName">/</span>{{ item.childDetailSplit?item.childDetailSplit.splitObjName:'' }}: ¥{{ item.splitAmount }}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <!-- 产品信息 -->
|
|
|
- <template slot="cpxx" slot-scope="text,record">
|
|
|
- <div v-for="item in record.detailProductsList" :key="item.id">
|
|
|
- <div v-if="item.productCode">{{ item.productCode }}: ¥{{ item.expense }}</div>
|
|
|
- <div v-else-if="item.productBrandName">{{ item.productBrandName }}<span v-if="item.productTypeShowName">/</span>{{ item.productTypeShowName }}: ¥{{ item.expense }}</div>
|
|
|
- <div v-else>{{ item.productTypeShowName }}: ¥{{ item.expense }}</div>
|
|
|
- </div>
|
|
|
- <span v-if="!record.detailProductsList||record.detailProductsList.length==0">--</span>
|
|
|
- </template>
|
|
|
</a-table>
|
|
|
<a-divider />
|
|
|
<!-- 不可导入数据 -->
|
|
@@ -45,28 +30,13 @@
|
|
|
class="unTable"
|
|
|
ref="unTable"
|
|
|
size="small"
|
|
|
- :rowKey="(record) => record.errorDesc"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
:columns="nowUnColumns"
|
|
|
:dataSource="unLoadData"
|
|
|
:loading="loading"
|
|
|
:scroll="{ y: 200 }"
|
|
|
:pagination="false"
|
|
|
bordered>
|
|
|
- <!-- 费用承担方 -->
|
|
|
- <template slot="fycdf" slot-scope="text,record">
|
|
|
- <div v-for="(item,index) in record.detailSplitList" :key="item.no+'-'+index">
|
|
|
- {{ item.splitObjName }}<span v-if="item.childDetailSplit&&item.childDetailSplit.splitObjName">/</span>{{ item.childDetailSplit?item.childDetailSplit.splitObjName:'' }}: ¥{{ item.splitAmount }}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <!-- 产品信息 -->
|
|
|
- <template slot="cpxx" slot-scope="text,record">
|
|
|
- <div v-for="(item,index) in record.detailProductsList" :key="item.no+'-'+index">
|
|
|
- <div v-if="item.productCode">{{ item.productCode }}: ¥{{ item.expense }}</div>
|
|
|
- <div v-else-if="item.productBrandName">{{ item.productBrandName }}<span v-if="item.productTypeShowName">/</span>{{ item.productTypeShowName }}: ¥{{ item.expense }}</div>
|
|
|
- <div v-else>{{ item.productTypeShowName }}: ¥{{ item.expense }}</div>
|
|
|
- </div>
|
|
|
- <span v-if="!record.detailProductsList||record.detailProductsList.length==0">--</span>
|
|
|
- </template>
|
|
|
<template slot="errorMsg" slot-scope="text,record">
|
|
|
<a-popover placement="topRight">
|
|
|
<template slot="content">
|
|
@@ -126,55 +96,62 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
|
+ const renderContent = (value, row, index) => {
|
|
|
+ const obj = {
|
|
|
+ children: value || '--',
|
|
|
+ attrs: { rowSpan: row.sendBillDetailList ? row.sendBillDetailList.length : 0 }
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ }
|
|
|
return {
|
|
|
bloading: false,
|
|
|
isShow: this.openModal, // 是否打开弹框
|
|
|
nowColumns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '客户名称', dataIndex: 'customeName', width: '8%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '物流单号', dataIndex: 'transportNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '物流电话', dataIndex: 'transportTele', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '托运日期', dataIndex: 'sendDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '收货人', dataIndex: 'customerCacateName', width: '6%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '收货电话', dataIndex: 'customerCacatePhone', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '收货地址', dataIndex: 'customerAddressDetail', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '目的地', dataIndex: 'customerAddress', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '付款方式', dataIndex: 'payTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '交货方式', dataIndex: 'handoverTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '货物名称', dataIndex: 'sendBillDetailList.goodsName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '件数', dataIndex: 'sendBillDetailList.goodsQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '体积(m3)', dataIndex: 'sendBillDetailList.goodsVolume', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '立方/元', dataIndex: 'sendBillDetailList.cubeAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '重量(kg)', dataIndex: 'sendBillDetailList.goodsWeight', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '每吨/元', dataIndex: 'sendBillDetailList.tonAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '运费(元)', dataIndex: 'sendBillDetailList.transportAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '送货费(元)', dataIndex: 'sendBillDetailList.sendAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '其他(元)', dataIndex: 'sendBillDetailList.otherAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '保价(万)', dataIndex: 'sendBillDetailList.supportValue', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '客户名称', dataIndex: 'customeName', width: '8%', align: 'left', customRender: renderContent },
|
|
|
+ { title: '物流单号', dataIndex: 'transportNo', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '物流电话', dataIndex: 'transportTele', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '托运日期', dataIndex: 'sendDate', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '收货人', dataIndex: 'customerCacateName', width: '6%', align: 'left', customRender: renderContent },
|
|
|
+ { title: '收货电话', dataIndex: 'customerCacatePhone', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '收货地址', dataIndex: 'customerAddressDetail', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '目的地', dataIndex: 'customerAddress', width: '6%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '付款方式', dataIndex: 'payTypeDictValue', width: '6%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '交货方式', dataIndex: 'handoverTypeDictValue', width: '6%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '货物名称', dataIndex: 'goodsName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '件数', dataIndex: 'goodsQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '体积(m3)', dataIndex: 'goodsVolume', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '立方/元', dataIndex: 'cubeAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '重量(kg)', dataIndex: 'goodsWeight', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '每吨/元', dataIndex: 'tonAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '运费(元)', dataIndex: 'transportAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '送货费(元)', dataIndex: 'sendAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '其他(元)', dataIndex: 'otherAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '保价(万)', dataIndex: 'supportValue', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
],
|
|
|
loadData: [],
|
|
|
nowUnColumns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '客户名称', dataIndex: 'customeName', width: '8%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '物流单号', dataIndex: 'transportNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '物流电话', dataIndex: 'transportTele', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '托运日期', dataIndex: 'sendDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '收货人', dataIndex: 'customerCacateName', width: '6%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '收货电话', dataIndex: 'customerCacatePhone', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '收货地址', dataIndex: 'customerAddressDetail', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '目的地', dataIndex: 'customerAddress', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '付款方式', dataIndex: 'payTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '交货方式', dataIndex: 'handoverTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '货物名称', dataIndex: 'sendBillDetailList.goodsName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '件数', dataIndex: 'sendBillDetailList.goodsQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '体积(m3)', dataIndex: 'sendBillDetailList.goodsVolume', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '立方/元', dataIndex: 'sendBillDetailList.cubeAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '重量(kg)', dataIndex: 'sendBillDetailList.goodsWeight', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '每吨/元', dataIndex: 'sendBillDetailList.tonAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '运费(元)', dataIndex: 'sendBillDetailList.transportAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '送货费(元)', dataIndex: 'sendBillDetailList.sendAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '其他(元)', dataIndex: 'sendBillDetailList.otherAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '保价(万)', dataIndex: 'sendBillDetailList.supportValue', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '客户名称', dataIndex: 'customeName', width: '8%', align: 'left', customRender: renderContent },
|
|
|
+ { title: '物流单号', dataIndex: 'transportNo', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '物流电话', dataIndex: 'transportTele', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '托运日期', dataIndex: 'sendDate', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '收货人', dataIndex: 'customerCacateName', width: '6%', align: 'left', customRender: renderContent },
|
|
|
+ { title: '收货电话', dataIndex: 'customerCacatePhone', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '收货地址', dataIndex: 'customerAddressDetail', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '目的地', dataIndex: 'customerAddress', width: '6%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '付款方式', dataIndex: 'payTypeDictValue', width: '6%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '交货方式', dataIndex: 'handoverTypeDictValue', width: '6%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '货物名称', dataIndex: 'goodsName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '件数', dataIndex: 'goodsQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '体积(m3)', dataIndex: 'goodsVolume', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '立方/元', dataIndex: 'cubeAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '重量(kg)', dataIndex: 'goodsWeight', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '每吨/元', dataIndex: 'tonAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '运费(元)', dataIndex: 'transportAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '送货费(元)', dataIndex: 'sendAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '其他(元)', dataIndex: 'otherAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '保价(万)', dataIndex: 'supportValue', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
|
|
|
],
|
|
|
unLoadData: [],
|
|
@@ -182,18 +159,28 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getData () {
|
|
|
- const paramsData = JSON.parse(JSON.stringify(this.paramsData))
|
|
|
- this.loadData = paramsData.rightList || []
|
|
|
- this.unLoadData = paramsData.errorList || []
|
|
|
- this.loadData.map((item, index) => {
|
|
|
+ formatData (data) {
|
|
|
+ const ret = []
|
|
|
+ data.map((item, index) => {
|
|
|
item.no = index + 1
|
|
|
- item.sendBillDetailList = item.sendBillDetailList[0]
|
|
|
- })
|
|
|
- this.unLoadData.map((item, index) => {
|
|
|
- item.no = index + 1
|
|
|
- item.sendBillDetailList = item.sendBillDetailList[0]
|
|
|
+ item.id = new Date().getTime() + index
|
|
|
+ const clist = item.sendBillDetailList
|
|
|
+ clist.map((k, i) => {
|
|
|
+ if (i > 0) {
|
|
|
+ ret.push(k)
|
|
|
+ } else {
|
|
|
+ ret.push(Object.assign(item, k))
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
+ return ret
|
|
|
+ },
|
|
|
+ getData () {
|
|
|
+ const paramsData = JSON.parse(JSON.stringify(this.paramsData))
|
|
|
+ this.loadData = this.formatData(paramsData.rightList || [])
|
|
|
+ this.unLoadData = this.formatData(paramsData.errorList || [])
|
|
|
+ console.log(this.loadData)
|
|
|
+ console.log(this.unLoadData)
|
|
|
},
|
|
|
// 确认导入
|
|
|
handleSubmit () {
|