|
@@ -20,6 +20,18 @@
|
|
|
:title="'配件销售订单' + formDialogTitles[formDialogType]"></attachmentSalesOrderDetail>
|
|
|
</div>
|
|
|
<print-preview ref="preView" @initPrint="handleInitPrint" @refreshList="handleRefreshList" />
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="导入结果"
|
|
|
+ :visible.sync="showImportResult"
|
|
|
+ width="600px">
|
|
|
+ <div class="importResultList">
|
|
|
+ <div class="item" v-for="(item, index) in importResultList" :key="index">{{item}}</div>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showImportResult = false">关 闭</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -30,7 +42,7 @@ import import_mixin from '@/components/template/import_mixin.js'
|
|
|
import ImageUpload from '@/components/file-upload'
|
|
|
import { downloadFiles } from '@/utils/util'
|
|
|
import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
|
|
|
-import { listPageV2, pageExport, getDetail, add, edit, submit, listImportP } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
|
|
|
+import { listPageV2, pageExport, getDetail, add, edit, submit, listImportP, queryImportResult } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
|
|
|
import { getWebsit } from "@/api/customerManagement";
|
|
|
import printPreview from '../components/preview.vue'
|
|
|
import { disAutoConnect, hiprint } from 'vue-plugin-hiprint'
|
|
@@ -63,6 +75,9 @@ export default {
|
|
|
isShowTab: true,
|
|
|
orderEnginBaseId: '',
|
|
|
payQrcode: JSON.parse(localStorage.getItem('greemall_user')).payQrcode,
|
|
|
+
|
|
|
+ showImportResult: false,
|
|
|
+ importResultList: [],
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -80,7 +95,11 @@ export default {
|
|
|
[
|
|
|
this.optionsEvensAuth("imp", {
|
|
|
render: () => {
|
|
|
- return this.importButton(listImportP, '导入')
|
|
|
+ return this.importButton(listImportP, '导入', null, null, (res) => {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.checkImportResult(res.data);
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
],
|
|
@@ -407,6 +426,38 @@ export default {
|
|
|
this.$message.error('下载失败')
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ // 查询导入结果
|
|
|
+ checkImportResult(importBatchId) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '正在查询导入结果',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ })
|
|
|
+ queryImportResult({
|
|
|
+ importBatchId
|
|
|
+ }).then(result => {
|
|
|
+ if(result.data.waitCount == 0){
|
|
|
+ clearInterval(this.timer)
|
|
|
+ loading.close();
|
|
|
+ // result.data.errList = ['测试测试1', '测试测试1']
|
|
|
+ if(result.data?.errList?.length > 0) {
|
|
|
+ this.importResultList = result.data.errList;
|
|
|
+ this.showImportResult = true;
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ this.timer = setTimeout(()=>{
|
|
|
+ this.checkImportResult(importBatchId);
|
|
|
+ }, 2000)
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ loading.close();
|
|
|
+ clearInterval(this.timer)
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -419,4 +470,11 @@ export default {
|
|
|
.tab {
|
|
|
padding: 20px 20px 0 20px;
|
|
|
}
|
|
|
+
|
|
|
+.importResultList {
|
|
|
+ .item {
|
|
|
+ font-size: 16px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|