报名单编辑

main
xuechunyuan 2 years ago
parent 7a9519574a
commit a758931cf5
  1. 11
      src/api/order/order.js
  2. 16
      src/api/statistics/statistics.js
  3. 143
      src/views/order/index.vue
  4. 695
      src/views/statistics/index.vue

@ -43,11 +43,18 @@ export const getDetail = (query) => {
params: query, params: query,
}); });
}; };
//修改订单物流单号
export const confirmgoods = (data) => { export const confirmgoods = (data) => {
let formdata = new FormData();
Object.keys(data).map(key => {
formdata.append(key, data[key]);
})
return request({ return request({
url: "/api/blade-desk/order/updateLogistics", url: "/api/blade-desk/order/updateLogistics",
method: "post", method: "post",
data, headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data: formdata,
}); });
}; };

@ -34,3 +34,19 @@ export const detailList = (query) => {
params: query, params: query,
}); });
}; };
//购买渠道
export const getPurchaseChannel = (query) => {
return request({
url: "/api/blade-system/dict-biz/get-purchase-channel",
method: "get",
params: query,
});
};
//修改报名单接口
export const customMadeInfoSave = (data) => {
return request({
url: "/api/blade-desk/custom-made-info/save",
method: "post",
data: data,
});
};

@ -43,9 +43,9 @@
></el-input> ></el-input>
</template> </template>
<template slot-scope="{ row }" slot="menu"> <template slot-scope="{ row }" slot="menu">
<el-button size="small" @click="handleDetail(row)">查看详情</el-button> <el-button type="text" icon="el-icon-view" size="small" @click="handleDetail(row)">查看详情</el-button>
<!-- <el-button size="small" @click="handleDelete(row)">删除</el-button> --> <!-- <el-button size="small" @click="handleDelete(row)">删除</el-button> -->
<el-button :disabled='row.status == 1 || row.status == 3 || row.status == 4' size="small" @click="handleSend(row)">发货</el-button> <el-button type="text" icon="el-icon-s-promotion" :disabled='row.status == 1 || row.status == 3 || row.status == 4' size="small" @click="handleSend(row)">发货</el-button>
</template> </template>
<!-- <template slot-scope="scope" slot="sleepingPosture"> <!-- <template slot-scope="scope" slot="sleepingPosture">
<div v-show="scope.row.sleepingPosture == 1">仰睡</div> <div v-show="scope.row.sleepingPosture == 1">仰睡</div>
@ -61,7 +61,7 @@
<!-- <el-button type="danger" size="small" @click="deleteItem" <!-- <el-button type="danger" size="small" @click="deleteItem"
>删除</el-button >删除</el-button
> --> > -->
<el-button type="primary" size="small" @click="exportData" <el-button icon="el-icon-download" type="warning" size="small" @click="exportData" plain
>导出</el-button >导出</el-button
> >
</template> </template>
@ -74,7 +74,7 @@
custom-class="dis_class" custom-class="dis_class"
center center
> >
<div class="basic_box" v-show="!isShowInfo"> <div class="basic_box">
<el-descriptions :column="2" class="margin-top" size="small" border> <el-descriptions :column="2" class="margin-top" size="small" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">姓名</template> <template slot="label">姓名</template>
@ -113,15 +113,15 @@
</el-descriptions> </el-descriptions>
<div class="number_box" v-show="diaType == 'send'"> <div class="number_box" v-show="diaType == 'send'">
<p>请选择快递公司</p> <p>请选择快递公司</p>
<el-select v-model="company"> <el-select v-model="checkaccept.logisticsCompanyCode">
<el-option v-for="item in companyData" :key="item.dictKey" :value="item.dictKey" :label="item.dictValue"></el-option> <el-option v-for="item in companyData" :key="item.dictKey" :value="item.dictKey" :label="item.dictValue"></el-option>
</el-select> </el-select>
</div> </div>
<div class="number_box" v-show="diaType == 'send'"> <div class="number_box" v-show="diaType == 'send'">
<p>请输入快递单号</p> <p>请输入快递单号</p>
<el-input></el-input> <el-input v-model="checkaccept.logisticsNo" placeholder="请输入快递单号" maxlength="30"></el-input>
</div> </div>
<div class="info_box" v-show="diaType == 'view' && checkaccept.orderStatus == 1"> <div class="info_box" v-show="diaType == 'view' && checkaccept.status == 3">
<p>物流信息:</p> <p>物流信息:</p>
<p class="info_view" @click="viewWiliu">查看物流信息</p> <p class="info_view" @click="viewWiliu">查看物流信息</p>
</div> </div>
@ -159,7 +159,7 @@ import {
deleteList, deleteList,
detailList, detailList,
} from "@/api/statistics/statistics"; } from "@/api/statistics/statistics";
import {getWuliuInfo,getOrderList,exportList,getComPanyList,getDetail} from "@/api/order/order" import {getWuliuInfo,getOrderList,exportList,getComPanyList,getDetail,confirmgoods} from "@/api/order/order"
// import { getToken } from "@/util/auth"; // import { getToken } from "@/util/auth";
import md5 from "js-md5"; import md5 from "js-md5";
export default { export default {
@ -526,7 +526,30 @@ export default {
}, },
// //
handlieConfirm(){ handlieConfirm(){
// confirmgoods() if(this.checkaccept.logisticsCompanyCode == '') {
this.$message.warning('请选择物流公司');
return;
}
if(this.checkaccept.logisticsNo == '') {
this.$message.warning('请输入快递单号');
return;
}
let idx = this.companyData.findIndex(item => { return item.dictKey == this.checkaccept.logisticsCompanyCode });
let logisticsCompany = '';
if(idx > -1) {
logisticsCompany = this.companyData[idx].dictValue;
}
this.$confirm(`确认该订单已发货吗?`, {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
confirmgoods({ id:this.checkaccept.id, logisticsCompany: logisticsCompany, logisticsCompanyCode: this.checkaccept.logisticsCompanyCode, logisticsNo: this.checkaccept.logisticsNo }).then(res => {
this.$message.success('发货信息保存成功');
this.dialogVisible = false;
this.onLoad();
})
});
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
@ -567,9 +590,9 @@ export default {
customer: "1C32AD38DC92D3A1950391AD766C7F6D", customer: "1C32AD38DC92D3A1950391AD766C7F6D",
sign: "", sign: "",
param: JSON.stringify({ param: JSON.stringify({
"com": 'zhongtong', "com": this.checkaccept.logisticsCompanyCode,
"num": '78713552736238', "num": this.checkaccept.logisticsNo,
"phone": '17852327323', "phone": this.checkaccept.consigneePhone,
"from": "", "from": "",
"to": "", "to": "",
"resultv2": "4", "resultv2": "4",
@ -578,55 +601,55 @@ export default {
}) })
} }
param.sign = md5(param.param + 'ubdRnSOv5517' + param.customer).toUpperCase(); param.sign = md5(param.param + 'ubdRnSOv5517' + param.customer).toUpperCase();
this.activities = [ // this.activities = [
{ // {
status:'投柜或驿站', // status:'驿',
context: '【青岛市】 快件已被 菜鸟的【青岛康泰源惠客友超市店】代收,【取件地址:青岛康泰源惠客友超市店】,请及时取件。如有疑问请联系:15805321109,投诉电话:0532-88985563', // context: ' 158053211090532-88985563',
time: '2023-08-18 10:33:33' // time: '2023-08-18 10:33:33'
}, // },
{ // {
status:'派件', // status:'',
context: '【青岛市】青岛市中五二部(0532-88985563)业务员【杨金梅,19106394524】正在为您派件(95720为中通快递员外呼专属号码,请放心接听,如有问题可联系投诉电话:0532-88985563)', // context: '0532-88985563,19106394524957200532-88985563',
time: '2023-08-18 08:08:38' // time: '2023-08-18 08:08:38'
}, // },
{ // {
status:'在途', // status:'',
context: '【青岛市】 快件已到达 青岛市中五二部', // context: ' ',
time: '2023-08-18 08:08:33' // time: '2023-08-18 08:08:33'
}, // },
{ // {
status:'在途', // status:'',
context: '【青岛市】 快件已发往 青岛市中五二部', // context: ' ',
time: '2023-08-18 04:36:56' // time: '2023-08-18 04:36:56'
}, // },
{ // {
status:'在途', // status:'',
context: '【青岛市】 快件已到达 青岛中转部', // context: ' ',
time: '2023-08-18 01:04:40' // time: '2023-08-18 01:04:40'
}, // },
{ // {
status:'在途', // status:'',
context: '【昆明市】 快件已发往 青岛中转部', // context: ' ',
time: '2023-08-16 00:51:30' // time: '2023-08-16 00:51:30'
}, // },
{ // {
status:'在途', // status:'',
context: '【昆明市】 快件已到达 昆明中转', // context: ' ',
time: '2023-08-15 15:30:16' // time: '2023-08-15 15:30:16'
}, { // }, {
status:'在途', // status:'',
context: '【丽江市】 快件已发往 昆明中转', // context: ' ',
time: '2023-08-14 19:02:02' // time: '2023-08-14 19:02:02'
}, { // }, {
status:'揽收', // status:'',
context: '【丽江市】 【丽江华坪县】(0888-8834031) 的 P1陈平(15108866686) 已揽收', // context: ' 0888-8834031 P115108866686 ',
time: '2023-08-14 19:01:18' // time: '2023-08-14 19:01:18'
}], // }],
this.activities[0].status = this.activities[0].status == '在途' ? '运输中' : this.activities[0].status // this.activities[0].status = this.activities[0].status == '' ? '' : this.activities[0].status
this.activities[0].color = '#0bbd87' // this.activities[0].color = '#0bbd87'
console.log(this.activities) // console.log(this.activities)
getWuliuInfo(param).then(res =>{ getWuliuInfo(param).then(res =>{
console.log(res) // console.log(res)
this.activities = res.data.data this.activities = res.data.data
}) })
}, },

