文章分类,订单列表,商品分类,收款记录等页面bug修改

This commit is contained in:
mabo
2021-07-09 17:58:31 +08:00
parent 7331fcbb17
commit 4c0aec2f42
9 changed files with 102 additions and 120 deletions

View File

@@ -22,7 +22,7 @@
</Select>
</Form-item>
<Form-item label="支付时间">
<DatePicker v-model="searchForm" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
<DatePicker v-model="searchForm.paymentTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="changeDate" placeholder="选择支付时间" style="width: 200px"></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
@@ -53,10 +53,9 @@ export default {
pageSize: 10, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
startDate: "", // 起始时间
endDate: "", // 终止时间
sn: "",
payStatus: "",
paymentTime: "",
},
columns: [
{
@@ -151,61 +150,30 @@ export default {
};
},
methods: {
dropDown() {
if (this.drop) {
this.dropDownContent = "展开";
this.dropDownIcon = "ios-arrow-down";
} else {
this.dropDownContent = "收起";
this.dropDownIcon = "ios-arrow-up";
}
this.drop = !this.drop;
},
// 初始化数据
init() {
this.getDataList();
},
// 改变页码
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
},
// 改变页数
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.selectDate = null;
this.searchForm.startDate = "";
this.searchForm.endDate = "";
// 重新加载数据
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
selectDateRange(v) {
if (v) {
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
changeDate (val) { // 改变日期格式
this.searchForm.paymentTime = val
},
// 获取列表
getDataList() {
this.loading = true;
API_Order.paymentLog(this.searchForm).then((res) => {

View File

@@ -23,6 +23,11 @@
type="primary"
>订单取消</Button
>
<Button
v-if="orderInfo.order.orderStatus === 'UNPAID'"
@click="confirmPrice"
type="success"
>收款</Button>
<Button @click="orderLog" type="primary"
>订单日志</Button
>
@@ -571,6 +576,25 @@ export default {
this.showRegion = true;
this.regionId = "";
},
//确认收款
confirmPrice() {
this.$Modal.confirm({
title: "提示",
content:
"<p>您确定要收款吗?线下收款涉及库存变更,需异步进行,等待约一分钟刷新列表查看</p>",
onOk: () => {
API_Order.orderPay(this.sn).then((res) => {
if (res.success) {
this.$Message.success("收款成功");
this.getDataList();
} else {
this.$Message.error(res.message);
}
});
},
});
},
// 获取订单详情
getDataList() {
this.loading = true;
API_Order.orderDetail(this.sn).then((res) => {

View File

@@ -207,20 +207,13 @@ export default {
title: "操作",
key: "action",
align: "center",
width: 150,
width: 100,
render: (h, params) => {
return h("div", [h("Button", {props: {type: "primary", size: "small",},
attrs: {disabled: params.row.orderStatus == "UNPAID" ? false : true,},
return h("Button", {props: {type: "info", size: "small",},
style: {marginRight: "5px",},
on: {click: () => {this.confirmPrice(params.row);},},
}, "收款"
),
h("Button", {props: {type: "info", size: "small",},
style: {marginRight: "5px",},
on: {click: () => {this.detail(params.row);},},
}, "查看"
),
]);
on: {click: () => {this.detail(params.row);},},
}, "查看"
)
},
},
],
@@ -286,25 +279,7 @@ export default {
this.total = this.data.length;
this.loading = false;
},
//确认收款
confirmPrice(v) {
this.$Modal.confirm({
title: "提示",
content:
"<p>您确定要收款吗?线下收款涉及库存变更,需异步进行,等待约一分钟刷新列表查看</p>",
onOk: () => {
API_Order.orderPay(v.sn).then((res) => {
if (res.success) {
this.$Message.success("收款成功");
this.getDataList();
} else {
this.$Message.error(res.message);
}
});
},
});
},
// 跳转详情页面
detail(v) {
let sn = v.sn;
this.$router.push({