暂存
This commit is contained in:
parent
abf4cf2dc2
commit
58f276922f
@ -7,116 +7,121 @@ const baseURL = process.env.VUE_APP_BASE_API
|
|||||||
|
|
||||||
// 日期格式化
|
// 日期格式化
|
||||||
export function parseTime(time, pattern) {
|
export function parseTime(time, pattern) {
|
||||||
if (arguments.length === 0 || !time) {
|
if (arguments.length === 0 || !time) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
|
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
|
||||||
let date
|
let date
|
||||||
if (typeof time === 'object') {
|
if (typeof time === 'object') {
|
||||||
date = time
|
date = time
|
||||||
} else {
|
} else {
|
||||||
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
|
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
|
||||||
time = parseInt(time)
|
time = parseInt(time)
|
||||||
} else if (typeof time === 'string') {
|
} else if (typeof time === 'string') {
|
||||||
time = time.replace(new RegExp(/-/gm), '/');
|
time = time.replace(new RegExp(/-/gm), '/');
|
||||||
}
|
}
|
||||||
if ((typeof time === 'number') && (time.toString().length === 10)) {
|
if ((typeof time === 'number') && (time.toString().length === 10)) {
|
||||||
time = time * 1000
|
time = time * 1000
|
||||||
}
|
}
|
||||||
date = new Date(time)
|
date = new Date(time)
|
||||||
}
|
}
|
||||||
const formatObj = {
|
const formatObj = {
|
||||||
y: date.getFullYear(),
|
y: date.getFullYear(),
|
||||||
m: date.getMonth() + 1,
|
m: date.getMonth() + 1,
|
||||||
d: date.getDate(),
|
d: date.getDate(),
|
||||||
h: date.getHours(),
|
h: date.getHours(),
|
||||||
i: date.getMinutes(),
|
i: date.getMinutes(),
|
||||||
s: date.getSeconds(),
|
s: date.getSeconds(),
|
||||||
a: date.getDay()
|
a: date.getDay()
|
||||||
}
|
}
|
||||||
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
||||||
let value = formatObj[key]
|
let value = formatObj[key]
|
||||||
// Note: getDay() returns 0 on Sunday
|
// Note: getDay() returns 0 on Sunday
|
||||||
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
|
if (key === 'a') {
|
||||||
if (result.length > 0 && value < 10) {
|
return ['日', '一', '二', '三', '四', '五', '六'][value]
|
||||||
value = '0' + value
|
}
|
||||||
}
|
if (result.length > 0 && value < 10) {
|
||||||
return value || 0
|
value = '0' + value
|
||||||
})
|
}
|
||||||
return time_str
|
return value || 0
|
||||||
|
})
|
||||||
|
return time_str
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
export function resetForm(refName) {
|
export function resetForm(refName) {
|
||||||
if (this.$refs[refName]) {
|
if (this.$refs[refName]) {
|
||||||
this.$refs[refName].resetFields();
|
this.$refs[refName].resetFields();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加日期范围
|
// 添加日期范围
|
||||||
export function addDateRange(params, dateRange) {
|
export function addDateRange(params, dateRange) {
|
||||||
var search = params;
|
var search = params;
|
||||||
search.beginTime = "";
|
search.beginTime = "";
|
||||||
search.endTime = "";
|
search.endTime = "";
|
||||||
if (null != dateRange && '' != dateRange) {
|
if (null != dateRange && '' != dateRange) {
|
||||||
search.beginTime = this.dateRange[0];
|
search.beginTime = this.dateRange[0];
|
||||||
search.endTime = this.dateRange[1];
|
search.endTime = this.dateRange[1];
|
||||||
}
|
}
|
||||||
return search;
|
return search;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 回显数据字典
|
// 回显数据字典
|
||||||
export function selectDictLabel(datas, value) {
|
export function selectDictLabel(datas, value) {
|
||||||
var actions = [];
|
if (value === null || value === undefined) {
|
||||||
Object.keys(datas).some((key) => {
|
return '';
|
||||||
if (datas[key].dictValue == ('' + value)) {
|
}
|
||||||
actions.push(datas[key].dictLabel);
|
var actions = [];
|
||||||
return true;
|
Object.keys(datas).some((key) => {
|
||||||
}
|
if (datas[key].dictValue == ('' + value)) {
|
||||||
})
|
actions.push(datas[key].dictLabel);
|
||||||
return actions.join('');
|
return true;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return actions.join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 回显数据字典(字符串数组)
|
// 回显数据字典(字符串数组)
|
||||||
export function selectDictLabels(datas, value, separator) {
|
export function selectDictLabels(datas, value, separator) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
var currentSeparator = undefined === separator ? "," : separator;
|
var currentSeparator = undefined === separator ? "," : separator;
|
||||||
var temp = value.split(currentSeparator);
|
var temp = value.split(currentSeparator);
|
||||||
Object.keys(value.split(currentSeparator)).some((val) => {
|
Object.keys(value.split(currentSeparator)).some((val) => {
|
||||||
Object.keys(datas).some((key) => {
|
Object.keys(datas).some((key) => {
|
||||||
if (datas[key].dictValue == ('' + temp[val])) {
|
if (datas[key].dictValue == ('' + temp[val])) {
|
||||||
actions.push(datas[key].dictLabel + currentSeparator);
|
actions.push(datas[key].dictLabel + currentSeparator);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return actions.join('').substring(0, actions.join('').length - 1);
|
return actions.join('').substring(0, actions.join('').length - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 通用下载方法
|
// 通用下载方法
|
||||||
export function download(fileName) {
|
export function download(fileName) {
|
||||||
window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true;
|
window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 字符串格式化(%s )
|
// 字符串格式化(%s )
|
||||||
export function sprintf(str) {
|
export function sprintf(str) {
|
||||||
var args = arguments, flag = true, i = 1;
|
var args = arguments, flag = true, i = 1;
|
||||||
str = str.replace(/%s/g, function () {
|
str = str.replace(/%s/g, function () {
|
||||||
var arg = args[i++];
|
var arg = args[i++];
|
||||||
if (typeof arg === 'undefined') {
|
if (typeof arg === 'undefined') {
|
||||||
flag = false;
|
flag = false;
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return arg;
|
return arg;
|
||||||
});
|
});
|
||||||
return flag ? str : '';
|
return flag ? str : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 转换字符串,undefined,null等转化为""
|
// 转换字符串,undefined,null等转化为""
|
||||||
export function praseStrEmpty(str) {
|
export function praseStrEmpty(str) {
|
||||||
if (!str || str == "undefined" || str == "null") {
|
if (!str || str == "undefined" || str == "null") {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,21 +133,23 @@ export function praseStrEmpty(str) {
|
|||||||
* @param {*} rootId 根Id 默认 0
|
* @param {*} rootId 根Id 默认 0
|
||||||
*/
|
*/
|
||||||
export function handleTree(data, id, parentId, children, rootId) {
|
export function handleTree(data, id, parentId, children, rootId) {
|
||||||
id = id || 'id'
|
id = id || 'id'
|
||||||
parentId = parentId || 'parentId'
|
parentId = parentId || 'parentId'
|
||||||
children = children || 'children'
|
children = children || 'children'
|
||||||
rootId = rootId || Math.min.apply(Math, data.map(item => { return item[parentId] })) || 0
|
rootId = rootId || Math.min.apply(Math, data.map(item => {
|
||||||
//对源数据深度克隆
|
return item[parentId]
|
||||||
const cloneData = JSON.parse(JSON.stringify(data))
|
})) || 0
|
||||||
//循环所有项
|
//对源数据深度克隆
|
||||||
const treeData = cloneData.filter(father => {
|
const cloneData = JSON.parse(JSON.stringify(data))
|
||||||
let branchArr = cloneData.filter(child => {
|
//循环所有项
|
||||||
//返回每一项的子级数组
|
const treeData = cloneData.filter(father => {
|
||||||
return father[id] === child[parentId]
|
let branchArr = cloneData.filter(child => {
|
||||||
});
|
//返回每一项的子级数组
|
||||||
branchArr.length > 0 ? father.children = branchArr : '';
|
return father[id] === child[parentId]
|
||||||
//返回第一层
|
});
|
||||||
return father[parentId] === rootId;
|
branchArr.length > 0 ? father.children = branchArr : '';
|
||||||
});
|
//返回第一层
|
||||||
return treeData != '' ? treeData : data;
|
return father[parentId] === rootId;
|
||||||
|
});
|
||||||
|
return treeData != '' ? treeData : data;
|
||||||
}
|
}
|
||||||
|
@ -14,17 +14,17 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="4">
|
<!-- <el-col :span="4">-->
|
||||||
<el-form-item label="电话" prop="phone">
|
<!-- <el-form-item label="电话" prop="phone">-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="queryParams.phone"
|
<!-- v-model="queryParams.phone"-->
|
||||||
placeholder="请输入电话"
|
<!-- placeholder="请输入电话"-->
|
||||||
clearable
|
<!-- clearable-->
|
||||||
size="small"
|
<!-- size="small"-->
|
||||||
@keyup.enter.native="handleQuery"
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="收款方式" prop="payTypeId">
|
<el-form-item label="收款方式" prop="payTypeId">
|
||||||
@ -60,8 +60,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="营养师" prop="nutritionistId">
|
<el-form-item label="主营养师" prop="nutritionistId">
|
||||||
<el-select v-model="queryParams.nutritionistId" placeholder="请选择营养师" clearable size="small">
|
<el-select v-model="queryParams.nutritionistId" placeholder="请选择主营养师" clearable size="small">
|
||||||
<el-option v-for="dict in nutritionistIdOptions"
|
<el-option v-for="dict in nutritionistIdOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictLabel"
|
:label="dict.dictLabel"
|
||||||
@ -176,28 +176,28 @@
|
|||||||
>新增
|
>新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="success"
|
<!-- type="success"-->
|
||||||
icon="el-icon-edit"
|
<!-- icon="el-icon-edit"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
:disabled="single"
|
<!-- :disabled="single"-->
|
||||||
@click="handleUpdate"
|
<!-- @click="handleUpdate"-->
|
||||||
v-hasPermi="['custom:order:edit']"
|
<!-- v-hasPermi="['custom:order:edit']"-->
|
||||||
>修改
|
<!-- >修改-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="danger"
|
<!-- type="danger"-->
|
||||||
icon="el-icon-delete"
|
<!-- icon="el-icon-delete"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
:disabled="multiple"
|
<!-- :disabled="multiple"-->
|
||||||
@click="handleDelete"
|
<!-- @click="handleDelete"-->
|
||||||
v-hasPermi="['custom:order:remove']"
|
<!-- v-hasPermi="['custom:order:remove']"-->
|
||||||
>删除
|
<!-- >删除-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@ -212,28 +212,28 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
<!-- <el-table-column type="selection" width="55" align="center"/>-->
|
||||||
<el-table-column label="编号" align="center" prop="orderId"/>
|
<!-- <el-table-column label="编号" align="center" prop="orderId"/>-->
|
||||||
<el-table-column label="客户姓名" align="center" prop="customer"/>
|
<el-table-column label="成交日期" align="center" prop="orderTime" width="150" fixed="left">
|
||||||
<el-table-column label="电话" align="center" prop="phone"/>
|
|
||||||
<el-table-column label="金额" align="center" prop="amount"/>
|
|
||||||
<el-table-column label="收款方式" align="center" prop="payType"/>
|
|
||||||
<el-table-column label="售前" align="center" prop="preSale"/>
|
|
||||||
<el-table-column label="售后" align="center" prop="afterSale"/>
|
|
||||||
<el-table-column label="营养师" align="center" prop="nutritionist"/>
|
|
||||||
<el-table-column label="助理营养师" align="center" prop="nutriAssis"/>
|
|
||||||
<el-table-column label="账号" align="center" prop="account"/>
|
|
||||||
<el-table-column label="策划" align="center" prop="planner"/>
|
|
||||||
<el-table-column label="策划助理" align="center" prop="plannerAssis"/>
|
|
||||||
<el-table-column label="运营" align="center" prop="operator"/>
|
|
||||||
<el-table-column label="推荐人" align="center" prop="recommender"/>
|
|
||||||
<el-table-column label="成交日期" align="center" prop="orderTime" width="180">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark"/>
|
<el-table-column label="客户姓名" align="center" prop="customer" width="120" fixed="left"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="金额" align="center" prop="amount" width="120" fixed="left"/>
|
||||||
|
<el-table-column label="电话" align="center" prop="phone" width="120"/>
|
||||||
|
<el-table-column label="收款方式" align="center" prop="payType" width="120"/>
|
||||||
|
<el-table-column label="售前" align="center" prop="preSale" width="120"/>
|
||||||
|
<el-table-column label="售后" align="center" prop="afterSale" width="120"/>
|
||||||
|
<el-table-column label="主营养师" align="center" prop="nutritionist" width="120"/>
|
||||||
|
<el-table-column label="助理营养师" align="center" prop="nutriAssis" width="120"/>
|
||||||
|
<el-table-column label="账号" align="center" prop="account" width="120"/>
|
||||||
|
<el-table-column label="策划" align="center" prop="planner" width="120"/>
|
||||||
|
<el-table-column label="策划助理" align="center" prop="plannerAssis" width="120"/>
|
||||||
|
<el-table-column label="运营" align="center" prop="operator" width="120"/>
|
||||||
|
<el-table-column label="推荐人" align="center" prop="recommender" width="120"/>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" width="120"/>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -289,7 +289,7 @@
|
|||||||
v-for="dict in payTypeIdOptions"
|
v-for="dict in payTypeIdOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictLabel"
|
:label="dict.dictLabel"
|
||||||
:value="dict.dictValue"
|
:value="parseInt(dict.dictValue)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -303,7 +303,7 @@
|
|||||||
v-for="dict in preSaleIdOptions"
|
v-for="dict in preSaleIdOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictLabel"
|
:label="dict.dictLabel"
|
||||||
:value="dict.dictValue"
|
:value="parseInt(dict.dictValue)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -316,20 +316,20 @@
|
|||||||
v-for="dict in afterSaleIdOptions"
|
v-for="dict in afterSaleIdOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictLabel"
|
:label="dict.dictLabel"
|
||||||
:value="dict.dictValue"
|
:value="parseInt(dict.dictValue)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="营养师" prop="nutritionistId">
|
<el-form-item label="主营养师" prop="nutritionistId">
|
||||||
<el-select v-model="form.nutritionistId" placeholder="请选择营养师">
|
<el-select v-model="form.nutritionistId" placeholder="请选择主营养师">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in nutritionistIdOptions"
|
v-for="dict in nutritionistIdOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictLabel"
|
:label="dict.dictLabel"
|
||||||
:value="dict.dictValue"
|
:value="parseInt(dict.dictValue)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -342,7 +342,7 @@
|
|||||||
v-for="dict in nutriAssisIdOptions"
|
v-for="dict in nutriAssisIdOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictLabel"
|
:label="dict.dictLabel"
|
||||||
:value="dict.dictValue"
|
:value="parseInt(dict.dictValue)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -356,7 +356,7 @@
|
|||||||
v-for="dict in plannerIdOptions"
|
v-for="dict in plannerIdOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictLabel"
|
:label="dict.dictLabel"
|
||||||
:value="dict.dictValue"
|
:value="parseInt(dict.dictValue)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -369,7 +369,7 @@
|
|||||||
v-for="dict in plannerAssisIdOptions"
|
v-for="dict in plannerAssisIdOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictLabel"
|
:label="dict.dictLabel"
|
||||||
:value="dict.dictValue"
|
:value="parseInt(dict.dictValue)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -382,7 +382,7 @@
|
|||||||
v-for="dict in operatorIdOptions"
|
v-for="dict in operatorIdOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictLabel"
|
:label="dict.dictLabel"
|
||||||
:value="dict.dictValue"
|
:value="parseInt(dict.dictValue)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -395,7 +395,7 @@
|
|||||||
v-for="dict in accountIdOptions"
|
v-for="dict in accountIdOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictLabel"
|
:label="dict.dictLabel"
|
||||||
:value="dict.dictValue"
|
:value="parseInt(dict.dictValue)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -462,7 +462,7 @@
|
|||||||
preSaleIdOptions: [],
|
preSaleIdOptions: [],
|
||||||
// 售后字典
|
// 售后字典
|
||||||
afterSaleIdOptions: [],
|
afterSaleIdOptions: [],
|
||||||
// 营养师字典
|
// 主营养师字典
|
||||||
nutritionistIdOptions: [],
|
nutritionistIdOptions: [],
|
||||||
// 助理营养师字典
|
// 助理营养师字典
|
||||||
nutriAssisIdOptions: [],
|
nutriAssisIdOptions: [],
|
||||||
@ -502,6 +502,9 @@
|
|||||||
amount: [
|
amount: [
|
||||||
{required: true, message: "金额不能为空", trigger: "blur"}
|
{required: true, message: "金额不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
|
orderTime: [
|
||||||
|
{required: true, message: "成交日期不能为空", trigger: "blur"}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -556,7 +559,7 @@
|
|||||||
afterSaleIdFormat(row, column) {
|
afterSaleIdFormat(row, column) {
|
||||||
return this.selectDictLabel(this.afterSaleIdOptions, row.afterSaleId);
|
return this.selectDictLabel(this.afterSaleIdOptions, row.afterSaleId);
|
||||||
},
|
},
|
||||||
// 营养师字典翻译
|
// 主营养师字典翻译
|
||||||
nutritionistIdFormat(row, column) {
|
nutritionistIdFormat(row, column) {
|
||||||
return this.selectDictLabel(this.nutritionistIdOptions, row.nutritionistId);
|
return this.selectDictLabel(this.nutritionistIdOptions, row.nutritionistId);
|
||||||
},
|
},
|
||||||
@ -683,6 +686,19 @@
|
|||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
||||||
|
console.log(this.form)
|
||||||
|
|
||||||
|
this.form.payType = this.selectDictLabel(this.payTypeIdOptions, this.form.payTypeId);
|
||||||
|
this.form.preSale = this.selectDictLabel(this.preSaleIdOptions, this.form.preSaleId);
|
||||||
|
this.form.afterSale = this.selectDictLabel(this.afterSaleIdOptions, this.form.afterSaleId);
|
||||||
|
this.form.nutritionist = this.selectDictLabel(this.nutritionistIdOptions, this.form.nutritionistId);
|
||||||
|
this.form.nutriAssis = this.selectDictLabel(this.nutriAssisIdOptions, this.form.nutriAssisId);
|
||||||
|
this.form.account = this.selectDictLabel(this.accountIdOptions, this.form.accountId);
|
||||||
|
this.form.planner = this.selectDictLabel(this.plannerIdOptions, this.form.plannerId);
|
||||||
|
this.form.plannerAssis = this.selectDictLabel(this.plannerAssisIdOptions, this.form.plannerAssisId);
|
||||||
|
this.form.operator = this.selectDictLabel(this.operatorIdOptions, this.form.operatorId);
|
||||||
|
|
||||||
if (this.form.orderId != null) {
|
if (this.form.orderId != null) {
|
||||||
updateOrder(this.form).then(response => {
|
updateOrder(this.form).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-row :gutter="40" class="panel-group">
|
<el-row :gutter="40" class="panel-group">
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<!-- <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">-->
|
||||||
<div class="card-panel" @click="handleSetLineChartData('newVisitis')">
|
<!-- <div class="card-panel" @click="handleSetLineChartData('newVisitis')">-->
|
||||||
<div class="card-panel-icon-wrapper icon-people">
|
<!-- <div class="card-panel-icon-wrapper icon-people">-->
|
||||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
<!-- <svg-icon icon-class="peoples" class-name="card-panel-icon" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="card-panel-description">
|
<!-- <div class="card-panel-description">-->
|
||||||
<div class="card-panel-text">
|
<!-- <div class="card-panel-text">-->
|
||||||
访客
|
<!-- 访客-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
|
<!-- <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<!-- <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">-->
|
||||||
<div class="card-panel" @click="handleSetLineChartData('messages')">
|
<!-- <div class="card-panel" @click="handleSetLineChartData('messages')">-->
|
||||||
<div class="card-panel-icon-wrapper icon-message">
|
<!-- <div class="card-panel-icon-wrapper icon-message">-->
|
||||||
<svg-icon icon-class="message" class-name="card-panel-icon" />
|
<!-- <svg-icon icon-class="message" class-name="card-panel-icon" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="card-panel-description">
|
<!-- <div class="card-panel-description">-->
|
||||||
<div class="card-panel-text">
|
<!-- <div class="card-panel-text">-->
|
||||||
消息
|
<!-- 消息-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
|
<!-- <count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||||
<div class="card-panel" @click="handleSetLineChartData('purchases')">
|
<div class="card-panel" @click="handleSetLineChartData('purchases')">
|
||||||
<div class="card-panel-icon-wrapper icon-money">
|
<div class="card-panel-icon-wrapper icon-money">
|
||||||
|
@ -7,23 +7,23 @@
|
|||||||
<line-chart :chart-data="lineChartData" />
|
<line-chart :chart-data="lineChartData" />
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="32">
|
<!-- <el-row :gutter="32">-->
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||||
<div class="chart-wrapper">
|
<!-- <div class="chart-wrapper">-->
|
||||||
<raddar-chart />
|
<!-- <raddar-chart />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||||
<div class="chart-wrapper">
|
<!-- <div class="chart-wrapper">-->
|
||||||
<pie-chart />
|
<!-- <pie-chart />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||||
<div class="chart-wrapper">
|
<!-- <div class="chart-wrapper">-->
|
||||||
<bar-chart />
|
<!-- <bar-chart />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
</el-row>
|
<!-- </el-row>-->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user