You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
119 lines
3.7 KiB
119 lines
3.7 KiB
2 years ago
|
<template>
|
||
|
<div class="page-box" v-loading="Loading.appMainLoading">
|
||
|
<tablePagination
|
||
|
:currenButtonData="currenButtonData"
|
||
|
:tableData="tableData"
|
||
|
:tableLoading="Loading.tableLoading"
|
||
|
:tableColumns="tableColumns"
|
||
|
@rowDrop="rowDrop"
|
||
|
:totalCount="totalCount"
|
||
|
:multipleSelection="multipleSelection"
|
||
|
:MaxResultCount="PageListParams.MaxResultCount"
|
||
|
@topbutton="topbuttonHandle"
|
||
|
@inlineDialog="inlineDialog"
|
||
|
@sortChange="sortChange"
|
||
|
@alertoldSkipCount="alertoldSkipCount"
|
||
|
@alterResultCount="alterResultCount"
|
||
|
@handleSelectionChange="handleSelectionChange"
|
||
|
:currentPageProps="oldSkipCount"
|
||
|
:quicklySearchOption="quicklySearchOption"
|
||
|
@quicklySearchClick="quicklySearchClick"
|
||
|
@quicklySearchClear="quicklySearchClear"
|
||
|
:primarySearchOption="primarySearchOption"
|
||
|
@overallSearchFormClick="overallSearchFormClick"
|
||
|
:httpOverallSearchData="httpOverallSearchData"
|
||
|
:tableSelection="true"
|
||
|
>
|
||
|
</tablePagination>
|
||
|
</div>
|
||
|
</template>
|
||
|
<script>
|
||
|
import { tableMixins } from "@/mixins/TableMixins";
|
||
|
import { LoadingMixins } from "@/mixins/LoadingMixins";
|
||
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
|
||
|
import { mixins } from "@/mixins/mixins";
|
||
|
import { exchangeDataResendById } from "@/api/wms-api"
|
||
|
|
||
|
export default {
|
||
|
name: "exchangeDataMaintenancePage",
|
||
|
mixins: [
|
||
|
tableMixins,
|
||
|
LoadingMixins,
|
||
|
TableHeaderMixins,
|
||
|
mixins,
|
||
|
],
|
||
|
data() {
|
||
|
return {
|
||
|
URL: 'wms/store/exchange-data',
|
||
|
//常用按钮数据
|
||
|
currenButtonData: [
|
||
|
this.defaultFieldSettingBtn(),//字段设置
|
||
|
this.defaultFreshBtn(),//刷新
|
||
|
// this.defaultFilterBtn(),//筛选
|
||
|
{
|
||
|
type: "primary",
|
||
|
icon: "el-icon-refresh",
|
||
|
label: "批量重发",
|
||
|
name: "resend",
|
||
|
size: "mini",
|
||
|
}
|
||
|
],
|
||
|
selectData:null,//已选数据
|
||
|
};
|
||
|
},
|
||
|
mounted() {
|
||
|
this.paging();
|
||
|
},
|
||
|
methods: {
|
||
|
handleSelectionChange(val){
|
||
|
this.selectData = val
|
||
|
},
|
||
|
topbuttonHandle(val,item){
|
||
|
if(val == 'resend'){
|
||
|
// this.resendHandle()
|
||
|
}else{
|
||
|
this.topbutton(val,item)
|
||
|
}
|
||
|
},
|
||
|
async resendHandle(){
|
||
|
let _resultBack = null
|
||
|
for(var i = 0;i<this.selectData.length;i++){
|
||
|
_resultBack = await this.resendApiHandle(this.selectData[i].id)
|
||
|
console.log(_resultBack)
|
||
|
if(_resultBack == 0){
|
||
|
this.$errorMsg(`${this.selectData[i].id},失败`)
|
||
|
break
|
||
|
}else{
|
||
|
_resultBack = this.resendHandle()
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
async resendApiHandle(id){
|
||
|
let resultBack = null
|
||
|
await exchangeDataResendById(id)
|
||
|
.then(res=>{ resultBack = 1 })
|
||
|
.catch(err=>{ resultBack = 0 })
|
||
|
return resultBack
|
||
|
},
|
||
|
// async resendApiBack(data) {
|
||
|
// try {
|
||
|
// let result = await exchangeDataResendById(data.id)
|
||
|
// console.log(90,result)
|
||
|
// return result
|
||
|
// } catch (err) {
|
||
|
// return new Promise((resolve, reject) => {
|
||
|
// reject(false)
|
||
|
// })
|
||
|
// }
|
||
|
// },
|
||
|
// resendApiHandle (data){
|
||
|
// return new Promise((resolve, reject) => {
|
||
|
// resolve(data)
|
||
|
// })
|
||
|
// }
|
||
|
}
|
||
|
};
|
||
|
</script>
|
||
|
<style lang="scss" scoped>
|
||
|
@import "@/styles/basicData.scss";
|
||
|
</style>
|