This commit is contained in:
weipengfei 2024-01-05 19:02:17 +08:00
parent a98ecdd0f1
commit c41e3faacd
13 changed files with 87 additions and 44 deletions

View File

@ -45,8 +45,11 @@
<view class="m_title num">
<view>购买数量</view>
<view class="input">
<view v-if="once_min_count>1" class="min-count">
({{once_min_count}}件起购)
</view>
<view class="input_item sub" @click="subCartNum">-</view>
<input class="input_item input_view" v-model="cart_num" type="number" @input="inputCartNum" />
<input class="input_item input_view" v-model="cart_num" type="number" @input="inputCartNum" @blur="inputCartNumBlur" />
<view class="input_item plus" @click="plusCartNum">+</view>
</view>
</view>
@ -56,7 +59,7 @@
</view>
</scroll-view>
<view class="button">
<view class="b_icon" @click="navgo('/pages/nongKe/supply_chain/shopping_trolley_a')">
<view class="b_icon" @click="navgo(source==12 ? '/pages/nongKe/supply_chain/shopping_trolley_other?source='+source : '/pages/nongKe/supply_chain/shopping_trolley_a')">
<image src="@/static/images/icon/car.png"></image>
<view>采购车</view>
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
@ -106,6 +109,7 @@
cart_num: 1, //
goodsNum: 0, //
current: 0, //
once_min_count: 1, //
};
},
mounted() {
@ -134,6 +138,10 @@
this.sku = res.data.sku||{};
this.sku_key_list = Object.keys(this.sku);
this.attr = res.data.attr;
if(res.data.once_min_count>1){
this.cart_num = res.data.once_min_count;
this.once_min_count = res.data.once_min_count;
}
if(this.attr.length>0){
this.attr.forEach((item, index)=>{
this.changeAttr(index, 0);
@ -163,12 +171,24 @@
})
}
},
//
inputCartNumBlur(e){
if(+e.detail.value < this.once_min_count){
uni.showToast({
icon: 'none',
title: `至少要买${this.once_min_count}件哦`
})
this.$u.sleep(500).then(()=>{
this.cart_num = this.once_min_count;
})
}
},
//
subCartNum() {
if (this.cart_num <= 1) {
if (this.cart_num <= this.once_min_count) {
return uni.showToast({
icon: 'none',
title: '最少要买一件哦'
title: `最少要买${this.once_min_count}件哦`
})
}
this.cart_num--;
@ -217,6 +237,7 @@
//
addcart() {
// return console.log(this.sku[this.changeSkuKey]);
if(this.cart_num<this.once_min_count) return Toast(`至少要购买${this.once_min_count}件哦`);
if(!this.sku[this.changeSkuKey]) return Toast('该规格有错误, 请选择其他规格');
if(+this.sku[this.changeSkuKey].procure_price * +this.cart_num<=0) return Toast('无法购买价格小于等于0的商品');
if (this.sku[this.changeSkuKey]) {
@ -425,6 +446,12 @@
align-items: center;
height: 48rpx;
.min-count{
font-size: 26rpx;
margin-right: 20rpx;
color: #F84221;
}
.input_item {
width: 44rpx;
height: 44rpx;

View File

@ -9,8 +9,8 @@ let httpApiThree
let wsApi
// 在打包之前请检查当前环境是否正确
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'dev'; // 开发
const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
switch (env) {

View File

@ -2,8 +2,8 @@
"name" : "惠农商户平台",
"appid" : "__UNI__1EE148C",
"description" : "",
"versionName" : "1.0.4",
"versionCode" : 104,
"versionName" : "1.0.6",
"versionCode" : 106,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -794,7 +794,7 @@
{
"path": "order_list/indexOther",
"style": {
"navigationBarTitleText": "账订单"
"navigationBarTitleText": "账订单"
}
},
{

View File

@ -96,7 +96,8 @@
<view v-else class="list">
<view class="item" v-for="(item, index) in list" :key="index">
<view class="order-num acea-row row-middle">
<text v-if="item.activity_type != 0" class="activity_type">
<text class="cloud-tag" v-if="item.source==103">云商品</text>
<text v-else-if="item.activity_type != 0" class="activity_type">
{{ item.activity_type == 1 ? '秒杀' : item.activity_type == 2 ? '预售' : item.activity_type == 3 ? '助力' : item.activity_type == 4 ? '拼团' : item.activity_type == 10 ? '套餐' :'' }}
</text>
订单号{{ item.order_sn }}
@ -1028,4 +1029,13 @@
align-items: center;
justify-content: center;
}
.cloud-tag{
font-size: 20rpx;
padding: 2rpx 5rpx;
font-weight: 400;
background-color: #ff4c3c;
border-radius: 8rpx;
margin-right: 6rpx;
color: #fff;
}
</style>

View File

@ -71,7 +71,7 @@
</view>
<view class="content-tools" style="margin-top: 30rpx;" v-if="$store.state.app.userInfo&&$store.state.app.userInfo.mer_info&&$store.state.app.userInfo.mer_info.type_code=='TypeSupplyChain'">
<view class="tools-one" style="margin-bottom: 20rpx;">
账订单
账订单
<view class=""></view>
</view>
<view class="content-order" >
@ -94,7 +94,7 @@
常用工具
<view class=""></view>
</view>
<view class="tools-two" v-if="isgShow&&userInfoData.mer_info.type_code=='TypeSupplyChain'">
<view class="tools-two" v-if="isgShow&&userInfoData.mer_info.setting_status==1&&userInfoData.mer_info.type_code=='TypeSupplyChain'">
<view class="" v-for="(item,k) in typelistSupplyChain" :key='k' @click="navation(item)">
<view class="tools-two-img">
<image :src="item.image" mode=""></image>
@ -367,12 +367,12 @@
</view> -->
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">{{userInfoData.mer_info&&userInfoData.mer_info.is_company?"银行卡图片:":"开户凭证:"}}</text>
<text class="item-name">{{userInfoData.mer_info&&userInfoData.mer_info.is_company?"开户凭证:":"银行卡图片:"}}</text>
</view>
<view class="item-card">
<view class="item-carda" @click='uploadpic({type:3})' v-if='merchantData.bank_front.length==0'>
<image v-if="userInfoData.mer_info&&userInfoData.mer_info.is_company" src="@/static/images/YHKZ.png" mode="aspectFit"></image>
<image v-else src="@/static/images/KHPZ.png" mode="aspectFit"></image>
<image v-if="userInfoData.mer_info&&userInfoData.mer_info.is_company" src="@/static/images/KHPZ.png" mode="aspectFit"></image>
<image v-else src="@/static/images/YHKZ.png" mode="aspectFit"></image>
</view>
<view class="item-carda" @click='DelPic({type:3})' v-else>
<image :src="merchantData.bank_front" mode="aspectFit"></image>
@ -914,7 +914,7 @@ import { Toast } from '../../libs/uniApi';
});
if (value.bank_front.length == 0) return that.$util.Tips({
title: that.userInfoData.mer_info.is_company ? '请上传银行卡正面图片' : '请上传开户凭证'
title: that.userInfoData.mer_info.is_company ? '请上传开户凭证' : '请上传银行卡正面图片'
});
// if (value.bank_back.length == 0) return that.$util.Tips({
@ -1096,7 +1096,7 @@ import { Toast } from '../../libs/uniApi';
this.userInfoData = res.data;
this.$store.commit('SET_USERINFO', res.data);
this.merchantData.phone = res.data.phone;
if(res.data.mer_info.is_company==0) this.merchantData.company_name = "";
if(res.data.mer_info.is_company==0) !this.merchantData.company_name ? this.merchantData.company_name = "" : null;
else this.merchantData.company_name = res.data.mer_info.company_name;
if (res.data.service == null) {
// console.log('123');
@ -1584,6 +1584,9 @@ import { Toast } from '../../libs/uniApi';
-webkit-align-items: center;
align-items: center;
padding-left: 2px;
input{
flex: 1;
}
}
.acea-row.row-column {

View File

@ -157,7 +157,7 @@
</view>
<view class="examine" @click="navigator('/pages/users/order_list/indexOther?status=-1&product_type=98&source=12')">
<image class="icon_img" src="@/static/images/index13.png" mode="aspectFit"></image>
<text class="text">账订单</text>
<text class="text">账订单</text>
</view>
<view class="examine" @click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/index10.png" mode="aspectFit">
@ -208,12 +208,12 @@
<text class="text">押金缴纳</text>
</view>
<view v-if="no_prod" class="examine" @click="navigator(`/pages/users/trading_hall/index?mer_id=${mer_id}`)">
<view v-if="false && no_prod" class="examine" @click="navigator(`/pages/users/trading_hall/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/index16.png" mode="aspectFit">
</image>
<text class="text">交易大厅</text>
</view>
<view v-if="no_prod" class="examine" @click="navigator(`/pages/commissionedSales/initiateDelegation/index`)">
<view v-if="false && no_prod" class="examine" @click="navigator(`/pages/commissionedSales/initiateDelegation/index`)">
<image class="icon_img" src="@/static/images/index13.png" mode="aspectFit">
</image>
<text class="text">委托销售</text>
@ -223,22 +223,22 @@
</image>
<text class="text">委托订单</text>
</view> -->
<view v-if="no_prod" class="examine" @click="navigator(`/pages/releaseManagement/index?mer_id=${mer_id}`)">
<view v-if="false && no_prod" class="examine" @click="navigator(`/pages/releaseManagement/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/index15.png" mode="aspectFit">
</image>
<text class="text">发布管理</text>
</view>
<view v-if="no_prod && userInfoData.mer_info.type_code === 'TypeTownSupplyChain'" class="examine" @click="navigator(`/pages/wholesale/wholesale/wholesale`)">
<view v-if="false && no_prod && userInfoData.mer_info.type_code === 'TypeTownSupplyChain'" class="examine" @click="navigator(`/pages/wholesale/wholesale/wholesale`)">
<image class="icon_img" src="@/static/images/index15.png" mode="aspectFit">
</image>
<text class="text">供应链批发</text>
</view>
<view v-if="no_prod && userInfoData.mer_info.type_code === 'TypeTownSupplyChain'" class="examine" @click="navigator(`/pages/replace_replenishment/replace`)">
<view v-if="false && no_prod && userInfoData.mer_info.type_code === 'TypeTownSupplyChain'" class="examine" @click="navigator(`/pages/replace_replenishment/replace`)">
<image class="icon_img" src="@/static/images/index15.png" mode="aspectFit">
</image>
<text class="text">代发订单</text>
</view>
<view v-if="no_prod && userInfoData.mer_info.type_code === 'TypeTownSupplyChain'" class="examine" @click="navigator(`/pages/replace_replenishment/replenishment`)">
<view v-if="false && no_prod && userInfoData.mer_info.type_code === 'TypeTownSupplyChain'" class="examine" @click="navigator(`/pages/replace_replenishment/replenishment`)">
<image class="icon_img" src="@/static/images/index15.png" mode="aspectFit">
</image>
<text class="text">补货订单</text>
@ -561,7 +561,6 @@ import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import emptyPage from '@/components/emptyPage.vue';
import zbpSwiper from '@/components/zbpSwiper'
import {
mapGetters
} from 'vuex'
import {
@ -586,7 +585,7 @@ import {
merchant,
paymerchant
} from '@/api/api.js'
import { ENV } from "@/config/app.js"
export default {
components: {
mTabbar,
@ -643,6 +642,7 @@ export default {
onLoad () {
this.Fheight = uni.getSystemInfoSync().windowHeight + 'px';
console.log(this.Fheight)
if(ENV!='prod') this.no_prod = true;
},
onShow () {
if (this.isLogin) {

View File

@ -328,7 +328,7 @@
async onLoad(options) {
// console.log(options);
this.storeParam.sys_labels = options.value;
if(options.value==12)this.nav_title = '赊账进货'
if(options.value==12)this.nav_title = '线下支付'
this.tips = options.tips;
let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string') this.userInfoData = JSON.parse(userInfo);

View File

@ -7,8 +7,8 @@
<view class='item'><text class='iconfont icon-xuanzhong'></text>售后无忧</view>
</view> -->
<view class='labelNav acea-row row-around row-middle row-between-wrapper btn-nav'>
<view class='item_btn'>现款现货</view>
<view class='item_btn'>赊账进货</view>
<view class='item_btn'>线上付款</view>
<view class='item_btn'>线下付款</view>
<view class='item_btn'>线上铺货</view>
<view class='item_btn'>线下铺货</view>
</view>

View File

@ -48,8 +48,8 @@
<text class="iconfont icon-xiala1"></text>
</view>
<view v-if="goods.product.once_max_count>0 && goods.product.once_min_count>0" class="buy_limit">
<text v-if="goods.product.once_min_count>0">{{goods.product.once_min_count}}件起购</text><text
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
<text v-if="goods.product.once_min_count>0">{{goods.product.once_min_count}}件起购</text><text
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view>
<view class='money acea-row row-middle'>
<text>{{goods.productAttr.procure_price}}</text>
@ -59,7 +59,7 @@
</view>
</view>
<view class='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>-</view>
<view class="reduce" :class="goods.numSub || goods.cart_num <= goods.product.once_min_count ? 'on' : ''" @click.stop='subCart(goods)'>-</view>
<view class='num'>{{goods.cart_num}}</view>
<view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+</view>
</view>
@ -650,6 +650,7 @@
//
subCart(goods) {
let status = false;
if (goods.cart_num <= goods.product.once_min_count) return Toast(`${goods.product.once_min_count}件起购哦`);
if (goods.cart_num < 1) status = true;
if (goods.cart_num <= 1) {
goods.cart_num = 1;

View File

@ -59,7 +59,7 @@
</view>
</view>
<view class='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>-</view>
<view class="reduce" :class="goods.numSub || goods.cart_num <= goods.product.once_min_count ? 'on' : ''" @click.stop='subCart(goods)'>-</view>
<view class='num'>{{goods.cart_num}}</view>
<view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+</view>
</view>
@ -652,6 +652,7 @@
//
subCart(goods) {
let status = false;
if (goods.cart_num <= goods.product.once_min_count) return Toast(`${goods.product.once_min_count}件起购哦`);
if (goods.cart_num < 1) status = true;
if (goods.cart_num <= 1) {
goods.cart_num = 1;

View File

@ -6,7 +6,7 @@
<view class='picTxt acea-row row-between-wrapper'>
<view class='text'>
<view class='name'>账订单信息</view>
<view class='name'>账订单信息</view>
<view>总订单{{orderData.orderCount || 0}} 总金额{{orderData.orderPrice || 0}}</view>
</view>
<view class='pictrue'>

View File

@ -21,11 +21,11 @@
<view class="con_kuo"
v-for="(item, index) in list"
:key="item.value"
@click="navigator(`/pages/nongKe/cloud_entrepot/${item.name=='现款现货'?'indexb':'indexOther'}?type_id=12&value=${item.value}&tips=${item.content}`)">
@click="navigator(`/pages/nongKe/cloud_entrepot/${item.name=='线上支付'?'indexb':'indexOther'}?type_id=12&value=${item.value}&tips=${item.content}`)">
<image class="con_img" :src="item.bg" mode=""></image>
<view class="con_text">
<h3>{{item.name}}</h3>
<view>{{item.content}}</view>
<view class="tips">{{item.content}}</view>
</view>
<image class="con_ico" :src="item.icon" mode=""></image>
</view>
@ -61,14 +61,14 @@
item.content = '先售利润 后结货款';
item.icon = "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/0c441202312251013392852.png";
}
if(item.name=='现款现货'){
if(item.name=='线上支付'){
item.bg = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f4521202312151148087081.png';
item.content = '先付款 后发货';
item.content = '手续费0.6%';
item.icon = "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/0a377202312251014023667.png";
}
if(item.name=='赊账进货'){
if(item.name=='线下支付'){
item.bg = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/899a4202312151148319478.png';
item.content = '先发货 后付款';
item.content = '手续费0';
item.icon = "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/6a23e202312251014183019.png";
}
})
@ -121,8 +121,9 @@
top: 50%;
transform: translateY(-50%);
color: white;
view{
.tips{
margin-top: 12rpx;
font-size: 26rpx;
}
}
}