This commit is contained in:
parent
64b7a52d22
commit
1f13c5daf4
5
App.vue
5
App.vue
|
@ -427,6 +427,11 @@
|
||||||
@import 'static/css/style.scss';
|
@import 'static/css/style.scss';
|
||||||
|
|
||||||
|
|
||||||
|
// 全局取消滚动条
|
||||||
|
* {
|
||||||
|
scrollbar-color: #e5e5e500 #f7f7f9 !important;
|
||||||
|
}
|
||||||
|
|
||||||
view {
|
view {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ let httpApiThree
|
||||||
let wsApi
|
let wsApi
|
||||||
|
|
||||||
// 在打包之前请检查当前环境是否正确
|
// 在打包之前请检查当前环境是否正确
|
||||||
// const env = 'dev'; // 开发
|
const env = 'dev'; // 开发
|
||||||
const env = 'prod'; // 生产
|
// const env = 'prod'; // 生产
|
||||||
// const env = 'prew'; // 预上线
|
// const env = 'prew'; // 预上线
|
||||||
|
|
||||||
switch (env) {
|
switch (env) {
|
||||||
|
|
|
@ -211,7 +211,6 @@
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -252,9 +251,6 @@
|
||||||
this.mer_id = user.service.mer_id;
|
this.mer_id = user.service.mer_id;
|
||||||
this.getSubsidy();
|
this.getSubsidy();
|
||||||
this.getSubsidyRecord();
|
this.getSubsidyRecord();
|
||||||
// this.$nextTick(res=>{
|
|
||||||
// this.$refs.pupRef.open();
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -117,9 +117,10 @@
|
||||||
获取地址
|
获取地址
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>提货点营业日期:</view>
|
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>提货点营业日期:</view>
|
||||||
<view class="week_box">
|
<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' : ''">
|
<view class="date_week" :class="item.isCheck ? 'date_week_a' : ''">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
|
@ -284,7 +285,6 @@
|
||||||
id: 7,
|
id: 7,
|
||||||
isCheck: true
|
isCheck: true
|
||||||
}],
|
}],
|
||||||
selarr: [1, 2, 3, 4, 5, 6, 7],
|
|
||||||
mer_take_time: ['08:00', '18:00'],
|
mer_take_time: ['08:00', '18:00'],
|
||||||
beginTimeShow: false,
|
beginTimeShow: false,
|
||||||
overTimeShow: false,
|
overTimeShow: false,
|
||||||
|
@ -340,15 +340,19 @@
|
||||||
this.takeName = res.data.mer_take_name
|
this.takeName = res.data.mer_take_name
|
||||||
this.takePhone = res.data.mer_take_phone
|
this.takePhone = res.data.mer_take_phone
|
||||||
this.detailSite = res.data.mer_take_address
|
this.detailSite = res.data.mer_take_address
|
||||||
// this.servicePhone = res.data.service_phone
|
|
||||||
this.servicePhone = res.data.mer_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_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.type_code = res.data.type_code
|
||||||
this.mer_take_time = res.data.mer_take_time
|
this.mer_take_time = res.data.mer_take_time
|
||||||
this.intro = res.data.mer_info
|
this.intro = res.data.mer_info
|
||||||
|
@ -385,20 +389,13 @@
|
||||||
//开启信用购
|
//开启信用购
|
||||||
change(e) {
|
change(e) {
|
||||||
this.credit_buy = e
|
this.credit_buy = e
|
||||||
console.log(e);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 选择营业日期
|
// 选择营业日期
|
||||||
sel(item, i) {
|
sel(i) {
|
||||||
if (item.isCheck == false) {
|
this.dateWeek[i].isCheck = !this.dateWeek[i].isCheck;
|
||||||
item.isCheck = true;
|
|
||||||
this.selarr.push(String(item.id));
|
|
||||||
} else {
|
|
||||||
item.isCheck = false;
|
|
||||||
this.selarr = this.selarr.filter(id => {
|
|
||||||
return id != item.id
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
postMerchantUpdata() {
|
postMerchantUpdata() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '确定提交吗',
|
title: '确定提交吗',
|
||||||
|
@ -432,7 +429,7 @@
|
||||||
lat: this.latitude,
|
lat: this.latitude,
|
||||||
long: this.longitude,
|
long: this.longitude,
|
||||||
mer_take_location: [this.latitude, 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_take_time: this.mer_take_time, // 提货时间
|
||||||
mer_info: this.intro,
|
mer_info: this.intro,
|
||||||
mer_keyword: this.cruxText,
|
mer_keyword: this.cruxText,
|
||||||
|
@ -446,35 +443,27 @@
|
||||||
settle_cycle: this.settle_cycle,
|
settle_cycle: this.settle_cycle,
|
||||||
interest_rate: this.interest_rate
|
interest_rate: this.interest_rate
|
||||||
}
|
}
|
||||||
|
// 营业时间
|
||||||
|
this.dateWeek.map(i => {
|
||||||
|
if (i.isCheck) {
|
||||||
|
data.mer_take_day.push(i.id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
merchantUpdateAPI(data).then(res => {
|
merchantUpdateAPI(data).then(res => {
|
||||||
Toast(res.message)
|
Toast(res.message)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// uni.switchTab({
|
uni.navigateBack();
|
||||||
// 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
|
|
||||||
});
|
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
Toast(err)
|
Toast(err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
selfLocation() {
|
|
||||||
|
|
||||||
|
selfLocation() {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// console.log(res);
|
|
||||||
this.latitude = res.latitude.toString();
|
this.latitude = res.latitude.toString();
|
||||||
this.longitude = res.longitude.toString();
|
this.longitude = res.longitude.toString();
|
||||||
this.longLati = `${res.latitude},${res.longitude}`
|
this.longLati = `${res.latitude},${res.longitude}`
|
||||||
|
@ -488,34 +477,8 @@
|
||||||
seleckImage(i) {
|
seleckImage(i) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$util.uploadImageOne('upload/image', function(res) {
|
that.$util.uploadImageOne('upload/image', function(res) {
|
||||||
// console.log(res)
|
|
||||||
that.images[i].img = res.data.path
|
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() {
|
seleckImageArr() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -556,7 +519,6 @@
|
||||||
navTo(url) {
|
navTo(url) {
|
||||||
if (url == '/pages/select_address/select_address_n') {
|
if (url == '/pages/select_address/select_address_n') {
|
||||||
uni.$once('changeAddress', (res) => {
|
uni.$once('changeAddress', (res) => {
|
||||||
// console.log('收到', res);
|
|
||||||
this.mer_address = res.formatted_addresses.recommend;
|
this.mer_address = res.formatted_addresses.recommend;
|
||||||
this.latitude = res.latitude;
|
this.latitude = res.latitude;
|
||||||
this.longitude = res.longitude;
|
this.longitude = res.longitude;
|
||||||
|
@ -570,8 +532,7 @@
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
},
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -5,25 +5,21 @@
|
||||||
<view class="title_search">
|
<view class="title_search">
|
||||||
<span class="iconfont"></span>
|
<span class="iconfont"></span>
|
||||||
<form @submit="search" report-submit="true">
|
<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>
|
</form>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="longTab">
|
<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">
|
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;" scroll-with-animation
|
||||||
<view
|
class="menu" :scroll-left="tabLeft" show-scrollbar="true">
|
||||||
class="longItem"
|
<view class="longItem" :style="'width:' + isWidth + 'px'" :data-index="index"
|
||||||
:style="'width:' + isWidth + 'px'"
|
:class="index === tabClick ? 'click' : ''" v-for="(item, index) in menuList" :key="index"
|
||||||
:data-index="index"
|
:id="'id' + index" @click="selectMenu(item, index)">
|
||||||
:class="index === tabClick ? 'click' : ''"
|
|
||||||
v-for="(item, index) in menuList"
|
|
||||||
:key="index"
|
|
||||||
:id="'id' + index"
|
|
||||||
@click="selectMenu(item, index)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</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 class="underline bg-color-white"></view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
@ -57,14 +53,23 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="shop_list_item_handle">
|
<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 == 1 && item.status == 1 && type != 5" class="shop_button"
|
||||||
<view v-if="item.is_show == 0 && item.status == 1 && type != 5" class="shop_button" @click="upperShelfAndLowerShelf(item, index)">上架</view>
|
@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 == 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>
|
<view class="shop_button" v-if="type == 5" @click="reduction(item, index)">恢复</view>
|
||||||
<block v-if="type != 5">
|
<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-if="mer_info.type_code=='PersonalStore'"
|
||||||
<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>
|
:url="`/pages/product/addGood/addGood_one?mer_id=${merId}&product_id=${item.product_id}`"
|
||||||
<navigator v-else :url="`/pages/product/addGood/addGood?mer_id=${merId}&product_id=${item.product_id}`" class="shop_button" hover-class="none">编辑</navigator>
|
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>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -76,14 +81,26 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 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 {
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
components: {
|
||||||
Loading
|
Loading
|
||||||
},
|
},
|
||||||
|
@ -122,7 +139,7 @@ export default {
|
||||||
|
|
||||||
onLoad(opt) {
|
onLoad(opt) {
|
||||||
let user = this.$store.state.app.userInfo;
|
let user = this.$store.state.app.userInfo;
|
||||||
if(typeof user == 'string') user = JSON.parse(user);
|
if (typeof user == 'string') user = JSON.parse(user);
|
||||||
this.mer_info = user.mer_info;
|
this.mer_info = user.mer_info;
|
||||||
this.merId = opt.mer_id;
|
this.merId = opt.mer_id;
|
||||||
this.getProductTitle();
|
this.getProductTitle();
|
||||||
|
@ -139,7 +156,10 @@ export default {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (that.loading || that.loaded) return;
|
if (that.loading || that.loaded) return;
|
||||||
that.loading = true;
|
that.loading = true;
|
||||||
productLstApi(this.merId, { ...this.where, type: this.type }).then(
|
productLstApi(this.merId, {
|
||||||
|
...this.where,
|
||||||
|
type: this.type
|
||||||
|
}).then(
|
||||||
res => {
|
res => {
|
||||||
that.loading = false;
|
that.loading = false;
|
||||||
that.loaded = res.data.list.length < that.where.limit;
|
that.loaded = res.data.list.length < that.where.limit;
|
||||||
|
@ -153,7 +173,7 @@ export default {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
search(){
|
search() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.loading = that.loaded = false;
|
that.loading = that.loaded = false;
|
||||||
that.where.page = 1;
|
that.where.page = 1;
|
||||||
|
@ -200,7 +220,10 @@ export default {
|
||||||
reduction(item, index) {
|
reduction(item, index) {
|
||||||
Modal('温馨提示', `商品"${item.store_name}",将被还原,请问是否继续`).then(() => {
|
Modal('温馨提示', `商品"${item.store_name}",将被还原,请问是否继续`).then(() => {
|
||||||
productRestore(this.merId, item.product_id).then(res => {
|
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);
|
this.shopList.splice(index, 1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -223,12 +246,17 @@ export default {
|
||||||
removeStorage(item);
|
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) {
|
handleDelete(item, index) {
|
||||||
item.is_del == 1
|
item.is_del == 1 ?
|
||||||
? Modal('温馨提示', `商品"${item.store_name}"将被删除,请问是否继续?`).then(res => {
|
Modal('温馨提示', `商品"${item.store_name}"将被删除,请问是否继续?`).then(res => {
|
||||||
productDestory(this.merId, item.product_id)
|
productDestory(this.merId, item.product_id)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.shopList.splice(index, 1);
|
this.shopList.splice(index, 1);
|
||||||
|
@ -237,8 +265,8 @@ export default {
|
||||||
.catch(rej => {
|
.catch(rej => {
|
||||||
Toast(`${rej}`);
|
Toast(`${rej}`);
|
||||||
});
|
});
|
||||||
})
|
}) :
|
||||||
: Modal('温馨提示', `商品"${item.store_name}"将被加入回收站,请问是否继续?`).then(res => {
|
Modal('温馨提示', `商品"${item.store_name}"将被加入回收站,请问是否继续?`).then(res => {
|
||||||
productDeleteApi(this.merId, item.product_id)
|
productDeleteApi(this.merId, item.product_id)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.shopList.splice(index, 1);
|
this.shopList.splice(index, 1);
|
||||||
|
@ -252,9 +280,14 @@ export default {
|
||||||
// 上架下架
|
// 上架下架
|
||||||
upperShelfAndLowerShelf(obj, index) {
|
upperShelfAndLowerShelf(obj, index) {
|
||||||
let status = obj.is_show == 1 ? 0 : 1;
|
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 => {
|
.then(res => {
|
||||||
this.$util.Tips({ title: res.message, icon: 'success' });
|
this.$util.Tips({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'success'
|
||||||
|
});
|
||||||
this.shopList.splice(index, 1);
|
this.shopList.splice(index, 1);
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
@ -274,12 +307,13 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './scss/index.scss';
|
@import './scss/index.scss';
|
||||||
.longTab {
|
|
||||||
|
.longTab {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
|
@ -288,6 +322,7 @@ export default {
|
||||||
/* #ifdef MP */
|
/* #ifdef MP */
|
||||||
padding-top: 12rpx;
|
padding-top: 12rpx;
|
||||||
padding-bottom: 12rpx;
|
padding-bottom: 12rpx;
|
||||||
|
|
||||||
/* #endif */
|
/* #endif */
|
||||||
.longItem {
|
.longItem {
|
||||||
height: 50upx;
|
height: 50upx;
|
||||||
|
@ -309,6 +344,7 @@ export default {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #e93323;
|
color: #e93323;
|
||||||
|
|
||||||
.underline {
|
.underline {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
@ -329,13 +365,15 @@ export default {
|
||||||
background-color: #e93323;
|
background-color: #e93323;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.title_search {
|
|
||||||
|
.title_search {
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
padding-left: 60rpx;
|
padding-left: 60rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
@ -343,13 +381,15 @@ export default {
|
||||||
left: 30rpx;
|
left: 30rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.shop_button {
|
|
||||||
|
.shop_button {
|
||||||
margin-left: 18rpx;
|
margin-left: 18rpx;
|
||||||
padding: 0 34rpx;
|
padding: 0 34rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
|
@ -361,8 +401,9 @@ export default {
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
.shop_list {
|
|
||||||
|
.shop_list {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
|
|
||||||
|
@ -371,20 +412,25 @@ export default {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
&_shop {
|
&_shop {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
&_image,
|
&_image,
|
||||||
uni-image {
|
uni-image {
|
||||||
width: 150rpx;
|
width: 150rpx;
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 150rpx;
|
width: 150rpx;
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.spec {
|
.spec {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background: rgba(0, 0, 0, 0.5);
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
@ -398,6 +444,7 @@ export default {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&_con {
|
&_con {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -411,11 +458,13 @@ export default {
|
||||||
max-width: 500rpx;
|
max-width: 500rpx;
|
||||||
padding-top: 4rpx;
|
padding-top: 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&_message {
|
&_message {
|
||||||
margin-top: 15rpx;
|
margin-top: 15rpx;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #868686;
|
color: #868686;
|
||||||
> span:nth-child(1) {
|
|
||||||
|
>span:nth-child(1) {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
|
@ -423,17 +472,20 @@ export default {
|
||||||
|
|
||||||
&_price {
|
&_price {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
> span {
|
|
||||||
|
>span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 7rpx;
|
margin-right: 7rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #e93323;
|
color: #e93323;
|
||||||
}
|
}
|
||||||
> del {
|
|
||||||
|
>del {
|
||||||
color: #bebebe;
|
color: #bebebe;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ot_price {
|
.ot_price {
|
||||||
color: #bebebe;
|
color: #bebebe;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
@ -442,10 +494,12 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&_handle {
|
&_handle {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
> view {
|
|
||||||
|
>view {
|
||||||
margin-left: 18rpx;
|
margin-left: 18rpx;
|
||||||
padding: 0 34rpx;
|
padding: 0 34rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
|
@ -460,5 +514,5 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -2,7 +2,9 @@
|
||||||
<view>
|
<view>
|
||||||
<view class="order-index" ref="container">
|
<view class="order-index" ref="container">
|
||||||
<view class="search">
|
<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>
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<div class="header_count">
|
<div class="header_count">
|
||||||
|
@ -12,42 +14,18 @@
|
||||||
<block>
|
<block>
|
||||||
<swiper-item :class="{ active: 0 == swiperCur }">
|
<swiper-item :class="{ active: 0 == swiperCur }">
|
||||||
<view class="slide-navigator">
|
<view class="slide-navigator">
|
||||||
<picker class="item"
|
<picker class="item" mode="multiSelector" :range="[menuList,menuCList]"
|
||||||
mode="multiSelector"
|
:range-key="'cate_name'" @columnchange="columnchange" @change="changeMenu"
|
||||||
:range="[menuList,menuCList]"
|
@cancel="cancelMenu">
|
||||||
:range-key="'cate_name'"
|
|
||||||
@columnchange="columnchange"
|
|
||||||
@change="changeMenu"
|
|
||||||
@cancel="cancelMenu"
|
|
||||||
>
|
|
||||||
<image mode='widthFix' class="image" src="@/static/images/daoru.png"></image>
|
<image mode='widthFix' class="image" src="@/static/images/daoru.png"></image>
|
||||||
<text class="text">分类筛选</text>
|
<text class="text">分类筛选</text>
|
||||||
</picker>
|
</picker>
|
||||||
<!-- <view class="item" hover-class='none' @click="jumpAddGoods">
|
<!-- <navigator class="item"
|
||||||
<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`"
|
:url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=1`"
|
||||||
hover-class='none'>
|
hover-class='none'>
|
||||||
<image mode='widthFix' class="image" src="../static/images/product_sales.png">
|
<image mode='widthFix' class="image" src="../static/images/product_sales.png">
|
||||||
</image>
|
</image>
|
||||||
<text class="text">在售商品</text>
|
<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> -->
|
||||||
<navigator class="item"
|
<navigator class="item"
|
||||||
:url="`/pages/product/storeClassification/index?mer_id=${mer_id}`"
|
:url="`/pages/product/storeClassification/index?mer_id=${mer_id}`"
|
||||||
|
@ -63,41 +41,30 @@
|
||||||
</image>
|
</image>
|
||||||
<text class="text">运费模板</text>
|
<text class="text">运费模板</text>
|
||||||
</navigator>
|
</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>
|
</view>
|
||||||
</swiper-item>
|
</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>
|
</block>
|
||||||
</swiper>
|
</swiper>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
<view class="wrapper">
|
|
||||||
<view class='product_list'>
|
<view class="longTab">
|
||||||
<!-- <view class="menu_cls">
|
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;" scroll-with-animation
|
||||||
<u-scroll-list indicatorActiveColor='#FF6D20' :indicator="true">
|
class="menu" :scroll-left="tabLeft" show-scrollbar="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"
|
<view class="longItem" :style="'width:' + isWidth + 'px'" :data-index="index"
|
||||||
:key="index">
|
:class="index === tabClick ? 'click' : ''" v-for="(item, index) in tabList" :key="index"
|
||||||
<u--image class="image" :showLoading="true" :src="item.pic" width="87.62rpx" height="87.62rpx" shape="circle"
|
:id="'id' + index" @click="selectMenu(item, index)">
|
||||||
></u--image>
|
{{ item.name }}
|
||||||
<view class="li_text" style="display: block;font-size: 26.29rpx;margin-top: 10rpx;">{{item.cate_name}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</u-scroll-list>
|
<view v-if="tabList.length" class="underlineBox"
|
||||||
</view> -->
|
: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 v-for="(item,index) in productList" :key="index" style="position: relative;width: 100%;">
|
||||||
<view class='item' @click="yinc">
|
<view class='item' @click="yinc">
|
||||||
<view class='image'>
|
<view class='image'>
|
||||||
|
@ -117,7 +84,9 @@
|
||||||
<view class="stock_type" v-if="mer_info.type_code=='TypeSupplyChain'">
|
<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"
|
<view class="type_btn" v-for="lable in lableList" :key="lable.product_label_id"
|
||||||
@click="changeLable(item)"
|
@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>
|
||||||
<view class='money-wrap'>
|
<view class='money-wrap'>
|
||||||
<block v-if="mer_info.type_code=='TypeSupplyChain'">
|
<block v-if="mer_info.type_code=='TypeSupplyChain'">
|
||||||
|
@ -159,13 +128,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="operation acea-row row-between-wrapper">
|
<view class="operation acea-row row-between-wrapper">
|
||||||
<view class="acea-row row-middle">
|
<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 class="" class="bnt" @click="Fline(item)" style="width:150rpx">
|
||||||
修改库存
|
修改库存
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="item.is_show == 1 && item.status == 1" class="bnt"
|
<view v-if="item.is_show == 1 && item.status == 1" class="bnt"
|
||||||
@tap.stop="handleShelves(item,0)">下架
|
@tap.stop="handleShelves(item,0)">下架
|
||||||
</view>
|
</view>
|
||||||
|
@ -173,17 +138,13 @@
|
||||||
@tap.stop="handleShelves(item),1">上架
|
@tap.stop="handleShelves(item),1">上架
|
||||||
</view>
|
</view>
|
||||||
<view @click="editGoods(item)" class="bnt">编辑</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>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<u-empty v-else text="暂无商品~" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||||||
|
</u-empty>
|
||||||
</view>
|
</view>
|
||||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||||
</view>
|
</view>
|
||||||
|
@ -220,7 +181,9 @@
|
||||||
<view class="stock_type" v-if="mer_info.type_code=='TypeSupplyChain'">
|
<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"
|
<view class="type_btn" v-for="lable in lableList" :key="lable.product_label_id"
|
||||||
@click="changeLableItem(lable)"
|
@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>
|
||||||
<view class="btn-box">
|
<view class="btn-box">
|
||||||
<button class="cal" @click="lableShow=false">取消</button>
|
<button class="cal" @click="lableShow=false">取消</button>
|
||||||
|
@ -246,9 +209,12 @@
|
||||||
productDeleteApi,
|
productDeleteApi,
|
||||||
productOffApi,
|
productOffApi,
|
||||||
productRecommendApi,
|
productRecommendApi,
|
||||||
productUpdateFree
|
productUpdateFree,
|
||||||
|
productTitle
|
||||||
} from "@/api/product";
|
} from "@/api/product";
|
||||||
import { labelLst } from "@/api/public.js";
|
import {
|
||||||
|
labelLst
|
||||||
|
} from "@/api/public.js";
|
||||||
import Loading from '@/components/Loading/index.vue';
|
import Loading from '@/components/Loading/index.vue';
|
||||||
import {
|
import {
|
||||||
merstreet,
|
merstreet,
|
||||||
|
@ -282,7 +248,8 @@
|
||||||
where: {
|
where: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
keyword: ''
|
keyword: '',
|
||||||
|
type: 1
|
||||||
},
|
},
|
||||||
menuList: [], // 分类菜单
|
menuList: [], // 分类菜单
|
||||||
menuCList: [], //二级分类
|
menuCList: [], //二级分类
|
||||||
|
@ -307,7 +274,7 @@
|
||||||
product_id: '',
|
product_id: '',
|
||||||
unique: "",
|
unique: "",
|
||||||
number: 1,
|
number: 1,
|
||||||
submit_info:{},
|
submit_info: {},
|
||||||
spec_type: ''
|
spec_type: ''
|
||||||
},
|
},
|
||||||
on_line: '',
|
on_line: '',
|
||||||
|
@ -320,18 +287,27 @@
|
||||||
id: '',
|
id: '',
|
||||||
mer_labels: ''
|
mer_labels: ''
|
||||||
}, // 已选择标签
|
}, // 已选择标签
|
||||||
keyword: ''
|
keyword: '',
|
||||||
|
|
||||||
|
isLeft: 0, //导航栏下划线位置
|
||||||
|
isWidth: 0, //每个导航栏占位
|
||||||
|
childIndex: 0,
|
||||||
|
tabList: [],
|
||||||
|
tabClick: '',
|
||||||
|
tabLeft: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// this.mer_id = options.mer_id;
|
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
getCategoryListLevel({
|
this.getCategoryList();
|
||||||
type: 2
|
|
||||||
}).then(res => {
|
var that = this;
|
||||||
this.menuList = res.data;
|
// 获取设备宽度
|
||||||
this.menuCList = res.data[0].children;
|
uni.getSystemInfo({
|
||||||
})
|
success(e) {
|
||||||
|
that.isWidth = e.windowWidth / 5;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.where.page = 1
|
this.where.page = 1
|
||||||
|
@ -342,7 +318,6 @@
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
// console.log(this.status, '222222222')
|
|
||||||
if (this.status == 'nomore') return;
|
if (this.status == 'nomore') return;
|
||||||
this.status = 'loading';
|
this.status = 'loading';
|
||||||
this.where.page = ++this.where.page;
|
this.where.page = ++this.where.page;
|
||||||
|
@ -350,6 +325,55 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
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,47 +382,55 @@
|
||||||
this.mer_id = res.data.service.mer_id;
|
this.mer_id = res.data.service.mer_id;
|
||||||
this.mer_info = res.data.mer_info;
|
this.mer_info = res.data.mer_info;
|
||||||
this.initLable();
|
this.initLable();
|
||||||
this.getList(res.data.service.mer_id, true);
|
// this.getList(res.data.service.mer_id, true);
|
||||||
|
|
||||||
|
// 条件
|
||||||
|
this.getProductTitle();
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 搜索
|
// 搜索
|
||||||
keywordSearch(){
|
keywordSearch() {
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
this.where.keyword = this.keyword;
|
this.where.keyword = this.keyword;
|
||||||
this.getList(this.mer_id, true);
|
this.getList(this.mer_id, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 扫码搜索
|
// 扫码搜索
|
||||||
scanQRcodes(){
|
scanQRcodes() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
scanType: ['barCode'],
|
scanType: ['barCode'],
|
||||||
success:(res)=>{
|
success: (res) => {
|
||||||
this.keyword = res.result;
|
this.keyword = res.result;
|
||||||
this.keywordSearch();
|
this.keywordSearch();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 初始化商品标签
|
// 初始化商品标签
|
||||||
initLable(){
|
initLable() {
|
||||||
labelLst({
|
labelLst({
|
||||||
type: 1
|
type: 1
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
this.lableList = res.data.list;
|
this.lableList = res.data.list;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击标签
|
// 点击标签
|
||||||
changeLable(item){
|
changeLable(item) {
|
||||||
this.lableInfo.id = item.product_id;
|
this.lableInfo.id = item.product_id;
|
||||||
this.lableInfo.mer_labels = [];
|
this.lableInfo.mer_labels = [];
|
||||||
item.mer_labels?.forEach(t=>{
|
item.mer_labels?.forEach(t => {
|
||||||
this.lableInfo.mer_labels.push(+t.product_label_id);
|
this.lableInfo.mer_labels.push(+t.product_label_id);
|
||||||
})
|
})
|
||||||
if(this.lableInfo.mer_labels.length==0)this.lableInfo.mer_labels = [4];
|
if (this.lableInfo.mer_labels.length == 0) this.lableInfo.mer_labels = [4];
|
||||||
this.lableShow = true;
|
this.lableShow = true;
|
||||||
},
|
},
|
||||||
changeLableItem(item){
|
|
||||||
if(item.product_label_id==4) return Toast('该项必须勾选'); //现款现货
|
changeLableItem(item) {
|
||||||
|
if (item.product_label_id == 4) return Toast('该项必须勾选'); //现款现货
|
||||||
const index = this.lableInfo.mer_labels.indexOf(+item.product_label_id);
|
const index = this.lableInfo.mer_labels.indexOf(+item.product_label_id);
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
// 如果存在,则删除该元素
|
// 如果存在,则删除该元素
|
||||||
|
@ -408,17 +440,18 @@
|
||||||
this.lableInfo.mer_labels.push(+item.product_label_id);
|
this.lableInfo.mer_labels.push(+item.product_label_id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 编辑标签
|
// 编辑标签
|
||||||
updateLable(){
|
updateLable() {
|
||||||
productUpdateFree(this.lableInfo.id, {
|
productUpdateFree(this.lableInfo.id, {
|
||||||
mer_labels: this.lableInfo.mer_labels
|
mer_labels: this.lableInfo.mer_labels
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
Toast(res.message);
|
Toast(res.message);
|
||||||
this.lableShow = false;
|
this.lableShow = false;
|
||||||
this.productList.forEach(item=>{
|
this.productList.forEach(item => {
|
||||||
if(item.product_id==this.lableInfo.id){
|
if (item.product_id == this.lableInfo.id) {
|
||||||
let arr = []
|
let arr = []
|
||||||
this.lableInfo.mer_labels.forEach(t=>{
|
this.lableInfo.mer_labels.forEach(t => {
|
||||||
arr.push({
|
arr.push({
|
||||||
product_label_id: t
|
product_label_id: t
|
||||||
})
|
})
|
||||||
|
@ -426,36 +459,29 @@
|
||||||
item.mer_labels = arr;
|
item.mer_labels = arr;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// this.getList(this.mer_id, true);
|
}).catch(e => {
|
||||||
}).catch(e=>{
|
|
||||||
Toast(e)
|
Toast(e)
|
||||||
this.lableShow = false;
|
this.lableShow = false;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
menuActiona(item, index) {
|
menuActiona(item, index) {
|
||||||
if (item.is_good) {
|
if (item.is_good) {
|
||||||
this.options = [{
|
this.options = [{
|
||||||
value: '1',
|
value: '1',
|
||||||
text: '取消推荐'
|
text: '取消推荐'
|
||||||
},
|
}, {
|
||||||
|
|
||||||
{
|
|
||||||
value: '2',
|
value: '2',
|
||||||
text: '预览'
|
text: '预览'
|
||||||
},
|
}]
|
||||||
|
|
||||||
]
|
|
||||||
} else {
|
} else {
|
||||||
this.options = [{
|
this.options = [{
|
||||||
value: '5',
|
value: '5',
|
||||||
text: '店铺推荐'
|
text: '店铺推荐'
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
value: '2',
|
value: '2',
|
||||||
text: '预览'
|
text: '预览'
|
||||||
},
|
}]
|
||||||
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
if (item.is_show == 0) {
|
if (item.is_show == 0) {
|
||||||
this.options.push({
|
this.options.push({
|
||||||
|
@ -464,22 +490,18 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.ll++
|
this.ll++
|
||||||
// console.log(this.ll)
|
|
||||||
if (this.ll % 2 == 0) {
|
if (this.ll % 2 == 0) {
|
||||||
this.$set(this, 'num', -1);
|
this.$set(this, 'num', -1);
|
||||||
this.ll = 0
|
this.ll = 0
|
||||||
} else {
|
} else {
|
||||||
this.num = index
|
this.num = index
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
yinc() {
|
yinc() {
|
||||||
this.$set(this, 'num', -1);
|
this.$set(this, 'num', -1);
|
||||||
},
|
},
|
||||||
menuAction(action, rowId, item, index) {
|
|
||||||
|
|
||||||
|
menuAction(action, rowId, item, index) {
|
||||||
if (action.value == 2) {
|
if (action.value == 2) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/admin/goods_details/index?product_id=${item.product_id}&product_type=0`
|
url: `/pages/admin/goods_details/index?product_id=${item.product_id}&product_type=0`
|
||||||
|
@ -490,12 +512,12 @@
|
||||||
} else {
|
} else {
|
||||||
this.handleRecycle(item, index)
|
this.handleRecycle(item, index)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
fnChange(e) {
|
fnChange(e) {
|
||||||
this.optionVal = e
|
this.optionVal = e
|
||||||
},
|
},
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
|
@ -514,33 +536,31 @@
|
||||||
unique: this.data.unique,
|
unique: this.data.unique,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//线下
|
//线下
|
||||||
Fline(item) {
|
Fline(item) {
|
||||||
navigateTo(1, '/pages/product/updateStock/updateStock', {
|
navigateTo(1, '/pages/product/updateStock/updateStock', {
|
||||||
product_id: item.product_id
|
product_id: item.product_id
|
||||||
})
|
})
|
||||||
uni.$once('updateStock', (e)=>{
|
uni.$once('updateStock', (e) => {
|
||||||
this.productList.forEach(p=>{
|
this.productList.forEach(p => {
|
||||||
if(e.product_id==p.product_id){
|
if (e.product_id == p.product_id) {
|
||||||
p.stock = e.stock;
|
p.stock = e.stock;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//导入
|
//导入
|
||||||
creat() {
|
creat() {
|
||||||
|
|
||||||
if (this.on_line == 1) {
|
if (this.on_line == 1) {
|
||||||
if(this.data.spec_type==1 && this.checkboxValue1 !== this.data.unique){
|
if (this.data.spec_type == 1 && this.checkboxValue1 !== this.data.unique) {
|
||||||
this.show = false
|
this.show = false
|
||||||
this.$util.Tips({
|
this.$util.Tips({
|
||||||
title: '请选择规格'
|
title: '请选择规格'
|
||||||
})
|
})
|
||||||
}
|
} else if (this.data.number < 1) {
|
||||||
else if (this.data.number < 1) {
|
|
||||||
this.show = false
|
this.show = false
|
||||||
this.$util.Tips({
|
this.$util.Tips({
|
||||||
title: '入库数量不得小于一件'
|
title: '入库数量不得小于一件'
|
||||||
|
@ -549,21 +569,20 @@
|
||||||
let obj = {
|
let obj = {
|
||||||
"attr": this.data.attr,
|
"attr": this.data.attr,
|
||||||
"attrValue": [...this.checkboxList1],
|
"attrValue": [...this.checkboxList1],
|
||||||
"mer_cate_id": this.data.item.merCateId||[],
|
"mer_cate_id": this.data.item.merCateId || [],
|
||||||
"spec_type": this.data.spec_type,
|
"spec_type": this.data.spec_type,
|
||||||
"is_stock": 1
|
"is_stock": 1
|
||||||
};
|
};
|
||||||
if(this.data.spec_type==1) {
|
if (this.data.spec_type == 1) {
|
||||||
obj.attrValue.forEach((item)=>{
|
obj.attrValue.forEach((item) => {
|
||||||
if(item.unique==this.checkboxValue1){
|
if (item.unique == this.checkboxValue1) {
|
||||||
item.stock = this.data.number;
|
item.stock = this.data.number;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// let attr = obj.attrValue.find((item)=>item.unique==this.checkboxValue1);
|
// let attr = obj.attrValue.find((item)=>item.unique==this.checkboxValue1);
|
||||||
// attr.stock = this.data.number;
|
// attr.stock = this.data.number;
|
||||||
// obj.attrValue = [attr];
|
// 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 => {
|
productUpdateFree(this.data.product_id, obj).then(res => {
|
||||||
this.data.unique = ''
|
this.data.unique = ''
|
||||||
this.data.product_id = ''
|
this.data.product_id = ''
|
||||||
|
@ -590,7 +609,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.on_line == 0) {
|
if (this.on_line == 0) {
|
||||||
|
|
||||||
if (!this.data.product_id) {
|
if (!this.data.product_id) {
|
||||||
this.show = false
|
this.show = false
|
||||||
this.$util.Tips({
|
this.$util.Tips({
|
||||||
|
@ -602,31 +620,31 @@
|
||||||
product_id: this.data.product_id,
|
product_id: this.data.product_id,
|
||||||
unique: this.data.unique,
|
unique: this.data.unique,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//规格
|
//规格
|
||||||
checkboxChange(n) {
|
checkboxChange(n) {
|
||||||
this.data.unique = n;
|
this.data.unique = n;
|
||||||
this.checkboxList1.forEach(item=>{
|
this.checkboxList1.forEach(item => {
|
||||||
if(item.unique==n){
|
if (item.unique == n) {
|
||||||
this.data.number = item.stock;
|
this.data.number = item.stock;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
radioChange(n) {
|
radioChange(n) {
|
||||||
this.data.product_id = n.product_id
|
this.data.product_id = n.product_id
|
||||||
},
|
},
|
||||||
|
|
||||||
// 跳转添加商品界面
|
// 跳转添加商品界面
|
||||||
jumpAddGoods() {
|
jumpAddGoods() {
|
||||||
const data = getStorage('addGoodsFormData');
|
const data = getStorage('addGoodsFormData');
|
||||||
if (data && data.product_id) {
|
if (data && data.product_id) {
|
||||||
let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData',
|
let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData',
|
||||||
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils'];
|
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils'
|
||||||
|
];
|
||||||
waitDeleteData.forEach(item => {
|
waitDeleteData.forEach(item => {
|
||||||
if (getStorage(item)) {
|
if (getStorage(item)) {
|
||||||
removeStorage(item);
|
removeStorage(item);
|
||||||
|
@ -637,6 +655,7 @@
|
||||||
mer_id: this.mer_id
|
mer_id: this.mer_id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// swiper
|
// swiper
|
||||||
swiperChange(e) {
|
swiperChange(e) {
|
||||||
let {
|
let {
|
||||||
|
@ -648,6 +667,7 @@
|
||||||
this.swiperCur = e.detail.current;
|
this.swiperCur = e.detail.current;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getList: function(mer_id, ispage) {
|
getList: function(mer_id, ispage) {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (that.loading || that.loaded) return;
|
if (that.loading || that.loaded) return;
|
||||||
|
@ -656,7 +676,7 @@
|
||||||
this.where.page = 1
|
this.where.page = 1
|
||||||
this.$set(this, 'productList', []);
|
this.$set(this, 'productList', []);
|
||||||
}
|
}
|
||||||
if(this.cate_id.store_category_id){
|
if (this.cate_id.store_category_id) {
|
||||||
that.where.cate_id = this.cate_id.store_category_id;
|
that.where.cate_id = this.cate_id.store_category_id;
|
||||||
// mer_cate_id 为商户自己的分类参数
|
// mer_cate_id 为商户自己的分类参数
|
||||||
}
|
}
|
||||||
|
@ -674,31 +694,17 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
editGoods(item) {
|
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';
|
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 == 'PersonalStore') url = '/pages/product/addGood/addGood_one';
|
||||||
if(this.mer_info.type_code=='TypeSupplyChain') url = '/pages/product/addGood/addGood_supply';
|
if (this.mer_info.type_code == 'TypeSupplyChain') url = '/pages/product/addGood/addGood_supply';
|
||||||
navigateTo(1, url, {
|
navigateTo(1, url, {
|
||||||
mer_id: item.mer_id,
|
mer_id: item.mer_id,
|
||||||
product_id: item.product_id
|
product_id: item.product_id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handleRecycle(item, index) {
|
handleRecycle(item, index) {
|
||||||
let that = this;
|
let that = this;
|
||||||
Modal('温馨提示', `商品"${item.store_name}"将被加入回收站,请问是否继续?`).then(res => {
|
Modal('温馨提示', `商品"${item.store_name}"将被加入回收站,请问是否继续?`).then(res => {
|
||||||
|
@ -732,7 +738,7 @@
|
||||||
title: '下架成功',
|
title: '下架成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
that.getList(this.mer_id,false)
|
that.getList(this.mer_id, false)
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
// console.log('用户点击取消');
|
// console.log('用户点击取消');
|
||||||
}
|
}
|
||||||
|
@ -753,7 +759,7 @@
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
}, () => {
|
}, () => {
|
||||||
that.$set(item, 'is_show', item.is_show == 0 ? 1 : 0);
|
that.$set(item, 'is_show', item.is_show == 0 ? 1 : 0);
|
||||||
that.getList(this.mer_id,false)
|
that.getList(this.mer_id, false)
|
||||||
});
|
});
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
return that.$util.Tips({
|
return that.$util.Tips({
|
||||||
|
@ -788,19 +794,20 @@
|
||||||
this.current = index
|
this.current = index
|
||||||
},
|
},
|
||||||
// 选择地址
|
// 选择地址
|
||||||
columnchange(e){
|
columnchange(e) {
|
||||||
if(e.detail.column==0){
|
if (e.detail.column == 0) {
|
||||||
this.menuCList = this.menuList[e.detail.value].children;
|
this.menuCList = this.menuList[e.detail.value].children;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeMenu(e){
|
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.$set(this, 'cate_id', JSON.parse(JSON.stringify(cate_id)));
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
this.getList(this.mer_id, true)
|
this.getList(this.mer_id, true)
|
||||||
},
|
},
|
||||||
cancelMenu(){
|
cancelMenu() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
this.where.cate_id = null;
|
this.where.cate_id = null;
|
||||||
|
@ -817,6 +824,53 @@
|
||||||
background-color: #F5F5F5;
|
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 {
|
.muau-header {
|
||||||
|
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
@ -828,7 +882,6 @@
|
||||||
box-shadow: 0 0 7px #a3a3a3;
|
box-shadow: 0 0 7px #a3a3a3;
|
||||||
|
|
||||||
.muau {
|
.muau {
|
||||||
|
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -838,9 +891,7 @@
|
||||||
view:hover {
|
view:hover {
|
||||||
color: red
|
color: red
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-index {
|
.order-index {
|
||||||
|
@ -913,7 +964,7 @@
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
padding-top: 30rpx;
|
padding-top: 30rpx;
|
||||||
margin: 0 20rpx;
|
margin: 0 20rpx 20rpx;
|
||||||
|
|
||||||
.header_count {
|
.header_count {
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
|
@ -1039,19 +1090,21 @@
|
||||||
margin-right: 8rpx;
|
margin-right: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock_type{
|
.stock_type {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
color: #868686;
|
color: #868686;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
.type_btn{
|
|
||||||
|
.type_btn {
|
||||||
border: 2rpx solid #868686;
|
border: 2rpx solid #868686;
|
||||||
margin-right: 15rpx;
|
margin-right: 15rpx;
|
||||||
padding: 2rpx 10rpx 3rpx 10rpx;
|
padding: 2rpx 10rpx 3rpx 10rpx;
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
}
|
}
|
||||||
.btn_a{
|
|
||||||
|
.btn_a {
|
||||||
border: 2rpx solid #F84221;
|
border: 2rpx solid #F84221;
|
||||||
color: #F84221;
|
color: #F84221;
|
||||||
}
|
}
|
||||||
|
@ -1168,7 +1221,8 @@
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
&>view{
|
|
||||||
|
&>view {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1205,6 +1259,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu_cls {
|
.menu_cls {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
// height: 199.77rpx;
|
// height: 199.77rpx;
|
||||||
|
@ -1224,12 +1279,14 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: 140rpx;
|
min-width: 140rpx;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|
||||||
// width: 120rpx;
|
// width: 120rpx;
|
||||||
// display: inline-block;
|
// display: inline-block;
|
||||||
.image{
|
.image {
|
||||||
border: 5rpx solid #fff;
|
border: 5rpx solid #fff;
|
||||||
}
|
}
|
||||||
.li_text{
|
|
||||||
|
.li_text {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -1239,12 +1296,14 @@
|
||||||
padding: 1rpx 10rpx 4rpx 10rpx;
|
padding: 1rpx 10rpx 4rpx 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.menu_li_on{
|
|
||||||
.image{
|
.menu_li_on {
|
||||||
|
.image {
|
||||||
border: 5rpx solid #ff6d20;
|
border: 5rpx solid #ff6d20;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
.li_text{
|
|
||||||
|
.li_text {
|
||||||
background-color: #ff6d20;
|
background-color: #ff6d20;
|
||||||
border-radius: 2em;
|
border-radius: 2em;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -1253,45 +1312,54 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.lable-popup{
|
|
||||||
|
.lable-popup {
|
||||||
width: 600rpx;
|
width: 600rpx;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
.stock_type{
|
|
||||||
|
.stock_type {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-top: 28rpx;
|
margin-top: 28rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
.type_btn{
|
|
||||||
|
.type_btn {
|
||||||
padding: 8rpx 20rpx 10rpx 20rpx;
|
padding: 8rpx 20rpx 10rpx 20rpx;
|
||||||
border: 2rpx solid #898989;
|
border: 2rpx solid #898989;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
margin: 0 10rpx;
|
margin: 0 10rpx;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 15rpx;
|
||||||
}
|
}
|
||||||
.btn_a{
|
|
||||||
|
.btn_a {
|
||||||
border: 2rpx solid #F84221;
|
border: 2rpx solid #F84221;
|
||||||
color: #F84221;
|
color: #F84221;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn-box{
|
|
||||||
|
.btn-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
.pra, .cal{
|
|
||||||
|
.pra,
|
||||||
|
.cal {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
background-color: #ff6d20;
|
background-color: #ff6d20;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
padding: 10rpx 40rpx;
|
padding: 10rpx 40rpx;
|
||||||
}
|
}
|
||||||
.cal{
|
|
||||||
|
.cal {
|
||||||
background-color: #999999;
|
background-color: #999999;
|
||||||
margin-right: 40rpx;
|
margin-right: 40rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.search{
|
|
||||||
|
.search {
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding-top: 30rpx;
|
padding-top: 30rpx;
|
||||||
|
|
|
@ -194,6 +194,18 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-action-sheet>
|
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -208,6 +220,7 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
modalShow: false,
|
||||||
list: [],
|
list: [],
|
||||||
show: false,
|
show: false,
|
||||||
bankList: [], //银行列表
|
bankList: [], //银行列表
|
||||||
|
@ -226,7 +239,8 @@
|
||||||
icon: ''
|
icon: ''
|
||||||
},
|
},
|
||||||
mer_id: '',
|
mer_id: '',
|
||||||
isCompany: ''
|
isCompany: '',
|
||||||
|
errorCount: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -237,6 +251,7 @@
|
||||||
}
|
}
|
||||||
if (opt.mer_id) {
|
if (opt.mer_id) {
|
||||||
this.mer_id = opt.mer_id;
|
this.mer_id = opt.mer_id;
|
||||||
|
|
||||||
if (opt.hasOwnProperty('isOwn') && (opt.isOwn === 0 || opt.isOwn == '0')) {
|
if (opt.hasOwnProperty('isOwn') && (opt.isOwn === 0 || opt.isOwn == '0')) {
|
||||||
this.list = [{
|
this.list = [{
|
||||||
name: '对公账户'
|
name: '对公账户'
|
||||||
|
@ -262,7 +277,7 @@
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果绑定银行卡用户为个体户 则不能添加对公账户,只能添加法人账户 is_company =0 个体户
|
//如果绑定银行卡用户为个体户 则不能添加对公账户,只能添加法人账户 is_company = 0 个体户
|
||||||
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
|
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
|
||||||
this.isCompany = isCompany;
|
this.isCompany = isCompany;
|
||||||
if (isCompany != 1) {
|
if (isCompany != 1) {
|
||||||
|
@ -374,9 +389,12 @@
|
||||||
title: '请输入正确的手机号!'
|
title: '请输入正确的手机号!'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
let that = this;
|
||||||
|
uni.showLoading({
|
||||||
|
title: "绑定中..."
|
||||||
|
})
|
||||||
addBank(this.mer_id, this.bindForm).then(res => {
|
addBank(this.mer_id, this.bindForm).then(res => {
|
||||||
|
uni.hideLoading()
|
||||||
this.$util.Tips({
|
this.$util.Tips({
|
||||||
title: '提交成功,请等待后台审核!'
|
title: '提交成功,请等待后台审核!'
|
||||||
}, () => {
|
}, () => {
|
||||||
|
@ -385,11 +403,20 @@
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
uni.hideLoading()
|
||||||
|
if (isNaN(err)) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err,
|
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>
|
</style>
|
|
@ -54,7 +54,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="audit-info-txt" v-if="item.is_check == 2">审核不通过:{{item.fail_msg}}</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"
|
<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>
|
||||||
</view>
|
</view>
|
||||||
|
@ -97,9 +97,16 @@
|
||||||
|
|
||||||
methods: {
|
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({
|
uni.redirectTo({
|
||||||
url: "/pages/withdrawal/add?id=" + id
|
url: "/pages/withdrawal/add" + strUrl
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue