先货后款部分页面布局+功能

This commit is contained in:
THK3121 2023-07-07 11:03:32 +08:00
parent 273fa133ed
commit 4261b729f1
32 changed files with 3410 additions and 1048 deletions

View File

@ -15,6 +15,7 @@ import request from "@/utils/request.js";
export function getStatisticsInfo() {
return request.get("admin/order/statistics", {}, { login: true });
}
/**
* 订单月统计
*/
@ -33,6 +34,12 @@ export function getAdminOrderList(where) {
export function setAdminOrderPrice(merId, id, data) {
return request.post("admin/" + merId + "/price/" + id, data, { login: true });
}
/**
* 同意先货后款
*/
export function postconfirm(merId, data) {
return request.post("admin/" + merId + "/confirm" , data, { login: true });
}
/**
* 订单备注
*/

View File

@ -13,7 +13,12 @@ import request from "@/utils/request.js";
* 获取商品详情
*/
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
*/

View File

@ -249,12 +249,24 @@
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "online_warehousing/index",
"style": {
"navigationBarTitleText": "采购订单"
}
},
{
"path": "user_setting/index",
"style": {
"navigationBarTitleText": "设置"
}
},
{
"path": "supply_procurement/index",
"style": {
"navigationBarTitleText": "供货采购"
}
},
//
{
"path": "user_about/index",

View File

@ -137,10 +137,19 @@
支付
<span class="money">{{ item.pay_price }}</span> (邮费 ¥{{ item.pay_postage}})
</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="more">
</view>
<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>
@ -196,7 +205,8 @@
setOfflinePay,
setOrderRefund,
refundOrderReceive,
setRefundMark
setRefundMark,
postconfirm
} from "@/api/admin";
import Loading from '@/components/Loading/index'
import PriceChange from '@/components/PriceChange/index'
@ -249,6 +259,16 @@
this.getIndex();
},
methods: {
//
tongyi(id,number){
let data={
id:id,
type:number
}
postconfirm(this.merId,data).then(res=>{
console.log(res);
})
},
handleSearch() {
this.loaded = false;
this.where.page = 1;
@ -631,7 +651,7 @@
.pos-order-list .list .item .operation .bnt {
font-size: 28upx;
color: #5c5c5c;
width: 170upx;
width: 160upx;
height: 60upx;
border-radius: 30upx;
border: 1px solid #bbb;

View File

@ -64,7 +64,8 @@
<view class="title">我的店铺</view>
<view class="content ">
<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>
<text class="text">供货采购</text>
</view>

View File

@ -568,7 +568,7 @@
})
if (selectValue.length > 0) {
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 {
return this.$util.Tips({

View File

@ -289,7 +289,8 @@
merList: [], //
product_type: 0,
show:false,
image: '' //
image: '' ,//,
credit_buy:'',//
};
},
onLoad(options) {
@ -298,6 +299,7 @@
if (options.street_id != undefined) {
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 && options.type_id.split(',').toString() || ''
this.sotreParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
@ -496,7 +498,8 @@
order: this.sotreParam.order,
category_id: this.sotreParam.category_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) {
rqData.location = this.latitude + ',' + this.longitude

View File

@ -260,11 +260,11 @@
<view>实付款</view>
<view class='conter'>{{orderInfo.pay_price}}</view>
</view>
<view class="settel-m">
<view class="settel-m" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12">
结算周期到期后付款 100.00
<image src="@/static/images/wenhao.png" mode="" @click="open"></image>
</view>
<view class="settel-f">
<view class="settel-f" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12">
结算周期:30 日利率:0.05%
</view>
</view>

File diff suppressed because it is too large Load Diff

View File

@ -125,6 +125,9 @@
<view class="item_cell flex_a_c">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>客服电话</view>
<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 class="item_cell">
<view class="if_btn flex_a_c_j_sb">

View File

@ -3,47 +3,61 @@
<view class="order-index" ref="container">
<view class="header">
<div class="header_count">
<swiper indicator-dots="true" :circular="circular" indicator-color="#E4E4E4" indicator-active-color="#E93323"
previous-margin="0" next-margin="0" :current="swiperCur" @change="swiperChange">
<swiper indicator-dots="true" :circular="circular" indicator-color="#E4E4E4"
indicator-active-color="#E93323" previous-margin="0" next-margin="0" :current="swiperCur"
@change="swiperChange">
<block>
<swiper-item :class="{ active: 0 == swiperCur }">
<view class="slide-navigator">
<view class="item" hover-class='none' @click="jumpAddGoods">
<image mode='widthFix' class="image" src="../static/images/product_add.png"></image>
<image mode='widthFix' class="image" src="../static/images/product_add.png">
</image>
<text class="text">添加商品</text>
</view>
<navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=1`"
<navigator class="item"
:url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=1`"
hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_sales.png"></image>
<image mode='widthFix' class="image" src="../static/images/product_sales.png">
</image>
<text class="text">在售商品</text>
</navigator>
<navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=3`"
<navigator class="item"
:url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=3`"
hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_out.png"></image>
<image mode='widthFix' class="image" src="../static/images/product_out.png">
</image>
<text class="text">售罄商品</text>
</navigator>
<navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=5`"
<navigator class="item"
:url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=5`"
hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_recycle.png"></image>
<image mode='widthFix' class="image" src="../static/images/product_recycle.png">
</image>
<text class="text">回收站</text>
</navigator>
<navigator class="item" :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`"
<navigator class="item"
:url="`/pages/product/storeClassification/index?mer_id=${mer_id}`"
hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_cate.png"></image>
<image mode='widthFix' class="image" src="../static/images/product_cate.png">
</image>
<text class="text">店铺分类</text>
</navigator>
</view>
</swiper-item>
<swiper-item :class="{ active: 1 == swiperCur }">
<view class="slide-navigator">
<navigator class="item" :url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`"
<navigator class="item"
:url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`"
hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_freight.png"></image>
<image mode='widthFix' class="image" src="../static/images/product_freight.png">
</image>
<text class="text">运费模板</text>
</navigator>
<navigator class="item" :url="`/pages/product/addGoods/mulSpecification?mer_id=${mer_id}`"
<navigator class="item"
:url="`/pages/product/addGoods/mulSpecification?mer_id=${mer_id}`"
hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_specification.png"></image>
<image mode='widthFix' class="image"
src="../static/images/product_specification.png"></image>
<text class="text">规格模板</text>
</navigator>
</view>
@ -75,28 +89,60 @@
<text class='ot_price'>{{item.ot_price}}</text>
</view>
</view>
<view style="position: absolute; top: 10px; right: 10px;">
<!-- 插件无需手动引入直接使用即可 -->
<!-- 里面···可以改为任意东西图片也可以 -->
<!-- 参数$event不可修改否则取不到点击事件详情 -->
<rudon-rowMenuDotDotDot :localdata="options" @change="menuAction($event, item.attrValue)">
. . .
</rudon-rowMenuDotDotDot>
</view>
</view>
<view class="operation acea-row row-between-wrapper">
<view></view>
<view class="acea-row row-middle">
<view v-if="item.is_show == 1 && item.status == 1" class="bnt" @tap.stop="handleShelves(item,0)">下架
<view v-if="item.is_show == 1 && item.status == 1" class="bnt"
@tap.stop="handleShelves(item,0)">下架
</view>
<view v-if="item.is_show == 0 && item.status == 1" class="bnt" @tap.stop="handleShelves(item),1">上架
<view v-if="item.is_show == 0 && item.status == 1" class="bnt"
@tap.stop="handleShelves(item),1">上架
</view>
<view @click="editGoods(item)" class="bnt">编辑</view>
<navigator :url="'/pages/admin/goods_details/index?product_id='+item.product_id+'&product_type=0'"
<navigator
:url="'/pages/admin/goods_details/index?product_id='+item.product_id+'&product_type=0'"
class="bnt" hover-class='none'>预览</navigator>
<view class="bnt" v-if="item.is_show == 0" @tap.stop="handleRecycle(item,index)">删除</view>
<view class="bnt bnt_recommend" v-if="item.is_show == 1" @tap.stop="handleRecommend(item)">
<view class="bnt" v-if="item.is_show == 0" @tap.stop="handleRecycle(item,index)">删除
</view>
<view class="bnt bnt_recommend" v-if="item.is_show == 1"
@tap.stop="handleRecommend(item)">
{{item.is_good ? '取消推荐' : '店铺推荐'}}
</view>
</view>
</view>
</block>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
<u-popup :show="show" @close="close" mode="center">
<view class="popen" >
<h4 >线下入库</h4>
<view class="guige">
<u-radio-group v-model="checkboxValue1" placement="column" @change="checkboxChange" >
<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in checkboxList1" @change="radioChange(item)"
:key="index" :label="item.sku" :name="item.unique" v-if="item.sku">
</u-radio>
</u-radio-group>
</view>
<view class="shuru">
数量: <input type="text" v-model="data.number" placeholder="请输入">
</view>
<view class="btn">
<button class="btn_l" @click="close()">取消</button>
<button class="btn_r" @click="creat()">提交</button>
</view>
</view>
</u-popup>
</view>
</template>
@ -114,7 +160,8 @@
productLstApi,
productDeleteApi,
productOffApi,
productRecommendApi
productRecommendApi,
postImport
} from "@/api/product";
import Loading from '@/components/Loading/index.vue';
import {
@ -145,6 +192,28 @@
productList: [],
swiperCur: 0,
circular: true,
attrValue:[],
options: [{
value: '0',
text: '线上入库'
},
{
value: '1',
text: '线下入库'
}
],
//线
show: false,
//
checkboxValue1: [],
//
checkboxList1: [],
data:{
product_id: '',
unique: "",
number: ''
},
on_line:''
}
},
onLoad(options) {
@ -158,7 +227,56 @@
this.getList(this.mer_id);
uni.stopPullDownRefresh()
},
onHide() {
this.show=false
},
methods: {
menuAction(action, rowId) {
//
if (action === '') {
return
}
this.on_line = action
console.log(this.on_line);
this.checkboxList1=rowId
this.show=true
},
close() {
this.show = false
},
//
creat(){
if(this.on_line == 1){
postImport(this.mer_id,this.data).then(res=>{
console.log(res);
this.show=false
this.$util.Tips({
title: res.message
})
})
}
if(this.on_line == 0){
console.log('12');
navigateTo(1,'/pages/users/online_warehousing/index', {
mer_id: this.mer_id,
product_id:this.data.product_id,
unique:this.data.unique,
});
}
},
//
checkboxChange(n) {
console.log('change', n);
this.data.unique=n
},
radioChange(n){
console.log(n);
this.data.product_id=n.product_id
console.log(this.data);
},
//
jumpAddGoods() {
const data = getStorage('addGoodsFormData');
@ -172,11 +290,16 @@
}
})
}
navigateTo(1, '/pages/product/addGoods/index', { mer_id: this.mer_id });
navigateTo(1, '/pages/product/addGoods/index', {
mer_id: this.mer_id
});
},
// swiper
swiperChange(e) {
let { current, source } = e.detail;
let {
current,
source
} = e.detail;
if (source === 'touch') {
// source swiperchangeautoplaytouchcurrentbug
this.swiperCur = e.detail.current;
@ -189,6 +312,7 @@
productLstApi(mer_id, that.where).then(
res => {
that.loading = false;
that.loaded = res.data.list.length < that.where.limit;
that.productList.push.apply(that.productList, res.data.list);
that.where.page = that.where.page + 1;
@ -217,7 +341,10 @@
removeStorage(item);
}
});
navigateTo(1, '/pages/product/addGoods/index', { mer_id: item.mer_id, product_id: item.product_id });
navigateTo(1, '/pages/product/addGoods/index', {
mer_id: item.mer_id,
product_id: item.product_id
});
},
handleRecycle(item, index) {
let that = this;
@ -261,7 +388,9 @@
//
onAndOff(item, status) {
let that = this;
productOffApi(that.mer_id, item.product_id, { status: status }).then((res) => {
productOffApi(that.mer_id, item.product_id, {
status: status
}).then((res) => {
that.$util.Tips({
title: res.message,
icon: 'success'
@ -278,7 +407,9 @@
handleRecommend(item) {
let that = this
let is_good = item.is_good ? 0 : 1
productRecommendApi(that.mer_id, item.product_id, { is_good: is_good }).then((res) => {
productRecommendApi(that.mer_id, item.product_id, {
is_good: is_good
}).then((res) => {
that.$util.Tips({
title: res.message,
icon: 'success'
@ -528,7 +659,7 @@
}
.operation {
padding: 20upx 30upx;
padding: 20upx 10px;
background: #ffffff;
width: 100%;
border-radius: 0 0 10rpx 10rpx;
@ -556,4 +687,55 @@
}
}
}
.genduo {
display: flex;
justify-content: center;
align-items: center;
border: 1px solid #999999;
border-radius: 10px;
width: 30px;
height: 10px;
.gen_sel {
font-size: 12px
}
}
.popen{
margin: auto;
padding: 10px;
h4{
padding: 5px;
text-align: center;
}
.shuru{
display: flex;
justify-content: center;
align-items: center;
padding: 5px;
input{
border: 1px solid #999999;
padding-left: 3px;
margin-left: 3px;
}
}
.btn{
display: flex;
justify-content: space-around;
align-items: center;
margin: 5px;
.btn_l{
padding: 5px;
width: 100px;
border-radius: 4px;
background-color: #999999;
}
.btn_r{
width: 100px;
padding: 5px;
border-radius: 4px;
border: 1px solid #999999;
}
}
}
</style>

View 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>

View File

@ -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 == 1"><text></text>{{ item.order.org_price}}</view>
</view>
<view class="total" v-if="item.credit_buy == 1">
实付
<view class="price" ><text></text>0.00</view>
</view>
</view>
</view>
</view>
@ -379,7 +384,11 @@
<view class="footer_count">
<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 class="coupon_price" v-if="couponData.total_coupon > 0">
优惠:¥ {{couponData.total_coupon}}
@ -524,13 +533,12 @@
value: 'offline',
title: '线下支付',
payStatus: 2,
},
{
},{
"name": "先货后款",
"icon": "tan-a-lujing17324",
value: 'creditBuy',
title: `结算周期30天 日利率0.05%`,
payStatus: this.$store.getters.globalData.yue_pay_status,
payStatus: '',
},
],
tagStyle: {
@ -801,6 +809,7 @@
getUserInfo() {
getUserInfo().then(res => {
this.userInfo = res.data
})
},
/*获取发票说明*/
@ -1060,6 +1069,13 @@
that.allow_address = res.data.allow_address
that.deliveryName = res.data.order_model == 0 ? '快递配送' : '虚拟发货'
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({
key: "invoice_Data",
success: function(res) {
@ -1181,7 +1197,7 @@
callback_key = res.data.result.pay_key,
jsConfig = res.data.result.config,
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;
uni.hideLoading();
switch (status) {
@ -1436,7 +1452,6 @@
this.virtualIndex = index;
},
SubOrder: function(e) {
console.log(this.active);
let that = this,
data = {};

View File

@ -241,7 +241,7 @@
<view class='totalPrice' v-else>{{item.orderNum || 0}}件商品总金额
<text class='money p-color'>{{item.pay_price}}</text>
</view>
<view class="totalPrice" v-if="item.activity_type == 98">
<view class="totalPrice" v-if="item.pay_type == 8 && item.status == 12">
共1件商品结算周期到期后付款100
</view>
@ -396,15 +396,8 @@
title: '可用余额:',
number: 0,
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_order_id: '',
@ -423,7 +416,7 @@
id: ''
},
//
activity_type:''
activity_type: ''
};
},
computed: {
@ -764,7 +757,6 @@
},
//
confirmOrder: function(item, index) {
this.show = true
this.shouhuo.id = item.order_id
this.shouhuo.index = index
@ -790,22 +782,22 @@
// }
// })
},
queding() {
queding() {
let that = this;
orderTake(this.shouhuo.id).then(res => {
orderTake(that.shouhuo.id).then(res => {
that.show = false
that.orderList.splice(that.shouhuo.index, 1);
that.getOrderData();
return that.$util.Tips({
title: '操作成功',
icon: 'success',
}, function() {
that.orderList.splice(this.shouhuo.index, 1);
that.getOrderData();
});
that.show=false
})
}).catch(err => {
return that.$util.Tips({
title: err
});
that.show=false
that.show = false
})
},
/*申请开票*/

View 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>

View File

@ -19,6 +19,7 @@
<view>协议规则</view>
<text class='iconfont icon-you'></text>
</view>
<!-- #ifdef MP -->
<view class='item acea-row row-between-wrapper' @click="Setting">
<view>隐私设置</view>

BIN
static/images/bg1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
static/images/bg2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -0,0 +1,2 @@
## 1.0.02022-09-29

View File

@ -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项目安装本组件
2vue中直接引用即可例如下面的例子 插槽可随意修改例如...
-->
<!-- 例如:
<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>

View 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"
}
}
}
}
}

View File

@ -0,0 +1 @@
# rudon-rowMenuDotDotDot-left

View File

@ -0,0 +1,2 @@
## 1.0.02022-09-05
模仿并改进uniapp官方ui的组件uni-data-select自定义显示插槽允许变量手册https://uniapp.dcloud.net.cn/component/uniui/uni-data-select.html

View File

@ -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项目安装本组件
2vue中直接引用即可例如下面的例子 插槽可随意修改例如...
-->
<!-- 例如:
<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>

View 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"
}
}
}
}
}

View File

@ -0,0 +1 @@
# rudon-rowMenuDotDotDot

View File

@ -0,0 +1,35 @@
## 1.0.62023-04-12
- 修复 微信小程序点击时会改变背景颜色的 bug
## 1.0.52023-02-03
- 修复 禁用时会显示清空按钮
## 1.0.42023-02-02
- 优化 查询条件短期内多次变更只查询最后一次变更后的结果
- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
## 1.0.32023-01-16
- 修复 不关联服务空间报错的问题
## 1.0.22023-01-14
- 新增 属性 `format` 可用于格式化显示选项内容
## 1.0.12022-12-06
- 修复 当where变化时数据不会自动更新的问题
## 0.1.92022-09-05
- 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
## 0.1.82022-08-29
- 修复 点击的位置不准确
## 0.1.72022-08-12
- 新增 支持 disabled 属性
## 0.1.62022-07-06
- 修复 pc端宽度异常的bug
## 0.1.5
- 修复 pc端宽度异常的bug
## 0.1.42022-07-05
- 优化 显示样式
## 0.1.32022-06-02
- 修复 localdata 赋值不生效的 bug
- 新增 支持 uni.scss 修改颜色
- 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
## 0.1.22022-05-08
- 修复 当 value 为 0 时选择不生效的 bug
## 0.1.12022-05-07
- 新增 记住上次的选项(仅 collection 存在时有效)
## 0.1.02022-04-22
- 初始化

View File

@ -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>

View 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"
}
}
}
}
}

View File

@ -0,0 +1,8 @@
## DataSelect 下拉框选择器
> **组件名uni-data-select**
> 代码块: `uDataSelect`
当选项过多时,使用下拉菜单展示并选择内容
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-select)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839