This commit is contained in:
caolc
2023-05-08 10:45:07 +08:00
parent 8fd25deedf
commit 1c3e0f9662
27 changed files with 388 additions and 297 deletions

View File

@@ -9,8 +9,7 @@
<text class="oil-main-color fr">{{item.orderStatus|statusConduct}}</text>
</view>
<view class="cu-list menu-avatar comment">
<view class="cu-item padding-top-0" @tap="toDetails(item.orderSerialNumber)">
<view class="cu-item padding-top-0" @tap="toDetails(item.id)">
<!-- <view class="cu-avatar text-xl" :style="'background-image:url('+imgUrl+'orders-wjy.png)'"></view> -->
<view class="cu-avatar text-xl round" v-show="item.siteImages!=null"
:style="'background-image:url('+item.siteImages+')'"></view>
@@ -71,18 +70,18 @@
</view>
<view class="flex-sub text-right" v-show="item.orderStatus=='0' && !timeout">
<button class="cu-btn nowrap sm bg-main-oil"
@tap="makePay(item.orderSerialNumber)">立即支付</button>
@tap="makePay(item.id)">立即支付</button>
</view>
</view>
</view>
</view>
<view class="radius shadow mini-btn bg-white padding flex-wrap position-ab" v-if="showMiniBtn">
<view class="margin-bottom-sm ">
<!-- <view class="margin-bottom-sm ">
<button class="cu-btn nowrap bg-main-oil" @tap="deleteOrder(item.orderSerialNumber)">删除</button>
</view>
</view> -->
<view class="margin-bottom-sm" v-show="item.orderStatus=='0'">
<button class="cu-btn nowrap bg-brown" @tap="cancelOrder(item.orderSerialNumber)">取消</button>
<button class="cu-btn nowrap bg-brown" @tap="cancelOrder(item.id)">取消</button>
</view>
<view class=" ">
<button class="cu-btn nowrap " @tap="showMiniBtn=false">收起</button>
@@ -213,11 +212,11 @@
},
statusConduct(value) {
// 备注:订单状态 0待支付 1已支付 -1支付失败 2已取消3已退款
if (value) {
if (String(value)) {
// switch value
// case "0"
// return '待支付'
switch (value) {
switch (String(value)) {
case '0':
return '待支付'
case '1':

View File

@@ -1,5 +1,5 @@
<template>
<view class="cu-item cur padding no-mr-border site-item" :style="{height:siteItem.oilProductCodeAndPrices.length>3?'220rpx !important':listHeight?listHeight + 'rpx !important':''}">
<view class="cu-item cur padding no-mr-border site-item" >
<view class="cu-avatar radius lg "
:style="'background-image:url('+(siteItem.siteImages?siteItem.siteImages:defaultLogo)+');'">
</view>
@@ -9,19 +9,19 @@
</view>
<view class="listTages">
<!-- <view v-if="siteItem.siteLevel" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteLevel}}</view> -->
<view class="cu-tag round bg-self-yellow yu-tag text-xs" :class="siteItem.channelCode=='XOIL'?'tag-red':''">{{siteItem.listTag|channelCodeFamt}}
<view class="cu-tag round bg-self-yellow yu-tag text-xs" :class="siteItem.channelCode=='XOIL'?'tag-red':''">{{siteItem.listTag||'未知'}}
</view>
<view class="cu-tag round bg-self--dark-yellow yu-tag text-xs" v-show="first">距离最近</view>
</view>
<view class="">
<view class="text-cut color-666 text-sm ">
{{siteItem.address}}
{{siteItem.address||'暂无地理位置'}}
</view>
</view>
<view class="text-gray flex" style="width: calc(100% + 30%);display: flex;flex-wrap: wrap;">
<!-- <view class="text-gray flex" style="width: calc(100% + 30%);display: flex;flex-wrap: wrap;">
<view v-if="listHeight" class="youpin" style="" v-for="(item,index) in siteItem.oilProductCodeAndPrices">
<view class="text-bold oil-main-color text-xl padding-right-xs">
{{item.oilProductCode}}
{{item.oilProductCode}}
</view>
<view class="oil-main-color text-xl text-bold padding-right-xs" style="padding-right: 0;">
{{item.personalPriceZp|moneyFormat}}
@@ -41,18 +41,27 @@
<text class="text-delete color-333 text-sm padding-right-xs">
{{siteItem.oilSitePrice|moneyFormat}}/L
</text>
<!-- <my-icon iconName="¥.png" class="padding-right-xs icon-rectangle"></my-icon>
<my-icon iconName="f.png" class="padding-right-xs "></my-icon> -->
</view>
</view>
</view> -->
<view class="text-gray flex">
<view class="text-bold yellow-oil text-xl padding-right-xs">{{ siteItem.oilProductCode }}</view>
<view class="oil-main-color text-xl text-bold padding-right-xs">{{ siteItem.personalPriceApp | moneyFormat }}</view>
<!-- <view class="">
<text class="cu-tag oil-tag radius text-xs" v-if="siteItem.personalPriceBase - siteItem.personalPriceApp > 0">
{{ (siteItem.personalPriceBase - siteItem.personalPriceApp) | moneyFormat }}
</text>
</view> -->
<!-- <view class="text-cut padding-left-sm text-lg">
<text class="text-delete color-333 text-sm padding-right-xs">{{ siteItem.personalPriceBase | moneyFormat }}/L</text>
</view> -->
</view>
</view>
<view class="action">
<view class="text-grey text-sm " style="padding-top: 6rpx;">
<!-- <my-icon iconName="sy-der-icon.png" class="padding-right-xs text-sm"></my-icon> -->
{{siteItem.juli|distanceFilter}}
{{ siteItem.juli|distanceFilter}}
</view>
</view>
@@ -83,14 +92,12 @@
}
},
created() {
console.log(this.siteItem,'-----------------')
},
methods: {
},
filters: {
channelCodeFamt(value) {
console.log(value)
if (!value) {
return '未知'
// 渠道编码 ( XOIL星油 WJY万金油 LV老吕找油网 TY团油 YDJY一点加油壳牌)
@@ -113,6 +120,8 @@
distanceFilter(value) {
if (value) {
return value > 1000 ? ((value / 1000).toFixed(2) + 'km') : (value + 'm')
}else{
return '暂无距离'
}
},
moneyFormat(value) {

BIN
components/sl-filter.zip Normal file

Binary file not shown.

View File

@@ -32,26 +32,20 @@
</text>
</view>
</view> -->
<view class="filter-content-detail" v-show="pickerShow">
<view class="filter-content-detail" v-show="pickerShow&&areaCodeList.length">
<!-- 省市区选择 -->
<view class="region-box" v-if="index==0">
<view class="region-box" v-show="index==0">
<picker-view disabled :value="region" @change="bindChange" ref="showHide">
<picker-view-column>
<view class="center" v-for="(item, index) in areaCodeList" :key="index">
{{ item.areaName }}
<view class="center" v-for="(items, index) in areaCodeList" :key="index">
{{ items.areaName }}
</view>
</picker-view-column>
<picker-view-column>
<view class="center" v-for="(item, index) in areaCodeList[areaIndex[0]].childList" :key="index">
{{ item.areaName }}
<view class="center" v-for="(items, index) in areaCodeList[areaIndex[0]].childList" :key="index">
{{ items.areaName }}
</view>
</picker-view-column>
<!-- <picker-view-column v-if="areaCodeList[areaIndex[0]]">
<view class="center"
v-for="(item, index) in areaCodeList[areaIndex[0]].childList[areaIndex[1]].childList" :key="index">
{{ item.areaName }}
</view>
</picker-view-column> -->
</picker-view>
</view>
</view>
@@ -72,28 +66,6 @@
<script>
export default {
data() {
return {
region:[],
selectArr: [],
result: {},
pickerShow:false,
menuIndex: 0,
areaIndex:[0, 0],
paixu:1,
provinceCode:'',
oilCode:'',
showHide:true,
cityCode:'',
areaCode:'',
selectDetailList: [],
independenceObj: {},
areaCodeList:[],
selectedKey: '',
cacheSelectedObj: {},
defaultSelectedTitleObj: {}
};
},
props: {
themeColor: {
type: String,
@@ -118,8 +90,39 @@
default: false
}
},
data() {
return {
region:[],
selectArr: [],
result: {},
pickerShow:false,
menuIndex: 0,
areaIndex:[0, 0],
paixu:1,
provinceCode:'',
oilCode:'',
showHide:true,
cityCode:'',
areaCode:'',
selectDetailList: [],
independenceObj: {},
areaCodeList:[],
selectedKey: '',
cacheSelectedObj: {},
defaultSelectedTitleObj: {}
};
},
watch:{
// areaCodeList(n){
// if(n.length){
// this.$forceUpdate()
// }
// console.log(n,'====')
// }
},
created() {
this.areaCodeList = uni.getStorageSync('areaCodeList');
console.log(this.areaCodeList,'areaCodeList ')
console.log('%c 子组件参数↓','font-size:30px;color:red')
},
mounted() {