|
|
|
|
@ -1,71 +1,32 @@ |
|
|
|
|
<template> |
|
|
|
|
<basic-container> |
|
|
|
|
<avue-crud |
|
|
|
|
:option="option" |
|
|
|
|
:table-loading="loading" |
|
|
|
|
:data="data" |
|
|
|
|
:page.sync="page" |
|
|
|
|
ref="crud" |
|
|
|
|
v-model="form" |
|
|
|
|
:permission="permissionList" |
|
|
|
|
:before-open="beforeOpen" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
> |
|
|
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form" |
|
|
|
|
:permission="permissionList" :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange"> |
|
|
|
|
<template slot-scope="scope" slot="materialSearch"> |
|
|
|
|
<el-select v-model="form.material" placeholder="请选择枕头类型"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in materialData" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
></el-option> |
|
|
|
|
<el-option v-for="item in materialData" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="ageSearch"> |
|
|
|
|
<el-select v-model="form.age" placeholder="请选择年龄范围"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in ageData" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
></el-option> |
|
|
|
|
<el-option v-for="item in ageData" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="channelSearch"> |
|
|
|
|
<el-select v-model="form.channel" placeholder="请选择购买渠道"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in channelData" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
></el-option> |
|
|
|
|
<template slot-scope="scope" slot="purchaseChannel"> |
|
|
|
|
<el-select v-model="form.purchaseChannel" placeholder="请选择购买渠道"> |
|
|
|
|
<el-option v-for="item in channelData" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="timeArrSearch"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="form.timeArr" |
|
|
|
|
type="daterange" |
|
|
|
|
range-separator="至" |
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
end-placeholder="结束日期" |
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
format="yyyy-MM-dd" |
|
|
|
|
> |
|
|
|
|
<el-date-picker v-model="form.timeArr" type="daterange" range-separator="至" start-placeholder="开始日期" |
|
|
|
|
end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="hardnessSearch"> |
|
|
|
|
<el-select v-model="form.hardness" placeholder="请选择软硬程度" :disabled="isWinDis"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in hardnessData" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
></el-option> |
|
|
|
|
<el-option v-for="item in hardnessData" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="nameSearch"> |
|
|
|
|
@ -75,16 +36,9 @@ |
|
|
|
|
<el-input v-model="form.phonenumber" placeholder="请输入手机"></el-input> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{ row }" slot="menu"> |
|
|
|
|
<el-button |
|
|
|
|
size="small" |
|
|
|
|
@click="handleDetail(row)" |
|
|
|
|
>查看详情</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
size="small" |
|
|
|
|
@click="handleDelete(row)" |
|
|
|
|
>删除</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="text" icon="el-icon-view" size="small" @click="handleDetail(row)">查看详情</el-button> |
|
|
|
|
<el-button v-if="row.purchaseChannel == ''" type="text" icon="el-icon-edit" size="small" @click="handleEdit(row)">编辑</el-button> |
|
|
|
|
<el-button type="text" icon="el-icon-delete" @click="handleDelete(row)">删除</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="sleepingPosture"> |
|
|
|
|
<div v-show="scope.row.sleepingPosture == 1">仰睡</div> |
|
|
|
|
@ -122,33 +76,26 @@ |
|
|
|
|
<div>{{ scope.row.finishTime !== '' ? scope.row.finishTime : '---/-/---' }}</div> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="position"> |
|
|
|
|
<div>{{(scope.row.province ? scope.row.province : '') + (scope.row.city ? scope.row.city : '') + (scope.row.district ? scope.row.district : '') + (scope.row.detail ? scope.row.detail : '')}}</div> |
|
|
|
|
<div>{{ (scope.row.province ? scope.row.province : '') + (scope.row.city ? scope.row.city : '') + |
|
|
|
|
(scope.row.district ? scope.row.district : '') + (scope.row.detail ? scope.row.detail : '') }}</div> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="menuLeft"> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
size="small" |
|
|
|
|
@click="deleteItem" |
|
|
|
|
>删除</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
size="small" |
|
|
|
|
@click="exportData" |
|
|
|
|
>导出</el-button |
|
|
|
|
> |
|
|
|
|
<el-button icon="el-icon-delete" type="danger" size="small" plain @click="deleteItem">删除</el-button> |
|
|
|
|
<el-button icon="el-icon-download" type="warning" size="small" plain @click="exportData">导出</el-button> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<el-dialog |
|
|
|
|
:visible.sync="dialogVisible" |
|
|
|
|
width="60%" |
|
|
|
|
title="查看详情" |
|
|
|
|
:append-to-body="true" |
|
|
|
|
custom-class="dis_class" |
|
|
|
|
center |
|
|
|
|
> |
|
|
|
|
<el-dialog :visible.sync="dialogVisible" width="60%" :title="diaType=='edit' ? '订单编辑' : '查看详情'" :append-to-body="true" custom-class="dis_class" |
|
|
|
|
center> |
|
|
|
|
<el-descriptions :column="2" class="margin-top" size="small" border> |
|
|
|
|
<el-descriptions-item v-if="diaType != 'edit'"> |
|
|
|
|
<template slot="label">订单编号</template> |
|
|
|
|
<div>{{ checkaccept.orderNo }}</div> |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item v-if="diaType != 'edit'"> |
|
|
|
|
<template slot="label">来源渠道</template> |
|
|
|
|
<div>{{ calcChannel(checkaccept.purchaseChannel) }}</div> |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label">姓名</template> |
|
|
|
|
<div>{{ checkaccept.username }}</div> |
|
|
|
|
@ -182,13 +129,16 @@ |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label">枕头软硬度</template> |
|
|
|
|
<div> |
|
|
|
|
<div>{{ checkaccept.pillowHardness == 1 ? '偏硬' : checkaccept.pillowHardness == 2 ? '适中' : checkaccept.pillowHardness == 3 ? '偏软' : '' }}</div> |
|
|
|
|
<div>{{ checkaccept.pillowHardness == 1 ? '偏硬' : checkaccept.pillowHardness == 2 ? '适中' : |
|
|
|
|
checkaccept.pillowHardness == 3 ? '偏软' : '' }}</div> |
|
|
|
|
</div> |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label">枕头类型</template> |
|
|
|
|
<div> |
|
|
|
|
<div>{{ checkaccept.pillowMaterial == 1 ? '羽丝绒枕' : checkaccept.pillowMaterial == 2 ? '草本植物枕(荞麦、决明子等)' : checkaccept.pillowMaterial == 3 ? '乳胶枕' : checkaccept.pillowMaterial == 4 ? '慢回弹记忆枕' : checkaccept.pillowMaterial == 5 ? '软管枕' : checkaccept.pillowMaterial == 6 ? '其他' : '' }}</div> |
|
|
|
|
<div>{{ checkaccept.pillowMaterial == 1 ? '羽丝绒枕' : checkaccept.pillowMaterial == 2 ? '草本植物枕(荞麦、决明子等)' : |
|
|
|
|
checkaccept.pillowMaterial == 3 ? '乳胶枕' : checkaccept.pillowMaterial == 4 ? '慢回弹记忆枕' : |
|
|
|
|
checkaccept.pillowMaterial == 5 ? '软管枕' : checkaccept.pillowMaterial == 6 ? '其他' : '' }}</div> |
|
|
|
|
</div> |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
@ -227,7 +177,42 @@ |
|
|
|
|
<div>{{ checkaccept.otherNeed }}</div> |
|
|
|
|
</div> |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item v-if="diaType != 'edit'"> |
|
|
|
|
<template slot="label">备注</template> |
|
|
|
|
<div>{{ checkaccept.remark }}</div> |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
</el-descriptions> |
|
|
|
|
<el-form style="margin-top: 20px;" v-if="diaType == 'edit'" label-width="80px"> |
|
|
|
|
<el-row gutter="20"> |
|
|
|
|
<el-col span="12"> |
|
|
|
|
<el-form-item label="订单号"> |
|
|
|
|
<el-input v-model="checkaccept.orderNo" type="text" placeholder="请输入订单号" maxlength="30" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col span="12"> |
|
|
|
|
<el-form-item label="渠道来源"> |
|
|
|
|
<el-select v-model="checkaccept.purchaseChannel" placeholder="请选择购买渠道" style="width:100%;"> |
|
|
|
|
<el-option v-for="item in channelData" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col span="24"> |
|
|
|
|
<el-form-item label="备注"> |
|
|
|
|
<el-input |
|
|
|
|
type="textarea" |
|
|
|
|
placeholder="请输入备注" |
|
|
|
|
v-model="checkaccept.remark" |
|
|
|
|
maxlength="200" |
|
|
|
|
show-word-limit |
|
|
|
|
> |
|
|
|
|
</el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
<span slot="footer" class="dialog-footer" v-show="diaType == 'edit'"> |
|
|
|
|
<el-button type="primary" @click="handlieConfirm">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
@ -235,7 +220,7 @@ |
|
|
|
|
<script> |
|
|
|
|
// import { mapGetters } from "vuex"; |
|
|
|
|
// import {getBaseList,getTypeList} from "@/api/base" |
|
|
|
|
import {getList,exportList,deleteList,detailList} from "@/api/statistics/statistics" |
|
|
|
|
import { getList, exportList, deleteList, detailList, getPurchaseChannel,customMadeInfoSave } from "@/api/statistics/statistics" |
|
|
|
|
// import { getToken } from "@/util/auth"; |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
@ -244,9 +229,9 @@ export default { |
|
|
|
|
form: {}, |
|
|
|
|
dialogVisible: false, |
|
|
|
|
channelData: [ |
|
|
|
|
{label:'微信商城',value:0}, |
|
|
|
|
{label:'抖音商城',value:1}, |
|
|
|
|
{label:'微信小程序',value:2}, |
|
|
|
|
// { label: '微信商城', value: 0 }, |
|
|
|
|
// { label: '抖音商城', value: 1 }, |
|
|
|
|
// { label: '微信小程序', value: 2 }, |
|
|
|
|
], |
|
|
|
|
statusData: [ |
|
|
|
|
{ label: "待处理", value: "0" }, |
|
|
|
|
@ -297,6 +282,14 @@ export default { |
|
|
|
|
editBtn: false, |
|
|
|
|
delBtn: false, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "订单编号", |
|
|
|
|
prop: "orderNo", |
|
|
|
|
search: true, |
|
|
|
|
searchslot: true, |
|
|
|
|
minWidth: '120', |
|
|
|
|
// searchSpan: 4, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "姓名", |
|
|
|
|
prop: "name", |
|
|
|
|
@ -341,7 +334,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "购买渠道", |
|
|
|
|
prop: "channel", |
|
|
|
|
prop: "purchaseChannel", |
|
|
|
|
search: true, |
|
|
|
|
searchslot: true, |
|
|
|
|
hide: true, |
|
|
|
|
@ -446,11 +439,19 @@ export default { |
|
|
|
|
slot: true, |
|
|
|
|
align: "center", |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// label: "购买渠道", |
|
|
|
|
// prop: "purchaseChannel", |
|
|
|
|
// type: "select", |
|
|
|
|
// search: true, |
|
|
|
|
// slot: true, |
|
|
|
|
// align: "center", |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
label: "购买渠道", |
|
|
|
|
prop: "road", |
|
|
|
|
label: "备注", |
|
|
|
|
prop: "remark", |
|
|
|
|
slot: true, |
|
|
|
|
align: "center", |
|
|
|
|
overHidden: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '提交时间', |
|
|
|
|
@ -484,10 +485,9 @@ export default { |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
// this.headers["Blade-Auth"] = "bearer " + getToken(); |
|
|
|
|
// this.getTime(); |
|
|
|
|
// this.getWinData(); |
|
|
|
|
// this.getTypeData(); |
|
|
|
|
getPurchaseChannel().then(res => { |
|
|
|
|
this.channelData = res.data.data; |
|
|
|
|
}) |
|
|
|
|
this.onLoad() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
@ -497,6 +497,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
handleDetail(row) { |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
this.diaType = 'detail'; |
|
|
|
|
detailList({ id: row.id }).then(res => { |
|
|
|
|
console.log(res) |
|
|
|
|
this.checkaccept = res.data.data; |
|
|
|
|
@ -689,8 +690,39 @@ export default { |
|
|
|
|
importRegister() { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
handleEdit() { |
|
|
|
|
this.$router.push({ path: "/request/add" }); |
|
|
|
|
//渠道来源 |
|
|
|
|
calcChannel(channel) { |
|
|
|
|
let idx = this.channelData.findIndex(item => { return item.dictKey == channel }); |
|
|
|
|
return idx > -1 ? this.channelData[idx].dictValue : '' |
|
|
|
|
}, |
|
|
|
|
//订单编辑 |
|
|
|
|
handleEdit(row) { |
|
|
|
|
// this.$router.push({ path: "/request/add" }); |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
this.diaType = 'edit'; |
|
|
|
|
detailList({ id: row.id }).then(res => { |
|
|
|
|
this.checkaccept = res.data.data; |
|
|
|
|
this.checkaccept.position = this.checkaccept.province + |
|
|
|
|
this.checkaccept.city + |
|
|
|
|
this.checkaccept.district + |
|
|
|
|
this.checkaccept.detail |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
handlieConfirm() { |
|
|
|
|
if(this.checkaccept.orderNo == '') { |
|
|
|
|
this.$message.warning('请输入订单号'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if(this.checkaccept.purchaseChannel == '') { |
|
|
|
|
this.$message.warning('请选择订单来源'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
customMadeInfoSave(this.checkaccept).then(res => { |
|
|
|
|
this.$message.success('订单编辑成功'); |
|
|
|
|
this.dialogVisible = false; |
|
|
|
|
this.onLoad(); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handleDelete(row) { |
|
|
|
|
this.$confirm(`确认删除当前数据吗?`, { |
|
|
|
|
@ -746,6 +778,7 @@ export default { |
|
|
|
|
.is-bordered-label { |
|
|
|
|
width: 15% !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-descriptions .is-bordered .el-descriptions-item__cell { |
|
|
|
|
width: 35%; |
|
|
|
|
height: 50px; |
|
|
|
|
|