You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

928 lines
22 KiB

<template>
<view @click.stop="idos = false">
<far-bottom></far-bottom>
<scroll-view class="container">
<view class="record">
<view class="record-dialog dis-flex flex-x-center flex-y-center" v-if="filterDialog">
<view class="record-dialog-main">
<view class="m-top40 f-30 color-33 m-btm40 t-c">筛选时间</view>
<view class="color-33 f-24 m-left30">起始时间</view>
<picker-view class="record-picker-view" v-if="visible" :indicator-style="indicatorStyle" :value="value" @change="starChange">
<picker-view-column>
<view class="item" v-for="(item, index) in years" :key="index">{{ item }}年</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item, index) in months" :key="index">{{ item }}月</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item, index) in days" :key="index">{{ item }}日</view>
</picker-view-column>
</picker-view>
<view class="color-33 f-24 m-left30">结束时间</view>
<picker-view class="record-picker-view" v-if="visible" :indicator-style="indicatorStyle" :value="value" @change="endChange">
<picker-view-column>
<view class="item" v-for="(item, index) in years" :key="index">{{ item }}年</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item, index) in months" :key="index">{{ item }}月</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item, index) in days" :key="index">{{ item }}</view>
</picker-view-column>
</picker-view>
<view class="record-dialog-btns dis-flex flex-y-center">
<view class="btn cancel" @click="closePopis">取消</view>
<view class="line"></view>
<view class="btn confirm" @click="checkBind">确认</view>
</view>
</view>
</view>
<PopManager :show="show" :type="'top'" @clickmask="closePop" class="pop_view">
<view class="popfull"></view>
<scroll-view class="pop_main" :scroll-x="false" scroll-y>
<view class="pop_main_package">
<block v-for="(item, index) in Verif.typelist" v-if="currentType === 1">
<view class="popMb dis-flex" @click="checkType(index)">
<view class="font_28" :class="index==typeIndex?'color_FF4444':'color_333333'">{{item.name}}</view>
<view class="iconfont icon-check font_28 color_FF4444" v-if="index==typeIndex"></view>
</view>
</block>
<block v-for="(item, index) in Verif.adminlist" v-if="currentType === 2">
<view class="popMb dis-flex" @click="checkStore(index)">
<view class="font_28" :class="index==storeIndex?'color_FF4444':'color_333333'">{{item.name}}</view>
<view class="iconfont icon-check font_28 color_FF4444" v-if="index==storeIndex"></view>
</view>
</block>
</view>
</scroll-view>
</PopManager>
<view style="height: 100upx;">
<view class="b-f dis-flex diy-nav-list border-line border-bottom" style="z-index: 9999;position: fixed;top: 0;width: 100%;">
<view class="topNav_view" @click="openType(1)" :class="currentType === 1 && show == true ? 'color_FF4444' : 'color_333333'">
<view class="topNav_text topNav_text_width ver_mid">{{typeText}}</view>
<view class="topNav_text iconfont ver_mid" :class="currentType === 1 && show == true ? 'icon-fold' : 'icon-unfold'"></view>
</view>
<view class="topNav_view" @click="openType(2)" :class="currentType === 2 && show == true ? 'color_FF4444' : 'color_333333'">
<view class="topNav_text topNav_text_width ver_mid">{{storeText}}</view>
<view class="topNav_text iconfont ver_mid" :class="currentType === 2 && show == true ? 'icon-fold' : 'icon-unfold'"></view>
</view>
<view class="topNav_view" @click="openType(3)" :class="currentType === 3 && filterDialog == true ? 'color_FF4444' : 'color_333333'">
<view class="topNav_text ver_mid">筛选</view>
<view class="topNav_text iconfont icon-filter ver_mid"></view>
</view>
</view>
</view>
<view class="record-search">
<view class="search-main">
<view class="search-box dis-flex flex-y-center">
<view class="search-input">
<view class="i icon iconfont icon-sousuo"></view>
<input
type="text"
v-model="keyword"
placeholder="请输入订单号或者店员姓名"
placeholder-style="color:#999999;margin-left:10upx;"
class="f-24"
@blur="getSearch"
/>
</view>
<!-- <picker mode="selector" :range="Verif.adminlist" @change="changeAdmin" range-key="name">
<view class="dis-flex search-select f-28" @click="popShow = true">
{{ adminlist[admin]}}
<view class="i icon iconfont icon-unfold"></view>
</view>
</picker> -->
</view>
</view>
</view>
<view class="record-body">
<view class="f-24 m-btm30">
核销总计
<view class="color-red dis-il-block">{{ Verif.allnum }}</view>
次,共
<view class="color-red dis-il-block">{{ Verif.allfen }}</view>
件商品
</view>
<view style="position: fixed;right: 280upx;top:320upx;z-index: 99999;" v-if="idos">
<view style=" width: 0;height: 0;border-left: 20upx solid transparent;border-right: 20upx solid transparent;border-bottom: 20upx solid rgba(255,68,68,0.7);position: absolute;left: 50%;top: -20upx;transform: translateX(-50%);">
</view>
<view class="f-20 dis-il-block col-f" style="padding: 0upx 20upx;border-radius: 15upx;background-color: rgba(255,68,68,0.7);font-weight: 400;height: 180upx;width: 300upx;">
<view class="f-20" style="padding: 30upx 10upx;">
亲~~点击订单号可以复制订单号到粘贴板哦~!
</view>
<view class="t-r" @click="ido">
我知道了
</view>
</view>
</view>
<view class="record-list-item m-btm20" v-for="(item, index) in VerifList">
<view class="dis-flex flex-x-between f-24 record-list-item-header">
<view @click="copy(item.orderno)">订单号 {{ item.orderno }}</view>
<view class="tag" >{{ item.classname }}</view>
</view>
<view class="record-list-item-content dis-flex">
<image class="record-img" :src="item.goodimg" />
<view class="dis-flex flex-dir-column flex-x-between">
<view class="goods-name f-28">{{ item.remark }}</view>
<view class="dis-flex flex-x-between m-top10">
<view class="dis-flex goods-sku f-24">
<text v-if="item.optionname">{{ item.optionname }}</text>
<view class="color-red m-left10">×{{ item.num }}</view>
</view>
<view class="goods-price f-28 color-red">¥{{ item.orderprice }}</view>
</view>
</view>
</view>
<view class="record-list-item-footer f-24">
<view class="footer-item dis-flex flex-x-between">
<view class="footer-item-left">核销员:</view>
<view class="footer-item-right">{{ item.verifnickname }}</view>
</view>
<view class="footer-item dis-flex flex-x-between">
<view class="footer-item-left">核销时间:</view>
<view class="footer-item-right">{{ item.createtime }}</view>
</view>
<view class="footer-item dis-flex flex-x-between">
<view class="footer-item-left">核销方式:</view>
<view class="footer-item-right">{{ typeList[item.type - 1] }}</view>
</view>
</view>
</view>
<view class="tips">
<span>{{ scdpText }}</span>
</view>
</view>
</view>
</scroll-view>
<!-- 选择店员弹框 -->
<!-- 选择店员弹框 -->
</view>
</template>
<script>
import App from '@/common/js/app.js';
import Loadlogo from '@/components/template/loadlogo';
import TabBars from '@/components/template/tabBar.vue';
import PopManager from '@/components/template/PopManager';
export default {
data() {
const date = new Date();
const years = [];
const year = date.getFullYear();
const months = [];
const month = date.getMonth() + 1;
const days = [];
const day = date.getDate();
for (let i = 1990; i <= date.getFullYear(); i++) {
years.push(i);
}
for (let i = 1; i <= 12; i++) {
months.push(i);
}
for (let i = 1; i <= 31; i++) {
days.push(i);
}
return {
verifAdmin: '',
name: '',
popType: 'bottom',
popShow: false,
scdpText: '',
totalpage: null,
keyword: '',
typeList: ['输码核销', '扫码核销', '后台核销', '密码核销'],
VerifList: [],
adminlist:[],
admin:0,
currentType:0,
Verif: {},
page: 1,
loadlogo: false,
show:false,
shopShow: '',
storeText:'所有店员',
typeText:'所有类型',
storeIndex:null,
typeIndex:null,
type:'',
filterDialog: false,
title: 'picker-view',
verifmid: '',
starYear:null,
starMonth:null,
starDay:null,
endYear:null,
endMonth:null,
endDay:null,
starTime:null,
endTime:null,
time:[],
idos:true,
years,
year,
months,
month,
days,
day,
value: [9999, month - 1, day - 1],
visible: true,
platform:'android',
indicatorStyle: `height: ${Math.round(uni.getSystemInfoSync().screenWidth / (750 / 100))}px;`,
cc_id: ''
};
},
components: {
Loadlogo,
TabBars,
PopManager
},
computed: {},
onShow() {},
mounted() {},
onLoad(e) {
let _this = this;
if(uni.getSystemInfoSync().system.indexOf('Android') === -1){
console.log('我是iOS')
this.platform ='ios';
}else{
console.log('我是安卓')
this.platform = 'android';
}
let date = new Date();
_this.starYear = date .getFullYear();
_this.starMonth = date .getMonth() +1;
_this.starDay = date .getDate();
_this.endYear = date .getFullYear();
_this.endMonth = date .getMonth() + 1;
_this.endDay = date .getDate();
_this.init();
},
watch: {
Verif: {
handler() {
let _this = this;
if(_this.Verif.adminlist[0].name!=='全部'){
_this.Verif.adminlist.splice(0, 0, {
mid: '',
mobile: '',
name: '全部'
});
}
for(let i=0;i<_this.Verif.adminlist.length;i++){
_this.adminlist.push(_this.Verif.adminlist[i].name)
}
},
deep: true
}
},
onReachBottom() {
this.load();
},
methods: {
openType(currentType) {
let _this = this;
_this.currentType = currentType;
if(currentType===3){
_this.show = false;
_this.filterDialog=true;
}else{
_this.show = true;
_this.filterDialog=false
}
},
checkType(index){
let _this = this;
_this.typeIndex = index;
_this.typeText=_this.Verif.typelist[index].name
_this.type=_this.Verif.typelist[index].type
_this.cc_id=_this.Verif.typelist[index].cc_id
_this.getVerifList(true);
_this.show=false
},
checkStore(index){
let _this = this;
_this.storeIndex = index;
_this.storeText = _this.Verif.adminlist[index].name
_this.verifmid=_this.Verif.adminlist[index].mid
_this.getVerifList(true);
_this.show=false
},
closePop() {
let _this = this;
_this.show = false;
},
copy(text){
// debugger
//#ifdef H5
App.clipboard(text);
//#endif
uni.setClipboardData({
data: text
});
uni.showToast({
title:'已复制到粘贴板'
})
},
ido(){
this.idos = false;
},
// 搜索店员
changeAdmin: function(e) {
let _this = this;
console.info(e.target.value);
_this.verifmid=_this.Verif.adminlist[e.target.value].mid
_this.admin=e.target.value
_this.getSearch();
},
// closePop() {
// let _this = this;
// console.info(_this.popShow);
// _this.popShow = false;
// },
load() {
let _this = this;
if (_this.totalpage == _this.page) {
_this.scdpText = '已无更多数据';
} else {
_this.page++;
_this.getVerifList();
}
},
init() {
let _this = this;
uni.getStorage({
key: 'checkStoreid',
success: function(res) {
_this.storeid = res.data;
_this.getVerifList()
}
});
uni.getSystemInfo({
success(res) {
_this.phoneHight = res.windowHeight;
_this.scrollHeight = _this.phoneHight - 65 + 'px';
}
});
},
// 搜索
getSearch() {
let _this = this;
_this.page = 1;
let data = {
page: _this.page,
getinfoflag: 1,
type: 'rush',
storeid: _this.storeid,
time: _this.time,
verifmid: _this.verifmid,
keyword: _this.keyword,
cc_id: _this.cc_id
};
_this.scdpText = '... ...加载中';
App._post_form('&p=store&do=verifList', data, res => {
_this.totalpage = res.data.totalpage;
_this.Verif = res.data;
_this.VerifList = res.data.list;
if (_this.totalpage == 0 || _this.totalpage == _this.page) {
_this.scdpText = '已无更多数据';
} else {
_this.scdpText = '';
}
});
},
// 验证记录列表
getVerifList(flag) {
let _this = this;
let data = {
page: _this.page,
getinfoflag: 1,
type: _this.type,
storeid: _this.storeid,
time: _this.time,
verifmid: _this.verifmid,
keyword: _this.keyword,
cc_id: _this.cc_id
};
_this.scdpText = '... ...加载中';
App._post_form('&p=store&do=verifList', data, res => {
_this.totalpage = res.data.totalpage;
_this.Verif = res.data;
if(flag){
_this.VerifList = res.data.list;
}else{
_this.VerifList = [..._this.VerifList, ...res.data.list];
}
if (_this.totalpage == 0 || _this.totalpage == _this.page) {
_this.scdpText = '已无更多数据';
} else {
_this.scdpText = '';
};
_this.time = [];
});
},
starChange: function(e) {
let val = e.detail.value;
console.log(e)
this.starYear = this.years[val[0]];
this.starMonth = this.months[val[1]];
this.starDay = this.days[val[2]];
},
endChange:function(e){
// debugger
console.log(e)
let val = e.detail.value;
this.endYear = this.years[val[0]];
this.endMonth = this.months[val[1]];
this.endDay = this.days[val[2]];
},
closePopis(){
this.filterDialog = false;
// if(this.starYear == date .getFullYear() && this.endYear == date .getFullYear() && this.starMonth == date .getMonth() + 1 && this.endMonth == date .getMonth() + 1 &&this.starDay == date .getDate() && this.endDay == date .getDate()){
// this.starYear = null;
// this.starMonth = null;
// this.starDay = null;
// this.endYear = null;
// this.endMonth = null;
// this.endDay = null;
// }
},
checkBind(){
let _this=this;
// debugger
console.log(_this.starYear,_this.starMonth,_this.starDay)
_this.starTime=_this.starYear+'-'+_this.starMonth+'-'+_this.starDay
_this.endTime=_this.endYear+'-'+_this.endMonth+'-'+_this.endDay
if(_this.platform == 'ios'){
_this.starTime = _this.starTime.replace(/-/g, "/");
_this.endTime = _this.endTime.replace(/-/g, "/");
console.log(_this.starTime)
}
let starData=new Date(_this.starTime)
let endData=new Date(_this.endTime)
_this.starTime=(starData.getTime()/1000)|| Date.parse(new Date())/1000
_this.endTime=(endData.getTime()/1000)|| Date.parse(new Date())/1000
_this.time.push(_this.starTime)
_this.time.push(_this.endTime)
_this.Verif = {};
_this.VerifList = [];
_this.filterDialog=false
_this.getVerifList();
},
// 跳转商家
goStore() {
App.navigationTo({
url: 'pages/subPages/dealer/myStore/myStore'
});
}
}
};
</script>
<style lang="less">
.popMb{
margin-bottom: 59upx;
}
.pop_main_package {
padding: 33upx 31upx 0 31upx;
}
.pop_view {
font-size: 0 !important;
}
.pop_main {
width: 750upx;
height: 462upx;
background: rgba(255, 255, 255, 1);
border-radius: 0px 0px 20upx 20upx;
}
.flex_direction_row {
flex-direction: column;
}
.font_24 {
font-size: 24upx;
}
.font_28 {
font-size: 28upx;
}
.color_FF4444 {
color: #ff4444;
}
.color_999999 {
color: #999999;
}
.color_333333 {
color: #333333;
}
.mb_body_view_title {
font-size: 28upx;
color: rgba(51, 51, 51, 1);
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
white-space: normal !important;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.mb_body_package {
height: 114upx;
width: 490upx;
overflow: hidden;
}
.mb_body_view {
margin-left: 20upx;
height: 114upx;
width: 490upx;
overflow: hidden;
}
.mar_T30 {
margin-top: 30upx;
}
.mb_body_img {
width: 114upx;
height: 114upx;
border-radius: 10upx;
overflow: hidden;
border: 1upx solid rgba(153, 153, 153, 0.1);
> image {
width: 114upx;
height: 114upx;
}
}
.mb_body {
height: 174upx;
}
.ver_top {
vertical-align: top;
}
.mb_right_text {
vertical-align: top;
line-height: 34upx;
font-size: 24upx;
color: rgba(255, 255, 255, 1);
}
.mb_title_right {
margin: 6upx 0 0 0;
text-align: center;
padding: 0 10upx;
height: 34upx;
background: rgba(255, 68, 68, 1);
border-radius: 4upx;
}
.dis-inlneB {
display: inline-block;
}
.mb_title_text {
margin-left: 19upx;
line-height: 46upx;
font-size: 30upx;
color: rgba(51, 51, 51, 1);
}
.mb_title_img {
border: 1upx solid rgba(153, 153, 153, 0.1);
width: 46upx;
height: 46upx;
border-radius: 23upx;
overflow: hidden;
image {
width: 46upx;
height: 46upx;
}
}
.mb_title {
height: 76upx;
}
.mb_package {
padding: 30upx 0;
margin: 0 30upx;
}
.mb {
margin: 0 auto 20upx auto;
width: 690upx;
background: rgba(255, 255, 255, 1);
border-radius: 10upx;
}
.tips_text {
color: #ff4444;
}
.tips {
line-height: 84upx;
height: 84upx;
width: 690upx;
margin: auto;
font-size: 24upx;
color: rgba(51, 51, 51, 1);
}
.dis-flex {
display: flex !important;
justify-content: space-between !important;
}
.ver_mid {
vertical-align: middle;
}
.writeRecord {
font-size: 0;
width: 750upx;
background: #f8f8f8;
}
.popfull {
width: 750upx;
height: 105upx;
}
.topNav {
z-index: 99999;
position: fixed;
top: 0;
left: 0;
width: 750upx;
height: 105upx;
background: rgba(255, 255, 255, 1);
}
.topFull {
width: 750upx;
height: 105upx;
background: rgba(255, 255, 255, 1);
}
.topNav_view {
width: 33%;
display: inline-block;
text-align: center;
}
.topNav_text {
line-height: 105upx;
display: inline-block;
font-size: 28upx;
}
.topNav_text_width {
text-align: center;
display: inline-block;
width: 120upx;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
// 时间选择
.record-dialog {
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
top: 0;
right: 0;
bottom: 0;
left: 0;
.record-dialog-main {
margin: auto;
width: 600upx;
border-radius: 10upx;
z-index: 11;
background: #ffffff;
position: relative;
}
.record-dialog-btns {
border-top: 1upx solid rgba(238, 238, 238, 1);
color: rgba(51, 51, 51, 1);
position: relative;
bottom: 0;
left: 0;
right: 0;
.btn {
width: 50%;
height: 86upx;
font-size: 28upx;
line-height: 86upx;
text-align: center;
}
.btn.confirm {
color: rgba(51, 136, 255, 1);
}
.line {
width: 1px;
height: 36upx;
background: rgba(238, 238, 238, 1);
}
}
.record-picker-view {
margin: 0upx 30upx;
box-sizing: border-box;
width: 540upx;
height: 240upx;
}
}
.item{
font-size: 20upx;
}
.checkCity {
vertical-align: middle;
height: 300upx;
margin-left: 60upx;
display: inline-block;
width: 300upx;
background: #ffffff;
}
.tips {
height: 80upx;
text-align: center;
span {
line-height: 80upx;
font-size: 28upx;
color: black;
}
}
page {
background-color: #f7f7f7;
}
.color-33 {
color: #333333;
}
.item{
font-size: 20upx;
}
/deep/.uni-picker-view-indicator{
height: 70upx !important;
}
.record-dialog {
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
top: 0;
right: 0;
bottom: 0;
left: 0;
.record-dialog-main {
width: 600upx;
border-radius: 10upx;
z-index: 11;
background: #ffffff;
position: relative;
}
.record-dialog-btns {
border-top: 1upx solid rgba(238, 238, 238, 1);
color: rgba(51, 51, 51, 1);
position: relative;
bottom: 0;
left: 0;
right: 0;
.btn {
width: 50%;
height: 86upx;
font-size: 28upx;
line-height: 86upx;
text-align: center;
}
.btn.confirm {
color: rgba(51, 136, 255, 1);
}
.line {
width: 1px;
height: 36upx;
background: rgba(238, 238, 238, 1);
}
}
.record-picker-view {
margin: 40upx 30upx;
box-sizing: border-box;
width: 540upx;
height: 240upx;
}
}
// 搜索栏内容
.search-main {
.search-box {
.search-input {
position: relative;
padding: 0 60upx 0 80upx;
margin-right: 40upx;
background: rgba(246, 246, 246, 1);
height: 76upx;
border-radius: 38upx;
flex: 1;
input {
width: 100%;
height: 100%;
}
.icon.icon-sousuo {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 30upx;
}
}
.search-select {
width: 100upx;
white-space: nowrap;
color: #333333;
.icon {
margin-left: 10upx;
}
}
}
}
//权限名字
.permission-name {
font-size: 28upx;
color: rgba(153, 153, 153, 1);
}
// 头部内容
.pages-header {
width: 100%;
height: 400upx;
background-repeat: no-repeat;
background-size: 100% 400upx;
}
// 详情内容
.record {
background-color: #ffffff;
.record-search {
padding: 30upx;
}
.record-body {
padding: 30upx;
background-color: #f6f6f6;
.color-red {
color: #ff4444;
}
.record-list-item {
padding: 30upx;
border-radius: 10upx;
background: #ffffff;
.record-list-item-header {
border-bottom: 1px solid rgb(238, 238, 238);
padding-bottom: 28upx;
.tag {
padding: 6upx 10upx;
background: rgba(51, 136, 255, 1);
border-radius: 4upx;
text-align: center;
color: #ffffff;
}
}
.record-list-item-content {
padding: 30upx 0;
border-bottom: 1px solid rgb(238, 238, 238);
.record-img {
width: 114upx;
height: 114upx;
border-radius: 4upx;
margin-right: 20upx;
flex-shrink: 0;
}
.goods-name {
color: #000000;
line-height: 36upx;
}
.goods-sku {
color: #999999;
}
}
.record-list-item-footer {
.footer-item {
padding-top: 30upx;
.footer-item-left {
color: #999999;
}
.footer-item-right {
color: #333333;
}
}
}
}
}
}
</style>