Commit 3c1e1685 by 徐忆琳

Merge branch 'xuyl_dev_v3.6.0' into 'v3.6.0'

结果导入、导出联调

See merge request !90
2 parents 50497cb2 1c8a6c8b
......@@ -18,7 +18,22 @@ const bankCardApi = {
batchFail(data = {}) {
data.method = `${path}batchFail`
return request(data)
},
//导出
exportList(data = {}) {
data.method = `${path}exportList`
return request(data)
},
// 结果导入
importBankWithdrawal(data = {}) {
data.method = `${path}importBankWithdrawal`
return request(data)
}
}
export { bankCardApi }
......@@ -77,6 +77,7 @@
<el-input
type='textarea'
:rows='2'
maxlength='20'
placeholder='请输入原因说明'
v-model='causeOfFailure'>
</el-input>
......@@ -190,18 +191,32 @@ export default {
})
}
let parmas = {
fileBaseUrl: this.fileBaseUrl,
type: 2
fileUrl: this.fileBaseUrl,
fileType: this.exportTemplate
}
bankCardApi.batchWriteOff({ ...params }).then(res => {
bankCardApi.importBankWithdrawal({ ...parmas }).then(res => {
this.bankCardVisible = false
this.tipsVisible = true
if (res.data) {
this.resultImportRecord = ''
} else {
// importFailedTemplate
}
this.$message({
type: res.data ? 'success' : 'error',
message: res.data ? '导入成功!' : '导入失败!'
})
this.fileBaseUrl = ''
this.fileName = ''
this.$refs.file.value = ''
this.$emit('sendResetTable', 'reset')
// this.bankCardVisible = false
// this.tipsVisible = true
// if (res.data) {
// this.resultImportRecord = ''
// } else {
// }
}).catch(err =>{
this.bankCardVisible = false
this.$message({
type: 'error',
message: '导入失败!'
})
})
}, 300),
......@@ -214,21 +229,22 @@ export default {
})
}
let params = JSON.parse(JSON.stringify(this.bankCardSearchForm))
console.log(params)
// let pageConfig = {
// pageSize: 9999,
// pageNum: 1
// }
// profitApi.exportProfitList({ ...params, ...pageConfig }).then((res) => {
// if (res.code == 0) {
// this.$Utils.exportFn(res.data)
// } else {
// this.$message({
// type: 'error',
// message: '导出失败!'
// })
// }
// })
let pageConfig = {
pageSize: 9999,
pageNum: 1,
fileType: this.derivedType
}
bankCardApi.exportList({ ...params, ...pageConfig }).then((res) => {
if (res.code == 0) {
this.$Utils.exportFn(res.data)
} else {
this.$message({
type: 'error',
message: res.message
})
}
})
this.bankCardVisible = false
},
batchVerificationConfirmation: debounce(function() {
......
......@@ -36,7 +36,8 @@
<span v-if="scope.scope.status == '4'">到账失败</span>
</div>
</d2-table>
<BankCardDialog ref='bankCardDialog' @sendResetTable='reset' :bankCardSearchForm='bankCardSearchForm' :choiceData='choiceData'
<BankCardDialog ref='bankCardDialog' @sendResetTable='reset' :bankCardSearchForm='bankCardSearchForm'
:choiceData='choiceData'
:dialogType='dialogType'></BankCardDialog>
</div>
</template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!