5 changed files with 189 additions and 61 deletions
@ -0,0 +1,119 @@ |
|||||
|
<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> |
Loading…
Reference in new issue