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