Commit d741e213 by 李伟康

commit 提交

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