|
@@ -15,7 +15,8 @@
|
|
class="sTable"
|
|
class="sTable"
|
|
ref="table"
|
|
ref="table"
|
|
size="small"
|
|
size="small"
|
|
- :rowKey="(record) => record.allocateSn"
|
|
|
|
|
|
+ :rowKey="(record) => record.no"
|
|
|
|
+ rowKeyName="no"
|
|
:columns="nowColumns"
|
|
:columns="nowColumns"
|
|
:dataSource="loadData"
|
|
:dataSource="loadData"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
@@ -30,7 +31,8 @@
|
|
class="unTable"
|
|
class="unTable"
|
|
ref="unTable"
|
|
ref="unTable"
|
|
size="small"
|
|
size="small"
|
|
- :rowKey="(record) => record.errorDesc"
|
|
|
|
|
|
+ :rowKey="(record) => record.no"
|
|
|
|
+ rowKeyName="no"
|
|
:columns="nowUnColumns"
|
|
:columns="nowUnColumns"
|
|
:dataSource="unLoadData"
|
|
:dataSource="unLoadData"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
@@ -40,7 +42,7 @@
|
|
<template slot="errorMsg" slot-scope="text,record">
|
|
<template slot="errorMsg" slot-scope="text,record">
|
|
<a-popover placement="topRight">
|
|
<a-popover placement="topRight">
|
|
<template slot="content">
|
|
<template slot="content">
|
|
- <p v-for="d in record.importErrorMsgSet">{{ d }}</p>
|
|
|
|
|
|
+ <p v-for="d in record.errorMsgList">{{ d }}</p>
|
|
</template>
|
|
</template>
|
|
<a-button type="link">
|
|
<a-button type="link">
|
|
查看
|
|
查看
|
|
@@ -78,7 +80,7 @@
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
-import { salesDetailFailExcel } from '@/api/salesDetail'
|
|
|
|
|
|
+import { sparePartsRetDetailImportError } from '@/api/sparePartsRet'
|
|
export default {
|
|
export default {
|
|
name: 'ChooseImportModal',
|
|
name: 'ChooseImportModal',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
@@ -104,9 +106,9 @@ export default {
|
|
{ title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '仓库', dataIndex: 'warehouseName', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '仓库', dataIndex: 'warehouseName', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '仓位', dataIndex: 'warehouseLocationName', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '仓位', dataIndex: 'warehouseLocationName', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '售价', dataIndex: 'importPrice', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '数量', dataIndex: 'importQty', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '单位', dataIndex: 'importProductUnit', align: 'center', width: '15%', customRender: function (text) { return text || '--' } }
|
|
|
|
|
|
+ { title: '单位', dataIndex: 'productUnit', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '退货单价', dataIndex: 'returnPriceStr', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '退货数量', dataIndex: 'returnQtyStr', width: '14%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
],
|
|
],
|
|
loadData: [],
|
|
loadData: [],
|
|
nowUnColumns: [
|
|
nowUnColumns: [
|
|
@@ -114,8 +116,8 @@ export default {
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '售价', dataIndex: 'importPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '数量', dataIndex: 'importQty', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '退货单价', dataIndex: 'returnPriceStr', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '退货数量', dataIndex: 'returnQtyStr', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
|
|
{ title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
|
|
],
|
|
],
|
|
unLoadData: [],
|
|
unLoadData: [],
|
|
@@ -125,29 +127,23 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
getData () {
|
|
getData () {
|
|
const paramsData = JSON.parse(JSON.stringify(this.paramsData))
|
|
const paramsData = JSON.parse(JSON.stringify(this.paramsData))
|
|
- this.loadData = paramsData.rightList || []
|
|
|
|
|
|
+ this.loadData = paramsData.rigthList || []
|
|
this.unLoadData = paramsData.errorList || []
|
|
this.unLoadData = paramsData.errorList || []
|
|
this.loadData.map((item, index) => {
|
|
this.loadData.map((item, index) => {
|
|
item.no = index + 1
|
|
item.no = index + 1
|
|
- item.salesBillNo = paramsData.salesBillNo
|
|
|
|
- item.salesBillSn = paramsData.salesBillSn
|
|
|
|
|
|
+ item.sparePartsReturnSn = paramsData.sparePartsReturnSn
|
|
})
|
|
})
|
|
this.unLoadData.map((item, index) => {
|
|
this.unLoadData.map((item, index) => {
|
|
item.no = index + 1
|
|
item.no = index + 1
|
|
- item.salesBillNo = paramsData.salesBillNo
|
|
|
|
- item.salesBillSn = paramsData.salesBillSn
|
|
|
|
|
|
+ item.sparePartsReturnSn = paramsData.sparePartsReturnSn
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 确认导入
|
|
// 确认导入
|
|
handleSubmit () {
|
|
handleSubmit () {
|
|
- if (this.paramsData.rightList.length == 0) {
|
|
|
|
|
|
+ if (this.paramsData.rigthList.length == 0) {
|
|
this.$message.warning('无可导入的产品!')
|
|
this.$message.warning('无可导入的产品!')
|
|
} else {
|
|
} else {
|
|
- const data = this.paramsData.rightList
|
|
|
|
- data.map(item => {
|
|
|
|
- item.salesBillNo = this.paramsData.salesBillNo
|
|
|
|
- item.salesBillSn = this.paramsData.salesBillSn
|
|
|
|
- })
|
|
|
|
|
|
+ const data = this.paramsData.rigthList
|
|
this.$emit('ok', data)
|
|
this.$emit('ok', data)
|
|
this.isShow = false
|
|
this.isShow = false
|
|
}
|
|
}
|
|
@@ -160,7 +156,7 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- hdExportExcel(salesDetailFailExcel, _this.paramsData.errorList, '销售产品导出错误项', function () {
|
|
|
|
|
|
+ hdExportExcel(sparePartsRetDetailImportError, _this.paramsData.errorList, '散件入库(不抓单)产品导出错误项', function () {
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
})
|
|
})
|
|
}
|
|
}
|