Commit d741e213 by 李伟康

commit 提交

1 parent d8a99e45
......@@ -9,8 +9,7 @@
:class="['tab flex', { active: groupIndex == item.id }]"
:key="index"
@click="changeIndex(item.id)"
>{{ item.text }}</view
>
>{{ item.text }}</view>
</template>
<view :class="['active-btn', `active-btn-${groupIndex - 1}`]"></view>
</view>
......@@ -57,7 +56,10 @@
/>
</view>
<template v-for="(k, ind) in itemObject">
<view class="info flex" :key="ind">
<view
class="info flex"
:key="ind"
>
<view class="label">{{ k.label }}</view>
<view :class="{ value: true, bold: k.isBold }">{{
k.format
......@@ -79,9 +81,7 @@
</view>
<view class="info flex">
<view class="label">实收金额</view>
<view class="value bold"
>¥ <text>{{ item.totalPrice.toFixed(2) }}</text></view
>
<view class="value bold">¥ <text>{{ item.totalPrice.toFixed(2) }}</text></view>
</view>
</view>
</view>
......@@ -118,8 +118,16 @@
</view>
</view>
<view class="tabel-container">
<table class="tabel-box" cellspacing="0" border="0" cellpadding="0">
<tr v-for="i in goodsList" :key="i.id">
<table
class="tabel-box"
cellspacing="0"
border="0"
cellpadding="0"
>
<tr
v-for="i in goodsList"
:key="i.id"
>
<td>{{ i.goodsName }}</td>
<td>{{ i.goodsPositionName || "-" }}</td>
<td>{{ i.number }}</td>
......@@ -134,79 +142,93 @@
import dayjs from 'dayjs'
import Record from "@/mixin/record";
export default {
name: '',
mixins:[Record],
props: {
name: '',
mixins: [Record],
props: {
show: Boolean
},
data() {
return {
groupIndex:1,
goodsList:[],
name: '',
dateList: [
{ text: '车窗膜',id:1 },
{ text: '其他精品',id:2 }
],
itemObject: [
{ label: '车架号', key: 'standNo' },
{ label: '工单号', key: 'orderCode' },
{ label: '交易流水号', key: 'outTradeNo' },
{ label: '订单时间', key: 'orderTime',format:true },
{ label: '销售顾问', key: 'employeeName' }
],
}
data () {
return {
groupIndex: 1,
goodsList: [],
name: '',
dateList: [
{ text: '车窗膜', id: 1 },
{ text: '其他精品', id: 2 }
],
itemObject: [
{ label: '车架号', key: 'standNo' },
{ label: '工单号', key: 'orderCode' },
{ label: '交易流水号', key: 'outTradeNo' },
{ label: '订单时间', key: 'orderTime', format: true },
{ label: '销售顾问', key: 'employeeName' }
],
}
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
watch:{
show: {
handler(newValue) {
if(newValue) this.changeIndex(1,true)
},
immediate:true
}
},
watch: {
show: {
handler (newValue) {
if (newValue) this.changeIndex(1, true)
},
immediate: true
},
methods: {
formatTime(val,key) {
return dayjs(val).format("YYYY-MM-DD HH:mm:ss")
watchStatus: {
immediate: true,
handler (newval) {
this.closeAllPopup()
}
},
//下拉分页
pageonReachBottom() {
let { pageNum, total, nothing, pageSize } = this
if (!nothing) nothing = 'nothing'
if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1
this.getRecordList()
} else this.nothing = true
},
handleLook(data) {
this.$refs.historyRef.open()
this.goodsList = data
},
changeIndex(index,isStart=false) {
if (this.groupIndex == index && !isStart) return
this.flag = false
this.nothing = false
this.total = 0
this.list = []
this.pageNum = 1
this.groupIndex = index
this.getRecordList()
},
getRecordList() {
const { pageNum, pageSize,groupIndex } = this,
userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
this.getList('historyDealOrderPage',{
merchantIds: [shopMerchantId],
sceneTypes:[1],
pageNum,
pageSize,
goodsTypeGroup:groupIndex
})
}
},
methods: {
closeAllPopup () {
this.$refs.historyRef.close()
},
formatTime (val, key) {
return dayjs(val).format("YYYY-MM-DD HH:mm:ss")
},
//下拉分页
pageonReachBottom () {
let { pageNum, total, nothing, pageSize } = this
if (!nothing) nothing = 'nothing'
if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1
this.getRecordList()
} else this.nothing = true
},
handleLook (data) {
this.$refs.historyRef.open()
this.goodsList = data
},
changeIndex (index, isStart = false) {
if (this.groupIndex == index && !isStart) return
this.flag = false
this.nothing = false
this.total = 0
this.list = []
this.pageNum = 1
this.groupIndex = index
this.getRecordList()
},
getRecordList () {
const { pageNum, pageSize, groupIndex } = this,
userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
this.getList('historyDealOrderPage', {
merchantIds: [shopMerchantId],
sceneTypes: [1],
pageNum,
pageSize,
goodsTypeGroup: groupIndex
})
}
},
}
</script>
<style scoped lang="scss">
......@@ -224,7 +246,7 @@ export default {
height: 800rpx;
position: absolute;
left: 0;
background-image: url("../../assets/images/boutique/record-bg.png");
background-image: url('../../assets/images/boutique/record-bg.png');
background-size: 100% 100%;
top: 0;
}
......@@ -283,7 +305,7 @@ export default {
border-radius: 370rpx;
left: 0;
top: 0;
content: "";
content: '';
}
.tab {
......@@ -419,11 +441,7 @@ export default {
right: 0;
width: 350rpx;
height: 100%;
background: linear-gradient(
to left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
);
background: linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
}
.info {
margin-top: 16rpx;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!