Merge remote-tracking branch 'origin/master'

This commit is contained in:
huangdeliang 2020-11-18 09:27:39 +08:00
commit 78980120e7
5 changed files with 41 additions and 39 deletions
ruoyi-admin/src/main/java/com/ruoyi/web/controller/custom
ruoyi-custom/src/main/java/com/ruoyi/custom
ruoyi-ui/src
utils
views/custom/order

@ -84,7 +84,7 @@ public class SysOrderController extends OrderBaseController {
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.custom.page.OrderTableDataInfo;
import java.math.BigDecimal;
import java.util.List;
public class OrderBaseController extends BaseController {
protected OrderTableDataInfo getOrderDataTable(List<?> list, long totalAmount) {
protected OrderTableDataInfo getOrderDataTable(List<?> list, BigDecimal totalAmount) {
OrderTableDataInfo rspData = new OrderTableDataInfo();
rspData.setCode(HttpStatus.SUCCESS);
rspData.setMsg("查询成功");

@ -2,6 +2,7 @@ package com.ruoyi.custom.page;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
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;
}
public void setTotalAmount(long totalAmount) {
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
public long getTotalAmount() {
public BigDecimal getTotalAmount() {
return totalAmount;
}
}

@ -155,16 +155,10 @@ export function handleTree(data, id, parentId, children, rootId) {
}
/** 数字逢三位加逗号 */
export function toThousands(num) {
var num = (num || 0).toString(), result = '';
while (num.length > 3) {
result = ',' + num.slice(-3) + result;
num = num.slice(0, num.length - 3);
}
if (num) {
result = num + result;
}
return result;
export function toThousands(num){
const str = num.toString();
const reg = str.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g;
return str.replace(reg,"$1,");
}
export function digitUppercase(n) {

@ -198,15 +198,15 @@
<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="reviewStatus" width="80" fixed="left">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag-->
<!-- :type="scope.row.reviewStatus === 'yes' ? 'success' : 'danger'"-->
<!-- disable-transitions>-->
<!-- {{scope.row.reviewStatus === 'yes' ? '已审核':'未审核'}}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="审核状态" align="center" prop="reviewStatus" width="80" fixed="left">
<template slot-scope="scope">
<el-tag
:type="scope.row.reviewStatus === 'yes' ? 'success' : 'danger'"
disable-transitions>
{{scope.row.reviewStatus === 'yes' ? '已审核':'未审核'}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="成交时间" align="center" prop="orderTime" width="180" fixed="left">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -434,18 +434,18 @@
</el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="12" v-hasPermi="['custom:order:review']">-->
<!-- <el-form-item label="审核状态" prop="reviewStatus">-->
<!-- <el-select v-model="form.reviewStatus" placeholder="请选择审核状态">-->
<!-- <el-option-->
<!-- v-for="dict in reviewStatusOptions"-->
<!-- :key="dict.dictValue"-->
<!-- :label="dict.dictLabel"-->
<!-- :value="dict.dictValue"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12" v-hasPermi="['custom:order:review']">
<el-form-item label="审核状态" prop="reviewStatus">
<el-select v-model="form.reviewStatus" placeholder="请选择审核状态" @change="handleOnRviewChange">
<el-option
v-for="dict in reviewStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
@ -469,7 +469,6 @@
const endTime = dayjs().format('YYYY-MM-DD');
// const beginTime = dayjs().format('YYYY-MM-DD');
// const endTime = dayjs().format('YYYY-MM-DD');
export default {
name: "Order",
data() {
@ -493,6 +492,8 @@
//
open: false,
//
review: 'no',
//
daterange: [beginTime, endTime],
//
payTypeIdOptions: [],
@ -558,7 +559,7 @@
{required: true, message: "服务时长不能为空", trigger: "blur"}
],
// reviewStatus: [
// {required: true, message: "", trigger: "blur"}
// {trigger: "change", validator: handleOnPreviewChange}
// ]
},
pickerOptions: {
@ -680,6 +681,7 @@
//
cancel() {
this.open = false;
this.review = 'no';
this.reset();
},
//
@ -718,7 +720,7 @@
recommender: null,
orderTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
serveTimeId: defaultServeTime ? parseInt(defaultServeTime.dictValue) : null,
reviewStatus: 'yes'
reviewStatus: this.review
};
this.resetForm("form");
},
@ -760,6 +762,7 @@
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.orderId != null) {
this.form.reviewStatus = this.review;
updateOrder(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
@ -807,6 +810,9 @@
this.download(response.msg);
}).catch(function () {
});
},
handleOnRviewChange(val) {
this.review = val;
}
}
};