新增门店
parent
3e9f9d45b6
commit
6d5ab575a3
|
|
@ -80,13 +80,12 @@
|
|||
}
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
});
|
||||
});
|
||||
// 是否指定方法
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("index", "index", "express"),
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.params.id || 0,
|
||||
},
|
||||
data: this.params,
|
||||
dataType: "json",
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
* 导航
|
||||
*/
|
||||
.nav-base .item {
|
||||
width: 20%;
|
||||
}
|
||||
|
|
@ -0,0 +1,245 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 导航 -->
|
||||
<view class="nav-base bg-white">
|
||||
<block v-for="(item, index) in nav_status_list" :key="index">
|
||||
<view v-if="nav_status_index == index" class="item fl tc cr-main" :data-index="index" @tap="nav_event">{{item.name}}</view>
|
||||
<view v-else class="item fl tc" :data-index="index" @tap="nav_event">{{item.name}}</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<scroll-view :scroll-y="true" class="scroll-box scroll-box-ece-nav" @scrolltolower="scroll_lower" lower-threshold="30">
|
||||
<view v-if="data_list.length > 0" class="padding-horizontal-main padding-top-main">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="list-item padding-horizontal-main padding-top-main border-radius-main bg-white oh spacing-mb">
|
||||
<view class="item-base oh br-b padding-bottom-main">
|
||||
<text class="fl cr-base">{{item.add_time}}</text>
|
||||
<text class="fr cr-red">{{item.status_name}}<text v-if="(item.is_under_line_text || null) != null">({{item.is_under_line_text}})</text></text>
|
||||
</view>
|
||||
<view class="br-b padding-vertical-main">
|
||||
<view class="cr-base">{{item.name}}</view>
|
||||
<view v-if="(item.describe || null) != null" class="cr-grey margin-top-xs">{{item.describe}}</view>
|
||||
</view>
|
||||
<block v-if="(item.detail_data || null) != null && item.detail_data.length > 0">
|
||||
<view v-for="(detail, di) in item.detail_data" :key="di" class="br-b-dashed oh padding-vertical-main">
|
||||
<block v-for="(fv,fi) in content_list">
|
||||
<view class="single-text margin-top-xs">
|
||||
<text class="cr-gray margin-right-xl">{{fv.name}}</text>
|
||||
<text class="cr-base">{{detail[fv.field]}}</text>
|
||||
<text v-if="(fv.unit || null) != null" class="cr-gray">{{fv.unit}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
params: null,
|
||||
nav_status_list: [
|
||||
{ name: "全部", value: "-1" },
|
||||
{ name: "待生效", value: "0" },
|
||||
{ name: "进行中", value: "1" },
|
||||
{ name: "已完成", value: "2" },
|
||||
{ name: "已关闭", value: "3" },
|
||||
],
|
||||
nav_status_index: 0,
|
||||
content_list: [
|
||||
{name: "描述", field: "describe"},
|
||||
{name: "备注", field: "note"},
|
||||
{name: "时间", field: "upd_time"},
|
||||
{name: "状态", field: "status_name"}
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
// 是否指定状态
|
||||
var nav_status_index = 0;
|
||||
if ((params.status || null) != null) {
|
||||
for (var i in this.nav_status_list) {
|
||||
if (this.nav_status_list[i]['value'] == params.status) {
|
||||
nav_status_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
params: params,
|
||||
nav_status_index: nav_status_index
|
||||
});
|
||||
|
||||
// 数据加载
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.setData({
|
||||
data_page: 1
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取数据
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login?event_callback=init"
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
// 获取数据
|
||||
this.get_data_list();
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data_list(is_mandatory) {
|
||||
// 分页是否还有数据
|
||||
if ((is_mandatory || 0) == 0) {
|
||||
if (this.data_bottom_line_status == true) {
|
||||
uni.stopPullDownRefresh();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
});
|
||||
this.setData({
|
||||
data_list_loding_status: 1
|
||||
});
|
||||
|
||||
// 参数
|
||||
var status = (this.nav_status_list[this.nav_status_index] || null) == null ? -1 : this.nav_status_list[this.nav_status_index]['value'];
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("index", "batchorder", "realstore"),
|
||||
method: "POST",
|
||||
data: {
|
||||
page: this.data_page,
|
||||
status: status,
|
||||
oid: this.params.oid || 0
|
||||
},
|
||||
dataType: "json",
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.data.data.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = res.data.data.data;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = res.data.data.data;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: res.data.data.total,
|
||||
data_page_total: res.data.data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: (this.data_page > 1 && this.data_page > this.data_page_total)
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list: [],
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data_list')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
load_status: 1
|
||||
});
|
||||
app.globalData.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
},
|
||||
|
||||
// 导航事件
|
||||
nav_event(e) {
|
||||
this.setData({
|
||||
nav_status_index: e.currentTarget.dataset.index || 0,
|
||||
data_page: 1
|
||||
});
|
||||
|
||||
// 重新拉取数据
|
||||
this.get_data_list(1);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './batchorder-list.css';
|
||||
</style>
|
||||
|
|
@ -0,0 +1,223 @@
|
|||
/**
|
||||
* 头部
|
||||
*/
|
||||
.header {
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
border-bottom-left-radius: 100rpx;
|
||||
border-bottom-right-radius: 100rpx;
|
||||
height: 310rpx;
|
||||
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO */
|
||||
height: 360rpx;
|
||||
/* #endif */
|
||||
}
|
||||
/**
|
||||
* 顶部
|
||||
*/
|
||||
.header-top {
|
||||
padding-right: 250rpx;
|
||||
/* #ifdef MP-ALIPAY */
|
||||
padding-right: 255rpx;
|
||||
/* #endif */
|
||||
/* #ifdef H5 || APP */
|
||||
padding-right: 20rpx;
|
||||
/* #endif */
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.nav-location {
|
||||
width: 180rpx;
|
||||
background: rgb(0 0 0 / 60%);
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
font-size: 12px;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.nav-search {
|
||||
width: calc(100% - 220rpx);
|
||||
}
|
||||
|
||||
/**
|
||||
* 头部内容
|
||||
*/
|
||||
.header-content {
|
||||
top: 140rpx;
|
||||
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO */
|
||||
top: 200rpx;
|
||||
/* #endif */
|
||||
width: calc(100% - 80rpx);
|
||||
box-shadow: 0 0 8px rgb(0 0 0 / 6%);
|
||||
}
|
||||
.header-content .address-content {
|
||||
width: calc(100% - 220rpx);
|
||||
}
|
||||
.header-content .icon-list {
|
||||
right: 20rpx;
|
||||
bottom: 20rpx;
|
||||
}
|
||||
.header-content .icon-list .icon-item {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.header-content .icon-item .badge-icon {
|
||||
top: -10px;
|
||||
right: 2px;
|
||||
}
|
||||
.header-content .icon-list .icon-item:not(:last-child) {
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.header-content .logo {
|
||||
width: 110rpx;
|
||||
height: 110rpx !important;
|
||||
}
|
||||
.header-content .base-right {
|
||||
width: calc(100% - 130rpx);
|
||||
}
|
||||
.header-content .base-right .title-length-limit {
|
||||
width: calc(100% - 110rpx);
|
||||
}
|
||||
.header-content .base-right .use-type-icon {
|
||||
border-top-left-radius: 50rpx;
|
||||
border-bottom-left-radius: 50rpx;
|
||||
top: 20rpx;
|
||||
right: -1px;
|
||||
padding: 5rpx 20rpx;
|
||||
box-shadow: -1px 1px 3px rgb(0 0 0 / 10%);
|
||||
}
|
||||
|
||||
/**
|
||||
* 桌码
|
||||
*/
|
||||
.tablecode {
|
||||
background: rgb(255 255 255 / 60%);
|
||||
padding: 2rpx 20rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 中间内容
|
||||
*/
|
||||
.content {
|
||||
margin-top: 80rpx;
|
||||
height: calc(100vh - 440rpx);
|
||||
/* #ifdef H5 || APP */
|
||||
height: calc(100vh - 390rpx);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
/**
|
||||
* 左侧导航
|
||||
*/
|
||||
.left-content {
|
||||
width: 180rpx;
|
||||
height: calc(100% - 120rpx);
|
||||
padding-bottom: 120rpx;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.left-content .item {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
padding: 0 10rpx;
|
||||
border-left: 3px solid #fff;
|
||||
border-right: 3px solid #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
.left-content .item:not(:last-child) {
|
||||
border-bottom: 1px solid #f1f1f1 !important;
|
||||
}
|
||||
.left-content .active {
|
||||
background: #f5f5f5;
|
||||
border-width: 0 0 0 3px;
|
||||
border-right: 3px solid #f5f5f5 !important;
|
||||
}
|
||||
.left-content .badge-icon {
|
||||
top: -16rpx;
|
||||
right: 26rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 右侧内容
|
||||
*/
|
||||
.right-content {
|
||||
width: calc(100% - 220rpx);
|
||||
height: calc(100% - 110rpx);
|
||||
padding-bottom: 110rpx;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.goods-list .goods-img {
|
||||
width: 160rpx;
|
||||
height: 160rpx !important;
|
||||
}
|
||||
.goods-list .goods-base {
|
||||
width: calc(100% - 180rpx);
|
||||
}
|
||||
.goods-list .goods-base-content {
|
||||
min-height: 100rpx;
|
||||
}
|
||||
.goods-list .goods-base .simple-desc {
|
||||
line-height: 30rpx;
|
||||
min-height: 30rpx;
|
||||
max-height: 58rpx;
|
||||
}
|
||||
.goods-list .goods-base .sales-price {
|
||||
width: calc(100% - 160rpx);
|
||||
}
|
||||
.goods-list .goods-base .buy-number {
|
||||
min-width: 32rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 底部导航
|
||||
*/
|
||||
.botton-nav {
|
||||
width: calc(100% - 40rpx);
|
||||
left: 20rpx;
|
||||
bottom: 20rpx;
|
||||
line-height: 80rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
.botton-nav .cart .badge-icon {
|
||||
top: -20rpx;
|
||||
right: -2rpx;
|
||||
}
|
||||
.botton-nav .cart-total-price {
|
||||
width: calc(100% - 260rpx);
|
||||
}
|
||||
.botton-nav button {
|
||||
top: 0;
|
||||
right: 0;
|
||||
line-height: 88rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 购物车
|
||||
*/
|
||||
.cart-mask {
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: rgb(0, 0, 0, 0.6);
|
||||
z-index: 1;
|
||||
}
|
||||
.cart-content {
|
||||
left: 20rpx;
|
||||
bottom: 130rpx;
|
||||
width: calc(100% - 40rpx);
|
||||
z-index: 2;
|
||||
}
|
||||
.cart-content .cart-list {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
max-height: 60vh;
|
||||
}
|
||||
.cart-content .cart-list .goods-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx !important;
|
||||
}
|
||||
.cart-content .cart-list .goods-base {
|
||||
width: calc(100% - 140rpx);
|
||||
}
|
||||
.cart-content .cart-list .goods-base-content {
|
||||
min-height: 60rpx;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
* 导航
|
||||
*/
|
||||
.nav-base .item {
|
||||
width: 20%;
|
||||
}
|
||||
|
|
@ -0,0 +1,251 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 导航 -->
|
||||
<view class="nav-base bg-white">
|
||||
<block v-for="(item, index) in nav_status_list" :key="index">
|
||||
<view v-if="nav_status_index == index" class="item fl tc cr-main" :data-index="index" @tap="nav_event">{{item.name}}</view>
|
||||
<view v-else class="item fl tc" :data-index="index" @tap="nav_event">{{item.name}}</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<scroll-view :scroll-y="true" class="scroll-box scroll-box-ece-nav" @scrolltolower="scroll_lower" lower-threshold="30">
|
||||
<view v-if="data_list.length > 0" class="padding-horizontal-main padding-top-main">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="list-item padding-horizontal-main padding-top-main border-radius-main bg-white oh spacing-mb">
|
||||
<view class="item-base oh br-b padding-bottom-main">
|
||||
<text class="fl cr-base">{{item.add_time}}</text>
|
||||
<text class="fr cr-red">{{item.status_name}}<text v-if="(item.is_under_line_text || null) != null">({{item.is_under_line_text}})</text></text>
|
||||
</view>
|
||||
<view class="br-b padding-vertical-main">
|
||||
<view class="cr-base">{{item.name}}</view>
|
||||
<view v-if="(item.describe || null) != null" class="cr-grey margin-top-xs">{{item.describe}}</view>
|
||||
</view>
|
||||
<view class="padding-vertical-main">
|
||||
<block v-for="(fv,fi) in content_list">
|
||||
<view class="single-text margin-top-xs">
|
||||
<text class="cr-gray margin-right-xl">{{fv.name}}</text>
|
||||
<text class="cr-base">{{item[fv.field]}}</text>
|
||||
<text v-if="(fv.unit || null) != null" class="cr-gray">{{fv.unit}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="item-operation tr br-t padding-vertical-main">
|
||||
<button class="round bg-white cr-green br-green" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/realstore/frequencycard-used/frequencycard-used?cuid='+item.id" hover-class="none">使用记录</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
params: null,
|
||||
nav_status_list: [
|
||||
{ name: "全部", value: "-1" },
|
||||
{ name: "有效", value: "0" },
|
||||
{ name: "暂停", value: "1" },
|
||||
{ name: "结束", value: "2" },
|
||||
{ name: "关闭", value: "3" },
|
||||
],
|
||||
nav_status_index: 0,
|
||||
content_list: [
|
||||
{name: "可用次数", field: "valid_number", unit: "次"},
|
||||
{name: "已用次数", field: "use_number", unit: "次"},
|
||||
{name: "起始时间", field: "start_time"},
|
||||
{name: "结束时间", field: "end_time"}
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
// 是否指定状态
|
||||
var nav_status_index = 0;
|
||||
if ((params.status || null) != null) {
|
||||
for (var i in this.nav_status_list) {
|
||||
if (this.nav_status_list[i]['value'] == params.status) {
|
||||
nav_status_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
params: params,
|
||||
nav_status_index: nav_status_index
|
||||
});
|
||||
|
||||
// 数据加载
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.setData({
|
||||
data_page: 1
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取数据
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login?event_callback=init"
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
// 获取数据
|
||||
this.get_data_list();
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data_list(is_mandatory) {
|
||||
// 分页是否还有数据
|
||||
if ((is_mandatory || 0) == 0) {
|
||||
if (this.data_bottom_line_status == true) {
|
||||
uni.stopPullDownRefresh();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
});
|
||||
this.setData({
|
||||
data_list_loding_status: 1
|
||||
});
|
||||
|
||||
// 参数
|
||||
var status = (this.nav_status_list[this.nav_status_index] || null) == null ? -1 : this.nav_status_list[this.nav_status_index]['value'];
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("index", "frequencycard", "realstore"),
|
||||
method: "POST",
|
||||
data: {
|
||||
page: this.data_page,
|
||||
status: status,
|
||||
oid: this.params.oid || 0
|
||||
},
|
||||
dataType: "json",
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.data.data.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = res.data.data.data;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = res.data.data.data;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: res.data.data.total,
|
||||
data_page_total: res.data.data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: (this.data_page > 1 && this.data_page > this.data_page_total)
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list: [],
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data_list')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
load_status: 1
|
||||
});
|
||||
app.globalData.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
},
|
||||
|
||||
// 导航事件
|
||||
nav_event(e) {
|
||||
this.setData({
|
||||
nav_status_index: e.currentTarget.dataset.index || 0,
|
||||
data_page: 1
|
||||
});
|
||||
|
||||
// 重新拉取数据
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './frequencycard-list.css';
|
||||
</style>
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
<template>
|
||||
<view>
|
||||
<scroll-view :scroll-y="true" class="scroll-box" @scrolltolower="scroll_lower" lower-threshold="30">
|
||||
<view v-if="data_list.length > 0" class="padding-horizontal-main padding-top-main">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="list-item padding-horizontal-main padding-top-main border-radius-main bg-white oh spacing-mb">
|
||||
<view class="item-base oh br-b padding-bottom-main">
|
||||
<text class="fl cr-base">{{item.add_time}}</text>
|
||||
</view>
|
||||
<view class="padding-vertical-main">
|
||||
<block v-for="(fv,fi) in content_list">
|
||||
<view class="single-text margin-top-xs">
|
||||
<text class="cr-gray margin-right-xl">{{fv.name}}</text>
|
||||
<text class="cr-base">{{item[fv.field]}}</text>
|
||||
<text v-if="(fv.unit || null) != null" class="cr-gray">{{fv.unit}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
params: null,
|
||||
content_list: [
|
||||
{name: "扣除次数", field: "dec_number", unit: "次"},
|
||||
{name: "描述说明", field: "msg"},
|
||||
{name: "操作人员", field: "operate_name"},
|
||||
{name: "使用时间", field: "use_time"}
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
this.setData({
|
||||
params: params
|
||||
});
|
||||
|
||||
// 数据加载
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.setData({
|
||||
data_page: 1
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取数据
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login?event_callback=init"
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
// 获取数据
|
||||
this.get_data_list();
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data_list(is_mandatory) {
|
||||
// 分页是否还有数据
|
||||
if ((is_mandatory || 0) == 0) {
|
||||
if (this.data_bottom_line_status == true) {
|
||||
uni.stopPullDownRefresh();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
});
|
||||
this.setData({
|
||||
data_list_loding_status: 1
|
||||
});
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("usedlist", "frequencycard", "realstore"),
|
||||
method: "POST",
|
||||
data: {
|
||||
page: this.data_page,
|
||||
cuid: this.params.cuid || 0
|
||||
},
|
||||
dataType: "json",
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.data.data.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = res.data.data.data;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = res.data.data.data;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: res.data.data.total,
|
||||
data_page_total: res.data.data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: (this.data_page > 1 && this.data_page > this.data_page_total)
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list: [],
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data_list')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
load_status: 1
|
||||
});
|
||||
app.globalData.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
<view>
|
||||
1. 右上角选择用户当前地址,顶部导航中间显示搜索框
|
||||
2. 首页,顶部分类切换+列表展示所有门店,下拉刷新
|
||||
3. 左侧logo+名称,右侧介绍+基础信息+距离+评分
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* 地址信息
|
||||
*/
|
||||
.address-base,
|
||||
.address-detail {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.address-detail .icon {
|
||||
width: 30rpx;
|
||||
height: 35rpx !important;
|
||||
}
|
||||
.address-detail .text {
|
||||
width: calc(100% - 40rpx);
|
||||
}
|
||||
.address-detail .text {
|
||||
line-height: 36rpx;
|
||||
}
|
||||
.no-address {
|
||||
height: 85rpx;
|
||||
line-height: 85rpx;
|
||||
}
|
||||
.address-alias,
|
||||
.address-map-submit {
|
||||
padding: 0 15rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.address-map-submit {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* 商品信息
|
||||
*/
|
||||
.goods-base {
|
||||
min-height: 160rpx;
|
||||
margin-left: 180rpx;
|
||||
}
|
||||
.goods .goods-item:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
.goods-image {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
.orderaftersale-btn-text {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* 虚拟销售信息
|
||||
*/
|
||||
.site-fictitious .panel-content .tips-value {
|
||||
color: #f37b1d;
|
||||
background-color: #fff2e9;
|
||||
border-color: #ffebdb;
|
||||
}
|
||||
.site-fictitious .panel-content .left-image {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
.site-fictitious .panel-content .right-value {
|
||||
width: calc(100% - 100rpx);
|
||||
}
|
||||
|
||||
/*
|
||||
* 自提信息
|
||||
*/
|
||||
.site-extraction .panel-content .qrcode {
|
||||
width: 260rpx;
|
||||
height: 260rpx;
|
||||
}
|
||||
|
|
@ -0,0 +1,227 @@
|
|||
<template>
|
||||
<view>
|
||||
<block v-if="detail != null">
|
||||
<view class="padding-horizontal-main padding-top-main">
|
||||
<!-- 地址 -->
|
||||
<view v-if="(detail.order_type == 0 || detail.order_type == 1 || detail.order_type == 2) && (detail.address_data || null) != null" class="address bg-white padding-horizontal-main padding-top-main border-radius-main spacing-mb">
|
||||
<view class="address-base oh">
|
||||
<text v-if="(detail.address_data.alias || null) != null" class="address-alias round br-main cr-main bg-white margin-right-sm">{{detail.address_data.alias}}</text>
|
||||
<text>{{detail.address_data.name}}</text>
|
||||
<text class="fr">{{detail.address_data.tel}}</text>
|
||||
</view>
|
||||
<view class="address-detail oh margin-bottom-main">
|
||||
<image class="icon fl" :src="common_static_url+'map-icon.png'" mode="widthFix"></image>
|
||||
<view class="text fr">
|
||||
<text>{{detail.address_data.province_name}}{{detail.address_data.city_name}}{{detail.address_data.county_name}}{{detail.address_data.address}}</text>
|
||||
<text v-if="detail.order_model == 2 && (detail.address_data.lng || 0) != 0 && (detail.address_data.lat || 0 && detail.address_data.lng != 0 && detail.address_data.lat != 0) != 0" class="address-map-submit cr-base br round bg-white margin-left-sm text-size-xs" @tap="address_map_event">查看位置</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="address-divider spacing-mb"></view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="goods bg-white padding-main border-radius-main spacing-mb">
|
||||
<view class="br-b padding-bottom-main fw-b text-size">商品信息</view>
|
||||
<view v-for="(item, index) in detail.items" :key="index" class="goods-item br-b-dashed oh padding-main">
|
||||
<navigator :url="'/pages/goods-detail/goods-detail?goods_id=' + item.goods_id" hover-class="none">
|
||||
<image class="goods-image fl radius" :src="item.images" mode="aspectFill"></image>
|
||||
<view class="goods-base pr">
|
||||
<view class="multi-text">{{item.title}}</view>
|
||||
<view v-if="item.spec != null" class="margin-top-sm">
|
||||
<block v-for="(sv, si) in item.spec" :key="si">
|
||||
<text v-if="si > 0" class="cr-grey padding-left-xs padding-right-xs">;</text>
|
||||
<text class="cr-gray">{{sv.value}}</text>
|
||||
</block>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="fw-b">{{detail.currency_data.currency_symbol}}{{item.price}}</text>
|
||||
<text class="margin-left-sm">x{{item.buy_number}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="padding-top-main tr cr-base text-size">
|
||||
<text>共<text class="fw-b">{{detail.buy_number_count}}</text>件 合计 <text class="sales-price margin-right-xs">{{detail.currency_data.currency_symbol}}{{detail.total_price}}</text>元</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 虚拟销售数据 -->
|
||||
<view v-if="(site_fictitious || null) != null" class="site-fictitious panel-item padding-horizontal-main padding-top-main border-radius-main bg-white spacing-mb">
|
||||
<view class="br-b padding-bottom-main fw-b text-size">{{site_fictitious.title || item.fictitious_goods_title}}</view>
|
||||
<view class="panel-content oh padding-top-main">
|
||||
<view v-if="(site_fictitious.tips || null) != null" class="tips-value radius padding-main margin-bottom-main">
|
||||
<mp-html :content="site_fictitious.tips" />
|
||||
</view>
|
||||
<view v-for="(item, index) in detail.items" :key="index" class="item br-b-dashed oh padding-bottom-main margin-bottom-main">
|
||||
<image class="left-image br fl radius" :src="item.images" mode="aspectFill"></image>
|
||||
<view class="right-value fr">
|
||||
<mp-html v-if="(item.fictitious_goods_value || null) != null" :content="item.fictitious_goods_value" />
|
||||
<text v-else class="cr-gray">未配置数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 自提信息 -->
|
||||
<view v-if="(detail.extraction_data || null) != null" class="site-extraction panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="br-b padding-bottom-main fw-b text-size">取货信息</view>
|
||||
<view class="panel-content oh padding-top-main">
|
||||
<view>
|
||||
<text>取货码:</text>
|
||||
<text class="radius bg-green cr-white padding-left-sm padding-right-sm">{{detail.extraction_data.code || '取货码不存在、请联系管理员'}}</text>
|
||||
</view>
|
||||
<image v-if="(detail.extraction_data.images || null) != null" class="qrcode br radius margin-top-lg" :src="detail.extraction_data.images" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单基础数据 -->
|
||||
<view v-if="detail_list.length > 0" class="panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="br-b padding-bottom-main fw-b text-size">订单信息</view>
|
||||
<view class="panel-content oh">
|
||||
<view v-for="(item, index) in detail_list" :key="index" class="item br-b oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-gray">{{item.name}}</view>
|
||||
<view class="content fl br-l padding-left-main">{{item.value}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
|
||||
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
common_static_url: common_static_url,
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
data_bottom_line_status: false,
|
||||
detail: null,
|
||||
detail_list: [],
|
||||
site_fictitious: null
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
//params['id'] = 5;
|
||||
this.setData({
|
||||
params: params
|
||||
});
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 数据加载
|
||||
this.init();
|
||||
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取数据
|
||||
init() {
|
||||
var self = this;
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
});
|
||||
this.setData({
|
||||
data_list_loding_status: 1
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("detail", "orderallot", "realstore"),
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.params.id
|
||||
},
|
||||
dataType: "json",
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
self.setData({
|
||||
detail: data.data,
|
||||
detail_list:[
|
||||
{name: "订单类型", value: data.data.order_type_name || ''},
|
||||
{name: "订单编号", value: data.data.order_allot_no || ''},
|
||||
{name: "订单状态", value: data.data.status_name || ''},
|
||||
{name: "订单总价", value: data.data.total_price || ''},
|
||||
{name: "创建时间", value: data.data.add_time || ''},
|
||||
{name: "添加时间", value: data.data.add_time || ''},
|
||||
{name: "接收时间", value: data.data.receive_time || ''},
|
||||
{name: "服务时间", value: data.data.service_time || ''},
|
||||
{name: "完成时间", value: data.data.success_time || ''},
|
||||
{name: "取消时间", value: data.data.cancel_time || ''},
|
||||
],
|
||||
site_fictitious: data.site_fictitious || null,
|
||||
data_list_loding_status: 3,
|
||||
data_bottom_line_status: true,
|
||||
data_list_loding_msg: ''
|
||||
});
|
||||
} else {
|
||||
self.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: res.data.msg
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, self, 'init')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
self.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: '服务器请求出错'
|
||||
});
|
||||
app.globalData.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 地图查看
|
||||
address_map_event(e) {
|
||||
if ((this.detail.address_data || null) == null) {
|
||||
app.globalData.showToast("地址有误");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 打开地图
|
||||
var data = this.detail.address_data;
|
||||
var name = data.alias || data.name || '';
|
||||
var address = (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || '');
|
||||
app.globalData.open_location(data.lng, data.lat, name, address);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './orderallot-detail.css';
|
||||
</style>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* 导航
|
||||
*/
|
||||
.nav-base .item {
|
||||
width: 16.66%;
|
||||
}
|
||||
|
||||
/*
|
||||
* 列表
|
||||
*/
|
||||
.goods-base {
|
||||
min-height: 160rpx;
|
||||
margin-left: 180rpx;
|
||||
}
|
||||
.goods-image {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
|
|
@ -0,0 +1,308 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 导航 -->
|
||||
<view class="nav-base bg-white">
|
||||
<block v-for="(item, index) in nav_status_list" :key="index">
|
||||
<view v-if="nav_status_index == index" class="item fl tc cr-main" :data-index="index" @tap="nav_event">{{item.name}}</view>
|
||||
<view v-else class="item fl tc" :data-index="index" @tap="nav_event">{{item.name}}</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<scroll-view :scroll-y="true" class="scroll-box scroll-box-ece-nav" @scrolltolower="scroll_lower" lower-threshold="30">
|
||||
<view v-if="data_list.length > 0" class="padding-horizontal-main padding-top-main">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="list-item padding-horizontal-main padding-top-main border-radius-main bg-white oh spacing-mb">
|
||||
<view class="item-base oh br-b padding-bottom-main">
|
||||
<text class="fl cr-base">{{item.order_allot_no}}</text>
|
||||
<text class="fr cr-red">{{item.status_name}}<text v-if="(item.is_under_line_text || null) != null">({{item.is_under_line_text}})</text></text>
|
||||
</view>
|
||||
<view v-for="(detail, di) in item.items" :key="di" class="br-b-dashed oh padding-vertical-main">
|
||||
<navigator :url="'/pages/plugins/realstore/orderallot-detail/orderallot-detail?id=' + item.id" hover-class="none">
|
||||
<image class="goods-image fl radius" :src="detail.images" mode="aspectFill"></image>
|
||||
<view class="goods-base pr">
|
||||
<view class="multi-text">{{detail.title}}</view>
|
||||
<view v-if="detail.spec != null" class="margin-top-sm">
|
||||
<block v-for="(sv, si) in detail.spec" :key="si">
|
||||
<text v-if="si > 0" class="cr-grey padding-left-xs padding-right-xs">;</text>
|
||||
<text class="cr-gray">{{sv.value}}</text>
|
||||
</block>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="fw-b">{{item.currency_data.currency_symbol}}{{detail.price}}</text>
|
||||
<text class="margin-left-sm">x{{detail.buy_number}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="padding-vertical-main tr cr-base text-size">
|
||||
<text>共<text class="fw-b">{{item.buy_number_count}}</text>件 合计 <text class="sales-price margin-right-xs">{{item.currency_data.currency_symbol}}{{item.total_price}}</text>元</text>
|
||||
</view>
|
||||
<view v-if="item.operate_data.is_collect == 1 || ((item.express_data || null) != null && item.express_data.length > 0)" class="item-operation tr br-t padding-vertical-main">
|
||||
<button v-if="item.operate_data.is_collect == 1" class="round bg-white cr-green br-green" type="default" size="mini" @tap="collect_event" :data-value="item.id" :data-index="index" hover-class="none">收货</button>
|
||||
<block v-if="(item.express_data || null) != null && item.express_data.length > 0">
|
||||
<block v-for="(ev, ei) in item.express_data" :key="item.id+ei">
|
||||
<button class="round bg-white cr-main br-main" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/express/detail/detail?oid='+item.id+'&eid='+ev.id+'&action_type=realstore'" hover-class="none">物流{{ei+1}}</button>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
params: null,
|
||||
nav_status_list: [
|
||||
{ name: "全部", value: "-1" },
|
||||
{ name: "待处理", value: "0,1" },
|
||||
{ name: "服务中", value: "2,5" },
|
||||
{ name: "待收货", value: "3" },
|
||||
{ name: "已完成", value: "4" },
|
||||
{ name: "已失效", value: "6,7" },
|
||||
],
|
||||
nav_status_index: 0
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
// 是否指定状态
|
||||
var nav_status_index = 0;
|
||||
if ((params.status || null) != null) {
|
||||
for (var i in this.nav_status_list) {
|
||||
if (this.nav_status_list[i]['value'] == params.status) {
|
||||
nav_status_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
params: params,
|
||||
nav_status_index: nav_status_index
|
||||
});
|
||||
|
||||
// 数据加载
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.setData({
|
||||
data_page: 1
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取数据
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login?event_callback=init"
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
// 获取数据
|
||||
this.get_data_list();
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data_list(is_mandatory) {
|
||||
// 分页是否还有数据
|
||||
if ((is_mandatory || 0) == 0) {
|
||||
if (this.data_bottom_line_status == true) {
|
||||
uni.stopPullDownRefresh();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
});
|
||||
this.setData({
|
||||
data_list_loding_status: 1
|
||||
});
|
||||
|
||||
// 参数
|
||||
var status = (this.nav_status_list[this.nav_status_index] || null) == null ? -1 : this.nav_status_list[this.nav_status_index]['value'];
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("index", "orderallot", "realstore"),
|
||||
method: "POST",
|
||||
data: {
|
||||
page: this.data_page,
|
||||
status: status,
|
||||
oid: this.params.oid || 0
|
||||
},
|
||||
dataType: "json",
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.data.data.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = res.data.data.data;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = res.data.data.data;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: res.data.data.total,
|
||||
data_page_total: res.data.data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: (this.data_page > 1 && this.data_page > this.data_page_total)
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list: [],
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data_list')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
load_status: 1
|
||||
});
|
||||
app.globalData.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
},
|
||||
|
||||
// 收货
|
||||
collect_event(e) {
|
||||
uni.showModal({
|
||||
title: "温馨提示",
|
||||
content: "请确认已收到货物或已完成,操作后不可恢复,确定继续吗?",
|
||||
confirmText: "确认",
|
||||
cancelText: "不了",
|
||||
success: result => {
|
||||
if (result.confirm) {
|
||||
// 参数
|
||||
var id = e.currentTarget.dataset.value;
|
||||
var index = e.currentTarget.dataset.index;
|
||||
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: "处理中..."
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("collect", "orderallot", "realstore"),
|
||||
method: "POST",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
dataType: "json",
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var temp_data_list = this.data_list;
|
||||
temp_data_list[index]['status'] = 4;
|
||||
temp_data_list[index]['status_name'] = '已完成';
|
||||
temp_data_list[index]['operate_data']['is_collect'] = 0;
|
||||
this.setData({
|
||||
data_list: temp_data_list
|
||||
});
|
||||
app.globalData.showToast(res.data.msg, "success");
|
||||
} else {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 导航事件
|
||||
nav_event(e) {
|
||||
this.setData({
|
||||
nav_status_index: e.currentTarget.dataset.index || 0,
|
||||
data_page: 1
|
||||
});
|
||||
|
||||
// 重新拉取数据
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './orderallot-list.css';
|
||||
</style>
|
||||
|
|
@ -242,8 +242,8 @@
|
|||
// 基础自定义分享
|
||||
this.setData({
|
||||
share_info: {
|
||||
title: this.data.seo_title || this.shop.name,
|
||||
desc: this.data.seo_desc || this.shop.describe,
|
||||
title: this.shop.seo_title || this.shop.name,
|
||||
desc: this.shop.seo_desc || this.shop.describe,
|
||||
path: '/pages/plugins/shop/detail/detail',
|
||||
query: 'id='+this.shop.id,
|
||||
img: this.shop.logo
|
||||
|
|
|
|||
Loading…
Reference in New Issue