This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-04-10 17:05:24 +08:00
parent 64b7a52d22
commit 1f13c5daf4
8 changed files with 1022 additions and 878 deletions

View File

@ -427,6 +427,11 @@
@import 'static/css/style.scss';
//
* {
scrollbar-color: #e5e5e500 #f7f7f9 !important;
}
view {
box-sizing: border-box;
}

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

@ -211,7 +211,6 @@
</view>
</uni-popup>
</view>
</view>
</template>
@ -252,9 +251,6 @@
this.mer_id = user.service.mer_id;
this.getSubsidy();
this.getSubsidyRecord();
// this.$nextTick(res=>{
// this.$refs.pupRef.open();
// })
},
onShow() {},
methods: {

View File

@ -117,9 +117,10 @@
获取地址
</view>
</view> -->
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>提货点营业日期:</view>
<view class="week_box">
<view class="week_item" v-for="(item,index) in dateWeek" :key="index" @click="sel(item,index)">
<view class="week_item" v-for="(item,index) in dateWeek" :key="index" @click="sel(index)">
<view class="date_week" :class="item.isCheck ? 'date_week_a' : ''">
{{ item.name }}
</view>
@ -284,7 +285,6 @@
id: 7,
isCheck: true
}],
selarr: [1, 2, 3, 4, 5, 6, 7],
mer_take_time: ['08:00', '18:00'],
beginTimeShow: false,
overTimeShow: false,
@ -340,15 +340,19 @@
this.takeName = res.data.mer_take_name
this.takePhone = res.data.mer_take_phone
this.detailSite = res.data.mer_take_address
// this.servicePhone = res.data.service_phone
this.servicePhone = res.data.mer_phone;
res.data.mer_take_location ? this.longLati = res.data.mer_take_location?.join(',') : null;
res.data.mer_take_day && res.data.mer_take_day.forEach((item, i) => {
this.dateWeek[Number(item) - 1].isCheck = true
})
this.selarr = res.data.mer_take_day;
//
if (res.data.mer_take_day && res.data.mer_take_day.length > 0) {
this.dateWeek.forEach(item => {
let day = res.data.mer_take_day.find(i => i == item.id);
if (day) item.isCheck = true;
else item.isCheck = false;
})
}
this.type_code = res.data.type_code
this.mer_take_time = res.data.mer_take_time
this.intro = res.data.mer_info
@ -385,20 +389,13 @@
//
change(e) {
this.credit_buy = e
console.log(e);
},
//
sel(item, i) {
if (item.isCheck == false) {
item.isCheck = true;
this.selarr.push(String(item.id));
} else {
item.isCheck = false;
this.selarr = this.selarr.filter(id => {
return id != item.id
})
}
sel(i) {
this.dateWeek[i].isCheck = !this.dateWeek[i].isCheck;
},
postMerchantUpdata() {
uni.showModal({
title: '确定提交吗',
@ -432,7 +429,7 @@
lat: this.latitude,
long: this.longitude,
mer_take_location: [this.latitude, this.longitude], //
mer_take_day: this.selarr, //
mer_take_day: [], //
mer_take_time: this.mer_take_time, //
mer_info: this.intro,
mer_keyword: this.cruxText,
@ -446,35 +443,27 @@
settle_cycle: this.settle_cycle,
interest_rate: this.interest_rate
}
//
this.dateWeek.map(i => {
if (i.isCheck) {
data.mer_take_day.push(i.id)
}
})
merchantUpdateAPI(data).then(res => {
Toast(res.message)
setTimeout(() => {
// uni.switchTab({
// url: '/pages/moreProject/moreProject',
// fail: (err) => {
// // console.log('err', err);
// }
// });
// uni.navigateTo({
// url:'/pages/moreProject/moreProject'
// })
// uni.redirectTo({
// url: '/pages/moreProject/moreProject'
// })
uni.navigateBack({
delta: 1
});
uni.navigateBack();
}, 1000)
}).catch(err => {
Toast(err)
})
},
selfLocation() {
selfLocation() {
uni.getLocation({
type: 'wgs84',
success: (res) => {
// console.log(res);
this.latitude = res.latitude.toString();
this.longitude = res.longitude.toString();
this.longLati = `${res.latitude},${res.longitude}`
@ -488,34 +477,8 @@
seleckImage(i) {
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
// console.log(res)
that.images[i].img = res.data.path
});
// let that = this
// uni.chooseImage({
// count: 1,
// sizeType: ['original', 'compressed'],
// sourceType: ['album', 'camera'],
// success: function(res) {
// uni.showLoading({
// title: '...'
// })
// console.log(res.tempFilePaths[0],'22222222');
// uploads(res.tempFilePaths[0], 'img').then(res => {
// console.log(res,'3333');
// that.images[i].img = res
// uni.hideLoading()
// }).catch(err => {
// Toast('')
// uni.hideLoading()
// })
// },
// fail: function(err) {
// Toast('')
// }
// });
},
seleckImageArr() {
let that = this;
@ -556,7 +519,6 @@
navTo(url) {
if (url == '/pages/select_address/select_address_n') {
uni.$once('changeAddress', (res) => {
// console.log('', res);
this.mer_address = res.formatted_addresses.recommend;
this.latitude = res.latitude;
this.longitude = res.longitude;
@ -570,8 +532,7 @@
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
}
}
</script>

View File

@ -5,25 +5,21 @@
<view class="title_search">
<span class="iconfont">&#xe67d;</span>
<form @submit="search" report-submit="true">
<input type="text" :name="where.keyword" v-model="where.keyword" placeholder="搜索商品" confirm-type='search'/>
<input type="text" :name="where.keyword" v-model="where.keyword" placeholder="搜索商品"
confirm-type='search' />
</form>
</view>
</view>
<view class="longTab">
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;" scroll-with-animation class="menu" :scroll-left="tabLeft" show-scrollbar="true">
<view
class="longItem"
:style="'width:' + isWidth + 'px'"
:data-index="index"
:class="index === tabClick ? 'click' : ''"
v-for="(item, index) in menuList"
:key="index"
:id="'id' + index"
@click="selectMenu(item, index)"
>
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;" scroll-with-animation
class="menu" :scroll-left="tabLeft" show-scrollbar="true">
<view class="longItem" :style="'width:' + isWidth + 'px'" :data-index="index"
:class="index === tabClick ? 'click' : ''" v-for="(item, index) in menuList" :key="index"
:id="'id' + index" @click="selectMenu(item, index)">
{{ item.name }}
</view>
<view v-if="menuList.length" class="underlineBox" :style="'transform:translateX(' + isLeft + 'px);width:' + isWidth + 'px'">
<view v-if="menuList.length" class="underlineBox"
:style="'transform:translateX(' + isLeft + 'px);width:' + isWidth + 'px'">
<view class="underline bg-color-white"></view>
</view>
</scroll-view>
@ -57,14 +53,23 @@
</view>
</view>
<view class="shop_list_item_handle">
<view v-if="item.is_show == 1 && item.status == 1 && type != 5" class="shop_button" @click="upperShelfAndLowerShelf(item, index)">下架</view>
<view v-if="item.is_show == 0 && item.status == 1 && type != 5" class="shop_button" @click="upperShelfAndLowerShelf(item, index)">上架</view>
<view class="shop_button" v-if="type != 1 && type != 3" @click="handleDelete(item, index)">删除</view>
<view v-if="item.is_show == 1 && item.status == 1 && type != 5" class="shop_button"
@click="upperShelfAndLowerShelf(item, index)">下架</view>
<view v-if="item.is_show == 0 && item.status == 1 && type != 5" class="shop_button"
@click="upperShelfAndLowerShelf(item, index)">上架</view>
<view class="shop_button" v-if="type != 1 && type != 3" @click="handleDelete(item, index)">
删除</view>
<view class="shop_button" v-if="type == 5" @click="reduction(item, index)">恢复</view>
<block v-if="type != 5">
<navigator v-if="mer_info.type_code=='PersonalStore'" :url="`/pages/product/addGood/addGood_one?mer_id=${merId}&product_id=${item.product_id}`" class="shop_button" hover-class="none">编辑</navigator>
<navigator v-else-if="mer_info.type_code=='TypeSupplyChain'" :url="`/pages/product/addGood/addGood_supply?mer_id=${merId}&product_id=${item.product_id}`" class="shop_button" hover-class="none">编辑</navigator>
<navigator v-else :url="`/pages/product/addGood/addGood?mer_id=${merId}&product_id=${item.product_id}`" class="shop_button" hover-class="none">编辑</navigator>
<navigator v-if="mer_info.type_code=='PersonalStore'"
:url="`/pages/product/addGood/addGood_one?mer_id=${merId}&product_id=${item.product_id}`"
class="shop_button" hover-class="none">编辑</navigator>
<navigator v-else-if="mer_info.type_code=='TypeSupplyChain'"
:url="`/pages/product/addGood/addGood_supply?mer_id=${merId}&product_id=${item.product_id}`"
class="shop_button" hover-class="none">编辑</navigator>
<navigator v-else
:url="`/pages/product/addGood/addGood?mer_id=${merId}&product_id=${item.product_id}`"
class="shop_button" hover-class="none">编辑</navigator>
</block>
</view>
</view>
@ -76,12 +81,24 @@
</template>
<script>
import { productLstApi, productTitle, productDeleteApi, productOffApi, productRestore, productDestory } from 'api/product.js';
import {
productLstApi,
productTitle,
productDeleteApi,
productOffApi,
productRestore,
productDestory
} from 'api/product.js';
import Loading from '@/components/Loading/index.vue';
import { Toast, Modal, navigateTo,getStorage, removeStorage } from 'libs/uniApi.js';
import {
Toast,
Modal,
navigateTo,
getStorage,
removeStorage
} from 'libs/uniApi.js';
export default {
components: {
@ -139,7 +156,10 @@ export default {
var that = this;
if (that.loading || that.loaded) return;
that.loading = true;
productLstApi(this.merId, { ...this.where, type: this.type }).then(
productLstApi(this.merId, {
...this.where,
type: this.type
}).then(
res => {
that.loading = false;
that.loaded = res.data.list.length < that.where.limit;
@ -200,7 +220,10 @@ export default {
reduction(item, index) {
Modal('温馨提示', `商品"${item.store_name}",将被还原,请问是否继续`).then(() => {
productRestore(this.merId, item.product_id).then(res => {
this.$util.Tips({ title: res.message, icon: 'success' });
this.$util.Tips({
title: res.message,
icon: 'success'
});
this.shopList.splice(index, 1);
});
});
@ -223,12 +246,17 @@ export default {
removeStorage(item);
}
});
navigateTo(1, '/pages/product/addGood/addGood', { mer_id: this.merId, type: 'edit', product_id: item.product_id, type: 'edit' });
navigateTo(1, '/pages/product/addGood/addGood', {
mer_id: this.merId,
type: 'edit',
product_id: item.product_id,
type: 'edit'
});
},
//
handleDelete(item, index) {
item.is_del == 1
? Modal('温馨提示', `商品"${item.store_name}"将被删除,请问是否继续?`).then(res => {
item.is_del == 1 ?
Modal('温馨提示', `商品"${item.store_name}"将被删除,请问是否继续?`).then(res => {
productDestory(this.merId, item.product_id)
.then(res => {
this.shopList.splice(index, 1);
@ -237,8 +265,8 @@ export default {
.catch(rej => {
Toast(`${rej}`);
});
})
: Modal('温馨提示', `商品"${item.store_name}"将被加入回收站,请问是否继续?`).then(res => {
}) :
Modal('温馨提示', `商品"${item.store_name}"将被加入回收站,请问是否继续?`).then(res => {
productDeleteApi(this.merId, item.product_id)
.then(res => {
this.shopList.splice(index, 1);
@ -252,9 +280,14 @@ export default {
//
upperShelfAndLowerShelf(obj, index) {
let status = obj.is_show == 1 ? 0 : 1;
productOffApi(this.merId, obj.product_id, { status: status })
productOffApi(this.merId, obj.product_id, {
status: status
})
.then(res => {
this.$util.Tips({ title: res.message, icon: 'success' });
this.$util.Tips({
title: res.message,
icon: 'success'
});
this.shopList.splice(index, 1);
})
.catch(err => {
@ -279,6 +312,7 @@ export default {
<style lang="scss" scoped>
@import './scss/index.scss';
.longTab {
display: flex;
width: 100%;
@ -288,6 +322,7 @@ export default {
/* #ifdef MP */
padding-top: 12rpx;
padding-bottom: 12rpx;
/* #endif */
.longItem {
height: 50upx;
@ -309,6 +344,7 @@ export default {
font-weight: bold;
font-size: 30rpx;
color: #e93323;
.underline {
opacity: 1;
}
@ -330,12 +366,14 @@ export default {
}
}
}
.title_search {
background: #f5f5f5;
border-radius: 30rpx;
height: 60rpx;
padding-left: 60rpx;
position: relative;
.iconfont {
position: absolute;
top: 50%;
@ -343,12 +381,14 @@ export default {
left: 30rpx;
font-size: 28rpx;
}
input {
height: 60rpx;
font-size: 26rpx;
margin-left: 20rpx;
}
}
.shop_button {
margin-left: 18rpx;
padding: 0 34rpx;
@ -362,6 +402,7 @@ export default {
font-size: 26rpx;
color: #999999;
}
.shop_list {
margin-top: 20rpx;
padding: 0 20rpx;
@ -371,20 +412,25 @@ export default {
background: #ffffff;
border-radius: 10px;
margin-bottom: 20rpx;
&_shop {
display: flex;
&_image,
uni-image {
width: 150rpx;
height: 150rpx;
border-radius: 16rpx;
position: relative;
image {
width: 150rpx;
height: 150rpx;
}
}
position: relative;
.spec {
color: #ffffff;
background: rgba(0, 0, 0, 0.5);
@ -398,6 +444,7 @@ export default {
bottom: 0;
right: 0;
}
&_con {
flex: 1;
display: flex;
@ -411,10 +458,12 @@ export default {
max-width: 500rpx;
padding-top: 4rpx;
}
&_message {
margin-top: 15rpx;
font-size: 22rpx;
color: #868686;
>span:nth-child(1) {
display: inline-block;
margin-right: 20rpx;
@ -423,17 +472,20 @@ export default {
&_price {
margin-top: 10rpx;
>span {
display: inline-block;
margin-right: 7rpx;
font-size: 30rpx;
color: #e93323;
}
>del {
color: #bebebe;
font-size: 26rpx;
}
}
.ot_price {
color: #bebebe;
font-size: 26rpx;
@ -442,9 +494,11 @@ export default {
}
}
}
&_handle {
display: flex;
justify-content: flex-end;
>view {
margin-left: 18rpx;
padding: 0 34rpx;

View File

@ -2,7 +2,9 @@
<view>
<view class="order-index" ref="container">
<view class="search">
<u-search :showAction="true" searchIcon="scan" actionText="搜索" v-model="keyword" :animation="true" :actionStyle="{color: '#fff'}" @search="keywordSearch" @custom="keywordSearch" :clearabled="false" @clickIcon="scanQRcodes"></u-search>
<u-search :showAction="true" searchIcon="scan" actionText="搜索" v-model="keyword" :animation="true"
:actionStyle="{color: '#fff'}" @search="keywordSearch" @custom="keywordSearch" :clearabled="false"
@clickIcon="scanQRcodes"></u-search>
</view>
<view class="header">
<div class="header_count">
@ -12,42 +14,18 @@
<block>
<swiper-item :class="{ active: 0 == swiperCur }">
<view class="slide-navigator">
<picker class="item"
mode="multiSelector"
:range="[menuList,menuCList]"
:range-key="'cate_name'"
@columnchange="columnchange"
@change="changeMenu"
@cancel="cancelMenu"
>
<picker class="item" mode="multiSelector" :range="[menuList,menuCList]"
:range-key="'cate_name'" @columnchange="columnchange" @change="changeMenu"
@cancel="cancelMenu">
<image mode='widthFix' class="image" src="@/static/images/daoru.png"></image>
<text class="text">分类筛选</text>
</picker>
<!-- <view class="item" hover-class='none' @click="jumpAddGoods">
<image mode='widthFix' class="image" src="../static/images/product_add.png">
</image>
<text class="text">添加商品</text>
</view> -->
<navigator class="item"
<!-- <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>
<text class="text">在售商品</text>
</navigator>
<!-- <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>
<text class="text">售罄商品</text>
</navigator>
<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>
<text class="text">回收站</text>
</navigator> -->
<navigator class="item"
:url="`/pages/product/storeClassification/index?mer_id=${mer_id}`"
@ -63,41 +41,30 @@
</image>
<text class="text">运费模板</text>
</navigator>
<!-- <navigator class="item"
:url="`/pages/users/online_warehousing/index?mer_id=${mer_id}&product_id=${data.product_id}&unique=${data.unique}&type=${mer_info.type_code}`"
hover-class='none'>
<image mode='widthFix' class="image" src="@/static/images/daoru.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/mulSpecification?mer_id=${mer_id}`"
hover-class='none'>
<image mode='widthFix' class="image"
src="../static/images/product_specification.png"></image>
<text class="text">规格模板</text>
</navigator>
</view>
</swiper-item> -->
</block>
</swiper>
</div>
</view>
<view class="wrapper">
<view class='product_list'>
<!-- <view class="menu_cls">
<u-scroll-list indicatorActiveColor='#FF6D20' :indicator="true">
<view class="menu_li" :class="{'menu_li_on': item.store_category_id==store_category_id}" @click="changeMerchant(item.store_category_id)" v-for="item,index in menuList"
:key="index">
<u--image class="image" :showLoading="true" :src="item.pic" width="87.62rpx" height="87.62rpx" shape="circle"
></u--image>
<view class="li_text" style="display: block;font-size: 26.29rpx;margin-top: 10rpx;">{{item.cate_name}}</view>
<view class="longTab">
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;" scroll-with-animation
class="menu" :scroll-left="tabLeft" show-scrollbar="true">
<view class="longItem" :style="'width:' + isWidth + 'px'" :data-index="index"
:class="index === tabClick ? 'click' : ''" v-for="(item, index) in tabList" :key="index"
:id="'id' + index" @click="selectMenu(item, index)">
{{ item.name }}
</view>
</u-scroll-list>
</view> -->
<view v-if="tabList.length" class="underlineBox"
:style="'transform:translateX(' + isLeft + 'px);width:' + isWidth + 'px'">
<view class="underline bg-color-white"></view>
</view>
</scroll-view>
</view>
<view class="wrapper">
<view class='product_list' v-if="productList && productList.length > 0">
<view v-for="(item,index) in productList" :key="index" style="position: relative;width: 100%;">
<view class='item' @click="yinc">
<view class='image'>
@ -117,7 +84,9 @@
<view class="stock_type" v-if="mer_info.type_code=='TypeSupplyChain'">
<view class="type_btn" v-for="lable in lableList" :key="lable.product_label_id"
@click="changeLable(item)"
:class="{'btn_a': lable.label_name=='现款现货'||item.mer_labels&&item.mer_labels.find(item=>item.product_label_id==lable.product_label_id)}">{{lable.label_name}}</view>
:class="{'btn_a': lable.label_name=='现款现货'||item.mer_labels&&item.mer_labels.find(item=>item.product_label_id==lable.product_label_id)}">
{{lable.label_name}}
</view>
</view>
<view class='money-wrap'>
<block v-if="mer_info.type_code=='TypeSupplyChain'">
@ -159,13 +128,9 @@
</view>
<view class="operation acea-row row-between-wrapper">
<view class="acea-row row-middle">
<!-- <view class="" class="bnt" @click="Fonline(item)" style="width:150rpx">
线上入库
</view> -->
<view class="" class="bnt" @click="Fline(item)" style="width:150rpx">
修改库存
</view>
<view v-if="item.is_show == 1 && item.status == 1" class="bnt"
@tap.stop="handleShelves(item,0)">下架
</view>
@ -173,17 +138,13 @@
@tap.stop="handleShelves(item),1">上架
</view>
<view @click="editGoods(item)" class="bnt">编辑</view>
<!-- <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>
</view>
</view>
<u-empty v-else text="暂无商品~" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
@ -220,7 +181,9 @@
<view class="stock_type" v-if="mer_info.type_code=='TypeSupplyChain'">
<view class="type_btn" v-for="lable in lableList" :key="lable.product_label_id"
@click="changeLableItem(lable)"
:class="{'btn_a': lableInfo&&lableInfo.mer_labels&&lableInfo.mer_labels.find(id=>id==lable.product_label_id)}">{{lable.label_name}}</view>
:class="{'btn_a': lableInfo&&lableInfo.mer_labels&&lableInfo.mer_labels.find(id=>id==lable.product_label_id)}">
{{lable.label_name}}
</view>
</view>
<view class="btn-box">
<button class="cal" @click="lableShow=false">取消</button>
@ -246,9 +209,12 @@
productDeleteApi,
productOffApi,
productRecommendApi,
productUpdateFree
productUpdateFree,
productTitle
} from "@/api/product";
import { labelLst } from "@/api/public.js";
import {
labelLst
} from "@/api/public.js";
import Loading from '@/components/Loading/index.vue';
import {
merstreet,
@ -282,7 +248,8 @@
where: {
page: 1,
limit: 20,
keyword: ''
keyword: '',
type: 1
},
menuList: [], //
menuCList: [], //
@ -320,18 +287,27 @@
id: '',
mer_labels: ''
}, //
keyword: ''
keyword: '',
isLeft: 0, //线
isWidth: 0, //
childIndex: 0,
tabList: [],
tabClick: '',
tabLeft: 0,
}
},
onLoad(options) {
// this.mer_id = options.mer_id;
this.getUserInfo()
getCategoryListLevel({
type: 2
}).then(res => {
this.menuList = res.data;
this.menuCList = res.data[0].children;
})
this.getCategoryList();
var that = this;
//
uni.getSystemInfo({
success(e) {
that.isWidth = e.windowWidth / 5;
}
});
},
onPullDownRefresh() {
this.where.page = 1
@ -342,7 +318,6 @@
uni.stopPullDownRefresh()
},
onReachBottom() {
// console.log(this.status, '222222222')
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
@ -350,6 +325,55 @@
},
methods: {
//
getCategoryList() {
getCategoryListLevel({
type: 2
}).then(res => {
this.menuList = res.data;
this.menuCList = res.data[0].children;
});
},
//
getProductTitle() {
productTitle(this.mer_id).then(res => {
this.tabList = res.data;
let clickIndex = 0;
this.tabList.forEach((item, index) => {
if (item.type == this.type) {
clickIndex = index;
}
});
this.setMenuLeft(clickIndex);
});
},
//
selectMenu(item, index) {
this.where.type = item.type;
this.loading = this.loaded = false;
this.where.page = 1;
this.shopList = [];
this.setMenuLeft(index);
},
/*导航栏移动位置*/
setMenuLeft(index) {
this.childIndex = 0;
if (this.menuList.length > 5) {
var tempIndex = index - 2;
tempIndex = tempIndex <= 0 ? 0 : tempIndex;
let tabLeft = (index - 2) * this.isWidth; //线
this.$nextTick(function() {
this.$set(this, 'tabLeft', tabLeft);
});
}
this.tabClick = index; //
this.isLeft = index * this.isWidth; //线
this.getList(this.mer_id, true);
},
/**
* 获取个人用户信息
*/
@ -358,17 +382,22 @@
this.mer_id = res.data.service.mer_id;
this.mer_info = res.data.mer_info;
this.initLable();
this.getList(res.data.service.mer_id, true);
// this.getList(res.data.service.mer_id, true);
//
this.getProductTitle();
}).catch(res => {
console.log(res)
})
},
//
keywordSearch() {
this.loaded = false;
this.where.keyword = this.keyword;
this.getList(this.mer_id, true);
},
//
scanQRcodes() {
uni.scanCode({
@ -379,6 +408,7 @@
}
})
},
//
initLable() {
labelLst({
@ -387,6 +417,7 @@
this.lableList = res.data.list;
})
},
//
changeLable(item) {
this.lableInfo.id = item.product_id;
@ -397,6 +428,7 @@
if (this.lableInfo.mer_labels.length == 0) this.lableInfo.mer_labels = [4];
this.lableShow = true;
},
changeLableItem(item) {
if (item.product_label_id == 4) return Toast('该项必须勾选'); //
const index = this.lableInfo.mer_labels.indexOf(+item.product_label_id);
@ -408,6 +440,7 @@
this.lableInfo.mer_labels.push(+item.product_label_id);
}
},
//
updateLable() {
productUpdateFree(this.lableInfo.id, {
@ -426,36 +459,29 @@
item.mer_labels = arr;
}
})
// this.getList(this.mer_id, true);
}).catch(e => {
Toast(e)
this.lableShow = false;
})
},
menuActiona(item, index) {
if (item.is_good) {
this.options = [{
value: '1',
text: '取消推荐'
},
{
}, {
value: '2',
text: '预览'
},
]
}]
} else {
this.options = [{
value: '5',
text: '店铺推荐'
},
{
}, {
value: '2',
text: '预览'
},
]
}]
}
if (item.is_show == 0) {
this.options.push({
@ -464,22 +490,18 @@
})
}
this.ll++
// console.log(this.ll)
if (this.ll % 2 == 0) {
this.$set(this, 'num', -1);
this.ll = 0
} else {
this.num = index
}
},
yinc() {
this.$set(this, 'num', -1);
},
menuAction(action, rowId, item, index) {
menuAction(action, rowId, item, index) {
if (action.value == 2) {
uni.navigateTo({
url: `/pages/admin/goods_details/index?product_id=${item.product_id}&product_type=0`
@ -490,12 +512,12 @@
} else {
this.handleRecycle(item, index)
}
},
fnChange(e) {
this.optionVal = e
},
close() {
this.show = false
},
@ -514,9 +536,8 @@
unique: this.data.unique,
});
}
},
//线
Fline(item) {
navigateTo(1, '/pages/product/updateStock/updateStock', {
@ -530,17 +551,16 @@
})
})
},
//
creat() {
if (this.on_line == 1) {
if (this.data.spec_type == 1 && this.checkboxValue1 !== this.data.unique) {
this.show = false
this.$util.Tips({
title: '请选择规格'
})
}
else if (this.data.number < 1) {
} else if (this.data.number < 1) {
this.show = false
this.$util.Tips({
title: '入库数量不得小于一件'
@ -562,8 +582,7 @@
// let attr = obj.attrValue.find((item)=>item.unique==this.checkboxValue1);
// attr.stock = this.data.number;
// obj.attrValue = [attr];
}
else obj.attrValue[0].stock = this.data.number;
} else obj.attrValue[0].stock = this.data.number;
productUpdateFree(this.data.product_id, obj).then(res => {
this.data.unique = ''
this.data.product_id = ''
@ -590,7 +609,6 @@
}
}
if (this.on_line == 0) {
if (!this.data.product_id) {
this.show = false
this.$util.Tips({
@ -602,13 +620,10 @@
product_id: this.data.product_id,
unique: this.data.unique,
});
}
}
},
//
checkboxChange(n) {
this.data.unique = n;
@ -618,15 +633,18 @@
}
})
},
radioChange(n) {
this.data.product_id = n.product_id
},
//
jumpAddGoods() {
const data = getStorage('addGoodsFormData');
if (data && data.product_id) {
let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData',
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils'];
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils'
];
waitDeleteData.forEach(item => {
if (getStorage(item)) {
removeStorage(item);
@ -637,6 +655,7 @@
mer_id: this.mer_id
});
},
// swiper
swiperChange(e) {
let {
@ -648,6 +667,7 @@
this.swiperCur = e.detail.current;
}
},
getList: function(mer_id, ispage) {
var that = this;
if (that.loading || that.loaded) return;
@ -674,23 +694,8 @@
}
);
},
editGoods(item) {
// let waitDeleteData = [
// 'addGoodsFormData',
// 'singleSpecification',
// 'attrValue',
// 'modifyPriceData',
// 'addGoodsSecoundData',
// 'goodsDis',
// 'editGoodsDetils',
// 'canChange',
// 'canChangeSecound'
// ];
// waitDeleteData.forEach(item => {
// if (getStorage(item)) {
// removeStorage(item);
// }
// });
let url = '/pages/product/addGood/addGood';
if (this.mer_info.type_code == 'PersonalStore') url = '/pages/product/addGood/addGood_one';
if (this.mer_info.type_code == 'TypeSupplyChain') url = '/pages/product/addGood/addGood_supply';
@ -699,6 +704,7 @@
product_id: item.product_id
});
},
handleRecycle(item, index) {
let that = this;
Modal('温馨提示', `商品"${item.store_name}"将被加入回收站,请问是否继续?`).then(res => {
@ -794,7 +800,8 @@
}
},
changeMenu(e) {
let cate_id = this.menuList[e.detail.value[0]].children[e.detail.value[1]]||this.menuList[e.detail.value[0]]||'';
let cate_id = this.menuList[e.detail.value[0]].children[e.detail.value[1]] || this.menuList[e.detail.value[
0]] || '';
this.$set(this, 'cate_id', JSON.parse(JSON.stringify(cate_id)));
this.loading = false;
this.loaded = false;
@ -817,6 +824,53 @@
background-color: #F5F5F5;
}
.longTab {
display: flex;
width: 100%;
.longItem {
height: 50upx;
display: inline-block;
line-height: 50upx;
text-align: center;
font-size: 30rpx;
color: #8f6262;
max-width: 160rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
overflow-x: scroll;
overflow-y: hidden;
/*解决ios上滑动不流畅*/
-webkit-overflow-scrolling: touch;
&.click {
font-weight: bold;
font-size: 30rpx;
color: #e93323;
.underline {
opacity: 1;
}
}
}
.underlineBox {
height: 3px;
width: 20%;
display: flex;
align-content: center;
justify-content: center;
transition: 0.5s;
.underline {
width: 60rpx;
height: 4rpx;
background-color: #e93323;
}
}
}
.muau-header {
margin-top: 20rpx;
@ -828,7 +882,6 @@
box-shadow: 0 0 7px #a3a3a3;
.muau {
height: 40rpx;
width: 160rpx;
text-align: center;
@ -838,9 +891,7 @@
view:hover {
color: red
}
}
}
.order-index {
@ -913,7 +964,7 @@
.header {
padding-top: 30rpx;
margin: 0 20rpx;
margin: 0 20rpx 20rpx;
.header_count {
width: 710rpx;
@ -1045,12 +1096,14 @@
font-size: 20rpx;
color: #868686;
flex-wrap: wrap;
.type_btn {
border: 2rpx solid #868686;
margin-right: 15rpx;
padding: 2rpx 10rpx 3rpx 10rpx;
border-radius: 40rpx;
}
.btn_a {
border: 2rpx solid #F84221;
color: #F84221;
@ -1168,6 +1221,7 @@
padding: 5px;
width: 80%;
margin: 0 auto;
&>view {
flex-shrink: 0;
}
@ -1205,6 +1259,7 @@
}
}
}
.menu_cls {
background-color: white;
// height: 199.77rpx;
@ -1224,11 +1279,13 @@
align-items: center;
min-width: 140rpx;
height: auto;
// width: 120rpx;
// display: inline-block;
.image {
border: 5rpx solid #fff;
}
.li_text {
flex: 1;
width: 100%;
@ -1239,11 +1296,13 @@
padding: 1rpx 10rpx 4rpx 10rpx;
}
}
.menu_li_on {
.image {
border: 5rpx solid #ff6d20;
border-radius: 50%;
}
.li_text {
background-color: #ff6d20;
border-radius: 2em;
@ -1253,16 +1312,19 @@
}
}
.lable-popup {
width: 600rpx;
border-radius: 14rpx;
background-color: #fff;
padding: 28rpx;
.stock_type {
display: flex;
flex-wrap: wrap;
margin-top: 28rpx;
font-size: 28rpx;
.type_btn {
padding: 8rpx 20rpx 10rpx 20rpx;
border: 2rpx solid #898989;
@ -1270,27 +1332,33 @@
margin: 0 10rpx;
margin-bottom: 15rpx;
}
.btn_a {
border: 2rpx solid #F84221;
color: #F84221;
}
}
.btn-box {
display: flex;
justify-content: flex-end;
margin-top: 30rpx;
.pra, .cal{
.pra,
.cal {
font-size: 28rpx;
background-color: #ff6d20;
color: #FFF;
padding: 10rpx 40rpx;
}
.cal {
background-color: #999999;
margin-right: 40rpx;
}
}
}
.search {
width: 710rpx;
margin: 0 auto;

View File

@ -194,6 +194,18 @@
</view>
</view>
</u-action-sheet>
<!-- 自定义弹框显示 -->
<u-transition :show="modalShow">
<view class="modal-wrap">
<view class="modal">
<view>认证失败</view>
<view>请检查姓名,身份证,银行卡,手机号码是否正确</view>
<view>当日剩余认证次数({{errorCount}})</view>
</view>
</view>
</u-transition>
</view>
</template>
@ -208,6 +220,7 @@
export default {
data() {
return {
modalShow: false,
list: [],
show: false,
bankList: [], //
@ -226,7 +239,8 @@
icon: ''
},
mer_id: '',
isCompany: ''
isCompany: '',
errorCount: 0
}
},
@ -237,6 +251,7 @@
}
if (opt.mer_id) {
this.mer_id = opt.mer_id;
if (opt.hasOwnProperty('isOwn') && (opt.isOwn === 0 || opt.isOwn == '0')) {
this.list = [{
name: '对公账户'
@ -374,9 +389,12 @@
title: '请输入正确的手机号!'
});
}
let that = this;
uni.showLoading({
title: "绑定中..."
})
addBank(this.mer_id, this.bindForm).then(res => {
uni.hideLoading()
this.$util.Tips({
title: '提交成功,请等待后台审核!'
}, () => {
@ -385,11 +403,20 @@
})
});
}).catch(err => {
uni.hideLoading()
if (isNaN(err)) {
uni.showToast({
title: err,
duration: 3000,
icon: "none"
icon: "none",
duration: 3000
})
} else {
this.errorCount = err;
that.modalShow = true;
setTimeout(() => {
that.modalShow = false;
}, 3000)
}
})
},
@ -678,4 +705,30 @@
}
}
}
.modal-wrap {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
pointer-events: none;
.modal {
font-size: 28rpx;
color: #fff;
padding: 20rpx 30rpx;
background: rgba(0, 0, 0, .7);
max-width: 60%;
border-radius: 10rpx;
view {
line-height: 32rpx;
margin-bottom: 10rpx;
}
}
}
</style>

View File

@ -54,7 +54,7 @@
</view>
<view class="audit-info-txt" v-if="item.is_check == 2">审核不通过{{item.fail_msg}}</view>
<view style="text-align: right;color:#46B03A;font-weight: bold;" v-if="item.is_check == 2"
@click="handleToUpdate(item.id)">
@click="handleToUpdate(item)">
去修改
</view>
</view>
@ -97,9 +97,16 @@
methods: {
//
handleToUpdate(id) {
handleToUpdate(item) {
// , is_company =0
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
if (isCompany != 1 && item.is_own === 0) return;
let strUrl = "?mer_id=" + this.mer_id;
strUrl += "&id=" + item.id
uni.redirectTo({
url: "/pages/withdrawal/add?id=" + id
url: "/pages/withdrawal/add" + strUrl
})
},