This commit is contained in:
xiezhijun
2021-03-12 17:56:43 +08:00
13 changed files with 236 additions and 114 deletions

View File

@ -7,9 +7,9 @@
@closed="handleOnClosed"
size="40%"
>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<div class="app-container contract_drawer_wrapper">
<div class="header">
<section>
<el-button
type="primary"
icon="el-icon-plus"
@ -18,10 +18,18 @@
@click="handleAdd"
>创建合同
</el-button>
</el-col>
</el-row>
</section>
<section>
<el-button
icon="el-icon-refresh"
size="mini"
@click="fetchContractList"
circle
/>
</section>
</div>
<el-table :data="contractList">
<el-table :data="contractList" v-loading="loading">
<el-table-column
label="合同编号"
align="center"
@ -62,7 +70,7 @@
>复制
</el-button>
<el-popover placement="top" trigger="click">
<VueQr :text="copyValue" :logoSrc="logo" size="256"/>
<VueQr :text="copyValue" :logoSrc="logo" size="256" />
<el-button
slot="reference"
icon="el-icon-picture-outline"
@ -126,6 +134,7 @@ export default {
data() {
return {
logo,
loading: false,
visible: false,
title: "",
data: undefined,
@ -140,12 +149,16 @@ export default {
return;
}
this.title = `${this.data.name}」合同列表`;
this.fetchContractList(data.id);
this.visible = true;
this.fetchContractList();
},
fetchContractList(cusId) {
listContract({ customerId: cusId }).then((res) => {
this.contractList = res.rows;
this.visible = true;
fetchContractList() {
this.loading = true;
listContract({ customerId: this.data.id }).then((res) => {
if (res.code === 200) {
this.contractList = res.rows;
}
this.loading = false;
});
},
handleAdd() {
@ -207,4 +220,12 @@ export default {
/deep/ :focus {
outline: 0;
}
.contract_drawer_wrapper {
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
}
</style>

View File

@ -7,26 +7,45 @@
@closed="handleOnClosed"
size="40%"
>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<div class="app-container heat_statisitcs_wrapper">
<div class="header">
<section>
<el-button
icon="el-icon-share"
size="small"
size="mini"
title="点击复制链接"
class="copyBtn"
type="primary"
:data-clipboard-text="copyValue"
@click="handleCopy()"
>外食计算器</el-button
@click="handleCopy"
>外食计算器
</el-button>
<el-popover
placement="bottom"
trigger="click"
style="margin: 0 12px"
>
</el-col>
<el-popover placement="bottom" trigger="click">
<VueQr :text="copyValue" :logoSrc="logo" size="256" />
<el-button slot="reference">二维码</el-button>
</el-popover>
</el-row>
<el-table :data="foodHeatStatisticsList">
<VueQr :text="copyValue" :logoSrc="logo" size="256" />
<el-button
slot="reference"
size="mini"
icon="el-icon-picture-outline"
type="primary"
>二维码
</el-button>
</el-popover>
</section>
<section>
<el-button
icon="el-icon-refresh"
size="mini"
@click="fetchHeatList"
circle
/>
</section>
</div>
<el-table :data="foodHeatStatisticsList" v-loading="loading">
<el-table-column
label="日期"
align="center"
@ -127,6 +146,7 @@ export default {
return {
logo,
visible: false,
loading: false,
title: "",
data: undefined,
foodHeatStatisticsList: [],
@ -148,6 +168,7 @@ export default {
return;
}
this.title = `${this.data.name}」热量统计列表`;
this.visible = true;
this.queryParams.customerId = data.id;
this.copyValue =
window.location.origin.replace("manage", "sign") +
@ -156,10 +177,11 @@ export default {
this.fetchHeatList();
},
fetchHeatList() {
this.loading = true;
listFoodHeatStatistics(this.queryParams).then((response) => {
this.foodHeatStatisticsList = response.rows;
this.total = response.total;
this.visible = true;
this.loading = false;
});
},
handleAdd() {},
@ -205,4 +227,13 @@ export default {
/deep/ :focus {
outline: 0;
}
.heat_statisitcs_wrapper {
.header {
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: space-between;
}
}
</style>

View File

@ -7,9 +7,9 @@
@closed="handleOnClosed"
size="40%"
>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<div class="app-container order_drawer_wrapper">
<div class="header">
<section>
<el-button
type="primary"
icon="el-icon-plus"
@ -18,11 +18,20 @@
@click="handleAdd"
>创建订单
</el-button>
</el-col>
</el-row>
</section>
<section>
<el-button
icon="el-icon-refresh"
size="mini"
@click="fetchOrderList"
circle
/>
</section>
</div>
<el-table
:data="orderList"
v-loading="loading"
row-key="orderId"
default-expand-all
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
@ -132,6 +141,7 @@ export default {
data() {
return {
visible: false,
loading: false,
title: "",
data: undefined,
orderList: [],
@ -149,10 +159,13 @@ export default {
return;
}
this.title = `「${this.data.name}」订单列表`;
this.fetchOrderList(data.id);
this.visible = true;
this.fetchOrderList();
},
fetchOrderList(cusId) {
listOrder({ cusId }).then((res) => {
fetchOrderList() {
this.loading = true;
listOrder({ cusId: this.data.id }).then((res) => {
this.orderList = res.rows.reduce((arr, cur) => {
const tarOrder = arr.find((ord) => ord.startTime === cur.startTime);
if (tarOrder) {
@ -171,8 +184,7 @@ export default {
return arr;
}, []);
// console.log(this.orderList);
this.visible = true;
this.loading = false;
});
},
handleAdd() {
@ -228,4 +240,12 @@ export default {
/deep/ :focus {
outline: 0;
}
.order_drawer_wrapper {
.header {
margin-bottom: 8px;
display: flex;
justify-content: space-between;
align-items: center;
}
}
</style>

View File

@ -7,8 +7,8 @@
size="45%"
>
<div class="app-container recipes_plan_drawer_wrapper">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<div class="header">
<section>
<el-button
v-if="cusOutId"
type="primary"
@ -44,10 +44,18 @@
v-if="fansChannel === 1"
@click="createOneDay"
>
生成1天体验计划
生成7天体验计划
</el-button>
</el-col>
</el-row>
</section>
<section>
<el-button
icon="el-icon-refresh"
size="mini"
@click="getList"
circle
/>
</section>
</div>
<el-table :data="planList" v-loading="planLoading" height="80%">
<el-table-column label="审核状态" align="center" width="80">
@ -140,6 +148,7 @@ import { listRecipesPlanByCusId } from "@/api/custom/recipesPlan";
import { addRecipesPlan } from "@/api/custom/recipesPlan";
import PlanPauseDrawer from "./PlanPauseDrawer";
import VueQr from "vue-qr";
import dayjs from "dayjs";
const logo = require("@/assets/logo/logo_b.png");
export default {
name: "RecipesPlanDrawer",
@ -167,7 +176,7 @@ export default {
},
fanPickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now();
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000;
},
},
};
@ -240,9 +249,9 @@ export default {
addRecipesPlan({
cusId: id,
startNumDay: 1,
endNumDay: 1,
endNumDay: 7,
startDate: this.form.startDate,
endDate: this.form.startDate,
endDate: dayjs(this.form.startDate).add(6, "day").format("YYYY-MM-DD"),
})
.then((res) => {
if (res.code === 200) {
@ -270,5 +279,12 @@ export default {
.recipes_plan_drawer_wrapper {
height: calc(100vh - 77px);
.header {
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: space-between;
}
}
</style>