|
@@ -259,7 +259,7 @@
|
|
|
:loading="tkDialogVisibleLoading"
|
|
|
type="primary"
|
|
|
@click="tkSubmitForm('tkRuleForm')"
|
|
|
- v-if="refundSubmitSuccess.length != tkSelectList.length"
|
|
|
+ v-if="refundSubmitSuccess.length != tkSelectList.length && tkSelectList.length>0"
|
|
|
>{{
|
|
|
tkDialogVisibleLoading ? '退款中...':
|
|
|
refundSubmitError.length > 0? '继续提交失败订单':
|
|
@@ -643,6 +643,22 @@ export default {
|
|
|
let refundAmountAll = 0
|
|
|
let refundPeople = 0
|
|
|
let list = JSON.parse(JSON.stringify(this.tkSelectList))
|
|
|
+ /** 清除成功 */
|
|
|
+ let listCopy = JSON.parse(JSON.stringify(this.refundSubmitSuccess))
|
|
|
+ this.refundSubmitSuccess.forEach((item,index1)=>{
|
|
|
+ if(item == row.orderId) {
|
|
|
+ listCopy.splice(index1,1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.refundSubmitSuccess = listCopy
|
|
|
+ /** 清除失败 */
|
|
|
+ let listCopy1 = JSON.parse(JSON.stringify(this.refundSubmitError))
|
|
|
+ this.refundSubmitError.forEach((item,index1)=>{
|
|
|
+ if(item == row.orderId) {
|
|
|
+ listCopy1.splice(index1,1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.refundSubmitError = listCopy1
|
|
|
list.splice(index,1)
|
|
|
list.forEach((item,index)=>{
|
|
|
if(item.viewerList && item.viewerList.length > 0){
|
|
@@ -682,7 +698,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+ this.refundSubmitError = []
|
|
|
this.refundSubmitErrorList = list
|
|
|
+ console.log("this.refundSubmitErrorList===",list)
|
|
|
this.moreRefundSubmitFun(0)
|
|
|
}else {
|
|
|
this.refundSubmitFun(0)
|
|
@@ -731,7 +749,7 @@ export default {
|
|
|
this.refundSubmitAction = null
|
|
|
this.refundSubmitError.push(this.tkSelectList[index].orderId)
|
|
|
this.$message.error(`订单号:${this.tkSelectList[index].orderId},退款提交失败`);
|
|
|
- this.$set(this.tkSelectList[index],'errorRemark',"系统问题")
|
|
|
+ this.$set(this.tkSelectList[index],'errorRemark',error?error.message||error.title||error:'系统问题')
|
|
|
if((index+1) < this.tkSelectList.length) {
|
|
|
this.refundSubmitAction = this.tkSelectList[index+1].orderId
|
|
|
setTimeout(() => {
|
|
@@ -745,7 +763,6 @@ export default {
|
|
|
/** 再次 批量退票 */
|
|
|
async moreRefundSubmitFun(index) {
|
|
|
try {
|
|
|
- this.refundSubmitError = []
|
|
|
this.tkDialogVisibleLoading = true
|
|
|
this.refundSubmitAction = this.refundSubmitErrorList[index].orderId
|
|
|
let res = await refundSubmitApi({
|
|
@@ -771,7 +788,7 @@ export default {
|
|
|
if((index+1) < this.refundSubmitErrorList.length) {
|
|
|
this.refundSubmitAction = this.refundSubmitErrorList[index+1].orderId
|
|
|
setTimeout(() => {
|
|
|
- this.refundSubmitFun(index+1)
|
|
|
+ this.moreRefundSubmitFun(index+1)
|
|
|
}, 3000);
|
|
|
}else {
|
|
|
this.tkDialogVisibleLoading = false
|
|
@@ -785,18 +802,20 @@ export default {
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error(index+"===error====",error)
|
|
|
+ console.error("dsfsdfds===",(index+1) < this.refundSubmitErrorList.length
|
|
|
+ )
|
|
|
this.refundSubmitAction = null
|
|
|
this.refundSubmitError.push(this.refundSubmitErrorList[index].orderId)
|
|
|
this.$message.error(`订单号:${this.refundSubmitErrorList[index].orderId},退款提交失败`);
|
|
|
this.tkSelectList.forEach((item1,index1)=>{
|
|
|
if(this.refundSubmitErrorList[index].orderId == item1.orderId){
|
|
|
- this.$set(this.tkSelectList[index1],'errorRemark', '系统问题')
|
|
|
+ this.$set(this.tkSelectList[index1],'errorRemark', error?error.message||error.title||error:'系统问题')
|
|
|
}
|
|
|
})
|
|
|
if((index+1) < this.refundSubmitErrorList.length) {
|
|
|
this.refundSubmitAction = this.refundSubmitErrorList[index+1].orderId
|
|
|
setTimeout(() => {
|
|
|
- this.refundSubmitFun(index+1)
|
|
|
+ this.moreRefundSubmitFun(index+1)
|
|
|
}, 3000);
|
|
|
}else {
|
|
|
this.tkDialogVisibleLoading = false
|