|
@@ -4,7 +4,7 @@
|
|
class="chooseImport-modal"
|
|
class="chooseImport-modal"
|
|
:footer="null"
|
|
:footer="null"
|
|
:maskClosable="false"
|
|
:maskClosable="false"
|
|
- title="确认导入"
|
|
|
|
|
|
+ title="导入"
|
|
v-model="isShow"
|
|
v-model="isShow"
|
|
@cancel="isShow=false"
|
|
@cancel="isShow=false"
|
|
:width="900">
|
|
:width="900">
|
|
@@ -37,7 +37,7 @@
|
|
:scroll="{ y: 200 }"
|
|
:scroll="{ y: 200 }"
|
|
:pagination="false"
|
|
:pagination="false"
|
|
bordered>
|
|
bordered>
|
|
- <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" v-if="d">{{ d }};</p>
|
|
<p v-for="d in record.importErrorMsgSet" v-if="d">{{ d }};</p>
|
|
@@ -46,7 +46,7 @@
|
|
查看
|
|
查看
|
|
</a-button>
|
|
</a-button>
|
|
</a-popover>
|
|
</a-popover>
|
|
- </template>
|
|
|
|
|
|
+ </template> -->
|
|
</a-table>
|
|
</a-table>
|
|
<!-- 按钮 -->
|
|
<!-- 按钮 -->
|
|
<div class="btn-con">
|
|
<div class="btn-con">
|
|
@@ -76,10 +76,12 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { stockWarnProductImport, stockWarnExportError, stockWarnBatchImport } from '@/api/stockWarn'
|
|
|
|
|
|
+import { commonMixin } from '@/utils/mixin'
|
|
|
|
+import { productImportPrice, productExportError, productImportPriceInsertBatch } from '@/api/product'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
export default {
|
|
export default {
|
|
name: 'ChooseImportModal',
|
|
name: 'ChooseImportModal',
|
|
|
|
+ mixins: [commonMixin],
|
|
props: {
|
|
props: {
|
|
openModal: { // 弹框显示状态
|
|
openModal: { // 弹框显示状态
|
|
type: Boolean,
|
|
type: Boolean,
|
|
@@ -98,19 +100,20 @@ export default {
|
|
isShow: this.openModal, // 是否打开弹框
|
|
isShow: this.openModal, // 是否打开弹框
|
|
nowColumns: [ // 可导入
|
|
nowColumns: [ // 可导入
|
|
{ title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
|
|
- { title: '产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'productName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '产品名称', dataIndex: 'productName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
// { title: '在途数(个)', dataIndex: 'inTransit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '在途数(个)', dataIndex: 'inTransit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '自定义终端价', dataIndex: 'upperLimit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '自定义车主价', dataIndex: 'lowerLimit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '自定义终端价', dataIndex: 'terminalPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '自定义车主价', dataIndex: 'carOwnersPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
],
|
|
],
|
|
nowUnColumns: [ // 不可导入
|
|
nowUnColumns: [ // 不可导入
|
|
{ title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
// { title: '在途数(个)', dataIndex: 'inTransit', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '在途数(个)', dataIndex: 'inTransit', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '自定义终端价', dataIndex: 'upperLimit', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '自定义车主价', dataIndex: 'lowerLimit', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '备注', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
|
|
|
|
|
|
+ { title: '自定义终端价', dataIndex: 'terminalPrice', width: '10%', align: 'right', customRender: function (text) { return (text ? parseInt(text) ? _this.toThousands(text) : text : '--') } },
|
|
|
|
+ { title: '自定义车主价', dataIndex: 'carOwnersPrice', width: '10%', align: 'right', customRender: function (text) { return (text ? parseInt(text) ? _this.toThousands(text) : text : '--') } },
|
|
|
|
+ { title: '备注', dataIndex: 'errorMsg', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
+ // scopedSlots: { customRender: 'errorMsg' },
|
|
],
|
|
],
|
|
loadData: [],
|
|
loadData: [],
|
|
unLoadData: [],
|
|
unLoadData: [],
|
|
@@ -121,7 +124,7 @@ export default {
|
|
getData () {
|
|
getData () {
|
|
const _this = this
|
|
const _this = this
|
|
this.loading = true
|
|
this.loading = true
|
|
- stockWarnProductImport(this.paramsData).then(res => {
|
|
|
|
|
|
+ productImportPrice(this.paramsData).then(res => {
|
|
this.loading = false
|
|
this.loading = false
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
if (res.data.rightList && res.data.rightList.length > 0) {
|
|
if (res.data.rightList && res.data.rightList.length > 0) {
|
|
@@ -146,7 +149,7 @@ export default {
|
|
this.$message.warning('暂无可导入产品!')
|
|
this.$message.warning('暂无可导入产品!')
|
|
} else {
|
|
} else {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- stockWarnBatchImport(this.loadData).then(res => {
|
|
|
|
|
|
+ productImportPriceInsertBatch(this.loadData).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.$emit('ok', this.loadData)
|
|
this.$emit('ok', this.loadData)
|
|
this.isShow = false
|
|
this.isShow = false
|
|
@@ -163,7 +166,7 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- hdExportExcel(stockWarnExportError, _this.unLoadData, '库存预警产品导入错误项', function () {
|
|
|
|
|
|
+ hdExportExcel(productExportError, _this.unLoadData, '库存预警产品导入错误项', function () {
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
})
|
|
})
|
|
}
|
|
}
|