先货后款部分页面布局+功能
This commit is contained in:
parent
273fa133ed
commit
4261b729f1
@ -15,6 +15,7 @@ import request from "@/utils/request.js";
|
|||||||
export function getStatisticsInfo() {
|
export function getStatisticsInfo() {
|
||||||
return request.get("admin/order/statistics", {}, { login: true });
|
return request.get("admin/order/statistics", {}, { login: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单月统计
|
* 订单月统计
|
||||||
*/
|
*/
|
||||||
@ -33,6 +34,12 @@ export function getAdminOrderList(where) {
|
|||||||
export function setAdminOrderPrice(merId, id, data) {
|
export function setAdminOrderPrice(merId, id, data) {
|
||||||
return request.post("admin/" + merId + "/price/" + id, data, { login: true });
|
return request.post("admin/" + merId + "/price/" + id, data, { login: true });
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 同意先货后款
|
||||||
|
*/
|
||||||
|
export function postconfirm(merId, data) {
|
||||||
|
return request.post("admin/" + merId + "/confirm" , data, { login: true });
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 订单备注
|
* 订单备注
|
||||||
*/
|
*/
|
||||||
|
@ -13,7 +13,12 @@ import request from "@/utils/request.js";
|
|||||||
* 获取商品详情
|
* 获取商品详情
|
||||||
*/
|
*/
|
||||||
export const getProductDetailsAPI = (data) => request.get('micro/product_details', data)
|
export const getProductDetailsAPI = (data) => request.get('micro/product_details', data)
|
||||||
|
/**
|
||||||
|
* 线下导入
|
||||||
|
*/
|
||||||
|
export function postImport(merid,data) {
|
||||||
|
return request.post(`server/${merid}/product/stockIn`, data);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 获取商户基本信息 http://127.0.0.1:8324/api/store/merchant/info?id=4
|
* 获取商户基本信息 http://127.0.0.1:8324/api/store/merchant/info?id=4
|
||||||
*/
|
*/
|
||||||
|
12
pages.json
12
pages.json
@ -249,12 +249,24 @@
|
|||||||
"navigationBarTitleText": "忘记密码"
|
"navigationBarTitleText": "忘记密码"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "online_warehousing/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "采购订单"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "user_setting/index",
|
"path": "user_setting/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "设置"
|
"navigationBarTitleText": "设置"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "supply_procurement/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "供货采购"
|
||||||
|
}
|
||||||
|
},
|
||||||
//协议,关于
|
//协议,关于
|
||||||
{
|
{
|
||||||
"path": "user_about/index",
|
"path": "user_about/index",
|
||||||
|
@ -137,10 +137,19 @@
|
|||||||
支付
|
支付
|
||||||
<span class="money">¥{{ item.pay_price }}</span> (邮费 ¥{{ item.pay_postage}})
|
<span class="money">¥{{ item.pay_price }}</span> (邮费 ¥{{ item.pay_postage}})
|
||||||
</view>
|
</view>
|
||||||
|
<view class="public-total" v-if="item.pay_type == 8 && item.status == 12">
|
||||||
|
共1件商品,结算周期到期后付款¥100
|
||||||
|
</view>
|
||||||
<view class="operation acea-row row-between-wrapper">
|
<view class="operation acea-row row-between-wrapper">
|
||||||
<view class="more">
|
<view class="more">
|
||||||
</view>
|
</view>
|
||||||
<view class="acea-row row-middle">
|
<view class="acea-row row-middle">
|
||||||
|
<view class="bnt" v-if="item.pay_type == 8 && item.status == 12" @click="tongyi(item.group_order_id,1)">
|
||||||
|
同意
|
||||||
|
</view>
|
||||||
|
<view class="bnt" v-if="item.pay_type == 8 && item.status == 12" @click="tongyi(item.group_order_id,2)">
|
||||||
|
拒绝
|
||||||
|
</view>
|
||||||
<view class="bnt" @click="modify(item, 0)" v-if="where.status == 1 && item.activity_type != 2">
|
<view class="bnt" @click="modify(item, 0)" v-if="where.status == 1 && item.activity_type != 2">
|
||||||
一键改价
|
一键改价
|
||||||
</view>
|
</view>
|
||||||
@ -196,7 +205,8 @@
|
|||||||
setOfflinePay,
|
setOfflinePay,
|
||||||
setOrderRefund,
|
setOrderRefund,
|
||||||
refundOrderReceive,
|
refundOrderReceive,
|
||||||
setRefundMark
|
setRefundMark,
|
||||||
|
postconfirm
|
||||||
} from "@/api/admin";
|
} from "@/api/admin";
|
||||||
import Loading from '@/components/Loading/index'
|
import Loading from '@/components/Loading/index'
|
||||||
import PriceChange from '@/components/PriceChange/index'
|
import PriceChange from '@/components/PriceChange/index'
|
||||||
@ -249,6 +259,16 @@
|
|||||||
this.getIndex();
|
this.getIndex();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//同意先货后款订单
|
||||||
|
tongyi(id,number){
|
||||||
|
let data={
|
||||||
|
id:id,
|
||||||
|
type:number
|
||||||
|
}
|
||||||
|
postconfirm(this.merId,data).then(res=>{
|
||||||
|
console.log(res);
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
this.where.page = 1;
|
this.where.page = 1;
|
||||||
@ -631,7 +651,7 @@
|
|||||||
.pos-order-list .list .item .operation .bnt {
|
.pos-order-list .list .item .operation .bnt {
|
||||||
font-size: 28upx;
|
font-size: 28upx;
|
||||||
color: #5c5c5c;
|
color: #5c5c5c;
|
||||||
width: 170upx;
|
width: 160upx;
|
||||||
height: 60upx;
|
height: 60upx;
|
||||||
border-radius: 30upx;
|
border-radius: 30upx;
|
||||||
border: 1px solid #bbb;
|
border: 1px solid #bbb;
|
||||||
|
@ -64,7 +64,8 @@
|
|||||||
<view class="title">我的店铺</view>
|
<view class="title">我的店铺</view>
|
||||||
<view class="content ">
|
<view class="content ">
|
||||||
<view class="examine"
|
<view class="examine"
|
||||||
@click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)">
|
@click="navigator(`/pages/users/supply_procurement/index?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)">
|
||||||
|
<!-- @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`) -->
|
||||||
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
|
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
|
||||||
<text class="text">供货采购</text>
|
<text class="text">供货采购</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -568,7 +568,7 @@
|
|||||||
})
|
})
|
||||||
if (selectValue.length > 0) {
|
if (selectValue.length > 0) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/users/order_confirm/index?product_type=98&cartId=' + selectValue.join(',')
|
url: `/pages/users/order_confirm/index?product_type=98&cartId=${selectValue.join(',')}`
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return this.$util.Tips({
|
return this.$util.Tips({
|
||||||
|
@ -289,7 +289,8 @@
|
|||||||
merList: [], //商户分类
|
merList: [], //商户分类
|
||||||
product_type: 0,
|
product_type: 0,
|
||||||
show:false,
|
show:false,
|
||||||
image: '' //图片
|
image: '' ,//图片,
|
||||||
|
credit_buy:'',//支持先货后款
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -298,6 +299,7 @@
|
|||||||
if (options.street_id != undefined) {
|
if (options.street_id != undefined) {
|
||||||
this.sotreParam.street_id = options.street_id
|
this.sotreParam.street_id = options.street_id
|
||||||
}
|
}
|
||||||
|
this.credit_buy=options.credit_buy
|
||||||
this.sotreParam.type_id = options.type_id
|
this.sotreParam.type_id = options.type_id
|
||||||
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
|
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
|
||||||
this.sotreParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
|
this.sotreParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
|
||||||
@ -496,7 +498,8 @@
|
|||||||
order: this.sotreParam.order,
|
order: this.sotreParam.order,
|
||||||
category_id: this.sotreParam.category_id,
|
category_id: this.sotreParam.category_id,
|
||||||
type_id: this.sotreParam.type_id,
|
type_id: this.sotreParam.type_id,
|
||||||
street_id: this.sotreParam.street_id
|
street_id: this.sotreParam.street_id,
|
||||||
|
credit_buy:this.credit_buy
|
||||||
}
|
}
|
||||||
if (this.latitude) {
|
if (this.latitude) {
|
||||||
rqData.location = this.latitude + ',' + this.longitude
|
rqData.location = this.latitude + ',' + this.longitude
|
||||||
|
@ -260,11 +260,11 @@
|
|||||||
<view>实付款:</view>
|
<view>实付款:</view>
|
||||||
<view class='conter'>¥{{orderInfo.pay_price}}</view>
|
<view class='conter'>¥{{orderInfo.pay_price}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="settel-m">
|
<view class="settel-m" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12">
|
||||||
结算周期到期后付款 ¥100.00
|
结算周期到期后付款 ¥100.00
|
||||||
<image src="@/static/images/wenhao.png" mode="" @click="open"></image>
|
<image src="@/static/images/wenhao.png" mode="" @click="open"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="settel-f">
|
<view class="settel-f" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12">
|
||||||
结算周期:30天 日利率:0.05%
|
结算周期:30天 日利率:0.05%
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -125,6 +125,9 @@
|
|||||||
<view class="item_cell flex_a_c">
|
<view class="item_cell flex_a_c">
|
||||||
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>客服电话:</view>
|
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>客服电话:</view>
|
||||||
<input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话">
|
<input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话">
|
||||||
|
</view>
|
||||||
|
<view class="item_cell flex_a_c">
|
||||||
|
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>开启先货后款:</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="item_cell">
|
<!-- <view class="item_cell">
|
||||||
<view class="if_btn flex_a_c_j_sb">
|
<view class="if_btn flex_a_c_j_sb">
|
||||||
|
File diff suppressed because one or more lines are too long
276
pages/users/online_warehousing/index.vue
Normal file
276
pages/users/online_warehousing/index.vue
Normal file
@ -0,0 +1,276 @@
|
|||||||
|
<template>
|
||||||
|
<view class="center">
|
||||||
|
<view class="top">
|
||||||
|
<!-- -->
|
||||||
|
</view>
|
||||||
|
<view class='list'>
|
||||||
|
<block>
|
||||||
|
<view class='item' v-for="(item,index) in shopList" :key="index">
|
||||||
|
<view v-for="(items,index) in item.orderProduct" :key="index">
|
||||||
|
<view class='title acea-row row-between-wrapper'>
|
||||||
|
<view class="acea-row row-middle left-wrapper">
|
||||||
|
{{item.merchant.mer_name}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<block>
|
||||||
|
<view class='item-info acea-row row-between row-top'>
|
||||||
|
<view class='pictrue'>
|
||||||
|
<image :src="item.orderProduct[index].cart_info.product.image">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class='text acea-row row-between'>
|
||||||
|
<view class='name line2'>
|
||||||
|
{{items.cart_info.product.store_name}}
|
||||||
|
</view>
|
||||||
|
<view class='name line2'>¥{{items.cart_info.product.price}}</view>
|
||||||
|
<view class='name line2'>x {{items.product_num}}</view>
|
||||||
|
<view class='bnt b-color' v-if="items.is_imported == 0"
|
||||||
|
@click="importshop(items.order_id,items.product_id,items.product_sku)">
|
||||||
|
立即导入</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class='totalPrice'>
|
||||||
|
共1件商品,总金额
|
||||||
|
<text class='money'>¥{{items.product_price}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getPreviewProDetail,
|
||||||
|
} from '@/api/store.js'
|
||||||
|
import {
|
||||||
|
postImport
|
||||||
|
} from '@/api/product.js'
|
||||||
|
import {
|
||||||
|
getOrderList
|
||||||
|
} from '@/api/order.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
shopList: [],
|
||||||
|
shopinfo: {},
|
||||||
|
mer_id: '',
|
||||||
|
keyword: '',
|
||||||
|
where: {
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
status: 2,
|
||||||
|
product_type: 98
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
product_id: '',
|
||||||
|
unique: "",
|
||||||
|
order_id: '',
|
||||||
|
order_product_id: '',
|
||||||
|
order_unique: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
console.log(option);
|
||||||
|
this.mer_id = option.mer_id
|
||||||
|
this.getList(this.mer_id);
|
||||||
|
this.data.product_id = option.product_id
|
||||||
|
this.data.unique = option.unique
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList: function(mer_id) {
|
||||||
|
getOrderList(this.where, this.mer_id).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
this.shopList = res.data.list
|
||||||
|
console.log(this.shopList);
|
||||||
|
})
|
||||||
|
// getPreviewProDetail({
|
||||||
|
// id:product_id,
|
||||||
|
// product_type:0,
|
||||||
|
// }).then(
|
||||||
|
// res => {
|
||||||
|
// console.log(res);
|
||||||
|
|
||||||
|
// console.log(this.shopList);
|
||||||
|
// },
|
||||||
|
// error => {
|
||||||
|
// that.$util.Tips({
|
||||||
|
// title: error.msg
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
},
|
||||||
|
importshop(order_id, product_id, unique) {
|
||||||
|
this.data.order_id = order_id
|
||||||
|
this.data.order_product_id = product_id
|
||||||
|
this.data.order_unique = unique
|
||||||
|
|
||||||
|
postImport(this.mer_id, this.data).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
this.$util.Tips({
|
||||||
|
title: res.message
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.top {
|
||||||
|
background-color: red;
|
||||||
|
height: 55px;
|
||||||
|
|
||||||
|
.input {
|
||||||
|
width: 90%;
|
||||||
|
margin: auto !important;
|
||||||
|
padding-top: 10px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
width: 690rpx;
|
||||||
|
margin: 14rpx auto 0 auto;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
height: 84rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #282828;
|
||||||
|
|
||||||
|
.left-wrapper {
|
||||||
|
.iconfont {
|
||||||
|
margin-top: 5rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.store-name {
|
||||||
|
margin: 0 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-xiangyou {
|
||||||
|
font-size: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sign {
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding: 0 7rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
margin-right: 15rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 5px 0 5px 0;
|
||||||
|
|
||||||
|
.item-info {
|
||||||
|
padding: 0 30rpx;
|
||||||
|
margin-top: 22rpx;
|
||||||
|
|
||||||
|
.pictrue {
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
width: 486rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #999;
|
||||||
|
margin-top: 6rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
width: 320rpx;
|
||||||
|
color: #282828;
|
||||||
|
}
|
||||||
|
|
||||||
|
.money {
|
||||||
|
text-align: right;
|
||||||
|
float: right;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.bnt {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
bottom: 0px;
|
||||||
|
right: 10px;
|
||||||
|
width: 176rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
border: 1px solid #999999;
|
||||||
|
font-size: 27rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.event_name {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 9rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 20rpx;
|
||||||
|
padding: 0 8rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.event_ship {
|
||||||
|
font-size: 20rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPrice {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #282828;
|
||||||
|
text-align: right;
|
||||||
|
margin: 27rpx 0 0 30rpx;
|
||||||
|
padding: 0 30rpx 30rpx 0;
|
||||||
|
|
||||||
|
.money {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: rgb(233, 51, 35);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
height: 107rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
border-top: 1px solid #f0f0f0;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.event_price {
|
||||||
|
margin: 0 0 50rpx 120rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -188,6 +188,11 @@
|
|||||||
<view class="price" v-if="item.isTake == 0"><text>¥</text>{{ item.order.pay_price }}</view>
|
<view class="price" v-if="item.isTake == 0"><text>¥</text>{{ item.order.pay_price }}</view>
|
||||||
<view class="price" v-if="item.isTake == 1"><text>¥</text>{{ item.order.org_price}}</view>
|
<view class="price" v-if="item.isTake == 1"><text>¥</text>{{ item.order.org_price}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="total" v-if="item.credit_buy == 1">
|
||||||
|
|
||||||
|
实付
|
||||||
|
<view class="price" ><text>¥</text>0.00</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -379,7 +384,11 @@
|
|||||||
<view class="footer_count">
|
<view class="footer_count">
|
||||||
<view>
|
<view>
|
||||||
合计:
|
合计:
|
||||||
<text class='pColor'>¥{{totalPrice || 0}}</text>
|
<text class='pColor' v-if="cartArr[4].payStatus == 1" >¥0.00</text>
|
||||||
|
<text class='pColor' v-else>¥{{totalPrice }}</text>
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 14px;color: #F84221;" v-if="cartArr[4].payStatus == 1">
|
||||||
|
可结算周期到期后再付款¥{{totalPrice}}
|
||||||
</view>
|
</view>
|
||||||
<view class="coupon_price" v-if="couponData.total_coupon > 0">
|
<view class="coupon_price" v-if="couponData.total_coupon > 0">
|
||||||
优惠:¥ {{couponData.total_coupon}}
|
优惠:¥ {{couponData.total_coupon}}
|
||||||
@ -524,13 +533,12 @@
|
|||||||
value: 'offline',
|
value: 'offline',
|
||||||
title: '线下支付',
|
title: '线下支付',
|
||||||
payStatus: 2,
|
payStatus: 2,
|
||||||
},
|
},{
|
||||||
{
|
|
||||||
"name": "先货后款",
|
"name": "先货后款",
|
||||||
"icon": "tan-a-lujing17324",
|
"icon": "tan-a-lujing17324",
|
||||||
value: 'creditBuy',
|
value: 'creditBuy',
|
||||||
title: `结算周期:30天 日利率:0.05%`,
|
title: `结算周期:30天 日利率:0.05%`,
|
||||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
payStatus: '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
tagStyle: {
|
tagStyle: {
|
||||||
@ -801,6 +809,7 @@
|
|||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
getUserInfo().then(res => {
|
getUserInfo().then(res => {
|
||||||
this.userInfo = res.data
|
this.userInfo = res.data
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/*获取发票说明*/
|
/*获取发票说明*/
|
||||||
@ -1060,6 +1069,13 @@
|
|||||||
that.allow_address = res.data.allow_address
|
that.allow_address = res.data.allow_address
|
||||||
that.deliveryName = res.data.order_model == 0 ? '快递配送' : '虚拟发货'
|
that.deliveryName = res.data.order_model == 0 ? '快递配送' : '虚拟发货'
|
||||||
that.order_key = res.data.key
|
that.order_key = res.data.key
|
||||||
|
if(res.data.order[0].credit_buy == 1){
|
||||||
|
this.cartArr[4].payStatus = 1
|
||||||
|
}else{
|
||||||
|
this.cartArr[4].payStatus = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
key: "invoice_Data",
|
key: "invoice_Data",
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
@ -1181,7 +1197,7 @@
|
|||||||
callback_key = res.data.result.pay_key,
|
callback_key = res.data.result.pay_key,
|
||||||
jsConfig = res.data.result.config,
|
jsConfig = res.data.result.config,
|
||||||
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message,
|
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message,
|
||||||
goPagesOrder='/pages/order_details/stay?order_id=' + orderId;
|
goPagesOrder='/pages/order_details/stay?order_id=' + orderId+'&credit_buy=1';
|
||||||
that.orderPay = true;
|
that.orderPay = true;
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
switch (status) {
|
switch (status) {
|
||||||
@ -1436,7 +1452,6 @@
|
|||||||
this.virtualIndex = index;
|
this.virtualIndex = index;
|
||||||
},
|
},
|
||||||
SubOrder: function(e) {
|
SubOrder: function(e) {
|
||||||
console.log(this.active);
|
|
||||||
|
|
||||||
let that = this,
|
let that = this,
|
||||||
data = {};
|
data = {};
|
||||||
|
@ -241,8 +241,8 @@
|
|||||||
<view class='totalPrice' v-else>共{{item.orderNum || 0}}件商品,总金额
|
<view class='totalPrice' v-else>共{{item.orderNum || 0}}件商品,总金额
|
||||||
<text class='money p-color'>¥{{item.pay_price}}</text>
|
<text class='money p-color'>¥{{item.pay_price}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="totalPrice" v-if="item.activity_type == 98">
|
<view class="totalPrice" v-if="item.pay_type == 8 && item.status == 12">
|
||||||
|
|
||||||
共1件商品,结算周期到期后付款¥100
|
共1件商品,结算周期到期后付款¥100
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -266,7 +266,7 @@
|
|||||||
<text class="iconfont icon-fabu"></text>
|
<text class="iconfont icon-fabu"></text>
|
||||||
发布种草
|
发布种草
|
||||||
</navigator>
|
</navigator>
|
||||||
<view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价
|
<view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-if="item.status == 3">
|
<block v-if="item.status == 3">
|
||||||
@ -298,7 +298,7 @@
|
|||||||
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
|
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
|
||||||
:totalPrice='totalPrice'></payment>
|
:totalPrice='totalPrice'></payment>
|
||||||
<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
|
<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
|
||||||
<u-popup :show="show" bgColor='transparent' mode='center'>
|
<u-popup :show="show" bgColor='transparent' mode='center'>
|
||||||
<view class="warp">
|
<view class="warp">
|
||||||
<image @click="close" class="guanbi" src="@/static/images/guanbi.png"></image>
|
<image @click="close" class="guanbi" src="@/static/images/guanbi.png"></image>
|
||||||
<image src="@/static/images/shouhuo.png" mode="widthFix"></image>
|
<image src="@/static/images/shouhuo.png" mode="widthFix"></image>
|
||||||
@ -396,15 +396,8 @@
|
|||||||
title: '可用余额:',
|
title: '可用余额:',
|
||||||
number: 0,
|
number: 0,
|
||||||
payStatus: this.$store.getters.globalData.yue_pay_status
|
payStatus: this.$store.getters.globalData.yue_pay_status
|
||||||
}
|
},
|
||||||
,
|
|
||||||
{
|
|
||||||
name: "先货后款",
|
|
||||||
icon: "tan-a-lujing17324",
|
|
||||||
value: 'creditBuy',
|
|
||||||
title: '结算周期:30天,日利率:0.05%',
|
|
||||||
payStatus:this.$store.getters.globalData.yue_pay_status
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
pay_close: false,
|
pay_close: false,
|
||||||
pay_order_id: '',
|
pay_order_id: '',
|
||||||
@ -423,7 +416,7 @@
|
|||||||
id: ''
|
id: ''
|
||||||
},
|
},
|
||||||
//商品分类
|
//商品分类
|
||||||
activity_type:''
|
activity_type: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -764,7 +757,6 @@
|
|||||||
},
|
},
|
||||||
// 确认收货
|
// 确认收货
|
||||||
confirmOrder: function(item, index) {
|
confirmOrder: function(item, index) {
|
||||||
|
|
||||||
this.show = true
|
this.show = true
|
||||||
this.shouhuo.id = item.order_id
|
this.shouhuo.id = item.order_id
|
||||||
this.shouhuo.index = index
|
this.shouhuo.index = index
|
||||||
@ -790,58 +782,58 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
queding() {
|
queding() {
|
||||||
let that = this;
|
let that = this;
|
||||||
orderTake(this.shouhuo.id).then(res => {
|
orderTake(that.shouhuo.id).then(res => {
|
||||||
return that.$util.Tips({
|
that.show = false
|
||||||
title: '操作成功',
|
that.orderList.splice(that.shouhuo.index, 1);
|
||||||
icon: 'success',
|
|
||||||
}, function() {
|
|
||||||
that.orderList.splice(this.shouhuo.index, 1);
|
|
||||||
that.getOrderData();
|
that.getOrderData();
|
||||||
});
|
return that.$util.Tips({
|
||||||
that.show=false
|
title: '操作成功',
|
||||||
}).catch(err => {
|
icon: 'success',
|
||||||
|
})
|
||||||
|
|
||||||
|
}).catch(err => {
|
||||||
return that.$util.Tips({
|
return that.$util.Tips({
|
||||||
title: err
|
title: err
|
||||||
});
|
});
|
||||||
that.show=false
|
that.show = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/*申请开票*/
|
/*申请开票*/
|
||||||
applyInvoice(order_id) {
|
applyInvoice(order_id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.invoice_order_id = order_id
|
that.invoice_order_id = order_id
|
||||||
that.invoice.invoice = true;
|
that.invoice.invoice = true;
|
||||||
that.$refs.addInvoicing.getInvoiceDefault();
|
that.$refs.addInvoicing.getInvoiceDefault();
|
||||||
that.$refs.addInvoicing.getInvoiceList();
|
that.$refs.addInvoicing.getInvoiceList();
|
||||||
|
},
|
||||||
|
// 关闭发票弹窗
|
||||||
|
changeInvoiceClose: function(data) {
|
||||||
|
if (data) this.getInvoiceData(data);
|
||||||
|
this.$set(this.invoice, 'invoice', false);
|
||||||
|
},
|
||||||
|
// 开票回调
|
||||||
|
getInvoiceData(data) {
|
||||||
|
let that = this
|
||||||
|
applyInvoiceApi(that.invoice_order_id, data).then(res => {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: res.message,
|
||||||
|
});
|
||||||
|
}).catch(err => {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: err
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.show = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 关闭发票弹窗
|
onReachBottom: function() {
|
||||||
changeInvoiceClose: function(data) {
|
this.getOrderList();
|
||||||
if (data) this.getInvoiceData(data);
|
|
||||||
this.$set(this.invoice, 'invoice', false);
|
|
||||||
},
|
|
||||||
// 开票回调
|
|
||||||
getInvoiceData(data) {
|
|
||||||
let that = this
|
|
||||||
applyInvoiceApi(that.invoice_order_id, data).then(res => {
|
|
||||||
return that.$util.Tips({
|
|
||||||
title: res.message,
|
|
||||||
});
|
|
||||||
}).catch(err => {
|
|
||||||
return that.$util.Tips({
|
|
||||||
title: err
|
|
||||||
});
|
|
||||||
})
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
this.show = false
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
onReachBottom: function() {
|
|
||||||
this.getOrderList();
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
75
pages/users/supply_procurement/index.vue
Normal file
75
pages/users/supply_procurement/index.vue
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
<template>
|
||||||
|
<view class="conent">
|
||||||
|
<view class="con_kuo" @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${id}&credit_buy=0`)">
|
||||||
|
<image class="con_img" src="@/static/images/bg1.png" mode=""></image>
|
||||||
|
<image class="con_ico" src="@/static/images/bgic1.png" mode=""></image>
|
||||||
|
<view class="con_text">
|
||||||
|
<h3>现款后货</h3>
|
||||||
|
<span>先付款后发货</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="con_kuo" @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${id}&credit_buy=1`)">
|
||||||
|
<image class="con_img" src="@/static/images/bg2.png" mode=""></image>
|
||||||
|
<image class="con_ico" src="@/static/images/bgic2.png" mode=""></image>
|
||||||
|
<view class="con_text">
|
||||||
|
<h3>现货后款</h3>
|
||||||
|
<span>先发货后付款</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
id:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
console.log(option);
|
||||||
|
this.id=option.cate_id
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
navigator(url, t) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
*{
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.conent{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-top: 20px;
|
||||||
|
.con_kuo{
|
||||||
|
position: relative;
|
||||||
|
.con_img{
|
||||||
|
width: 192px;
|
||||||
|
height: 92px;
|
||||||
|
}
|
||||||
|
.con_ico{
|
||||||
|
position: absolute;
|
||||||
|
left: 25px;
|
||||||
|
top: 32px;
|
||||||
|
width: 31px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
.con_text{
|
||||||
|
position: absolute;
|
||||||
|
left: 66px;
|
||||||
|
top: 20px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -19,6 +19,7 @@
|
|||||||
<view>协议规则</view>
|
<view>协议规则</view>
|
||||||
<text class='iconfont icon-you'></text>
|
<text class='iconfont icon-you'></text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<view class='item acea-row row-between-wrapper' @click="Setting">
|
<view class='item acea-row row-between-wrapper' @click="Setting">
|
||||||
<view>隐私设置</view>
|
<view>隐私设置</view>
|
||||||
|
BIN
static/images/bg1.png
Normal file
BIN
static/images/bg1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
static/images/bg2.png
Normal file
BIN
static/images/bg2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
static/images/bgic1.png
Normal file
BIN
static/images/bgic1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
BIN
static/images/bgic2.png
Normal file
BIN
static/images/bgic2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
2
uni_modules/rudon-rowMenuDotDotDot-left/changelog.md
Normal file
2
uni_modules/rudon-rowMenuDotDotDot-left/changelog.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
## 1.0.0(2022-09-29)
|
||||||
|
无
|
@ -0,0 +1,422 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-stat__select">
|
||||||
|
|
||||||
|
<!-- 组件介绍 -->
|
||||||
|
<!-- 名称:rudon-rowMenuDotDotDot 行内三点式下拉菜单 -->
|
||||||
|
<!-- 作者:Rudon <https://rudon.blog.csdn.net> -->
|
||||||
|
<!-- 用途:点击三点 -->
|
||||||
|
<!-- 用法:
|
||||||
|
0)参考https://uniapp.dcloud.net.cn/component/uniui/uni-data-select.html
|
||||||
|
1)项目安装本组件,
|
||||||
|
2)vue中直接引用即可,例如下面的例子 (插槽可随意修改,例如...):
|
||||||
|
-->
|
||||||
|
<!-- 例如:
|
||||||
|
<rudon-rowMenuDotDotDot :clear="false" :localdata="菜单对象" @change="ccc($event, item)">
|
||||||
|
...
|
||||||
|
</rudon-rowMenuDotDotDot>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span>
|
||||||
|
<view class="uni-select">
|
||||||
|
<view class="uni-select__input-box" @click="toggleSelector">
|
||||||
|
|
||||||
|
<!-- 显示插槽内容 -->
|
||||||
|
<slot></slot>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
|
||||||
|
<view class="uni-select__selector" v-if="showSelector">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<scroll-view scroll-y="true" class="uni-select__selector-scroll">
|
||||||
|
<view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
|
||||||
|
<text>{{emptyTips}}</text>
|
||||||
|
</view>
|
||||||
|
<view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData"
|
||||||
|
:key="index" @click="change(item)">
|
||||||
|
<text :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* DataChecklist 数据选择器
|
||||||
|
* @description 通过数据渲染的下拉框组件
|
||||||
|
* @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
|
||||||
|
* @property {String} value 默认值
|
||||||
|
* @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
|
||||||
|
* @property {Boolean} clear 是否可以清空已选项
|
||||||
|
* @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
|
||||||
|
* @property {String} label 左侧标题
|
||||||
|
* @property {String} placeholder 输入框的提示文字
|
||||||
|
* @event {Function} change 选中发生变化触发
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "uni-stat-select",
|
||||||
|
mixins: [uniCloud.mixinDatacom || {}],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSelector: false,
|
||||||
|
current: '',
|
||||||
|
mixinDatacomResData: [],
|
||||||
|
apps: [],
|
||||||
|
channels: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
localdata: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: '...'
|
||||||
|
},
|
||||||
|
emptyTips: {
|
||||||
|
type: String,
|
||||||
|
default: '无选项'
|
||||||
|
},
|
||||||
|
clear: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
defItem: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.last = `${this.collection}_last_selected_option_value`
|
||||||
|
if (this.collection && !this.localdata.length) {
|
||||||
|
this.mixinDatacomEasyGet()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
typePlaceholder() {
|
||||||
|
const text = {
|
||||||
|
'opendb-stat-app-versions': '版本',
|
||||||
|
'opendb-app-channels': '渠道',
|
||||||
|
'opendb-app-list': '应用'
|
||||||
|
}
|
||||||
|
const common = '请选择'
|
||||||
|
const placeholder = text[this.collection]
|
||||||
|
return placeholder ?
|
||||||
|
common + placeholder :
|
||||||
|
common
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
localdata: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val, old) {
|
||||||
|
if (Array.isArray(val)) {
|
||||||
|
this.mixinDatacomResData = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// #ifndef VUE3
|
||||||
|
value() {
|
||||||
|
this.initDefVal()
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue() {
|
||||||
|
this.initDefVal()
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
mixinDatacomResData: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
if (val.length) {
|
||||||
|
this.initDefVal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initDefVal() {
|
||||||
|
let defValue = ''
|
||||||
|
if ((this.value || this.value === 0) && !this.isDisabled(this.value)) {
|
||||||
|
defValue = this.value
|
||||||
|
} else if ((this.modelValue || this.modelValue === 0) && !this.isDisabled(this.modelValue)) {
|
||||||
|
defValue = this.modelValue
|
||||||
|
} else {
|
||||||
|
let strogeValue
|
||||||
|
if (this.collection) {
|
||||||
|
strogeValue = uni.getStorageSync(this.last)
|
||||||
|
}
|
||||||
|
if (strogeValue || strogeValue === 0) {
|
||||||
|
defValue = strogeValue
|
||||||
|
} else {
|
||||||
|
let defItem = ''
|
||||||
|
if (this.defItem > 0 && this.defItem < this.mixinDatacomResData.length) {
|
||||||
|
defItem = this.mixinDatacomResData[this.defItem - 1].value
|
||||||
|
}
|
||||||
|
defValue = defItem
|
||||||
|
}
|
||||||
|
this.emit(defValue)
|
||||||
|
}
|
||||||
|
const def = this.mixinDatacomResData.find(item => item.value === defValue)
|
||||||
|
this.current = def ? this.formatItemName(def) : ''
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {[String, Number]} value
|
||||||
|
* 判断用户给的 value 是否同时为禁用状态
|
||||||
|
*/
|
||||||
|
isDisabled(value) {
|
||||||
|
let isDisabled = false;
|
||||||
|
|
||||||
|
this.mixinDatacomResData.forEach(item => {
|
||||||
|
if (item.value === value) {
|
||||||
|
isDisabled = item.disable
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return isDisabled;
|
||||||
|
},
|
||||||
|
|
||||||
|
clearVal() {
|
||||||
|
this.emit('')
|
||||||
|
if (this.collection) {
|
||||||
|
uni.removeStorageSync(this.last)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
change(item) {
|
||||||
|
if (!item.disable) {
|
||||||
|
this.showSelector = false
|
||||||
|
this.current = this.formatItemName(item)
|
||||||
|
this.emit(item.value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emit(val) {
|
||||||
|
this.$emit('change', val)
|
||||||
|
this.$emit('input', val)
|
||||||
|
this.$emit('update:modelValue', val)
|
||||||
|
if (this.collection) {
|
||||||
|
uni.setStorageSync(this.last, val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleSelector() {
|
||||||
|
this.showSelector = !this.showSelector
|
||||||
|
},
|
||||||
|
formatItemName(item) {
|
||||||
|
let {
|
||||||
|
text,
|
||||||
|
value,
|
||||||
|
channel_code
|
||||||
|
} = item
|
||||||
|
channel_code = channel_code ? `(${channel_code})` : ''
|
||||||
|
return this.collection.indexOf('app-list') > 0 ?
|
||||||
|
`${text}(${value})` :
|
||||||
|
(
|
||||||
|
text ?
|
||||||
|
text :
|
||||||
|
`未命名${channel_code}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
$uni-base-color: #6a6a6a !default;
|
||||||
|
$uni-main-color: #3a3a3a !default;
|
||||||
|
$uni-secondary-color: #909399 !default;
|
||||||
|
$uni-border-3: #DCDCDC;
|
||||||
|
|
||||||
|
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
@media screen and (max-width: 100%) {
|
||||||
|
.hide-on-phone {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
.uni-stat__select {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-label-text {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: $uni-base-color;
|
||||||
|
margin: auto 0;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select {
|
||||||
|
font-size: 14px;
|
||||||
|
// border: 1px solid $uni-border-3;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 1px;
|
||||||
|
padding: 0 5px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
user-select: none;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
// border-bottom: solid 1px $uni-border-3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__label {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: $uni-secondary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-box {
|
||||||
|
min-height: 20px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 14px;
|
||||||
|
height: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-plac {
|
||||||
|
font-size: 14px;
|
||||||
|
color: $uni-secondary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 12px);
|
||||||
|
left: 0;
|
||||||
|
width: auto;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 2;
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-scroll {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
max-height: 200px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-empty,
|
||||||
|
.uni-select__selector-item {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
/* #endif */
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
/* border-bottom: solid 1px $uni-border-3; */
|
||||||
|
padding: 10px 20px;
|
||||||
|
|
||||||
|
width: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-item:hover {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-empty:last-child,
|
||||||
|
.uni-select__selector-item:last-child {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
border-bottom: none;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector__disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* picker 弹出层通用的指示小三角 */
|
||||||
|
.uni-popper__arrow,
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow {
|
||||||
|
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||||
|
top: -6px;
|
||||||
|
left: 10%;
|
||||||
|
margin-right: 3px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #EBEEF5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
content: " ";
|
||||||
|
top: 1px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-text {
|
||||||
|
color: $uni-main-color;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-placeholder {
|
||||||
|
color: $uni-base-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select--mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
</style>
|
82
uni_modules/rudon-rowMenuDotDotDot-left/package.json
Normal file
82
uni_modules/rudon-rowMenuDotDotDot-left/package.json
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"id": "rudon-rowMenuDotDotDot-left",
|
||||||
|
"displayName": "行内三点式下拉菜单-左对齐-向下展开",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "行内三点式下拉菜单(左对齐)",
|
||||||
|
"keywords": [
|
||||||
|
"select",
|
||||||
|
"picker",
|
||||||
|
"下拉菜单"
|
||||||
|
],
|
||||||
|
"repository": "",
|
||||||
|
"engines": {
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"type": "component-vue",
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "使用方法参考: https://ext.dcloud.net.cn/plugin?id=9350",
|
||||||
|
"data": "使用方法参考: https://ext.dcloud.net.cn/plugin?id=9350",
|
||||||
|
"permissions": "使用方法参考: https://ext.dcloud.net.cn/plugin?id=9350"
|
||||||
|
},
|
||||||
|
"npmurl": ""
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": [],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "u",
|
||||||
|
"vue3": "u"
|
||||||
|
},
|
||||||
|
"App": {
|
||||||
|
"app-vue": "u",
|
||||||
|
"app-nvue": "u"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "u",
|
||||||
|
"Android Browser": "u",
|
||||||
|
"微信浏览器(Android)": "u",
|
||||||
|
"QQ浏览器(Android)": "u"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "u",
|
||||||
|
"IE": "u",
|
||||||
|
"Edge": "u",
|
||||||
|
"Firefox": "u",
|
||||||
|
"Safari": "u"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "u",
|
||||||
|
"阿里": "u",
|
||||||
|
"百度": "u",
|
||||||
|
"字节跳动": "u",
|
||||||
|
"QQ": "u",
|
||||||
|
"钉钉": "u",
|
||||||
|
"快手": "u",
|
||||||
|
"飞书": "u",
|
||||||
|
"京东": "u"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
uni_modules/rudon-rowMenuDotDotDot-left/readme.md
Normal file
1
uni_modules/rudon-rowMenuDotDotDot-left/readme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# rudon-rowMenuDotDotDot-left
|
2
uni_modules/rudon-rowMenuDotDotDot/changelog.md
Normal file
2
uni_modules/rudon-rowMenuDotDotDot/changelog.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
## 1.0.0(2022-09-05)
|
||||||
|
模仿并改进uniapp官方ui的组件uni-data-select,自定义显示插槽(允许变量),手册:https://uniapp.dcloud.net.cn/component/uniui/uni-data-select.html
|
@ -0,0 +1,422 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-stat__select">
|
||||||
|
|
||||||
|
<!-- 组件介绍 -->
|
||||||
|
<!-- 名称:rudon-rowMenuDotDotDot 行内三点式下拉菜单 -->
|
||||||
|
<!-- 作者:Rudon <https://rudon.blog.csdn.net> -->
|
||||||
|
<!-- 用途:点击三点 -->
|
||||||
|
<!-- 用法:
|
||||||
|
0)参考https://uniapp.dcloud.net.cn/component/uniui/uni-data-select.html
|
||||||
|
1)项目安装本组件,
|
||||||
|
2)vue中直接引用即可,例如下面的例子 (插槽可随意修改,例如...):
|
||||||
|
-->
|
||||||
|
<!-- 例如:
|
||||||
|
<rudon-rowMenuDotDotDot :clear="false" :localdata="菜单对象" @change="ccc($event, item)">
|
||||||
|
...
|
||||||
|
</rudon-rowMenuDotDotDot>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span>
|
||||||
|
<view class="uni-select">
|
||||||
|
<view class="uni-select__input-box" @click="toggleSelector">
|
||||||
|
|
||||||
|
<!-- 显示插槽内容 -->
|
||||||
|
<slot></slot>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
|
||||||
|
<view class="uni-select__selector" v-if="showSelector">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<scroll-view scroll-y="true" class="uni-select__selector-scroll">
|
||||||
|
<view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
|
||||||
|
<text>{{emptyTips}}</text>
|
||||||
|
</view>
|
||||||
|
<view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData"
|
||||||
|
:key="index" @click="change(item)">
|
||||||
|
<text :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* DataChecklist 数据选择器
|
||||||
|
* @description 通过数据渲染的下拉框组件
|
||||||
|
* @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
|
||||||
|
* @property {String} value 默认值
|
||||||
|
* @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
|
||||||
|
* @property {Boolean} clear 是否可以清空已选项
|
||||||
|
* @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
|
||||||
|
* @property {String} label 左侧标题
|
||||||
|
* @property {String} placeholder 输入框的提示文字
|
||||||
|
* @event {Function} change 选中发生变化触发
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "uni-stat-select",
|
||||||
|
mixins: [uniCloud.mixinDatacom || {}],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSelector: false,
|
||||||
|
current: '',
|
||||||
|
mixinDatacomResData: [],
|
||||||
|
apps: [],
|
||||||
|
channels: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
localdata: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: '...'
|
||||||
|
},
|
||||||
|
emptyTips: {
|
||||||
|
type: String,
|
||||||
|
default: '无选项'
|
||||||
|
},
|
||||||
|
clear: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
defItem: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.last = `${this.collection}_last_selected_option_value`
|
||||||
|
if (this.collection && !this.localdata.length) {
|
||||||
|
this.mixinDatacomEasyGet()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
typePlaceholder() {
|
||||||
|
const text = {
|
||||||
|
'opendb-stat-app-versions': '版本',
|
||||||
|
'opendb-app-channels': '渠道',
|
||||||
|
'opendb-app-list': '应用'
|
||||||
|
}
|
||||||
|
const common = '请选择'
|
||||||
|
const placeholder = text[this.collection]
|
||||||
|
return placeholder ?
|
||||||
|
common + placeholder :
|
||||||
|
common
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
localdata: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val, old) {
|
||||||
|
if (Array.isArray(val)) {
|
||||||
|
this.mixinDatacomResData = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// #ifndef VUE3
|
||||||
|
value() {
|
||||||
|
this.initDefVal()
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue() {
|
||||||
|
this.initDefVal()
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
mixinDatacomResData: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
if (val.length) {
|
||||||
|
this.initDefVal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initDefVal() {
|
||||||
|
let defValue = ''
|
||||||
|
if ((this.value || this.value === 0) && !this.isDisabled(this.value)) {
|
||||||
|
defValue = this.value
|
||||||
|
} else if ((this.modelValue || this.modelValue === 0) && !this.isDisabled(this.modelValue)) {
|
||||||
|
defValue = this.modelValue
|
||||||
|
} else {
|
||||||
|
let strogeValue
|
||||||
|
if (this.collection) {
|
||||||
|
strogeValue = uni.getStorageSync(this.last)
|
||||||
|
}
|
||||||
|
if (strogeValue || strogeValue === 0) {
|
||||||
|
defValue = strogeValue
|
||||||
|
} else {
|
||||||
|
let defItem = ''
|
||||||
|
if (this.defItem > 0 && this.defItem < this.mixinDatacomResData.length) {
|
||||||
|
defItem = this.mixinDatacomResData[this.defItem - 1].value
|
||||||
|
}
|
||||||
|
defValue = defItem
|
||||||
|
}
|
||||||
|
this.emit(defValue)
|
||||||
|
}
|
||||||
|
const def = this.mixinDatacomResData.find(item => item.value === defValue)
|
||||||
|
this.current = def ? this.formatItemName(def) : ''
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {[String, Number]} value
|
||||||
|
* 判断用户给的 value 是否同时为禁用状态
|
||||||
|
*/
|
||||||
|
isDisabled(value) {
|
||||||
|
let isDisabled = false;
|
||||||
|
|
||||||
|
this.mixinDatacomResData.forEach(item => {
|
||||||
|
if (item.value === value) {
|
||||||
|
isDisabled = item.disable
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return isDisabled;
|
||||||
|
},
|
||||||
|
|
||||||
|
clearVal() {
|
||||||
|
this.emit('')
|
||||||
|
if (this.collection) {
|
||||||
|
uni.removeStorageSync(this.last)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
change(item) {
|
||||||
|
if (!item.disable) {
|
||||||
|
this.showSelector = false
|
||||||
|
this.current = this.formatItemName(item)
|
||||||
|
this.emit(item.value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emit(val) {
|
||||||
|
this.$emit('change', val)
|
||||||
|
this.$emit('input', val)
|
||||||
|
this.$emit('update:modelValue', val)
|
||||||
|
if (this.collection) {
|
||||||
|
uni.setStorageSync(this.last, val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleSelector() {
|
||||||
|
this.showSelector = !this.showSelector
|
||||||
|
},
|
||||||
|
formatItemName(item) {
|
||||||
|
let {
|
||||||
|
text,
|
||||||
|
value,
|
||||||
|
channel_code
|
||||||
|
} = item
|
||||||
|
channel_code = channel_code ? `(${channel_code})` : ''
|
||||||
|
return this.collection.indexOf('app-list') > 0 ?
|
||||||
|
`${text}(${value})` :
|
||||||
|
(
|
||||||
|
text ?
|
||||||
|
text :
|
||||||
|
`未命名${channel_code}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
$uni-base-color: #6a6a6a !default;
|
||||||
|
$uni-main-color: #3a3a3a !default;
|
||||||
|
$uni-secondary-color: #909399 !default;
|
||||||
|
$uni-border-3: #DCDCDC;
|
||||||
|
|
||||||
|
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
@media screen and (max-width: 100%) {
|
||||||
|
.hide-on-phone {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
.uni-stat__select {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-label-text {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: $uni-base-color;
|
||||||
|
margin: auto 0;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select {
|
||||||
|
font-size: 14px;
|
||||||
|
// border: 1px solid $uni-border-3;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 1px;
|
||||||
|
padding: 0 5px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
user-select: none;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
// border-bottom: solid 1px $uni-border-3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__label {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: $uni-secondary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-box {
|
||||||
|
min-height: 20px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 14px;
|
||||||
|
height: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-plac {
|
||||||
|
font-size: 14px;
|
||||||
|
color: $uni-secondary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 12px);
|
||||||
|
right: 0;
|
||||||
|
width: auto;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 2;
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-scroll {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
max-height: 200px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-empty,
|
||||||
|
.uni-select__selector-item {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
/* #endif */
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
/* border-bottom: solid 1px $uni-border-3; */
|
||||||
|
padding: 10px 20px;
|
||||||
|
|
||||||
|
width: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-item:hover {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-empty:last-child,
|
||||||
|
.uni-select__selector-item:last-child {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
border-bottom: none;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector__disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* picker 弹出层通用的指示小三角 */
|
||||||
|
.uni-popper__arrow,
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow {
|
||||||
|
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||||
|
top: -6px;
|
||||||
|
right: 10%;
|
||||||
|
margin-right: 3px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #EBEEF5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
content: " ";
|
||||||
|
top: 1px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-text {
|
||||||
|
color: $uni-main-color;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-placeholder {
|
||||||
|
color: $uni-base-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select--mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
</style>
|
82
uni_modules/rudon-rowMenuDotDotDot/package.json
Normal file
82
uni_modules/rudon-rowMenuDotDotDot/package.json
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"id": "rudon-rowMenuDotDotDot",
|
||||||
|
"displayName": "行内三点式下拉菜单-右对齐-向下展开",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "行内三点式下拉菜单",
|
||||||
|
"keywords": [
|
||||||
|
"select",
|
||||||
|
"picker",
|
||||||
|
"下拉菜单"
|
||||||
|
],
|
||||||
|
"repository": "",
|
||||||
|
"engines": {
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"type": "component-vue",
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "【相关插件】\r\n行内三点式下拉菜单-左对齐-向下展开 https://ext.dcloud.net.cn/plugin?id=9651\r\n行内三点式下拉菜单-左对齐-向上展开 https://ext.dcloud.net.cn/plugin?id=9652\r\n行内三点式下拉菜单-右对齐-向下展开 https://ext.dcloud.net.cn/plugin?id=9350",
|
||||||
|
"data": "【相关插件】\r\n行内三点式下拉菜单-左对齐-向下展开 https://ext.dcloud.net.cn/plugin?id=9651\r\n行内三点式下拉菜单-左对齐-向上展开 https://ext.dcloud.net.cn/plugin?id=9652\r\n行内三点式下拉菜单-右对齐-向下展开 https://ext.dcloud.net.cn/plugin?id=9350",
|
||||||
|
"permissions": "【相关插件】\r\n行内三点式下拉菜单-左对齐-向下展开 https://ext.dcloud.net.cn/plugin?id=9651\r\n行内三点式下拉菜单-左对齐-向上展开 https://ext.dcloud.net.cn/plugin?id=9652\r\n行内三点式下拉菜单-右对齐-向下展开 https://ext.dcloud.net.cn/plugin?id=9350"
|
||||||
|
},
|
||||||
|
"npmurl": ""
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": [],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
},
|
||||||
|
"App": {
|
||||||
|
"app-vue": "y",
|
||||||
|
"app-nvue": "y"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "y",
|
||||||
|
"Android Browser": "y",
|
||||||
|
"微信浏览器(Android)": "y",
|
||||||
|
"QQ浏览器(Android)": "y"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "y",
|
||||||
|
"IE": "y",
|
||||||
|
"Edge": "y",
|
||||||
|
"Firefox": "y",
|
||||||
|
"Safari": "y"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "y",
|
||||||
|
"阿里": "y",
|
||||||
|
"百度": "y",
|
||||||
|
"字节跳动": "y",
|
||||||
|
"QQ": "y",
|
||||||
|
"钉钉": "y",
|
||||||
|
"快手": "y",
|
||||||
|
"飞书": "y",
|
||||||
|
"京东": "y"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "y",
|
||||||
|
"联盟": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
uni_modules/rudon-rowMenuDotDotDot/readme.md
Normal file
1
uni_modules/rudon-rowMenuDotDotDot/readme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# rudon-rowMenuDotDotDot
|
35
uni_modules/uni-data-select/changelog.md
Normal file
35
uni_modules/uni-data-select/changelog.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## 1.0.6(2023-04-12)
|
||||||
|
- 修复 微信小程序点击时会改变背景颜色的 bug
|
||||||
|
## 1.0.5(2023-02-03)
|
||||||
|
- 修复 禁用时会显示清空按钮
|
||||||
|
## 1.0.4(2023-02-02)
|
||||||
|
- 优化 查询条件短期内多次变更只查询最后一次变更后的结果
|
||||||
|
- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
|
||||||
|
## 1.0.3(2023-01-16)
|
||||||
|
- 修复 不关联服务空间报错的问题
|
||||||
|
## 1.0.2(2023-01-14)
|
||||||
|
- 新增 属性 `format` 可用于格式化显示选项内容
|
||||||
|
## 1.0.1(2022-12-06)
|
||||||
|
- 修复 当where变化时,数据不会自动更新的问题
|
||||||
|
## 0.1.9(2022-09-05)
|
||||||
|
- 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
|
||||||
|
## 0.1.8(2022-08-29)
|
||||||
|
- 修复 点击的位置不准确
|
||||||
|
## 0.1.7(2022-08-12)
|
||||||
|
- 新增 支持 disabled 属性
|
||||||
|
## 0.1.6(2022-07-06)
|
||||||
|
- 修复 pc端宽度异常的bug
|
||||||
|
## 0.1.5
|
||||||
|
- 修复 pc端宽度异常的bug
|
||||||
|
## 0.1.4(2022-07-05)
|
||||||
|
- 优化 显示样式
|
||||||
|
## 0.1.3(2022-06-02)
|
||||||
|
- 修复 localdata 赋值不生效的 bug
|
||||||
|
- 新增 支持 uni.scss 修改颜色
|
||||||
|
- 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
|
||||||
|
## 0.1.2(2022-05-08)
|
||||||
|
- 修复 当 value 为 0 时选择不生效的 bug
|
||||||
|
## 0.1.1(2022-05-07)
|
||||||
|
- 新增 记住上次的选项(仅 collection 存在时有效)
|
||||||
|
## 0.1.0(2022-04-22)
|
||||||
|
- 初始化
|
@ -0,0 +1,517 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-stat__select">
|
||||||
|
<span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span>
|
||||||
|
<view class="uni-stat-box" :class="{'uni-stat__actived': current}">
|
||||||
|
<view class="uni-select" :class="{'uni-select--disabled':disabled}">
|
||||||
|
<view class="uni-select__input-box" @click="toggleSelector">
|
||||||
|
<view v-if="current" class="uni-select__input-text">{{current}}</view>
|
||||||
|
<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
|
||||||
|
<view v-if="current && clear && !disabled" @click.stop="clearVal" >
|
||||||
|
<uni-icons type="clear" color="#c0c4cc" size="24"/>
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
|
||||||
|
<view class="uni-select__selector" v-if="showSelector">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<scroll-view scroll-y="true" class="uni-select__selector-scroll">
|
||||||
|
<view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
|
||||||
|
<text>{{emptyTips}}</text>
|
||||||
|
</view>
|
||||||
|
<view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData" :key="index"
|
||||||
|
@click="change(item)">
|
||||||
|
<text :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* DataChecklist 数据选择器
|
||||||
|
* @description 通过数据渲染的下拉框组件
|
||||||
|
* @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
|
||||||
|
* @property {String} value 默认值
|
||||||
|
* @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
|
||||||
|
* @property {Boolean} clear 是否可以清空已选项
|
||||||
|
* @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
|
||||||
|
* @property {String} label 左侧标题
|
||||||
|
* @property {String} placeholder 输入框的提示文字
|
||||||
|
* @property {Boolean} disabled 是否禁用
|
||||||
|
* @event {Function} change 选中发生变化触发
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "uni-data-select",
|
||||||
|
mixins: [uniCloud.mixinDatacom || {}],
|
||||||
|
props: {
|
||||||
|
localdata: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: '请选择'
|
||||||
|
},
|
||||||
|
emptyTips: {
|
||||||
|
type: String,
|
||||||
|
default: '无选项'
|
||||||
|
},
|
||||||
|
clear: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
defItem: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
|
||||||
|
format: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSelector: false,
|
||||||
|
current: '',
|
||||||
|
mixinDatacomResData: [],
|
||||||
|
apps: [],
|
||||||
|
channels: [],
|
||||||
|
cacheKey: "uni-data-select-lastSelectedValue",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.debounceGet = this.debounce(() => {
|
||||||
|
this.query();
|
||||||
|
}, 300);
|
||||||
|
if (this.collection && !this.localdata.length) {
|
||||||
|
this.debounceGet();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
typePlaceholder() {
|
||||||
|
const text = {
|
||||||
|
'opendb-stat-app-versions': '版本',
|
||||||
|
'opendb-app-channels': '渠道',
|
||||||
|
'opendb-app-list': '应用'
|
||||||
|
}
|
||||||
|
const common = this.placeholder
|
||||||
|
const placeholder = text[this.collection]
|
||||||
|
return placeholder ?
|
||||||
|
common + placeholder :
|
||||||
|
common
|
||||||
|
},
|
||||||
|
valueCom(){
|
||||||
|
// #ifdef VUE3
|
||||||
|
return this.modelValue;
|
||||||
|
// #endif
|
||||||
|
// #ifndef VUE3
|
||||||
|
return this.value;
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
localdata: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val, old) {
|
||||||
|
if (Array.isArray(val) && old !== val) {
|
||||||
|
this.mixinDatacomResData = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
valueCom(val, old) {
|
||||||
|
this.initDefVal()
|
||||||
|
},
|
||||||
|
mixinDatacomResData: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
if (val.length) {
|
||||||
|
this.initDefVal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
debounce(fn, time = 100){
|
||||||
|
let timer = null
|
||||||
|
return function(...args) {
|
||||||
|
if (timer) clearTimeout(timer)
|
||||||
|
timer = setTimeout(() => {
|
||||||
|
fn.apply(this, args)
|
||||||
|
}, time)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 执行数据库查询
|
||||||
|
query(){
|
||||||
|
this.mixinDatacomEasyGet();
|
||||||
|
},
|
||||||
|
// 监听查询条件变更事件
|
||||||
|
onMixinDatacomPropsChange(){
|
||||||
|
if (this.collection) {
|
||||||
|
this.debounceGet();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initDefVal() {
|
||||||
|
let defValue = ''
|
||||||
|
if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
|
||||||
|
defValue = this.valueCom
|
||||||
|
} else {
|
||||||
|
let strogeValue
|
||||||
|
if (this.collection) {
|
||||||
|
strogeValue = this.getCache()
|
||||||
|
}
|
||||||
|
if (strogeValue || strogeValue === 0) {
|
||||||
|
defValue = strogeValue
|
||||||
|
} else {
|
||||||
|
let defItem = ''
|
||||||
|
if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
|
||||||
|
defItem = this.mixinDatacomResData[this.defItem - 1].value
|
||||||
|
}
|
||||||
|
defValue = defItem
|
||||||
|
}
|
||||||
|
if (defValue || defValue === 0) {
|
||||||
|
this.emit(defValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const def = this.mixinDatacomResData.find(item => item.value === defValue)
|
||||||
|
this.current = def ? this.formatItemName(def) : ''
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {[String, Number]} value
|
||||||
|
* 判断用户给的 value 是否同时为禁用状态
|
||||||
|
*/
|
||||||
|
isDisabled(value) {
|
||||||
|
let isDisabled = false;
|
||||||
|
|
||||||
|
this.mixinDatacomResData.forEach(item => {
|
||||||
|
if (item.value === value) {
|
||||||
|
isDisabled = item.disable
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return isDisabled;
|
||||||
|
},
|
||||||
|
|
||||||
|
clearVal() {
|
||||||
|
this.emit('')
|
||||||
|
if (this.collection) {
|
||||||
|
this.removeCache()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
change(item) {
|
||||||
|
if (!item.disable) {
|
||||||
|
this.showSelector = false
|
||||||
|
this.current = this.formatItemName(item)
|
||||||
|
this.emit(item.value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emit(val) {
|
||||||
|
this.$emit('input', val)
|
||||||
|
this.$emit('update:modelValue', val)
|
||||||
|
this.$emit('change', val)
|
||||||
|
if (this.collection) {
|
||||||
|
this.setCache(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toggleSelector() {
|
||||||
|
if (this.disabled) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.showSelector = !this.showSelector
|
||||||
|
},
|
||||||
|
formatItemName(item) {
|
||||||
|
let {
|
||||||
|
text,
|
||||||
|
value,
|
||||||
|
channel_code
|
||||||
|
} = item
|
||||||
|
channel_code = channel_code ? `(${channel_code})` : ''
|
||||||
|
|
||||||
|
if (this.format) {
|
||||||
|
// 格式化输出
|
||||||
|
let str = "";
|
||||||
|
str = this.format;
|
||||||
|
for (let key in item) {
|
||||||
|
str = str.replace(new RegExp(`{${key}}`,"g"),item[key]);
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
} else {
|
||||||
|
return this.collection.indexOf('app-list') > 0 ?
|
||||||
|
`${text}(${value})` :
|
||||||
|
(
|
||||||
|
text ?
|
||||||
|
text :
|
||||||
|
`未命名${channel_code}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取当前加载的数据
|
||||||
|
getLoadData(){
|
||||||
|
return this.mixinDatacomResData;
|
||||||
|
},
|
||||||
|
// 获取当前缓存key
|
||||||
|
getCurrentCacheKey(){
|
||||||
|
return this.collection;
|
||||||
|
},
|
||||||
|
// 获取缓存
|
||||||
|
getCache(name=this.getCurrentCacheKey()){
|
||||||
|
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
||||||
|
return cacheData[name];
|
||||||
|
},
|
||||||
|
// 设置缓存
|
||||||
|
setCache(value, name=this.getCurrentCacheKey()){
|
||||||
|
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
||||||
|
cacheData[name] = value;
|
||||||
|
uni.setStorageSync(this.cacheKey, cacheData);
|
||||||
|
},
|
||||||
|
// 删除缓存
|
||||||
|
removeCache(name=this.getCurrentCacheKey()){
|
||||||
|
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
||||||
|
delete cacheData[name];
|
||||||
|
uni.setStorageSync(this.cacheKey, cacheData);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
$uni-base-color: #6a6a6a !default;
|
||||||
|
$uni-main-color: #333 !default;
|
||||||
|
$uni-secondary-color: #909399 !default;
|
||||||
|
$uni-border-3: #e5e5e5;
|
||||||
|
|
||||||
|
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
@media screen and (max-width: 500px) {
|
||||||
|
.hide-on-phone {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
.uni-stat__select {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
// padding: 15px;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
cursor: pointer;
|
||||||
|
/* #endif */
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-stat-box {
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-stat__actived {
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
// outline: 1px solid #2979ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-label-text {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: $uni-base-color;
|
||||||
|
margin: auto 0;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select {
|
||||||
|
font-size: 14px;
|
||||||
|
border: 1px solid $uni-border-3;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 0 5px;
|
||||||
|
padding-left: 10px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
user-select: none;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: solid 1px $uni-border-3;
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
height: 35px;
|
||||||
|
|
||||||
|
&--disabled {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__label {
|
||||||
|
font-size: 16px;
|
||||||
|
// line-height: 22px;
|
||||||
|
height: 35px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: $uni-secondary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-box {
|
||||||
|
height: 35px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 14px;
|
||||||
|
height: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-plac {
|
||||||
|
font-size: 14px;
|
||||||
|
color: $uni-secondary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 12px);
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 3;
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-scroll {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
max-height: 200px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #ifdef H5 */
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.uni-select__selector-scroll {
|
||||||
|
max-height: 600px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
|
.uni-select__selector-empty,
|
||||||
|
.uni-select__selector-item {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
/* #endif */
|
||||||
|
line-height: 35px;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
/* border-bottom: solid 1px $uni-border-3; */
|
||||||
|
padding: 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-item:hover {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-empty:last-child,
|
||||||
|
.uni-select__selector-item:last-child {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
border-bottom: none;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector__disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* picker 弹出层通用的指示小三角 */
|
||||||
|
.uni-popper__arrow,
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow {
|
||||||
|
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||||
|
top: -6px;
|
||||||
|
left: 10%;
|
||||||
|
margin-right: 3px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #EBEEF5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
content: " ";
|
||||||
|
top: 1px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-text {
|
||||||
|
// width: 280px;
|
||||||
|
width: 100%;
|
||||||
|
color: $uni-main-color;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-placeholder {
|
||||||
|
color: $uni-base-color;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select--mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
</style>
|
85
uni_modules/uni-data-select/package.json
Normal file
85
uni_modules/uni-data-select/package.json
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
{
|
||||||
|
"id": "uni-data-select",
|
||||||
|
"displayName": "uni-data-select 下拉框选择器",
|
||||||
|
"version": "1.0.6",
|
||||||
|
"description": "通过数据驱动的下拉框选择器",
|
||||||
|
"keywords": [
|
||||||
|
"uni-ui",
|
||||||
|
"select",
|
||||||
|
"uni-data-select",
|
||||||
|
"下拉框",
|
||||||
|
"下拉选"
|
||||||
|
],
|
||||||
|
"repository": "https://github.com/dcloudio/uni-ui",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": "^3.1.1"
|
||||||
|
},
|
||||||
|
"directories": {
|
||||||
|
"example": "../../temps/example_temps"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "无",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||||
|
"type": "component-vue"
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": ["uni-load-more"],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"App": {
|
||||||
|
"app-vue": "u",
|
||||||
|
"app-nvue": "n"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "y",
|
||||||
|
"Android Browser": "y",
|
||||||
|
"微信浏览器(Android)": "y",
|
||||||
|
"QQ浏览器(Android)": "y"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "y",
|
||||||
|
"IE": "y",
|
||||||
|
"Edge": "y",
|
||||||
|
"Firefox": "y",
|
||||||
|
"Safari": "y"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "y",
|
||||||
|
"阿里": "u",
|
||||||
|
"百度": "u",
|
||||||
|
"字节跳动": "u",
|
||||||
|
"QQ": "u",
|
||||||
|
"京东": "u"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
},
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
uni_modules/uni-data-select/readme.md
Normal file
8
uni_modules/uni-data-select/readme.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
## DataSelect 下拉框选择器
|
||||||
|
> **组件名:uni-data-select**
|
||||||
|
> 代码块: `uDataSelect`
|
||||||
|
|
||||||
|
当选项过多时,使用下拉菜单展示并选择内容
|
||||||
|
|
||||||
|
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-select)
|
||||||
|
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
Loading…
x
Reference in New Issue
Block a user