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.
856 lines
23 KiB
856 lines
23 KiB
<template>
|
|
<view>
|
|
<view class="wrap" :style="'height:' + phoneHeight">
|
|
<view class="u-tabs-box">
|
|
<u-tabs-swiper activeColor="#f29100" ref="tabs" :list="tittleList" :current="current" @change="change" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
|
|
</view>
|
|
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" @change="swiperChange">
|
|
|
|
<swiper-item class="swiper-item" v-for="(iteam,index) in projectTittleList1" :key="index">
|
|
<!-- <u-sticky style="position: initial !important;">
|
|
<view class="cardCss" style="text-align: center;position: sticky">
|
|
<span class="crude" style="">考核项目 : {{iteam.projectName}}</span>
|
|
</view>
|
|
</u-sticky> -->
|
|
<view class="cardCss" style="text-align: center;position: sticky">
|
|
<span class="crude" style="">考核项目 : {{projectTittle}}</span>
|
|
</view>
|
|
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
|
|
<view class="page-box" style="padding-bottom: 30px;">
|
|
<view class="order" v-for="(res, index) in ceshiData" :key="index">
|
|
<u-row>
|
|
<u-col span="2.8">
|
|
考核内容:
|
|
</u-col>
|
|
<u-col span="9.2">
|
|
{{res.title}}
|
|
</u-col>
|
|
</u-row>
|
|
<u-row>
|
|
<u-col span="2.8">
|
|
考核标准:
|
|
</u-col>
|
|
<u-col span="9.2" v-if="res.punishmode==1">
|
|
{{res.scorestr}}{{res.unity}}
|
|
</u-col>
|
|
<u-col span="9.2" v-if="res.punishmode==2">
|
|
{{res.moneystr}}元
|
|
</u-col>
|
|
<u-col span="9.2" v-if="res.punishmode==3">
|
|
{{res.scorestr}}{{res.unity}}/{{res.moneystr}}元
|
|
</u-col>
|
|
</u-row>
|
|
<u-row>
|
|
<u-col span="2.8">
|
|
考核备注:
|
|
</u-col>
|
|
<u-col span="9.2">
|
|
{{res.content}}
|
|
</u-col>
|
|
</u-row>
|
|
<view class="bottom" v-if='res.addreduce==3'>
|
|
<view class="logistics btn" @click="goJia(res)">奖励</view>
|
|
<view class="logistics btn" @click="goJian(res)">惩罚</view>
|
|
<!-- <view class="exchange btn" @click="goJian">减分</view> -->
|
|
<!-- <view class="evaluate btn" @click="goJiaJian">加减分</view> -->
|
|
</view>
|
|
<view class="bottom" v-if='res.addreduce==2'>
|
|
<view class="logistics btn" @click="goJia(res)">奖励</view>
|
|
|
|
<!-- <view class="exchange btn" @click="goJian">减分</view> -->
|
|
<!-- <view class="evaluate btn" @click="goJiaJian">加减分</view> -->
|
|
</view>
|
|
<view class="bottom" v-if='res.addreduce==1'>
|
|
<view class="logistics btn" @click="goJian(res)">惩罚</view>
|
|
<!-- <view class="exchange btn" @click="goJian">减分</view> -->
|
|
<!-- <view class="evaluate btn" @click="goJiaJian">加减分</view> -->
|
|
</view>
|
|
<!-- <view class="top">
|
|
<view class="left">
|
|
<u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon>
|
|
<view class="store">{{ res.projectName }}</view>
|
|
<u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon>
|
|
</view>
|
|
<view class="right">{{ res.deal }}</view>
|
|
</view>
|
|
<view class="item" v-for="(item, index) in res.goodsList" :key="index">
|
|
<view class="left"><image :src="item.goodsUrl" mode="aspectFill"></image></view>
|
|
<view class="content">
|
|
<view class="title u-line-2">{{ item.title }}</view>
|
|
<view class="type">{{ item.type }}</view>
|
|
<view class="delivery-time">发货时间 {{ item.deliveryTime }}</view>
|
|
</view>
|
|
<view class="right">
|
|
<view class="price">
|
|
¥{{ priceInt(item.price) }}
|
|
<text class="decimal">.{{ priceDecimal(item.price) }}</text>
|
|
</view>
|
|
<view class="number">x{{ item.number }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="total">
|
|
共{{ totalNum(res.goodsList) }}件商品 合计:
|
|
<text class="total-price">
|
|
¥{{ priceInt(totalPrice(res.goodsList)) }}.
|
|
<text class="decimal">{{ priceDecimal(totalPrice(res.goodsList)) }}</text>
|
|
</text>
|
|
</view>
|
|
<view class="bottom">
|
|
<view class="more"><u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon></view>
|
|
<view class="logistics btn">查看物流</view>
|
|
<view class="exchange btn">卖了换钱</view>
|
|
<view class="evaluate btn">评价</view>
|
|
</view> -->
|
|
</view>
|
|
<!-- <u-loadmore :status="loadStatus[0]" bgColor="#f2f2f2"></u-loadmore> -->
|
|
</view>
|
|
</scroll-view>
|
|
</swiper-item>
|
|
|
|
</swiper>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
projectTittle:'',
|
|
phoneHeight:'',
|
|
urlData:{},
|
|
ceshiData:[],
|
|
tittleList:[],
|
|
neirongList:[],
|
|
orderList: [[], [], [], []],
|
|
assessList:[
|
|
{
|
|
projectName:'现场控制管理',
|
|
projectId:1,
|
|
child:[
|
|
{
|
|
neirong:'生产厂区内违反《员工行为规范》;',
|
|
biaozhun:'0.1-0.4分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'现场控制管理,迟到,早退等;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注1'
|
|
},
|
|
{
|
|
neirong:'上班期间未经允许做与工作无关的活动;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域卫生打扫不及时,环境脏乱差;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域未划定停车存放区域或车辆停放不规范;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域卫生打扫不及时,环境脏乱差;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域未划定停车存放区域或车辆停放不规范;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注'
|
|
},
|
|
],
|
|
},
|
|
{
|
|
projectId:2,
|
|
projectName:'生产计划执行',
|
|
child:[
|
|
{
|
|
neirong:'生产计划执行《员工行为规范》;',
|
|
biaozhun:'0.1-0.4分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'违反劳动纪律,迟到,早退等;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注1'
|
|
},
|
|
{
|
|
neirong:'上班期间未经允许做与工作无关的活动;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域卫生打扫不及时,环境脏乱差;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域未划定停车存放区域或车辆停放不规范;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注'
|
|
},
|
|
],
|
|
},
|
|
{
|
|
projectId:3,
|
|
projectName:'生产调度配合',
|
|
child:[
|
|
{
|
|
neirong:'生产调度配合《员工行为规范》;',
|
|
biaozhun:'0.1-0.4分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'违反劳动纪律,迟到,早退等;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注1'
|
|
},
|
|
{
|
|
neirong:'上班期间未经允许做与工作无关的活动;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域卫生打扫不及时,环境脏乱差;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域未划定停车存放区域或车辆停放不规范;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注'
|
|
},
|
|
],
|
|
},
|
|
{
|
|
projectId:4,
|
|
projectName:'安全环保控制',
|
|
child:[
|
|
{
|
|
neirong:'安全环保控制《员工行为规范》;',
|
|
biaozhun:'0.1-0.4分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'违反劳动纪律,迟到,早退等;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注1'
|
|
},
|
|
{
|
|
neirong:'上班期间未经允许做与工作无关的活动;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域卫生打扫不及时,环境脏乱差;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域未划定停车存放区域或车辆停放不规范;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注'
|
|
},
|
|
],
|
|
},
|
|
{
|
|
projectId:5,
|
|
projectName:'节能降耗管理',
|
|
child:[
|
|
{
|
|
neirong:'节能降耗管理《员工行为规范》;',
|
|
biaozhun:'0.1-0.4分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'违反劳动纪律,迟到,早退等;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注1'
|
|
},
|
|
{
|
|
neirong:'上班期间未经允许做与工作无关的活动;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域卫生打扫不及时,环境脏乱差;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域未划定停车存放区域或车辆停放不规范;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注'
|
|
},
|
|
],
|
|
},
|
|
{
|
|
projectId:6,
|
|
projectName:'设备运行管理',
|
|
child:[
|
|
{
|
|
neirong:'设备运行管理《员工行为规范》;',
|
|
biaozhun:'0.1-0.4分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'违反劳动纪律,迟到,早退等;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注1'
|
|
},
|
|
{
|
|
neirong:'上班期间未经允许做与工作无关的活动;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域卫生打扫不及时,环境脏乱差;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域未划定停车存放区域或车辆停放不规范;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注'
|
|
},
|
|
],
|
|
},
|
|
{
|
|
projectId:7,
|
|
projectName:'调度会议纪律',
|
|
child:[
|
|
{
|
|
neirong:'调度会议纪律《员工行为规范》;',
|
|
biaozhun:'0.1-0.4分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'违反劳动纪律,迟到,早退等;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注1'
|
|
},
|
|
{
|
|
neirong:'上班期间未经允许做与工作无关的活动;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域卫生打扫不及时,环境脏乱差;',
|
|
biaozhun:'0.1-0.3分/次',
|
|
beizhu:'备注'
|
|
},
|
|
{
|
|
neirong:'各区域未划定停车存放区域或车辆停放不规范;',
|
|
biaozhun:'0.1分/次',
|
|
beizhu:'备注'
|
|
},
|
|
],
|
|
}
|
|
],
|
|
dataList: [
|
|
{
|
|
id: 1,
|
|
store: '夏日流星限定贩卖',
|
|
deal: '交易成功',
|
|
goodsList: [
|
|
{
|
|
goodsUrl: '//img13.360buyimg.com/n7/jfs/t1/103005/7/17719/314825/5e8c19faEb7eed50d/5b81ae4b2f7f3bb7.jpg',
|
|
title: '【冬日限定】现货 原创jk制服女2020冬装新款小清新宽松软糯毛衣外套女开衫短款百搭日系甜美风',
|
|
type: '灰色;M',
|
|
deliveryTime: '付款后30天内发货',
|
|
price: '348.58',
|
|
number: 2
|
|
},
|
|
{
|
|
goodsUrl: '//img12.360buyimg.com/n7/jfs/t1/102191/19/9072/330688/5e0af7cfE17698872/c91c00d713bf729a.jpg',
|
|
title: '【葡萄藤】现货 小清新学院风制服格裙百褶裙女短款百搭日系甜美风原创jk制服女2020新款',
|
|
type: '45cm;S',
|
|
deliveryTime: '付款后30天内发货',
|
|
price: '135.00',
|
|
number: 1
|
|
}
|
|
]
|
|
},
|
|
{
|
|
id: 2,
|
|
store: '江南皮革厂',
|
|
deal: '交易失败',
|
|
goodsList: [
|
|
{
|
|
goodsUrl: '//img14.360buyimg.com/n7/jfs/t1/60319/15/6105/406802/5d43f68aE9f00db8c/0affb7ac46c345e2.jpg',
|
|
title: '【冬日限定】现货 原创jk制服女2020冬装新款小清新宽松软糯毛衣外套女开衫短款百搭日系甜美风',
|
|
type: '粉色;M',
|
|
deliveryTime: '付款后7天内发货',
|
|
price: '128.05',
|
|
number: 1
|
|
}
|
|
]
|
|
},
|
|
{
|
|
id: 3,
|
|
store: '三星旗舰店',
|
|
deal: '交易失败',
|
|
goodsList: [
|
|
{
|
|
goodsUrl: '//img11.360buyimg.com/n7/jfs/t1/94448/29/2734/524808/5dd4cc16E990dfb6b/59c256f85a8c3757.jpg',
|
|
title: '三星(SAMSUNG)京品家电 UA65RUF70AJXXZ 65英寸4K超高清 HDR 京东微联 智能语音 教育资源液晶电视机',
|
|
type: '4K,广色域',
|
|
deliveryTime: '保质5年',
|
|
price: '1998',
|
|
number: 3
|
|
},
|
|
{
|
|
goodsUrl: '//img14.360buyimg.com/n7/jfs/t6007/205/4099529191/294869/ae4e6d4f/595dcf19Ndce3227d.jpg!q90.jpg',
|
|
title: '美的(Midea)639升 对开门冰箱 19分钟急速净味 一级能效冷藏双开门杀菌智能家用双变频节能 BCD-639WKPZM(E)',
|
|
type: '容量大,速冻',
|
|
deliveryTime: '保质5年',
|
|
price: '2354',
|
|
number: 1
|
|
}
|
|
]
|
|
},
|
|
{
|
|
id: 4,
|
|
store: '三星旗舰店',
|
|
deal: '交易失败',
|
|
goodsList: [
|
|
{
|
|
goodsUrl: '//img10.360buyimg.com/n7/jfs/t22300/31/1505958241/171936/9e201a89/5b2b12ffNe6dbb594.jpg!q90.jpg',
|
|
title: '法国进口红酒 拉菲(LAFITE)传奇波尔多干红葡萄酒750ml*6整箱装',
|
|
type: '4K,广色域',
|
|
deliveryTime: '珍藏10年好酒',
|
|
price: '1543',
|
|
number: 3
|
|
},
|
|
{
|
|
goodsUrl: '//img10.360buyimg.com/n7/jfs/t1/107598/17/3766/525060/5e143aacE9a94d43c/03573ae60b8bf0ee.jpg',
|
|
title: '蓝妹(BLUE GIRL)酷爽啤酒 清啤 原装进口啤酒 罐装 500ml*9听 整箱装',
|
|
type: '一打',
|
|
deliveryTime: '口感好',
|
|
price: '120',
|
|
number: 1
|
|
}
|
|
]
|
|
},
|
|
{
|
|
id: 5,
|
|
store: '三星旗舰店',
|
|
deal: '交易成功',
|
|
goodsList: [
|
|
{
|
|
goodsUrl: '//img12.360buyimg.com/n7/jfs/t1/52408/35/3554/78293/5d12e9cfEfd118ba1/ba5995e62cbd747f.jpg!q90.jpg',
|
|
title: '企业微信 中控人脸指纹识别考勤机刷脸机 无线签到异地多店打卡机WX108',
|
|
type: '识别效率高',
|
|
deliveryTime: '使用方便',
|
|
price: '451',
|
|
number: 9
|
|
}
|
|
]
|
|
}
|
|
],
|
|
list: [
|
|
{
|
|
name: '待付款'
|
|
},
|
|
{
|
|
name: '待发货'
|
|
},
|
|
{
|
|
name: '待收货'
|
|
},
|
|
{
|
|
name: '待评价',
|
|
|
|
},
|
|
{
|
|
name: '待评价6'
|
|
},
|
|
{
|
|
name: '待评价7'
|
|
},
|
|
{
|
|
name: '待评价8'
|
|
},
|
|
{
|
|
name: '待评价9',
|
|
|
|
},
|
|
|
|
],
|
|
projectTittleList:[],
|
|
projectTittleList1:[],
|
|
current: 0,
|
|
swiperCurrent: 0,
|
|
tabsHeight: 0,
|
|
dx: 0,
|
|
loadStatus: ['loadmore','loadmore','loadmore','loadmore'],
|
|
};
|
|
},
|
|
onLoad(option) {
|
|
console.log("option")
|
|
console.log(option)
|
|
this.urlData=option
|
|
this.getProjectTittle();
|
|
this.getOrderList(0);
|
|
this.getOrderList(1);
|
|
this.getOrderList(3);
|
|
const that = this
|
|
console.log(document.documentElement.clientHeight+'px')
|
|
this.phoneHeight=document.documentElement.clientHeight+'px'
|
|
// this.assessList.forEach(function(element) {
|
|
// console.log("111")
|
|
|
|
// that.tittleList.push({name:element.projectName})
|
|
// that.neirongList.push(element.child)
|
|
// });
|
|
console.log("this.tittleList")
|
|
console.log(this.projectTittleList)
|
|
|
|
|
|
},
|
|
created() {
|
|
|
|
},
|
|
computed: {
|
|
|
|
// 点击jianfen页面
|
|
goJiaJian(){
|
|
|
|
},
|
|
// 价格小数
|
|
priceDecimal() {
|
|
return val => {
|
|
if (val !== parseInt(val)) return val.slice(-2);
|
|
else return '00';
|
|
};
|
|
},
|
|
// 价格整数
|
|
priceInt() {
|
|
return val => {
|
|
if (val !== parseInt(val)) return val.split('.')[0];
|
|
else return val;
|
|
};
|
|
}
|
|
},
|
|
methods: {
|
|
// 获取初始页面数据
|
|
async getInitialData(){
|
|
const that = this
|
|
const from = {
|
|
page: 1, //分页页码,数字类型
|
|
pagesize: 10000, //默认每页10条
|
|
userkey:this.urlData.key,//被考核人
|
|
dimensionid: this.urlData.dimensionid, //考核纬度
|
|
targetid: this.projectTittleList[0].parentid.toString(), //指标
|
|
sontargetid: this.projectTittleList[0].id.toString() //子栏目
|
|
}
|
|
this.projectTittle=this.projectTittleList[0].title
|
|
await this.$u.api.Duty.get_post_deimenso_info(from).then(res => {
|
|
if(res.code==0){
|
|
this.ceshiData=res.data.list
|
|
// this.projectTittle=res.data[0].targetsunname
|
|
}
|
|
})
|
|
},
|
|
// 根据页标获取数据
|
|
async getIndexData(index){
|
|
const that = this
|
|
const from = {
|
|
page: 1, //分页页码,数字类型
|
|
pagesize: 10000, //默认每页10条
|
|
userkey:this.urlData.key,//被考核人
|
|
dimensionid: this.urlData.dimensionid, //考核纬度
|
|
targetid: this.projectTittleList[index].parentid.toString(), //指标
|
|
sontargetid: this.projectTittleList[index].id.toString() //子栏目
|
|
}
|
|
this.projectTittle=this.projectTittleList[index].title
|
|
await this.$u.api.Duty.get_post_deimenso_info(from).then(res => {
|
|
if(res.code==0){
|
|
this.ceshiData=res.data.list
|
|
console.log(res.data[0].targetsunname)
|
|
// this.projectTittle=res.data[0].targetsunname
|
|
console.log(this.projectTittleList1)
|
|
}
|
|
|
|
})
|
|
},
|
|
// 获取考核项目标题
|
|
async getProjectTittle(){
|
|
const that = this
|
|
// const from = {
|
|
// group: this.urlData.group, //集团
|
|
// department: this.urlData.department, //分厂(部室)
|
|
// targets: this.urlData.target //指标
|
|
// }
|
|
const from = {
|
|
id:this.urlData.id
|
|
}
|
|
await this.$u.api.Duty.get_post_nature_son_target(from).then(res => {
|
|
if(res.code==0){
|
|
this.projectTittleList= JSON.parse(JSON.stringify(res.data))
|
|
this.projectTittleList1= JSON.parse(JSON.stringify(res.data))
|
|
console.log("res.data")
|
|
console.log(this.projectTittleList)
|
|
this.getInitialData()
|
|
if(this.projectTittleList.length>4){
|
|
this.projectTittleList.forEach(function(element) {
|
|
if (element.title.length > 3) {
|
|
|
|
element.title = element.title.substr(0,3) + "..."
|
|
}
|
|
that.tittleList.push({name:element.title})
|
|
// that.neirongList.push(element.child)
|
|
});
|
|
}else{
|
|
this.projectTittleList.forEach(function(element) {
|
|
that.tittleList.push({name:element.title})
|
|
// that.neirongList.push(element.child)
|
|
});
|
|
}
|
|
// alert(JSON.stringify(this.projectTittleList));
|
|
}
|
|
|
|
})
|
|
console.log(555)
|
|
console.log(this.projectTittleList)
|
|
// this.tittleList.forEach(function(element) {
|
|
// console.log(555)
|
|
// if(element.name.length > 3) { //如果字符长度超过10,后面的字符就变成...可自行调整长度和代替字符
|
|
// element.name = element.name.substr(0,3) + "..." //截取从第一个字符开始,往后取10个字符,剩余的用...代替
|
|
// }
|
|
// });
|
|
},
|
|
// 点击加分页面
|
|
goJia(data){
|
|
this.$u.route('/pages/post/jia', data);
|
|
},
|
|
// 点击jianfen页面
|
|
goJian(data){
|
|
this.$u.route('/pages/post/jian', data);
|
|
},
|
|
reachBottom() {
|
|
// 此tab为空数据
|
|
if(this.current != 2) {
|
|
this.loadStatus.splice(this.current,1,"loading")
|
|
setTimeout(() => {
|
|
this.getOrderList(this.current);
|
|
}, 1200);
|
|
}
|
|
},
|
|
// 页面数据
|
|
getOrderList(idx) {
|
|
for(let i = 0; i < 5; i++) {
|
|
let index = this.$u.random(0, this.dataList.length - 1);
|
|
let data = JSON.parse(JSON.stringify(this.dataList[index]));
|
|
data.id = this.$u.guid();
|
|
this.orderList[idx].push(data);
|
|
}
|
|
this.loadStatus.splice(this.current,1,"loadmore")
|
|
},
|
|
// 总价
|
|
totalPrice(item) {
|
|
let price = 0;
|
|
item.map(val => {
|
|
price += parseFloat(val.price);
|
|
});
|
|
return price.toFixed(2);
|
|
},
|
|
// 总件数
|
|
totalNum(item) {
|
|
let num = 0;
|
|
item.map(val => {
|
|
num += val.number;
|
|
});
|
|
return num;
|
|
},
|
|
swiperChange(index){
|
|
console.log("swiperindex")
|
|
console.log(index.detail.current)
|
|
console.log(this.assessList[index.detail.current])
|
|
this.getIndexData(index.detail.current)
|
|
|
|
|
|
},
|
|
// tab栏切换
|
|
change(index) {
|
|
console.log("index")
|
|
console.log(index)
|
|
this.swiperCurrent = index;
|
|
this.getIndexData(index)
|
|
// this.ceshiData=this.assessList[index]
|
|
// console.log(this.ceshiData)
|
|
// this.getOrderList(index);
|
|
},
|
|
transition({ detail: { dx } }) {
|
|
this.$refs.tabs.setDx(dx);
|
|
},
|
|
animationfinish({ detail: { current } }) {
|
|
this.$refs.tabs.setFinishCurrent(current);
|
|
this.swiperCurrent = current;
|
|
this.current = current;
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
/* #ifndef H5 */
|
|
page {
|
|
height: 100%;
|
|
background-color: #f2f2f2;
|
|
}
|
|
/* #endif */
|
|
</style>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.crude{
|
|
font-size: 18px;
|
|
font-weight:bold;
|
|
}
|
|
.order {
|
|
width: 710rpx;
|
|
background-color: #ffffff;
|
|
margin: 20rpx auto;
|
|
border-radius: 20rpx;
|
|
box-sizing: border-box;
|
|
padding: 20rpx;
|
|
font-size: 28rpx;
|
|
.top {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
.left {
|
|
display: flex;
|
|
align-items: center;
|
|
.store {
|
|
margin: 0 10rpx;
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
.right {
|
|
color: $u-type-warning-dark;
|
|
}
|
|
}
|
|
.item {
|
|
display: flex;
|
|
margin: 20rpx 0 0;
|
|
.left {
|
|
margin-right: 20rpx;
|
|
image {
|
|
width: 200rpx;
|
|
height: 200rpx;
|
|
border-radius: 10rpx;
|
|
}
|
|
}
|
|
.content {
|
|
.title {
|
|
font-size: 28rpx;
|
|
line-height: 50rpx;
|
|
}
|
|
.type {
|
|
margin: 10rpx 0;
|
|
font-size: 24rpx;
|
|
color: $u-tips-color;
|
|
}
|
|
.delivery-time {
|
|
color: #e5d001;
|
|
font-size: 24rpx;
|
|
}
|
|
}
|
|
.right {
|
|
margin-left: 10rpx;
|
|
padding-top: 20rpx;
|
|
text-align: right;
|
|
.decimal {
|
|
font-size: 24rpx;
|
|
margin-top: 4rpx;
|
|
}
|
|
.number {
|
|
color: $u-tips-color;
|
|
font-size: 24rpx;
|
|
}
|
|
}
|
|
}
|
|
.total {
|
|
margin-top: 20rpx;
|
|
text-align: right;
|
|
font-size: 24rpx;
|
|
.total-price {
|
|
font-size: 32rpx;
|
|
}
|
|
}
|
|
.bottom {
|
|
display: flex;
|
|
margin-top: 40rpx;
|
|
padding: 0 10rpx;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
.btn {
|
|
line-height: 52rpx;
|
|
width: 160rpx;
|
|
border-radius: 26rpx;
|
|
border: 2rpx solid $u-border-color;
|
|
font-size: 26rpx;
|
|
text-align: center;
|
|
color: $u-type-info-dark;
|
|
}
|
|
.evaluate {
|
|
color: $u-type-warning-dark;
|
|
border-color: $u-type-warning-dark;
|
|
}
|
|
}
|
|
}
|
|
.cardCss{
|
|
padding: 5px;
|
|
/* border-style:solid;
|
|
border-width:1px; */
|
|
border-radius:20px;
|
|
margin-bottom: 5px;
|
|
background-color: rgb(255, 255, 255);
|
|
}
|
|
.centre {
|
|
text-align: center;
|
|
margin: 200rpx auto;
|
|
font-size: 32rpx;
|
|
image {
|
|
width: 164rpx;
|
|
height: 164rpx;
|
|
border-radius: 50%;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
.tips {
|
|
font-size: 24rpx;
|
|
color: #999999;
|
|
margin-top: 20rpx;
|
|
}
|
|
.btn {
|
|
margin: 80rpx auto;
|
|
width: 200rpx;
|
|
border-radius: 32rpx;
|
|
line-height: 64rpx;
|
|
color: #ffffff;
|
|
font-size: 26rpx;
|
|
background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%);
|
|
}
|
|
}
|
|
.wrap {
|
|
display: flex;
|
|
flex-direction: column;
|
|
// height: calc(100vh - var(--window-top));
|
|
width: 100%;
|
|
// height: 844px;
|
|
|
|
}
|
|
.swiper-box {
|
|
flex: 1;
|
|
}
|
|
.swiper-item {
|
|
height: 100%;
|
|
}
|
|
</style>
|
|
|