Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
78980120e7
@ -84,7 +84,7 @@ public class SysOrderController extends OrderBaseController {
|
|||||||
order.setPhone(order.getPhone().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
|
order.setPhone(order.getPhone().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return getOrderDataTable(list, totalAmount.longValue());
|
return getOrderDataTable(list, totalAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,11 +5,12 @@ import com.ruoyi.common.constant.HttpStatus;
|
|||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.custom.page.OrderTableDataInfo;
|
import com.ruoyi.custom.page.OrderTableDataInfo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class OrderBaseController extends BaseController {
|
public class OrderBaseController extends BaseController {
|
||||||
|
|
||||||
protected OrderTableDataInfo getOrderDataTable(List<?> list, long totalAmount) {
|
protected OrderTableDataInfo getOrderDataTable(List<?> list, BigDecimal totalAmount) {
|
||||||
OrderTableDataInfo rspData = new OrderTableDataInfo();
|
OrderTableDataInfo rspData = new OrderTableDataInfo();
|
||||||
rspData.setCode(HttpStatus.SUCCESS);
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
rspData.setMsg("查询成功");
|
rspData.setMsg("查询成功");
|
||||||
|
@ -2,6 +2,7 @@ package com.ruoyi.custom.page;
|
|||||||
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class OrderTableDataInfo implements Serializable {
|
public class OrderTableDataInfo implements Serializable {
|
||||||
@ -30,7 +31,7 @@ public class OrderTableDataInfo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 金额总数
|
* 金额总数
|
||||||
*/
|
*/
|
||||||
private long totalAmount;
|
private BigDecimal totalAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表格数据对象
|
* 表格数据对象
|
||||||
@ -81,11 +82,11 @@ public class OrderTableDataInfo implements Serializable {
|
|||||||
this.msg = msg;
|
this.msg = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTotalAmount(long totalAmount) {
|
public void setTotalAmount(BigDecimal totalAmount) {
|
||||||
this.totalAmount = totalAmount;
|
this.totalAmount = totalAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTotalAmount() {
|
public BigDecimal getTotalAmount() {
|
||||||
return totalAmount;
|
return totalAmount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,16 +155,10 @@ export function handleTree(data, id, parentId, children, rootId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 数字逢三位加逗号 */
|
/** 数字逢三位加逗号 */
|
||||||
export function toThousands(num) {
|
export function toThousands(num){
|
||||||
var num = (num || 0).toString(), result = '';
|
const str = num.toString();
|
||||||
while (num.length > 3) {
|
const reg = str.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g;
|
||||||
result = ',' + num.slice(-3) + result;
|
return str.replace(reg,"$1,");
|
||||||
num = num.slice(0, num.length - 3);
|
|
||||||
}
|
|
||||||
if (num) {
|
|
||||||
result = num + result;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function digitUppercase(n) {
|
export function digitUppercase(n) {
|
||||||
|
@ -198,15 +198,15 @@
|
|||||||
|
|
||||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column label="编号" align="center" prop="orderId" width="150" fixed="left"/>
|
<el-table-column label="编号" align="center" prop="orderId" width="150" fixed="left"/>
|
||||||
<!-- <el-table-column label="审核状态" align="center" prop="reviewStatus" width="80" fixed="left">-->
|
<el-table-column label="审核状态" align="center" prop="reviewStatus" width="80" fixed="left">
|
||||||
<!-- <template slot-scope="scope">-->
|
<template slot-scope="scope">
|
||||||
<!-- <el-tag-->
|
<el-tag
|
||||||
<!-- :type="scope.row.reviewStatus === 'yes' ? 'success' : 'danger'"-->
|
:type="scope.row.reviewStatus === 'yes' ? 'success' : 'danger'"
|
||||||
<!-- disable-transitions>-->
|
disable-transitions>
|
||||||
<!-- {{scope.row.reviewStatus === 'yes' ? '已审核':'未审核'}}-->
|
{{scope.row.reviewStatus === 'yes' ? '已审核':'未审核'}}
|
||||||
<!-- </el-tag>-->
|
</el-tag>
|
||||||
<!-- </template>-->
|
</template>
|
||||||
<!-- </el-table-column>-->
|
</el-table-column>
|
||||||
<el-table-column label="成交时间" align="center" prop="orderTime" width="180" fixed="left">
|
<el-table-column label="成交时间" align="center" prop="orderTime" width="180" fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
@ -434,18 +434,18 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="12" v-hasPermi="['custom:order:review']">-->
|
<el-col :span="12" v-hasPermi="['custom:order:review']">
|
||||||
<!-- <el-form-item label="审核状态" prop="reviewStatus">-->
|
<el-form-item label="审核状态" prop="reviewStatus">
|
||||||
<!-- <el-select v-model="form.reviewStatus" placeholder="请选择审核状态">-->
|
<el-select v-model="form.reviewStatus" placeholder="请选择审核状态" @change="handleOnRviewChange">
|
||||||
<!-- <el-option-->
|
<el-option
|
||||||
<!-- v-for="dict in reviewStatusOptions"-->
|
v-for="dict in reviewStatusOptions"
|
||||||
<!-- :key="dict.dictValue"-->
|
:key="dict.dictValue"
|
||||||
<!-- :label="dict.dictLabel"-->
|
:label="dict.dictLabel"
|
||||||
<!-- :value="dict.dictValue"-->
|
:value="dict.dictValue"
|
||||||
<!-- />-->
|
/>
|
||||||
<!-- </el-select>-->
|
</el-select>
|
||||||
<!-- </el-form-item>-->
|
</el-form-item>
|
||||||
<!-- </el-col>-->
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
||||||
@ -469,7 +469,6 @@
|
|||||||
const endTime = dayjs().format('YYYY-MM-DD');
|
const endTime = dayjs().format('YYYY-MM-DD');
|
||||||
// const beginTime = dayjs().format('YYYY-MM-DD');
|
// const beginTime = dayjs().format('YYYY-MM-DD');
|
||||||
// const endTime = dayjs().format('YYYY-MM-DD');
|
// const endTime = dayjs().format('YYYY-MM-DD');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Order",
|
name: "Order",
|
||||||
data() {
|
data() {
|
||||||
@ -493,6 +492,8 @@
|
|||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
//
|
//
|
||||||
|
review: 'no',
|
||||||
|
//
|
||||||
daterange: [beginTime, endTime],
|
daterange: [beginTime, endTime],
|
||||||
// 收款方式字典
|
// 收款方式字典
|
||||||
payTypeIdOptions: [],
|
payTypeIdOptions: [],
|
||||||
@ -558,7 +559,7 @@
|
|||||||
{required: true, message: "服务时长不能为空", trigger: "blur"}
|
{required: true, message: "服务时长不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
// reviewStatus: [
|
// reviewStatus: [
|
||||||
// {required: true, message: "请对数据进行审核", trigger: "blur"}
|
// {trigger: "change", validator: handleOnPreviewChange}
|
||||||
// ]
|
// ]
|
||||||
},
|
},
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
@ -680,6 +681,7 @@
|
|||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.review = 'no';
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
@ -718,7 +720,7 @@
|
|||||||
recommender: null,
|
recommender: null,
|
||||||
orderTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
orderTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
||||||
serveTimeId: defaultServeTime ? parseInt(defaultServeTime.dictValue) : null,
|
serveTimeId: defaultServeTime ? parseInt(defaultServeTime.dictValue) : null,
|
||||||
reviewStatus: 'yes'
|
reviewStatus: this.review
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -760,6 +762,7 @@
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.orderId != null) {
|
if (this.form.orderId != null) {
|
||||||
|
this.form.reviewStatus = this.review;
|
||||||
updateOrder(this.form).then(response => {
|
updateOrder(this.form).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
@ -807,6 +810,9 @@
|
|||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
}).catch(function () {
|
}).catch(function () {
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
handleOnRviewChange(val) {
|
||||||
|
this.review = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user