1
This commit is contained in:
parent
2b2d3891ba
commit
068b3a12df
@ -14,11 +14,11 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<!-- <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage> -->
|
<!-- <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage> -->
|
||||||
<image class="img" :src="item.image||defaultImageSRC" :lazy-load="true" @click="clickImg(item, 1, 0)"></image>
|
<image class="img" :src="item.image||defaultImageSRC" :lazy-load="true"></image>
|
||||||
<view class="swiper">
|
<view class="swiper">
|
||||||
<image :src="item.slider_image[0]||defaultImageSRC" :lazy-load="true" @click="clickImg(item, 2, 0)"></image>
|
<image :src="item.slider_image[0]||defaultImageSRC" :lazy-load="true"></image>
|
||||||
<image :src="item.slider_image[1]||defaultImageSRC" :lazy-load="true" @click="clickImg(item, 2, 1)"></image>
|
<image :src="item.slider_image[1]||defaultImageSRC" :lazy-load="true"></image>
|
||||||
<image :src="item.slider_image[2]||defaultImageSRC" :lazy-load="true" @click="clickImg(item, 2, 2)"></image>
|
<image :src="item.slider_image[2]||defaultImageSRC" :lazy-load="true"></image>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.update" class="btn" @click="updateItemImage(item)">保存修改</view>
|
<view v-if="item.update" class="btn" @click="updateItemImage(item)">保存修改</view>
|
||||||
</view>
|
</view>
|
||||||
@ -87,7 +87,9 @@
|
|||||||
<view>刷新: 3次</view>
|
<view>刷新: 3次</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="img-list">
|
<view class="img-list">
|
||||||
<image class="img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png" v-for="item in 6" :key="item"></image>
|
<image class="img"
|
||||||
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png"
|
||||||
|
v-for="item in 6" :key="item"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
@ -95,7 +97,9 @@
|
|||||||
<view class="text">请选择产品图片:</view>
|
<view class="text">请选择产品图片:</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="img-list img-list2">
|
<view class="img-list img-list2">
|
||||||
<image class="img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png" v-for="item in 2" :key="item"></image>
|
<image class="img"
|
||||||
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png"
|
||||||
|
v-for="item in 2" :key="item"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
@ -103,7 +107,9 @@
|
|||||||
<view class="text">请选择产品图片:</view>
|
<view class="text">请选择产品图片:</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="img-list">
|
<view class="img-list">
|
||||||
<image class="img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png" v-for="item in 3" :key="item"></image>
|
<image class="img"
|
||||||
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png"
|
||||||
|
v-for="item in 3" :key="item"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -138,11 +144,13 @@
|
|||||||
<view style="text-align: center;font-weight: bold;">完善商品信息</view>
|
<view style="text-align: center;font-weight: bold;">完善商品信息</view>
|
||||||
<view style="display: flex;align-items: center;margin-top: 16rpx;">
|
<view style="display: flex;align-items: center;margin-top: 16rpx;">
|
||||||
<view style="margin-right: 20rpx;">名称:</view>
|
<view style="margin-right: 20rpx;">名称:</view>
|
||||||
<input style="flex: 1;" type="text" v-model="putGoods.store_name" class="putGoods" placeholder="请输入商品名称">
|
<input style="flex: 1;" type="text" v-model="putGoods.store_name" class="putGoods"
|
||||||
|
placeholder="请输入商品名称">
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;align-items: center;margin-top: 16rpx;">
|
<view style="display: flex;align-items: center;margin-top: 16rpx;">
|
||||||
<view style="margin-right: 20rpx;">价格:</view>
|
<view style="margin-right: 20rpx;">价格:</view>
|
||||||
<input style="flex: 1;" type="text" v-model="putGoods.price" class="putGoods" :placeholder="`请输入商品价格`">
|
<input style="flex: 1;" type="text" v-model="putGoods.price" class="putGoods"
|
||||||
|
:placeholder="`请输入商品价格`">
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;align-items: center;margin-top: 16rpx;">
|
<view style="display: flex;align-items: center;margin-top: 16rpx;">
|
||||||
<view style="margin-right: 20rpx;">库存:</view>
|
<view style="margin-right: 20rpx;">库存:</view>
|
||||||
@ -154,7 +162,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-if="showPutGoodsInput.trademark" style="display: flex;align-items: center;margin-top: 16rpx;">
|
<view v-if="showPutGoodsInput.trademark" style="display: flex;align-items: center;margin-top: 16rpx;">
|
||||||
<view style="margin-right: 20rpx;">品牌:</view>
|
<view style="margin-right: 20rpx;">品牌:</view>
|
||||||
<input style="flex: 1;" type="text" v-model="putGoods.trademark" class="putGoods" placeholder="请输入商品品牌">
|
<input style="flex: 1;" type="text" v-model="putGoods.trademark" class="putGoods"
|
||||||
|
placeholder="请输入商品品牌">
|
||||||
</view>
|
</view>
|
||||||
<view class="search_goods_btn">
|
<view class="search_goods_btn">
|
||||||
<view class="cancel edit_btn" @click="addGoodsclose()">取消</view>
|
<view class="cancel edit_btn" @click="addGoodsclose()">取消</view>
|
||||||
@ -171,7 +180,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<u-modal :show="showModel" title="提示" content="没有找到该商品,是否手动添加?" show-cancel-button @cancel="showModel = false" @confirm="navToAdd"></u-modal>
|
<u-modal :show="showModel" title="提示" content="没有找到该商品,是否手动添加?" show-cancel-button @cancel="showModel = false"
|
||||||
|
@confirm="navToAdd"></u-modal>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -204,8 +214,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageType: 1, // 当前页面显示的类型, 1为商品列表, 2为手动选择图片进行添加
|
pageType: 1, // 当前页面显示的类型, 1为商品列表, 2为手动选择图片进行添加
|
||||||
goodsData: [
|
goodsData: [{
|
||||||
{
|
|
||||||
name: '搜索名称入库',
|
name: '搜索名称入库',
|
||||||
type: 1,
|
type: 1,
|
||||||
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/mingcheng.png'
|
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/mingcheng.png'
|
||||||
@ -268,12 +277,12 @@
|
|||||||
store_name: '',
|
store_name: '',
|
||||||
images: [],
|
images: [],
|
||||||
},
|
},
|
||||||
uploadImgInfo:{ // 上传图片类型信息
|
uploadImgInfo: { // 上传图片类型信息
|
||||||
id: '',
|
id: '',
|
||||||
type: 1,
|
type: 1,
|
||||||
index: 0
|
index: 0
|
||||||
},
|
},
|
||||||
uploadImgIdList: new Map(),//用于存储照片是否原本就存在,原本就有的照片不可更改
|
uploadImgIdList: new Map(), //用于存储照片是否原本就存在,原本就有的照片不可更改
|
||||||
showPutGoodsInput: {
|
showPutGoodsInput: {
|
||||||
spec: false,
|
spec: false,
|
||||||
trademark: false,
|
trademark: false,
|
||||||
@ -285,7 +294,7 @@
|
|||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.mer_id = e.mer_id
|
this.mer_id = e.mer_id
|
||||||
this.userInfo = this.$store.state.app.userInfo;
|
this.userInfo = this.$store.state.app.userInfo;
|
||||||
if(typeof this.userInfo == 'string') this.userInfo = JSON.parse(this.userInfo);
|
if (typeof this.userInfo == 'string') this.userInfo = JSON.parse(this.userInfo);
|
||||||
// if(this.userInfo.mer_info.type_code=='PersonalStore'){
|
// if(this.userInfo.mer_info.type_code=='PersonalStore'){
|
||||||
// this.goodsData = [{
|
// this.goodsData = [{
|
||||||
// name: '农产品入库',
|
// name: '农产品入库',
|
||||||
@ -299,7 +308,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addGoods(item={}) {
|
addGoods(item = {}) {
|
||||||
item = JSON.parse(JSON.stringify(item));
|
item = JSON.parse(JSON.stringify(item));
|
||||||
// if(this.isNullImage(item.image)||
|
// if(this.isNullImage(item.image)||
|
||||||
// ( this.isNullImage(item.slider_image[0]) && this.isNullImage(item.slider_image[1]) && this.isNullImage(item.slider_image[2]) )){
|
// ( this.isNullImage(item.slider_image[0]) && this.isNullImage(item.slider_image[1]) && this.isNullImage(item.slider_image[2]) )){
|
||||||
@ -310,13 +319,12 @@
|
|||||||
this.putGoods.price = '';
|
this.putGoods.price = '';
|
||||||
this.putGoods.stock = '';
|
this.putGoods.stock = '';
|
||||||
this.putGoods.store_name = item.store_name;
|
this.putGoods.store_name = item.store_name;
|
||||||
Object.keys(this.showPutGoodsInput).forEach((key)=>{
|
Object.keys(this.showPutGoodsInput).forEach((key) => {
|
||||||
if(item[key]==null||item[key]==undefined||item[key]==''){
|
if (item[key] == null || item[key] == undefined || item[key] == '') {
|
||||||
this.showPutGoodsInput[key] = true;
|
this.showPutGoodsInput[key] = true;
|
||||||
this.putGoods[key] = '';
|
this.putGoods[key] = '';
|
||||||
}
|
} else {
|
||||||
else {
|
this.showPutGoodsInput[key] = false;
|
||||||
this.showPutGoodsInput[key]=false;
|
|
||||||
this.putGoods[key] = item[key];
|
this.putGoods[key] = item[key];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -324,8 +332,8 @@
|
|||||||
// this.addGoodsShow = true
|
// this.addGoodsShow = true
|
||||||
// this.item = item
|
// this.item = item
|
||||||
},
|
},
|
||||||
initShop(item){
|
initShop(item) {
|
||||||
if(item.spec==''||item.spec==undefined||item.spec==null){
|
if (item.spec == '' || item.spec == undefined || item.spec == null) {
|
||||||
item.spec = "标准装"
|
item.spec = "标准装"
|
||||||
}
|
}
|
||||||
item.attr = [{
|
item.attr = [{
|
||||||
@ -351,17 +359,17 @@
|
|||||||
item.imageList = [item.image, ...item.slider_image];
|
item.imageList = [item.image, ...item.slider_image];
|
||||||
item.content = {
|
item.content = {
|
||||||
title: '',
|
title: '',
|
||||||
image: item.slider_image[0]?[item.slider_image[0]]:[]
|
image: item.slider_image[0] ? [item.slider_image[0]] : []
|
||||||
}
|
}
|
||||||
delete item.id;
|
delete item.id;
|
||||||
delete item.stock;
|
delete item.stock;
|
||||||
if(this.userInfo.mer_info.type_code=='TypeSupplyChain') uni.navigateTo({
|
if (this.userInfo.mer_info.type_code == 'TypeSupplyChain') uni.navigateTo({
|
||||||
url: `/pages/product/addGood/addGood_supply?mer_id=${this.userInfo.service.mer_id}&import=1`,
|
url: `/pages/product/addGood/addGood_supply?mer_id=${this.userInfo.service.mer_id}&import=1`,
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
e.eventChannel.emit('importAttrValue', item);
|
e.eventChannel.emit('importAttrValue', item);
|
||||||
uni.$once('importAttrValueOK', (e)=>{
|
uni.$once('importAttrValueOK', (e) => {
|
||||||
this.goods = this.goods.filter(t=>{
|
this.goods = this.goods.filter(t => {
|
||||||
return t.id!=e;
|
return t.id != e;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -370,20 +378,20 @@
|
|||||||
url: `/pages/product/addGood/addGood?mer_id=${this.userInfo.service.mer_id}&import=1`,
|
url: `/pages/product/addGood/addGood?mer_id=${this.userInfo.service.mer_id}&import=1`,
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
e.eventChannel.emit('importAttrValue', item);
|
e.eventChannel.emit('importAttrValue', item);
|
||||||
uni.$once('importAttrValueOK', (e)=>{
|
uni.$once('importAttrValueOK', (e) => {
|
||||||
this.goods = this.goods.filter(t=>{
|
this.goods = this.goods.filter(t => {
|
||||||
return t.id!=e;
|
return t.id != e;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
isNullImage(src){
|
isNullImage(src) {
|
||||||
let flag = false;
|
let flag = false;
|
||||||
if(src==this.defaultImageSRC||!src)flag =true;
|
if (src == this.defaultImageSRC || !src) flag = true;
|
||||||
return flag;
|
return flag;
|
||||||
},
|
},
|
||||||
clickImg(data, type, index){
|
clickImg(data, type, index) {
|
||||||
// 已有的图片不允许更改
|
// 已有的图片不允许更改
|
||||||
// if(!data.update&&!this.uploadImgIdList.get(data.id)){
|
// if(!data.update&&!this.uploadImgIdList.get(data.id)){
|
||||||
// let arr = [];
|
// let arr = [];
|
||||||
@ -408,12 +416,12 @@
|
|||||||
// 如需改成已有的图片不可更改,请将上部分代码注释解开并将以下代码注释
|
// 如需改成已有的图片不可更改,请将上部分代码注释解开并将以下代码注释
|
||||||
this.chooseImg()
|
this.chooseImg()
|
||||||
},
|
},
|
||||||
chooseImg(){
|
chooseImg() {
|
||||||
let that = this;
|
let that = this;
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
sizeType: ['original'],
|
sizeType: ['original'],
|
||||||
crop:{
|
crop: {
|
||||||
width: 1024,
|
width: 1024,
|
||||||
height: 1024,
|
height: 1024,
|
||||||
resize: false
|
resize: false
|
||||||
@ -465,17 +473,17 @@
|
|||||||
},
|
},
|
||||||
success: (uploadFileRes) => {
|
success: (uploadFileRes) => {
|
||||||
let imgData = JSON.parse(uploadFileRes.data)
|
let imgData = JSON.parse(uploadFileRes.data)
|
||||||
if(this.uploadImgInfo.type==1){
|
if (this.uploadImgInfo.type == 1) {
|
||||||
this.goods.forEach(item=>{
|
this.goods.forEach(item => {
|
||||||
if(item.id==this.uploadImgInfo.id){
|
if (item.id == this.uploadImgInfo.id) {
|
||||||
item.image = imgData.data.path;
|
item.image = imgData.data.path;
|
||||||
item.update = true;
|
item.update = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.putGoods.image = imgData.data.path;
|
this.putGoods.image = imgData.data.path;
|
||||||
}else if(this.uploadImgInfo.type==2){
|
} else if (this.uploadImgInfo.type == 2) {
|
||||||
this.goods = this.goods.map(item=>{
|
this.goods = this.goods.map(item => {
|
||||||
if(item.id==this.uploadImgInfo.id){
|
if (item.id == this.uploadImgInfo.id) {
|
||||||
item.slider_image[this.uploadImgInfo.index] = imgData.data.path;
|
item.slider_image[this.uploadImgInfo.index] = imgData.data.path;
|
||||||
item.update = true;
|
item.update = true;
|
||||||
}
|
}
|
||||||
@ -493,33 +501,33 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 更新图片
|
// 更新图片
|
||||||
updateItemImage(item){
|
updateItemImage(item) {
|
||||||
microProductEdit({
|
microProductEdit({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
image: item.image,
|
image: item.image,
|
||||||
slider_image: item.slider_image.join(',')
|
slider_image: item.slider_image.join(',')
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
this.goods = this.goods.map(e=>{
|
this.goods = this.goods.map(e => {
|
||||||
if(e.id==item.id)e.update = false;
|
if (e.id == item.id) e.update = false;
|
||||||
return e;
|
return e;
|
||||||
})
|
})
|
||||||
Toast('更新成功')
|
Toast('更新成功')
|
||||||
}).catch(err=>{
|
}).catch(err => {
|
||||||
Toast(err||'更新失败')
|
Toast(err || '更新失败')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 加入店铺
|
// 加入店铺
|
||||||
async addGoodsopen() {
|
async addGoodsopen() {
|
||||||
let good = this.goods.find(item=>item.id==this.putGoods.id);
|
let good = this.goods.find(item => item.id == this.putGoods.id);
|
||||||
if (this.putGoods.id&&good) {
|
if (this.putGoods.id && good) {
|
||||||
// 判断商品是否需要审核
|
// 判断商品是否需要审核
|
||||||
let auditFlag = false;
|
let auditFlag = false;
|
||||||
Object.keys(this.showPutGoodsInput).forEach((key)=>{
|
Object.keys(this.showPutGoodsInput).forEach((key) => {
|
||||||
if(this.showPutGoodsInput[key]){
|
if (this.showPutGoodsInput[key]) {
|
||||||
auditFlag = true;
|
auditFlag = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if(auditFlag){
|
if (auditFlag) {
|
||||||
let obj = Object.assign({}, good, this.putGoods);
|
let obj = Object.assign({}, good, this.putGoods);
|
||||||
obj.product_library_id = obj.id;
|
obj.product_library_id = obj.id;
|
||||||
obj.slider_image = obj.slider_image.join(',')
|
obj.slider_image = obj.slider_image.join(',')
|
||||||
@ -541,8 +549,7 @@
|
|||||||
console.log('导入出错', err);
|
console.log('导入出错', err);
|
||||||
this.addGoodsShow = false;
|
this.addGoodsShow = false;
|
||||||
});
|
});
|
||||||
}
|
} else micro_product_import(this.putGoods).then(e => {
|
||||||
else micro_product_import(this.putGoods).then(e => {
|
|
||||||
console.log('导入错误', e);
|
console.log('导入错误', e);
|
||||||
if (e.status == 200) {
|
if (e.status == 200) {
|
||||||
Toast(e.data.msg)
|
Toast(e.data.msg)
|
||||||
@ -621,10 +628,10 @@
|
|||||||
this.searchGoodsName = '';
|
this.searchGoodsName = '';
|
||||||
this.searchGoodsShow = true;
|
this.searchGoodsShow = true;
|
||||||
this.pageType = 1;
|
this.pageType = 1;
|
||||||
} else if(type==2) {
|
} else if (type == 2) {
|
||||||
this.scanCode();
|
this.scanCode();
|
||||||
this.pageType = 1;
|
this.pageType = 1;
|
||||||
}else {
|
} else {
|
||||||
// this.photograph();
|
// this.photograph();
|
||||||
// this.pageType = 2;
|
// this.pageType = 2;
|
||||||
this.jumpAddGoods(type);
|
this.jumpAddGoods(type);
|
||||||
@ -648,17 +655,17 @@
|
|||||||
return regex.test(str);
|
return regex.test(str);
|
||||||
},
|
},
|
||||||
async seachBarCode(code) {
|
async seachBarCode(code) {
|
||||||
if(code.length<12){
|
if (code.length < 12) {
|
||||||
return Toast('条形码长度不正确, 请重试!')
|
return Toast('条形码长度不正确, 请重试!')
|
||||||
}
|
}
|
||||||
this.showModelCode = code;
|
this.showModelCode = code;
|
||||||
console.log('扫码的值', code);
|
console.log('扫码的值', code);
|
||||||
if(!this.isStartsWith6Or06(code)) {
|
if (!this.isStartsWith6Or06(code)) {
|
||||||
Toast('暂不支持进口商品!');
|
Toast('暂不支持进口商品!');
|
||||||
this.$u.sleep(1200).then(()=>{
|
this.$u.sleep(1200).then(() => {
|
||||||
this.showModel = true;
|
this.showModel = true;
|
||||||
})
|
})
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
@ -690,17 +697,17 @@
|
|||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log('错误', err);
|
console.log('错误', err);
|
||||||
Toast(err);
|
Toast(err);
|
||||||
this.$u.sleep(1200).then(()=>{
|
this.$u.sleep(1200).then(() => {
|
||||||
this.showModel = true;
|
this.showModel = true;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// 拍照
|
// 拍照
|
||||||
photograph(){
|
photograph() {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
crop:{
|
crop: {
|
||||||
width: 1024,
|
width: 1024,
|
||||||
height: 1024,
|
height: 1024,
|
||||||
resize: false
|
resize: false
|
||||||
@ -710,37 +717,39 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
navToAdd(){
|
navToAdd() {
|
||||||
let url;
|
let url;
|
||||||
if(this.showModelCode) url = `/pages/product/addGood/addGood?mer_id=${this.mer_id}&code=${this.showModelCode}`;
|
if (this.showModelCode) url =
|
||||||
|
`/pages/product/addGood/addGood?mer_id=${this.mer_id}&code=${this.showModelCode}`;
|
||||||
else url = `/pages/product/addGood/addGood?mer_id=${this.mer_id}`;
|
else url = `/pages/product/addGood/addGood?mer_id=${this.mer_id}`;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:url,
|
url: url,
|
||||||
success:()=> {
|
success: () => {
|
||||||
this.showModel = false;
|
this.showModel = false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 跳转添加商品界面
|
// 跳转添加商品界面
|
||||||
jumpAddGoods(type=3) {
|
jumpAddGoods(type = 3) {
|
||||||
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);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(type==4){ // 个人商户
|
if (type == 4) { // 个人商户
|
||||||
navigateTo(1, '/pages/product/addGood/addGood_one', {
|
navigateTo(1, '/pages/product/addGood/addGood_one', {
|
||||||
mer_id: this.mer_id
|
mer_id: this.mer_id
|
||||||
});
|
});
|
||||||
// navigateTo(1, '/pages/product/addGood/addGood', {
|
// navigateTo(1, '/pages/product/addGood/addGood', {
|
||||||
// mer_id: this.mer_id
|
// mer_id: this.mer_id
|
||||||
// });
|
// });
|
||||||
} else if(this.userInfo.mer_info.type_code=='TypeSupplyChain') {
|
} else if (this.userInfo.mer_info.type_code == 'TypeSupplyChain') {
|
||||||
navigateTo(1, '/pages/product/addGood/addGood_supply', {
|
navigateTo(1, '/pages/product/addGood/addGood_supply', {
|
||||||
mer_id: this.mer_id
|
mer_id: this.mer_id
|
||||||
});
|
});
|
||||||
@ -812,22 +821,25 @@
|
|||||||
font-size: 32.09rpx;
|
font-size: 32.09rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img{
|
.img {
|
||||||
width: 90rpx;
|
width: 90rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.select_item1{
|
.select_item1 {
|
||||||
background: linear-gradient(to right, #ffba00, #ff9000) !important;
|
background: linear-gradient(to right, #ffba00, #ff9000) !important;
|
||||||
}
|
}
|
||||||
.select_item2{
|
|
||||||
|
.select_item2 {
|
||||||
background: linear-gradient(to right, #459eff, #0a60ff) !important;
|
background: linear-gradient(to right, #459eff, #0a60ff) !important;
|
||||||
}
|
}
|
||||||
.select_item3{
|
|
||||||
|
.select_item3 {
|
||||||
background: linear-gradient(to right, #ff7245, #ff3f02) !important;
|
background: linear-gradient(to right, #ff7245, #ff3f02) !important;
|
||||||
}
|
}
|
||||||
.select_item4{
|
|
||||||
|
.select_item4 {
|
||||||
background: linear-gradient(to right, #2be45d, #02bb34) !important;
|
background: linear-gradient(to right, #2be45d, #02bb34) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1301,6 +1313,7 @@
|
|||||||
|
|
||||||
.list-box-put {
|
.list-box-put {
|
||||||
padding-bottom: 30rpx;
|
padding-bottom: 30rpx;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
width: 694rpx;
|
width: 694rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@ -1330,7 +1343,8 @@
|
|||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn{
|
|
||||||
|
.btn {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
@ -1346,6 +1360,7 @@
|
|||||||
|
|
||||||
.text-info {
|
.text-info {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
@ -1399,25 +1414,28 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.photo-box{
|
.photo-box {
|
||||||
.card{
|
.card {
|
||||||
width: 694rpx;
|
width: 694rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
.card-head{
|
|
||||||
|
.card-head {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
.img-list{
|
|
||||||
|
.img-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.img{
|
|
||||||
|
.img {
|
||||||
width: 210rpx;
|
width: 210rpx;
|
||||||
height: 210rpx;
|
height: 210rpx;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 15rpx;
|
||||||
@ -1425,13 +1443,14 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.img-list2{
|
|
||||||
|
.img-list2 {
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
.img{
|
|
||||||
|
.img {
|
||||||
margin-right: 16rpx;
|
margin-right: 16rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
@ -8,8 +8,8 @@
|
|||||||
placeholder-class="inputPlaceHolder" />
|
placeholder-class="inputPlaceHolder" />
|
||||||
</view>
|
</view>
|
||||||
<view class="input_content_textarea">
|
<view class="input_content_textarea">
|
||||||
<textarea v-model="setFormData.store_name" placeholder="请输入商品名称" placeholder-class="placeholderStyle"
|
<textarea v-model="setFormData.store_name" placeholder="请输入商品名称"
|
||||||
maxlength="60" />
|
placeholder-class="placeholderStyle" maxlength="60" />
|
||||||
<view class="flex" style="justify-content: space-between;color: #999999;">
|
<view class="flex" style="justify-content: space-between;color: #999999;">
|
||||||
<view>(品牌,名称,规格,口味)</view>
|
<view>(品牌,名称,规格,口味)</view>
|
||||||
<view>
|
<view>
|
||||||
@ -21,13 +21,15 @@
|
|||||||
<view class="photo_count">
|
<view class="photo_count">
|
||||||
<text class="photo_size" style="color: #e93323;">建议:图片尺寸为750*750px, 上传2张以上</text>
|
<text class="photo_size" style="color: #e93323;">建议:图片尺寸为750*750px, 上传2张以上</text>
|
||||||
<view class="input_content_photo">
|
<view class="input_content_photo">
|
||||||
<view class="input_content_photo_adPh" v-for="(item, index) in setFormData.imageList" :key="index">
|
<view class="input_content_photo_adPh" v-for="(item, index) in setFormData.imageList"
|
||||||
|
:key="index">
|
||||||
<image :src="item" class="myimg2 photos" @click="pop(item)"></image>
|
<image :src="item" class="myimg2 photos" @click="pop(item)"></image>
|
||||||
<view class="input_content_photo_adPh_jiao" @click="deleteImage(index)">
|
<view class="input_content_photo_adPh_jiao" @click="deleteImage(index)">
|
||||||
<image src="../static/images/close.png" mode=""></image>
|
<image src="../static/images/close.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="setFormData.imageList.length < 9" class="input_content_photo_adPh addBtn" @click="clk">
|
<view v-if="setFormData.imageList.length < 9" class="input_content_photo_adPh addBtn"
|
||||||
|
@click="clk">
|
||||||
<view>
|
<view>
|
||||||
<image src="../static/images/creamer.png" mode="widthFix"></image>
|
<image src="../static/images/creamer.png" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -35,15 +37,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-popup ref="select_popup" class="pop" :show="show" mode="center" closeOnClickOverlay bgColor='transparent'>
|
<u-popup ref="select_popup" class="pop" :show="show" mode="center" closeOnClickOverlay
|
||||||
|
bgColor='transparent'>
|
||||||
<image :src="image"></image>
|
<image :src="image"></image>
|
||||||
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
|
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 商品详情 -->
|
<!-- 商品详情 -->
|
||||||
<commodityComponent ref="commodityRef" v-if="showCommodity" :key="showCommodity" :showCommodity="showCommodity"
|
<commodityComponent ref="commodityRef" v-if="showCommodity" :key="showCommodity"
|
||||||
:product_id="product_id" :merId="merId" :code="code">
|
:showCommodity="showCommodity" :product_id="product_id" :merId="merId" :code="code">
|
||||||
</commodityComponent>
|
</commodityComponent>
|
||||||
|
|
||||||
<view class="popup_group">
|
<view class="popup_group">
|
||||||
@ -80,7 +83,8 @@
|
|||||||
|
|
||||||
<!-- 选择平台分类弹框 -->
|
<!-- 选择平台分类弹框 -->
|
||||||
<uni-popup ref="select_platform" type="bottom">
|
<uni-popup ref="select_platform" type="bottom">
|
||||||
<platfrom @close="closePlatfrom" :classifiedData="platformClassificationData" @getPlatData="getPlatData">
|
<platfrom @close="closePlatfrom" :classifiedData="platformClassificationData"
|
||||||
|
@getPlatData="getPlatData">
|
||||||
</platfrom>
|
</platfrom>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
<!-- 选择店铺分类弹框 -->
|
<!-- 选择店铺分类弹框 -->
|
||||||
@ -98,14 +102,15 @@
|
|||||||
<view class="popup_group_item_label">商品规格</view>
|
<view class="popup_group_item_label">商品规格</view>
|
||||||
<view class="popup_group_item_value">
|
<view class="popup_group_item_value">
|
||||||
<view class="popup_group_item_message">
|
<view class="popup_group_item_message">
|
||||||
<span class="popup_group_item_message_value">{{ setFormData.spec_type==0?'单规格':'多规格' }}</span>
|
<span
|
||||||
|
class="popup_group_item_message_value">{{ setFormData.spec_type==0?'单规格':'多规格' }}</span>
|
||||||
</view>
|
</view>
|
||||||
<view><span class="iconfont"></span></view>
|
<view><span class="iconfont"></span></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-modal :show="showSpecType" title="温馨提示" content="切换后商品原有规格将失效,是否继续?" show-cancel-button confirm-text="继续"
|
<u-modal :show="showSpecType" title="温馨提示" content="切换后商品原有规格将失效,是否继续?" show-cancel-button
|
||||||
@confirm="changeSpecType2" @cancel="showSpecType=false"></u-modal>
|
confirm-text="继续" @confirm="changeSpecType2" @cancel="showSpecType=false"></u-modal>
|
||||||
</picker>
|
</picker>
|
||||||
<priceComponent v-if="setFormData.spec_type==0" :datas="setFormData.attrValue[0]" ref="priceRef"
|
<priceComponent v-if="setFormData.spec_type==0" :datas="setFormData.attrValue[0]" ref="priceRef"
|
||||||
:product_id="product_id" :bar_code="code" @updateCode="updateCode">
|
:product_id="product_id" :bar_code="code" @updateCode="updateCode">
|
||||||
@ -139,8 +144,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="input_content_describe_textarea">
|
<view class="input_content_describe_textarea">
|
||||||
<textarea v-model="setFormData.store_info" style="width: 100%;" value="" placeholder="请填写商品简介"
|
<textarea v-model="setFormData.store_info" style="width: 100%;" value=""
|
||||||
placeholderClass="placeholderClass" maxlength="200" />
|
placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -162,7 +167,8 @@
|
|||||||
<checkbox-group class="select_group flex_start" @change="changeDelivery">
|
<checkbox-group class="select_group flex_start" @change="changeDelivery">
|
||||||
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
|
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
|
||||||
<view>
|
<view>
|
||||||
<checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value+'')" />
|
<checkbox :value="val.value"
|
||||||
|
:checked="setFormData.delivery_way.includes(val.value+'')" />
|
||||||
</view>
|
</view>
|
||||||
<view>{{ val.name }}</view>
|
<view>{{ val.name }}</view>
|
||||||
</label>
|
</label>
|
||||||
@ -249,7 +255,7 @@
|
|||||||
delivery_way: ['1', '2'], // 配送方式 1 到店核销 2 快递配送
|
delivery_way: ['1', '2'], // 配送方式 1 到店核销 2 快递配送
|
||||||
delivery_free: '1', // 是否包邮 0不包邮 1包邮
|
delivery_free: '1', // 是否包邮 0不包邮 1包邮
|
||||||
temp_id: '', // 运费模板ID
|
temp_id: '', // 运费模板ID
|
||||||
tempName: '' ,// 运费模板名称
|
tempName: '', // 运费模板名称
|
||||||
once_min_count: '', //最少购买件数
|
once_min_count: '', //最少购买件数
|
||||||
},
|
},
|
||||||
platformClassificationData: [], // 平台分类数据
|
platformClassificationData: [], // 平台分类数据
|
||||||
@ -285,7 +291,7 @@
|
|||||||
// if (!opt.product_id) this.showCommodity = true;
|
// if (!opt.product_id) this.showCommodity = true;
|
||||||
this.showCommodity = true;
|
this.showCommodity = true;
|
||||||
this.initData();
|
this.initData();
|
||||||
this.initClasiffy();
|
|
||||||
if (this.import == 1) {
|
if (this.import == 1) {
|
||||||
this.getOpenerEventChannel().once('importAttrValue', (e) => {
|
this.getOpenerEventChannel().once('importAttrValue', (e) => {
|
||||||
this.attrValue = e.attrValue;
|
this.attrValue = e.attrValue;
|
||||||
@ -315,6 +321,7 @@
|
|||||||
},
|
},
|
||||||
onBackPress() {},
|
onBackPress() {},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.initClasiffy();
|
||||||
// this.setFormData = Object.assign(this.setFormData, {
|
// this.setFormData = Object.assign(this.setFormData, {
|
||||||
// "store_name": "方法",
|
// "store_name": "方法",
|
||||||
// "imageList": [
|
// "imageList": [
|
||||||
@ -364,7 +371,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeDelivery(e){
|
changeDelivery(e) {
|
||||||
this.setFormData.delivery_way = e.detail.value;
|
this.setFormData.delivery_way = e.detail.value;
|
||||||
},
|
},
|
||||||
// 查询详情数据
|
// 查询详情数据
|
||||||
@ -393,18 +400,20 @@
|
|||||||
delivery_way: [], // 配送方式 1 到店核销 2 快递配送
|
delivery_way: [], // 配送方式 1 到店核销 2 快递配送
|
||||||
delivery_free: '0', // 是否包邮 0不包邮 1包邮
|
delivery_free: '0', // 是否包邮 0不包邮 1包邮
|
||||||
temp_id: '', // 运费模板ID
|
temp_id: '', // 运费模板ID
|
||||||
tempName: '' ,// 运费模板名称
|
tempName: '', // 运费模板名称
|
||||||
once_min_count: '', //最小购买数量
|
once_min_count: '', //最小购买数量
|
||||||
};
|
};
|
||||||
productDetail(this.merId, this.product_id).then(async (res) => {
|
productDetail(this.merId, this.product_id).then(async (res) => {
|
||||||
this.showCommodity = true;
|
this.showCommodity = true;
|
||||||
if (res.data.content_arr&&res.data.content_arr.length > 0) res.data.content = res.data.content_arr;
|
if (res.data.content_arr && res.data.content_arr.length > 0) res.data.content = res.data
|
||||||
|
.content_arr;
|
||||||
let editGoodsDetils = res.data;
|
let editGoodsDetils = res.data;
|
||||||
Object.keys(this.setFormData).forEach(item => {
|
Object.keys(this.setFormData).forEach(item => {
|
||||||
this.setFormData[item] = editGoodsDetils[item];
|
this.setFormData[item] = editGoodsDetils[item];
|
||||||
});
|
});
|
||||||
this.setFormData.product_id = this.product_id;
|
this.setFormData.product_id = this.product_id;
|
||||||
this.setFormData.imageList = [...(this.setFormData.image ? [this.setFormData.image] : []), ...
|
this.setFormData.imageList = [...(this.setFormData.image ? [this.setFormData.image] : []),
|
||||||
|
...
|
||||||
this
|
this
|
||||||
.setFormData.slider_image
|
.setFormData.slider_image
|
||||||
];
|
];
|
||||||
@ -412,8 +421,10 @@
|
|||||||
this.setFormData.mer_cate_name = editGoodsDetils.merCateId ? editGoodsDetils.merCateId.map(
|
this.setFormData.mer_cate_name = editGoodsDetils.merCateId ? editGoodsDetils.merCateId.map(
|
||||||
item => item
|
item => item
|
||||||
.category && item.category.cate_name).join(',') : '';
|
.category && item.category.cate_name).join(',') : '';
|
||||||
this.setFormData.brand_name = editGoodsDetils.brand ? editGoodsDetils.brand.brand_name : '';
|
this.setFormData.brand_name = editGoodsDetils.brand ? editGoodsDetils.brand.brand_name :
|
||||||
if (res.data.content && typeof res.data.content == 'string') res.data.content = JSON.parse(res.data
|
'';
|
||||||
|
if (res.data.content && typeof res.data.content == 'string') res.data.content = JSON.parse(
|
||||||
|
res.data
|
||||||
.content);
|
.content);
|
||||||
this.setFormData.once_min_count <= 0 ? this.setFormData.once_min_count = '' : null;
|
this.setFormData.once_min_count <= 0 ? this.setFormData.once_min_count = '' : null;
|
||||||
this.setFormData.delivery_way = res.data.delivery_way;
|
this.setFormData.delivery_way = res.data.delivery_way;
|
||||||
@ -619,7 +630,7 @@
|
|||||||
if (this.setFormData.spec_type == 0) {
|
if (this.setFormData.spec_type == 0) {
|
||||||
console.log('价格库存', this.$refs.priceRef.singleSpecification);
|
console.log('价格库存', this.$refs.priceRef.singleSpecification);
|
||||||
}
|
}
|
||||||
if(this.setFormData.delivery_way.length==0) return Toast('请至少选择一种送货方式');
|
if (this.setFormData.delivery_way.length == 0) return Toast('请至少选择一种送货方式');
|
||||||
let postData = {
|
let postData = {
|
||||||
...this.setFormData,
|
...this.setFormData,
|
||||||
...this.$refs.commodityRef.addGoodsSecoundData,
|
...this.$refs.commodityRef.addGoodsSecoundData,
|
||||||
@ -661,7 +672,7 @@
|
|||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
|
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
|
||||||
})
|
})
|
||||||
}).catch(()=>{
|
}).catch(() => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -680,7 +691,7 @@
|
|||||||
} else uni.redirectTo({
|
} else uni.redirectTo({
|
||||||
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
|
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
|
||||||
})
|
})
|
||||||
}).catch(()=>{
|
}).catch(() => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container_input">
|
<view class="container_input">
|
||||||
<view class="container_input_item" v-for="(item, index) in platformClassification" :key="index" @click="selectItem(item)" v-if="!item.DoNotShow">
|
<view class="container_input_item" v-for="(item, index) in platformClassification" :key="index"
|
||||||
<view class="select_and_input" v-if="item.type == 'select' || item.type == 'input' || item.type == 'switch' || item.type == 'number' || item.type == 'digit'">
|
@click="selectItem(item)" v-if="!item.DoNotShow">
|
||||||
|
<view class="select_and_input"
|
||||||
|
v-if="item.type == 'select' || item.type == 'input' || item.type == 'switch' || item.type == 'number' || item.type == 'digit'">
|
||||||
<view v-if="item.require" style="color: #e93323;">*</view>
|
<view v-if="item.require" style="color: #e93323;">*</view>
|
||||||
<view class="container_input_item_label">
|
<view class="container_input_item_label">
|
||||||
<text class="select_check" :class="{ select: item.select }" @click.stop="selectRadio(item)" v-if="Object.keys(item).indexOf('select') != -1">
|
<text class="select_check" :class="{ select: item.select }" @click.stop="selectRadio(item)"
|
||||||
|
v-if="Object.keys(item).indexOf('select') != -1">
|
||||||
<text v-if="item.select" class="iconfont"></text>
|
<text v-if="item.select" class="iconfont"></text>
|
||||||
</text>
|
</text>
|
||||||
<text class="select_label line1">{{ item.label }}</text>
|
<text class="select_label line1">{{ item.label }}</text>
|
||||||
@ -15,23 +18,28 @@
|
|||||||
<text class="iconfont"></text>
|
<text class="iconfont"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="container_input_item_value" v-if="item.type == 'number'">
|
<view class="container_input_item_value" v-if="item.type == 'number'">
|
||||||
<input v-model="formData[item.model]" type="number" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
|
<input v-model="formData[item.model]" type="number" value="" :placeholder="item.holder"
|
||||||
|
placeholder-class="inputPlaceHolder" />
|
||||||
</view>
|
</view>
|
||||||
<view class="container_input_item_value" v-if="item.type == 'digit'">
|
<view class="container_input_item_value" v-if="item.type == 'digit'">
|
||||||
<input v-model="formData[item.model]" type="digit" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
|
<input v-model="formData[item.model]" type="digit" value="" :placeholder="item.holder"
|
||||||
|
placeholder-class="inputPlaceHolder" />
|
||||||
</view>
|
</view>
|
||||||
<view class="container_input_item_value" v-if="item.type == 'input'">
|
<view class="container_input_item_value" v-if="item.type == 'input'">
|
||||||
<input v-model="formData[item.model]" type="text" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
|
<input v-model="formData[item.model]" type="text" value="" :placeholder="item.holder"
|
||||||
|
placeholder-class="inputPlaceHolder" />
|
||||||
</view>
|
</view>
|
||||||
<view class="container_input_item_value" v-if="item.type == 'switch'">
|
<view class="container_input_item_value" v-if="item.type == 'switch'">
|
||||||
<switch :checked="formData[item.model] == 1" color="#E93323" style="transform:scale(0.8)" @change="switchChange($event, item)" />
|
<switch :checked="formData[item.model] == 1" color="#E93323" style="transform:scale(0.8)"
|
||||||
|
@change="switchChange($event, item)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="radio" v-if="item.type == 'radio' || item.type == 'check'">
|
<view class="radio" v-if="item.type == 'radio' || item.type == 'check'">
|
||||||
<view class="container_input_item_label">{{ item.label }}</view>
|
<view class="container_input_item_label">{{ item.label }}</view>
|
||||||
<view class="container_input_item_value flex_start" v-if="item.type == 'radio'">
|
<view class="container_input_item_value flex_start" v-if="item.type == 'radio'">
|
||||||
<radio-group class="select_group" @change="radioChange($event, item)">
|
<radio-group class="select_group" @change="radioChange($event, item)">
|
||||||
<label class="container_input_item_value_select" v-for="(val, i) in item.radioList" :key="val.value">
|
<label class="container_input_item_value_select" v-for="(val, i) in item.radioList"
|
||||||
|
:key="val.value">
|
||||||
<view>
|
<view>
|
||||||
<radio :value="val.value" :checked="val.value == item.inforValue" />
|
<radio :value="val.value" :checked="val.value == item.inforValue" />
|
||||||
</view>
|
</view>
|
||||||
@ -41,9 +49,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="container_input_item_value flex_start" v-if="item.type == 'check'">
|
<view class="container_input_item_value flex_start" v-if="item.type == 'check'">
|
||||||
<checkbox-group class="select_group" @change="checkChange($event, item)">
|
<checkbox-group class="select_group" @change="checkChange($event, item)">
|
||||||
<label class="container_input_item_value_select" v-for="(val, i) in item.checkList" :key="val.value">
|
<label class="container_input_item_value_select" v-for="(val, i) in item.checkList"
|
||||||
|
:key="val.value">
|
||||||
<view>
|
<view>
|
||||||
<checkbox class="chenk_list" :value="val.value" :checked="val.value == item.inforValue" />
|
<checkbox class="chenk_list" :value="val.value"
|
||||||
|
:checked="val.value == item.inforValue" />
|
||||||
</view>
|
</view>
|
||||||
<view>{{ val.name }}</view>
|
<view>{{ val.name }}</view>
|
||||||
</label>
|
</label>
|
||||||
@ -54,7 +64,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/*
|
/*
|
||||||
item参数
|
item参数
|
||||||
id:
|
id:
|
||||||
type: select
|
type: select
|
||||||
@ -63,11 +73,11 @@
|
|||||||
select 有此key值时,可进行选择逻辑
|
select 有此key值时,可进行选择逻辑
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
platformClassification: {
|
platformClassification: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default() {
|
default () {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -87,27 +97,31 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
formData: {
|
formData: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.$emit('input',val)
|
this.$emit('input', val)
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.formData = val
|
this.formData = val;
|
||||||
|
|
||||||
|
// 需求方要求为空 直接输入 不需要默认值
|
||||||
|
this.formData.price = '';
|
||||||
|
this.formData.stock = '';
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.platformClassification.forEach(item => {
|
this.platformClassification.forEach(item => {
|
||||||
if(item.inforValue) {
|
if (item.inforValue) {
|
||||||
this.$emit('formInitData', item.inforValue, item.model);
|
this.$emit('formInitData', item.inforValue, item.model);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectItem(item) {
|
selectItem(item) {
|
||||||
if(item.jumpLogic) {
|
if (item.jumpLogic) {
|
||||||
// 执行跳转新界面逻辑暴露的方法
|
// 执行跳转新界面逻辑暴露的方法
|
||||||
this.$emit('handleJumpLogic', item);
|
this.$emit('handleJumpLogic', item);
|
||||||
return;
|
return;
|
||||||
@ -131,23 +145,25 @@ export default {
|
|||||||
this.$emit('checkChange', e.detail.value, item);
|
this.$emit('checkChange', e.detail.value, item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container_input {
|
.container_input {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
margin-top: 31rpx;
|
margin-top: 31rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
|
||||||
&_item {
|
&_item {
|
||||||
.select_and_input {
|
.select_and_input {
|
||||||
height: 106rpx;
|
height: 106rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.greyColor {
|
.greyColor {
|
||||||
color: #bbbbbb;
|
color: #bbbbbb;
|
||||||
}
|
}
|
||||||
@ -163,9 +179,11 @@ export default {
|
|||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.select_label{
|
|
||||||
|
.select_label {
|
||||||
max-width: 520rpx;
|
max-width: 520rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select_check {
|
.select_check {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -184,11 +202,13 @@ export default {
|
|||||||
.select {
|
.select {
|
||||||
background: #e93323;
|
background: #e93323;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&_value {
|
&_value {
|
||||||
padding-right: 10rpx;
|
padding-right: 10rpx;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@ -196,10 +216,11 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
> span:nth-child(1) {
|
>span:nth-child(1) {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 15rpx;
|
margin-right: 15rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
color: #000;
|
color: #000;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -229,12 +250,13 @@ export default {
|
|||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> view:not(:last-child) {
|
|
||||||
|
>view:not(:last-child) {
|
||||||
border-bottom: 1px solid #eeeeee;
|
border-bottom: 1px solid #eeeeee;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputPlaceHolder {
|
.inputPlaceHolder {
|
||||||
color: #bbbbbb;
|
color: #bbbbbb;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -2,7 +2,7 @@
|
|||||||
<view class="area_container">
|
<view class="area_container">
|
||||||
<view class="area_container_title">
|
<view class="area_container_title">
|
||||||
<navigator :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`" hover-class="none"
|
<navigator :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`" hover-class="none"
|
||||||
class="manage_btn">管理</navigator>
|
class="manage_btn">新增分类</navigator>
|
||||||
<view class="area_container_title_name">选择店铺分类</view>
|
<view class="area_container_title_name">选择店铺分类</view>
|
||||||
<view class="area_container_title_close" @click="close"><text class="iconfont"></text></view>
|
<view class="area_container_title_close" @click="close"><text class="iconfont"></text></view>
|
||||||
</view>
|
</view>
|
||||||
@ -25,7 +25,8 @@
|
|||||||
<scroll-view scroll-y="true" class="scroll">
|
<scroll-view scroll-y="true" class="scroll">
|
||||||
<view v-for="(item, index) in areaList" :key="index" class="selectList_area_item">
|
<view v-for="(item, index) in areaList" :key="index" class="selectList_area_item">
|
||||||
<view class="selectList_area_item_name" @click="selectArea(item)">{{ item.cate_name }}</view>
|
<view class="selectList_area_item_name" @click="selectArea(item)">{{ item.cate_name }}</view>
|
||||||
<view @click="handlyAddSelect(item)" v-if="!item.children"><text class="iconfont"></text></view>
|
<view @click="handlyAddSelect(item)" v-if="!item.children"><text
|
||||||
|
class="iconfont"></text></view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
@ -37,7 +38,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { serialize, Toast } from '@/libs/uniApi.js';
|
import {
|
||||||
|
serialize,
|
||||||
|
Toast
|
||||||
|
} from '@/libs/uniApi.js';
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
allReadySelect: {
|
allReadySelect: {
|
||||||
@ -95,7 +99,6 @@
|
|||||||
this.isShowLastItem = false;
|
this.isShowLastItem = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// console.log(item);
|
|
||||||
// 如果title被选中,选择子项时,删除后面所有title——item
|
// 如果title被选中,选择子项时,删除后面所有title——item
|
||||||
if (this.selectTapIndex > -1) {
|
if (this.selectTapIndex > -1) {
|
||||||
this.tapList.splice(this.selectTapIndex, 999);
|
this.tapList.splice(this.selectTapIndex, 999);
|
||||||
@ -162,7 +165,10 @@
|
|||||||
.join('/') +
|
.join('/') +
|
||||||
'/' +
|
'/' +
|
||||||
item.name;
|
item.name;
|
||||||
this.selectList.push({ ...item, name: str });
|
this.selectList.push({
|
||||||
|
...item,
|
||||||
|
name: str
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 删除所选地址
|
// 删除所选地址
|
||||||
delSelectItem(item, index) {
|
delSelectItem(item, index) {
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 相关凭证 -->
|
<!-- 相关凭证 -->
|
||||||
<view class="withdrawal-envidence">
|
<!-- <view class="withdrawal-envidence">
|
||||||
<view class="withdrawal-envidence">
|
<view class="withdrawal-envidence">
|
||||||
<text class="withdrawal-envidence-main">请上传相关凭证</text>
|
<text class="withdrawal-envidence-main">请上传相关凭证</text>
|
||||||
<text class="withdrawal-envidence-sub">(图片格式支持JPG、PNG、JPEG)</text>
|
<text class="withdrawal-envidence-sub">(图片格式支持JPG、PNG、JPEG)</text>
|
||||||
@ -102,9 +102,11 @@
|
|||||||
<text>上传凭证</text>
|
<text>上传凭证</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view style="color: #FE2121;font-size:24rpx;margin-top: 20rpx;">
|
<view style="color: #FE2121;font-size:24rpx;margin-top: 20rpx;">
|
||||||
锁定规则为连续输入超过3次后或当日总次数超过10次后锁定。恢复规则分为12时后恢复和次日0时恢复。锁定期间建议不要重复提交绑定,否则锁定时间会相应延长。
|
锁定规则:错误输入超 3 次后锁定。<br>
|
||||||
|
恢复规则:12 时后或次日 0 时恢复。<br>
|
||||||
|
温馨提示:锁定期间勿重复提交绑定,否则锁定时间延长。
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -148,7 +150,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="color: #FE2121;font-size:24rpx;margin-top: 20rpx;">
|
<view style="color: #FE2121;font-size:24rpx;margin-top: 20rpx;">
|
||||||
锁定规则为连续输入超过3次后或当日总次数超过10次后锁定。恢复规则分为12时后恢复和次日0时恢复。锁定期间建议不要重复提交绑定,否则锁定时间会相应延长。
|
锁定规则:错误输入超 3 次后锁定。<br>
|
||||||
|
恢复规则:12 时后或次日 0 时恢复。<br>
|
||||||
|
温馨提示:锁定期间勿重复提交绑定,否则锁定时间延长。
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -265,9 +269,9 @@
|
|||||||
Object.assign(this.bindForm, res.data.financial_account);
|
Object.assign(this.bindForm, res.data.financial_account);
|
||||||
this.bindForm.id = res.data.id;
|
this.bindForm.id = res.data.id;
|
||||||
this.mer_id = this.bindForm.mer_id;
|
this.mer_id = this.bindForm.mer_id;
|
||||||
if (this.bindForm.is_own === 0 && this.bindForm.financial_img) {
|
// if (this.bindForm.is_own === 0 && this.bindForm.financial_img) {
|
||||||
this.$set(this.bindForm, 'temp', this.bindForm.financial_img.split(","));
|
// this.$set(this.bindForm, 'temp', this.bindForm.financial_img.split(","));
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -336,10 +340,10 @@
|
|||||||
|
|
||||||
// 法人账号验证
|
// 法人账号验证
|
||||||
if (this.bindForm.is_own === 0) {
|
if (this.bindForm.is_own === 0) {
|
||||||
if (!this.bindForm.temp.length > 0) return this.$util.Tips({
|
// if (!this.bindForm.temp.length > 0) return this.$util.Tips({
|
||||||
title: '请上传凭证!'
|
// title: '请上传凭证!'
|
||||||
});
|
// });
|
||||||
this.bindForm.financial_img = this.bindForm.temp.join(",");
|
// this.bindForm.financial_img = this.bindForm.temp.join(",");
|
||||||
|
|
||||||
if (!uni.$u.test.idCard(this.bindForm.id_card)) return this.$util.Tips({
|
if (!uni.$u.test.idCard(this.bindForm.id_card)) return this.$util.Tips({
|
||||||
title: '请输入正确的身份证号!'
|
title: '请输入正确的身份证号!'
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
<!-- 协议 -->
|
<!-- 协议 -->
|
||||||
<view class="withdrawal-pro">
|
<view class="withdrawal-pro">
|
||||||
<text class="withdrawal-pro-txt" @click="handlePreview">《企业授权法人提现书》</text>
|
<!-- <text class="withdrawal-pro-txt" @click="handlePreview">《企业授权法人提现书》</text> -->
|
||||||
<text class="withdrawal-pro-progress" @click="viewProgress">查看审核进度</text>
|
<text class="withdrawal-pro-progress" @click="viewProgress">查看审核进度</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -122,15 +122,16 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 提现btn -->
|
<!-- 提现btn -->
|
||||||
<view class="withdrawal-btn tapActive" @click="handleSubmit">
|
<view class="withdrawal-btn tapActive" @click="handleSubmit" v-if="bankList.length != 0">
|
||||||
<view class="withdrawal-btn-wrap">
|
<view class="withdrawal-btn-wrap">
|
||||||
<text v-if="bankList.length == 0">点击查看审核进度</text>
|
<!-- <text v-if="bankList.length == 0">点击查看审核进度</text> -->
|
||||||
<text v-else>点击提现</text>
|
<text>点击提现</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 明细按钮 -->
|
<!-- 明细按钮 -->
|
||||||
<view class="saomaCode" @click="navigator(`/pages/users/gather_list/index?mer_id=${mer_id}`)">明细</view>
|
<view class="saomaCode" @click="navigator(`/pages/users/gather_list/index?mer_id=${mer_id}`)"
|
||||||
|
v-if="bankList.length != 0">明细</view>
|
||||||
|
|
||||||
<!-- 提现提示 -->
|
<!-- 提现提示 -->
|
||||||
<u-modal :show="tipShow" title="提示"
|
<u-modal :show="tipShow" title="提示"
|
||||||
@ -189,8 +190,6 @@
|
|||||||
this.getBankInfo();
|
this.getBankInfo();
|
||||||
// 用户信息
|
// 用户信息
|
||||||
this.userInfo = JSON.parse(this.$Cache.get("USER_INFO"));
|
this.userInfo = JSON.parse(this.$Cache.get("USER_INFO"));
|
||||||
|
|
||||||
console.log(this.userInfo.mer_info.is_company)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -202,15 +201,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 图片预览
|
// 图片预览
|
||||||
handlePreview() {
|
// handlePreview() {
|
||||||
let that = this;
|
// let that = this;
|
||||||
if (this.bankInfo && this.bankInfo.financial_account.financial_img) {
|
// if (this.bankInfo && this.bankInfo.financial_account.financial_img) {
|
||||||
uni.previewImage({
|
// uni.previewImage({
|
||||||
urls: that.bankInfo.financial_account.financial_img.split(','),
|
// urls: that.bankInfo.financial_account.financial_img.split(','),
|
||||||
current: 0
|
// current: 0
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
// 添加账户
|
// 添加账户
|
||||||
handleToAdd() {
|
handleToAdd() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user