[add] 退回 撤回
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
{{$t('SynchronousReportLibrary')}}
|
||||
</div>
|
||||
<!-- 强制撤回-->
|
||||
<div @click="handleModule" class="operator-text-title">
|
||||
<div @click="compulsoryWithdrawal" class="operator-text-title">
|
||||
<a-icon type="bulb"/>
|
||||
{{$t('CompulsoryWithdrawal')}}
|
||||
</div>
|
||||
@@ -104,7 +104,7 @@
|
||||
{{$t('submit')}}
|
||||
</div>
|
||||
<!-- 退回-->
|
||||
<div @click="handleAdd" class="operator-text">
|
||||
<div @click="returnData" class="operator-text">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('sendBack')}}
|
||||
</div>
|
||||
@@ -479,6 +479,82 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
// 退回
|
||||
returnData() {
|
||||
let _array = []
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
_array.push(item.id)
|
||||
})
|
||||
let _this = this
|
||||
let param = {ids: _array.join(',')}
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/back',
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.result)
|
||||
_this.getTableList()
|
||||
_this.selectedRowKeysValue=[]
|
||||
}else{
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 强制撤回
|
||||
compulsoryWithdrawal() {
|
||||
let _array = []
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
_array.push(item.id)
|
||||
})
|
||||
let _this = this
|
||||
let param = {ids: _array.join(',')}
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/withdraw',
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.result)
|
||||
_this.getTableList()
|
||||
_this.selectedRowKeysValue=[]
|
||||
}else{
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
handleModule() {
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user