@ -1,71 +1,32 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
:option="option" :permission="permissionList" :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
:table-loading="loading" @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
:data="data" @refresh-change="refreshChange">
: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"> <template slot-scope="scope" slot="materialSearch">
<el-select v-model="form.material" placeholder="请选择枕头类型"> <el-select v-model="form.material" placeholder="请选择枕头类型">
<el-option <el-option v-for="item in materialData" :key="item.value" :label="item.label" :value="item.value"></el-option>
v-for="item in materialData"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</template> </template>
<template slot-scope="scope" slot="ageSearch"> <template slot-scope="scope" slot="ageSearch">
<el-select v-model="form.age" placeholder="请选择年龄范围"> <el-select v-model="form.age" placeholder="请选择年龄范围">
<el-option <el-option v-for="item in ageData" :key="item.value" :label="item.label" :value="item.value"></el-option>
v-for="item in ageData"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</template> </template>
<template slot-scope="scope" slot="channelSearch"> <template slot-scope="scope" slot="purchaseChannel">
<el-select v-model="form.channel" placeholder="请选择购买渠道"> <el-select v-model="form.purchaseChannel" placeholder="请选择购买渠道">
<el-option <el-option v-for="item in channelData" :key="item.value" :label="item.label" :value="item.value"></el-option>
v-for="item in channelData"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</template> </template>
<template slot-scope="scope" slot="timeArrSearch"> <template slot-scope="scope" slot="timeArrSearch">
<el-date-picker <el-date-picker v-model="form.timeArr" type="daterange" range-separator="" start-placeholder="开始日期"
v-model="form.timeArr" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd">
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
>
</el-date-picker> </el-date-picker>
</template> </template>
<template slot-scope="scope" slot="hardnessSearch"> <template slot-scope="scope" slot="hardnessSearch">
<el-select v-model="form.hardness" placeholder="请选择软硬程度" :disabled="isWinDis"> <el-select v-model="form.hardness" placeholder="请选择软硬程度" :disabled="isWinDis">
<el-option <el-option v-for="item in hardnessData" :key="item.value" :label="item.label" :value="item.value"></el-option>
v-for="item in hardnessData"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</template> </template>
<template slot-scope="scope" slot="nameSearch"> <template slot-scope="scope" slot="nameSearch">
@ -75,83 +36,69 @@
<el-input v-model="form.phonenumber" placeholder="请输入手机"></el-input> <el-input v-model="form.phonenumber" placeholder="请输入手机"></el-input>
</template> </template>
<template slot-scope="{ row }" slot="menu"> <template slot-scope="{ row }" slot="menu">
<el-button <el-button type="text" icon="el-icon-view" size="small" @click="handleDetail(row)">查看详情</el-button>
size="small" <el-button v-if="row.purchaseChannel == ''" type="text" icon="el-icon-edit" size="small" @click="handleEdit(row)">编辑</el-button>
@click="handleDetail(row)" <el-button type="text" icon="el-icon-delete" @click="handleDelete(row)">删除</el-button>
>查看详情</el-button
>
<el-button
size="small"
@click="handleDelete(row)"
>删除</el-button
>
</template> </template>
<template slot-scope="scope" slot="sleepingPosture"> <template slot-scope="scope" slot="sleepingPosture">
<div v-show="scope.row.sleepingPosture == 1" >仰睡</div> <div v-show="scope.row.sleepingPosture == 1">仰睡</div>
<div v-show="scope.row.sleepingPosture == 2" >侧睡</div> <div v-show="scope.row.sleepingPosture == 2">侧睡</div>
</template> </template>
<template slot-scope="scope" slot="road"> <template slot-scope="scope" slot="road">
<div v-show="scope.row.road == 0" >微信商城</div> <div v-show="scope.row.road == 0">微信商城</div>
<div v-show="scope.row.road == 1" >抖音商城</div> <div v-show="scope.row.road == 1">抖音商城</div>
<div v-show="scope.row.road == 2" >微信小程序</div> <div v-show="scope.row.road == 2">微信小程序</div>
</template> </template>
<template slot-scope="scope" slot="neckShoulderWidth"> <template slot-scope="scope" slot="neckShoulderWidth">
<div v-show="scope.row.neckShoulderWidth != '-1'" >{{scope.row.neckShoulderWidth}}</div> <div v-show="scope.row.neckShoulderWidth != '-1'">{{ scope.row.neckShoulderWidth }}</div>
</template> </template>
<template slot-scope="scope" slot="neckLength"> <template slot-scope="scope" slot="neckLength">
<div v-show="scope.row.neckLength != '-1'" >{{scope.row.neckLength}}</div> <div v-show="scope.row.neckLength != '-1'">{{ scope.row.neckLength }}</div>
</template> </template>
<template slot-scope="scope" slot="cervicalVertebra"> <template slot-scope="scope" slot="cervicalVertebra">
<div v-show="scope.row.cervicalVertebra == 1" ></div> <div v-show="scope.row.cervicalVertebra == 1"></div>
<div v-show="scope.row.cervicalVertebra == 0" ></div> <div v-show="scope.row.cervicalVertebra == 0"></div>
</template> </template>
<template slot-scope="scope" slot="pillowHardness"> <template slot-scope="scope" slot="pillowHardness">
<div v-show="scope.row.pillowHardness == 1" >偏硬</div> <div v-show="scope.row.pillowHardness == 1">偏硬</div>
<div v-show="scope.row.pillowHardness == 2" >适中</div> <div v-show="scope.row.pillowHardness == 2">适中</div>
<div v-show="scope.row.pillowHardness == 3" >偏软</div> <div v-show="scope.row.pillowHardness == 3">偏软</div>
</template> </template>
<template slot-scope="scope" slot="pillowMaterial"> <template slot-scope="scope" slot="pillowMaterial">
<div v-show="scope.row.pillowMaterial == 1" >羽丝绒枕</div> <div v-show="scope.row.pillowMaterial == 1">羽丝绒枕</div>
<div v-show="scope.row.pillowMaterial == 2" >草本植物枕(荞麦决明子等)</div> <div v-show="scope.row.pillowMaterial == 2">草本植物枕(荞麦决明子等)</div>
<div v-show="scope.row.pillowMaterial == 3" >乳胶枕</div> <div v-show="scope.row.pillowMaterial == 3">乳胶枕</div>
<div v-show="scope.row.pillowMaterial == 4" >慢回弹记忆枕</div> <div v-show="scope.row.pillowMaterial == 4">慢回弹记忆枕</div>
<div v-show="scope.row.pillowMaterial == 5" >软管枕</div> <div v-show="scope.row.pillowMaterial == 5">软管枕</div>
<div v-show="scope.row.pillowMaterial == 6" >其他</div> <div v-show="scope.row.pillowMaterial == 6">其他</div>
</template> </template>
<template slot-scope="scope" slot="finishTime"> <template slot-scope="scope" slot="finishTime">
<div>{{scope.row.finishTime !== '' ? scope.row.finishTime : '---/-/---'}}</div> <div>{{ scope.row.finishTime !== '' ? scope.row.finishTime : '---/-/---' }}</div>
</template> </template>
<template slot-scope="scope" slot="position"> <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 : '') +
</template> (scope.row.district ? scope.row.district : '') + (scope.row.detail ? scope.row.detail : '') }}</div>
</template>
<template slot-scope="scope" slot="menuLeft"> <template slot-scope="scope" slot="menuLeft">
<el-button <el-button icon="el-icon-delete" type="danger" size="small" plain @click="deleteItem">删除</el-button>
type="danger" <el-button icon="el-icon-download" type="warning" size="small" plain @click="exportData">导出</el-button>
size="small"
@click="deleteItem"
>删除</el-button
>
<el-button
type="primary"
size="small"
@click="exportData"
>导出</el-button
>
</template> </template>
</avue-crud> </avue-crud>
<el-dialog <el-dialog :visible.sync="dialogVisible" width="60%" :title="diaType=='edit' ? '订单编辑' : '查看详情'" :append-to-body="true" custom-class="dis_class"
:visible.sync="dialogVisible" center>
width="60%"
title="查看详情"
:append-to-body="true"
custom-class="dis_class"
center
>
<el-descriptions :column="2" class="margin-top" size="small" border> <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> <el-descriptions-item>
<template slot="label">姓名</template> <template slot="label">姓名</template>
<div >{{checkaccept.username}}</div> <div>{{ checkaccept.username }}</div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">手机</template> <template slot="label">手机</template>
@ -159,75 +106,113 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">身高</template> <template slot="label">身高</template>
<div >{{ checkaccept.height }}</div> <div>{{ checkaccept.height }}</div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
<div >体重</div> <div>体重</div>
</template> </template>
<div >{{ checkaccept.weight }}</div> <div>{{ checkaccept.weight }}</div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
<div >地址</div> <div>地址</div>
</template> </template>
<div style="width: 158px">{{ checkaccept.position }}</div> <div style="width: 158px">{{ checkaccept.position }}</div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">睡眠姿势</template> <template slot="label">睡眠姿势</template>
<div > <div>
{{ checkaccept.sleepingPosture == 1 ? '仰睡' : checkaccept.sleepingPosture == 2 ? '侧睡' : '' }} {{ checkaccept.sleepingPosture == 1 ? '仰睡' : checkaccept.sleepingPosture == 2 ? '侧睡' : '' }}
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">枕头软硬度</template> <template slot="label">枕头软硬度</template>
<div > <div>
<div>{{ checkaccept.pillowHardness == 1 ? '偏硬' : checkaccept.pillowHardness == 2 ? '适中' : checkaccept.pillowHardness == 3 ? '偏软' : '' }}</div> <div>{{ checkaccept.pillowHardness == 1 ? '偏硬' : checkaccept.pillowHardness == 2 ? '适中' :
checkaccept.pillowHardness == 3 ? '偏软' : '' }}</div>
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">枕头类型</template> <template slot="label">枕头类型</template>
<div > <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> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">颈肩宽度</template> <template slot="label">颈肩宽度</template>
<div > <div>
<div>{{ checkaccept.neckShoulderWidth == '-1' ? '' : checkaccept.neckShoulderWidth }}</div> <div>{{ checkaccept.neckShoulderWidth == '-1' ? '' : checkaccept.neckShoulderWidth }}</div>
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">颈长</template> <template slot="label">颈长</template>
<div > <div>
<div>{{ checkaccept.neckLength == '-1' ? '' : checkaccept.neckLength }}</div> <div>{{ checkaccept.neckLength == '-1' ? '' : checkaccept.neckLength }}</div>
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">年龄范围</template> <template slot="label">年龄范围</template>
<div > <div>
<div>{{ checkaccept.ageRange }}</div> <div>{{ checkaccept.ageRange }}</div>
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">睡眠时长</template> <template slot="label">睡眠时长</template>
<div > <div>
<div>{{ checkaccept.sleepLength }}</div> <div>{{ checkaccept.sleepLength }}</div>
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">颈椎是否有问题</template> <template slot="label">颈椎是否有问题</template>
<div > <div>
<div>{{ checkaccept.cervicalVertebra == 1 ? '是' : checkaccept.cervicalVertebra == 0 ? '否' : '' }}</div> <div>{{ checkaccept.cervicalVertebra == 1 ? '是' : checkaccept.cervicalVertebra == 0 ? '否' : '' }}</div>
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">其他需求</template> <template slot="label">其他需求</template>
<div > <div>
<div>{{ checkaccept.otherNeed }}</div> <div>{{ checkaccept.otherNeed }}</div>
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item v-if="diaType != 'edit'">
<template slot="label">备注</template>
<div>{{ checkaccept.remark }}</div>
</el-descriptions-item>
</el-descriptions> </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> </el-dialog>
</basic-container> </basic-container>
</template> </template>
@ -235,18 +220,18 @@
<script> <script>
// import { mapGetters } from "vuex"; // import { mapGetters } from "vuex";
// import {getBaseList,getTypeList} from "@/api/base" // 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"; // import { getToken } from "@/util/auth";
export default { export default {
data() { data() {
return { return {
active:'1', active: '1',
form: {}, form: {},
dialogVisible:false, dialogVisible: false,
channelData:[ channelData: [
{label:'微信商城',value:0}, // { label: '', value: 0 },
{label:'抖音商城',value:1}, // { label: '', value: 1 },
{label:'微信小程序',value:2}, // { label: '', value: 2 },
], ],
statusData: [ statusData: [
{ label: "待处理", value: "0" }, { label: "待处理", value: "0" },
@ -257,21 +242,21 @@ export default {
headers: { headers: {
"Blade-Auth": "", "Blade-Auth": "",
}, // }, //
listData:[], listData: [],
materialData:[ materialData: [
{label:'羽丝绒枕',value:1}, { label: '羽丝绒枕', value: 1 },
{label:'草本植物枕(荞麦、决明子等)',value:2}, { label: '草本植物枕(荞麦、决明子等)', value: 2 },
{label:'乳胶枕',value:3}, { label: '乳胶枕', value: 3 },
{label:'慢回弹记忆枕',value:4}, { label: '慢回弹记忆枕', value: 4 },
{label:'软管枕',value:5}, { label: '软管枕', value: 5 },
{label:'其他',value:6}, { label: '其他', value: 6 },
], ],
hardnessData:[ hardnessData: [
{label:'偏硬',value:1}, { label: '偏硬', value: 1 },
{label:'适中',value:2}, { label: '适中', value: 2 },
{label:'偏软',value:3}, { label: '偏软', value: 3 },
], ],
checkaccept:{}, checkaccept: {},
query: {}, query: {},
loading: true, loading: true,
page: { page: {
@ -281,7 +266,7 @@ export default {
}, },
selectionList: [], selectionList: [],
option: { option: {
selection:true, selection: true,
searchShowBtn: false, searchShowBtn: false,
refreshBtn: false, refreshBtn: false,
columnBtn: false, columnBtn: false,
@ -297,6 +282,14 @@ export default {
editBtn: false, editBtn: false,
delBtn: false, delBtn: false,
column: [ column: [
{
label: "订单编号",
prop: "orderNo",
search: true,
searchslot: true,
minWidth: '120',
// searchSpan: 4,
},
{ {
label: "姓名", label: "姓名",
prop: "name", prop: "name",
@ -341,7 +334,7 @@ export default {
}, },
{ {
label: "购买渠道", label: "购买渠道",
prop: "channel", prop: "purchaseChannel",
search: true, search: true,
searchslot: true, searchslot: true,
hide: true, hide: true,
@ -357,18 +350,18 @@ export default {
// searchSpan: 5, // searchSpan: 5,
// searchLabelWidth:100 // searchLabelWidth:100
}, },
{ {
label: "姓名", label: "姓名",
prop: "username", prop: "username",
align: "center", align: "center",
overHidden:true, overHidden: true,
width:80, width: 80,
}, },
{ {
label: "手机", label: "手机",
overHidden:true, overHidden: true,
width:150, width: 150,
prop: "phone", prop: "phone",
align: "center", align: "center",
}, },
@ -379,42 +372,42 @@ export default {
}, },
{ {
label: "体重", label: "体重",
overHidden:true, overHidden: true,
prop: "weight", prop: "weight",
align: "center", align: "center",
}, },
{ {
label: "地址", label: "地址",
overHidden:true, overHidden: true,
prop: "position", prop: "position",
slot:true, slot: true,
align: "center", align: "center",
}, },
{ {
label: "睡眠姿势", label: "睡眠姿势",
slot:true, slot: true,
prop: "sleepingPosture", prop: "sleepingPosture",
align: "center", align: "center",
}, },
{ {
label: "枕头软硬度", label: "枕头软硬度",
overHidden:true, overHidden: true,
prop: "pillowHardness", prop: "pillowHardness",
align: "center", align: "center",
slot:true, slot: true,
}, },
{ {
label: "枕头类型", label: "枕头类型",
prop: "pillowMaterial", prop: "pillowMaterial",
slot: true, slot: true,
align: "center", align: "center",
overHidden:true overHidden: true
}, },
{ {
label: "颈肩宽度", label: "颈肩宽度",
prop: "neckShoulderWidth", prop: "neckShoulderWidth",
align: "center", align: "center",
overHidden:true, overHidden: true,
}, },
{ {
label: "颈长", label: "颈长",
@ -446,96 +439,104 @@ export default {
slot: true, slot: true,
align: "center", align: "center",
}, },
// {
// label: "",
// prop: "purchaseChannel",
// type: "select",
// search: true,
// slot: true,
// align: "center",
// },
{ {
label: "购买渠道", label: "备注",
prop: "road", prop: "remark",
slot: true, slot: true,
align: "center", overHidden: true
}, },
{ {
label:'提交时间', label: '提交时间',
prop:'createTime', prop: 'createTime',
align:'center', align: 'center',
overHidden:true overHidden: true
}, },
], ],
}, },
ageData:[ ageData: [
{label:'18~30',value:'18~30'}, { label: '18~30', value: '18~30' },
{label:'31~50',value:'31~50'}, { label: '31~50', value: '31~50' },
{label:'51~60',value:'51~60'}, { label: '51~60', value: '51~60' },
{label:'60以上',value:'60以上'}, { label: '60以上', value: '60以上' },
], ],
data: [], data: [],
time:'', time: '',
date:'', date: '',
isWinDis:false isWinDis: false
}; };
}, },
computed: { computed: {
// ...mapGetters(["permission","userInfo"]), // ...mapGetters(["permission","userInfo"]),
ids() { ids() {
let ids = []; let ids = [];
this.selectionList.forEach(ele => { this.selectionList.forEach(ele => {
ids.push(ele.id); ids.push(ele.id);
}); });
return ids.join(","); return ids.join(",");
}, },
}, },
created() { created() {
// this.headers["Blade-Auth"] = "bearer " + getToken(); getPurchaseChannel().then(res => {
// this.getTime(); this.channelData = res.data.data;
// this.getWinData(); })
// this.getTypeData(); this.onLoad()
this.onLoad()
}, },
methods: { methods: {
sizeChange(pageSize){ sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
this.onLoad() this.onLoad()
}, },
handleDetail(row){ handleDetail(row) {
this.dialogVisible = true; this.dialogVisible = true;
detailList({id:row.id}).then(res =>{ this.diaType = 'detail';
console.log(res) detailList({ id: row.id }).then(res => {
this.checkaccept = res.data.data; console.log(res)
this.checkaccept.position = this.checkaccept.province + this.checkaccept = res.data.data;
this.checkaccept.city + this.checkaccept.position = this.checkaccept.province +
this.checkaccept.district + this.checkaccept.city +
this.checkaccept.detail this.checkaccept.district +
}) this.checkaccept.detail
})
}, },
selectionChange(data){ selectionChange(data) {
this.selectionList = data; this.selectionList = data;
}, },
currentChange(currentPage){ currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
this.onLoad() this.onLoad()
}, },
getWinData(){ getWinData() {
getBaseList().then(res =>{ getBaseList().then(res => {
this.winData = res.data.data; this.winData = res.data.data;
let tmp = this.winData.find(item => item.id == this.userInfo.user_id); let tmp = this.winData.find(item => item.id == this.userInfo.user_id);
if(tmp){ if (tmp) {
this.form.windows = tmp.id; this.form.windows = tmp.id;
this.isWinDis = true this.isWinDis = true
} }
}) })
}, },
getTypeData(){ getTypeData() {
getTypeList().then(res =>{ getTypeList().then(res => {
this.typeData = res.data.data this.typeData = res.data.data
}) })
}, },
handleList(row){ handleList(row) {
console.log(row) console.log(row)
this.dialogVisible = true; this.dialogVisible = true;
getResolveList({appealId:row.id}).then(res =>{ getResolveList({ appealId: row.id }).then(res => {
console.log('res',res) console.log('res', res)
this.listData = res.data.data this.listData = res.data.data
}) })
}, },
searchReset() { searchReset() {
this.query = {}; this.query = {};
@ -549,9 +550,9 @@ export default {
this.onLoad(this.page, this.form); this.onLoad(this.page, this.form);
done(); done();
}, },
handleSuccess(res){ handleSuccess(res) {
console.log(res) console.log(res)
if(res.code == 200){ if (res.code == 200) {
this.$message.success('上传成功') this.$message.success('上传成功')
} }
}, },
@ -562,17 +563,17 @@ export default {
}, },
getTime() { getTime() {
// //
var date = new Date(); var date = new Date();
var year = date.getFullYear(); // var year = date.getFullYear(); //
var month = date.getMonth(); // var month = date.getMonth(); //
var data = date.getDate(); // var data = date.getDate(); //
var hours = date.getHours(); // var hours = date.getHours(); //
var minute = date.getMinutes(); // var minute = date.getMinutes(); //
var second = date.getSeconds(); // var second = date.getSeconds(); //
this.day = date.getDay(); // this.day = date.getDay(); //
// this.getWeek(this.day); // this.getWeek(this.day);
this.time = this.fn(hours) + ":" + this.fn(minute); this.time = this.fn(hours) + ":" + this.fn(minute);
this.date = year + "-" + (month + 1) + "-" + data; this.date = year + "-" + (month + 1) + "-" + data;
}, },
onLoad() { onLoad() {
let params = {}; let params = {};
@ -583,60 +584,60 @@ export default {
// pillowMaterial:this.form.material ? this.form.material : '' // pillowMaterial:this.form.material ? this.form.material : ''
// } // }
if(!this.form.timeArr){ if (!this.form.timeArr) {
params = { params = {
username:this.form.name ? this.form.name : '', username: this.form.name ? this.form.name : '',
phone:this.form.phonenumber ? this.form.phonenumber : '', phone: this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness:this.form.hardness ? this.form.hardness : '', pillowHardness: this.form.hardness ? this.form.hardness : '',
pillowMaterial:this.form.material ? this.form.material : '', pillowMaterial: this.form.material ? this.form.material : '',
ageRange:this.form.age ? this.form.age : '' ageRange: this.form.age ? this.form.age : ''
} }
}else{ } else {
params = { params = {
username:this.form.name ? this.form.name : '', username: this.form.name ? this.form.name : '',
phone:this.form.phonenumber ? this.form.phonenumber : '', phone: this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness:this.form.hardness ? this.form.hardness : '', pillowHardness: this.form.hardness ? this.form.hardness : '',
pillowMaterial:this.form.material ? this.form.material : '', pillowMaterial: this.form.material ? this.form.material : '',
ageRange:this.form.age ? this.form.age : '', ageRange: this.form.age ? this.form.age : '',
startTime:this.form.timeArr[0], startTime: this.form.timeArr[0],
endTime:this.form.timeArr[1], endTime: this.form.timeArr[1],
} }
} }
console.log('par',params) console.log('par', params)
getList({ current: this.page.currentPage, size: this.page.pageSize, ...params }).then(res => {
getList({current:this.page.currentPage,size:this.page.pageSize,...params}).then(res =>{ console.log('res==>', res)
console.log('res==>',res)
this.loading = false; this.loading = false;
this.data = res.data.data.records; this.data = res.data.data.records;
this.page.total = res.data.data.total this.page.total = res.data.data.total
}) })
}, },
addRegister() { addRegister() {
this.$router.push({ path: "/register/add",query:{type:'add'} }); this.$router.push({ path: "/register/add", query: { type: 'add' } });
}, },
exportData(){ exportData() {
let params = {}; let params = {};
if(!this.form.timeArr){ if (!this.form.timeArr) {
params = { params = {
username:this.form.name ? this.form.name : '', username: this.form.name ? this.form.name : '',
phone:this.form.phonenumber ? this.form.phonenumber : '', phone: this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness:this.form.hardness ? this.form.hardness : '', pillowHardness: this.form.hardness ? this.form.hardness : '',
pillowMaterial:this.form.material ? this.form.material : '', pillowMaterial: this.form.material ? this.form.material : '',
ageRange:this.form.age ? this.form.age : '' ageRange: this.form.age ? this.form.age : ''
} }
}else{ } else {
params = { params = {
username:this.form.name ? this.form.name : '', username: this.form.name ? this.form.name : '',
phone:this.form.phonenumber ? this.form.phonenumber : '', phone: this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness:this.form.hardness ? this.form.hardness : '', pillowHardness: this.form.hardness ? this.form.hardness : '',
pillowMaterial:this.form.material ? this.form.material : '', pillowMaterial: this.form.material ? this.form.material : '',
ageRange:this.form.age ? this.form.age : '', ageRange: this.form.age ? this.form.age : '',
startTime:this.form.timeArr[0], startTime: this.form.timeArr[0],
endTime:this.form.timeArr[1], endTime: this.form.timeArr[1],
} }
} }
exportList(params).then(res =>{ exportList(params).then(res => {
console.log(res) console.log(res)
if (!res || !res.data) { if (!res || !res.data) {
this.$message({ this.$message({
@ -650,47 +651,78 @@ export default {
if (window.navigator && window.navigator.msSaveOrOpenBlob) { if (window.navigator && window.navigator.msSaveOrOpenBlob) {
//ie //ie
window.navigator.msSaveOrOpenBlob(blob, downloadFilename) window.navigator.msSaveOrOpenBlob(blob, downloadFilename)
}else { } else {
//, //,
let url = window.URL.createObjectURL(blob); let url = window.URL.createObjectURL(blob);
let downloadElement = document.createElement("a"); let downloadElement = document.createElement("a");
downloadElement.style.display = "none"; downloadElement.style.display = "none";
downloadElement.href = url; downloadElement.href = url;
downloadElement.download = downloadFilename; downloadElement.download = downloadFilename;
document.body.appendChild(downloadElement); document.body.appendChild(downloadElement);
downloadElement.click(); downloadElement.click();
document.body.removeChild(downloadElement); document.body.removeChild(downloadElement);
window.URL.revokeObjectURL(url); window.URL.revokeObjectURL(url);
} }
this.$message({type: "success", message: '导出成功!'}); this.$message({ type: "success", message: '导出成功!' });
}) })
}, },
deleteItem(){ deleteItem() {
if(this.selectionList.length == 0){ if (this.selectionList.length == 0) {
this.$message.warning('请至少选择一条数据'); this.$message.warning('请至少选择一条数据');
return return
} }
this.$confirm(`确认删除当前数据吗?`, { this.$confirm(`确认删除当前数据吗?`, {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { }).then(() => {
deleteList(this.ids).then(res =>{ deleteList(this.ids).then(res => {
console.log(res) console.log(res)
if(res.data.code == 200){ if (res.data.code == 200) {
this.$message.success('删除成功'); this.$message.success('删除成功');
this.page.pageSize = 1; this.page.pageSize = 1;
this.onLoad() this.onLoad()
} }
}) })
}); });
}, },
importRegister(){ 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) { handleDelete(row) {
this.$confirm(`确认删除当前数据吗?`, { this.$confirm(`确认删除当前数据吗?`, {
@ -698,14 +730,14 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { }).then(() => {
deleteList(row.id).then(res =>{ deleteList(row.id).then(res => {
console.log(res) console.log(res)
if(res.data.code == 200){ if (res.data.code == 200) {
this.$message.success('删除成功'); this.$message.success('删除成功');
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad() this.onLoad()
} }
}) })
}); });
}, },
}, },
@ -713,42 +745,43 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.resi_list{ .resi_list {
.list{ .list {
width: 80%; width: 80%;
max-height: 246px; max-height: 246px;
overflow-y: auto; overflow-y: auto;
.list_box{ .list_box {
width: 100%; width: 100%;
height: 41px; height: 41px;
font-size: 20px; font-size: 20px;
display: flex; display: flex;
align-items: center; align-items: center;
& :hover{ & :hover {
cursor: pointer; cursor: pointer;
// .time_txt{ // .time_txt{
color: #4095e5; color: #4095e5;
// } // }
} }
}
} }
}
} }
.upload-demo{ .upload-demo {
float: right; float: right;
} }
</style> </style>
<style lang='scss'> <style lang='scss'>
.dis_class{ .dis_class {
.is-bordered-label{ .is-bordered-label {
width: 15% !important; width: 15% !important;
} }
.el-descriptions .is-bordered .el-descriptions-item__cell{
width: 35%; .el-descriptions .is-bordered .el-descriptions-item__cell {
height: 50px; width: 35%;
} height: 50px;
}
} }
</style> </style>

Loading…
Cancel
Save