报名单编辑

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,
});
};
//修改订单物流单号
export const confirmgoods = (data) => {
let formdata = new FormData();
Object.keys(data).map(key => {
formdata.append(key, data[key]);
})
return request({
url: "/api/blade-desk/order/updateLogistics",
method: "post",
data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data: formdata,
});
};

@ -34,3 +34,19 @@ export const detailList = (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>
</template>
<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 :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 slot-scope="scope" slot="sleepingPosture">
<div v-show="scope.row.sleepingPosture == 1">仰睡</div>
@ -61,7 +61,7 @@
<!-- <el-button type="danger" size="small" @click="deleteItem"
>删除</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
>
</template>
@ -74,7 +74,7 @@
custom-class="dis_class"
center
>
<div class="basic_box" v-show="!isShowInfo">
<div class="basic_box">
<el-descriptions :column="2" class="margin-top" size="small" border>
<el-descriptions-item>
<template slot="label">姓名</template>
@ -113,15 +113,15 @@
</el-descriptions>
<div class="number_box" v-show="diaType == 'send'">
<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-select>
</div>
<div class="number_box" v-show="diaType == 'send'">
<p>请输入快递单号</p>
<el-input></el-input>
<el-input v-model="checkaccept.logisticsNo" placeholder="请输入快递单号" maxlength="30"></el-input>
</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 class="info_view" @click="viewWiliu">查看物流信息</p>
</div>
@ -159,7 +159,7 @@ import {
deleteList,
detailList,
} 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 md5 from "js-md5";
export default {
@ -526,7 +526,30 @@ export default {
},
//
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) {
this.page.pageSize = pageSize;
@ -567,9 +590,9 @@ export default {
customer: "1C32AD38DC92D3A1950391AD766C7F6D",
sign: "",
param: JSON.stringify({
"com": 'zhongtong',
"num": '78713552736238',
"phone": '17852327323',
"com": this.checkaccept.logisticsCompanyCode,
"num": this.checkaccept.logisticsNo,
"phone": this.checkaccept.consigneePhone,
"from": "",
"to": "",
"resultv2": "4",
@ -578,55 +601,55 @@ export default {
})
}
param.sign = md5(param.param + 'ubdRnSOv5517' + param.customer).toUpperCase();
this.activities = [
{
status:'投柜或驿站',
context: '【青岛市】 快件已被 菜鸟的【青岛康泰源惠客友超市店】代收,【取件地址:青岛康泰源惠客友超市店】,请及时取件。如有疑问请联系:15805321109,投诉电话:0532-88985563',
time: '2023-08-18 10:33:33'
},
{
status:'派件',
context: '【青岛市】青岛市中五二部(0532-88985563)业务员【杨金梅,19106394524】正在为您派件(95720为中通快递员外呼专属号码,请放心接听,如有问题可联系投诉电话:0532-88985563)',
time: '2023-08-18 08:08:38'
},
{
status:'在途',
context: '【青岛市】 快件已到达 青岛市中五二部',
time: '2023-08-18 08:08:33'
},
{
status:'在途',
context: '【青岛市】 快件已发往 青岛市中五二部',
time: '2023-08-18 04:36:56'
},
{
status:'在途',
context: '【青岛市】 快件已到达 青岛中转部',
time: '2023-08-18 01:04:40'
},
{
status:'在途',
context: '【昆明市】 快件已发往 青岛中转部',
time: '2023-08-16 00:51:30'
},
{
status:'在途',
context: '【昆明市】 快件已到达 昆明中转',
time: '2023-08-15 15:30:16'
}, {
status:'在途',
context: '【丽江市】 快件已发往 昆明中转',
time: '2023-08-14 19:02:02'
}, {
status:'揽收',
context: '【丽江市】 【丽江华坪县】(0888-8834031) 的 P1陈平(15108866686) 已揽收',
time: '2023-08-14 19:01:18'
}],
this.activities[0].status = this.activities[0].status == '在途' ? '运输中' : this.activities[0].status
this.activities[0].color = '#0bbd87'
console.log(this.activities)
// this.activities = [
// {
// status:'驿',
// context: ' 158053211090532-88985563',
// time: '2023-08-18 10:33:33'
// },
// {
// status:'',
// context: '0532-88985563,19106394524957200532-88985563',
// time: '2023-08-18 08:08:38'
// },
// {
// status:'',
// context: ' ',
// time: '2023-08-18 08:08:33'
// },
// {
// status:'',
// context: ' ',
// time: '2023-08-18 04:36:56'
// },
// {
// status:'',
// context: ' ',
// time: '2023-08-18 01:04:40'
// },
// {
// status:'',
// context: ' ',
// time: '2023-08-16 00:51:30'
// },
// {
// status:'',
// context: ' ',
// time: '2023-08-15 15:30:16'
// }, {
// status:'',
// context: ' ',
// time: '2023-08-14 19:02:02'
// }, {
// status:'',
// context: ' 0888-8834031 P115108866686 ',
// time: '2023-08-14 19:01:18'
// }],
// this.activities[0].status = this.activities[0].status == '' ? '' : this.activities[0].status
// this.activities[0].color = '#0bbd87'
// console.log(this.activities)
getWuliuInfo(param).then(res =>{
console.log(res)
// console.log(res)
this.activities = res.data.data
})
},

@ -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">
<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,83 +36,69 @@
<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>
<div v-show="scope.row.sleepingPosture == 2" >侧睡</div>
<div v-show="scope.row.sleepingPosture == 1">仰睡</div>
<div v-show="scope.row.sleepingPosture == 2">侧睡</div>
</template>
<template slot-scope="scope" slot="road">
<div v-show="scope.row.road == 0" >微信商城</div>
<div v-show="scope.row.road == 1" >抖音商城</div>
<div v-show="scope.row.road == 2" >微信小程序</div>
<div v-show="scope.row.road == 0">微信商城</div>
<div v-show="scope.row.road == 1">抖音商城</div>
<div v-show="scope.row.road == 2">微信小程序</div>
</template>
<template slot-scope="scope" slot="neckShoulderWidth">
<div v-show="scope.row.neckShoulderWidth != '-1'" >{{scope.row.neckShoulderWidth}}</div>
<template slot-scope="scope" slot="neckShoulderWidth">
<div v-show="scope.row.neckShoulderWidth != '-1'">{{ scope.row.neckShoulderWidth }}</div>
</template>
<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 slot-scope="scope" slot="cervicalVertebra">
<div v-show="scope.row.cervicalVertebra == 1" ></div>
<div v-show="scope.row.cervicalVertebra == 0" ></div>
<div v-show="scope.row.cervicalVertebra == 1"></div>
<div v-show="scope.row.cervicalVertebra == 0"></div>
</template>
<template slot-scope="scope" slot="pillowHardness">
<div v-show="scope.row.pillowHardness == 1" >偏硬</div>
<div v-show="scope.row.pillowHardness == 2" >适中</div>
<div v-show="scope.row.pillowHardness == 3" >偏软</div>
<div v-show="scope.row.pillowHardness == 1">偏硬</div>
<div v-show="scope.row.pillowHardness == 2">适中</div>
<div v-show="scope.row.pillowHardness == 3">偏软</div>
</template>
<template slot-scope="scope" slot="pillowMaterial">
<div v-show="scope.row.pillowMaterial == 1" >羽丝绒枕</div>
<div v-show="scope.row.pillowMaterial == 2" >草本植物枕(荞麦决明子等)</div>
<div v-show="scope.row.pillowMaterial == 3" >乳胶枕</div>
<div v-show="scope.row.pillowMaterial == 4" >慢回弹记忆枕</div>
<div v-show="scope.row.pillowMaterial == 5" >软管枕</div>
<div v-show="scope.row.pillowMaterial == 6" >其他</div>
<div v-show="scope.row.pillowMaterial == 1">羽丝绒枕</div>
<div v-show="scope.row.pillowMaterial == 2">草本植物枕(荞麦决明子等)</div>
<div v-show="scope.row.pillowMaterial == 3">乳胶枕</div>
<div v-show="scope.row.pillowMaterial == 4">慢回弹记忆枕</div>
<div v-show="scope.row.pillowMaterial == 5">软管枕</div>
<div v-show="scope.row.pillowMaterial == 6">其他</div>
</template>
<template slot-scope="scope" slot="finishTime">
<div>{{scope.row.finishTime !== '' ? scope.row.finishTime : '---/-/---'}}</div>
</template>
<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>
</template>
<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>
<div>{{ checkaccept.username }}</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">手机</template>
@ -159,75 +106,113 @@
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">身高</template>
<div >{{ checkaccept.height }}</div>
<div>{{ checkaccept.height }}</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<div >体重</div>
<div>体重</div>
</template>
<div >{{ checkaccept.weight }}</div>
<div>{{ checkaccept.weight }}</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<div >地址</div>
<div>地址</div>
</template>
<div style="width: 158px">{{ checkaccept.position }}</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">睡眠姿势</template>
<div >
<div>
{{ checkaccept.sleepingPosture == 1 ? '仰睡' : checkaccept.sleepingPosture == 2 ? '侧睡' : '' }}
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">枕头软硬度</template>
<div >
<div>{{ checkaccept.pillowHardness == 1 ? '偏硬' : checkaccept.pillowHardness == 2 ? '适中' : checkaccept.pillowHardness == 3 ? '偏软' : '' }}</div>
<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>
<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>
<template slot="label">颈肩宽度</template>
<div >
<div>
<div>{{ checkaccept.neckShoulderWidth == '-1' ? '' : checkaccept.neckShoulderWidth }}</div>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">颈长</template>
<div >
<div>
<div>{{ checkaccept.neckLength == '-1' ? '' : checkaccept.neckLength }}</div>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">年龄范围</template>
<div >
<div>
<div>{{ checkaccept.ageRange }}</div>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">睡眠时长</template>
<div >
<div>
<div>{{ checkaccept.sleepLength }}</div>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">颈椎是否有问题</template>
<div >
<div>
<div>{{ checkaccept.cervicalVertebra == 1 ? '是' : checkaccept.cervicalVertebra == 0 ? '否' : '' }}</div>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">其他需求</template>
<div >
<div>
<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,18 +220,18 @@
<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() {
return {
active:'1',
active: '1',
form: {},
dialogVisible:false,
channelData:[
{label:'微信商城',value:0},
{label:'抖音商城',value:1},
{label:'微信小程序',value:2},
dialogVisible: false,
channelData: [
// { label: '', value: 0 },
// { label: '', value: 1 },
// { label: '', value: 2 },
],
statusData: [
{ label: "待处理", value: "0" },
@ -257,21 +242,21 @@ export default {
headers: {
"Blade-Auth": "",
}, //
listData:[],
materialData:[
{label:'羽丝绒枕',value:1},
{label:'草本植物枕(荞麦、决明子等)',value:2},
{label:'乳胶枕',value:3},
{label:'慢回弹记忆枕',value:4},
{label:'软管枕',value:5},
{label:'其他',value:6},
listData: [],
materialData: [
{ label: '羽丝绒枕', value: 1 },
{ label: '草本植物枕(荞麦、决明子等)', value: 2 },
{ label: '乳胶枕', value: 3 },
{ label: '慢回弹记忆枕', value: 4 },
{ label: '软管枕', value: 5 },
{ label: '其他', value: 6 },
],
hardnessData:[
{label:'偏硬',value:1},
{label:'适中',value:2},
{label:'偏软',value:3},
hardnessData: [
{ label: '偏硬', value: 1 },
{ label: '适中', value: 2 },
{ label: '偏软', value: 3 },
],
checkaccept:{},
checkaccept: {},
query: {},
loading: true,
page: {
@ -281,7 +266,7 @@ export default {
},
selectionList: [],
option: {
selection:true,
selection: true,
searchShowBtn: false,
refreshBtn: false,
columnBtn: false,
@ -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,
@ -357,18 +350,18 @@ export default {
// searchSpan: 5,
// searchLabelWidth:100
},
{
label: "姓名",
prop: "username",
align: "center",
overHidden:true,
width:80,
overHidden: true,
width: 80,
},
{
label: "手机",
overHidden:true,
width:150,
overHidden: true,
width: 150,
prop: "phone",
align: "center",
},
@ -379,42 +372,42 @@ export default {
},
{
label: "体重",
overHidden:true,
overHidden: true,
prop: "weight",
align: "center",
},
{
label: "地址",
overHidden:true,
overHidden: true,
prop: "position",
slot:true,
slot: true,
align: "center",
},
{
label: "睡眠姿势",
slot:true,
slot: true,
prop: "sleepingPosture",
align: "center",
},
{
label: "枕头软硬度",
overHidden:true,
overHidden: true,
prop: "pillowHardness",
align: "center",
slot:true,
slot: true,
},
{
label: "枕头类型",
prop: "pillowMaterial",
slot: true,
align: "center",
overHidden:true
overHidden: true
},
{
label: "颈肩宽度",
prop: "neckShoulderWidth",
align: "center",
overHidden:true,
overHidden: true,
},
{
label: "颈长",
@ -446,96 +439,104 @@ 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:'提交时间',
prop:'createTime',
align:'center',
overHidden:true
label: '提交时间',
prop: 'createTime',
align: 'center',
overHidden: true
},
],
},
ageData:[
{label:'18~30',value:'18~30'},
{label:'31~50',value:'31~50'},
{label:'51~60',value:'51~60'},
{label:'60以上',value:'60以上'},
ageData: [
{ label: '18~30', value: '18~30' },
{ label: '31~50', value: '31~50' },
{ label: '51~60', value: '51~60' },
{ label: '60以上', value: '60以上' },
],
data: [],
time:'',
date:'',
isWinDis:false
time: '',
date: '',
isWinDis: false
};
},
computed: {
computed: {
// ...mapGetters(["permission","userInfo"]),
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
},
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
},
},
created() {
// this.headers["Blade-Auth"] = "bearer " + getToken();
// this.getTime();
// this.getWinData();
// this.getTypeData();
this.onLoad()
getPurchaseChannel().then(res => {
this.channelData = res.data.data;
})
this.onLoad()
},
methods: {
sizeChange(pageSize){
sizeChange(pageSize) {
this.page.pageSize = pageSize;
this.onLoad()
},
handleDetail(row){
this.dialogVisible = true;
detailList({id:row.id}).then(res =>{
console.log(res)
this.checkaccept = res.data.data;
this.checkaccept.position = this.checkaccept.province +
this.checkaccept.city +
this.checkaccept.district +
this.checkaccept.detail
})
handleDetail(row) {
this.dialogVisible = true;
this.diaType = 'detail';
detailList({ id: row.id }).then(res => {
console.log(res)
this.checkaccept = res.data.data;
this.checkaccept.position = this.checkaccept.province +
this.checkaccept.city +
this.checkaccept.district +
this.checkaccept.detail
})
},
selectionChange(data){
this.selectionList = data;
selectionChange(data) {
this.selectionList = data;
},
currentChange(currentPage){
currentChange(currentPage) {
this.page.currentPage = currentPage;
this.onLoad()
},
getWinData(){
getBaseList().then(res =>{
getWinData() {
getBaseList().then(res => {
this.winData = res.data.data;
let tmp = this.winData.find(item => item.id == this.userInfo.user_id);
if(tmp){
if (tmp) {
this.form.windows = tmp.id;
this.isWinDis = true
}
})
},
getTypeData(){
getTypeList().then(res =>{
getTypeData() {
getTypeList().then(res => {
this.typeData = res.data.data
})
},
handleList(row){
handleList(row) {
console.log(row)
this.dialogVisible = true;
getResolveList({appealId:row.id}).then(res =>{
console.log('res',res)
this.listData = res.data.data
})
this.dialogVisible = true;
getResolveList({ appealId: row.id }).then(res => {
console.log('res', res)
this.listData = res.data.data
})
},
searchReset() {
this.query = {};
@ -549,9 +550,9 @@ export default {
this.onLoad(this.page, this.form);
done();
},
handleSuccess(res){
handleSuccess(res) {
console.log(res)
if(res.code == 200){
if (res.code == 200) {
this.$message.success('上传成功')
}
},
@ -562,17 +563,17 @@ export default {
},
getTime() {
//
var date = new Date();
var year = date.getFullYear(); //
var month = date.getMonth(); //
var data = date.getDate(); //
var hours = date.getHours(); //
var minute = date.getMinutes(); //
var second = date.getSeconds(); //
this.day = date.getDay(); //
// this.getWeek(this.day);
this.time = this.fn(hours) + ":" + this.fn(minute);
this.date = year + "-" + (month + 1) + "-" + data;
var date = new Date();
var year = date.getFullYear(); //
var month = date.getMonth(); //
var data = date.getDate(); //
var hours = date.getHours(); //
var minute = date.getMinutes(); //
var second = date.getSeconds(); //
this.day = date.getDay(); //
// this.getWeek(this.day);
this.time = this.fn(hours) + ":" + this.fn(minute);
this.date = year + "-" + (month + 1) + "-" + data;
},
onLoad() {
let params = {};
@ -583,60 +584,60 @@ export default {
// pillowMaterial:this.form.material ? this.form.material : ''
// }
if(!this.form.timeArr){
if (!this.form.timeArr) {
params = {
username:this.form.name ? this.form.name : '',
phone:this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness:this.form.hardness ? this.form.hardness : '',
pillowMaterial:this.form.material ? this.form.material : '',
ageRange:this.form.age ? this.form.age : ''
username: this.form.name ? this.form.name : '',
phone: this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness: this.form.hardness ? this.form.hardness : '',
pillowMaterial: this.form.material ? this.form.material : '',
ageRange: this.form.age ? this.form.age : ''
}
}else{
params = {
username:this.form.name ? this.form.name : '',
phone:this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness:this.form.hardness ? this.form.hardness : '',
pillowMaterial:this.form.material ? this.form.material : '',
ageRange:this.form.age ? this.form.age : '',
startTime:this.form.timeArr[0],
endTime:this.form.timeArr[1],
} else {
params = {
username: this.form.name ? this.form.name : '',
phone: this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness: this.form.hardness ? this.form.hardness : '',
pillowMaterial: this.form.material ? this.form.material : '',
ageRange: this.form.age ? this.form.age : '',
startTime: this.form.timeArr[0],
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 =>{
console.log('res==>',res)
getList({ current: this.page.currentPage, size: this.page.pageSize, ...params }).then(res => {
console.log('res==>', res)
this.loading = false;
this.data = res.data.data.records;
this.page.total = res.data.data.total
})
},
addRegister() {
this.$router.push({ path: "/register/add",query:{type:'add'} });
this.$router.push({ path: "/register/add", query: { type: 'add' } });
},
exportData(){
let params = {};
if(!this.form.timeArr){
exportData() {
let params = {};
if (!this.form.timeArr) {
params = {
username:this.form.name ? this.form.name : '',
phone:this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness:this.form.hardness ? this.form.hardness : '',
pillowMaterial:this.form.material ? this.form.material : '',
ageRange:this.form.age ? this.form.age : ''
username: this.form.name ? this.form.name : '',
phone: this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness: this.form.hardness ? this.form.hardness : '',
pillowMaterial: this.form.material ? this.form.material : '',
ageRange: this.form.age ? this.form.age : ''
}
}else{
params = {
username:this.form.name ? this.form.name : '',
phone:this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness:this.form.hardness ? this.form.hardness : '',
pillowMaterial:this.form.material ? this.form.material : '',
ageRange:this.form.age ? this.form.age : '',
startTime:this.form.timeArr[0],
endTime:this.form.timeArr[1],
} else {
params = {
username: this.form.name ? this.form.name : '',
phone: this.form.phonenumber ? this.form.phonenumber : '',
pillowHardness: this.form.hardness ? this.form.hardness : '',
pillowMaterial: this.form.material ? this.form.material : '',
ageRange: this.form.age ? this.form.age : '',
startTime: this.form.timeArr[0],
endTime: this.form.timeArr[1],
}
}
exportList(params).then(res =>{
exportList(params).then(res => {
console.log(res)
if (!res || !res.data) {
this.$message({
@ -650,47 +651,78 @@ export default {
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
//ie
window.navigator.msSaveOrOpenBlob(blob, downloadFilename)
}else {
} else {
//,
let url = window.URL.createObjectURL(blob);
let downloadElement = document.createElement("a");
downloadElement.style.display = "none";
downloadElement.href = url;
downloadElement.download = downloadFilename;
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement);
window.URL.revokeObjectURL(url);
let url = window.URL.createObjectURL(blob);
let downloadElement = document.createElement("a");
downloadElement.style.display = "none";
downloadElement.href = url;
downloadElement.download = downloadFilename;
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement);
window.URL.revokeObjectURL(url);
}
this.$message({type: "success", message: '导出成功!'});
this.$message({ type: "success", message: '导出成功!' });
})
},
deleteItem(){
if(this.selectionList.length == 0){
this.$message.warning('请至少选择一条数据');
return
}
this.$confirm(`确认删除当前数据吗?`, {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
deleteList(this.ids).then(res =>{
console.log(res)
if(res.data.code == 200){
this.$message.success('删除成功');
this.page.pageSize = 1;
this.onLoad()
}
})
});
deleteItem() {
if (this.selectionList.length == 0) {
this.$message.warning('请至少选择一条数据');
return
}
this.$confirm(`确认删除当前数据吗?`, {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
deleteList(this.ids).then(res => {
console.log(res)
if (res.data.code == 200) {
this.$message.success('删除成功');
this.page.pageSize = 1;
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) {
this.$confirm(`确认删除当前数据吗?`, {
@ -698,14 +730,14 @@ export default {
cancelButtonText: "取消",
type: "warning",
}).then(() => {
deleteList(row.id).then(res =>{
console.log(res)
if(res.data.code == 200){
this.$message.success('删除成功');
this.page.currentPage = 1;
this.onLoad()
}
})
deleteList(row.id).then(res => {
console.log(res)
if (res.data.code == 200) {
this.$message.success('删除成功');
this.page.currentPage = 1;
this.onLoad()
}
})
});
},
},
@ -713,42 +745,43 @@ export default {
</script>
<style lang="scss">
.resi_list{
.list{
width: 80%;
max-height: 246px;
overflow-y: auto;
.resi_list {
.list {
width: 80%;
max-height: 246px;
overflow-y: auto;
.list_box{
width: 100%;
height: 41px;
font-size: 20px;
display: flex;
align-items: center;
.list_box {
width: 100%;
height: 41px;
font-size: 20px;
display: flex;
align-items: center;
& :hover{
cursor: pointer;
// .time_txt{
color: #4095e5;
& :hover {
cursor: pointer;
// .time_txt{
color: #4095e5;
// }
}
}
// }
}
}
}
}
.upload-demo{
.upload-demo {
float: right;
}
</style>
<style lang='scss'>
.dis_class{
.is-bordered-label{
width: 15% !important;
}
.el-descriptions .is-bordered .el-descriptions-item__cell{
width: 35%;
height: 50px;
}
.dis_class {
.is-bordered-label {
width: 15% !important;
}
.el-descriptions .is-bordered .el-descriptions-item__cell {
width: 35%;
height: 50px;
}
}
</style>

Loading…
Cancel
Save