Commit 100a7c2c authored by 许珑标's avatar 许珑标

订单支付逻辑迭代

parent 77604368
......@@ -35,6 +35,14 @@ export function addPayOrder(data) {
})
}
// 发起支付
export function doPay(batchId) {
return request({
url: '/business/payOrder/doPay/' + batchId,
method: 'get',
})
}
// 修改批量支付
export function updatePayOrder(data) {
return request({
......
......@@ -95,7 +95,7 @@
<el-col :span="1.5" style="float: right">
<span v-if="page.total">合计: {{ page.countAmount }} 元</span>
<el-button style="margin-left: 100px" type="primary" icon="el-icon-s-promotion" size="mini"
@click="confirmPay">确认支付</el-button>
@click="confirmPay">提交任务</el-button>
</el-col>
</el-row>
</div>
......@@ -270,18 +270,20 @@ export default {
if (this.transMap && this.transMap.size >= 1000) {
return this.$modal.msgWarning("单次支付不能超过1000条")
}
this.addPanelOpen = true
this.form = {
amount: 0,
payeeAccType: 2,
isPrivateAcc: 1
isPrivateAcc: 1,
payRemark: ''
}
if (this.batchForm.payTitle) {
this.form.payTitle = this.batchForm.payTitle
}
if (this.batchForm.payRemark) {
this.form.payRemark = this.batchForm.payRemark
this.form.payRemark = JSON.parse(JSON.stringify(this.batchForm.payRemark))
}
console.log(this.form)
this.addPanelOpen = true
},
// 删除明细
handleDelete(indexKey, pStr) {
......@@ -367,7 +369,7 @@ export default {
}
this.$refs["batchForm"].validate(valid => {
if (valid) {
this.$confirm('确定提交支付吗?', '提示', {
this.$confirm('确定提交该支付任务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......
......@@ -94,7 +94,7 @@
<el-col :span="1.5" style="float: right">
<span v-if="page.total">合计: {{ page.countAmount }} 元</span>
<el-button style="margin-left: 100px" type="primary" icon="el-icon-s-promotion" size="mini"
@click="confirmPay">确认支付</el-button>
@click="confirmPay">提交任务</el-button>
</el-col>
</el-row>
</div>
......@@ -277,7 +277,8 @@ export default {
this.form = {
amount: 0,
payeeAccType: 1,
isPrivateAcc: 1
isPrivateAcc: 1,
payRemark: ''
}
if (this.batchForm.payTitle) {
this.form.payTitle = this.batchForm.payTitle
......@@ -370,7 +371,7 @@ export default {
}
this.$refs["batchForm"].validate(valid => {
if (valid) {
this.$confirm('确定提交支付吗?', '提示', {
this.$confirm('确定提交该支付任务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......
......@@ -80,6 +80,7 @@
<el-table-column label="支付备注" align="center" prop="payRemark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="scope.row.payStatus && scope.row.payStatus === 1" size="mini" type="text" icon="el-icon-money" @click="doPay(scope.row)">确认支付</el-button>
<el-button size="mini" type="text" icon="el-icon-s-order" @click="viewDetail(scope.row)">查看明细</el-button>
<el-button v-if="scope.row.payStatus && scope.row.payStatus === 4 || scope.row.payStatus === 5" size="mini"
type="text" icon="el-icon-s-promotion" @click="doRepay(scope.row)">失败补发</el-button>
......@@ -100,7 +101,7 @@
</template>
<script>
import { listPayOrder } from "@/api/business/payOrder";
import { addPayOrder, doPay, listPayOrder } from '@/api/business/payOrder'
import RePay from '@/views/business/payDetail/rePay.vue'
export default {
......@@ -205,6 +206,22 @@ export default {
if (child && child === 'child') {
this.getList()
}
},
doPay(row) {
if (row && row.id) {
this.$confirm('确定对该任务[' + row.batchNo + ":" + row.batchPayName + ']进行支付操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
doPay(row.id).then(resp => {
if (200 === resp.code) {
this.$modal.msgSuccess("操作成功");
this.getList()
}
})
}).catch(() => { });
}
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment