feat:
1. 增加确认收款
This commit is contained in:
@@ -48,3 +48,18 @@ export const update = (row) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const confirmPayment = (row) => {
|
||||||
|
return request({
|
||||||
|
url: '/user-order/order/confirm-payment',
|
||||||
|
method: 'post',
|
||||||
|
data: row
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const fillExpress = (id, expressNo) => {
|
||||||
|
return request({
|
||||||
|
url: '/user-order/order/fill-express',
|
||||||
|
method: 'post',
|
||||||
|
data: {id, expressNo}
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -81,6 +81,7 @@ export default {
|
|||||||
label: "快递公司",
|
label: "快递公司",
|
||||||
prop: "expressCompany",
|
prop: "expressCompany",
|
||||||
type: "input",
|
type: "input",
|
||||||
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "快递单号",
|
label: "快递单号",
|
||||||
@@ -97,8 +98,8 @@ export default {
|
|||||||
value: 'dictKey'
|
value: 'dictKey'
|
||||||
},
|
},
|
||||||
dataType: 'number',
|
dataType: 'number',
|
||||||
search: true, },
|
search: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "订单金额",
|
label: "订单金额",
|
||||||
prop: "totalAmount",
|
prop: "totalAmount",
|
||||||
@@ -112,17 +113,32 @@ export default {
|
|||||||
{
|
{
|
||||||
label: "支付方式",
|
label: "支付方式",
|
||||||
prop: "paymentType",
|
prop: "paymentType",
|
||||||
type: "input",
|
type: 'radio',
|
||||||
|
dicUrl: '/blade-system/dict/dictionary?code=app_pay_type',
|
||||||
|
props: {
|
||||||
|
label: 'dictValue',
|
||||||
|
value: 'dictKey'
|
||||||
|
},
|
||||||
|
dataType: 'number',
|
||||||
|
search: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "支付时间",
|
label: "支付时间",
|
||||||
prop: "paymentTime",
|
prop: "paymentTime",
|
||||||
type: "input",
|
type: "input",
|
||||||
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "支付状态",
|
label: "支付状态",
|
||||||
prop: "paymentStatus",
|
prop: "paymentStatus",
|
||||||
type: "input",
|
type: 'radio',
|
||||||
|
dicUrl: '/blade-system/dict/dictionary?code=app_pay_status',
|
||||||
|
props: {
|
||||||
|
label: 'dictValue',
|
||||||
|
value: 'dictKey'
|
||||||
|
},
|
||||||
|
dataType: 'number',
|
||||||
|
search: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "创建人",
|
label: "创建人",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
@size-change="sizeChange"
|
@size-change="sizeChange"
|
||||||
@refresh-change="refreshChange"
|
@refresh-change="refreshChange"
|
||||||
@on-load="onLoad">
|
@on-load="onLoad">
|
||||||
<template #menu-left>
|
<!-- <template #menu-left>-->
|
||||||
<!-- <el-button type="danger"-->
|
<!-- <el-button type="danger"-->
|
||||||
<!-- icon="el-icon-delete"-->
|
<!-- icon="el-icon-delete"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
@@ -31,13 +31,25 @@
|
|||||||
<!-- icon="el-icon-download"-->
|
<!-- icon="el-icon-download"-->
|
||||||
<!-- @click="handleExport">导 出-->
|
<!-- @click="handleExport">导 出-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<template #menu="{ row }">
|
||||||
|
<el-button type="text"
|
||||||
|
icon="el-icon-circle-check"
|
||||||
|
v-if="row.paymentType === 99 && row.orderStatus === 0"
|
||||||
|
@click.stop="handleConfirm(row)">确认收款
|
||||||
|
</el-button>
|
||||||
|
<el-button type="text"
|
||||||
|
icon="el-icon-takeaway-box"
|
||||||
|
v-if="row.orderStatus === 1"
|
||||||
|
@click.stop="handleExpressTrack(row)">填写物流
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getList, getDetail, add, update, remove} from "@/api/common/commonUserOrder";
|
import {getList, getDetail, add, update, remove, confirmPayment, fillExpress} from "@/api/common/commonUserOrder";
|
||||||
import option from "@/option/common/commonUserOrder";
|
import option from "@/option/common/commonUserOrder";
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
import {exportBlob} from "@/api/common";
|
import {exportBlob} from "@/api/common";
|
||||||
@@ -166,6 +178,41 @@
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleConfirm(row) {
|
||||||
|
this.$confirm('确认已经收到货款吗?', {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return confirmPayment(row);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.onLoad(this.page);
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '操作成功!'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleExpressTrack(row) {
|
||||||
|
this.$prompt('请输入快递单号', '快递信息', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
inputPlaceholder: '例如:SF123456789CN',
|
||||||
|
inputPattern: /SF\d{10,}/, // 可选:正则校验
|
||||||
|
inputErrorMessage: '快递单号格式不正确'
|
||||||
|
}).then(({ value }) => {
|
||||||
|
fillExpress(row.id, value)
|
||||||
|
// 用户点击“确定”
|
||||||
|
console.log('用户输入:', value);
|
||||||
|
// 在这里处理你的逻辑,比如调用 API
|
||||||
|
}).catch(() => {
|
||||||
|
// 用户点击“取消”或关闭弹窗
|
||||||
|
this.$message.info('已取消输入');
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
beforeOpen(done, type) {
|
beforeOpen(done, type) {
|
||||||
if (["edit", "view"].includes(type)) {
|
if (["edit", "view"].includes(type)) {
|
||||||
getDetail(this.form.id).then(res => {
|
getDetail(this.form.id).then(res => {
|
||||||
|
|||||||
Reference in New Issue
Block a user