Compare commits
136 Commits
main
...
pre-releas
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8d3e871c6c | ||
![]() |
aa3e8e8b6b | ||
![]() |
0810b43ff8 | ||
![]() |
707e8635b9 | ||
![]() |
b9567e1099 | ||
![]() |
a0950db415 | ||
![]() |
8eb4c1f97d | ||
![]() |
fc96dceea9 | ||
![]() |
04abb8b1b9 | ||
![]() |
b7be7ef93e | ||
![]() |
5d29f788c3 | ||
ff2c438d88 | |||
ecbbdee9ce | |||
dd214e72f3 | |||
7ce5b1ce33 | |||
![]() |
47a2387fb6 | ||
![]() |
939406afba | ||
![]() |
065cb758ef | ||
![]() |
bd39369d24 | ||
![]() |
1bc054be5d | ||
fdd60d7eb1 | |||
![]() |
a96332fa2d | ||
![]() |
31cce22ba3 | ||
c4e545d92d | |||
5d3981c27e | |||
![]() |
1d63aad673 | ||
![]() |
39a49b1b43 | ||
![]() |
c5a5557da8 | ||
a6c5f9581a | |||
515b0ace72 | |||
94b7c1aaaf | |||
![]() |
189a7000b9 | ||
![]() |
df9a67f164 | ||
![]() |
8bb249a2b5 | ||
![]() |
e5b880933c | ||
![]() |
765f13eea4 | ||
![]() |
895ad285b1 | ||
![]() |
0c6e085b65 | ||
![]() |
2f6ca46b15 | ||
![]() |
c3c658671b | ||
![]() |
c104b03819 | ||
![]() |
9b6befad9c | ||
![]() |
f84d98efd6 | ||
![]() |
eaff04f995 | ||
![]() |
fd5181b55c | ||
![]() |
613742e706 | ||
![]() |
9c08d45e09 | ||
![]() |
448733a1c8 | ||
![]() |
04204cb0fc | ||
![]() |
0aed25b996 | ||
![]() |
2792269537 | ||
![]() |
ae3a666040 | ||
![]() |
ec548c021c | ||
![]() |
6555449109 | ||
![]() |
cc568d9124 | ||
![]() |
b50c8c6b10 | ||
![]() |
1e7a8f76d1 | ||
![]() |
7e98709d06 | ||
![]() |
1a01e1ae65 | ||
![]() |
6dff85d544 | ||
![]() |
18a02eaacb | ||
![]() |
5b7783d015 | ||
![]() |
773efe87ca | ||
![]() |
9802fda53a | ||
![]() |
12acca43be | ||
![]() |
8c05ceb8fb | ||
![]() |
b22db99e63 | ||
![]() |
d8b90ee847 | ||
![]() |
b52f4fca4c | ||
![]() |
9cb77a57e4 | ||
![]() |
56921854dd | ||
![]() |
336c7078bb | ||
![]() |
794beec9df | ||
![]() |
63a0a9194e | ||
![]() |
006041fca6 | ||
![]() |
b8e1824d21 | ||
![]() |
c6034c4ae4 | ||
![]() |
cd8513ec02 | ||
![]() |
d23ad0114f | ||
![]() |
f4cba29c3d | ||
![]() |
81a37e5283 | ||
![]() |
1f13c5daf4 | ||
![]() |
64b7a52d22 | ||
![]() |
e8d2053c69 | ||
![]() |
7ce2829aa5 | ||
![]() |
20834e3d99 | ||
![]() |
068b3a12df | ||
![]() |
2b2d3891ba | ||
![]() |
cda31b548e | ||
![]() |
48018b340b | ||
![]() |
4e9e9862db | ||
![]() |
5bf33c61c0 | ||
![]() |
761fef7e32 | ||
![]() |
fde2ed3eee | ||
![]() |
34a21b8fb0 | ||
![]() |
926c71c0d3 | ||
![]() |
83e56bb3ff | ||
![]() |
db2f611ba2 | ||
![]() |
2fab29d60c | ||
![]() |
e9a8aed642 | ||
![]() |
bc4a352a2d | ||
![]() |
2244c6edac | ||
![]() |
38d8bb7c81 | ||
![]() |
cdd1fee2f8 | ||
![]() |
f4cf86803e | ||
![]() |
9ce6ec1c2a | ||
![]() |
8f36cee5a4 | ||
![]() |
ec27fd1ffe | ||
![]() |
f433a6f239 | ||
![]() |
8405461850 | ||
![]() |
51448c0cf6 | ||
![]() |
dd2396275a | ||
![]() |
57b2bc9b59 | ||
![]() |
d80bac72e2 | ||
![]() |
4ae04408b4 | ||
![]() |
00f2d3487a | ||
![]() |
47b4284326 | ||
![]() |
8167f71bfd | ||
![]() |
95431d4bd6 | ||
![]() |
735e91b8b2 | ||
![]() |
ece51bf8d8 | ||
![]() |
af0d0b8ef8 | ||
![]() |
e0f0987ea6 | ||
![]() |
9d5b5426f9 | ||
![]() |
c9fd0ac0ab | ||
![]() |
b832389a2c | ||
![]() |
6b11dd932c | ||
![]() |
0a4bfff2df | ||
![]() |
6a2a0778b4 | ||
![]() |
b92ef54b5f | ||
![]() |
bd06f19214 | ||
![]() |
9f71108ece | ||
![]() |
c6baaf7555 | ||
![]() |
a0b3ec00f6 | ||
![]() |
d69560e61d | ||
![]() |
4537bbaa0f |
20
.hbuilderx/launch.json
Normal file
20
.hbuilderx/launch.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version" : "0.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"app-plus" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"default" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
}
|
||||
]
|
||||
}
|
21
App.vue
21
App.vue
@ -67,7 +67,6 @@
|
||||
auto_arrival: 0,
|
||||
mer_location: 0,
|
||||
statusBarHeight: 0,
|
||||
mer_location: 0,
|
||||
store_street_theme: 1,
|
||||
sys_intention_agree: '',
|
||||
copyright_status: '',
|
||||
@ -91,6 +90,21 @@
|
||||
//发送消息成功回调
|
||||
console.log('消息成功' + JSON.stringify(option));
|
||||
});
|
||||
|
||||
uni.onHostEventReceive((event, data) => {
|
||||
if (event == 'tocustomlist') {
|
||||
if (data.page_type == 1) {
|
||||
uni.switchTab({
|
||||
url: data.route
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: data.route
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// #endif
|
||||
|
||||
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
@ -434,6 +448,11 @@
|
||||
@import 'static/css/style.scss';
|
||||
|
||||
|
||||
// 全局取消滚动条
|
||||
* {
|
||||
scrollbar-color: #e5e5e500 #f7f7f9 !important;
|
||||
}
|
||||
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
36
api/admin.js
36
api/admin.js
@ -9,6 +9,24 @@
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 设置自提人姓名 电话
|
||||
* @returns {*}
|
||||
*/
|
||||
export function delivery(data) {
|
||||
return request.post(`admin/${data.mer_id}/delivery/${data.order_id}`, data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询暂存订单
|
||||
* @returns {*}
|
||||
*/
|
||||
export function lockList(data, merid) {
|
||||
return request.get(`admin/${merid}/lock_list`, data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 统计数据
|
||||
*/
|
||||
@ -364,3 +382,21 @@ export function getSubsidyRecord(merId, data) {
|
||||
login: true
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
领取补贴
|
||||
*/
|
||||
export function couponReceive(data) {
|
||||
return request.get(`server/${data.mer_id}/subsidyReceive/${data.id}`);
|
||||
}
|
||||
|
||||
/*
|
||||
拒绝领取补贴
|
||||
*/
|
||||
export function couponRefuse(data) {
|
||||
return request.post(`server/${data.mer_id}/subsidyRefuse/${data.id}`, {
|
||||
reason: data.reason
|
||||
}, {
|
||||
login: true
|
||||
});
|
||||
}
|
@ -206,6 +206,13 @@ export function modifyPhone(data) {
|
||||
export function modifyPassword(data) {
|
||||
return request.post('user/change/password', data);
|
||||
}
|
||||
|
||||
/** 设置支付密码 */
|
||||
export function setPayPwd(data) {
|
||||
return request.post('User/set/withdrawal_pwd', data);
|
||||
}
|
||||
|
||||
|
||||
/** 退出登錄 */
|
||||
export function logout() {
|
||||
return request.get('logout');
|
||||
|
@ -1,7 +1,7 @@
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 文章详情
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function parseToken(data) {
|
||||
|
34
api/common.js
Normal file
34
api/common.js
Normal file
@ -0,0 +1,34 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 获取省份
|
||||
|
||||
*/
|
||||
export function getProvince() {
|
||||
return request.get("city/get_province");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取省份
|
||||
|
||||
*/
|
||||
export function getCity(data) {
|
||||
return request.get("city/get_city", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取省份
|
||||
|
||||
*/
|
||||
export function getArea(data) {
|
||||
return request.get("city/get_area", data);
|
||||
}
|
15
api/order.js
15
api/order.js
@ -9,6 +9,14 @@
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 校验支付密码是否正确
|
||||
* @param numType
|
||||
*/
|
||||
export function verifyPwd(data) {
|
||||
return request.post("order/verifyPwd", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取购物车列表
|
||||
* @param numType boolean true 购物车数量,false=购物车产品数量
|
||||
@ -39,6 +47,13 @@ export function changeCartNum(cartId, data) {
|
||||
export function cartDel(data) {
|
||||
return request.post('user/cart/delete', data);
|
||||
}
|
||||
/**
|
||||
* 购物车商品属性
|
||||
* @param object ids
|
||||
*/
|
||||
export function cartProductAttr(id) {
|
||||
return request.get(`store/product/get_attr_value/${id}`);
|
||||
}
|
||||
/**
|
||||
* 订单列表
|
||||
* @param object data
|
||||
|
@ -16,6 +16,13 @@ export function addCart(data) {
|
||||
return request.post(`user/cart/create`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据店铺 获取商品
|
||||
*/
|
||||
export function getProductInfo1(data) {
|
||||
return request.get(`order_mix`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据店铺id 获取店铺信息
|
||||
*/
|
||||
|
@ -9,6 +9,17 @@
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
|
||||
/**
|
||||
* 商户类型列表
|
||||
*/
|
||||
export const intentionList = (data) => request.get('intention/detail', data)
|
||||
|
||||
/**
|
||||
* 商户类型申请
|
||||
*/
|
||||
export const shopTypeChange = (data) => request.post('intention/change', data)
|
||||
|
||||
/**
|
||||
* 获取商品详情
|
||||
*/
|
||||
@ -42,6 +53,22 @@ export function productLstApi(merId, data) {
|
||||
login: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 检测收银状态
|
||||
*/
|
||||
export function micropayQueryApi(data) {
|
||||
return request.get(`micropay_query`, data, {
|
||||
login: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 支付失败后进行提单
|
||||
*/
|
||||
export function orderLadingApi(data) {
|
||||
return request.get(`order_lading`, data, {
|
||||
login: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品列表 -- 删除
|
||||
@ -120,6 +147,35 @@ export function categoryList(merId) {
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
添加修改商品, 搜索上平
|
||||
*/
|
||||
|
||||
export function categorySearch(merId, data) {
|
||||
return request.get(`server/${merId}/category/search`, data, {
|
||||
login: true
|
||||
})
|
||||
}
|
||||
/*
|
||||
添加修改商品, 热门分类商品
|
||||
*/
|
||||
|
||||
export function categorySearchHistory(merId, uid, data) {
|
||||
return request.post(`server/${merId}/category/search_history/${uid}`, data, {
|
||||
login: true
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
添加修改商品, 添加热门分类商品
|
||||
*/
|
||||
|
||||
export function categoryHotcate(merId, uid) {
|
||||
return request.get(`server/${merId}/category/hotcate/${uid}`, {
|
||||
login: true
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
商品管理, 添加商品
|
||||
*/
|
||||
@ -329,4 +385,3 @@ export function intention(data) {
|
||||
export function intentionbus(data) {
|
||||
return request.post(`intention/business`, data);
|
||||
}
|
||||
|
||||
|
18
api/store.js
18
api/store.js
@ -1,5 +1,16 @@
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 获取商铺云商品列表
|
||||
* @param {Object} id 商铺 id
|
||||
* @param {Object} data 商铺商品列表数据
|
||||
*/
|
||||
export function getStoreCloudGoods(id, data) {
|
||||
return request.get("product/spu/merchant/" + id + "/merCloudProduct", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码查询商品
|
||||
*
|
||||
@ -595,8 +606,7 @@ export function vicinityStoreApi(data) {
|
||||
商家入驻 -- 获取商户入驻申请协议内容
|
||||
*/
|
||||
export function agreeiness(data) {
|
||||
return request.get(`business/agree`, data, { noAuth: true });
|
||||
return request.get(`business/agree`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
84
api/user.js
84
api/user.js
@ -8,9 +8,55 @@
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
import request1 from "@/utils/requestb.js";
|
||||
import Cache from '@/utils/cache'
|
||||
|
||||
|
||||
/**
|
||||
* 报错信息记录
|
||||
*/
|
||||
export function errorReport(data) {
|
||||
return request.post(`api/err/report`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新商户
|
||||
*/
|
||||
export function isNewMer(uid, mer_id, data) {
|
||||
return request.post(`auth/guide/${uid}/${mer_id}`, data);
|
||||
}
|
||||
/**
|
||||
/**
|
||||
* 提现----查询单条信息
|
||||
*/
|
||||
export function getById(id) {
|
||||
return request.get(`admin/${id}/get_one`);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提现----审核进度
|
||||
*/
|
||||
export function progressBankList(merId) {
|
||||
return request.get(`admin/${merId}/bank_progress`);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提现----添加银行卡
|
||||
*/
|
||||
export function addBank(merId, data) {
|
||||
return request.post(`admin/${merId}/add_bank`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现----查询银行卡
|
||||
*/
|
||||
export function searchBank(merId) {
|
||||
return request.get(`admin/${merId}/bank_list`);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取版本信息
|
||||
*/
|
||||
@ -34,8 +80,8 @@ export function getAdminApplyAPI(merId, data) {
|
||||
/**
|
||||
* 提现记录
|
||||
*/
|
||||
export function getAdminApplyListAPI(merId) {
|
||||
return request.get(`admin/${merId}/lis_apply`);
|
||||
export function getAdminApplyListAPI(merId, data) {
|
||||
return request.get(`admin/${merId}/lis_apply`, data);
|
||||
}
|
||||
/**
|
||||
* 获取用户信息
|
||||
@ -133,7 +179,9 @@ export function registerForget(data) {
|
||||
*
|
||||
*/
|
||||
export function getMenuList() {
|
||||
return request.get("common/menus", {}, { noAuth: true });
|
||||
return request.get("common/menus", {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/*
|
||||
* 签到用户信息
|
||||
@ -540,7 +588,9 @@ export function imgToBase(data) {
|
||||
*
|
||||
*/
|
||||
export function getAgreementApi(key) {
|
||||
return request.get('agreement/' + key, {}, { noAuth: true });
|
||||
return request.get('agreement/' + key, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取协议
|
||||
@ -612,7 +662,9 @@ export function growthValueRecord(data) {
|
||||
*
|
||||
*/
|
||||
export function cacheLst() {
|
||||
return request.get('agreement_lst', {}, { noAuth: true })
|
||||
return request.get('agreement_lst', {}, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 协议规则列表对应的数据
|
||||
@ -620,7 +672,9 @@ export function cacheLst() {
|
||||
*
|
||||
*/
|
||||
export function cacheInfo(key) {
|
||||
return request.get(`agreement/${key}`, {}, { noAuth: true })
|
||||
return request.get(`agreement/${key}`, {}, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 注销账户
|
||||
@ -644,7 +698,9 @@ export function serviceUser(merId, uid) {
|
||||
*
|
||||
*/
|
||||
export function serviceSaveMark(merId, uid, mark) {
|
||||
return request.post(`service/mark/${merId}/${uid}`, { mark })
|
||||
return request.post(`service/mark/${merId}/${uid}`, {
|
||||
mark
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取会员卡类型
|
||||
@ -668,7 +724,9 @@ export function memberCardCreate(id, data) {
|
||||
*
|
||||
*/
|
||||
export function memberEquity() {
|
||||
return request.get(`svip/user_info`, {}, { noAuth: true })
|
||||
return request.get(`svip/user_info`, {}, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 付费会员优惠券
|
||||
@ -676,7 +734,9 @@ export function memberEquity() {
|
||||
*
|
||||
*/
|
||||
export function memberCouponLst() {
|
||||
return request.get(`svip/coupon_lst`, {}, { noAuth: true })
|
||||
return request.get(`svip/coupon_lst`, {}, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 付费会员优惠券--领取
|
||||
@ -692,7 +752,9 @@ export function receiveMemberCoupon(id) {
|
||||
*
|
||||
*/
|
||||
export function groomList(data) {
|
||||
return request.get(`svip/product_lst`, data, { noAuth: true })
|
||||
return request.get(`svip/product_lst`, data, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 客服聊天--撤回消息
|
||||
|
@ -44,8 +44,9 @@
|
||||
<view class='text'>
|
||||
<view class='name line2'>{{item.store_name}}</view>
|
||||
<view class="score"><span
|
||||
style="font-size: 23rpx;font-family: PingFang SC-Semibold, PingFang SC;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
|
||||
{{item.reply_count}}条评论</view>
|
||||
style="font-size: 23rpx;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
|
||||
{{item.reply_count}}条评论
|
||||
</view>
|
||||
<view class="" style="display: flex;justify-content: space-between;">
|
||||
<view class='money'>
|
||||
<span style="font-size:30rpx;">¥</span>
|
||||
|
@ -84,7 +84,6 @@
|
||||
.title {
|
||||
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin: 12px 0;
|
||||
@ -110,7 +109,6 @@
|
||||
border-radius: 11rpx 11rpx 11rpx 11rpx;
|
||||
border: 1px solid #3274F9;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
@ -125,7 +123,6 @@
|
||||
border-radius: 11rpx 0px 0px 0rpx;
|
||||
border: 1px solid #F84221;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@ -136,7 +133,6 @@
|
||||
border-radius: 0px 11rpx 11rpx 0px;
|
||||
border: 1px solid #F84221;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
@ -161,7 +157,6 @@
|
||||
|
||||
.relase-two {
|
||||
font-size: 23rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #B3B3B3;
|
||||
margin-left: 13rpx;
|
||||
@ -201,7 +196,6 @@
|
||||
opacity: 1;
|
||||
font-size: 23rpx;
|
||||
padding-left: 11rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
|
||||
|
@ -94,7 +94,6 @@
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin: 12px 0;
|
||||
|
@ -44,8 +44,9 @@
|
||||
<view class='text'>
|
||||
<view class='name line2'>{{item.store_name}}</view>
|
||||
<view class="score"><span
|
||||
style="font-size: 23rpx;font-family: PingFang SC-Semibold, PingFang SC;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
|
||||
{{item.reply_count}}条评论</view>
|
||||
style="font-size: 23rpx;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
|
||||
{{item.reply_count}}条评论
|
||||
</view>
|
||||
<view class="" style="display: flex;justify-content: space-between;">
|
||||
<view class='money'>
|
||||
<span style="font-size:30rpx;">¥</span>
|
||||
|
@ -84,7 +84,6 @@
|
||||
.title {
|
||||
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin: 12px 0;
|
||||
@ -110,7 +109,6 @@
|
||||
border-radius: 11rpx 11rpx 11rpx 11rpx;
|
||||
border: 1px solid #3274F9;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
@ -125,7 +123,6 @@
|
||||
border-radius: 11rpx 0px 0px 0rpx;
|
||||
border: 1px solid #F84221;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@ -136,7 +133,6 @@
|
||||
border-radius: 0px 11rpx 11rpx 0px;
|
||||
border: 1px solid #F84221;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
@ -161,7 +157,6 @@
|
||||
|
||||
.relase-two {
|
||||
font-size: 23rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #B3B3B3;
|
||||
margin-left: 13rpx;
|
||||
@ -201,7 +196,6 @@
|
||||
opacity: 1;
|
||||
font-size: 23rpx;
|
||||
padding-left: 11rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
|
||||
|
@ -94,7 +94,6 @@
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin: 12px 0;
|
||||
|
BIN
components/aaa.png
Normal file
BIN
components/aaa.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
@ -5,7 +5,7 @@
|
||||
<view class="c_card">
|
||||
<view class="c_content">
|
||||
<scroll-view style="height: 100%;" scroll-y>
|
||||
<view v-if="info.content" v-html="info.content.content"></view>
|
||||
<view v-if="info&&info.content&&info.content.content" v-html="info.content.content"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -21,11 +21,11 @@
|
||||
<view v-else class="money">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="acea-row row-middle">
|
||||
<text>¥</text><text class="num">{{ attr.productSelect.procure_price }}</text>
|
||||
<view v-if="attr.productSelect && attr.productSelect.svip_price>0" class="acea-row row-middle">
|
||||
<text>¥</text><text class="num">{{ attr.productSelect.price }}</text>
|
||||
<view v-if="attr.productSelect && attr.productSelect.svip_price" class="acea-row row-middle">
|
||||
<text class='vip-money'>¥{{attr.productSelect.svip_price}}</text>
|
||||
<view class="vipImg">
|
||||
<image src="/static/images/svip.png"></image>
|
||||
<image :src="`${domain}/static/images/svip.png`"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -61,13 +61,14 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import { mapGetters } from "vuex";
|
||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||
export default {
|
||||
computed: mapGetters(['viewColor']),
|
||||
props: {
|
||||
@ -109,10 +110,11 @@
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
domain: HTTP_REQUEST_URL,
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
// console.log('sss',this.attr);
|
||||
},
|
||||
methods: {
|
||||
// 查看大图
|
||||
@ -339,5 +341,6 @@
|
||||
.product-window .joinBnt.on {
|
||||
background-color: #bbb;
|
||||
color: #fff;
|
||||
background-image: none;
|
||||
}
|
||||
</style>
|
||||
|
@ -55,8 +55,6 @@
|
||||
|
||||
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Regular,
|
||||
PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
@ -2,23 +2,20 @@
|
||||
<view class="contentgb">
|
||||
<view class="return_top">
|
||||
<view class="z-bootm-img1" @click="returnbom()">
|
||||
<image src="@/static/images/fb1.png" mode="aspectFit"></image>
|
||||
<u-image width="40rpx" height="14rpx" src="@/static/images/fb1.png" mode="widthFit"></u-image>
|
||||
</view>
|
||||
<view class="z-bootm-l"></view>
|
||||
<view class="z-bootm-img2" @click="returnbom()">
|
||||
<image src="@/static/images/fb2.png" mode="aspectFit"></image>
|
||||
<u-image width="38rpx" height="38rpx" src="@/static/images/fb2.png" mode="widthFit"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
returnbom() {
|
||||
@ -34,58 +31,25 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.contentgb {
|
||||
|
||||
width: 166rpx;
|
||||
height: 56rpx;
|
||||
|
||||
.return_top {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 166rpx;
|
||||
height: 56rpx;
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
border-radius: 44rpx 44rpx;
|
||||
|
||||
position: relative;
|
||||
|
||||
.z-bootm-img1 {
|
||||
width: 41rpx;
|
||||
height: 13rpx;
|
||||
|
||||
position: absolute;
|
||||
top: 5rpx;
|
||||
left: 25rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.z-bootm-l {
|
||||
width: 1px;
|
||||
height: 32rpx;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
margin: auto 0;
|
||||
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
left: 85rpx;
|
||||
margin: 0 16rpx;
|
||||
}
|
||||
|
||||
.z-bootm-img2 {
|
||||
width: 38rpx;
|
||||
height: 34rpx;
|
||||
margin-top: -15rpx;
|
||||
margin-left: -15rpx;
|
||||
position: absolute;
|
||||
right: 25rpx;
|
||||
top: 25rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
@ -38,7 +38,9 @@
|
||||
// #ifdef H5
|
||||
import ClipboardJS from "@/plugin/clipboard/clipboard.js";
|
||||
// #endif
|
||||
import { mapGetters } from "vuex";
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
props: {
|
||||
isCopy: {
|
||||
@ -81,7 +83,9 @@
|
||||
//#ifndef H5
|
||||
copyText: function() {
|
||||
let that = this;
|
||||
uni.setClipboardData({ data: this.copyUrl });
|
||||
uni.setClipboardData({
|
||||
data: this.copyUrl
|
||||
});
|
||||
setTimeout(() => {
|
||||
that.$emit('close');
|
||||
}, 500)
|
||||
@ -106,12 +110,14 @@
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .1s cubic-bezier(.25, .5, .5, .9);
|
||||
padding: 50rpx 30rpx 30rpx;
|
||||
|
||||
.icon-guanbi {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 20rpx;
|
||||
color: #8A8A8A;
|
||||
}
|
||||
|
||||
.button {
|
||||
height: 76rpx;
|
||||
border-radius: 38rpx;
|
||||
@ -122,21 +128,24 @@
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.copy-list-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.copy-list-window .title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
font-family: 'PingFang SC';
|
||||
|
||||
.iconfont {
|
||||
font-size: 30rpx;
|
||||
color: #FBB324;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.copy-url {
|
||||
margin-top: 30rpx;
|
||||
background: #F5F5F5;
|
||||
|
@ -78,7 +78,6 @@
|
||||
padding-right: 0rpx;
|
||||
scroll-behavior: smooth; //平稳的滑动效果
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Heavy;
|
||||
|
||||
.my-tab-item {
|
||||
padding: 20rpx 35rpx; //标签上下左右距离 -- 在这里改
|
||||
@ -89,7 +88,6 @@
|
||||
|
||||
&.active {
|
||||
color: #333333; //标签选中颜色 -- 在这里改
|
||||
font-family: PingFang-SC-Heavy;
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
|
||||
@ -110,7 +108,6 @@
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F84221;
|
||||
color: #F84221;
|
||||
|
93
components/payPwd/index.vue
Normal file
93
components/payPwd/index.vue
Normal file
@ -0,0 +1,93 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-popup ref="payModal" type="center" safeArea :animation="true">
|
||||
<view class="payModal">
|
||||
<view class="payModal-title">{{code == 101?'未设置密码':'支付密码错误'}}</view>
|
||||
<view class="payModal-btns">
|
||||
<view class="wrap" style="display: flex;flex: 1;" v-if="code == 101">
|
||||
<view class="payModal-btns-left payModal-common" @click="handleClick(1)">设置密码</view>
|
||||
<view class="payModal-btns-right payModal-common" @click="handleClick(2)">取消</view>
|
||||
</view>
|
||||
<view class="wrap" style="display: flex;flex: 1;" v-else>
|
||||
<view class="payModal-btns-left payModal-common" @click="handleClick(1)">忘记密码</view>
|
||||
<view class="payModal-btns-right payModal-common" @click="handleClick(2)">重试</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
code: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
handleOpen(code) {
|
||||
this.code = code;
|
||||
this.$refs.payModal.open();
|
||||
},
|
||||
|
||||
// 关闭
|
||||
handleClose() {
|
||||
this.$refs.payModal.close();
|
||||
},
|
||||
|
||||
handleClick(type) {
|
||||
if (type == 1) {
|
||||
this.$emit('left', this.code);
|
||||
} else {
|
||||
this.$emit("right", this.code);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
.payModal {
|
||||
width: 600rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 30rpx;
|
||||
|
||||
.payModal-title {
|
||||
text-align: center;
|
||||
padding: 40rpx 50rpx 50rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
border-bottom: 2rpx solid #e6e6e6;
|
||||
}
|
||||
|
||||
.payModal-btns {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.payModal-btns-left {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border-right: 2rpx solid #e6e6e6;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.payModal-btns-right {
|
||||
color: #2a5ac2;
|
||||
}
|
||||
|
||||
.payModal-common {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -5,7 +5,7 @@
|
||||
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)'
|
||||
v-for="(item,index) in payMode" :key="index" v-if="item.payStatus == 1">
|
||||
v-for="(item,index) in payMode" v-if="item.payStatus==1" :key="index">
|
||||
<view class="left acea-row row-between-wrapper">
|
||||
<view class="iconfont" :class="item.icon"></view>
|
||||
<view class="text">
|
||||
@ -20,6 +20,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="mask" ref="close" @click='close' v-if="pay_close"></view>
|
||||
|
||||
<!-- 支付密码 键盘 -->
|
||||
<popups ref="popups" :isPay="true" @confirm="handleConfirm" @clear="handleClear" @change="handleChange" />
|
||||
|
||||
<!-- 密码错误事件处理 -->
|
||||
<payPwd ref="payPwd" @left="handleLeft" @right="handleRight"></payPwd>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -27,7 +33,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
@ -35,9 +41,17 @@
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
orderPay,
|
||||
presellOrderPay
|
||||
integralOrderPay,
|
||||
presellOrderPay,
|
||||
verifyPwd
|
||||
} from '@/api/order.js';
|
||||
import payPwd from "@/components/payPwd/index.vue";
|
||||
import popups from "@/components/popups/index.vue";
|
||||
export default {
|
||||
components: {
|
||||
payPwd,
|
||||
popups
|
||||
},
|
||||
props: {
|
||||
payMode: {
|
||||
type: Array,
|
||||
@ -64,13 +78,18 @@
|
||||
isCall: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
returnUrl: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
type: ''
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
close: function() {
|
||||
this.$emit('onChangeFun', {
|
||||
@ -78,7 +97,6 @@
|
||||
});
|
||||
},
|
||||
goPay: function(number, paytype) {
|
||||
|
||||
if (this.isCall) {
|
||||
return this.$emit('onChangeFun', {
|
||||
action: 'payCheck',
|
||||
@ -99,7 +117,6 @@
|
||||
// #endif
|
||||
} else if (paytype == 'balance') {
|
||||
type = 'balance';
|
||||
console.log('123');
|
||||
} else if (paytype == 'alipay') {
|
||||
// #ifndef MP
|
||||
type = 'alipay';
|
||||
@ -107,9 +124,8 @@
|
||||
// #ifdef MP
|
||||
type = 'alipayQr';
|
||||
// #endif
|
||||
} else if (paytype == 'creditBuy') {
|
||||
console.log('123123');
|
||||
type = 'creditBuy'
|
||||
} else if (paytype == 'public') {
|
||||
type = 'public';
|
||||
}
|
||||
if (!that.order_id) return that.$util.Tips({
|
||||
title: '请选择要支付的订单'
|
||||
@ -117,29 +133,79 @@
|
||||
if (paytype == 'balance' && parseFloat(number) < parseFloat(that.totalPrice)) return that.$util.Tips({
|
||||
title: '余额不足!'
|
||||
});
|
||||
|
||||
this.type = type;
|
||||
|
||||
if (paytype == 'balance' || paytype == 'merBalance') {
|
||||
this.$refs.popups.handleOpen();
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '支付中'
|
||||
title: '订单支付中'
|
||||
});
|
||||
let orderApi = that.order_type === 1 ? presellOrderPay : orderPay
|
||||
this.trueOrderPay();
|
||||
}
|
||||
},
|
||||
|
||||
// 输入密码回调
|
||||
handleConfirm(e) {
|
||||
// 验证密码是否正确
|
||||
verifyPwd({
|
||||
withdrawal_pwd: e
|
||||
}).then(res => {
|
||||
// 密码是否有效 状态码判断
|
||||
const code = res.data.code;
|
||||
|
||||
if (code == 100) { //密码正确
|
||||
uni.showLoading({
|
||||
title: '订单支付中',
|
||||
mask: true
|
||||
});
|
||||
this.trueOrderPay();
|
||||
} else {
|
||||
this.$refs.payPwd.handleOpen(code);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
|
||||
handleClear() {},
|
||||
handleChange() {},
|
||||
|
||||
// 弹框左边按钮 101 未设置密码 102 忘记密码 都去设置密码
|
||||
handleLeft(code) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/users/user_modify_pwd/index?type=payPwd"
|
||||
});
|
||||
this.$refs.payPwd.handleClose();
|
||||
},
|
||||
|
||||
// 弹框右边按钮 取消 重试
|
||||
handleRight(code) {
|
||||
if (code == 101) { //取消
|
||||
this.$refs.payPwd.handleClose(code);
|
||||
} else {
|
||||
this.$refs.payPwd.handleClose();
|
||||
this.$refs.popups.handleOpen();
|
||||
}
|
||||
},
|
||||
|
||||
trueOrderPay() {
|
||||
let that = this;
|
||||
let orderApi = that.order_type === 1 ? presellOrderPay : that.order_type === 2 ? integralOrderPay :
|
||||
orderPay
|
||||
orderApi(that.order_id, {
|
||||
type: type,
|
||||
type: that.type,
|
||||
// #ifdef H5
|
||||
|
||||
return_url: this.order_type == 98 ? 'http://' + window.location.host +
|
||||
'/pages/users/order_list/indexCopy' : 'http://' + window.location.host +
|
||||
'/pages/users/order_list/index',
|
||||
|
||||
|
||||
return_url: that.returnUrl !== '' ? 'http://' + window.location.host + that.returnUrl :
|
||||
'http://' + window.location.host + '/pages/users/order_list/index',
|
||||
// #endif
|
||||
|
||||
}).then(res => {
|
||||
let status = res.data.status,
|
||||
orderId = res.data.result.order_id,
|
||||
jsConfig = res.data.result.config,
|
||||
callback_key = res.data.result.pay_key,
|
||||
|
||||
goPages = this.order_type == 98 ? '/pages/users/order_list/indexCopy' :
|
||||
'/pages/users/order_list/index'
|
||||
goPages = that.returnUrl ? that.returnUrl : '/pages/users/order_list/index';
|
||||
switch (status) {
|
||||
case 'ORDER_EXIST':
|
||||
case 'EXTEND_ORDER':
|
||||
@ -163,7 +229,7 @@
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=2'
|
||||
url: goPages + '?status=1'
|
||||
});
|
||||
break;
|
||||
case 'alipay':
|
||||
@ -185,7 +251,7 @@
|
||||
jsConfig.timeStamp = jsConfig.timestamp;
|
||||
// #ifndef APP-PLUS
|
||||
that.$wechat.pay(jsConfig).then(res => {
|
||||
// console.log('测试支付数据无效的success:'+res.data)
|
||||
console.log('测试支付数据无效的success:' + res.data)
|
||||
this.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
});
|
||||
@ -195,10 +261,10 @@
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + 'status=2'
|
||||
url: goPages + 'status=1'
|
||||
});
|
||||
}).catch(res => {
|
||||
// console.log('测试支付数据无效的catch:'+res.data)
|
||||
console.log('测试支付数据无效的catch:' + res.data)
|
||||
if (res.errMsg == 'chooseWXPay:cancel') {
|
||||
if (that.isCall) {
|
||||
return that.$util.Tips({
|
||||
@ -209,7 +275,7 @@
|
||||
title: '取消支付'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=1'
|
||||
url: goPages + '?status=0'
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -222,7 +288,6 @@
|
||||
} else {
|
||||
mp_pay_name = 'requestPayment'
|
||||
}
|
||||
console.log(mp_pay_name, jsConfig)
|
||||
uni[mp_pay_name]({
|
||||
provider: 'wxpay',
|
||||
orderInfo: jsConfig,
|
||||
@ -235,11 +300,10 @@
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + 'status=2'
|
||||
url: goPages + 'status=1'
|
||||
});
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e)
|
||||
if (that.isCall) {
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
@ -249,7 +313,7 @@
|
||||
title: '取消支付'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=1'
|
||||
url: goPages + '?status=0'
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -284,7 +348,7 @@
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=2'
|
||||
url: goPages + '?status=1'
|
||||
});
|
||||
|
||||
return that.$util.Tips({
|
||||
@ -292,7 +356,7 @@
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=2'
|
||||
url: goPages + '?status=1'
|
||||
});
|
||||
},
|
||||
fail: function(e) {
|
||||
@ -307,8 +371,7 @@
|
||||
complete: function(e) {
|
||||
uni.hideLoading();
|
||||
//关闭当前页面跳转至订单状态
|
||||
if (res.errMsg == 'requestPayment:cancel') return that.$util
|
||||
.Tips({
|
||||
if (res.errMsg == 'requestPayment:cancel') return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
});
|
||||
that.$emit('onChangeFun', {
|
||||
@ -329,6 +392,16 @@
|
||||
});
|
||||
break;
|
||||
// #ifdef H5
|
||||
case "public":
|
||||
uni.hideLoading();
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
});
|
||||
//余额不足
|
||||
return that.$util.Tips({
|
||||
title: "下单成功,请上传付款凭证!"
|
||||
});
|
||||
break;
|
||||
case 'h5':
|
||||
let host = window.location.protocol + "//" + window.location.host;
|
||||
let url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
|
||||
@ -355,7 +428,7 @@
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + 'status=2'
|
||||
url: goPages + 'status=1'
|
||||
});
|
||||
|
||||
},
|
||||
@ -392,7 +465,7 @@
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
background-color: #fff;
|
||||
padding-bottom: 60rpx;
|
||||
z-index: 99999;
|
||||
z-index: 99;
|
||||
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
|
247
components/popups/index - 副本.vue
Normal file
247
components/popups/index - 副本.vue
Normal file
@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-popup ref="popup" type="bottom" :mask-background-color="isPay?'rgba(0,0,0,.8)':'transparent'" safeArea
|
||||
backgroundColor="transparent" :animation="true" @maskClick="maskClick">
|
||||
<view class="popup-wrap" :style="{'border-radius':isPay?'': 0}">
|
||||
<view class="paybox" v-if="isPay">
|
||||
<view class="paybox-title">
|
||||
<view class="paybox-title-left"></view>
|
||||
<view class="paybox-title-middle">请输入支付密码</view>
|
||||
<view class="paybox-titler-right" @click="handleClose">
|
||||
<u-icon name="close" size="18" color="#666" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="paybox-input">
|
||||
<u-code-input v-model="value" mode="box" dot readonly></u-code-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="keyboard">
|
||||
<view class="keyboard-left" :style="{width:isPay?'100%':''}">
|
||||
<block v-for="(item,indx) in keys" :key="indx">
|
||||
<view class="keyboard-left-item active del" v-if="item=='del'" @click="handleClick(item)">
|
||||
<image style="width: 48rpx;height: 48rpx;" src="@/static/del.webp" />
|
||||
</view>
|
||||
|
||||
<view class="keyboard-left-item word active"
|
||||
:style="{width:isPay?'0%':'',border:isPay?'0':''}" v-else-if="item == '.'"
|
||||
@click="handleClick(item)">
|
||||
{{isPay?'':item}}
|
||||
</view>
|
||||
|
||||
<view class="keyboard-left-item word active"
|
||||
:style="{width:(isPay && item == '0')?'66.66%':''}" v-else @click="handleClick(item)">
|
||||
{{item}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="keyboard-right" :style="{width:isPay?'0%':''}">
|
||||
<view class="keyboard-right-clear word active" @click="handleClear">清空</view>
|
||||
<view class="keyboard-right-pay word active-pay" @click="handlePay">{{txt}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "popups",
|
||||
props: {
|
||||
txt: {
|
||||
type: String,
|
||||
default: '付款'
|
||||
},
|
||||
isPay: { //区分支付密码还是输入数字
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keys: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, '.', 'del'],
|
||||
value: '',
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
value(newVal, oldVal) {
|
||||
// 输入密码走此处
|
||||
if (newVal.length == 6 && this.isPay) {
|
||||
this.handlePay();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 键盘点击
|
||||
handleClick(item) {
|
||||
if (this.value.length >= 10) return;
|
||||
if (item == ".") {
|
||||
if (!this.value) {
|
||||
this.value = '0.';
|
||||
} else {
|
||||
if (this.value.indexOf('.') > -1) return;
|
||||
this.value = this.value + item;
|
||||
}
|
||||
} else if (item == 'del') {
|
||||
if (this.value == "0.")
|
||||
this.value = this.value.substring(0, 0);
|
||||
else
|
||||
this.value = this.value.substring(0, this.value.length - 1);
|
||||
} else if (item == 0) {
|
||||
if (this.isPay) {
|
||||
this.value = this.value + item;
|
||||
} else {
|
||||
if (this.value) {
|
||||
if (this.value.lastIndexOf('.') != -1 && this.value.length - this.value.lastIndexOf('.') == 3)
|
||||
return;
|
||||
this.value = this.value + item;
|
||||
} else {
|
||||
this.value = this.value + item;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.value.lastIndexOf('.') != -1 && this.value.length - this.value.lastIndexOf('.') == 3) return;
|
||||
this.value = this.value + item;
|
||||
}
|
||||
|
||||
this.$emit('change', this.value);
|
||||
},
|
||||
|
||||
// 清空
|
||||
handleClear() {
|
||||
this.value = '';
|
||||
this.$emit('clear');
|
||||
},
|
||||
|
||||
// 付款
|
||||
handlePay() {
|
||||
// 如果最后一位是. 去除
|
||||
if (this.value && this.value.endsWith('.')) {
|
||||
this.value = this.value.replace('.', '');
|
||||
}
|
||||
|
||||
this.$emit('confirm', this.value);
|
||||
this.handleClose();
|
||||
},
|
||||
|
||||
// 开启
|
||||
handleOpen() {
|
||||
this.value = '';
|
||||
this.$refs.popup.open();
|
||||
},
|
||||
|
||||
// 关闭
|
||||
handleClose() {
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
|
||||
maskClick() {
|
||||
// 如果最后一位是. 去除
|
||||
if (this.value && this.value.endsWith('.')) {
|
||||
this.value = this.value.replace('.', '');
|
||||
}
|
||||
this.$emit('change', this.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.popup-wrap {
|
||||
background-color: #fff;
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
|
||||
.paybox {
|
||||
.paybox-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 40rpx;
|
||||
|
||||
.paybox-title-left {}
|
||||
|
||||
.paybox-title-middle {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.paybox-titler-right {}
|
||||
}
|
||||
|
||||
.paybox-input {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
/deep/.u-code-input__item {
|
||||
background-color: #E6E6E6;
|
||||
border-radius: 8rpx;
|
||||
border: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.keyboard {
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
border-top: 2rpx solid #E6E6E6;
|
||||
|
||||
.keyboard-left {
|
||||
width: 75%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.keyboard-left-item {
|
||||
width: 33.3%;
|
||||
height: 120rpx;
|
||||
line-height: 102rpx;
|
||||
border-bottom: 2rpx solid #E6E6E6;
|
||||
border-right: 2rpx solid #E6E6E6;
|
||||
}
|
||||
|
||||
.del {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.keyboard-right {
|
||||
width: 25%;
|
||||
|
||||
.keyboard-right-clear {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
line-height: 226rpx;
|
||||
}
|
||||
|
||||
.keyboard-right-pay {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
line-height: 226rpx;
|
||||
text-align: center;
|
||||
background-color: #40AE36;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
.word {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.active:active {
|
||||
background-color: rgba(232, 232, 232, 0.5);
|
||||
}
|
||||
|
||||
.active-pay:active {
|
||||
opacity: .9;
|
||||
}
|
||||
}
|
||||
</style>
|
253
components/popups/index.vue
Normal file
253
components/popups/index.vue
Normal file
@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-popup ref="popup" type="bottom" :mask-background-color="isPay?'rgba(0,0,0,.8)':'transparent'" safeArea
|
||||
backgroundColor="transparent" :animation="true" @maskClick="maskClick">
|
||||
<view class="popup-wrap" :style="{'border-radius':isPay?'': 0}">
|
||||
<view class="paybox" v-if="isPay">
|
||||
<view class="paybox-title">
|
||||
<view class="paybox-title-left"></view>
|
||||
<view class="paybox-title-middle">{{title}}</view>
|
||||
<view class="paybox-titler-right" @click="handleClose">
|
||||
<u-icon name="close" size="18" color="#666" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="paybox-input">
|
||||
<u-code-input v-model="value" mode="box" dot readonly></u-code-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="keyboard">
|
||||
<view class="keyboard-left" :style="{width:isPay?'100%':''}">
|
||||
<block v-for="(item,indx) in keys" :key="indx">
|
||||
<view class="keyboard-left-item active del" v-if="item=='del'" @click="handleClick(item)">
|
||||
<image style="width: 48rpx;height: 48rpx;" src="@/static/del.webp" />
|
||||
</view>
|
||||
|
||||
<view class="keyboard-left-item word active"
|
||||
:style="{width:isPay?'0%':'',border:isPay?'0':''}" v-else-if="item == '.'"
|
||||
@click="handleClick(item)">
|
||||
{{isPay?'':item}}
|
||||
</view>
|
||||
|
||||
<view class="keyboard-left-item word active"
|
||||
:style="{width:(isPay && item == '0')?'66.66%':''}" v-else @click="handleClick(item)">
|
||||
{{item}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="keyboard-right" :style="{width:isPay?'0%':''}">
|
||||
<view class="keyboard-right-clear word active" @click="handleClear">清空</view>
|
||||
<view class="keyboard-right-pay word active-pay" @click="handlePay">{{txt}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "popups",
|
||||
props: {
|
||||
txt: {
|
||||
type: String,
|
||||
default: '付款'
|
||||
},
|
||||
isPay: { //区分支付密码还是输入数字
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '请输入支付密码'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keys: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, '.', 'del'],
|
||||
value: '',
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
value(newVal, oldVal) {
|
||||
// 输入密码走此处
|
||||
if (newVal.length == 6 && this.isPay) {
|
||||
this.handlePay();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 键盘点击
|
||||
handleClick(item) {
|
||||
if (this.value.length >= 10) return;
|
||||
if (item == ".") {
|
||||
if (!this.value) {
|
||||
this.value = '0.';
|
||||
} else {
|
||||
if (this.value.indexOf('.') > -1) return;
|
||||
this.value = this.value + item;
|
||||
}
|
||||
} else if (item == 'del') {
|
||||
if (this.value == "0.")
|
||||
this.value = this.value.substring(0, 0);
|
||||
else
|
||||
this.value = this.value.substring(0, this.value.length - 1);
|
||||
} else if (item == 0) {
|
||||
if (this.isPay) {
|
||||
this.value = this.value + item;
|
||||
} else {
|
||||
if (this.value) {
|
||||
if (this.value.lastIndexOf('.') != -1 && this.value.length - this.value.lastIndexOf('.') == 3)
|
||||
return;
|
||||
this.value = this.value + item;
|
||||
} else {
|
||||
this.value = this.value + item;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.value.lastIndexOf('.') != -1 && this.value.length - this.value.lastIndexOf('.') == 3) return;
|
||||
this.value = this.value + item;
|
||||
}
|
||||
|
||||
this.$emit('change', this.value);
|
||||
},
|
||||
|
||||
// 清空
|
||||
handleClear() {
|
||||
this.value = '';
|
||||
this.$emit('clear');
|
||||
},
|
||||
|
||||
// 付款
|
||||
handlePay() {
|
||||
// 如果最后一位是. 去除
|
||||
if (this.value && this.value.endsWith('.')) {
|
||||
this.value = this.value.replace('.', '');
|
||||
}
|
||||
|
||||
this.$emit('confirm', this.value);
|
||||
this.handleClose();
|
||||
},
|
||||
|
||||
// 开启
|
||||
handleOpen() {
|
||||
this.value = '';
|
||||
this.$refs.popup.open();
|
||||
},
|
||||
|
||||
// 关闭
|
||||
handleClose() {
|
||||
this.$emit('change')
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
|
||||
maskClick() {
|
||||
// 如果最后一位是. 去除
|
||||
if (this.value && this.value.endsWith('.')) {
|
||||
this.value = this.value.replace('.', '');
|
||||
}
|
||||
this.handleClose();
|
||||
this.$emit('change', this.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.popup-wrap {
|
||||
background-color: #fff;
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
|
||||
.paybox {
|
||||
.paybox-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 40rpx;
|
||||
|
||||
.paybox-title-left {}
|
||||
|
||||
.paybox-title-middle {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.paybox-titler-right {}
|
||||
}
|
||||
|
||||
.paybox-input {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
/deep/.u-code-input__item {
|
||||
background-color: #E6E6E6;
|
||||
border-radius: 8rpx;
|
||||
border: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.keyboard {
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
border-top: 2rpx solid #E6E6E6;
|
||||
|
||||
.keyboard-left {
|
||||
width: 75%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.keyboard-left-item {
|
||||
width: 33.3%;
|
||||
height: 120rpx;
|
||||
line-height: 102rpx;
|
||||
border-bottom: 2rpx solid #E6E6E6;
|
||||
border-right: 2rpx solid #E6E6E6;
|
||||
}
|
||||
|
||||
.del {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.keyboard-right {
|
||||
width: 25%;
|
||||
|
||||
.keyboard-right-clear {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
line-height: 226rpx;
|
||||
}
|
||||
|
||||
.keyboard-right-pay {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
line-height: 226rpx;
|
||||
text-align: center;
|
||||
background-color: #40AE36;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
.word {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.active:active {
|
||||
background-color: rgba(232, 232, 232, 0.5);
|
||||
}
|
||||
|
||||
.active-pay:active {
|
||||
opacity: .9;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay" :circular="circular"
|
||||
:interval="interval" :duration="duration" @change="change" v-if="isPlay">
|
||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay"
|
||||
:circular="circular" :interval="interval" :duration="duration" @change="change" v-if="isPlay">
|
||||
<!-- #ifndef APP-PLUS -->
|
||||
<swiper-item v-if="videoline && videoline != '' && videoline != 'https:'">
|
||||
<view class="item">
|
||||
<video id="myVideo" :src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : ("http:" + videoline)'
|
||||
<video id="myVideo"
|
||||
:src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : ("http:" + videoline)'
|
||||
objectFit="cover" controls style="width:100%;height:100% " show-mute-btn="true"
|
||||
auto-pause-if-navigate @ended="endedFun()"></video>
|
||||
<view class="poster" v-if="controls">
|
||||
@ -37,9 +38,11 @@
|
||||
</swiper>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view v-if="!isPlay" style="width: 100%; height: 750rpx;">
|
||||
<video id="myVideo" :src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : "http:" + videoline'
|
||||
<video id="myVideo"
|
||||
:src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : "http:" + videoline'
|
||||
objectFit="cover" controls style="width:100%;height:100% " show-center-play-btn show-mute-btn="true"
|
||||
auto-pause-if-navigate :enable-progress-gesture="false" :poster="videoCoverImg" @pause="videoPause" @ended="endedFun()"></video>
|
||||
auto-pause-if-navigate :enable-progress-gesture="false" :poster="videoCoverImg" @pause="videoPause"
|
||||
@ended="endedFun()"></video>
|
||||
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
@ -140,15 +143,18 @@
|
||||
height: 750rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg .slide-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .pages {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
@ -161,15 +167,18 @@
|
||||
font-size: 24rpx;
|
||||
color: #050505;
|
||||
}
|
||||
|
||||
#myVideo {
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.product-bg .item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .item .poster {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -178,10 +187,12 @@
|
||||
width: 100%;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.product-bg .item .poster .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .item .stop {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@ -192,6 +203,7 @@
|
||||
margin-left: -68rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.product-bg .item .stop .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
239
components/productConSwiper/indexNew.vue
Normal file
239
components/productConSwiper/indexNew.vue
Normal file
@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots" :current='current' indicator-active-color="#e93323" :autoplay="autoplay"
|
||||
:circular="circular" :interval="interval" :duration="duration" @change="change" v-if="isPlay">
|
||||
<!-- #ifndef APP-PLUS -->
|
||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item v-if="isVideoUrl(item)">
|
||||
<video :src="isVideoUrl(item,true)" objectFit="cover" controls style="width:100%;height:100% "
|
||||
show-center-play-btn show-mute-btn="true" auto-pause-if-navigate
|
||||
:enable-progress-gesture="false" :poster="item+coverUrl"></video>
|
||||
</swiper-item>
|
||||
<swiper-item v-else>
|
||||
<image :src="item" class="slide-image" @click='getpreviewImage(item)' />
|
||||
</swiper-item>
|
||||
</block>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item v-if="isVideoUrl(item)">
|
||||
<view>
|
||||
<image :src="item+coverUrl" class="slide-image" />
|
||||
<image class="image-play-icon" src="../../static/images/stop.png"
|
||||
@click='videoPlay(item,index)'>
|
||||
</image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
<swiper-item v-else>
|
||||
<image :src="item" class="slide-image" @click='getpreviewImage(item)' />
|
||||
</swiper-item>
|
||||
</block>
|
||||
<!-- #endif -->
|
||||
</swiper>
|
||||
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view v-if="!isPlay" style="width: 100%; height: 750rpx;">
|
||||
<video id="myVideo" :src='playingUrl' objectFit="cover" controls style="width:100%;height:100% "
|
||||
show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :enable-progress-gesture="false"
|
||||
:poster="playingUrl+coverUrl" @pause="videoPause" @ended="endedFun()"></video>
|
||||
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
export default {
|
||||
props: {
|
||||
imgUrls: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
videoline: {
|
||||
type: String,
|
||||
value: ""
|
||||
},
|
||||
videoCoverImg: {
|
||||
type: String,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
coverUrl: '?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast',
|
||||
current: '0',
|
||||
videoTypeList: ['mp4', 'avi', 'mov', 'wmv', 'mkv', 'flv', 'mpeg', '3gp', 'webm'],
|
||||
playingUrl: '',
|
||||
indicatorDots: true,
|
||||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 5000,
|
||||
duration: 500,
|
||||
currents: "1",
|
||||
controls: true,
|
||||
isPlay: true,
|
||||
videoContext: ''
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
// #ifndef APP-PLUS
|
||||
this.videoContext = uni.createVideoContext('myVideo', this);
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
isVideoUrl(url, getRightUrl) {
|
||||
const str = url;
|
||||
const lastIndex = str.lastIndexOf(".");
|
||||
let extension;
|
||||
if (lastIndex !== -1) {
|
||||
extension = str.substring(lastIndex + 1);
|
||||
} else {
|
||||
extension = 'jpg'
|
||||
}
|
||||
if (getRightUrl) return url.replace(/\\/g, "")
|
||||
return this.videoTypeList.includes(extension)
|
||||
},
|
||||
|
||||
videoPlay(url, index) {
|
||||
this.playingUrl = url
|
||||
this.current = index
|
||||
console.log(this.current)
|
||||
this.bindPause()
|
||||
},
|
||||
getpreviewImage: function(item) {
|
||||
uni.previewImage({
|
||||
urls: this.imgUrls,
|
||||
current: item
|
||||
});
|
||||
},
|
||||
videoPause(e) {
|
||||
// #ifdef APP-PLUS
|
||||
this.isPlay = true
|
||||
this.autoplay = true
|
||||
// #endif
|
||||
},
|
||||
|
||||
bindPause: function() {
|
||||
// #ifndef APP-PLUS
|
||||
this.videoContext.play();
|
||||
this.$set(this, 'controls', false)
|
||||
this.autoplay = false
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
this.isPlay = false
|
||||
this.videoContext = uni.createVideoContext('myVideo', this);
|
||||
this.$nextTick(() => {
|
||||
this.videoContext.play();
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
change: function(e) {
|
||||
this.$set(this, 'currents', e.detail.current + 1);
|
||||
},
|
||||
endedFun() {
|
||||
this.controls = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.product-bg {
|
||||
width: 100%;
|
||||
height: 750rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg .slide-image {
|
||||
width: 750rpx;
|
||||
height: 750rpx;
|
||||
}
|
||||
|
||||
.product-bg .pages {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
height: 34rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 3rpx;
|
||||
right: 30rpx;
|
||||
bottom: 30rpx;
|
||||
line-height: 34rpx;
|
||||
font-size: 24rpx;
|
||||
color: #050505;
|
||||
}
|
||||
|
||||
#myVideo {
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.product-bg .item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .item .poster {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 750rpx;
|
||||
width: 100%;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.product-bg .item .poster .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .item .stop {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
margin-top: -68rpx;
|
||||
margin-left: -68rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.product-bg .item .stop .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.image-play-icon {
|
||||
position: absolute;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view :style="viewColor">
|
||||
<view class="product-window" :class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt || destri?'join':'') + ' ' + (isPresell ?'presell-window':'product-window')">
|
||||
<view class="product-window"
|
||||
:class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt || destri?'join':'') + ' ' + (isPresell ?'presell-window':'product-window')">
|
||||
<view class="textpic acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="attr.productSelect.image ? attr.productSelect.image : image" @click="loookImg"></image>
|
||||
@ -13,7 +14,8 @@
|
||||
<view>
|
||||
预售价
|
||||
¥<text class="num">{{ attr.productSelect.price }}</text>
|
||||
<text v-if="presell_type === 2">定金¥<text class="num">{{ attr.productSelect.down_price }}</text></text>
|
||||
<text v-if="presell_type === 2">定金¥<text
|
||||
class="num">{{ attr.productSelect.down_price }}</text></text>
|
||||
</view>
|
||||
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota_show}}</text>
|
||||
@ -42,8 +44,8 @@
|
||||
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
|
||||
<view class="title">{{ item.attr_name }}</view>
|
||||
<view class="listn acea-row row-middle">
|
||||
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attr_value"
|
||||
@click="tapAttr(indexw, indexn)" :key="indexn">
|
||||
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''"
|
||||
v-for="(itemn, indexn) in item.attr_value" @click="tapAttr(indexw, indexn)" :key="indexn">
|
||||
{{ itemn.attr }}
|
||||
</view>
|
||||
</view>
|
||||
@ -53,25 +55,29 @@
|
||||
<view class="title">数量</view>
|
||||
<view class="carnum acea-row row-left">
|
||||
<view class="buy_limit" v-if="minCount>0 || maxCount>0">
|
||||
(<text v-if="minCount>0">{{minCount}}件起购<text v-if="minCount>0 && maxCount>0">,</text></text><text v-if="maxCount>0">最多{{maxCount}}件</text>)
|
||||
(<text v-if="minCount>0">{{minCount}}件起购<text
|
||||
v-if="minCount>0 && maxCount>0">,</text></text><text
|
||||
v-if="maxCount>0">最多{{maxCount}}件</text>)
|
||||
</view>
|
||||
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
|
||||
-
|
||||
</view>
|
||||
<view class='item num'>
|
||||
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)" @keydown="btKeyDown" @keyup="btKeyUp"></input>
|
||||
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num"
|
||||
@input="bindCode(attr.productSelect.cart_num)" @keydown="btKeyDown"
|
||||
@keyup="btKeyUp"></input>
|
||||
</view>
|
||||
<view v-if="iSplus" class="item plus" :class=" attr.productSelect.cart_num >= attr.productSelect.stock || destri ? 'on' : ''"
|
||||
<view v-if="iSplus" class="item plus"
|
||||
:class=" attr.productSelect.cart_num >= attr.productSelect.stock || destri ? 'on' : ''"
|
||||
@click="CartNumAdd">+</view>
|
||||
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota_show)
|
||||
|| (attr.productSelect.cart_num >= attr.productSelect.product_stock)? "on":""'
|
||||
@click='CartNumAdd'>+</view>
|
||||
|| (attr.productSelect.cart_num >= attr.productSelect.product_stock)? "on":""' @click='CartNumAdd'>+
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="joinBnt b-color" v-if="destri && attr.productSelect.stock>0" @click="goCat">立即购买</view>
|
||||
<view class="joinBnt on" v-else-if="destri && attr.productSelect.stock<=0">已售罄</view>
|
||||
<view class="joinBnt b-color" v-if="iSbnt && attr.productSelect.stock>0"
|
||||
@click="goCat">我要参团</view>
|
||||
<view class="joinBnt b-color" v-if="iSbnt && attr.productSelect.stock>0" @click="goCat">我要参团</view>
|
||||
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.stock<=0)">已售罄</view>
|
||||
</view>
|
||||
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
|
||||
@ -88,7 +94,9 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import { mapGetters } from "vuex";
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
props: {
|
||||
attr: {
|
||||
@ -144,8 +152,7 @@
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 查看大图
|
||||
loookImg() {
|
||||
@ -170,7 +177,8 @@
|
||||
e.target.value = e.target.value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g, "");
|
||||
},
|
||||
btKeyUp(e) {
|
||||
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g,"")
|
||||
e.target.value = e.target.value.replace(
|
||||
/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g, "")
|
||||
},
|
||||
closeAttr: function() {
|
||||
this.$emit('myevent');
|
||||
@ -226,77 +234,95 @@
|
||||
padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
|
||||
&.presell-window {
|
||||
padding-bottom: 200rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.product-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.product-window.join {
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic {
|
||||
padding: 0 80rpx 0 30rpx;
|
||||
margin-top: 29rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-window .textpic .pictrue {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .text {
|
||||
width: 460rpx;
|
||||
font-size: 32rpx;
|
||||
color: #202020;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .money {
|
||||
font-size: 24rpx;
|
||||
margin-top: 26rpx;
|
||||
font-weight: 700;
|
||||
color: var(--view-priceColor);
|
||||
}
|
||||
|
||||
.product-window .stock_count {
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .money .num {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .money .stock {
|
||||
color: #999;
|
||||
margin-left: 18rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .presell_price {
|
||||
color: #FF7F00;
|
||||
|
||||
.num {
|
||||
display: inline-block;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.stock {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.vip-money {
|
||||
color: #282828;
|
||||
font-size: 22rpx;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
.vipImg {
|
||||
width: 65rpx;
|
||||
height: 28rpx;
|
||||
margin-left: 4rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.product-window .textpic .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
@ -304,22 +330,27 @@
|
||||
font-size: 35rpx;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
|
||||
.product-window .productWinList {
|
||||
max-height: 395rpx;
|
||||
overflow: auto;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item~.item {
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item .listn {
|
||||
padding: 0 30rpx 0 16rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item .listn .itemn {
|
||||
border: 1px solid #bbb;
|
||||
font-size: 26rpx;
|
||||
@ -328,11 +359,13 @@
|
||||
border-radius: 6rpx;
|
||||
margin: 14rpx 0 0 14rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item .listn .itemn.on {
|
||||
color: #fff;
|
||||
background-color: var(--view-theme);
|
||||
border-color: var(--view-theme);
|
||||
}
|
||||
|
||||
.product-window .cart {
|
||||
margin-top: 36rpx;
|
||||
padding: 0 30rpx;
|
||||
@ -345,20 +378,24 @@
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.product-window .cart .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
line-height: 54rpx;
|
||||
}
|
||||
|
||||
.product-window .cart .carnum {
|
||||
height: 54rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .buy_limit {
|
||||
font-size: 22rpx;
|
||||
color: var(--view-theme);
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .item {
|
||||
|
||||
width: 63rpx;
|
||||
@ -370,6 +407,7 @@
|
||||
font-size: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .reduce {
|
||||
border: 1px solid #a4a4a4;
|
||||
width: 44rpx;
|
||||
@ -379,10 +417,12 @@
|
||||
line-height: 30rpx;
|
||||
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .reduce.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .plus {
|
||||
border: 1px solid #a4a4a4;
|
||||
width: 44rpx;
|
||||
@ -391,14 +431,17 @@
|
||||
border-radius: 0 7rpx 7rpx 0;
|
||||
line-height: 30rpx
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .plus.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .num {
|
||||
color: #282828;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.product-window .joinBnt {
|
||||
font-size: 30rpx;
|
||||
width: 620rpx;
|
||||
@ -408,10 +451,12 @@
|
||||
line-height: 86rpx;
|
||||
color: #fff;
|
||||
margin: 21rpx auto 0 auto;
|
||||
|
||||
&.b-color {
|
||||
background-color: var(--view-theme);
|
||||
}
|
||||
}
|
||||
|
||||
.product-window .joinBnt.on {
|
||||
background-color: #bbb;
|
||||
color: #fff;
|
||||
|
466
components/productWindow/newIndex.vue
Normal file
466
components/productWindow/newIndex.vue
Normal file
@ -0,0 +1,466 @@
|
||||
<template>
|
||||
<view :style="viewColor">
|
||||
<view class="product-window"
|
||||
:class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt || destri?'join':'') + ' ' + (isPresell ?'presell-window':'product-window')">
|
||||
<view class="textpic acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="attr.productSelect.image ? attr.productSelect.image : image" @click="loookImg"></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="line1">
|
||||
{{ attr.productSelect.store_name }}
|
||||
</view>
|
||||
<view v-if="isPresell" class="money presell_price">
|
||||
<view>
|
||||
预售价
|
||||
¥<text class="num">{{ attr.productSelect.price }}</text>
|
||||
<text v-if="presell_type === 2">定金¥<text
|
||||
class="num">{{ attr.productSelect.down_price }}</text></text>
|
||||
</view>
|
||||
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota_show}}</text>
|
||||
</view>
|
||||
<view v-else class="money">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="acea-row row-middle">
|
||||
<text>¥</text><text class="num">{{ attr.productSelect.price }}</text>
|
||||
<view v-if="svipPrice" class="acea-row row-middle">
|
||||
<text class='vip-money'>¥{{attr.productSelect.svip_price}}</text>
|
||||
<view class="vipImg">
|
||||
<image src="/static/images/svip.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="stock_count">
|
||||
<text class="stock" v-if='isShow'>库12存: {{ attr.productSelect.stock }}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota_show}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
|
||||
</view>
|
||||
<view class="productWinList">
|
||||
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
|
||||
<view class="title">{{ item.attr_name }}</view>
|
||||
<view class="listn acea-row row-middle">
|
||||
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''"
|
||||
v-for="(itemn, indexn) in item.attr_value" @click="tapAttr(indexw, indexn)" :key="indexn">
|
||||
{{ itemn.attr }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cart acea-row">
|
||||
<view class="title">数量</view>
|
||||
<view class="carnum acea-row row-left">
|
||||
<view class="buy_limit" v-if="minCount>0 || maxCount>0">
|
||||
(<text v-if="minCount>0">{{minCount}}件起购<text
|
||||
v-if="minCount>0 && maxCount>0">,</text></text><text
|
||||
v-if="maxCount>0">最多{{maxCount}}件</text>)
|
||||
</view>
|
||||
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
|
||||
-
|
||||
</view>
|
||||
<view class='item num'>
|
||||
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num"
|
||||
@input="bindCode(attr.productSelect.cart_num)" @keydown="btKeyDown"
|
||||
@keyup="btKeyUp"></input>
|
||||
</view>
|
||||
<view v-if="iSplus" class="item plus"
|
||||
:class=" attr.productSelect.cart_num >= attr.productSelect.stock || destri ? 'on' : ''"
|
||||
@click="CartNumAdd">+</view>
|
||||
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota_show)
|
||||
|| (attr.productSelect.cart_num >= attr.productSelect.product_stock)? "on":""' @click='CartNumAdd'>+
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="joinBnt b-color" v-if="destri && attr.productSelect.stock>0" @click="goCat">立即购买</view>
|
||||
<view class="joinBnt on" v-else-if="destri && attr.productSelect.stock<=0">已售罄</view>
|
||||
<view class="joinBnt b-color" v-if="iSbnt && attr.productSelect.stock>0" @click="goCat">我要参团</view>
|
||||
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.stock<=0)">已售罄</view>
|
||||
</view>
|
||||
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
props: {
|
||||
attr: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
limitNum: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
isShow: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSbnt: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSplus: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
destri: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
isPresell: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
presell_type: {
|
||||
type: Number,
|
||||
value: 1
|
||||
},
|
||||
image: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
maxCount: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
minCount: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
svipPrice: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
}
|
||||
},
|
||||
computed: mapGetters(['viewColor']),
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.attr, 'attr')
|
||||
},
|
||||
methods: {
|
||||
// 查看大图
|
||||
loookImg() {
|
||||
let self = this
|
||||
let arr = [self.attr.productSelect.image ? self.attr.productSelect.image : self.image]
|
||||
uni.previewImage({
|
||||
urls: arr,
|
||||
});
|
||||
},
|
||||
goCat: function() {
|
||||
this.$emit('goCat');
|
||||
},
|
||||
/**
|
||||
* 购物车手动输入数量
|
||||
*
|
||||
*/
|
||||
bindCode: function(e) {
|
||||
let num = JSON.parse(JSON.stringify(e))
|
||||
this.$emit('iptCartNum', num);
|
||||
},
|
||||
btKeyDown(e) {
|
||||
e.target.value = e.target.value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g, "");
|
||||
},
|
||||
btKeyUp(e) {
|
||||
e.target.value = e.target.value.replace(
|
||||
/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g, "")
|
||||
},
|
||||
closeAttr: function() {
|
||||
this.$emit('myevent');
|
||||
},
|
||||
CartNumDes: function() {
|
||||
if (!this.destri) {
|
||||
this.$emit('ChangeCartNum', false);
|
||||
}
|
||||
},
|
||||
CartNumAdd: function() {
|
||||
if (!this.destri) {
|
||||
this.$emit('ChangeCartNum', true);
|
||||
}
|
||||
},
|
||||
tapAttr: function(indexw, indexn) {
|
||||
let that = this;
|
||||
that.$emit("attrVal", {
|
||||
indexw: indexw,
|
||||
indexn: indexn
|
||||
});
|
||||
this.$set(this.attr.productAttr[indexw], 'index', this.attr.productAttr[indexw].attr_values[indexn]);
|
||||
let value = that.getCheckedValue().join(",");
|
||||
that.$emit("ChangeAttr", value);
|
||||
},
|
||||
//获取被选中属性;
|
||||
getCheckedValue: function() {
|
||||
let productAttr = this.attr.productAttr;
|
||||
let value = [];
|
||||
for (let i = 0; i < productAttr.length; i++) {
|
||||
for (let j = 0; j < productAttr[i].attr_values.length; j++) {
|
||||
if (productAttr[i].index === productAttr[i].attr_values[j]) {
|
||||
value.push(productAttr[i].attr_values[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.product-window {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
z-index: 77;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
padding-bottom: 140rpx;
|
||||
padding-bottom: calc(140rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||
padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
|
||||
&.presell-window {
|
||||
padding-bottom: 200rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.product-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.product-window.join {
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic {
|
||||
padding: 0 80rpx 0 30rpx;
|
||||
margin-top: 29rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-window .textpic .pictrue {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .text {
|
||||
width: 460rpx;
|
||||
font-size: 32rpx;
|
||||
color: #202020;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .money {
|
||||
font-size: 24rpx;
|
||||
margin-top: 26rpx;
|
||||
font-weight: 700;
|
||||
color: var(--view-priceColor);
|
||||
}
|
||||
|
||||
.product-window .stock_count {
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .money .num {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .money .stock {
|
||||
color: #999;
|
||||
margin-left: 18rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .presell_price {
|
||||
color: #FF7F00;
|
||||
|
||||
.num {
|
||||
display: inline-block;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.stock {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.vip-money {
|
||||
color: #282828;
|
||||
font-size: 22rpx;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
.vipImg {
|
||||
width: 65rpx;
|
||||
height: 28rpx;
|
||||
margin-left: 4rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.product-window .textpic .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: -5rpx;
|
||||
font-size: 35rpx;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
|
||||
.product-window .productWinList {
|
||||
max-height: 395rpx;
|
||||
overflow: auto;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item~.item {
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item .listn {
|
||||
padding: 0 30rpx 0 16rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item .listn .itemn {
|
||||
border: 1px solid #bbb;
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
padding: 7rpx 33rpx;
|
||||
border-radius: 6rpx;
|
||||
margin: 14rpx 0 0 14rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item .listn .itemn.on {
|
||||
color: #fff;
|
||||
background-color: var(--view-theme);
|
||||
border-color: var(--view-theme);
|
||||
}
|
||||
|
||||
.product-window .cart {
|
||||
margin-top: 36rpx;
|
||||
padding: 0 30rpx;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.product-window .cart .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
line-height: 54rpx;
|
||||
}
|
||||
|
||||
.product-window .cart .carnum {
|
||||
height: 54rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .buy_limit {
|
||||
font-size: 22rpx;
|
||||
color: var(--view-theme);
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .item {
|
||||
|
||||
width: 63rpx;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
line-height: 42rpx;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .reduce {
|
||||
border: 1px solid #a4a4a4;
|
||||
width: 44rpx;
|
||||
height: 42rpx;
|
||||
// border-right: 0;
|
||||
border-radius: 0 7rpx 7rpx 0;
|
||||
line-height: 30rpx;
|
||||
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .reduce.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .plus {
|
||||
border: 1px solid #a4a4a4;
|
||||
width: 44rpx;
|
||||
height: 42rpx;
|
||||
// border-right: 0;
|
||||
border-radius: 0 7rpx 7rpx 0;
|
||||
line-height: 30rpx
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .plus.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
}
|
||||
|
||||
.product-window .cart .carnum .num {
|
||||
color: #282828;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.product-window .joinBnt {
|
||||
font-size: 30rpx;
|
||||
width: 620rpx;
|
||||
height: 86rpx;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 86rpx;
|
||||
color: #fff;
|
||||
margin: 21rpx auto 0 auto;
|
||||
|
||||
&.b-color {
|
||||
background-color: var(--view-theme);
|
||||
}
|
||||
}
|
||||
|
||||
.product-window .joinBnt.on {
|
||||
background-color: #bbb;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
@ -483,7 +483,6 @@
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #959595;
|
||||
background-color: #E7E6E4;
|
||||
@ -512,9 +511,7 @@
|
||||
background: #F5F5F5;
|
||||
border-radius: 7rpx 7rpx 7rpx 7rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
|
||||
margin-left: 20rpx;
|
||||
|
||||
|
||||
|
@ -163,14 +163,12 @@
|
||||
|
||||
.title1 {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.title2 {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
margin-top: 11rpx;
|
||||
|
@ -456,7 +456,6 @@
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #959595;
|
||||
background-color: #E7E6E4;
|
||||
@ -485,7 +484,6 @@
|
||||
background: #F5F5F5;
|
||||
border-radius: 7rpx 7rpx 7rpx 7rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
|
||||
margin-left: 20rpx;
|
||||
|
@ -4,7 +4,8 @@
|
||||
<view class="pop">
|
||||
<scroll-view scroll-y class="scroll">
|
||||
<view class="image">
|
||||
<swiper class="swiper" :current="current" autoplay style="width: 100%;height: 100%;" @change="changeCurrent">
|
||||
<swiper class="swiper" :current="current" autoplay style="width: 100%;height: 100%;"
|
||||
@change="changeCurrent">
|
||||
<block v-if="product.slider_image && product.slider_image.length>0">
|
||||
<swiper-item v-for="(item,index) in product.slider_image" :key="index">
|
||||
<image class="img" :src="item" :lazy-load="true"></image>
|
||||
@ -14,7 +15,8 @@
|
||||
<image class="img" :src="datas.image||defualtImg"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="current">{{current+1}}/{{product.slider_image && product.slider_image.length||1}}</view>
|
||||
<view class="current">{{current+1}}/{{product.slider_image && product.slider_image.length||1}}
|
||||
</view>
|
||||
<image class="close" src="@/static/images/icon/close.png" @click="close()"></image>
|
||||
<view class="border"></view>
|
||||
</view>
|
||||
@ -49,17 +51,20 @@
|
||||
({{once_min_count}}件起购)
|
||||
</view>
|
||||
<view class="input_item sub" @click="subCartNum">-</view>
|
||||
<input class="input_item input_view" v-model="cart_num" type="number" @input="inputCartNum" @blur="inputCartNumBlur" />
|
||||
<input class="input_item input_view" v-model="cart_num" type="number"
|
||||
@input="inputCartNum" @blur="inputCartNumBlur" />
|
||||
<view class="input_item plus" @click="plusCartNum">+</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
商品库存 <text style="margin-left: 20rpx;">{{sku[changeSkuKey] ? sku[changeSkuKey].stock : change.stock}}</text>
|
||||
商品库存 <text
|
||||
style="margin-left: 20rpx;">{{sku[changeSkuKey] ? sku[changeSkuKey].stock : change.stock}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="button">
|
||||
<view class="b_icon" @click="navgo(source==12 ? '/pages/nongKe/supply_chain/shopping_trolley_other?source='+source : '/pages/nongKe/supply_chain/shopping_trolley_a')">
|
||||
<view class="b_icon"
|
||||
@click="navgo(source==12 ? '/pages/nongKe/supply_chain/shopping_trolley_other?source='+source : '/pages/nongKe/supply_chain/shopping_trolley_a')">
|
||||
<image src="@/static/images/icon/car.png"></image>
|
||||
<view>采购车</view>
|
||||
<view class="badge" v-if="goodsNum">
|
||||
@ -79,7 +84,9 @@
|
||||
postCartAdd,
|
||||
getProductDetail
|
||||
} from '@/api/store.js';
|
||||
import { Toast } from '../libs/uniApi';
|
||||
import {
|
||||
Toast
|
||||
} from '../libs/uniApi';
|
||||
export default {
|
||||
name: "shortPopup",
|
||||
props: {
|
||||
@ -115,14 +122,13 @@
|
||||
once_min_count: 1, //最少购买件数
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
mounted() {},
|
||||
computed: {
|
||||
leftPrice() {
|
||||
return this.sku[this.changeSkuKey]?.procure_price?.split('.')[0]||'0';
|
||||
return this.sku[this.changeSkuKey]?.wholesale_price?.split('.')[0] || '0';
|
||||
},
|
||||
rightPrice() {
|
||||
return this.sku[this.changeSkuKey]?.procure_price?.split('.')[1]||'00';
|
||||
return this.sku[this.changeSkuKey]?.wholesale_price?.split('.')[1] || '00';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -247,7 +253,7 @@
|
||||
// return console.log(this.sku[this.changeSkuKey]);
|
||||
if (this.cart_num < this.once_min_count) return Toast(`至少要购买${this.once_min_count}件哦`);
|
||||
if (!this.sku[this.changeSkuKey]) return Toast('该规格有错误, 请选择其他规格');
|
||||
if(+this.sku[this.changeSkuKey].procure_price * +this.cart_num<=0) return Toast('无法购买价格小于等于0的商品');
|
||||
if (+this.sku[this.changeSkuKey].wholesale_price * +this.cart_num <= 0) return Toast('无法购买价格小于等于0的商品');
|
||||
if (this.sku[this.changeSkuKey]) {
|
||||
if (this.cart_num > this.sku[this.changeSkuKey].stock) return uni.showToast({
|
||||
icon: 'none',
|
||||
@ -340,7 +346,6 @@
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@ -392,7 +397,6 @@
|
||||
|
||||
.short_name {
|
||||
font-size: 33rpx;
|
||||
font-family: PingFang SC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
}
|
||||
@ -415,7 +419,6 @@
|
||||
|
||||
.m_title {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-top: 31rpx;
|
||||
@ -543,7 +546,6 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
@ -184,12 +184,14 @@
|
||||
setTimeout(() => {
|
||||
this.fSelecting = false;
|
||||
}, 500);
|
||||
console.log("选择图片");
|
||||
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: (r) => {
|
||||
console.log("选择图片成功");
|
||||
// #ifdef MP-ALIPAY
|
||||
uni.showLoading();
|
||||
// #endif
|
||||
@ -254,6 +256,9 @@
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log("选择图片错误");
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -1261,7 +1266,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.my-canvas {
|
||||
display: flex;
|
||||
position: fixed !important;
|
||||
|
@ -9,9 +9,9 @@ let httpApiThree
|
||||
let wsApi
|
||||
|
||||
// 在打包之前请检查当前环境是否正确
|
||||
const env = 'dev'; // 开发
|
||||
// const env = 'dev'; // 开发
|
||||
// const env = 'prod'; // 生产
|
||||
// const env = 'prew'; // 预上线
|
||||
const env = 'prew'; // 预上线
|
||||
|
||||
switch (env) {
|
||||
case 'prod':
|
||||
|
@ -87,7 +87,7 @@ export function clearStorage() {
|
||||
@title 最多汉字数量7个
|
||||
@icon success loading none
|
||||
*/
|
||||
export function Toast(title, icon = 'none', obj = {}, duration = 800) {
|
||||
export function Toast(title, icon = 'none', obj = {}, duration = 1200) {
|
||||
let toastData = {
|
||||
title: title,
|
||||
duration: duration,
|
||||
|
4
main.js
4
main.js
@ -25,10 +25,10 @@ Vue.component('BaseMoney', BaseMoney)
|
||||
Vue.component('barcode', barcode)
|
||||
Vue.prototype.$util = util;
|
||||
Vue.prototype.$Cache = Cache;
|
||||
Vue.prototype.$procure_price = (item)=>{
|
||||
Vue.prototype.$wholesale_price = (item)=>{
|
||||
if(item.sku){
|
||||
let key = Object.keys(item.sku)||[''];
|
||||
return item.sku[key[0]]?.procure_price;
|
||||
return item.sku[key[0]]?.wholesale_price;
|
||||
}
|
||||
else return '无批发价';
|
||||
}
|
||||
|
135
manifest.json
135
manifest.json
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "惠农商户平台",
|
||||
"appid" : "__UNI__1EE148C",
|
||||
"appid": "__UNI__7626C0F",
|
||||
"description": "",
|
||||
"versionName" : "1.3.9",
|
||||
"versionCode" : 139,
|
||||
"versionName": "1.5.4",
|
||||
"versionCode": 1540,
|
||||
"transformPx": false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
@ -163,6 +163,134 @@
|
||||
"splashscreen": {
|
||||
"useOriginalMsgbox": true
|
||||
}
|
||||
},
|
||||
"nativePlugins": {
|
||||
"JG-JCore": {
|
||||
"JPUSH_APPKEY_IOS": "",
|
||||
"JPUSH_CHANNEL_IOS": "",
|
||||
"JPUSH_APPKEY_ANDROID": "",
|
||||
"JPUSH_CHANNEL_ANDROID": "",
|
||||
"__plugin_info__": {
|
||||
"name": "JG-JCore",
|
||||
"description": "极光推送JCore插件",
|
||||
"platforms": "Android,iOS",
|
||||
"url": "",
|
||||
"android_package_name": "",
|
||||
"ios_bundle_id": "",
|
||||
"isCloud": false,
|
||||
"bought": -1,
|
||||
"pid": "",
|
||||
"parameters": {
|
||||
"JPUSH_APPKEY_IOS": {
|
||||
"des": "[iOS]极光portal配置应用信息时分配的AppKey",
|
||||
"key": "JCore:APP_KEY",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_CHANNEL_IOS": {
|
||||
"des": "[iOS]用于统计分发渠道,不需要可填默认值developer-default",
|
||||
"key": "JCore:CHANNEL",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_APPKEY_ANDROID": {
|
||||
"des": "[Android]极光portal配置应用信息时分配的AppKey",
|
||||
"key": "JPUSH_APPKEY",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_CHANNEL_ANDROID": {
|
||||
"des": "[Android]用于统计分发渠道,不需要可填默认值developer-default",
|
||||
"key": "JPUSH_CHANNEL",
|
||||
"value": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"JG-JPush": {
|
||||
"JPUSH_ISPRODUCTION_IOS": "",
|
||||
"JPUSH_ADVERTISINGID_IOS": "",
|
||||
"JPUSH_DEFAULTINITJPUSH_IOS": "",
|
||||
"JPUSH_OPPO_APPKEY": "",
|
||||
"JPUSH_OPPO_APPID": "",
|
||||
"JPUSH_OPPO_APPSECRET": "",
|
||||
"JPUSH_VIVO_APPKEY": "",
|
||||
"JPUSH_VIVO_APPID": "",
|
||||
"JPUSH_MEIZU_APPKEY": "",
|
||||
"JPUSH_MEIZU_APPID": "",
|
||||
"JPUSH_XIAOMI_APPKEY": "",
|
||||
"JPUSH_XIAOMI_APPID": "",
|
||||
"__plugin_info__": {
|
||||
"name": "JG-JPush",
|
||||
"description": "极光推送Hbuilder插件",
|
||||
"platforms": "Android,iOS",
|
||||
"url": "",
|
||||
"android_package_name": "",
|
||||
"ios_bundle_id": "",
|
||||
"isCloud": false,
|
||||
"bought": -1,
|
||||
"pid": "",
|
||||
"parameters": {
|
||||
"JPUSH_ISPRODUCTION_IOS": {
|
||||
"des": "[iOS]是否是生产环境,是填true,不是填false或者不填",
|
||||
"key": "JPush:ISPRODUCTION",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_ADVERTISINGID_IOS": {
|
||||
"des": "[iOS]广告标识符(IDFA)如果不需要使用IDFA,可不填",
|
||||
"key": "JPush:ADVERTISINGID",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_DEFAULTINITJPUSH_IOS": {
|
||||
"des": "[iOS]是否默认初始化,是填true,不是填false或者不填",
|
||||
"key": "JPush:DEFAULTINITJPUSH",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_OPPO_APPKEY": {
|
||||
"des": "厂商OPPO-appkey,示例:OP-12345678",
|
||||
"key": "OPPO_APPKEY",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_OPPO_APPID": {
|
||||
"des": "厂商OPPO-appId,示例:OP-12345678",
|
||||
"key": "OPPO_APPID",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_OPPO_APPSECRET": {
|
||||
"des": "厂商OPPO-appSecret,示例:OP-12345678",
|
||||
"key": "OPPO_APPSECRET",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_VIVO_APPKEY": {
|
||||
"des": "厂商VIVO-appkey,示例:12345678",
|
||||
"key": "com.vivo.push.api_key",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_VIVO_APPID": {
|
||||
"des": "厂商VIVO-appId,示例:12345678",
|
||||
"key": "com.vivo.push.app_id",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_MEIZU_APPKEY": {
|
||||
"des": "厂商MEIZU-appKey,示例:MZ-12345678",
|
||||
"key": "MEIZU_APPKEY",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_MEIZU_APPID": {
|
||||
"des": "厂商MEIZU-appId,示例:MZ-12345678",
|
||||
"key": "MEIZU_APPID",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_XIAOMI_APPKEY": {
|
||||
"des": "厂商XIAOMI-appKey,示例:MI-12345678",
|
||||
"key": "XIAOMI_APPKEY",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_XIAOMI_APPID": {
|
||||
"des": "厂商XIAOMI-appId,示例:MI-12345678",
|
||||
"key": "XIAOMI_APPID",
|
||||
"value": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
@ -215,4 +343,3 @@
|
||||
}
|
||||
//拨打电话权限关闭
|
||||
/* ios打包配置 */
|
||||
|
||||
|
210
pages.json
210
pages.json
@ -47,7 +47,38 @@
|
||||
"enablePullDownRefresh": true,
|
||||
// #endif
|
||||
"app-plus": {
|
||||
"scrollIndicator": false //禁用原生导航栏
|
||||
"scrollIndicator": false, //禁用原生导航栏
|
||||
"subNVues": [{
|
||||
"id": "concat", // 唯一标识
|
||||
"path": "pages/index/subnvue/concat", // 页面路径
|
||||
"type": "popup",
|
||||
"style": {
|
||||
"position": "absolute",
|
||||
"dock": "right",
|
||||
"width": "750rpx",
|
||||
"height": "1500rpx",
|
||||
"background": "rgba(0,0,0,0.2)"
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/test/index", //首页
|
||||
"style": {
|
||||
"app-plus": {
|
||||
"subNVues": [{
|
||||
"id": "concat", // 唯一标识
|
||||
"path": "pages/test/subnvue/concat", // 页面路径
|
||||
/*"type": "popup", 这里不需要*/
|
||||
"style": {
|
||||
"position": "absolute",
|
||||
"dock": "right",
|
||||
"width": "100rpx",
|
||||
"height": "150rpx",
|
||||
"background": "transparent"
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -78,6 +109,12 @@
|
||||
"scrollIndicator": false //禁用原生导航栏
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/unregist",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/nongKe/supply_chain/shopping_trolley",
|
||||
@ -300,9 +337,38 @@
|
||||
"navigationBarTitleText": "补贴",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/cashier/cashier",
|
||||
"style": {
|
||||
"navigationBarTitleText": "收银",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
"root": "pages/withdrawal",
|
||||
"name": "withdrawal",
|
||||
"pages": [{
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提货付款",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "add",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加银行卡",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "progress",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提现进度",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
"root": "pages/payment",
|
||||
"name": "payment",
|
||||
"pages": [{
|
||||
@ -1250,7 +1316,9 @@
|
||||
{
|
||||
"path": "orderList/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单列表"
|
||||
"navigationBarTitleText": "订单列表",
|
||||
"enablePullDownRefresh": true
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -1331,7 +1399,15 @@
|
||||
"navigationBarTitleText": "商品详情"
|
||||
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"path": "goods_details/videoPlay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "视屏详情"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stockOut/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "扫码出库",
|
||||
@ -1354,7 +1430,22 @@
|
||||
"path": "list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品管理",
|
||||
"enablePullDownRefresh": true
|
||||
"enablePullDownRefresh": true,
|
||||
"app-plus": {
|
||||
"scrollIndicator": false, //禁用原生导航栏
|
||||
"subNVues": [{
|
||||
"id": "concatpro", // 唯一标识
|
||||
"path": "list/subnvue/concat", // 页面路径
|
||||
"type": "popup",
|
||||
"style": {
|
||||
"position": "absolute",
|
||||
"dock": "right",
|
||||
"width": "750rpx",
|
||||
"height": "2000rpx",
|
||||
"background": "rgba(0,0,0,0.2)"
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -1392,74 +1483,91 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加店铺分类"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "addGoods/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加商品"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "addGoods/secound",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加商品"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "addGoods/addGoodDetils",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "addGoods/singleSpecification",
|
||||
"style": {
|
||||
"navigationBarTitleText": "单规格"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "addGoods/mulSpecification",
|
||||
"style": {
|
||||
"navigationBarTitleText": "多规格"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "addGoods/specificationProperties",
|
||||
"style": {
|
||||
"navigationBarTitleText": "规格属性"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "addGoods/freightTemplate",
|
||||
"style": {
|
||||
"navigationBarTitleText": "运费模板",
|
||||
"onReachBottomDistance": 100,
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "addGoods/addFreightTemplate",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新增运费模板"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "addGoods/modifyPrice",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改价格-多规格"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "basicSet",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商户基本设置",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "shop_type_change/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "类型变更",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "shop_type_change/progress",
|
||||
"style": {
|
||||
"navigationBarTitleText": "变更进度",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "shop_type_change/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请记录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "addGood/addGood",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品设置",
|
||||
"navigationBarTitleText": "发布商品",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addGood/addGoodOld",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布商品",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
@ -1490,7 +1598,43 @@
|
||||
"navigationBarTitleText": "更新库存",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addGoodDetail/addGoodDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布商品",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addGoodDetail/goodsType",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品分类",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addGoodDetail/goodsAttr",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品属性",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addGoodDetail/goodsPrice",
|
||||
"style": {
|
||||
"navigationBarTitleText": "价格与规格",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addGoodDetail/goodsSearch",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品分类",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1675,14 +1819,14 @@
|
||||
"iconPath": "static/tabbar_icon/s.png",
|
||||
"selectedIconPath": "static/tabbar_icon/s-a.png",
|
||||
"text": "统计"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/nongKe/supply_chain/shopping_trolley",
|
||||
"iconPath": "static/tabbar_icon/d.png",
|
||||
"selectedIconPath": "static/tabbar_icon/d-a.png",
|
||||
"text": "采购车"
|
||||
}
|
||||
// {
|
||||
// "pagePath": "pages/nongKe/supply_chain/shopping_trolley",
|
||||
// "iconPath": "static/tabbar_icon/d.png",
|
||||
// "selectedIconPath": "static/tabbar_icon/d-a.png",
|
||||
// "text": "采购车"
|
||||
// }
|
||||
// {
|
||||
// "pagePath": "pages/product/list/index",
|
||||
// "iconPath": "static/tabbar_icon/c.png",
|
||||
// "selectedIconPath": "static/tabbar_icon/c-a.png",
|
||||
|
@ -7,7 +7,8 @@
|
||||
<view class="c-head">
|
||||
<view :class="type==2?'left':'right'" @click="changeType(2)">增收销售补贴</view>
|
||||
<!-- <view :class="type==1?'left':'right'" @click="changeType(1)">春耕采购补贴</view> -->
|
||||
<view v-if="mer_info.type_code=='PersonalStore'" :class="type==1?'left':'right'" @click="changeType(1)">春耕采购补贴</view>
|
||||
<view v-if="mer_info.type_code=='PersonalStore'" :class="type==1?'left':'right'"
|
||||
@click="changeType(1)">春耕采购补贴</view>
|
||||
<view v-else></view>
|
||||
</view>
|
||||
<view class="c-body-title">
|
||||
@ -17,8 +18,8 @@
|
||||
<view class="c-body-text">
|
||||
<view class="price">{{info.subsidy_amount}}元</view>
|
||||
<view>
|
||||
<text v-if="info.subsidy_status" class="price">已到账</text>
|
||||
<text v-else>未激活</text>
|
||||
<text v-if="info.subsidy_status==2" class="price">{{info.subsidy_status_name}}</text>
|
||||
<text v-else>{{info.subsidy_status_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -30,13 +31,15 @@
|
||||
<view class="body">
|
||||
<view class="b-card" v-if="type==1">
|
||||
<view class="b-top">
|
||||
<view>春耕采购金额{{info.spring_subsidy_amount}}元</view>
|
||||
<view>春耕采购金额{{info.spring_subsidy}}元</view>
|
||||
<view>剩余金额{{info.balance}}元</view>
|
||||
</view>
|
||||
<view class="b-bottom">
|
||||
<view class="pro">
|
||||
<view class="loss">
|
||||
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
|
||||
<view class="loss" :style="{left: `-${100-info.spring_subsidy_rate}%`}">
|
||||
<image class="image"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
|
||||
</image>
|
||||
<view class="text">{{info.spring_subsidy_rate}}%</view>
|
||||
</view>
|
||||
|
||||
@ -53,7 +56,9 @@
|
||||
<view class="b-bottom">
|
||||
<view class="pro">
|
||||
<view class="loss" :style="{left: `-${100-info.sale_finish_rate}%`}">
|
||||
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
|
||||
<image class="image"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
|
||||
</image>
|
||||
<view class="text">{{info.sale_finish_rate}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -61,6 +66,26 @@
|
||||
<view v-else style="color: #ADADAD;">未完成</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b-card" v-if="type==1">
|
||||
<view class="b-top">
|
||||
<view>采购目标金额{{info.purchase_target}}元</view>
|
||||
<view>当前进度{{info.purchase_amount}}元</view>
|
||||
</view>
|
||||
<view class="b-bottom">
|
||||
<view class="pro">
|
||||
<view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}">
|
||||
<image class="image"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
|
||||
</image>
|
||||
<view class="text">{{info.purchase_finish_rate}}%</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view v-if="info.purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
|
||||
<view v-else style="color: #ADADAD;">未完成</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="b-card">
|
||||
<view class="b-top">
|
||||
<view>里海云仓采购目标金额{{info.official_purchase_target}}元</view>
|
||||
@ -69,7 +94,9 @@
|
||||
<view class="b-bottom">
|
||||
<view class="pro">
|
||||
<view class="loss" :style="{left: `-${100-info.official_purchase_finish_rate}%`}">
|
||||
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
|
||||
<image class="image"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
|
||||
</image>
|
||||
<view class="text">{{info.official_purchase_finish_rate}}%</view>
|
||||
</view>
|
||||
|
||||
@ -86,7 +113,9 @@
|
||||
<view class="b-bottom">
|
||||
<view class="pro">
|
||||
<view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}">
|
||||
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
|
||||
<image class="image"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
|
||||
</image>
|
||||
<view class="text">{{info.purchase_finish_rate}}%</view>
|
||||
</view>
|
||||
|
||||
@ -95,10 +124,15 @@
|
||||
<view v-else style="color: #ADADAD;">未完成</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="b-tips" v-if="type==1">
|
||||
*春耕采购余额使用完,采购金额和销售金额达到后才可获取补贴
|
||||
*春耕采购余额使用完,采购金额和销售金额达到后才可获取补贴。<br>
|
||||
*当进度完成时将在每月月底进行统计审核,审核完成后经本人确认,一个季度内到账。
|
||||
</view>
|
||||
<view class="b-list" v-else>
|
||||
<view class="b-tips" v-if="type==2">
|
||||
*当进度完成时将在每月月底进行统计审核,审核完成后经本人确认,一个季度内到账。
|
||||
</view>
|
||||
<view class="b-list">
|
||||
<view class="list-head"></view>
|
||||
<view class="list-body">
|
||||
<view class="list-b-title">
|
||||
@ -108,13 +142,18 @@
|
||||
<view>状态</view>
|
||||
</view>
|
||||
<view class="list-b-text" v-for="(item,index) in list" :key="index">
|
||||
<view class="item1">¥{{ item.extra.purchase_amount }}</view>
|
||||
<view class="item2">¥{{ item.extra.sale_amount }}</view>
|
||||
<view class="item3" v-if="item.status!=1">¥{{ cPrice(item.coupon_price) }}</view>
|
||||
<view class="item3" v-else>¥{{ item.coupon_price }}</view>
|
||||
<view class="item4">
|
||||
<text v-if="item.status!=1">未激活</text>
|
||||
<text v-else style="color: #FF5E0C;">已到账</text>
|
||||
<view class="item1">
|
||||
¥{{ cPrice2(item.extra.official_purchase_target, item.extra.purchase_target) }}</view>
|
||||
<view class="item2">¥{{ item.extra.sale_target }}</view>
|
||||
<view class="item3">
|
||||
<text v-if="item.id==0">¥{{cPrice(item.coupon_price)}}</text>
|
||||
<text v-else>¥{{item.coupon_price}}</text>
|
||||
</view>
|
||||
<view class="item4" @click="showPopup(item.send_status, item.id)">
|
||||
<!-- send_status 发放状态:-1未激活,0待审核,1待领取,2已完成 -->
|
||||
<text v-if="item.send_status==2||item.send_status==1"
|
||||
style="color: #FF5E0C;">{{item.send_status_cn}}</text>
|
||||
<text v-else>{{item.send_status_cn}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-b-text" style="align-items: center;" v-if="list.length == 0">
|
||||
@ -122,13 +161,69 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-popup type="center" ref="pupRef">
|
||||
<view style="width: 630rpx;height: 500rpx;position: relative;">
|
||||
<view style="position: absolute;top: 0;right: 10rpx;" @click="closePopup">
|
||||
<image style="width: 50rpx;height: 50rpx;"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/c8b19202403201714381681.webp"></image>
|
||||
</view>
|
||||
<view style="width: 630rpx;position: absolute;top: 70rpx;right: 0;"
|
||||
:class="[send_status_cn>0?'h430':'h310']">
|
||||
<image style="width: 100%;" :class="[send_status_cn>0?'h430':'h310']"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/23ad8202403201716417527.webp"></image>
|
||||
<view
|
||||
style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;padding: 30rpx;display: flex;flex-direction: column;justify-content: center;">
|
||||
<view style="padding-bottom: 50rpx;font-size: 32rpx;color: #2E2E2E;">
|
||||
<text v-if="send_status_cn==-1">补贴未激活</text>
|
||||
<text v-else-if="send_status_cn==0">补贴审核中</text>
|
||||
<text v-else-if="send_status_cn==1">补贴待领取</text>
|
||||
<text v-else-if="send_status_cn==10">请填写错误内容</text>
|
||||
</view>
|
||||
<view style="color: #7A7A7A;font-size: 28rpx;">
|
||||
<text v-if="send_status_cn==-1">当前采购目标金额、销售目标金额未完成,无法提交报审。</text>
|
||||
<text v-else-if="send_status_cn==0">你的补贴申请已提交报审,审核周期为3个月内,审核完成后,将会以短信形式通知。</text>
|
||||
<text v-else-if="send_status_cn==1">
|
||||
请核对补贴金额是否正确,如有疑问,请联系工作人员。
|
||||
电话:13627640188
|
||||
</text>
|
||||
</view>
|
||||
<view v-if="send_status_cn==10"
|
||||
style="background-color: #fff;border-radius: 20rpx;padding: 20rpx;">
|
||||
<textarea v-model="reason" placeholder="请填写错误内容" style="height: 100rpx;" />
|
||||
</view>
|
||||
<view v-if="send_status_cn==1"
|
||||
style="display: flex;justify-content: center;margin-top: 30rpx;color: #F98144;">
|
||||
<view @click="reAudit"
|
||||
style="padding: 9rpx 50rpx 12rpx 50rpx;border-radius: 40rpx;border: 4rpx solid #F98144;margin-right: 100rpx;">
|
||||
错误</view>
|
||||
<view @click="couponReceive"
|
||||
style="padding: 9rpx 50rpx 12rpx 50rpx;border-radius: 40rpx;border: 4rpx solid #F98144;color: #FFF;background-color: #F98144;">
|
||||
正确</view>
|
||||
</view>
|
||||
<view v-else-if="send_status_cn==10"
|
||||
style="display: flex;justify-content: center;margin-top: 30rpx;color: #F98144;">
|
||||
<view @click="couponRefuse"
|
||||
style="padding: 9rpx 50rpx 12rpx 50rpx;border-radius: 40rpx;border: 4rpx solid #F98144;color: #FFF;background-color: #F98144;">
|
||||
提交</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSubsidy, getSubsidyRecord } from "@/api/admin.js"
|
||||
import {
|
||||
getSubsidy,
|
||||
getSubsidyRecord,
|
||||
couponReceive,
|
||||
couponRefuse
|
||||
} from "@/api/admin.js"
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -136,6 +231,9 @@
|
||||
mer_id: '',
|
||||
info: {},
|
||||
list: [],
|
||||
send_status_cn: '1',
|
||||
send_id: 0,
|
||||
reason: '',
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
@ -152,17 +250,27 @@
|
||||
this.mer_info.type_code = user.mer_info.type_code;
|
||||
this.mer_id = user.service.mer_id;
|
||||
this.getSubsidy();
|
||||
if(this.type==2)this.getSubsidyRecord();
|
||||
this.getSubsidyRecord();
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
showPopup(type, send_id) {
|
||||
this.send_status_cn = type;
|
||||
this.send_id = send_id;
|
||||
if (type == 2) Toast('已经领取过啦');
|
||||
else this.$refs.pupRef.open();
|
||||
},
|
||||
closePopup() {
|
||||
this.$refs.pupRef.close();
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
changeType(type) {
|
||||
this.type = type;
|
||||
this.where.type = type;
|
||||
this.getSubsidy();
|
||||
if(type==2)this.getSubsidyRecord();
|
||||
this.getSubsidyRecord();
|
||||
},
|
||||
getSubsidy() {
|
||||
if (!this.mer_id) return;
|
||||
@ -172,16 +280,57 @@
|
||||
this.info = res.data;
|
||||
})
|
||||
},
|
||||
couponReceive() {
|
||||
this.closePopup();
|
||||
couponReceive({
|
||||
mer_id: this.mer_id,
|
||||
id: this.send_id,
|
||||
}).then(res => {
|
||||
this.$nextTick(() => {
|
||||
Toast('领取成功')
|
||||
})
|
||||
}).catch(err => {
|
||||
this.$nextTick(() => {
|
||||
Toast(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
reAudit() {
|
||||
this.send_status_cn = 10;
|
||||
},
|
||||
couponRefuse() {
|
||||
if (this.reason == '') return Toast('错误内容不能为空');
|
||||
this.closePopup();
|
||||
couponRefuse({
|
||||
mer_id: this.mer_id,
|
||||
id: this.send_id,
|
||||
reason: this.reason
|
||||
}).then(res => {
|
||||
this.$nextTick(() => {
|
||||
Toast('提交成功')
|
||||
})
|
||||
}).catch(err => {
|
||||
this.$nextTick(() => {
|
||||
Toast(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
getSubsidyRecord() {
|
||||
getSubsidyRecord(this.mer_id, this.where).then(res => {
|
||||
this.list = res.data.record;
|
||||
})
|
||||
},
|
||||
cPrice(n) { //计算未激活的补贴达成了多少
|
||||
let t = Number(this.info.official_purchase_finish_rate) + Number(this.info.purchase_finish_rate) + Number(this.info.sale_finish_rate);
|
||||
let t = Number(this.info.official_purchase_finish_rate) + Number(this.info.purchase_finish_rate) + Number(
|
||||
this.info.sale_finish_rate);
|
||||
t /= 3 * 100;
|
||||
t == 0 ? t = 1 : null;
|
||||
return (+n * t).toFixed(2);
|
||||
},
|
||||
cPrice2(a, b) {
|
||||
a = Number(a);
|
||||
b = Number(b);
|
||||
return (a + b).toFixed(2)
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
@ -194,6 +343,7 @@
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.page {
|
||||
position: relative;
|
||||
font-size: 28rpx;
|
||||
@ -206,6 +356,7 @@
|
||||
left: 0;
|
||||
width: 750rpx;
|
||||
height: 530rpx;
|
||||
|
||||
.card {
|
||||
position: absolute;
|
||||
transition: 300ms;
|
||||
@ -218,26 +369,31 @@
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
padding-bottom: 40rpx;
|
||||
|
||||
.c-head {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
height: 90rpx;
|
||||
overflow: hidden;
|
||||
margin-top: 20rpx;
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.left {
|
||||
font-size: 32rpx;
|
||||
color: #DF4104;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.right {
|
||||
color: #7A7A7A;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-body-title {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
@ -245,20 +401,24 @@
|
||||
height: 70rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.c-body-text {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
color: #7A7A7A;
|
||||
height: 70rpx;
|
||||
align-items: center;
|
||||
|
||||
.price {
|
||||
color: #F13B3B;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card2 {
|
||||
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e5b2e202402291538018132.webp');
|
||||
}
|
||||
|
||||
.bottom {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@ -290,13 +450,16 @@
|
||||
|
||||
.body {
|
||||
padding: 530rpx 30rpx 30rpx 30rpx;
|
||||
|
||||
.b-card {
|
||||
padding-bottom: 30rpx;
|
||||
|
||||
.b-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.b-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -310,6 +473,7 @@
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background-color: #ffdfce;
|
||||
|
||||
.loss {
|
||||
width: 570rpx;
|
||||
height: 28rpx;
|
||||
@ -317,10 +481,12 @@
|
||||
top: 0;
|
||||
left: -100%;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 570rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
@ -336,10 +502,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.b-tips {
|
||||
color: #7A7A7A;
|
||||
font-size: 24rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.b-list {
|
||||
.list-head {
|
||||
width: 690rpx;
|
||||
@ -348,16 +517,19 @@
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.list-body {
|
||||
.list-b-title {
|
||||
padding: 20rpx 0;
|
||||
display: flex;
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.list-b-text {
|
||||
background-color: #F9F9F9;
|
||||
border-radius: 12rpx;
|
||||
@ -365,20 +537,25 @@
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
font-size: 24rpx;
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.item1 {
|
||||
color: #F13B3B;
|
||||
}
|
||||
|
||||
.item2 {
|
||||
color: #20A162;
|
||||
}
|
||||
|
||||
.item3 {
|
||||
color: #FF8056;
|
||||
}
|
||||
|
||||
.item4 {
|
||||
color: #2E2E2E;
|
||||
}
|
||||
@ -386,4 +563,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.h430 {
|
||||
height: 430rpx;
|
||||
}
|
||||
|
||||
.h310 {
|
||||
height: 310rpx;
|
||||
}
|
||||
</style>
|
@ -198,7 +198,6 @@
|
||||
that.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
that.getOrderData();
|
||||
})
|
||||
.catch(res => {
|
||||
that.$util.Tips({
|
||||
|
@ -137,7 +137,7 @@
|
||||
<view class="info" v-if="item.cart_info && item.cart_info.product">
|
||||
<view class="name line2">{{item.cart_info.product.store_name}}</view>
|
||||
<view class="info_sku" v-if="item.cart_info && item.cart_info.productAttr">{{item.cart_info.productAttr.sku}}</view>
|
||||
<view class="info_price" v-if="item.cart_info && item.cart_info.productAttr">¥<text>{{item.cart_info.productAttr.procure_price}}</text></view>
|
||||
<view class="info_price" v-if="item.cart_info && item.cart_info.productAttr">¥<text>{{item.cart_info.productAttr.wholesale_price}}</text></view>
|
||||
<view class='carnum acea-row row-center-wrapper'>
|
||||
<view class="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(item)'>-</view>
|
||||
<view class='num'>{{item.split_num}}</view>
|
||||
@ -161,7 +161,7 @@
|
||||
<view class="info_sku" v-if="item.cart_info && item.cart_info.productAttr">{{item.cart_info.productAttr.sku}}</view>
|
||||
</view>
|
||||
<view class="pro_price" v-if="item.cart_info && item.cart_info.productAttr">
|
||||
<view class="info_price">¥{{item.cart_info.productAttr.procure_price}}</view>
|
||||
<view class="info_price">¥{{item.cart_info.productAttr.wholesale_price}}</view>
|
||||
<view class="info_num">x{{item.product_num}}</view>
|
||||
<view class="refund_num" v-if="item.product_num-item.refund_num>0">{{item.product_num-item.refund_num}}件{{item.is_refund==1?'退款中' : item.is_refund==2 ? '已退款' : item.is_refund==3?'全部退款':''}}</view>
|
||||
</view>
|
||||
|
@ -4,24 +4,14 @@
|
||||
<view class="top">
|
||||
<view>
|
||||
<view v-if="user_id == 0" class="accont">
|
||||
<u--image
|
||||
:showLoading="true"
|
||||
:src="userInfo.avatar || '../../static/img/public/man.png'"
|
||||
width="44px"
|
||||
height="44px"
|
||||
shape="circle"
|
||||
></u--image>
|
||||
<u--image :showLoading="true" :src="userInfo.avatar || '../../static/img/public/man.png'"
|
||||
width="44px" height="44px" shape="circle"></u--image>
|
||||
<view class="name">{{ userInfo.nickname }}</view>
|
||||
<!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> -->
|
||||
</view>
|
||||
<view v-else class="accont">
|
||||
<u--image
|
||||
:showLoading="true"
|
||||
:src="userInfo.avatar || '../../static/img/public/man.png'"
|
||||
width="44px"
|
||||
height="44px"
|
||||
shape="circle"
|
||||
></u--image>
|
||||
<u--image :showLoading="true" :src="userInfo.avatar || '../../static/img/public/man.png'"
|
||||
width="44px" height="44px" shape="circle"></u--image>
|
||||
|
||||
<view class="name">{{ userInfo.nickname }}</view>
|
||||
<!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> -->
|
||||
@ -33,22 +23,14 @@
|
||||
</view>
|
||||
<view class="center">
|
||||
<view class="title">
|
||||
<text style="margin-right: 20rpx">账户总金额(元)</text
|
||||
><uni-icons
|
||||
@click="updateEye()"
|
||||
:type="eyeType ? 'eye-filled' : 'eye-slash-filled'"
|
||||
color="#fff"
|
||||
></uni-icons>
|
||||
<text style="margin-right: 20rpx">账户总金额(元)</text><uni-icons @click="updateEye()"
|
||||
:type="eyeType ? 'eye-filled' : 'eye-slash-filled'" color="#fff"></uni-icons>
|
||||
</view>
|
||||
<view class="price" v-show="eyeType"
|
||||
>{{ all_money }}元</view
|
||||
>
|
||||
<view class="price" v-show="eyeType">{{ all_money }}元</view>
|
||||
<view class="price" v-show="!eyeType">****元</view>
|
||||
<view class="bubble">
|
||||
<!-- <image src="../../static/img/contract/bubble.png"></image> -->
|
||||
<view class="text" v-show="eyeType"
|
||||
>可提现金额{{ userInfo.user_money || 0.0 }}元</view
|
||||
>
|
||||
<view class="text" v-show="eyeType">可提现金额{{ userInfo.user_money || 0.0 }}元</view>
|
||||
<view class="text" v-show="!eyeType">可提现金额****元</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -72,11 +54,7 @@
|
||||
</view>
|
||||
<view class="bill">
|
||||
<view style="width: 100%; height: 90rpx; background-color: #fff"></view>
|
||||
<uni-section
|
||||
titleFontSize="32rpx"
|
||||
type="line"
|
||||
title="账单流水"
|
||||
></uni-section>
|
||||
<uni-section titleFontSize="32rpx" type="line" title="账单流水"></uni-section>
|
||||
<!-- <u-subsection :list="billTypeList" :current="current" mode="subsection"></u-subsection> -->
|
||||
<!-- <view class="type_box">
|
||||
<view class="type">
|
||||
@ -129,11 +107,8 @@
|
||||
<text v-if="item.change_type == 202" style="color: #46be61">{{
|
||||
item.type_desc
|
||||
}}</text>
|
||||
<text
|
||||
v-else-if="item.change_type == 203"
|
||||
style="color: #ff7c32"
|
||||
>{{ item.type_desc }}</text
|
||||
>
|
||||
<text v-else-if="item.change_type == 203"
|
||||
style="color: #ff7c32">{{ item.type_desc }}</text>
|
||||
<text v-else="item.change_type == 203">{{
|
||||
item.type_desc
|
||||
}}</text>
|
||||
@ -172,12 +147,8 @@
|
||||
</view>
|
||||
|
||||
-->
|
||||
<u-loadmore
|
||||
:status="loadConfig.status"
|
||||
:loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText"
|
||||
:nomore-text="loadConfig.nomoreText"
|
||||
/>
|
||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
<!-- 月账单 -->
|
||||
<view class="bill_list" v-show="current == 1">
|
||||
@ -192,11 +163,9 @@
|
||||
<view class="num">{{ item.income }}</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view
|
||||
>支出金额:{{
|
||||
<view>支出金额:{{
|
||||
item.expenditure > 0 ? item.expenditure : "0.00"
|
||||
}}</view
|
||||
>
|
||||
}}</view>
|
||||
<view>入账金额:{{ item.income > 0 ? item.income : "0.00" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -441,8 +410,7 @@ page {
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.text {
|
||||
}
|
||||
.text {}
|
||||
}
|
||||
}
|
||||
|
||||
@ -599,7 +567,6 @@ page {
|
||||
.top {
|
||||
margin-bottom: 28rpx;
|
||||
font-size: 25rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<view class="product-con">
|
||||
<view v-if="storeInfo && storeInfo.merchant">
|
||||
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"'
|
||||
@scroll="scroll">
|
||||
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true"
|
||||
:style='"height:"+height+"px;"' @scroll="scroll">
|
||||
<view id="past0">
|
||||
<productConSwiper :imgUrls="storeInfo.slider_image" :videoCoverImg="videoCoverImg"
|
||||
:videoline="storeInfo.video_link"></productConSwiper>
|
||||
<productConSwiper :imgUrls="storeInfo.slider_image"
|
||||
videoCoverImg="https://tse3-mm.cn.bing.net/th/id/OIP-C.8fSZO4qDjGmIuSfxRNAFpgHaE8?w=270&h=180&c=7&r=0&o=5&dpr=1.3&pid=1.7"
|
||||
videoline="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/51838202404242300059216.mp4">
|
||||
</productConSwiper>
|
||||
<!--秒杀-->
|
||||
<view v-if="storeInfo.product_type == 1" class='nav acea-row row-between-wrapper'>
|
||||
<view class='money'>¥<text class='num'>{{storeInfo.price}}</text><text
|
||||
@ -13,8 +15,8 @@
|
||||
<view class='acea-row row-middle'>
|
||||
<view class='time'>
|
||||
<view>距秒杀结束仅剩</view>
|
||||
<countDown :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="' : '" :minute-text="' : '"
|
||||
:second-text="' '" :datatime="datatime"></countDown>
|
||||
<countDown :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="' : '"
|
||||
:minute-text="' : '" :second-text="' '" :datatime="datatime"></countDown>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -35,7 +37,8 @@
|
||||
<view class='introduce line2'>
|
||||
<text v-if="(storeInfo.merchant && storeInfo.merchant.type_name)"
|
||||
class="font-bg-red">{{storeInfo.merchant.type_name}}</text>
|
||||
<text v-else-if="(storeInfo.merchant && storeInfo.merchant.is_trader)" class="font-bg-red">自营</text>
|
||||
<text v-else-if="(storeInfo.merchant && storeInfo.merchant.is_trader)"
|
||||
class="font-bg-red">自营</text>
|
||||
{{storeInfo.store_name}}
|
||||
</view>
|
||||
<view class="presell_count">
|
||||
@ -51,7 +54,8 @@
|
||||
</view>
|
||||
<view v-if="storeInfo.presell_type === 2">
|
||||
<view>支付尾款时间:</view>
|
||||
<view v-if="storeInfo.final_start_time && storeInfo.final_end_time" class="presell_time">
|
||||
<view v-if="storeInfo.final_start_time && storeInfo.final_end_time"
|
||||
class="presell_time">
|
||||
<view class='iconfont icon-shijian1'></view>
|
||||
{{ new Date(storeInfo.final_start_time.replace(/-/g,"/")).getMonth()+1 }}月{{ new Date(storeInfo.final_start_time.replace(/-/g,"/")).getDate() }}日{{ new Date(storeInfo.final_start_time.replace(/-/g,"/")).getHours() }}时{{ new Date(storeInfo.final_start_time.replace(/-/g,"/")).getMinutes()}}分
|
||||
<span class='area_line'>~</span>
|
||||
@ -81,13 +85,15 @@
|
||||
<view class='introduce line2'>
|
||||
<text v-if="(storeInfo.merchant && storeInfo.merchant.type_name)"
|
||||
class="font-bg-red">{{storeInfo.merchant.type_name}}</text>
|
||||
<text v-else-if="(storeInfo.merchant && storeInfo.merchant.is_trader)" class="font-bg-red">自营</text>
|
||||
<text v-else-if="(storeInfo.merchant && storeInfo.merchant.is_trader)"
|
||||
class="font-bg-red">自营</text>
|
||||
{{storeInfo.store_name}}
|
||||
</view>
|
||||
<view class='label acea-row row-between-wrapper'>
|
||||
<view>类型:{{storeInfo.buying_count_num ? storeInfo.buying_count_num : 0}}人团</view>
|
||||
<view>库存:{{storeInfo.stock ? storeInfo.stock : 0}}</view>
|
||||
<view>已拼:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}
|
||||
<view>
|
||||
已拼:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -100,8 +106,8 @@
|
||||
class='line'>|</text>
|
||||
</view>
|
||||
<view class='swiper'>
|
||||
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" interval="2500" duration="500"
|
||||
vertical="true" circular="true">
|
||||
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" interval="2500"
|
||||
duration="500" vertical="true" circular="true">
|
||||
<block v-for="(item,index) in itemNew" :key='index'>
|
||||
<swiper-item>
|
||||
<view class='line1'>{{item.nickname ? item.nickname : ''}}拼团成功</view>
|
||||
@ -115,22 +121,28 @@
|
||||
v-if="index < AllIndex && pink.length>0">
|
||||
<view class='pictxt acea-row row-between-wrapper'>
|
||||
<view class='pictrue'>
|
||||
<image :src='item.initiator.avatar ? item.initiator.avatar : "/static/images/f.png"'></image>
|
||||
<image
|
||||
:src='item.initiator.avatar ? item.initiator.avatar : "/static/images/f.png"'>
|
||||
</image>
|
||||
</view>
|
||||
<view class='text line1'>{{ item.initiator.nickname ? item.initiator.nickname : ""}}
|
||||
</view>
|
||||
<view class='text line1'>{{ item.initiator.nickname ? item.initiator.nickname : ""}}</view>
|
||||
</view>
|
||||
<view class='right acea-row row-middle'>
|
||||
<view>
|
||||
<view class='lack'>还差<text
|
||||
class='font-color'>{{item.buying_count_num - item.yet_buying_num}}</text>人成团</view>
|
||||
class='font-color'>{{item.buying_count_num - item.yet_buying_num}}</text>人成团
|
||||
</view>
|
||||
<view class='time'>
|
||||
剩余
|
||||
<count-down :justifyLeft="justifyLeft" :is-day="false" :tip-text="' '" :day-text="' '"
|
||||
:hour-text="':'" :minute-text="':'" :second-text="' '" :datatime="item.end_time"></count-down>
|
||||
<count-down :justifyLeft="justifyLeft" :is-day="false" :tip-text="' '"
|
||||
:day-text="' '" :hour-text="':'" :minute-text="':'" :second-text="' '"
|
||||
:datatime="item.end_time"></count-down>
|
||||
</view>
|
||||
</view>
|
||||
<navigator hover-class='none'
|
||||
:url="'/pages/activity/combination_status/index?id='+item.group_buying_id" class='spellBnt'>
|
||||
:url="'/pages/activity/combination_status/index?id='+item.group_buying_id"
|
||||
class='spellBnt'>
|
||||
去拼单
|
||||
<text class='iconfont icon-jiantou'></text>
|
||||
</navigator>
|
||||
@ -169,48 +181,97 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="storeInfo.product_type == 0 || storeInfo.product_type == 3 || storeInfo.product_type == 1"
|
||||
class='wrapper'>
|
||||
<view v-if="storeInfo.product_type != 1" class='share acea-row row-between row-bottom'
|
||||
style="padding: 0;margin: 0;">
|
||||
<view class="card" style="">
|
||||
<view class="">
|
||||
<view class='money font-color'>
|
||||
¥
|
||||
<text class='num'>{{storeInfo.price}}</text>
|
||||
<text style="font-size:56rpx ;">{{storeInfo.price}}</text><text
|
||||
style="font-size: 40rpx;color:#777777 ;">/{{storeInfo.unit_name}}</text>
|
||||
</view>
|
||||
<view class='iconfont icon-fenxiang' v-if="comForm != 'admin'"></view>
|
||||
<view class="" style="font-size:32rpx ;color:#444444 ;margin: 20rpx 0;">
|
||||
{{storeInfo.store_name ? storeInfo.store_name : ''}}
|
||||
</view>
|
||||
<view class='introduce line2'>
|
||||
<text v-if="storeInfo.merchant.type_name" class="font-bg-red">{{storeInfo.merchant.type_name}}</text>
|
||||
<text v-else-if="storeInfo.merchant.is_trader"
|
||||
class="font-bg-red bg">自营</text>{{storeInfo.store_name ? storeInfo.store_name : ''}}
|
||||
</view>
|
||||
<view class='label acea-row row-between-wrapper' style="padding-bottom: 10px">
|
||||
<view v-if="storeInfo.product_type != 3">原价:¥{{storeInfo.ot_price ? storeInfo.ot_price : ''}}</view>
|
||||
<view>库存:{{storeInfo.stock ? storeInfo.stock : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}
|
||||
<view class="attribute" v-if='product_attribute.leval'>
|
||||
<view class="attribute-li">
|
||||
<view class="" style="display: flex;flex-direction: column;align-items: center;">
|
||||
<view class="" style="margin-bottom: 10rpx;">
|
||||
等级
|
||||
</view>
|
||||
<view>销量:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}
|
||||
<view class="">
|
||||
{{product_attribute.leval}}
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx"
|
||||
color="#A1A1A1"></u-line>
|
||||
</view>
|
||||
<view class="attribute-li">
|
||||
<view class="" style="display: flex;flex-direction: column;align-items: center;">
|
||||
<view class="" style="margin-bottom: 10rpx;">
|
||||
产地
|
||||
</view>
|
||||
<view class="">
|
||||
{{product_attribute.address.substring(0,3)}}
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx"
|
||||
color="#A1A1A1"></u-line>
|
||||
</view>
|
||||
<view class="attribute-li">
|
||||
<view class="" style="display: flex;flex-direction: column;align-items: center;">
|
||||
<view class="" style="margin-bottom: 10rpx;">
|
||||
包装
|
||||
</view>
|
||||
<view class="">
|
||||
{{product_attribute.pack}}
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx"
|
||||
color="#A1A1A1"></u-line>
|
||||
</view>
|
||||
<view class="attribute-li" v-for="item in product_attribute.attr"
|
||||
v-if="item.label || item.value">
|
||||
<view class="" style="display: flex;flex-direction: column;align-items: center;">
|
||||
<view class="" style="margin-bottom: 10rpx;">
|
||||
{{item.label}}
|
||||
</view>
|
||||
<view class="">
|
||||
{{item.value}}
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx" color="#A1A1A1"
|
||||
v-if="item.label || item.value"></u-line>
|
||||
</view>
|
||||
<view class="attribute-fixed-right" v-if="storeInfo.product_attribute.attr.length>5">
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='attribute acea-row row-between-wrapper' @click="selecAttr">
|
||||
<view class="acea-row row-between-wrapper">{{attrTxt}}:
|
||||
<view class='card'>
|
||||
<view style="display: flex;justify-content: space-between;" @click="selecAttr">
|
||||
<view class="">{{attrTxt}}:
|
||||
<text class='atterTxt'>{{attrValue}}</text>
|
||||
</view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
<view class="">
|
||||
1{{storeInfo.unit_name}}
|
||||
<text class='iconfont icon-jiantou'></text>
|
||||
</view>
|
||||
<!--运费-->
|
||||
<view class='attribute acea-row row-between-wrapper' @click="showShip">
|
||||
<view class="acea-row row-between-wrapper">运费:
|
||||
</view>
|
||||
<u-line color="#F3F3F3" style="margin: 30rpx 0;" />
|
||||
<view style="display: flex;justify-content: space-between;" @click="showShip">
|
||||
<view class="">运费:
|
||||
<text class='atterTxt'>{{shippingValue}}</text>
|
||||
</view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</view>
|
||||
</view>
|
||||
<!--保障-->
|
||||
<view v-if="guarantee && guarantee.length" class='attribute acea-row row-between-wrapper'
|
||||
@click="showGuaranee">
|
||||
<view class="acea-row row-between-wrapper">保障:
|
||||
<view class="guaranteeAttr">
|
||||
<text class='atterTxt1' :class="item.guarantee_name ? 'hasAttr' : ''" v-for="(item,index) in guarantee">
|
||||
<text class='atterTxt1' :class="item.guarantee_name ? 'hasAttr' : ''"
|
||||
v-for="(item,index) in guarantee">
|
||||
{{item.guarantee_name ? item.guarantee_name : ''}}
|
||||
</text>
|
||||
</view>
|
||||
@ -219,7 +280,8 @@
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</view>
|
||||
<!--定金预售流程-->
|
||||
<view v-if="storeInfo.presell_type === 2" class='acea-row row-between-wrapper wrapper presell_process'>
|
||||
<view v-if="storeInfo.presell_type === 2"
|
||||
class='acea-row row-between-wrapper wrapper presell_process'>
|
||||
<view>流程:
|
||||
<view class='process_count'>
|
||||
<view class="process_line"></view>
|
||||
@ -231,7 +293,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商铺信息 -->
|
||||
<view class="store-wrapper" v-if="storeInfo.merchant && hide_mer_status !=1">
|
||||
<view class="store-wrapper card" v-if="storeInfo.merchant && hide_mer_status !=1">
|
||||
<view class="store-hd">
|
||||
<view class="store-info">
|
||||
<view class="logo">
|
||||
@ -274,20 +336,32 @@
|
||||
v-html="description.content.replace(/<br\/>/ig, '')"></view>
|
||||
<!-- #endif -->
|
||||
<view v-else class="product_content">
|
||||
<view v-if="description.content && description.content.title" class="product_content_title">{{description.content.title}}
|
||||
<view v-if="description.content && description.content.title" class="product_content_title">
|
||||
{{description.content.title}}
|
||||
</view>
|
||||
<block v-if="description.content && description.content.image">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item" mode="widthFix" style="background-color: #fff;width: 100vw;">
|
||||
<view class="" v-for="(item,index) in description.content.image" :key="index">
|
||||
<view style="position: relative;" v-if='videoTypeList.includes(getSuffix(item))'>
|
||||
<image :src="item+coverUrl" mode="widthFix"
|
||||
style="background-color: #fff;width: 100vw;" />
|
||||
<image class="image-play-icon" src="/static/images/stop.png"
|
||||
style="width: 100rpx;height: 100rpx;" @click="navGoPlay(item)">
|
||||
</image>
|
||||
</view>
|
||||
<image v-else :src="item" mode="widthFix" style="background-color: #fff;width: 100vw;">
|
||||
</image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 组件 -->
|
||||
<productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
|
||||
@ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window'></productWindow>
|
||||
<productWindow :attr="attr" :image="image" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
|
||||
@ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window'>
|
||||
</productWindow>
|
||||
<guaranteeTemplate ref="guartemplate" :guarantee='guarantee' :shipping='shipping'></guaranteeTemplate>
|
||||
</view>
|
||||
</template>
|
||||
@ -303,16 +377,25 @@
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
import { getProductDetail, getPreviewProDetail } from '@/api/store.js';
|
||||
import {
|
||||
getProductDetail,
|
||||
getPreviewProDetail
|
||||
} from '@/api/store.js';
|
||||
import productWindow from '@/components/productWindow';
|
||||
import productConSwiper from '@/components/productConSwiper';
|
||||
import { mapGetters } from "vuex";
|
||||
import productConSwiper from '@/components/productConSwiper/indexNew';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import home from '@/components/home';
|
||||
import countDown from '@/components/countDown';
|
||||
import parser from "@/components/jyf-parser/jyf-parser";
|
||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
import guaranteeTemplate from '@/components/freightGuarantee';
|
||||
import { configMap } from "@/utils";
|
||||
import {
|
||||
configMap
|
||||
} from "@/utils";
|
||||
let app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
@ -326,6 +409,11 @@
|
||||
data() {
|
||||
let that = this;
|
||||
return {
|
||||
coverUrl: '?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast',
|
||||
show: false,
|
||||
autoplay: false,
|
||||
isPlay: false,
|
||||
videoTypeList: ['mp4', 'avi', 'mov', 'wmv', 'mkv', 'flv', 'mpeg', '3gp', 'webm'],
|
||||
statusBarHeight: statusBarHeight, //系统导航条高度
|
||||
attrTxt: '请选择', //属性页面提示
|
||||
attrValue: '', //已选属性
|
||||
@ -401,7 +489,9 @@
|
||||
itemNew: [],
|
||||
indicatorDots: false,
|
||||
preview_key: '',
|
||||
comForm: '' // 页面打开的途径,admin代表时后台的预览
|
||||
comForm: '', // 页面打开的途径,admin代表时后台的预览
|
||||
product_attribute: {},
|
||||
image: ''
|
||||
};
|
||||
},
|
||||
computed: configMap(['hide_mer_status'], mapGetters(['isLogin', 'uid'])),
|
||||
@ -432,6 +522,36 @@
|
||||
// this.getConfig()
|
||||
},
|
||||
methods: {
|
||||
navGoPlay(url) {
|
||||
console.log(url)
|
||||
uni.navigateTo({
|
||||
url: `/pages/admin/goods_details/videoPlay?url=${url}`
|
||||
})
|
||||
|
||||
},
|
||||
bindPause: function() {
|
||||
this.show = true
|
||||
console.log(this.isPlay, 'isplsfds')
|
||||
this.isPlay = false
|
||||
this.videoContext = uni.createVideoContext('myVideo', this);
|
||||
this.$nextTick(() => {
|
||||
this.videoContext.play();
|
||||
})
|
||||
},
|
||||
|
||||
endedFun() {
|
||||
this.controls = true
|
||||
},
|
||||
getSuffix(url) {
|
||||
const str = url;
|
||||
const lastIndex = str.lastIndexOf(".");
|
||||
if (lastIndex !== -1) {
|
||||
const extension = str.substring(lastIndex + 1);
|
||||
return extension
|
||||
} else {
|
||||
console.log("字符串中没有找到点号。");
|
||||
}
|
||||
},
|
||||
boxStatus(data) {
|
||||
this.showAnimate = data
|
||||
},
|
||||
@ -476,7 +596,8 @@
|
||||
this.$set(this, 'toView', id);
|
||||
this.$set(this, 'navActive', index);
|
||||
this.$set(this, 'lock', true);
|
||||
this.$set(this, 'scrollTop', index > 0 ? that.topArr[index] - (app.globalData.navHeight / 2) : that.topArr[
|
||||
this.$set(this, 'scrollTop', index > 0 ? that.topArr[index] - (app.globalData.navHeight / 2) : that
|
||||
.topArr[
|
||||
index]);
|
||||
},
|
||||
scroll: function(e) {
|
||||
@ -517,7 +638,8 @@
|
||||
let productSelect = this.productValue[res];
|
||||
if (productSelect) this.$set(this, "uniqueValue", productSelect.unique);
|
||||
if (productSelect && productSelect.stock > 0) {
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.storeInfo
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
|
||||
.storeInfo
|
||||
.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
@ -555,7 +677,10 @@
|
||||
mask: true
|
||||
});
|
||||
let that = this;
|
||||
getProductDetail({ id: that.id, product_type: that.product_type }).then(res => {
|
||||
getProductDetail({
|
||||
id: that.id,
|
||||
product_type: that.product_type
|
||||
}).then(res => {
|
||||
uni.hideLoading();
|
||||
let storeInfo = res.data;
|
||||
if (storeInfo.video_link && storeInfo.slider_image.length > 1) {
|
||||
@ -593,7 +718,8 @@
|
||||
that.$set(that, 'PromotionCode', storeInfo.code_base);
|
||||
that.$set(that, 'activity', res.data.activity ? res.data.activity : []);
|
||||
that.$set(that, 'shippingValue', res.data.temp ? res.data.temp.name : '');
|
||||
that.$set(that, 'guaranteeValue', res.data.guarantee ? res.data.guarantee.template_name : '');
|
||||
that.$set(that, 'guaranteeValue', res.data.guarantee ? res.data.guarantee.template_name :
|
||||
'');
|
||||
that.$set(that, 'guarantee', res.data.guaranteeTemplate ? res.data.guaranteeTemplate : []);
|
||||
that.$set(that, 'shipping', res.data.temp ? res.data.temp.info : '');
|
||||
uni.setNavigationBarTitle({
|
||||
@ -621,10 +747,21 @@
|
||||
mask: true
|
||||
});
|
||||
let that = this;
|
||||
let params = that.preview_key ? { key: that.preview_key } : { id: that.id, product_type: that.product_type }
|
||||
let params = that.preview_key ? {
|
||||
key: that.preview_key
|
||||
} : {
|
||||
id: that.id,
|
||||
product_type: that.product_type
|
||||
}
|
||||
getPreviewProDetail(params).then(res => {
|
||||
uni.hideLoading();
|
||||
let storeInfo = res.data;
|
||||
|
||||
if (res.data.product_attribute)
|
||||
this.product_attribute = res.data.product_attribute
|
||||
|
||||
this.image = res.data.image;
|
||||
|
||||
if (storeInfo.video_link && storeInfo.slider_image.length > 1) {
|
||||
this.videoCoverImg = storeInfo.slider_image[0]
|
||||
storeInfo.slider_image.splice(0, 1)
|
||||
@ -633,6 +770,10 @@
|
||||
}
|
||||
that.$set(that, 'storeInfo', storeInfo);
|
||||
that.$set(that, 'description', storeInfo.content);
|
||||
|
||||
that.description?.content.image.forEach(item => {
|
||||
item = item.replace(/\\/g, "")
|
||||
})
|
||||
if (typeof that.description.content == 'string') {
|
||||
try {
|
||||
that.description.content = JSON.parse(that.description.content);
|
||||
@ -727,7 +868,8 @@
|
||||
"store_name",
|
||||
this.storeInfo.store_name
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.storeInfo
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
|
||||
.storeInfo
|
||||
.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
@ -1634,8 +1776,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.product_content {
|
||||
background-color: #fff;
|
||||
|
||||
&_title {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
@ -1644,9 +1788,58 @@
|
||||
word-wrap: break-word;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 750rpx;
|
||||
// height: 750rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.image-play-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 710rpx;
|
||||
margin: 20rpx auto;
|
||||
background-color: white;
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.attribute {
|
||||
display: flex;
|
||||
background-color: #F6F6F6;
|
||||
// padding: 10rpx;
|
||||
width: 670rpx;
|
||||
height: 112rpx;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
border-radius: 8rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.attribute-li {
|
||||
display: flex;
|
||||
padding: 10rpx 0;
|
||||
font-size: 24rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.attribute-fixed-right {
|
||||
top: 0rpx;
|
||||
position: sticky;
|
||||
right: -30rpx;
|
||||
height: 112rpx;
|
||||
padding: 0;
|
||||
width: 100rpx;
|
||||
background: #F6F6F6;
|
||||
box-shadow: -6rpx 0rpx 6rpx 2rpx rgba(220, 220, 220, 0.28);
|
||||
border-radius: 0rpx 8rpx 8rpx 0rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
45
pages/admin/goods_details/videoPlay.nvue
Normal file
45
pages/admin/goods_details/videoPlay.nvue
Normal file
@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<video :src="url" style="width: 750rpx;height: 1400rpx;" :autoplay='true' id="myvideo" controls></video>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: ""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
videoPlay() {
|
||||
console.log("开始播放了")
|
||||
},
|
||||
|
||||
videoShow() {
|
||||
this.videoContext = uni.createVideoContext("myvideo", this); // this这个是实例对象 必传
|
||||
this.videoUrl = this.url;
|
||||
this.videoContext.requestFullScreen({
|
||||
// direction: 90
|
||||
});
|
||||
this.videoContext.play();
|
||||
this.videoPlay = true; // 显示播放盒子
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
onLoad(option) {
|
||||
this.url = option.url
|
||||
setTimeout(() => {
|
||||
this.videoShow()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
@ -201,7 +201,7 @@
|
||||
options.product_type ? uni.setStorageSync("PRODUCT_TYPE", 98) : uni.removeStorageSync("PRODUCT_TYPE");
|
||||
this.getOrderStatistics(this.mer_id);
|
||||
this.getList(this.mer_id)
|
||||
this.purchaseOrderList(this.mer_id)
|
||||
// this.purchaseOrderList(this.mer_id)
|
||||
},
|
||||
methods: {
|
||||
getIndex: function() {
|
||||
|
@ -24,7 +24,8 @@
|
||||
</view>
|
||||
<view>{{ orderInfo.user_address }}</view>
|
||||
<!-- #ifdef H5 -->
|
||||
<button class="copy copy-data" :data-clipboard-text="'收货人姓名:'+orderInfo.real_name+'\n收货人电话:'+ orderInfo.user_phone+'\n收货人地址:'+orderInfo.user_address">复制</button>
|
||||
<button class="copy copy-data"
|
||||
:data-clipboard-text="'收货人姓名:'+orderInfo.real_name+'\n收货人电话:'+ orderInfo.user_phone+'\n收货人地址:'+orderInfo.user_address">复制</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP || APP-PLUS -->
|
||||
<button class="copy" @tap="copyText">复制</button>
|
||||
@ -34,7 +35,8 @@
|
||||
<image :src="`${domain}/static/images/line.jpg`" />
|
||||
</view>
|
||||
<view class="pos-order-goods">
|
||||
<navigator :url="`/pages/goods_details/index?id=${item.cart_info.product.product_id}`" hover-class="none" class="goods" v-for="(item, index) in orderInfo.orderProduct" :key="index">
|
||||
<navigator :url="`/pages/goods_details/index?id=${item.cart_info.product.product_id}`" hover-class="none"
|
||||
class="goods" v-for="(item, index) in orderInfo.orderProduct" :key="index">
|
||||
<view class="acea-row row-between-wrapper">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
@ -45,7 +47,8 @@
|
||||
{{ item.cart_info.product.store_name }}
|
||||
</view>
|
||||
<view class="attr">{{ item.cart_info.product.suk }}</view>
|
||||
<view class="attr" @click.stop="showBarCode(item.cart_info.productAttr.product)" v-if="item.cart_info.productAttr.product&&item.cart_info.productAttr.product.bar_code">
|
||||
<view class="attr" @click.stop="showBarCode(item.cart_info.productAttr.product)"
|
||||
v-if="item.cart_info.productAttr.product&&item.cart_info.productAttr.product.bar_code">
|
||||
商品条码: {{ item.cart_info.productAttr.product.bar_code }}
|
||||
</view>
|
||||
</view>
|
||||
@ -53,7 +56,8 @@
|
||||
<view class="money">
|
||||
<view class="x-money">¥{{ item.cart_info.productAttr.price }}</view>
|
||||
<view class="num">x{{ item.product_num }}
|
||||
<text class="font-color refund_num" v-if="item.product_num-item.refund_num>0">(-{{item.product_num-item.refund_num}})</text>
|
||||
<text class="font-color refund_num"
|
||||
v-if="item.product_num-item.refund_num>0">(-{{item.product_num-item.refund_num}})</text>
|
||||
</view>
|
||||
<!-- <view v-if="orderInfo.order_type == 0" class="y-money">¥{{ item.cart_info.productAttr.ot_price }}</view> -->
|
||||
</view>
|
||||
@ -89,7 +93,15 @@
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>支付方式:</view>
|
||||
<view class="conter">{{ orderInfo.pay_type == 0 ? "余额支付" : (orderInfo.pay_type == 1 || orderInfo.pay_type == 2 || orderInfo.pay_type == 3) ? "微信支付" : "先货后款" }}</view>
|
||||
<view class="conter">
|
||||
<span v-if="orderInfo.pay_type == 0">余额支付</span>
|
||||
<span v-if="orderInfo.pay_type == 1">微信支付</span>
|
||||
<span v-if="orderInfo.pay_type == 11">微信收款</span>
|
||||
<span v-if="orderInfo.pay_type == 12">现金支付</span>
|
||||
<span v-if="orderInfo.pay_type == 13">支付宝收款</span>
|
||||
<span v-if="orderInfo.pay_type == 9">商户余额支付</span>
|
||||
<span v-if="orderInfo.pay_type == 10">对公转账</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>买家留言:</view>
|
||||
@ -97,7 +109,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderInfo.is_virtual == 1" class='wrapper'>
|
||||
<view v-for="(item,index) in orderInfo.order_extend" v-if="item && index" :key="index" class='item acea-row row-between'>
|
||||
<view v-for="(item,index) in orderInfo.order_extend" v-if="item && index" :key="index"
|
||||
class='item acea-row row-between'>
|
||||
<view>{{index}}:</view>
|
||||
<view v-if="!Array.isArray(item)" class='conter'>{{item}}</view>
|
||||
<view v-else class='conter virtual_image'>
|
||||
@ -126,7 +139,8 @@
|
||||
实付款:<span class="money font-color-red">¥{{ orderInfo.pay_price }}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper" v-if="orderInfo.delivery_type != '3' && orderInfo.order_type === 0 && orderInfo.delivery_type">
|
||||
<view class="wrapper"
|
||||
v-if="orderInfo.delivery_type != '3' && orderInfo.order_type === 0 && orderInfo.delivery_type">
|
||||
<view class="item acea-row row-between">
|
||||
<view>配送方式:</view>
|
||||
<view class="conter" v-if="orderInfo.delivery_type === '1' || orderInfo.delivery_type === '4'">
|
||||
@ -149,7 +163,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:120upx;"></view>
|
||||
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'" style="margin-bottom: var(--status-bar-height);">
|
||||
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'"
|
||||
style="margin-bottom: var(--status-bar-height);">
|
||||
<view class="more"></view>
|
||||
<view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)">
|
||||
同意
|
||||
@ -168,15 +183,55 @@
|
||||
确认付款
|
||||
</view>
|
||||
|
||||
<view class="bnt delivery" @click="toPostagequ(orderInfo)" v-if="orderInfo.status == 0&&orderInfo.activity_type==0&& orderInfo.order_type !=1 ">
|
||||
收件码
|
||||
<view class="bnt delivery" @click="toPostagequ(orderInfo)"
|
||||
v-if="orderInfo.status == 0&&orderInfo.activity_type==0&& orderInfo.order_type !=1 ">
|
||||
去发货
|
||||
</view>
|
||||
<navigator class="bnt delivery" v-if="orderInfo.paid == 1 && orderInfo.status == 0 && orderInfo.order_type == 0&&orderInfo.activity_type==98" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id+'&merId='+mer_id">去发货</navigator>
|
||||
<view class="bnt delivery" v-if="orderInfo.paid == 1 && (orderInfo.status == 0 || orderInfo.status == 9) && orderInfo.order_type == 1" @click="goCancellation">去核销</view>
|
||||
<navigator class="bnt delivery"
|
||||
v-if="orderInfo.paid == 1 && orderInfo.status == 0 && orderInfo.order_type == 0&&orderInfo.activity_type==98"
|
||||
:url="'/pages/admin/delivery/index?id='+orderInfo.order_id+'&merId='+mer_id">去发货</navigator>
|
||||
<view class="bnt delivery"
|
||||
v-if="orderInfo.paid == 1 && (orderInfo.status == 0 || orderInfo.status == 9) && orderInfo.order_type == 1"
|
||||
@click="goCancellation">去核销</view>
|
||||
</view>
|
||||
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
|
||||
:status="status"></PriceChange>
|
||||
<u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
|
||||
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)"
|
||||
v-on:savePrice="savePrice" :status="status"></PriceChange>
|
||||
|
||||
<view class="form-wrap" v-if="popUpShow"
|
||||
style="position: fixed;z-index: 11; top: 0;left: 0;width:100vw;height:100vh;background:rgba(0,0,0,.4);display: flex;align-items: center;justify-content: center;">
|
||||
<view class="form">
|
||||
<view class="form-item">
|
||||
<view class="form-item-label">送货人姓名</view>
|
||||
<view class="form-item-val">
|
||||
<u-input v-model="deliveryForm.delivery_name" placeholder="请输入送货人姓名"
|
||||
placeholderStyle="color:#999;font-size:26rpx;" border="surround"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-item-label">送货人电话</view>
|
||||
<view class="form-item-val">
|
||||
<u-input v-model="deliveryForm.delivery_id" placeholder="请输入送货人电话"
|
||||
placeholderStyle="color:#999;font-size:26rpx;" border="surround"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<view class="form-item-label">备注</view>
|
||||
<view class="form-item-val">
|
||||
<u-input v-model="deliveryForm.remark" placeholder="请输入备注"
|
||||
placeholderStyle="color:#999;font-size:26rpx;"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-btn">
|
||||
<view class="form-btn-cancel" @click="popUpShow = false">取消</view>
|
||||
<view class="form-btn-confirm" @click="handleSubmitDelivery">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
|
||||
<view style="text-align: center;margin-top: 30rpx;">
|
||||
请把二维码展示给取货人员
|
||||
</view>
|
||||
@ -184,7 +239,7 @@
|
||||
<image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image>
|
||||
|
||||
</view>
|
||||
</u-popup>
|
||||
</u-popup> -->
|
||||
<view class="bar-code" v-show="showBar" @click="showBar=false">
|
||||
<barcode ref="code"></barcode>
|
||||
</view>
|
||||
@ -212,7 +267,8 @@
|
||||
setOrderRefund,
|
||||
orderCancellation,
|
||||
logisticsCode,
|
||||
postconfirm
|
||||
postconfirm,
|
||||
delivery
|
||||
} from "@/api/admin";
|
||||
import { isMoney } from '@/utils/validate.js'
|
||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||
@ -224,6 +280,13 @@
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
// 去发货
|
||||
deliveryForm: {
|
||||
delivery_name: '',
|
||||
delivery_id: '',
|
||||
delivery_type: 2,
|
||||
mer_id: ''
|
||||
},
|
||||
showBar: false,
|
||||
order: false,
|
||||
change: false,
|
||||
@ -287,15 +350,51 @@
|
||||
code: val.bar_code
|
||||
});
|
||||
},
|
||||
// 保存送货人电话 姓名
|
||||
handleSubmitDelivery(item) {
|
||||
if (!this.deliveryForm.delivery_name) return this.$util.Tips({
|
||||
title: "请输入送货人姓名!"
|
||||
})
|
||||
|
||||
if (!uni.$u.test.mobile(this.deliveryForm.delivery_id)) {
|
||||
return uni.showToast({
|
||||
title: "手机号输入有误!",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
|
||||
let that = this;
|
||||
delivery(this.deliveryForm).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.$util.Tips({
|
||||
title: res.message
|
||||
})
|
||||
this.$nextTick(()=>{
|
||||
that.popUpShow = false;
|
||||
})
|
||||
}
|
||||
}).catch((err) => {
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
})
|
||||
})
|
||||
},
|
||||
//收件码
|
||||
toPostagequ(item) {
|
||||
this.popUpShow = true
|
||||
logisticsCode(item.order_id).then(res => {
|
||||
this.deliveryForm.delivery_name = '';
|
||||
this.deliveryForm.delivery_id = '';
|
||||
this.deliveryForm.remark = '';
|
||||
|
||||
if (res.status == 200) {
|
||||
this.payCodeUrl = res.data.qrcode
|
||||
}
|
||||
})
|
||||
this.deliveryForm.mer_id = item.mer_id;
|
||||
this.deliveryForm.order_id = item.order_id;
|
||||
this.popUpShow = true;
|
||||
// this.popUpShow = true
|
||||
// logisticsCode(item.order_id).then(res => {
|
||||
|
||||
// if (res.status == 200) {
|
||||
// this.payCodeUrl = res.data.qrcode
|
||||
// }
|
||||
// })
|
||||
},
|
||||
// 关闭二维码弹窗
|
||||
popUpClose() {
|
||||
@ -319,8 +418,7 @@
|
||||
url: `/pages/admin/orderList/index?types=1&merId=${this.mer_id}`
|
||||
})
|
||||
}
|
||||
postconfirm(this.mer_id,data).then(res=>{
|
||||
})
|
||||
postconfirm(this.mer_id, data).then(res => {})
|
||||
},
|
||||
more: function() {
|
||||
this.order = !this.order;
|
||||
@ -341,8 +439,7 @@
|
||||
},
|
||||
copyText: function(e) {
|
||||
// var copy = e.currentTarget.dataset.copy; //data-copy传过来的数值
|
||||
let arr = [
|
||||
{
|
||||
let arr = [{
|
||||
name: "收货人姓名",
|
||||
value: this.orderInfo.real_name
|
||||
},
|
||||
@ -558,6 +655,67 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.form {
|
||||
position: relative;
|
||||
z-index: 11;
|
||||
padding: 40rpx 60rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.form-item-label {
|
||||
width: 140rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.form-item-val {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.form-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.form-btn-cancel {
|
||||
width: 83px;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
color: #2291F8;
|
||||
border: 2rpx solid #2291F8;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.form-btn-confirm {
|
||||
width: 83px;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
background: linear-gradient(90deg, #2291F8 0%, #1CD1DC 100%);
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.form-btn-cancel:active {
|
||||
background: rgba(209, 220, 255, .3);
|
||||
}
|
||||
|
||||
.form-btn-confirm:active {
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*商户管理订单详情*/
|
||||
.pos-order-details .header {
|
||||
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
@ -815,19 +973,23 @@
|
||||
text-align: right;
|
||||
max-width: 450rpx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item .virtual_image {
|
||||
// text-align: left;
|
||||
margin-left: 50rpx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item .virtual_image .picture {
|
||||
width: 106rpx;
|
||||
height: 106rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 10rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.order-details .wrapper .item .conter .copy {
|
||||
font-size: 20rpx;
|
||||
color: #868686;
|
||||
@ -841,6 +1003,7 @@
|
||||
justify-content: center;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.address .copy {
|
||||
font-size: 20rpx;
|
||||
color: #868686;
|
||||
@ -857,6 +1020,7 @@
|
||||
top: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.order-details .wrapper .actualPay {
|
||||
border-top: 1upx solid #eee;
|
||||
margin-top: 30upx;
|
||||
@ -955,10 +1119,12 @@
|
||||
text-align: right;
|
||||
font-size: 28upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money .refund_num {
|
||||
display: inline-block;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money .x-money {
|
||||
color: #282828;
|
||||
}
|
||||
@ -972,20 +1138,25 @@
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.pos-order-goods .cancellate {
|
||||
font-size: 24rpx;
|
||||
float: right;
|
||||
margin-top: 10rpx;
|
||||
|
||||
text {
|
||||
margin-left: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pos-order-goods .cancelled {
|
||||
color: #FF9600;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .uncancell {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.public-total {
|
||||
font-size: 28upx;
|
||||
color: #282828;
|
||||
|
@ -51,7 +51,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="money">
|
||||
<view class="x-money">¥{{ item.cart_info.productAttr.procure_price }}</view>
|
||||
<view class="x-money">¥{{ item.cart_info.productAttr.wholesale_price }}</view>
|
||||
<view class="num">x{{ item.product_num }}
|
||||
<text class="font-color refund_num" v-if="item.product_num-item.refund_num>0">(-{{item.product_num-item.refund_num}})</text>
|
||||
</view>
|
||||
|
@ -11,6 +11,9 @@
|
||||
<view>
|
||||
<scroll-view class="nav acea-row" scroll-x="true" style="white-space: nowrap; display: flex;"
|
||||
scroll-with-animation show-scrollbar="true">
|
||||
<view class="item" :class="where.status == '' ? 'on' : ''" @click="changeStatus('')">
|
||||
全部
|
||||
</view>
|
||||
<view class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">
|
||||
待付款
|
||||
</view>
|
||||
@ -32,11 +35,14 @@
|
||||
<view class="item" :class="where.status == 6 ? 'on' : ''" @click="changeStatus(6)">
|
||||
退款
|
||||
</view>
|
||||
<view class="item" :class="where.status == 7 ? 'on' : ''" @click="changeStatus(7)">
|
||||
暂存
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="where.status == 6" class="list">
|
||||
<view v-if="(where.status == 6)" class="list">
|
||||
<view class="item" v-for="(item, index) in list" :key="index">
|
||||
<view class="order-num acea-row row-middle">
|
||||
<text v-if="item.order && item.order.activity_type != 0" class="activity_type">
|
||||
@ -50,7 +56,8 @@
|
||||
<view v-if="val.product" class="goods acea-row row-between-wrapper">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="val.product.cart_info.productAttr.image||val.product.cart_info.product.image" />
|
||||
<image
|
||||
:src="val.product.cart_info.productAttr.image||val.product.cart_info.product.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-between row-column">
|
||||
<view class="info line1 refund-info">
|
||||
@ -93,6 +100,107 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-else-if="(where.status == 7)" class="list">
|
||||
<block v-for="(item, index) in list" :key="index">
|
||||
<view class="item">
|
||||
<view class="order-num acea-row row-middle">
|
||||
暂存单号:{{ item.order_sn }}
|
||||
<text class="time">暂存时间:{{ item.c_time }}</text>
|
||||
<text class="fk_status" v-if="item.order_status == 0">未支付</text>
|
||||
<text class="fk_status" v-if="item.order_status == 1">
|
||||
<view>待核销</view>
|
||||
<view style="color: #FFE4BF;"
|
||||
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status != 3">
|
||||
退款中</view>
|
||||
</text>
|
||||
<text class="fk_status" v-if="item.order_status == 2">
|
||||
<view>待发货</view>
|
||||
<view style="color: #FFE4BF;"
|
||||
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status != 3">
|
||||
退款中</view>
|
||||
</text>
|
||||
<text class="fk_status" v-if="item.order_status == 3">
|
||||
<view>待收货</view>
|
||||
<view style="color: #FFE4BF;"
|
||||
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status != 3">
|
||||
退款中</view>
|
||||
</text>
|
||||
<text class="fk_status" v-if="item.order_status == 4">
|
||||
<view>待评价</view>
|
||||
<view style="color: #FFE4BF;"
|
||||
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status != 3">
|
||||
退款中</view>
|
||||
</text>
|
||||
<text class="fk_status" v-if="item.order_status == 5">
|
||||
<view>交易完成</view>
|
||||
<view style="color: #FFE4BF;"
|
||||
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status != 3">
|
||||
退款中</view>
|
||||
</text>
|
||||
<text class="fk_status" v-if="item.refund_mark == 1">
|
||||
<view>退款成功</view>
|
||||
</text>
|
||||
</view>
|
||||
<view class="pos-order-goods" v-for="(val, key) in item.storeOrder.orderProduct" :key="key"
|
||||
@click="toDetail(item)">
|
||||
<view class="goods acea-row row-between-wrapper" v-if="val.cart_info">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="val.cart_info.product.image || val.cart_info.productAttr.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-between row-column">
|
||||
<view class="info line1 refund-info">
|
||||
{{ val.cart_info.product.store_name }}
|
||||
</view>
|
||||
<view class="attr" v-if="val.cart_info.productAttr.sku">
|
||||
{{ val.cart_info.productAttr.sku }}
|
||||
</view>
|
||||
<view class="y-money refund-y-money">
|
||||
价格:¥{{ val.product_price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money refund-money">
|
||||
<view class="num">x{{ val.product_num }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="public-total" v-if="item.refund_mark == 1">
|
||||
共{{ item.total_num }}件商品,
|
||||
已退款
|
||||
<span class="money" style="margin-right: 30rpx;">¥{{ item.pay_price }}</span> (邮费
|
||||
¥{{ item.pay_postage}})
|
||||
</view>
|
||||
|
||||
<view class="public-total" v-else>
|
||||
共{{ item.total_num }}件商品,
|
||||
<span v-if="item.order_status < 1">应</span>
|
||||
<span v-else>已</span>
|
||||
支付
|
||||
<span class="money" style="margin-right: 30rpx;">¥{{ item.pay_price }}</span> (邮费
|
||||
¥{{ item.pay_postage}})
|
||||
</view>
|
||||
|
||||
<view class="operation acea-row row-between-wrapper">
|
||||
<view class="more"></view>
|
||||
<view class="acea-row row-middle">
|
||||
<view class="bnt" @click="modify(item, 1)">订单备注</view>
|
||||
<view class="bnt bnt_color" v-if="item.order_status == 1" @click="toDetail(item)">去核销</view>
|
||||
<view class="bnt bnt_color" v-if="item.order_status == 2" @click="toPostagequ(item)">去发货
|
||||
</view>
|
||||
<navigator class="bnt bnt_color"
|
||||
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status!=3"
|
||||
:url="'/pages/admin/orderRefund/index?id='+item.refund_order_id+'&merId='+merId">
|
||||
立即退款
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view v-else class="list">
|
||||
<view class="item" v-for="(item, index) in list" :key="index">
|
||||
<view class="order-num acea-row row-middle">
|
||||
@ -120,7 +228,8 @@
|
||||
<view class="attr" v-if="val.cart_info.productAttr.sku">
|
||||
{{ val.cart_info.productAttr.sku }}
|
||||
</view>
|
||||
<view class="attr" @click.stop="showBarCode(val.cart_info.productAttr.product)" v-if="val.cart_info.productAttr.product&&val.cart_info.productAttr.product.bar_code">
|
||||
<view class="attr" @click.stop="showBarCode(val.cart_info.productAttr.product)"
|
||||
v-if="val.cart_info.productAttr.product&&val.cart_info.productAttr.product.bar_code">
|
||||
商品条码: {{ val.cart_info.productAttr.product.bar_code }}
|
||||
</view>
|
||||
</view>
|
||||
@ -131,13 +240,7 @@
|
||||
<!-- <view class="refund-num" v-if="val.product_num-val.refund_num>0">{{val.product_num-val.refund_num}}件{{val.is_refund==1?'退款中' : val.is_refund==2 ? '已退款' : val.is_refund==3?'全部退款':''}}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view v-if="item.order_type == 1" class="cancellate">
|
||||
<text class="uncancell">1件已核销</text>
|
||||
<text class="uncancell">1件已退款</text>
|
||||
<text class="cancelled">1件退款中</text>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="public-total" v-if="item.pay_type !== 8">
|
||||
共{{ item.total_num }}件商品,
|
||||
@ -174,14 +277,16 @@
|
||||
一键改价
|
||||
</view>
|
||||
<view class="bnt" @click="modify(item, 1)">订单备注</view>
|
||||
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&(item.activity_type==98||item.activity_type==99)"
|
||||
<view class="bnt bnt_color"
|
||||
v-if="where.status == 2 && item.order_type == 0&&(item.activity_type==98||item.activity_type==99)"
|
||||
@click="toPostage(item)">去发货
|
||||
</view>
|
||||
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&& item.order_type !=1 &&item.activity_type==0"
|
||||
<view class="bnt bnt_color"
|
||||
v-if="(where.status == 2 || (item.order_type === 0 && item.status === 0 && item.paid == 1)) && item.order_type == 0 && item.order_type !=1 && item.activity_type==0"
|
||||
@click="toPostagequ(item)">去发货
|
||||
</view>
|
||||
<view class="bnt bnt_color"
|
||||
v-if="(where.status == 2 && item.order_type == 1) || where.is_verify == 1"
|
||||
v-if="((item.order_type == 1 && item.status === 0 && item.paid == 1) && item.order_type == 1) || where.is_verify == 1"
|
||||
@click="toDetail(item)">去核销</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -192,8 +297,10 @@
|
||||
<image src="/static/images/no_thing.png" mode="widthFix"></image>
|
||||
<view class="nothing_text">暂无订单~</view>
|
||||
</view>
|
||||
|
||||
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)"
|
||||
v-on:savePrice="savePrice" :status="status"></PriceChange>
|
||||
|
||||
<view>
|
||||
<view class="priceChange" :class="refundMark === true ? 'on' : ''">
|
||||
<view class="priceTitle">
|
||||
@ -209,15 +316,50 @@
|
||||
</view>
|
||||
<view class="mask" @touchmove.prevent v-show="refundMark === true"></view>
|
||||
</view>
|
||||
|
||||
<view class="form-wrap" v-if="popUpShow"
|
||||
style="position: fixed;z-index: 11; top: 0;left: 0;width:100vw;height:100vh;background:rgba(0,0,0,.4);display: flex;align-items: center;justify-content: center;">
|
||||
<view class="form">
|
||||
<view class="form-item">
|
||||
<view class="form-item-label">送货人姓名</view>
|
||||
<view class="form-item-val">
|
||||
<u-input v-model="deliveryForm.delivery_name" placeholder="请输入送货人姓名"
|
||||
placeholderStyle="color:#999;font-size:26rpx;" border="surround"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-item-label">送货人电话</view>
|
||||
<view class="form-item-val">
|
||||
<u-input v-model="deliveryForm.delivery_id" placeholder="请输入送货人电话"
|
||||
placeholderStyle="color:#999;font-size:26rpx;" border="surround"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<view class="form-item-label">备注</view>
|
||||
<view class="form-item-val">
|
||||
<u-input v-model="deliveryForm.remark" placeholder="请输入备注"
|
||||
placeholderStyle="color:#999;font-size:26rpx;"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-btn">
|
||||
<view class="form-btn-cancel" @click="popUpShow = false">取消</view>
|
||||
<view class="form-btn-confirm" @click="handleSubmitDelivery">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!--
|
||||
<u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
|
||||
<view style="text-align: center;margin-top: 30rpx;">
|
||||
请把二维码展示给取货人员
|
||||
</view>
|
||||
<view style="padding: 28.07rpx;">
|
||||
<image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image>
|
||||
|
||||
</view>
|
||||
</u-popup>
|
||||
</u-popup> -->
|
||||
|
||||
<view class="bar-code" v-show="showBar" @click="showBar=false">
|
||||
<barcode ref="code"></barcode>
|
||||
</view>
|
||||
@ -244,7 +386,9 @@
|
||||
refundOrderReceive,
|
||||
setRefundMark,
|
||||
postconfirm,
|
||||
logisticsCode
|
||||
logisticsCode,
|
||||
delivery,
|
||||
lockList
|
||||
} from "@/api/admin";
|
||||
|
||||
import Loading from '@/components/Loading/index'
|
||||
@ -252,6 +396,9 @@
|
||||
import {
|
||||
isMoney
|
||||
} from '@/utils/validate.js'
|
||||
import {
|
||||
Toast
|
||||
} from "../../../libs/uniApi";
|
||||
export default {
|
||||
name: "AdminOrderList",
|
||||
components: {
|
||||
@ -260,6 +407,13 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 去发货
|
||||
deliveryForm: {
|
||||
delivery_name: '',
|
||||
delivery_id: '',
|
||||
delivery_type: 2,
|
||||
mer_id: ''
|
||||
},
|
||||
showBar: false,
|
||||
current: "",
|
||||
change: false,
|
||||
@ -293,11 +447,17 @@
|
||||
that.init();
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
onLoad(option) {
|
||||
this.where.product_type = uni.getStorageSync("PRODUCT_TYPE") ?? ""
|
||||
this.where.status = option.types
|
||||
if (option.types == 99) {
|
||||
delete this.where.status;
|
||||
this.where.is_verify = 1;
|
||||
}
|
||||
if (option.types == 88) {
|
||||
this.where.status = 7;
|
||||
}
|
||||
this.current = "";
|
||||
this.merId = option.merId;
|
||||
if (option.pay_time) {
|
||||
@ -306,7 +466,24 @@
|
||||
|
||||
this.getIndex();
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
this.loaded = false;
|
||||
this.where.page = 1;
|
||||
this.list = [];
|
||||
this.getIndex();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 状态
|
||||
statusParse(item) {
|
||||
const status = item.order[0].status;
|
||||
if (status == 0) return "待发货";
|
||||
if (status == 1) return "待收货";
|
||||
if (status == 2) return "待评价";
|
||||
if (status == 3) return "已完成";
|
||||
},
|
||||
|
||||
// 关闭二维码弹窗
|
||||
popUpClose() {
|
||||
this.popUpShow = false
|
||||
@ -348,27 +525,34 @@
|
||||
},
|
||||
// 获取数据
|
||||
getIndex() {
|
||||
|
||||
|
||||
let that = this;
|
||||
// console.log(that.merId)
|
||||
if (that.loading || that.loaded) return;
|
||||
that.loading = true;
|
||||
if (that.where.status == 6) {
|
||||
getRefundOrderList(that.where, that.merId).then(
|
||||
res => {
|
||||
getRefundOrderList(that.where, that.merId).then(res => {
|
||||
that.loading = false;
|
||||
that.loaded = res.data.list.length < that.where.limit;
|
||||
|
||||
that.list.push.apply(that.list, res.data.list);
|
||||
that.where.page = that.where.page + 1;
|
||||
},
|
||||
err => {
|
||||
}, err => {
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
} else if (that.where.status == 7) {
|
||||
lockList(that.where, that.merId).then(res => {
|
||||
that.loading = false;
|
||||
that.loaded = res.data.list.length < that.where.limit;
|
||||
that.list.push.apply(that.list, res.data.list);
|
||||
that.where.page = that.where.page + 1;
|
||||
uni.stopPullDownRefresh();
|
||||
}, err => {
|
||||
uni.stopPullDownRefresh();
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
} else {
|
||||
getOrderList(that.where, that.merId).then(
|
||||
res => {
|
||||
@ -376,11 +560,10 @@
|
||||
that.loaded = res.data.list.length < that.where.limit;
|
||||
that.list.push.apply(that.list, res.data.list);
|
||||
that.where.page = that.where.page + 1;
|
||||
// console.log(that.list)
|
||||
|
||||
// console.log(that.list);
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
err => {
|
||||
uni.stopPullDownRefresh();
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
@ -434,21 +617,18 @@
|
||||
}
|
||||
setRefundMark(that.merId, that.refundInfo.refund_order_id, {
|
||||
mer_mark: that.refundInfo.mer_mark
|
||||
}).then(
|
||||
res => {
|
||||
}).then(res => {
|
||||
that.refundMark = false;
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
},
|
||||
err => {
|
||||
}, err => {
|
||||
that.refundMark = false;
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
changeclose: function(msg) {
|
||||
this.change = msg;
|
||||
@ -477,16 +657,55 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
//收件码
|
||||
toPostagequ(item) {
|
||||
this.popUpShow = true
|
||||
logisticsCode(item.order_id).then(res => {
|
||||
|
||||
if (res.status == 200) {
|
||||
this.payCodeUrl = res.data.qrcode
|
||||
// 保存送货人电话 姓名
|
||||
handleSubmitDelivery(item) {
|
||||
if (!this.deliveryForm.delivery_name) return this.$util.Tips({
|
||||
title: "请输入送货人姓名!"
|
||||
})
|
||||
|
||||
if (!uni.$u.test.mobile(this.deliveryForm.delivery_id)) {
|
||||
return uni.showToast({
|
||||
title: "手机号输入有误!",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
|
||||
let that = this;
|
||||
delivery(this.deliveryForm).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.$util.Tips({
|
||||
title: res.message
|
||||
})
|
||||
that.init();
|
||||
setTimeout(() => {
|
||||
that.popUpShow = false;
|
||||
}, 1000)
|
||||
}
|
||||
}).catch((err) => {
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
//收件码
|
||||
toPostagequ(item) {
|
||||
this.deliveryForm.delivery_name = '';
|
||||
this.deliveryForm.delivery_id = '';
|
||||
this.deliveryForm.remark = '';
|
||||
|
||||
if (item.mer_id) {
|
||||
this.deliveryForm.mer_id = item.mer_id;
|
||||
this.deliveryForm.order_id = item.order_id;
|
||||
} else {
|
||||
this.deliveryForm.mer_id = item.order[0].mer_id;
|
||||
this.deliveryForm.order_id = item.order[0].order_id;
|
||||
}
|
||||
|
||||
this.popUpShow = true;
|
||||
},
|
||||
|
||||
toPostage(item) {
|
||||
let that = this;
|
||||
if (item.refunding != 0) {
|
||||
@ -572,8 +791,17 @@
|
||||
}
|
||||
},
|
||||
toDetail(item) {
|
||||
let order_id, mer_id;
|
||||
if (item.order_id) {
|
||||
order_id = item.order_id;
|
||||
mer_id = item.mer_id;
|
||||
} else {
|
||||
order_id = item.order_id;
|
||||
mer_id = item.mer_id;
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/admin/orderDetail/index?id=${item.order_id}&mer_id=${item.mer_id}`
|
||||
url: `/pages/admin/orderDetail/index?id=${order_id}&mer_id=${mer_id}`
|
||||
})
|
||||
|
||||
},
|
||||
@ -590,11 +818,72 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.form {
|
||||
position: relative;
|
||||
z-index: 11;
|
||||
padding: 40rpx 60rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.form-item-label {
|
||||
width: 140rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.form-item-val {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.form-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.form-btn-cancel {
|
||||
width: 83px;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
color: #2291F8;
|
||||
border: 2rpx solid #2291F8;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.form-btn-confirm {
|
||||
width: 83px;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
background: linear-gradient(90deg, #2291F8 0%, #1CD1DC 100%);
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.form-btn-cancel:active {
|
||||
background: rgba(209, 220, 255, .3);
|
||||
}
|
||||
|
||||
.form-btn-confirm:active {
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pos-order-list .top-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9999;
|
||||
z-index: 10;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
@ -676,6 +965,13 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fk_status {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .order-status {
|
||||
color: #ff9600;
|
||||
position: absolute;
|
||||
@ -1017,6 +1313,7 @@
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.bar-code {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@ -1029,6 +1326,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.cloud-tag {
|
||||
font-size: 20rpx;
|
||||
padding: 2rpx 5rpx;
|
||||
|
@ -125,7 +125,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="money">
|
||||
<view class="x-money">¥{{ val.cart_info.productAttr.procure_price }}</view>
|
||||
<view class="x-money">¥{{ val.cart_info.productAttr.wholesale_price }}</view>
|
||||
<view class="num">x{{ val.product_num }}</view>
|
||||
<!-- <view class="refund-num" v-if="val.product_num-val.refund_num>0">{{val.product_num-val.refund_num}}件{{val.is_refund==1?'退款中' : val.is_refund==2 ? '已退款' : val.is_refund==3?'全部退款':''}}</view> -->
|
||||
</view>
|
||||
|
@ -16,7 +16,8 @@
|
||||
</view>
|
||||
<view>{{ orderInfo.mer_delivery_address }}</view>
|
||||
<!-- #ifdef H5 -->
|
||||
<button class="copy copy-data" :data-clipboard-text="'收货人姓名:'+orderInfo.mer_delivery_user+'\n收货人电话:'+ orderInfo.phone+'\n收货人地址:'+orderInfo.mer_delivery_address">复制</button>
|
||||
<button class="copy copy-data"
|
||||
:data-clipboard-text="'收货人姓名:'+orderInfo.mer_delivery_user+'\n收货人电话:'+ orderInfo.phone+'\n收货人地址:'+orderInfo.mer_delivery_address">复制</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<button class="copy" @tap="copyText">复制</button>
|
||||
@ -26,7 +27,9 @@
|
||||
<image :src="`${domain}/static/images/line.jpg`" />
|
||||
</view>
|
||||
<view class="pos-order-goods">
|
||||
<navigator :url="`/pages/goods_details/index?id=${item.product.cart_info.product.product_id}`" hover-class="none" class="goods acea-row row-between-wrapper" v-for="(item, index) in orderInfo.refundProduct" :key="index">
|
||||
<navigator :url="`/pages/goods_details/index?id=${item.product.cart_info.product.product_id}`"
|
||||
hover-class="none" class="goods acea-row row-between-wrapper"
|
||||
v-for="(item, index) in orderInfo.refundProduct" :key="index">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="item.product.cart_info.product.image || item.product.cart_info.product.image" />
|
||||
@ -71,7 +74,7 @@
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>退款原因:</view>
|
||||
<view class="conter">{{ orderInfo.refund_message }}</view>
|
||||
<view class="conter">{{ getRightText(orderInfo.refund_message) }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>备注信息:</view>
|
||||
@ -90,7 +93,9 @@
|
||||
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
|
||||
<view class="more"></view>
|
||||
<view class="bnt cancel" @click="modify('1')">订单备注</view>
|
||||
<navigator class="bnt cancel" v-if="orderInfo.status == 2" :url="'/pages/users/goods_logistics/index?refundId='+orderInfo.refund_order_id+'&merId='+mer_id">查看物流</navigator>
|
||||
<navigator class="bnt cancel" v-if="orderInfo.status == 2"
|
||||
:url="'/pages/users/goods_logistics/index?refundId='+orderInfo.refund_order_id+'&merId='+mer_id">查看物流
|
||||
</navigator>
|
||||
<view class="bnt delivery" v-if="orderInfo.status == 2" @click="confirmOrder">确认收货</view>
|
||||
</view>
|
||||
<view>
|
||||
@ -100,10 +105,7 @@
|
||||
<span class="iconfont icon-guanbi" @click="changeclose"></span>
|
||||
</view>
|
||||
<view class="listChange">
|
||||
<textarea
|
||||
placeholder="请填写备注信息..."
|
||||
v-model="orderInfo.mer_mark"
|
||||
></textarea>
|
||||
<textarea placeholder="请填写备注信息..." v-model="orderInfo.mer_mark"></textarea>
|
||||
</view>
|
||||
<view class="modify" @click="save">
|
||||
确认提交
|
||||
@ -132,12 +134,15 @@
|
||||
refundOrderReceive,
|
||||
setRefundMark
|
||||
} from "@/api/admin";
|
||||
import { isMoney } from '@/utils/validate.js'
|
||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||
import {
|
||||
isMoney
|
||||
} from '@/utils/validate.js'
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
export default {
|
||||
name: "AdminOrder",
|
||||
components: {
|
||||
},
|
||||
components: {},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
@ -192,6 +197,14 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
getRightText(str) {
|
||||
const index = str.indexOf("@");
|
||||
if (index !== -1) {
|
||||
return str.substring(index + 1);
|
||||
} else {
|
||||
return str
|
||||
}
|
||||
},
|
||||
more: function() {
|
||||
this.order = !this.order;
|
||||
},
|
||||
@ -218,8 +231,7 @@
|
||||
},
|
||||
copyText: function(e) {
|
||||
// var copy = e.currentTarget.dataset.copy; //data-copy传过来的数值
|
||||
let arr = [
|
||||
{
|
||||
let arr = [{
|
||||
name: "收货人姓名",
|
||||
value: this.orderInfo.real_name
|
||||
},
|
||||
@ -293,7 +305,9 @@
|
||||
title: '请输入备注'
|
||||
})
|
||||
}
|
||||
setRefundMark(that.mer_id,that.orderInfo.refund_order_id,{ mer_mark: that.orderInfo.mer_mark }).then(
|
||||
setRefundMark(that.mer_id, that.orderInfo.refund_order_id, {
|
||||
mer_mark: that.orderInfo.mer_mark
|
||||
}).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
this.$util.Tips({
|
||||
@ -348,36 +362,44 @@
|
||||
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
}
|
||||
|
||||
.pos-order-details .header .state {
|
||||
font-size: 36upx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pos-order-details .header .data {
|
||||
margin-left: 35upx;
|
||||
font-size: 28upx;
|
||||
}
|
||||
|
||||
.pos-order-details .header .data .order-num {
|
||||
font-size: 30upx;
|
||||
margin-bottom: 8upx;
|
||||
}
|
||||
|
||||
.pos-order-details .remarks {
|
||||
width: 100%;
|
||||
height: 86upx;
|
||||
background-color: #fff;
|
||||
padding: 0 30upx;
|
||||
}
|
||||
|
||||
.pos-order-details .remarks .iconfont {
|
||||
font-size: 40upx;
|
||||
color: #2a7efb;
|
||||
}
|
||||
|
||||
.pos-order-details .remarks input {
|
||||
width: 630upx;
|
||||
height: 100%;
|
||||
font-size: 30upx;
|
||||
}
|
||||
|
||||
.pos-order-details .remarks input::placeholder {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.pos-order-details .orderingUser {
|
||||
font-size: 26upx;
|
||||
color: #282828;
|
||||
@ -387,17 +409,21 @@
|
||||
margin-top: 16upx;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
}
|
||||
|
||||
.pos-order-details .orderingUser .iconfont {
|
||||
font-size: 40upx;
|
||||
color: #2a7efb;
|
||||
margin-right: 15upx;
|
||||
}
|
||||
|
||||
.pos-order-details .address {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.pos-order-details .pos-order-goods {
|
||||
margin-top: 17upx;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more {
|
||||
font-size: 27upx;
|
||||
color: #aaa;
|
||||
@ -408,11 +434,13 @@
|
||||
margin-right: 25upx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .delivery {
|
||||
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order .arrow {
|
||||
width: 0;
|
||||
height: 0;
|
||||
@ -423,6 +451,7 @@
|
||||
left: 15upx;
|
||||
bottom: -18upx;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order .arrow:before {
|
||||
content: '';
|
||||
width: 0;
|
||||
@ -434,6 +463,7 @@
|
||||
left: -10upx;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order {
|
||||
width: 200upx;
|
||||
background-color: #fff;
|
||||
@ -443,68 +473,84 @@
|
||||
top: -200upx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order .item {
|
||||
height: 77upx;
|
||||
line-height: 77upx;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order .item~.item {
|
||||
border-top: 1px solid #f5f5f5;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .moreName {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.order-details .header {
|
||||
padding: 0 30upx;
|
||||
height: 150upx;
|
||||
}
|
||||
|
||||
.order-details .header.on {
|
||||
background-color: #666 !important;
|
||||
}
|
||||
|
||||
.order-details .header .pictrue {
|
||||
width: 110upx;
|
||||
height: 110upx;
|
||||
}
|
||||
|
||||
.order-details .header .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.order-details .header .data {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 24upx;
|
||||
margin-left: 27upx;
|
||||
}
|
||||
|
||||
.order-details .header.on .data {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.order-details .header .data .state {
|
||||
font-size: 30upx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
margin-bottom: 7upx;
|
||||
}
|
||||
|
||||
.order-details .nav {
|
||||
background-color: #fff;
|
||||
font-size: 26upx;
|
||||
color: #282828;
|
||||
padding: 25upx 0;
|
||||
}
|
||||
|
||||
.order-details .nav .navCon {
|
||||
padding: 0 40upx;
|
||||
}
|
||||
|
||||
.order-details .nav .navCon .on {
|
||||
font-weight: bold;
|
||||
color: #e93323;
|
||||
}
|
||||
|
||||
.order-details .nav .progress {
|
||||
padding: 0 65upx;
|
||||
margin-top: 10upx;
|
||||
}
|
||||
|
||||
.order-details .nav .progress .line {
|
||||
width: 100upx;
|
||||
height: 2upx;
|
||||
background-color: #939390;
|
||||
}
|
||||
|
||||
.order-details .nav .progress .iconfont {
|
||||
font-size: 25upx;
|
||||
color: #939390;
|
||||
@ -515,6 +561,7 @@
|
||||
text-align: center;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.order-details .address {
|
||||
font-size: 26upx;
|
||||
color: #868686;
|
||||
@ -522,52 +569,64 @@
|
||||
padding: 25upx 30upx 30upx 30upx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.order-details .address .name {
|
||||
font-size: 30upx;
|
||||
color: #282828;
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
|
||||
.order-details .address .name .phone {
|
||||
margin-left: 40upx;
|
||||
}
|
||||
|
||||
.order-details .line {
|
||||
width: 100%;
|
||||
height: 3upx;
|
||||
}
|
||||
|
||||
.order-details .line image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.order-details .wrapper {
|
||||
background-color: #fff;
|
||||
margin-top: 12upx;
|
||||
padding: 30upx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item {
|
||||
font-size: 28upx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item~.item {
|
||||
margin-top: 20upx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item .conter {
|
||||
color: #868686;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item .virtual_image {
|
||||
// text-align: left;
|
||||
margin-left: 50rpx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item .virtual_image .picture {
|
||||
width: 106rpx;
|
||||
height: 106rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 10rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.order-details .wrapper .item .conter .copy {
|
||||
font-size: 20rpx;
|
||||
color: #868686;
|
||||
@ -581,6 +640,7 @@
|
||||
justify-content: center;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.address .copy {
|
||||
font-size: 20rpx;
|
||||
color: #868686;
|
||||
@ -596,15 +656,18 @@
|
||||
right: 30rpx;
|
||||
top: 20rpx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .actualPay {
|
||||
border-top: 1upx solid #eee;
|
||||
margin-top: 30upx;
|
||||
padding-top: 30upx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .actualPay .money {
|
||||
font-weight: bold;
|
||||
font-size: 30upx;
|
||||
}
|
||||
|
||||
.order-details .footer {
|
||||
width: 100%;
|
||||
height: 100upx;
|
||||
@ -615,6 +678,7 @@
|
||||
padding: 0 30upx;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.order-details .footer .bnt {
|
||||
width: auto;
|
||||
height: 60upx;
|
||||
@ -626,52 +690,65 @@
|
||||
font-size: 27upx;
|
||||
padding: 0 3%;
|
||||
}
|
||||
|
||||
.order-details .footer .bnt.cancel {
|
||||
color: #aaa;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.order-details .footer .bnt.default {
|
||||
color: #444;
|
||||
border: 1px solid #444;
|
||||
}
|
||||
|
||||
.order-details .footer .bnt~.bnt {
|
||||
margin-left: 18upx;
|
||||
}
|
||||
|
||||
.pos-order-goods {
|
||||
padding: 0 30upx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods {
|
||||
height: 185upx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods~.goods {
|
||||
border-top: 1px dashed #e5e5e5;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt {
|
||||
width: 515upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .pictrue {
|
||||
width: 130upx;
|
||||
height: 130upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .text {
|
||||
width: 365upx;
|
||||
height: 130upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .text .info {
|
||||
font-size: 28upx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .text .attr {
|
||||
font-size: 24upx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money {
|
||||
width: 164upx;
|
||||
text-align: right;
|
||||
@ -681,21 +758,86 @@
|
||||
right: 0;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money .refund_num {
|
||||
display: inline-block;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .x-money {
|
||||
color: #FF9600;
|
||||
}
|
||||
.priceChange{position:fixed;width:580upx;background-color:#fff;border-radius:10upx;top:50%;left:50%;margin-left:-290upx;margin-top:-335upx;z-index:666;transition:all 0.3s ease-in-out 0s;transform: scale(0);opacity:0;}
|
||||
.priceChange.on{opacity:1;transform: scale(1);}
|
||||
.priceChange .priceTitle{background:url("~@/static/images/pricetitle.jpg") no-repeat;background-size:100% 100%;width:100%;height:160upx;border-radius:10upx 10upx 0 0;text-align:center;font-size:40upx;color:#fff;line-height:160upx;position:relative;}
|
||||
.priceChange .priceTitle .iconfont{position:absolute;font-size:40upx;right:26upx;top:23upx;width:40upx;height:40upx;line-height:40upx;}
|
||||
.priceChange .listChange{padding:0 40upx;}
|
||||
.priceChange .listChange textarea{box-sizing: border-box;}
|
||||
.priceChange .listChange .item{height:103upx;border-bottom:1px solid #e3e3e3;font-size:32upx;color:#333;}
|
||||
.priceChange .modify{font-size:32upx;color:#fff;width:490upx;height:90upx;text-align:center;line-height:90upx;border-radius:45upx;background-color:#2291f8;margin:53upx auto;}
|
||||
|
||||
.priceChange {
|
||||
position: fixed;
|
||||
width: 580upx;
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -290upx;
|
||||
margin-top: -335upx;
|
||||
z-index: 666;
|
||||
transition: all 0.3s ease-in-out 0s;
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.priceChange.on {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.priceChange .priceTitle {
|
||||
background: url("~@/static/images/pricetitle.jpg") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 100%;
|
||||
height: 160upx;
|
||||
border-radius: 10upx 10upx 0 0;
|
||||
text-align: center;
|
||||
font-size: 40upx;
|
||||
color: #fff;
|
||||
line-height: 160upx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.priceChange .priceTitle .iconfont {
|
||||
position: absolute;
|
||||
font-size: 40upx;
|
||||
right: 26upx;
|
||||
top: 23upx;
|
||||
width: 40upx;
|
||||
height: 40upx;
|
||||
line-height: 40upx;
|
||||
}
|
||||
|
||||
.priceChange .listChange {
|
||||
padding: 0 40upx;
|
||||
}
|
||||
|
||||
.priceChange .listChange textarea {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.priceChange .listChange .item {
|
||||
height: 103upx;
|
||||
border-bottom: 1px solid #e3e3e3;
|
||||
font-size: 32upx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.priceChange .modify {
|
||||
font-size: 32upx;
|
||||
color: #fff;
|
||||
width: 490upx;
|
||||
height: 90upx;
|
||||
text-align: center;
|
||||
line-height: 90upx;
|
||||
border-radius: 45upx;
|
||||
background-color: #2291f8;
|
||||
margin: 53upx auto;
|
||||
}
|
||||
|
||||
.priceChange .listChange textarea {
|
||||
border: 1px solid #eee;
|
||||
width: 100%;
|
||||
@ -705,19 +847,23 @@
|
||||
color: #333;
|
||||
padding: 20upx;
|
||||
}
|
||||
|
||||
.upload-img {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.img-item {
|
||||
position: relative;
|
||||
width: 156rpx;
|
||||
height: 156rpx;
|
||||
margin-right: 23rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
&:nth-child(4n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 156rpx;
|
||||
height: 156rpx;
|
||||
|
1785
pages/cashier/cashier.vue
Normal file
1785
pages/cashier/cashier.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,7 @@
|
||||
<navigator
|
||||
v-if="item.msn_type === 6 && item.refundOrder && item.refundOrder.refund_order_id"
|
||||
open-type="navigate"
|
||||
:url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
|
||||
:url="'/pages/admin/refundDetail/index?id='+item.refundOrder.refund_order_id + '&mer_id=' + item.mer_id">
|
||||
<div class="broadcast-details_num">
|
||||
<span>退款单号:{{ item.refundOrder.refund_order_sn }}</span>
|
||||
</div>
|
||||
@ -53,7 +53,8 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.product.cart_info.product.store_name}}</div>
|
||||
{{val.product.cart_info.product.store_name}}
|
||||
</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.refundOrder.refund_price }}
|
||||
</div>
|
||||
@ -77,7 +78,7 @@
|
||||
</div>
|
||||
<navigator
|
||||
:url="'/pages/admin/orderDetail/index?id='+item.orderInfo.order_id+'&mer_id='+item.orderInfo.mer_id"
|
||||
open-type="open-type" class="conter acea-row row-middle">
|
||||
class="conter acea-row row-middle">
|
||||
<div class="broadcast-details_order noPad"
|
||||
v-for="(val, inx) in item.orderInfo.orderProduct" :key="val.id">
|
||||
<div class="broadcast-details_box noPad" v-if="inx == 0">
|
||||
@ -89,7 +90,8 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.cart_info.product.store_name}}</div>
|
||||
{{val.cart_info.product.store_name}}
|
||||
</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.orderInfo.pay_price }}
|
||||
</div>
|
||||
@ -109,13 +111,26 @@
|
||||
<div class="broadcast_details_img_no">
|
||||
<image :src="item.product.image" />
|
||||
</div>
|
||||
<div class="broadcast_details_picBox_no noPad">
|
||||
<div class="broadcast_details_picBox_no noPad"
|
||||
v-if="isWholeSale == 0 || isWholeSale == 2">
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.product.store_name}}</div>
|
||||
{{item.product.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="broadcast_details_picBox_no noPad"
|
||||
v-if="isWholeSale == 1 || isWholeSale == 2">
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.product.wholesale_price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.product.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</navigator>
|
||||
</div>
|
||||
</div>
|
||||
@ -135,7 +150,8 @@
|
||||
¥{{ item.presell.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.presell.store_name}}</div>
|
||||
{{item.presell.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -156,7 +172,8 @@
|
||||
¥{{ item.productGroup.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.productGroup.product.store_name}}</div>
|
||||
{{item.productGroup.product.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -207,7 +224,8 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.product.cart_info.product.store_name}}</div>
|
||||
{{val.product.cart_info.product.store_name}}
|
||||
</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.refundOrder.refund_price }}
|
||||
</div>
|
||||
@ -243,7 +261,8 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.cart_info.product.store_name}}</div>
|
||||
{{val.cart_info.product.store_name}}
|
||||
</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.orderInfo.pay_price }}
|
||||
</div>
|
||||
@ -267,7 +286,8 @@
|
||||
¥{{ item.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.product.store_name}}</div>
|
||||
{{item.product.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -288,7 +308,8 @@
|
||||
¥{{ item.presell.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.presell.store_name}}</div>
|
||||
{{item.presell.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -309,7 +330,8 @@
|
||||
¥{{ item.productGroup.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.productGroup.product.store_name}}</div>
|
||||
{{item.productGroup.product.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -388,7 +410,8 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.product.cart_info.product.store_name}}</div>
|
||||
{{val.product.cart_info.product.store_name}}
|
||||
</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ val.product.cart_info.productAttr.price }}
|
||||
</div>
|
||||
@ -425,7 +448,8 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.cart_info.product.store_name}}</div>
|
||||
{{val.cart_info.product.store_name}}
|
||||
</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.orderInfo.pay_price }}
|
||||
</div>
|
||||
@ -450,7 +474,8 @@
|
||||
¥{{ item.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.product.store_name}}</div>
|
||||
{{item.product.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -471,7 +496,8 @@
|
||||
¥{{ item.presell.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.presell.store_name}}</div>
|
||||
{{item.presell.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -492,7 +518,8 @@
|
||||
¥{{ item.productGroup.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.productGroup.product.store_name}}</div>
|
||||
{{item.productGroup.product.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -534,7 +561,8 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.product.cart_info.product.store_name}}</div>
|
||||
{{val.product.cart_info.product.store_name}}
|
||||
</div>
|
||||
<div class="broadcast_details_pic">
|
||||
共{{item.refundOrder.refund_num}}件商品,
|
||||
合计 ¥{{ item.refundOrder.refund_price }}
|
||||
@ -571,7 +599,8 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.cart_info.product.store_name}}</div>
|
||||
{{val.cart_info.product.store_name}}
|
||||
</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.orderInfo.pay_price }}
|
||||
</div>
|
||||
@ -596,7 +625,8 @@
|
||||
¥{{ item.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.product.store_name}}</div>
|
||||
{{item.product.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -617,7 +647,8 @@
|
||||
¥{{ item.presell.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.presell.store_name}}</div>
|
||||
{{item.presell.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -638,7 +669,8 @@
|
||||
¥{{ item.productGroup.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.productGroup.product.store_name}}</div>
|
||||
{{item.productGroup.product.store_name}}
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -772,9 +804,9 @@
|
||||
{{ speak }}
|
||||
</div>
|
||||
<view class="input_count">
|
||||
<input type="text" placeholder-class='placeholder' :disabled="active" placeholder="输入内容" class="input" ref="input"
|
||||
v-show="!voice" @input="bindInput" @keyup="keyup" @focus="focus" cursor-spacing="20"
|
||||
v-model="textCon" @click="handleClick">
|
||||
<input type="text" placeholder-class='placeholder' :disabled="active" placeholder="输入内容"
|
||||
class="input" ref="input" v-show="!voice" @input="bindInput" @keyup="keyup" @focus="focus"
|
||||
cursor-spacing="20" v-model="textCon" @click="handleClick">
|
||||
<div class="send iconfont icon-fasong" :style="'color:'+iconColor" @click="sendTest"></div>
|
||||
</view>
|
||||
</div>
|
||||
@ -817,7 +849,8 @@
|
||||
getChatRecord,
|
||||
getMerHistory,
|
||||
chatReverstApi,
|
||||
hasServiceApi
|
||||
hasServiceApi,
|
||||
getUserInfo
|
||||
} from "@/api/user";
|
||||
import {
|
||||
getProductDetail,
|
||||
@ -938,7 +971,8 @@
|
||||
httpUrl: '',
|
||||
press: false,
|
||||
index: 0,
|
||||
j: 0
|
||||
j: 0,
|
||||
isWholeSale: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -987,6 +1021,9 @@
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
|
||||
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
|
||||
console.log(this.isWholeSale);
|
||||
},
|
||||
onReady() {
|
||||
this.httpUrl = `${HTTP_REQUEST_URL}/static/look.png`;
|
||||
@ -1213,8 +1250,7 @@
|
||||
let self = this
|
||||
self.$util.uploadImageOne('upload/image', function(res) {
|
||||
if (res.status == 200) {
|
||||
self.sendMsg(res.data.path, 3
|
||||
)
|
||||
self.sendMsg(res.data.path, 3)
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -1610,7 +1646,8 @@
|
||||
width: 710rpx;
|
||||
position: fixed;
|
||||
bottom: 180rpx;
|
||||
bottom: calc(180rpx + env(safe-area-inset-bottom)); /* 适应底部安全距离 */
|
||||
bottom: calc(180rpx + env(safe-area-inset-bottom));
|
||||
/* 适应底部安全距离 */
|
||||
left: 20rpx;
|
||||
|
||||
.broadcast-details_box,
|
||||
|
@ -12,10 +12,11 @@
|
||||
<view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view>
|
||||
<view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view>
|
||||
<view class="con line1" v-if="item.last && item.last.msn_type == 4">[商品]</view>
|
||||
<view class="con line1" v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
|
||||
<view class="con line1"
|
||||
v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
|
||||
</view>
|
||||
<view class="right-box">
|
||||
<view class="time">{{item.last && item.last.create_time.split(' ')[1] || ''}}</view>
|
||||
<view class="time">{{item.display_time}}</view>
|
||||
<view class="num" v-if="item.num>0">{{item.num}}</view>
|
||||
</view>
|
||||
</div>
|
||||
@ -23,18 +24,21 @@
|
||||
<block v-if="type == 1 && list.length>0" v-for="(item,index) in list" :key="index">
|
||||
<div class="item acea-row" @click="goPage(item)">
|
||||
<view class="logo">
|
||||
<image :src="(item.user && item.user.avatar) ? item.user.avatar : '/static/images/f.png'" mode=""></image>
|
||||
<image :src="(item.user && item.user.avatar) ? item.user.avatar : '/static/images/f.png'"
|
||||
mode=""></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="name">{{item.user && item.user.nickname}}</view>
|
||||
<view class="con line1" v-if="item.last && item.last.msn_type == 1">{{item.last.msn}}</view>
|
||||
<view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view>
|
||||
<view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view>
|
||||
<view class="con line1" v-if="item.last && (item.last.msn_type == 4 || item.last.msn_type == 7)">[商品]</view>
|
||||
<view class="con line1" v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
|
||||
<view class="con line1"
|
||||
v-if="item.last && (item.last.msn_type == 4 || item.last.msn_type == 7)">[商品]</view>
|
||||
<view class="con line1"
|
||||
v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
|
||||
</view>
|
||||
<view class="right-box">
|
||||
<view class="time">{{item.last && item.last.create_time.split(' ')[1]}}</view>
|
||||
<view class="time">{{item.display_time}}</view>
|
||||
<view class="num" v-if="item.num>0">{{item.num}}</view>
|
||||
</view>
|
||||
</div>
|
||||
@ -65,7 +69,9 @@
|
||||
import {
|
||||
getUserInfo
|
||||
} from '@/api/user.js';
|
||||
import { mapGetters } from "vuex";
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
name: "CustomerList",
|
||||
components: {
|
||||
@ -86,12 +92,15 @@
|
||||
clear: false,
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
isWholeSale: ''
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin', 'viewColor']),
|
||||
onLoad(optios) {
|
||||
this.type = optios.type || 1;
|
||||
this.getindex()
|
||||
this.getindex();
|
||||
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
|
||||
console.log(this.isWholeSale);
|
||||
},
|
||||
onShow(option) {
|
||||
if (this.isLogin) {
|
||||
@ -100,6 +109,7 @@
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
}
|
||||
this.getindex()
|
||||
},
|
||||
onHide() {
|
||||
if (this.timer) {
|
||||
@ -139,8 +149,6 @@
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
}
|
||||
// this.getList(this.mer_id)
|
||||
// this.getList(res.data.service.mer_id, true);
|
||||
});
|
||||
},
|
||||
onLoadFun() {
|
||||
@ -160,6 +168,7 @@
|
||||
limit: this.limit
|
||||
}).then(res => {
|
||||
this.list = res.data.list;
|
||||
this.getCurrBadge();
|
||||
if (res.status == 400) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
@ -183,6 +192,8 @@
|
||||
limit: this.limit
|
||||
}).then(res => {
|
||||
this.list = res.data.list;
|
||||
this.getCurrBadge();
|
||||
|
||||
if (res.status == 400) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
@ -206,6 +217,22 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
getCurrBadge() {
|
||||
const sum = this.list.reduce((accumulator, current) => accumulator + Number(current.num),
|
||||
0);
|
||||
if (sum) {
|
||||
uni.setTabBarBadge({
|
||||
index: 1,
|
||||
text: String(sum)
|
||||
})
|
||||
} else {
|
||||
uni.removeTabBarBadge({
|
||||
index: 1
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//实时刷新列表
|
||||
liveUpdate() {
|
||||
let that = this;
|
||||
@ -225,6 +252,9 @@
|
||||
},
|
||||
goPage(item) {
|
||||
item.num = 0;
|
||||
|
||||
this.getCurrBadge();
|
||||
|
||||
if (this.type == 0) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/chat/customer_list/chat?mer_id=${item.mer_id}`
|
||||
@ -248,6 +278,7 @@
|
||||
transform: rotate(180deg);
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.popupn {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
@ -258,17 +289,20 @@
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
z-index: 100;
|
||||
|
||||
.title {
|
||||
max-width: 560rpx;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: 4rpx;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.mer_logo {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
@ -276,36 +310,44 @@
|
||||
top: 6rpx;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.mer_name {
|
||||
display: inline-block;
|
||||
max-width: 650rpx;
|
||||
}
|
||||
|
||||
.invoice-content {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.list_count {
|
||||
margin-top: 104rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 20rpx 30rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.logo image {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 334rpx;
|
||||
margin-left: 20rpx;
|
||||
|
||||
.con {
|
||||
margin-top: 10rpx;
|
||||
color: #999999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right-box {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@ -313,9 +355,11 @@
|
||||
align-items: flex-end;
|
||||
font-size: 20rpx;
|
||||
color: #BBBBBB;
|
||||
|
||||
.time {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.num {
|
||||
min-width: 6px;
|
||||
background-color: var(--view-theme);
|
||||
|
@ -9,8 +9,8 @@
|
||||
<view class="item-one">
|
||||
被委托商家
|
||||
</view>
|
||||
<e-select v-model="formData.entrust_mer_id" :value='formData.entrust_mer_id' :options="options1" @change="change1"
|
||||
placeholder="选择选项"></e-select>
|
||||
<e-select v-model="formData.entrust_mer_id" :value='formData.entrust_mer_id' :options="options1"
|
||||
@change="change1" placeholder="选择选项"></e-select>
|
||||
</view>
|
||||
<view class="release_item-one">
|
||||
<view class="item-one">
|
||||
@ -316,7 +316,6 @@
|
||||
.center-one-txt {
|
||||
.one-txta {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
@ -325,7 +324,6 @@
|
||||
display: flex;
|
||||
margin-top: 28rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
|
||||
@ -351,7 +349,6 @@
|
||||
margin-top: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
@ -525,7 +522,6 @@
|
||||
background: linear-gradient(84deg, #F98649 0%, #F34E45 100%);
|
||||
border-radius: 42px 42px 42px 42px;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
@ -101,7 +101,8 @@
|
||||
<view class="center-twoa">
|
||||
拒绝原因:
|
||||
</view>
|
||||
<view class="center-twob" :style="{'text-align':objinfo.entrust_finish_refusal.length<15?'right':'left'}">
|
||||
<view class="center-twob"
|
||||
:style="{'text-align':objinfo.entrust_finish_refusal.length<15?'right':'left'}">
|
||||
{{objinfo.entrust_finish_refusal}}
|
||||
</view>
|
||||
</view>
|
||||
@ -233,7 +234,6 @@
|
||||
|
||||
.top-two-one {
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
margin-top: 10rpx;
|
||||
@ -280,7 +280,6 @@
|
||||
.center-one-txt {
|
||||
.one-txta {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
@ -289,7 +288,6 @@
|
||||
display: flex;
|
||||
margin-top: 28rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
|
||||
@ -316,7 +314,6 @@
|
||||
|
||||
.center-twoa {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
@ -327,7 +324,6 @@
|
||||
|
||||
word-wrap: break-word;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
@ -377,7 +373,6 @@
|
||||
background: linear-gradient(84deg, #F98649 0%, #F34E45 100%);
|
||||
border-radius: 42px 42px 42px 42px;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
|
@ -147,7 +147,6 @@
|
||||
|
||||
.titlea {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
@ -155,7 +154,6 @@
|
||||
.titleb {
|
||||
margin-top: 5rpx;
|
||||
font-size: 25rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
@ -542,7 +542,6 @@
|
||||
|
||||
.adddelegation-two {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
margin-top: 25rpx;
|
||||
@ -593,7 +592,6 @@
|
||||
|
||||
.txt-b-a {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
@ -612,7 +610,6 @@
|
||||
|
||||
.txt-b-b {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333
|
||||
}
|
||||
@ -625,15 +622,18 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.text-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.one-txt-a {
|
||||
flex: 1;
|
||||
font-size: 30rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2; /* 限制为三行 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制为三行 */
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@ -686,7 +686,6 @@
|
||||
|
||||
.contentgn_a {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #F84221;
|
||||
margin-right: 10rpx;
|
||||
@ -704,7 +703,6 @@
|
||||
|
||||
.contentgn_b {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: 10rpx;
|
||||
@ -760,7 +758,6 @@
|
||||
|
||||
.contentgn_a {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #F84221;
|
||||
margin-right: 10rpx;
|
||||
@ -777,7 +774,6 @@
|
||||
|
||||
.contentgn_b {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: 10rpx;
|
||||
@ -819,7 +815,6 @@
|
||||
.bg-content-a {
|
||||
margin-left: 242rpx;
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
@ -827,14 +822,12 @@
|
||||
.bg-content-b {
|
||||
margin-left: 35rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-top: 32rpx;
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F84221;
|
||||
margin-left: 18rpx;
|
||||
@ -844,14 +837,12 @@
|
||||
.bg-content-c {
|
||||
margin-left: 35rpx;
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-top: 32rpx;
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F84221;
|
||||
margin-left: 18rpx;
|
||||
@ -867,7 +858,6 @@
|
||||
height: 95rpx;
|
||||
line-height: 95rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: 121rpx;
|
||||
@ -880,7 +870,6 @@
|
||||
line-height: 95rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
|
||||
@ -904,7 +893,6 @@
|
||||
.bg-content-a {
|
||||
margin-left: 242rpx;
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
@ -917,7 +905,6 @@
|
||||
height: 95rpx;
|
||||
line-height: 95rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: 121rpx;
|
||||
@ -930,7 +917,6 @@
|
||||
line-height: 95rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
|
||||
@ -957,7 +943,6 @@
|
||||
.bg-content-a {
|
||||
margin-left: 242rpx;
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
@ -965,14 +950,12 @@
|
||||
.bg-content-b {
|
||||
margin-left: 35rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-top: 32rpx;
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F84221;
|
||||
margin-left: 18rpx;
|
||||
@ -982,14 +965,12 @@
|
||||
.bg-content-c {
|
||||
margin-left: 35rpx;
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-top: 22rpx;
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F84221;
|
||||
margin-left: 18rpx;
|
||||
@ -1017,7 +998,6 @@
|
||||
line-height: 95rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
|
||||
|
@ -59,22 +59,26 @@
|
||||
<view class="content-two_oneq" v-if="item.mer_status==1">
|
||||
<view class="contentgn">
|
||||
<block v-if="item.entrust_order_id>0&&item.mer_status==1">
|
||||
<view class="contentgn_a" v-if="item.entrust_finish==0" style="margin-left: 10rpx;" @click="closingorder(item)">
|
||||
<view class="contentgn_a" v-if="item.entrust_finish==0"
|
||||
style="margin-left: 10rpx;" @click="closingorder(item)">
|
||||
申请结束
|
||||
</view>
|
||||
<view class="contentgn_a" v-else-if="item.entrust_finish==1" style="margin-left: 10rpx; color: #20A162;">
|
||||
<view class="contentgn_a" v-else-if="item.entrust_finish==1"
|
||||
style="margin-left: 10rpx; color: #20A162;">
|
||||
已结束
|
||||
</view>
|
||||
<view class="contentgn_a" v-else-if="item.entrust_finish==2" @click="closingorder(item)" style="margin-left: 10rpx;">
|
||||
<view class="contentgn_a" v-else-if="item.entrust_finish==2"
|
||||
@click="closingorder(item)" style="margin-left: 10rpx;">
|
||||
被拒绝
|
||||
</view>
|
||||
<view class="contentgn_a" v-else-if="item.entrust_finish==3" style="margin-left: 10rpx; color: #FE9A10;">
|
||||
<view class="contentgn_a" v-else-if="item.entrust_finish==3"
|
||||
style="margin-left: 10rpx; color: #FE9A10;">
|
||||
申请中
|
||||
</view>
|
||||
<span></span>
|
||||
</block>
|
||||
<view class="contentgn_a" v-if="item.entrust_order_id==0" style="margin-left: 10rpx;"
|
||||
@click="order(item)">
|
||||
<view class="contentgn_a" v-if="item.entrust_order_id==0"
|
||||
style="margin-left: 10rpx;" @click="order(item)">
|
||||
去下单
|
||||
</view>
|
||||
<span v-if="item.entrust_order_id==0"></span>
|
||||
@ -531,7 +535,6 @@
|
||||
|
||||
.txt-b-a {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
@ -550,7 +553,6 @@
|
||||
|
||||
.txt-b-b {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333
|
||||
}
|
||||
@ -563,15 +565,18 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.text-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.one-txt-a {
|
||||
flex: 1;
|
||||
font-size: 30rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2; /* 限制为三行 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制为三行 */
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@ -624,7 +629,6 @@
|
||||
|
||||
.contentgn_a {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #F84221;
|
||||
margin-right: 10rpx;
|
||||
@ -642,7 +646,6 @@
|
||||
|
||||
.contentgn_b {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: 10rpx;
|
||||
@ -698,7 +701,6 @@
|
||||
|
||||
.contentgn_a {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #F84221;
|
||||
margin-right: 10rpx;
|
||||
@ -716,7 +718,6 @@
|
||||
|
||||
.contentgn_b {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: 10rpx;
|
||||
@ -757,7 +758,6 @@
|
||||
.bg-content-a {
|
||||
margin-left: 242rpx;
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
@ -765,14 +765,12 @@
|
||||
.bg-content-b {
|
||||
margin-left: 35rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-top: 16rpx;
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F84221;
|
||||
margin-left: 18rpx;
|
||||
@ -782,30 +780,27 @@
|
||||
.bg-content-c {
|
||||
margin-left: 35rpx;
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-top: 16rpx;
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F84221;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-content-d {
|
||||
margin-left: 35rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-top: 16rpx;
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F84221;
|
||||
margin-left: 18rpx;
|
||||
@ -821,7 +816,6 @@
|
||||
height: 95rpx;
|
||||
line-height: 95rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: 121rpx;
|
||||
@ -834,7 +828,6 @@
|
||||
line-height: 95rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
|
||||
|
@ -51,17 +51,20 @@
|
||||
<view v-else class='share acea-row row-between row-bottom'>
|
||||
<view class='money p-color skeleton-rect' style="min-width: 70rpx;">
|
||||
¥
|
||||
<text class='num'>{{storeInfo.price}}</text>
|
||||
<text class='num'
|
||||
v-if="isWholeSale == 0 || isWholeSale == 2">{{storeInfo.price}}</text>
|
||||
<text class='num'
|
||||
v-if="isWholeSale == 1 || isWholeSale == 2">{{storeInfo.wholesale_price}}</text>
|
||||
<view v-if="svipData && svipData.show_svip_price && svipData.show_svip"
|
||||
style="display: inline-block;">
|
||||
<text class="vip-money">¥{{storeInfo.svip_price}}</text>
|
||||
<image class="vip-image" src="/static/images/svip.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view @click="listenerActionSheet" class="fenxiang_btn">
|
||||
<!-- <view @click="listenerActionSheet" class="fenxiang_btn">
|
||||
<view class='iconfont icon-fenxiang'></view>
|
||||
分享
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view v-if="svipData && !svipData.is_svip && svipData.show_svip"
|
||||
class="svipCon acea-row row-between-wrapper skeleton-rect" style="margin-top: 20rpx;">
|
||||
@ -237,9 +240,9 @@
|
||||
</view>
|
||||
<view v-else class="txt">0人关注</view>
|
||||
</view>
|
||||
<navigator v-if="hide_mer_status != 1"
|
||||
<!-- <navigator v-if="hide_mer_status != 1"
|
||||
:url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id" class="link"
|
||||
hover-class="none">进店</navigator>
|
||||
hover-class="none">进店</navigator> -->
|
||||
</view>
|
||||
<view class="score-wrapper">
|
||||
<view class="item">
|
||||
@ -278,20 +281,22 @@
|
||||
<view class='title'>产品介绍</view>
|
||||
<view class='conter' v-if="description" style="min-height:50rpx;">
|
||||
<!-- #ifndef APP-PLUS -->
|
||||
<jyf-parser v-if="description.type == 0 && typeof description.content == 'string'" :domain='domain'
|
||||
:html="description.content.replace(/<br\/>/ig, '')" ref="article"
|
||||
<jyf-parser v-if="description.type == 0 && typeof description.content == 'string'"
|
||||
:domain='domain' :html="description.content.replace(/<br\/>/ig, '')" ref="article"
|
||||
:tag-style="tagStyle"></jyf-parser>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view v-if="description.type == 0 && typeof description.content == 'string'" class="description"
|
||||
v-html="description.content.replace(/<br\/>/ig, '')"></view>
|
||||
<view v-if="description.type == 0 && typeof description.content == 'string'"
|
||||
class="description" v-html="description.content.replace(/<br\/>/ig, '')"></view>
|
||||
<!-- #endif -->
|
||||
<view v-else class="product_content">
|
||||
<view v-if="description.content && description.content.title" class="product_content_title">
|
||||
<view v-if="description.content && description.content.title"
|
||||
class="product_content_title">
|
||||
{{description.content.title}}
|
||||
</view>
|
||||
<block v-if="description.content && description.content.image">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item" mode="widthFix" style="background-color: #fff;width: 100vw;">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item"
|
||||
mode="widthFix" style="background-color: #fff;width: 100vw;">
|
||||
</image>
|
||||
</block>
|
||||
</view>
|
||||
@ -311,7 +316,7 @@
|
||||
<view style='height:120rpx;'></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class='footer acea-row row-between-wrapper'>
|
||||
<!-- <view class='footer acea-row row-between-wrapper'>
|
||||
<view v-if="storeInfo.merchant && storeInfo.merchant.services_type == 1" class="item skeleton-rect"
|
||||
@click="call">
|
||||
<view class="iconfont icon-kefu"></view>
|
||||
@ -355,7 +360,7 @@
|
||||
<button v-else class='buy bnts sold_out' form-type="submit" disabled>商品已售罄</button>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<block v-if="sharePacket.max&&sharePacket.max>0">
|
||||
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet"
|
||||
@closeChange="closeChange" :showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets>
|
||||
@ -617,7 +622,8 @@
|
||||
params: []
|
||||
},
|
||||
product_type: 0,
|
||||
referer: ''
|
||||
referer: '',
|
||||
isWholeSale: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -631,7 +637,6 @@
|
||||
])),
|
||||
},
|
||||
onLoad(options) {
|
||||
// console.log(options)
|
||||
this.referer = options.referer
|
||||
if (options.product_type) {
|
||||
this.product_type = options.product_type
|
||||
@ -682,6 +687,7 @@
|
||||
} else {
|
||||
this.id = options.id
|
||||
}
|
||||
|
||||
//记录推广人uid
|
||||
if (options.spid) app.globalData.spid = options.spid;
|
||||
// #endif
|
||||
@ -695,6 +701,9 @@
|
||||
this.downloadFilePromotionCode();
|
||||
this.getHistory()
|
||||
}
|
||||
|
||||
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
|
||||
console.log(this.isWholeSale);
|
||||
},
|
||||
onReady() {
|
||||
this.isNodes++;
|
||||
@ -1059,14 +1068,16 @@
|
||||
}
|
||||
that.$set(that, 'storeInfo', storeInfo);
|
||||
that.$set(that, 'description', storeInfo.content);
|
||||
if(typeof that.description.content == 'string'){
|
||||
if (storeInfo.content && typeof that.description.content == 'string') {
|
||||
try {
|
||||
that.description.content = JSON.parse(that.description.content);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
if (that.description.type == 0 && typeof that.description.content == 'string') {
|
||||
if (that.description && that.description.type && that.description.type == 0 && typeof that
|
||||
.description
|
||||
.content == 'string') {
|
||||
that.description.content = that.description.content.replace(
|
||||
/<img/gi,
|
||||
'<img style="max-width:100%;height:auto;float:left;display:block" '
|
||||
@ -1121,6 +1132,7 @@
|
||||
that.getCouponList();
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
//状态异常返回上级页面
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
@ -2530,6 +2542,7 @@
|
||||
|
||||
.product_content {
|
||||
background-color: #fff;
|
||||
|
||||
&_title {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
@ -2538,6 +2551,7 @@
|
||||
word-wrap: break-word;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 750rpx;
|
||||
// height: auto;
|
||||
|
File diff suppressed because it is too large
Load Diff
247
pages/index/subnvue/concat.nvue
Normal file
247
pages/index/subnvue/concat.nvue
Normal file
@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<view class="" style="width: 750rpx;height: 100%;">
|
||||
<view class="jump" @click="jump">
|
||||
<text class="font">跳过</text>
|
||||
</view>
|
||||
<view class="target" :style="{left:(left-9)+'px',top:(top-9)+'px'}">
|
||||
<image src="/static/images/index7.png" class="imgs"></image>
|
||||
</view>
|
||||
<view class="" class="pointe" :style="{ left:(left-10)+'px',top:(top)+'px'}">
|
||||
<image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;" mode=""></image>
|
||||
</view>
|
||||
<view class="tips" :style="{ left:left+'px',top:(top-200)+'px'}">
|
||||
<view class="tras" :class="{act:isActive}">
|
||||
<text class="font" style="line-height: 106rpx;">点击商品管理,发布商品</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="center" :style="{left:(left+35)+'px', top:(top-60)+'px'}">
|
||||
<image src="/static/images/greenLine.png" style="width:35px;height: 60px;" mode=""></image>
|
||||
</view>
|
||||
<view class="next-btn">
|
||||
<text class="next-btn-text font" @click="next">下一步(3/4) </text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
isNewMer
|
||||
} from '@/api/user.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isActive: false,
|
||||
left: 33,
|
||||
top: 0,
|
||||
subNVue: null,
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jump() {
|
||||
isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id, {
|
||||
done: 1
|
||||
}).then(res => {
|
||||
console.log(res, 'res')
|
||||
})
|
||||
this.subNVue.hide('zoom-in', 300, )
|
||||
},
|
||||
next() {
|
||||
// this.subNVue = uni.getSubNVueById('concat')
|
||||
// this.subNVue.hide('zoom-in', 300, )
|
||||
uni.$emit('diverIndexSubEmit');
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.subNVue = uni.getSubNVueById('concat')
|
||||
let that = this
|
||||
uni.$on('diverIndexEmit', (data) => {
|
||||
that.left = data.left
|
||||
that.top = data.top
|
||||
})
|
||||
setTimeout(() => {
|
||||
that.isActive = true
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.target {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 160rpx;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.greenLine {
|
||||
width: 10rpx;
|
||||
height: 100rpx;
|
||||
background-color: green;
|
||||
position: absolute;
|
||||
left: 40px;
|
||||
transform: translate(-50%, 0);
|
||||
z-index: 999;
|
||||
top: -40px;
|
||||
}
|
||||
|
||||
.imgs {
|
||||
width: 62px;
|
||||
height: 62px;
|
||||
position: absolute;
|
||||
left: 40px;
|
||||
top: 40px;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
}
|
||||
|
||||
.tras {
|
||||
position: absolute;
|
||||
z-index: 999 !important;
|
||||
width: 0;
|
||||
transition-property: width;
|
||||
transition-duration: 3s;
|
||||
transition-delay: 0.1s;
|
||||
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
|
||||
}
|
||||
|
||||
.act {
|
||||
width: 462rpx;
|
||||
}
|
||||
|
||||
.font {
|
||||
font-size: 28rpx;
|
||||
color: white;
|
||||
lines: 1;
|
||||
}
|
||||
|
||||
.bgimg {
|
||||
width: 200rpx;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.img {
|
||||
opacity: 0;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
transition-property: opacity;
|
||||
transition-duration: 1s;
|
||||
transition-delay: 0.1s;
|
||||
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
|
||||
}
|
||||
|
||||
|
||||
.next-btn {
|
||||
position: absolute;
|
||||
bottom: 100rpx;
|
||||
left: 375rpx;
|
||||
transform: translateX(-50%);
|
||||
width: 240rpx;
|
||||
height: 76rpx;
|
||||
border: 1px solid white;
|
||||
border-radius: 38rpx;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.next-btn-text {
|
||||
line-height: 76rpx;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.jump {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 80rpx;
|
||||
border: 1px solid white;
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 462rpx;
|
||||
height: 106rpx;
|
||||
background-color: #5BE157;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.center {
|
||||
position: absolute;
|
||||
left: 375rpx;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.tabbar {
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
background-color: white;
|
||||
border-radius: 136rpx;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.tab-icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
position: absolute;
|
||||
left: 68rpx;
|
||||
transform: translate(-50%, -50%);
|
||||
top: 68rpx;
|
||||
}
|
||||
|
||||
.te {
|
||||
font-size: 20rpx;
|
||||
position: absolute;
|
||||
left: 68rpx;
|
||||
transform: translate(-50%, 0);
|
||||
top: 100rpx;
|
||||
}
|
||||
|
||||
.pointe {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
||||
.tras {
|
||||
padding-left: 20rpx;
|
||||
position: absolute;
|
||||
z-index: 999 !important;
|
||||
width: 20px;
|
||||
transition-property: width;
|
||||
transition-duration: 3s;
|
||||
transition-delay: 0.1s;
|
||||
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
|
||||
}
|
||||
|
||||
.act {
|
||||
width: 462rpx;
|
||||
}
|
||||
|
||||
.font {
|
||||
font-size: 28rpx;
|
||||
color: white;
|
||||
lines: 1;
|
||||
}
|
||||
|
||||
.next-btn {
|
||||
position: absolute;
|
||||
bottom: 100px;
|
||||
left: 375rpx;
|
||||
transform: translateX(-50%);
|
||||
width: 240rpx;
|
||||
height: 76rpx;
|
||||
border: 1px solid white;
|
||||
border-radius: 38rpx;
|
||||
}
|
||||
|
||||
.next-btn-text {
|
||||
line-height: 76rpx;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
</style>
|
134
pages/index/unregist.vue
Normal file
134
pages/index/unregist.vue
Normal file
@ -0,0 +1,134 @@
|
||||
<!-- 未开通商户 -->
|
||||
<template>
|
||||
<view class="unregist">
|
||||
<view class="unregist-wrap">
|
||||
<!-- 适配不同机 -->
|
||||
<view style="height: var(--status-bar-height);"></view>
|
||||
<view style="display: flex;justify-content: space-between;height:100%;">
|
||||
<view class="head">
|
||||
<image src="@/static/images/f.png"></image>
|
||||
<text>暂无信息</text>
|
||||
</view>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<retuntop style="margin-right: 50rpx;margin-top: 20rpx;" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="con">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e70e7202404021040448288.png"></image>
|
||||
<text class="empty">暂无数据</text>
|
||||
<text class="no_shop">您还没有开通商户</text>
|
||||
</view>
|
||||
|
||||
<view class="btn c_active" @click="handleOpen">
|
||||
<text>点击开通</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import retuntop from '@/components/content-top/index.vue';
|
||||
export default {
|
||||
components: {
|
||||
retuntop
|
||||
},
|
||||
methods: {
|
||||
handleBack() {
|
||||
console.log(1241)
|
||||
// #ifdef APP-PLUS
|
||||
uni.sendHostEvent('backApp', (ret) => {
|
||||
//发送消息成功回调
|
||||
console.log('关闭应用' + JSON.stringify(ret));
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
|
||||
handleOpen() {
|
||||
// #ifdef APP-PLUS
|
||||
uni.sendHostEvent('closeAppToOpenShop', (ret) => {
|
||||
//发送消息成功回调
|
||||
console.log('关闭应用' + JSON.stringify(ret));
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.unregist {
|
||||
position: relative;
|
||||
|
||||
.unregist-wrap {
|
||||
width: 100%;
|
||||
height: 360rpx;
|
||||
background-image: url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a2e04202404021019436262.webp);
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
margin-bottom: 200rpx;
|
||||
}
|
||||
|
||||
.head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 12rpx 0 60rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.con {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 512rpx;
|
||||
height: 334rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.empty {
|
||||
margin-bottom: 16rpx;
|
||||
font-size: 34rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.no_shop {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
line-height: 0rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 80rpx;
|
||||
width: 650rpx;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
background: linear-gradient(359deg, #72BE53 0%, #46B03A 100%);
|
||||
border-radius: 88rpx;
|
||||
text-align: center;
|
||||
|
||||
text {
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
color: #F5F5F5;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -23,7 +23,8 @@
|
||||
<view class="tab">
|
||||
<view class="item active" style="margin: 0;">{{merchant_Data.margin}}元</view>
|
||||
</view>
|
||||
<button class="btn" :class="{'btn-d': merchant_Data.is_margin != 1}" @click="paydecimal">{{merchant_Data.is_margin != 1?"无需缴纳":"缴纳"}}</button>
|
||||
<button class="btn" :class="{'btn-d': merchant_Data.is_margin != 1}"
|
||||
@click="paydecimal">{{merchant_Data.is_margin != 1?"无需缴纳":"缴纳"}}</button>
|
||||
</view>
|
||||
<!-- <view class="tip">
|
||||
<view class="title">注意事项</view>
|
||||
@ -35,8 +36,7 @@
|
||||
color: '#333',
|
||||
fontWeight: 'bold',
|
||||
transform: 'scale(1.05)'
|
||||
}"
|
||||
:inactiveStyle="{
|
||||
}" :inactiveStyle="{
|
||||
color: '#333',
|
||||
transform: 'scale(1)'
|
||||
}"></u-tabs>
|
||||
@ -79,7 +79,9 @@
|
||||
marginlist,
|
||||
autoMarginlist
|
||||
} from '@/api/api.js'
|
||||
import { Toast } from '../../libs/uniApi'
|
||||
import {
|
||||
Toast
|
||||
} from '../../libs/uniApi'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -122,33 +124,7 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
list(isPage) {
|
||||
let that = this;
|
||||
if (that.loadend) return;
|
||||
if (that.loading) return;
|
||||
if (isPage === true) that.$set(that, 'productList', []);
|
||||
that.loading = true;
|
||||
that.loadTitle = '';
|
||||
marginlist(that.where).then(res => {
|
||||
let list = res.data.list;
|
||||
let productList = that.$util.SplitArray(list, that.productList);
|
||||
let loadend = list.length < that.where.limit;
|
||||
that.loadend = loadend;
|
||||
that.loading = false;
|
||||
that.loadTitle = loadend ? '已全部加载' : '加载更多';
|
||||
setTimeout(() => {
|
||||
that.$set(that, 'productList', productList);
|
||||
}, 500)
|
||||
|
||||
|
||||
that.$set(that.where, 'page', that.where.page + 1);
|
||||
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
|
||||
}).catch(err => {
|
||||
that.loading = false;
|
||||
that.loadTitle = '加载更多';
|
||||
});
|
||||
|
||||
},
|
||||
//获取押金信息
|
||||
decimal() {
|
||||
merchant({
|
||||
@ -204,9 +180,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
changeCurrent(e) {
|
||||
this.current = e.index;
|
||||
@ -220,6 +194,35 @@
|
||||
this.list(true)
|
||||
}
|
||||
},
|
||||
|
||||
list(isPage) {
|
||||
let that = this;
|
||||
if (that.loadend) return;
|
||||
if (that.loading) return;
|
||||
if (isPage === true) that.$set(that, 'productList', []);
|
||||
that.loading = true;
|
||||
that.loadTitle = '';
|
||||
marginlist(that.where).then(res => {
|
||||
let list = res.data.list;
|
||||
let productList = that.$util.SplitArray(list, that.productList);
|
||||
let loadend = list.length < that.where.limit;
|
||||
that.loadend = loadend;
|
||||
that.loading = false;
|
||||
that.loadTitle = loadend ? '已全部加载' : '加载更多';
|
||||
setTimeout(() => {
|
||||
that.$set(that, 'productList', productList);
|
||||
}, 500)
|
||||
|
||||
if (isPage) that.where.page = 1;
|
||||
else that.$set(that.where, 'page', that.where.page + 1);
|
||||
|
||||
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
|
||||
}).catch(err => {
|
||||
that.loading = false;
|
||||
that.loadTitle = '加载更多';
|
||||
});
|
||||
},
|
||||
|
||||
autoList(isPage) {
|
||||
let that = this;
|
||||
if (that.loadend2) return;
|
||||
@ -272,8 +275,7 @@
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.deduct{
|
||||
}
|
||||
.deduct {}
|
||||
}
|
||||
|
||||
.info {
|
||||
@ -309,7 +311,6 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
@ -328,6 +329,7 @@
|
||||
flex-shrink: 0;
|
||||
margin-right: 18rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
@ -407,6 +409,7 @@
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.btn-d {
|
||||
background-color: #999;
|
||||
}
|
||||
|
@ -78,8 +78,8 @@
|
||||
<view :class="{'active': storeParam.order=='sales'}" @click="set_where('sales')">销量</view>
|
||||
<!-- <view :class="{'active': storeParam.order.includes('price')}" @click="set_where(price_order)">
|
||||
<text style="margin-right: 5rpx;">价格</text>
|
||||
<image class="icon" v-if="price_order=='procure_price_asc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
|
||||
<image class="icon" v-else-if="price_order=='procure_price_desc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
|
||||
<image class="icon" v-if="price_order=='wholesale_price_asc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
|
||||
<image class="icon" v-else-if="price_order=='wholesale_price_desc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
|
||||
<image class="icon" v-else src='/static/images/horn.png'></image>
|
||||
</view> -->
|
||||
</view>
|
||||
@ -104,7 +104,7 @@
|
||||
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
|
||||
</view>
|
||||
<view class="r_btn" v-if="getAttr(item)">
|
||||
<view>¥<text style="font-size: 33rpx;">{{ getAttr(item).procure_price.split('.')[0] }}.</text>{{getAttr(item).procure_price.split('.')[1]}}</view>
|
||||
<view>¥<text style="font-size: 33rpx;">{{ getAttr(item).wholesale_price.split('.')[0] }}.</text>{{getAttr(item).wholesale_price.split('.')[1]}}</view>
|
||||
<image src="@/static/images/icon/plus.png" style="width: 40rpx;height: 40rpx;border-radius: 40rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
@ -254,7 +254,7 @@
|
||||
street: "",
|
||||
showPicker: false,
|
||||
status: "loadmore",
|
||||
price_order: 'procure_price_asc', //价格排序方式(升降), procure_price_asc, procure_price_desc
|
||||
price_order: 'wholesale_price_asc', //价格排序方式(升降), wholesale_price_asc, wholesale_price_desc
|
||||
// 下拉菜单
|
||||
downMenu: [{
|
||||
title: '默认',
|
||||
@ -685,8 +685,8 @@
|
||||
// this.storeParam.order = 'location' //使用距离进行排序
|
||||
this.storeParam.order = e //选择排序方式
|
||||
this.getStoreList();
|
||||
if(e=='procure_price_asc') return this.price_order = 'procure_price_desc';
|
||||
if(e=='procure_price_desc') return this.price_order = 'procure_price_asc';
|
||||
if(e=='wholesale_price_asc') return this.price_order = 'wholesale_price_desc';
|
||||
if(e=='wholesale_price_desc') return this.price_order = 'wholesale_price_asc';
|
||||
},
|
||||
backjJump() {
|
||||
uni.navigateBack({
|
||||
@ -785,7 +785,7 @@
|
||||
this.cartList = res.data.list
|
||||
this.cartList.forEach(e => {
|
||||
e.list.forEach(item => {
|
||||
this.totalMoney += item.cart_num * item.productAttr.procure_price
|
||||
this.totalMoney += item.cart_num * item.productAttr.wholesale_price
|
||||
})
|
||||
})
|
||||
this.totalMoney = this.totalMoney.toFixed(2)
|
||||
|
@ -78,8 +78,8 @@
|
||||
<view :class="{'active': storeParam.order=='sales'}" @click="set_where('sales')">销量</view>
|
||||
<!-- <view :class="{'active': storeParam.order.includes('price')}" @click="set_where(price_order)">
|
||||
<text style="margin-right: 5rpx;">价格</text>
|
||||
<image class="icon" v-if="price_order=='procure_price_asc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
|
||||
<image class="icon" v-else-if="price_order=='procure_price_desc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
|
||||
<image class="icon" v-if="price_order=='wholesale_price_asc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
|
||||
<image class="icon" v-else-if="price_order=='wholesale_price_desc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
|
||||
<image class="icon" v-else src='/static/images/horn.png'></image>
|
||||
</view> -->
|
||||
</view>
|
||||
@ -104,7 +104,7 @@
|
||||
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
|
||||
</view>
|
||||
<view class="r_btn" v-if="getAttr(item)">
|
||||
<view>¥<text style="font-size: 33rpx;">{{ getAttr(item).procure_price.split('.')[0] }}.</text>{{getAttr(item).procure_price.split('.')[1]}}</view>
|
||||
<view>¥<text style="font-size: 33rpx;">{{ getAttr(item).wholesale_price.split('.')[0] }}.</text>{{getAttr(item).wholesale_price.split('.')[1]}}</view>
|
||||
<image src="@/static/images/icon/plus.png" style="width: 40rpx;height: 40rpx;border-radius: 40rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
@ -253,7 +253,7 @@
|
||||
street: "",
|
||||
showPicker: false,
|
||||
status: "loadmore",
|
||||
price_order: 'procure_price_asc', //价格排序方式(升降), procure_price_asc, procure_price_desc
|
||||
price_order: 'wholesale_price_asc', //价格排序方式(升降), wholesale_price_asc, wholesale_price_desc
|
||||
// 下拉菜单
|
||||
downMenu: [{
|
||||
title: '默认',
|
||||
@ -681,8 +681,8 @@
|
||||
// this.storeParam.order = 'location' //使用距离进行排序
|
||||
this.storeParam.order = e //选择排序方式
|
||||
this.getStoreList();
|
||||
if(e=='procure_price_asc') return this.price_order = 'procure_price_desc';
|
||||
if(e=='procure_price_desc') return this.price_order = 'procure_price_asc';
|
||||
if(e=='wholesale_price_asc') return this.price_order = 'wholesale_price_desc';
|
||||
if(e=='wholesale_price_desc') return this.price_order = 'wholesale_price_asc';
|
||||
},
|
||||
backjJump() {
|
||||
uni.navigateBack({
|
||||
@ -780,7 +780,7 @@
|
||||
this.cartList = res.data.list
|
||||
this.cartList.forEach(e => {
|
||||
e.list.forEach(item => {
|
||||
this.totalMoney += item.cart_num * item.productAttr.procure_price
|
||||
this.totalMoney += item.cart_num * item.productAttr.wholesale_price
|
||||
})
|
||||
})
|
||||
this.totalMoney = this.totalMoney.toFixed(2)
|
||||
|
@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<view class="select_warehouse">
|
||||
<view class="wrapper flex_a_c_j_sb">
|
||||
<!-- <view class="wrapper flex_a_c_j_sb">
|
||||
<block v-for="item in goodsData" :key="item.name">
|
||||
<view class="select_item select_item1" @click="navigato(item.type)" :class="'select_item'+item.type">
|
||||
<view class="title">{{ item.name }}</view>
|
||||
<!-- <view class="iconfont icon-jiantou"></view> -->
|
||||
{{item.type}}
|
||||
<image class="img" :src="item.src"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-if="pageType==1" class="list-box-put">
|
||||
<view class="item" v-for="(item, index) in goods" :key="index">
|
||||
<view class="top">
|
||||
<view class="pictrue">
|
||||
<!-- <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">
|
||||
<image :src="item.slider_image[0]||defaultImageSRC" :lazy-load="true" @click="clickImg(item, 2, 0)"></image>
|
||||
<image :src="item.slider_image[1]||defaultImageSRC" :lazy-load="true" @click="clickImg(item, 2, 1)"></image>
|
||||
<image :src="item.slider_image[2]||defaultImageSRC" :lazy-load="true" @click="clickImg(item, 2, 2)"></image>
|
||||
<image :src="item.slider_image[0]||defaultImageSRC" :lazy-load="true"></image>
|
||||
<image :src="item.slider_image[1]||defaultImageSRC" :lazy-load="true"></image>
|
||||
<image :src="item.slider_image[2]||defaultImageSRC" :lazy-load="true"></image>
|
||||
</view>
|
||||
<view v-if="item.update" class="btn" @click="updateItemImage(item)">保存修改</view>
|
||||
</view>
|
||||
@ -87,7 +87,9 @@
|
||||
<view>刷新: 3次</view>
|
||||
</view>
|
||||
<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 class="card">
|
||||
@ -95,7 +97,9 @@
|
||||
<view class="text">请选择产品图片:</view>
|
||||
</view>
|
||||
<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 class="card">
|
||||
@ -103,7 +107,9 @@
|
||||
<view class="text">请选择产品图片:</view>
|
||||
</view>
|
||||
<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>
|
||||
@ -138,11 +144,13 @@
|
||||
<view style="text-align: center;font-weight: bold;">完善商品信息</view>
|
||||
<view style="display: flex;align-items: center;margin-top: 16rpx;">
|
||||
<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 style="display: flex;align-items: center;margin-top: 16rpx;">
|
||||
<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 style="display: flex;align-items: center;margin-top: 16rpx;">
|
||||
<view style="margin-right: 20rpx;">库存:</view>
|
||||
@ -154,7 +162,8 @@
|
||||
</view>
|
||||
<view v-if="showPutGoodsInput.trademark" style="display: flex;align-items: center;margin-top: 16rpx;">
|
||||
<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 class="search_goods_btn">
|
||||
<view class="cancel edit_btn" @click="addGoodsclose()">取消</view>
|
||||
@ -162,16 +171,17 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup :show="searchGoodsShow" @close="searchGoodsClose" :round="18" mode="center">
|
||||
<u-popup :show="searchGoodsShow" :round="18" mode="center">
|
||||
<view class="search_goods_box">
|
||||
<input type="text" v-model="searchGoodsName" class="searchGoods" placeholder="请输入商品名称">
|
||||
<view class="search_goods_btn">
|
||||
<view class="cancel edit_btn" @click="searchGoodsShow=false">取消</view>
|
||||
<view class="cancel edit_btn" @click="handCancel">取消</view>
|
||||
<view class="search edit_btn" @click="searchGoodsClose">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</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>
|
||||
</template>
|
||||
@ -184,6 +194,7 @@
|
||||
import {
|
||||
productCreate
|
||||
} from '@/api/product.js'
|
||||
|
||||
import {
|
||||
microSeachBarCode,
|
||||
microEadtProduct,
|
||||
@ -204,23 +215,19 @@
|
||||
data() {
|
||||
return {
|
||||
pageType: 1, // 当前页面显示的类型, 1为商品列表, 2为手动选择图片进行添加
|
||||
goodsData: [
|
||||
{
|
||||
goodsData: [{
|
||||
name: '搜索名称入库',
|
||||
type: 1,
|
||||
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/mingcheng.png'
|
||||
src: '/static/images/SMRK/name.png'
|
||||
},
|
||||
{
|
||||
name: '标品扫码入库',
|
||||
type: 2,
|
||||
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png'
|
||||
src: '/static/images/SMRK/bar.png'
|
||||
},
|
||||
{
|
||||
name: '非标手动入库',
|
||||
type: 3,
|
||||
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png'
|
||||
src: '/static/images/SMRK/img.png'
|
||||
}
|
||||
],
|
||||
@ -286,43 +293,37 @@
|
||||
this.mer_id = e.mer_id
|
||||
this.userInfo = this.$store.state.app.userInfo;
|
||||
if (typeof this.userInfo == 'string') this.userInfo = JSON.parse(this.userInfo);
|
||||
if(this.userInfo.mer_info.type_code=='PersonalStore'){
|
||||
this.goodsData = [{
|
||||
name: '农产品入库',
|
||||
type: 4,
|
||||
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png'
|
||||
src: '/static/images/SMRK/nong.png'
|
||||
}]
|
||||
if (e.type) {
|
||||
uni.showLoading({
|
||||
title: '正在加载中'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
this.navigato(e.type)
|
||||
}, 700)
|
||||
}
|
||||
// if(this.userInfo.mer_info.type_code=='PersonalStore'){
|
||||
// this.goodsData = [{
|
||||
// name: '农产品入库',
|
||||
// type: 4,
|
||||
// // src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png'
|
||||
// src: '/static/images/SMRK/nong.png'
|
||||
// }]
|
||||
// }
|
||||
},
|
||||
onShow() {
|
||||
|
||||
console.log('show')
|
||||
},
|
||||
methods: {
|
||||
addGoods(item={}) {
|
||||
item = JSON.parse(JSON.stringify(item));
|
||||
// if(this.isNullImage(item.image)||
|
||||
// ( this.isNullImage(item.slider_image[0]) && this.isNullImage(item.slider_image[1]) && this.isNullImage(item.slider_image[2]) )){
|
||||
// return Toast('请先上传商品图片后再加入店铺');
|
||||
// }
|
||||
// if(item.update) return Toast('请保存修改后再添加');
|
||||
this.putGoods.id = item.id;
|
||||
this.putGoods.price = '';
|
||||
this.putGoods.stock = '';
|
||||
this.putGoods.store_name = item.store_name;
|
||||
Object.keys(this.showPutGoodsInput).forEach((key)=>{
|
||||
if(item[key]==null||item[key]==undefined||item[key]==''){
|
||||
this.showPutGoodsInput[key] = true;
|
||||
this.putGoods[key] = '';
|
||||
}
|
||||
else {
|
||||
this.showPutGoodsInput[key]=false;
|
||||
this.putGoods[key] = item[key];
|
||||
}
|
||||
handCancel() {
|
||||
uni.redirectTo({
|
||||
url: '/pages/product/list/index'
|
||||
})
|
||||
},
|
||||
addGoods(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${this.mer_id}&&goodsInfoId=${item.id}&&name=${this.searchGoodsName}`
|
||||
})
|
||||
this.initShop(item);
|
||||
// this.addGoodsShow = true
|
||||
// this.item = item
|
||||
},
|
||||
initShop(item) {
|
||||
if (item.spec == '' || item.spec == undefined || item.spec == null) {
|
||||
@ -541,8 +542,7 @@
|
||||
console.log('导入出错', err);
|
||||
this.addGoodsShow = false;
|
||||
});
|
||||
}
|
||||
else micro_product_import(this.putGoods).then(e => {
|
||||
} else micro_product_import(this.putGoods).then(e => {
|
||||
console.log('导入错误', e);
|
||||
if (e.status == 200) {
|
||||
Toast(e.data.msg)
|
||||
@ -617,13 +617,13 @@
|
||||
}
|
||||
},
|
||||
navigato(type) {
|
||||
if (type === 1) {
|
||||
if (type == 1) {
|
||||
this.searchGoodsName = '';
|
||||
this.searchGoodsShow = true;
|
||||
this.pageType = 1;
|
||||
} else if (type == 2) {
|
||||
this.scanCode();
|
||||
this.pageType = 1;
|
||||
// this.pageType = 1;
|
||||
} else {
|
||||
// this.photograph();
|
||||
// this.pageType = 2;
|
||||
@ -639,8 +639,21 @@
|
||||
self.seachBarCode(res.result)
|
||||
},
|
||||
fail(res) {
|
||||
// console.log(res);
|
||||
uni.redirectTo({
|
||||
url: '/pages/product/list/index'
|
||||
})
|
||||
// uni.showLoading({
|
||||
// title: '加载中',
|
||||
// mask: true
|
||||
// })
|
||||
// uni.navigateBack()
|
||||
},
|
||||
// complete() {
|
||||
// uni.showLoading({
|
||||
// title: '加载中',
|
||||
// mask: true
|
||||
// })
|
||||
// }
|
||||
})
|
||||
},
|
||||
isStartsWith6Or06(str) {
|
||||
@ -648,6 +661,7 @@
|
||||
return regex.test(str);
|
||||
},
|
||||
async seachBarCode(code) {
|
||||
console.log("laizheer;e1")
|
||||
if (code.length < 12) {
|
||||
return Toast('条形码长度不正确, 请重试!')
|
||||
}
|
||||
@ -712,7 +726,8 @@
|
||||
},
|
||||
navToAdd() {
|
||||
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}`;
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
@ -726,7 +741,8 @@
|
||||
const data = getStorage('addGoodsFormData');
|
||||
if (data && data.product_id) {
|
||||
let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData',
|
||||
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils'];
|
||||
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils'
|
||||
];
|
||||
waitDeleteData.forEach(item => {
|
||||
if (getStorage(item)) {
|
||||
removeStorage(item);
|
||||
@ -754,6 +770,15 @@
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onBackPress: function(e) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/product/list/index'
|
||||
})
|
||||
// uni.navigateBack()
|
||||
// return false
|
||||
// this.showlay = true
|
||||
// return this.go;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -821,12 +846,15 @@
|
||||
.select_item1 {
|
||||
background: linear-gradient(to right, #ffba00, #ff9000) !important;
|
||||
}
|
||||
|
||||
.select_item2 {
|
||||
background: linear-gradient(to right, #459eff, #0a60ff) !important;
|
||||
}
|
||||
|
||||
.select_item3 {
|
||||
background: linear-gradient(to right, #ff7245, #ff3f02) !important;
|
||||
}
|
||||
|
||||
.select_item4 {
|
||||
background: linear-gradient(to right, #2be45d, #02bb34) !important;
|
||||
}
|
||||
@ -1301,6 +1329,7 @@
|
||||
|
||||
.list-box-put {
|
||||
padding-bottom: 30rpx;
|
||||
|
||||
.item {
|
||||
width: 694rpx;
|
||||
margin: 0 auto;
|
||||
@ -1330,6 +1359,7 @@
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-size: 24rpx;
|
||||
margin: 0 auto;
|
||||
@ -1346,6 +1376,7 @@
|
||||
|
||||
.text-info {
|
||||
flex: 1;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
|
||||
@ -1407,16 +1438,19 @@
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
border-radius: 14rpx;
|
||||
|
||||
.card-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.img-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.img {
|
||||
width: 210rpx;
|
||||
height: 210rpx;
|
||||
@ -1425,13 +1459,14 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.img-list2 {
|
||||
justify-content: left;
|
||||
|
||||
.img {
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
@ -864,6 +864,7 @@
|
||||
},
|
||||
//获取订单数据
|
||||
getindex() {
|
||||
let that = this;
|
||||
const data = {
|
||||
product_type: this.where1.product_type
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
<view class="right_goods_msg">
|
||||
<view class="num">
|
||||
<text style="margin-right: 5rpx;">¥</text>
|
||||
<text>{{$procure_price(item)}}</text>
|
||||
<text>{{$wholesale_price(item)}}</text>
|
||||
</view>
|
||||
<!-- <view class="add_goods" @click="getGoodsDetails(item)">加入购物单</view> -->
|
||||
</view>
|
||||
|
@ -58,7 +58,7 @@
|
||||
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}件</text>
|
||||
</view>
|
||||
<view class='money acea-row row-middle'>
|
||||
<text>¥{{goods.productAttr.procure_price}}</text>
|
||||
<text>¥{{goods.productAttr.wholesale_price}}</text>
|
||||
<view v-if="goods.productAttr.show_svip_price" class="vipImg">
|
||||
<image src="/static/images/svip.png"></image>
|
||||
</view>
|
||||
@ -238,7 +238,7 @@
|
||||
cartAttr: false,
|
||||
productAttr: [],
|
||||
productSelect: {
|
||||
procure_price: ''
|
||||
wholesale_price: ''
|
||||
}
|
||||
},
|
||||
isOpen: false, //是否打开属性组件
|
||||
@ -428,7 +428,7 @@
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product
|
||||
.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
@ -448,7 +448,7 @@
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", goods.product.image);
|
||||
this.$set(this.attr.productSelect, "price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
this.$set(this.attr.productSelect, "stock", 0);
|
||||
this.$set(this.attr.productSelect, "unique", "");
|
||||
@ -464,7 +464,7 @@
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", goods.product.image);
|
||||
this.$set(this.attr.productSelect, "price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
this.$set(this.attr.productSelect, "stock", goods.product.stock);
|
||||
this.$set(this.attr.productSelect, "unique", goods.product.unique || "");
|
||||
@ -476,7 +476,7 @@
|
||||
this.$set(this.attr.productSelect, "store_name", goods.product.store_name);
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
@ -551,7 +551,7 @@
|
||||
if (productSelect && productSelect.stock > 0) {
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this, "uniqueValue", productSelect.unique);
|
||||
@ -560,7 +560,7 @@
|
||||
} else {
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "stock", 0);
|
||||
this.$set(this.attr.productSelect, "unique", "");
|
||||
this.$set(this.attr.productSelect, "cart_num", 0);
|
||||
@ -849,7 +849,7 @@
|
||||
// 总金额 //总数
|
||||
el.list.forEach(e => {
|
||||
if (e.check) {
|
||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
|
||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.wholesale_price, e.cart_num))
|
||||
totalNum += +e.cart_num
|
||||
}
|
||||
})
|
||||
|
@ -52,7 +52,7 @@
|
||||
v-if="goods.product.once_max_count>0">,最多{{goods.product.once_max_count}}件</text>
|
||||
</view>
|
||||
<view class='money acea-row row-middle'>
|
||||
<text>¥{{goods.productAttr.procure_price}}</text>
|
||||
<text>¥{{goods.productAttr.wholesale_price}}</text>
|
||||
<view v-if="goods.productAttr.show_svip_price" class="vipImg">
|
||||
<image src="/static/images/svip.png"></image>
|
||||
</view>
|
||||
@ -232,7 +232,7 @@
|
||||
cartAttr: false,
|
||||
productAttr: [],
|
||||
productSelect: {
|
||||
procure_price: ''
|
||||
wholesale_price: ''
|
||||
}
|
||||
},
|
||||
isOpen: false, //是否打开属性组件
|
||||
@ -422,7 +422,7 @@
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product
|
||||
.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
@ -442,7 +442,7 @@
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", goods.product.image);
|
||||
this.$set(this.attr.productSelect, "price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
this.$set(this.attr.productSelect, "stock", 0);
|
||||
this.$set(this.attr.productSelect, "unique", "");
|
||||
@ -458,7 +458,7 @@
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", goods.product.image);
|
||||
this.$set(this.attr.productSelect, "price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
this.$set(this.attr.productSelect, "stock", goods.product.stock);
|
||||
this.$set(this.attr.productSelect, "unique", goods.product.unique || "");
|
||||
@ -470,7 +470,7 @@
|
||||
this.$set(this.attr.productSelect, "store_name", goods.product.store_name);
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
@ -545,7 +545,7 @@
|
||||
if (productSelect && productSelect.stock > 0) {
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this, "uniqueValue", productSelect.unique);
|
||||
@ -554,7 +554,7 @@
|
||||
} else {
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "stock", 0);
|
||||
this.$set(this.attr.productSelect, "unique", "");
|
||||
this.$set(this.attr.productSelect, "cart_num", 0);
|
||||
@ -836,7 +836,7 @@
|
||||
// 总金额 //总数
|
||||
el.list.forEach(e => {
|
||||
if (e.check) {
|
||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
|
||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.wholesale_price, e.cart_num))
|
||||
totalNum += +e.cart_num
|
||||
}
|
||||
})
|
||||
|
@ -52,7 +52,7 @@
|
||||
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}件</text>
|
||||
</view>
|
||||
<view class='money acea-row row-middle'>
|
||||
<text>¥{{goods.productAttr.procure_price}}</text>
|
||||
<text>¥{{goods.productAttr.wholesale_price}}</text>
|
||||
<view v-if="goods.productAttr.show_svip_price" class="vipImg">
|
||||
<image src="/static/images/svip.png"></image>
|
||||
</view>
|
||||
@ -232,7 +232,7 @@
|
||||
cartAttr: false,
|
||||
productAttr: [],
|
||||
productSelect: {
|
||||
procure_price: ''
|
||||
wholesale_price: ''
|
||||
}
|
||||
},
|
||||
isOpen: false, //是否打开属性组件
|
||||
@ -424,7 +424,7 @@
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product
|
||||
.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
@ -444,7 +444,7 @@
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", goods.product.image);
|
||||
this.$set(this.attr.productSelect, "price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
this.$set(this.attr.productSelect, "stock", 0);
|
||||
this.$set(this.attr.productSelect, "unique", "");
|
||||
@ -460,7 +460,7 @@
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", goods.product.image);
|
||||
this.$set(this.attr.productSelect, "price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
this.$set(this.attr.productSelect, "stock", goods.product.stock);
|
||||
this.$set(this.attr.productSelect, "unique", goods.product.unique || "");
|
||||
@ -472,7 +472,7 @@
|
||||
this.$set(this.attr.productSelect, "store_name", goods.product.store_name);
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
@ -547,7 +547,7 @@
|
||||
if (productSelect && productSelect.stock > 0) {
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this, "uniqueValue", productSelect.unique);
|
||||
@ -556,7 +556,7 @@
|
||||
} else {
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
|
||||
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
|
||||
this.$set(this.attr.productSelect, "stock", 0);
|
||||
this.$set(this.attr.productSelect, "unique", "");
|
||||
this.$set(this.attr.productSelect, "cart_num", 0);
|
||||
@ -844,7 +844,7 @@
|
||||
// 总金额 //总数
|
||||
el.list.forEach(e => {
|
||||
if (e.check) {
|
||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
|
||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.wholesale_price, e.cart_num))
|
||||
totalNum += +e.cart_num
|
||||
}
|
||||
})
|
||||
|
@ -933,8 +933,8 @@
|
||||
});
|
||||
getOtherOrderDetail(that.order_id).then(res => {
|
||||
uni.hideLoading();
|
||||
res.data.orderProduct[0].cart_info.productAttr.price = res.data.orderProduct[0].cart_info.productAttr.procure_price;
|
||||
res.data.orderProduct[0].cart_info.product.price = res.data.orderProduct[0].cart_info.productAttr.procure_price;
|
||||
res.data.orderProduct[0].cart_info.productAttr.price = res.data.orderProduct[0].cart_info.productAttr.wholesale_price;
|
||||
res.data.orderProduct[0].cart_info.product.price = res.data.orderProduct[0].cart_info.productAttr.wholesale_price;
|
||||
that.$set(that, 'orderInfo', res.data);
|
||||
that.orderInfo.take = res.data.take;
|
||||
that.$set(that, 'cartInfo', res.data.orderProduct);
|
||||
|
@ -1,66 +1,73 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="v-navbar">
|
||||
<view v-if="!isWeixin" class="v-navbar">
|
||||
<u-navbar title="提货付款" :safeAreaInsetTop="false" :fixed="false" @leftClick="leftClick" bgColor="transparent"
|
||||
leftIconColor="#fff" :titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
|
||||
leftIconColor="#333" :titleStyle="{color:'#333',fontWeight:'bold',fontSize:'32rpx'}">
|
||||
</u-navbar>
|
||||
</view>
|
||||
<view v-if="merchantInfo && !isEmpty">
|
||||
<view class="v-desc">
|
||||
<view>
|
||||
<view class="v-desc-main">确认提货付款</view>
|
||||
<view class="v-desc-sub">{{merchantInfo.merchant.mer_name}}</view>
|
||||
</view>
|
||||
<u-image :showLoading="true" :src="merchantInfo.merchant.mer_avatar" width="182rpx" height="182rpx"
|
||||
:radius="10" />
|
||||
<view style="height: 50rpx;"></view>
|
||||
<view class="wrap">
|
||||
<view class="shop">
|
||||
<image src="@/static/shop_logo.webp" style="width: 62rpx;height: 54rpx;" />
|
||||
<text class="shop-name" v-if="mer_name">{{mer_name||''}}</text>
|
||||
</view>
|
||||
|
||||
<!-- 付款金额 -->
|
||||
<view class="v-con">
|
||||
<view class="v-con-text">付款金额</view>
|
||||
<view class="v-con-input" style="margin-right: 10px;">
|
||||
<text style="color: #303133;font-size:46rpx;">¥</text>
|
||||
<u--input type="digit" fontSize="23" v-model="cartForm.total_amount" placeholder="请输入金额"
|
||||
border="none" placeholderStyle="color:#999;font-size:30rpx" @input="validateDecimal">
|
||||
<view class="v-con-text">订单金额</view>
|
||||
<view class="v-con-input" @click="handleOpenKeyboard">
|
||||
<text style="color: #303133;font-size:32rpx;">¥</text>
|
||||
<u--input type="text" fontSize="23" height="112rpx" placeholder="请输入金额" border="none" readonly
|
||||
v-model="cartForm.total_amount" placeholderStyle="color:#999;font-size:32rpx">
|
||||
</u--input>
|
||||
<view class="placeholder"></view>
|
||||
</view>
|
||||
|
||||
<view class="v-wrap" v-if="cartForm.total_amount">
|
||||
<view class="v-wrap-money">
|
||||
<text class="icon">¥</text>
|
||||
<text class="num">{{cartForm.total_amount}}</text>
|
||||
<view class="v-con-group">
|
||||
<view class="v-con-group-title">
|
||||
<view class="v-con-group-title-left">套餐详情</view>
|
||||
<view class="v-con-group-title-right" @click.stop="handleOpen">
|
||||
<text>{{isOpen?'折叠':'展开'}}</text>
|
||||
<u-icon :name="isOpen?'arrow-down' : 'arrow-right'" size="15"></u-icon>
|
||||
</view>
|
||||
<view class="v-wrap-desc">
|
||||
<view class="v-wrap-desc-main">实物提货券</view>
|
||||
<view class="v-wrap-desc-sub">即买即用</view>
|
||||
</view>
|
||||
<scroll-view scroll-y>
|
||||
<view class="v-con-group-list" :style="{'max-height':isOpen?'400rpx':'0'}">
|
||||
<block v-for="(item,indx) in merchantInfo" :key="indx">
|
||||
<view class="v-con-group-list-item">
|
||||
<image :src="item.image" :showLoading="true" style="width:86rpx;height:86rpx;" />
|
||||
<text class="line1">{{item.store_name}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="v-btn-wrap">
|
||||
<view class="v-btn" @click="submitOrder">提交订单</view>
|
||||
<view class="v-btn-wrap" @click="cartForm.total_amount?submitOrder():null">
|
||||
<view class="v-btn">{{Number(cartForm.total_amount||0).toFixed(2)}}元 确认支付</view>
|
||||
</view>
|
||||
|
||||
<!-- 登陆 -->
|
||||
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun">
|
||||
</authorize>
|
||||
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun" />
|
||||
</view>
|
||||
|
||||
<!-- 无商户信息提示 -->
|
||||
<view v-else class="empty">
|
||||
<image src="/static/images/no_thing.png"></image>
|
||||
<text style="margin-top: 60rpx;">{{tips}}</text>
|
||||
<!-- 登陆 -->
|
||||
<authorize :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth" @authColse="authColse"
|
||||
@onLoadFun="onLoadFun">
|
||||
<!-- <view class="empty">
|
||||
<authorize v-show="!isWeixin" ref="authRef" :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth"
|
||||
@authColse="authColse" @onLoadFun="onLoadFun">
|
||||
</authorize>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 键盘 -->
|
||||
<popups ref="popups" @confirm="handleConfirm" @clear="handleClear" @change="handleChange"></popups>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var that;
|
||||
|
||||
import {
|
||||
getProductInfo,
|
||||
getProductInfo1,
|
||||
addCart,
|
||||
orderCheck
|
||||
} from "@/api/payment.js";
|
||||
@ -69,17 +76,23 @@
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import authorize from '@/components/Authorize';
|
||||
import { Toast } from "../../libs/uniApi";
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi";
|
||||
import popups from "@/components/popups/index.vue";
|
||||
export default {
|
||||
components: {
|
||||
authorize
|
||||
authorize,
|
||||
popups
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isEmpty: false,
|
||||
isEmpty: true,
|
||||
// isWeixin: this.$wechat.isWeixin(),
|
||||
isWeixin: false,
|
||||
cartForm: {
|
||||
product_id: '',
|
||||
product_attr_unique: '',
|
||||
@ -103,29 +116,67 @@ import { Toast } from "../../libs/uniApi";
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
mer_id: '',
|
||||
tips: '暂未登陆~'
|
||||
changeTxt: '展开',
|
||||
isOpen: false,
|
||||
keyBoardShow: false,
|
||||
mer_name: ''
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(opt) {
|
||||
that = this;
|
||||
this.mer_id = opt.mer_id;
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (!this.isLogin) {
|
||||
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true;
|
||||
if (this.isWeixin) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.authRef.toWecahtAuth();
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.checkForm.cart_id = [];
|
||||
this.getProductInfoByMerid(this.mer_id);
|
||||
this.getProductInfoByMerid();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validateDecimal(event) {
|
||||
let val = (this.cartForm.total_amount.match(/^\d*(\.?\d{0,2})/g)[0]) || ''
|
||||
// 打开键盘
|
||||
handleOpenKeyboard() {
|
||||
if (!this.isLogin) {
|
||||
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true;
|
||||
if (this.isWeixin) {
|
||||
this.$nextTick(() => {
|
||||
this.cartForm.total_amount = val;
|
||||
this.$refs.authRef.toWecahtAuth();
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$refs.popups.handleOpen('money');
|
||||
}
|
||||
},
|
||||
|
||||
// 键盘提交
|
||||
handleConfirm(e) {
|
||||
if (!e) return;
|
||||
this.cartForm.total_amount = e;
|
||||
this.submitOrder();
|
||||
},
|
||||
|
||||
// 清空
|
||||
handleClear() {
|
||||
this.cartForm.total_amount = '';
|
||||
this.merchantInfo = [];
|
||||
},
|
||||
|
||||
// 输入数字
|
||||
handleChange(e) {
|
||||
this.cartForm.total_amount = e;
|
||||
uni.$u.debounce(that.getProductInfoByMerid, 200)
|
||||
},
|
||||
|
||||
leftClick(e) {
|
||||
@ -133,60 +184,94 @@ import { Toast } from "../../libs/uniApi";
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
},
|
||||
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
this.isShowAuth = e;
|
||||
},
|
||||
|
||||
onLoadFun() {
|
||||
this.getProductInfoByMerid(this.mer_id);
|
||||
this.isShowAuth = false;
|
||||
},
|
||||
|
||||
// 提交订单
|
||||
submitOrder() {
|
||||
async submitOrder() {
|
||||
if (!this.cartForm.total_amount) {
|
||||
return this.$util.Tips({
|
||||
title: "请输入付款金额!"
|
||||
})
|
||||
}
|
||||
// 订单
|
||||
this.cartForm.product_id = this.merchantInfo.product_id;
|
||||
this.cartForm.product_type = this.merchantInfo.product_type;
|
||||
this.cartForm.product_attr_unique = this.merchantInfo.sku[''].unique;
|
||||
|
||||
let that = this;
|
||||
addCart(this.cartForm).then(res => {
|
||||
// 购物车ID
|
||||
// 循环加入购物车
|
||||
for (var i = 0; i < that.merchantInfo.length; i++) {
|
||||
let info = {
|
||||
product_id: that.merchantInfo[i].product_id,
|
||||
product_attr_unique: that.merchantInfo[i].unique,
|
||||
cart_num: that.merchantInfo[i].num,
|
||||
is_new: 1,
|
||||
product_type: 0,
|
||||
source: 999,
|
||||
total_amount: that.cartForm.total_amount
|
||||
};
|
||||
|
||||
try {
|
||||
let res = await addCart(info);
|
||||
that.checkForm.cart_id.push(res.data.cart_id);
|
||||
} catch (e) {
|
||||
return that.$util.Tips({
|
||||
title: err.message || err.msg || err
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (that.checkForm.cart_id && that.checkForm.cart_id.length > 0) {
|
||||
orderCheck(that.checkForm).then(res1 => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/payment/settlement?cartId=" + this.checkForm
|
||||
.cart_id + "&money=" + this.cartForm.total_amount +
|
||||
"&merName=" + this.merchantInfo.merchant.mer_name,
|
||||
url: "/pages/payment/settlement",
|
||||
success: (res) => {
|
||||
res.eventChannel.emit('datas', res1.data.platformConsumption);
|
||||
uni.setStorageSync('datas', {
|
||||
platformConsumption: res1.data.platformConsumption ||
|
||||
[],
|
||||
productData: that.merchantInfo,
|
||||
checkForm: that.checkForm,
|
||||
money: that.cartForm.total_amount,
|
||||
merName: that.mer_name,
|
||||
money: that.cartForm.total_amount,
|
||||
key: res1.data.key
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
Toast(err.message || err)
|
||||
});
|
||||
}).catch((err) => {
|
||||
this.$util.Tips({
|
||||
title: err.message || err.msg || err
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
getProductInfoByMerid(merid) {
|
||||
let that = this;
|
||||
getProductInfo({
|
||||
mer_id: merid
|
||||
// 折叠商品
|
||||
handleOpen() {
|
||||
this.isOpen = !this.isOpen;
|
||||
},
|
||||
|
||||
// 根据店铺获取商品
|
||||
getProductInfoByMerid(merid, money) {
|
||||
getProductInfo1({
|
||||
mer_id: that.mer_id,
|
||||
money: that.cartForm.total_amount
|
||||
}).then(res => {
|
||||
this.merchantInfo = res.data;
|
||||
if (!that.cartForm.total_amount) {
|
||||
this.mer_name = res.data.merchant;
|
||||
} else {
|
||||
that.merchantInfo = res.data.list;
|
||||
}
|
||||
}).catch((err) => {
|
||||
this.tips = err.message || err.smg || err;
|
||||
this.$util.Tips({
|
||||
that.$util.Tips({
|
||||
title: err.message || err.msg || err
|
||||
}, () => {
|
||||
|
||||
})
|
||||
// #ifdef APP
|
||||
setTimeout(() => {
|
||||
@ -200,49 +285,6 @@ import { Toast } from "../../libs/uniApi";
|
||||
that.isEmpty = true;
|
||||
// #endif
|
||||
})
|
||||
},
|
||||
|
||||
// 图片保存
|
||||
handleSavePic() {
|
||||
// 获取要保存的图片路径或URL
|
||||
let imageUrl = this.qrcodeUrl; // 这里使用了网络上的图片作为示例
|
||||
|
||||
// #ifdef H5
|
||||
var a = document.createElement("a");
|
||||
a.download = imageUrl;
|
||||
a.href = imageUrl;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
a.remove();
|
||||
// #endif
|
||||
|
||||
// #ifndef H5
|
||||
let that = this;
|
||||
uni.downloadFile({
|
||||
url: imageUrl,
|
||||
success(res) {
|
||||
if (res.statusCode === 200) {
|
||||
let tempFilePath = res.tempFilePath; // 临时文件路径
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: tempFilePath,
|
||||
success() {
|
||||
return that.$util.Tips({
|
||||
title: '图片已保存至相册!'
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
console.error('保存失败', err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.error('下载失败', res.statusCode);
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
console.error('下载失败', err);
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -250,11 +292,11 @@ import { Toast } from "../../libs/uniApi";
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #FCDFAD;
|
||||
background-color: #F9F9F9;
|
||||
}
|
||||
|
||||
.empty {
|
||||
margin: 130rpx 0 150rpx;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
|
||||
image,
|
||||
@ -274,7 +316,7 @@ import { Toast } from "../../libs/uniApi";
|
||||
.container {
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/c582c202402291601584806.webp");
|
||||
// background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/c582c202402291601584806.webp");
|
||||
background-size: 100% auto;
|
||||
background-repeat: no-repeat;
|
||||
padding-top: var(--status-bar-height);
|
||||
@ -304,34 +346,56 @@ import { Toast } from "../../libs/uniApi";
|
||||
}
|
||||
}
|
||||
|
||||
.wrap {
|
||||
margin: 0 52rpx 0 54rpx;
|
||||
}
|
||||
|
||||
.shop {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 54rpx;
|
||||
|
||||
text {
|
||||
margin-left: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.v-con {
|
||||
position: absolute;
|
||||
top: 436rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 710rpx;
|
||||
height: 680rpx;
|
||||
background: linear-gradient(180deg, #FEB992 0%, #FFFFFF 31%, #FFFFFF 100%);
|
||||
border-radius: 20rpx;
|
||||
margin: 0 auto;
|
||||
box-shadow: 0 -4rpx 0px 0px #fff;
|
||||
padding: 53rpx 30rpx 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 0 auto 150rpx;
|
||||
|
||||
.v-con-text {
|
||||
margin-bottom: 60rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #2E2E2E;
|
||||
line-height: 16rpx;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.v-con-input {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 83rpx;
|
||||
padding: 0 0 40rpx 12rpx;
|
||||
height: 112rpx;
|
||||
margin-bottom: 32rpx;
|
||||
border-bottom: 1rpx solid #D6D6D6;
|
||||
|
||||
/deep/.uni-input-input {
|
||||
height: 112rpx;
|
||||
font-weight: bold;
|
||||
font-size: 72rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.v-wrap {
|
||||
@ -340,9 +404,6 @@ import { Toast } from "../../libs/uniApi";
|
||||
padding-left: 20rpx;
|
||||
width: 666rpx;
|
||||
height: 210rpx;
|
||||
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/2f9c2202402291652415355.webp");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
.v-wrap-money {
|
||||
display: flex;
|
||||
@ -377,37 +438,92 @@ import { Toast } from "../../libs/uniApi";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.v-con-group {
|
||||
.v-con-group-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.v-con-group-title-left {
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.v-con-group-title-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
text {
|
||||
margin-right: 18rpx;
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.v-con-group-list {
|
||||
transition: max-height linear .1s;
|
||||
|
||||
.v-con-group-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 14rpx;
|
||||
|
||||
text {
|
||||
margin-left: 30rpx;
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.v-btn-wrap {
|
||||
position: fixed;
|
||||
z-index: 11;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
background-color: #FDD6A6;
|
||||
|
||||
.v-btn {
|
||||
width: 650rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
background: #FF8056;
|
||||
box-shadow: 0rpx 3rpx 3rpx 1rpx rgba(255, 94, 12, 0.4);
|
||||
border-radius: 55rpx 55rpx 55rpx 55rpx;
|
||||
border: 1rpx solid #FF8056;
|
||||
font-weight: 600;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background: #40AE36;
|
||||
border-radius: 10rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
|
||||
&:active {
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
// position: fixed;
|
||||
// z-index: 11;
|
||||
// bottom: 0;
|
||||
// left: 0;
|
||||
// display: flex;
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
// width: 100%;
|
||||
// height: 240rpx;
|
||||
// background-color: #FDD6A6;
|
||||
|
||||
// .v-btn {
|
||||
// width: 650rpx;
|
||||
// height: 100rpx;
|
||||
// line-height: 100rpx;
|
||||
// background: #FF8056;
|
||||
// box-shadow: 0rpx 3rpx 3rpx 1rpx rgba(255, 94, 12, 0.4);
|
||||
// border-radius: 55rpx 55rpx 55rpx 55rpx;
|
||||
// border: 1rpx solid #FF8056;
|
||||
// font-weight: 600;
|
||||
// font-size: 32rpx;
|
||||
// color: #FFFFFF;
|
||||
// text-align: center;
|
||||
|
||||
// &:active {
|
||||
// opacity: .8;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
</style>
|
@ -27,7 +27,8 @@
|
||||
<block v-for="(item,indx) in paymentData" :key="indx">
|
||||
<view class="payment-detail-con-item">
|
||||
<view class="item-desc">
|
||||
<text class="item-desc-name">{{item.come_msg}}</text>
|
||||
<text class="item-desc-name line1" style="width:280rpx;">{{item.come_msg}}</text>
|
||||
<text style="width:180rpx;">{{item.pay_type_name}}</text>
|
||||
<text class="item-desc-price"
|
||||
:style="{'color':item.msg=='收入'?'#EEC102':''}"><text>{{item.msg == '支出'?'-':'+'}}</text>{{item.pay_price}}</text>
|
||||
</view>
|
||||
@ -130,7 +131,13 @@
|
||||
|
||||
pickerConfirm(e) {
|
||||
const date = new Date(e.value).format('yyyy-MM-dd');
|
||||
if (this.pickStartShow) this.searchParams.section_startTime = date;
|
||||
if (this.pickStartShow) {
|
||||
this.searchParams.section_startTime = date;
|
||||
this.searchParams.page = 1;
|
||||
this.paymentData = [];
|
||||
this.loadend = false;
|
||||
this.getData();
|
||||
}
|
||||
if (this.pickEndShow) {
|
||||
if (!this.searchParams.section_startTime)
|
||||
this.searchParams.section_startTime = date;
|
||||
|
@ -1,100 +1,21 @@
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #FCE9B2;
|
||||
}
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/9cf05202402291000026355.webp");
|
||||
background-size: 100% auto;
|
||||
background-repeat: no-repeat;
|
||||
padding-top: var(--status-bar-height);
|
||||
|
||||
.v-navbar {
|
||||
margin-bottom: 54rpx;
|
||||
}
|
||||
|
||||
.v-desc {
|
||||
position: absolute;
|
||||
top: 230rpx;
|
||||
left: 40rpx;
|
||||
|
||||
.v-desc-main {
|
||||
margin-bottom: 30rpx;
|
||||
font-weight: 600;
|
||||
font-size: 42rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.v-desc-sub {
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.v-qrcode {
|
||||
position: absolute;
|
||||
top: 475rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.v-btn {
|
||||
position: absolute;
|
||||
top: 1173rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 690rpx;
|
||||
height: 100rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 3rpx 12rpx 1rpx rgba(255, 94, 12, 0.32);
|
||||
border-radius: 55rpx 55rpx 55rpx 55rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #FF5E0C;
|
||||
line-height: 16rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
margin-top: 2rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="v-navbar">
|
||||
<u-navbar title="提货付款" :autoBack="true" :fixed="false" bgColor="transparent" leftIconColor="#fff"
|
||||
<u-navbar title="商户收款" :autoBack="true" :fixed="false" bgColor="transparent" leftIconColor="#fff"
|
||||
:titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
|
||||
</u-navbar>
|
||||
</view>
|
||||
|
||||
<!-- <view class="v-desc">
|
||||
<view class="v-desc-main">扫描二维码</view>
|
||||
<view class="v-desc-sub">即可进入面对面付款</view>
|
||||
</view> -->
|
||||
<view style="display:flex;justify-content:center;flex-direction:column;align-items:center;">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/82347202403181619505958.png"
|
||||
style="width:350rpx;height:118rpx;" mode="widthFix" />
|
||||
<text class="shop_name">店铺:{{userInfo.mer_info.mer_name || '-'}}</text>
|
||||
</view>
|
||||
|
||||
<view class="v-qrcode">
|
||||
<u-image width="540rpx" height="540rpx" :showLoading="true" :src="img" class="v-qrcode-img"></u-image>
|
||||
<view style="color: #FF5E0C;text-align: center;" v-if="userInfo.mer_info">{{userInfo.mer_info.mer_name}}</view>
|
||||
<u-image width="490rpx" height="490rpx" :showLoading="true" :src="img" class="v-qrcode-img"></u-image>
|
||||
</view>
|
||||
|
||||
<view class="v-btn" @click="handleSavePic">
|
||||
<image src="../../static/images/download_yellow.webp" />
|
||||
<text>保存二维码</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -121,9 +42,19 @@
|
||||
// 获取二维码
|
||||
getQrcode(merid) {
|
||||
qrcode({
|
||||
mer_id: merid || 7
|
||||
mer_id: merid
|
||||
}).then(res => {
|
||||
if (!res.data.count || res.data.count == 0) {
|
||||
this.$util.Tips({
|
||||
title: "您还没有添加商品,请添加!"
|
||||
}, () => {
|
||||
uni.redirectTo({
|
||||
url: "/pages/product/addGood/addGood?mer_id=" + merid
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.img = res.data.url;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@ -174,3 +105,52 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #40AE36;
|
||||
}
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
background-size: 100% auto;
|
||||
background-repeat: no-repeat;
|
||||
padding-top: var(--status-bar-height);
|
||||
|
||||
.v-navbar {
|
||||
margin-bottom: 54rpx;
|
||||
}
|
||||
|
||||
.v-qrcode {
|
||||
width: 650rpx;
|
||||
height: 650rpx;
|
||||
margin-top: 100rpx;
|
||||
margin: 100rpx auto 0;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.shop_name {
|
||||
margin-top: 30rpx;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.v-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 690rpx;
|
||||
height: 100rpx;
|
||||
margin: 70rpx auto 0;
|
||||
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -10,20 +10,21 @@
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
</view>
|
||||
|
||||
<block v-for="(item,indx) in productData" :key="indx">
|
||||
<view class="product-item">
|
||||
<view class="img-box">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/89ad3202402292014108303.jpg" width="170rpx"
|
||||
height="180rpx" />
|
||||
<image :src="item.image" width="170rpx" height="180rpx" />
|
||||
</view>
|
||||
<view class="content event_content">
|
||||
<view class="name line1">
|
||||
{{payForm.money}}元实物提货券
|
||||
{{item.store_name}}
|
||||
</view>
|
||||
<view style="margin-top: 30rpx;color: #FF5C2D;">
|
||||
¥{{payForm.money}}
|
||||
¥{{item.price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -44,9 +45,6 @@
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{userInfo.now_money}}
|
||||
</block>
|
||||
<block v-else-if="item.value == 'merBalance'">
|
||||
{{moneyInfo.extract_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
@ -63,9 +61,6 @@
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{userInfo.now_money}}
|
||||
</block>
|
||||
<block v-else-if="item.value == 'merBalance'">
|
||||
{{moneyInfo.extract_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
@ -106,6 +101,13 @@
|
||||
<view class='settlement' :class='couponData.status != "noAddress" ? "" : "disabled"' style='z-index:100'
|
||||
@tap="SubOrder">{{couponData.status != "noAddress" ? '提交订单':'选择地址'}}</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 支付密码 键盘 -->
|
||||
<popups ref="popups" :isPay="true" @confirm="handleConfirm" @clear="handleClear" @change="handleChange" />
|
||||
|
||||
<!-- 密码错误事件处理 -->
|
||||
<payPwd ref="payPwd" @left="handleLeft" @right="handleRight"></payPwd>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -126,7 +128,6 @@
|
||||
} from '@/api/order.js';
|
||||
import {
|
||||
getUserInfo,
|
||||
getAdminApplyAPI
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
openPaySubscribe
|
||||
@ -141,8 +142,17 @@
|
||||
orderPay,
|
||||
orderCheck
|
||||
} from "@/api/payment.js";
|
||||
import {
|
||||
verifyPwd
|
||||
} from '@/api/order.js';
|
||||
import payPwd from "@/components/payPwd/index.vue";
|
||||
import popups from "@/components/popups/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
payPwd,
|
||||
popups
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
platformConsumption: [],
|
||||
@ -173,13 +183,6 @@
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "商户余额",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'merBalance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
@ -213,7 +216,6 @@
|
||||
couponId: 0, //优惠券id
|
||||
cartId: '', //购物车id
|
||||
userInfo: {}, //用户信息
|
||||
moneyInfo: {}, //商户余额信息
|
||||
coupon_price: 0, //优惠券抵扣金额
|
||||
ChangePrice: 0, //使用积分抵扣变动后的金额
|
||||
formIds: [], //收集formid
|
||||
@ -259,7 +261,9 @@
|
||||
pay_type: '',
|
||||
money: '',
|
||||
merName: '',
|
||||
return_url: ''
|
||||
return_url: '',
|
||||
key: '',
|
||||
source: 999,
|
||||
},
|
||||
checkForm: {
|
||||
address_id: '',
|
||||
@ -269,8 +273,11 @@
|
||||
source: 999,
|
||||
takes: [],
|
||||
use_coupon: {},
|
||||
use_integral: false
|
||||
use_integral: false,
|
||||
key: ''
|
||||
},
|
||||
productData: [],
|
||||
orderData: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -283,12 +290,12 @@
|
||||
}
|
||||
},
|
||||
onLoad: function(options) {
|
||||
options.money = parseFloat(options.money).toFixed(2);
|
||||
this.payForm.cart_id = options.cartId;
|
||||
this.payForm.money = options.money;
|
||||
this.payForm.merName = options.merName;
|
||||
this.checkForm.cart_id = options.cartId.split(',');
|
||||
this.total_coupon = options.money;
|
||||
// options.money = parseFloat(options.money).toFixed(2);
|
||||
// this.payForm.cart_id = options.cartId;
|
||||
// this.payForm.money = options.money;
|
||||
// this.payForm.merName = options.merName;
|
||||
// this.checkForm.cart_id = options.cartId.split(',');
|
||||
// this.total_coupon = options.money;
|
||||
|
||||
// this.platformConsumption = [{
|
||||
// balance: "39000.00",
|
||||
@ -301,10 +308,18 @@
|
||||
// uid: 889
|
||||
// }]
|
||||
|
||||
const eventChannel = this.getOpenerEventChannel();
|
||||
eventChannel.on('datas', (data) => {
|
||||
this.platformConsumption = data;
|
||||
})
|
||||
|
||||
let data = uni.getStorageSync("datas");
|
||||
this.productData = data.productData;
|
||||
this.platformConsumption = data.platformConsumption || [];
|
||||
|
||||
this.checkForm.cart_id = data.checkForm.cart_id;
|
||||
this.payForm.cart_id = this.checkForm.cart_id;
|
||||
this.payForm.money = data.money;
|
||||
this.payForm.merName = data.merName;
|
||||
this.payForm.key = data.key;
|
||||
this.total_coupon = data.money;
|
||||
this.checkForm.key = data.key;
|
||||
|
||||
// #ifdef H5
|
||||
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
|
||||
@ -361,8 +376,7 @@
|
||||
// 获取个人信息
|
||||
getUserInfo() {
|
||||
getUserInfo().then(res => {
|
||||
this.userInfo = res.data;
|
||||
this.loadMoneyInfo();
|
||||
this.userInfo = res.data
|
||||
})
|
||||
},
|
||||
|
||||
@ -378,17 +392,9 @@
|
||||
}
|
||||
},
|
||||
|
||||
loadMoneyInfo(){
|
||||
//获取账户金额以及冻结金额 重新调了一次接口
|
||||
getAdminApplyAPI(this.userInfo.service.mer_id).then(res => {
|
||||
this.moneyInfo = res.data;
|
||||
})
|
||||
},
|
||||
|
||||
payment: function(data) {
|
||||
let that = this;
|
||||
createOrder(data).then(res => {
|
||||
|
||||
let status = res.data.status,
|
||||
orderId = res.data.result.order_id,
|
||||
jsConfig = res.data.result.config,
|
||||
@ -397,7 +403,6 @@
|
||||
'&product_type=' + that.payForm.product_type + '&source=' + that.payForm.source,
|
||||
goPagesOrder = '/pages/order_details/stay?order_id=' + orderId +
|
||||
'&credit_buy=1&product_type=' + that.payForm.product_type;
|
||||
|
||||
that.orderPay = true;
|
||||
uni.hideLoading();
|
||||
switch (status) {
|
||||
@ -573,24 +578,81 @@
|
||||
});
|
||||
},
|
||||
|
||||
SubOrder: function() {
|
||||
SubOrder: async function() {
|
||||
let that = this,
|
||||
data = {};
|
||||
if (!that.payType) return that.$util.Tips({
|
||||
title: '请选择支付方式'
|
||||
});
|
||||
|
||||
if (that.payType == 'balance' && this.userInfo.now_money < this.payForm.money) {
|
||||
if (that.payType == 'balance' && +this.userInfo.now_money < +this.payForm.money) {
|
||||
return that.$util.Tips({
|
||||
title: '余额不足,请选择其他的支付方式!'
|
||||
});
|
||||
}
|
||||
this.payForm.pay_type = that.payType;
|
||||
|
||||
// 设置支付密码
|
||||
if (that.payType == 'balance' || that.payType == 'merBalance') {
|
||||
// 是否输入密码
|
||||
const result = await this.$util.checkPassword();
|
||||
if (result.data.code == 101) { //未设置支付密码
|
||||
return this.$util.Tips({
|
||||
title: "您暂未设置支付密码,请前往设置!"
|
||||
}, () => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/users/user_modify_pwd/index?type=payPwd"
|
||||
});
|
||||
})
|
||||
}
|
||||
this.$refs.popups.handleOpen();
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '订单支付中',
|
||||
mask: true
|
||||
});
|
||||
this.truePayOrder(data);
|
||||
}
|
||||
},
|
||||
|
||||
// 输入密码回调
|
||||
async handleConfirm(e) {
|
||||
const result = await this.$util.checkPassword(e);
|
||||
// 验证密码正确
|
||||
if (result.data.code == 100) {
|
||||
this.$set(this.payForm, 'withdrawal_pwd', e);
|
||||
uni.showLoading({
|
||||
title: '订单支付中',
|
||||
mask: true
|
||||
});
|
||||
this.truePayOrder(this.payForm);
|
||||
} else {
|
||||
this.$refs.payPwd.handleOpen(result.data.code);
|
||||
}
|
||||
},
|
||||
|
||||
// 弹框左边按钮 101 未设置密码 102 忘记密码 都去设置密码
|
||||
handleLeft(code) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/users/user_modify_pwd/index?type=payPwd"
|
||||
});
|
||||
this.$refs.payPwd.handleClose();
|
||||
},
|
||||
|
||||
// 弹框右边按钮 取消 重试
|
||||
handleRight(code) {
|
||||
if (code == 101) { //取消
|
||||
this.$refs.payPwd.handleClose(code);
|
||||
} else {
|
||||
this.$refs.payPwd.handleClose();
|
||||
this.$refs.popups.handleOpen();
|
||||
}
|
||||
},
|
||||
|
||||
handleClear() {},
|
||||
handleChange() {},
|
||||
|
||||
truePayOrder() {
|
||||
// #ifdef MP
|
||||
openPaySubscribe().then(() => {
|
||||
that.payment(this.payForm);
|
||||
@ -598,7 +660,7 @@
|
||||
// #endif
|
||||
|
||||
// #ifndef MP
|
||||
that.payment(this.payForm);
|
||||
this.payment(this.payForm);
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
762
pages/product/addGood/addGoodOld.vue
Normal file
762
pages/product/addGood/addGoodOld.vue
Normal file
@ -0,0 +1,762 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="step_one">
|
||||
<view class="input_content">
|
||||
<view class="bar-code" v-if="bar_code_dis">
|
||||
<view>商品条码</view>
|
||||
<input type="number" placeholder="请手动添加条码" v-model="code" :disabled="bar_code_dis"
|
||||
placeholder-class="inputPlaceHolder" />
|
||||
</view>
|
||||
<view class="input_content_textarea">
|
||||
<textarea v-model="setFormData.store_name" placeholder="请输入45商品名称"
|
||||
placeholder-class="placeholderStyle" maxlength="60" />
|
||||
<view class="flex" style="justify-content: space-between;color: #999999;">
|
||||
<view>(品牌,名称,规格,口味)</view>
|
||||
<view>
|
||||
<text v-if="setFormData.store_name">{{ setFormData.store_name.length }}</text>
|
||||
<text v-else>0</text>/60
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="photo_count">
|
||||
<text class="photo_size" style="color: #e93323;">建议:图片尺寸为750*750px, 上传2张以上</text>
|
||||
<view class="input_content_photo">
|
||||
<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>
|
||||
<view class="input_content_photo_adPh_jiao" @click="deleteImage(index)">
|
||||
<image src="../static/images/close.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="setFormData.imageList.length < 9" class="input_content_photo_adPh addBtn"
|
||||
@click="clk">
|
||||
<view>
|
||||
<image src="../static/images/creamer.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view>添加图片</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-popup ref="select_popup" class="pop" :show="show" mode="center" closeOnClickOverlay
|
||||
bgColor='transparent'>
|
||||
<image :src="image"></image>
|
||||
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
|
||||
</u-popup>
|
||||
</view>
|
||||
|
||||
<!-- 商品详情 -->
|
||||
<commodityComponent ref="commodityRef" v-if="showCommodity" :key="showCommodity"
|
||||
:showCommodity="showCommodity" :product_id="product_id" :merId="merId" :code="code">
|
||||
</commodityComponent>
|
||||
|
||||
<view class="popup_group">
|
||||
<view class="popup_group_item popup_group_item_b" @click="selectPlatform">
|
||||
<view class="popup_group_item_label">平台分类</view>
|
||||
<view class="popup_group_item_value">
|
||||
<view class="popup_group_item_message">
|
||||
<span v-if="setFormData.cate_name"
|
||||
class="popup_group_item_message_value">{{ setFormData.cate_name }}</span>
|
||||
<span v-else>请选择平台分类</span>
|
||||
</view>
|
||||
<view><span class="iconfont"></span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup_group_item" @click="selectStoreClass">
|
||||
<view class="popup_group_item_label ">店铺分类</view>
|
||||
<view class="popup_group_item_value">
|
||||
<view class="popup_group_item_message">
|
||||
<span v-if="setFormData.mer_cate_name"
|
||||
class="popup_group_item_message_value">{{ setFormData.mer_cate_name }}</span>
|
||||
<span v-else>请选择店铺分类</span>
|
||||
</view>
|
||||
<view><span class="iconfont"></span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup_group_item popup_group_item_b">
|
||||
<view class="popup_group_item_label">商品单位</view>
|
||||
<view class="popup_group_item_value"><input v-model="setFormData.unit_name" type="text"
|
||||
placeholder="请填写商品单位" /></view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 选择平台分类弹框 -->
|
||||
<uni-popup ref="select_platform" type="bottom">
|
||||
<platfrom @close="closePlatfrom" :classifiedData="platformClassificationData"
|
||||
@getPlatData="getPlatData">
|
||||
</platfrom>
|
||||
</uni-popup>
|
||||
<!-- 选择店铺分类弹框 -->
|
||||
<uni-popup ref="select_store" type="bottom">
|
||||
<store-classification :classifiedData="merchantClassification" :mer_id="merId"
|
||||
@handleGetSelectArea="handleGetSelectStore" @close="merchantClose"></store-classification>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
|
||||
<!-- 规格设置 -->
|
||||
<picker mode="selector" :range="['单规格','多规格']" :value="setFormData.spec_type" @change="changeSpecType">
|
||||
<view class="popup_group" style="margin-bottom: 0;">
|
||||
<view class="popup_group_item">
|
||||
<view class="popup_group_item_label">商品规格</view>
|
||||
<view class="popup_group_item_value">
|
||||
<view class="popup_group_item_message">
|
||||
<span
|
||||
class="popup_group_item_message_value">{{ setFormData.spec_type==0?'单规格':'多规格' }}</span>
|
||||
</view>
|
||||
<view><span class="iconfont"></span></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-modal :show="showSpecType" title="温馨提示" content="切换后商品原有规格将失效,是否继续?" show-cancel-button
|
||||
confirm-text="继续" @confirm="changeSpecType2" @cancel="showSpecType=false"></u-modal>
|
||||
</picker>
|
||||
<priceComponent v-if="setFormData.spec_type==0" :datas="setFormData.attrValue[0]" ref="priceRef"
|
||||
:product_id="product_id" :bar_code="code" @updateCode="updateCode">
|
||||
</priceComponent>
|
||||
<view v-else class="popup_group" style="margin-top: 0;border-top: 1rpx solid #eeeeee;">
|
||||
<view class="popup_group_item" @click="navToSpecGood()">
|
||||
<view class="popup_group_item_label" style="flex: 1; text-align: center;">
|
||||
设置多规格
|
||||
<text v-if="setFormData.attrValue.length>0">({{setFormData.attrValue.length}})</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="popup_group">
|
||||
<!-- <view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
|
||||
<view class="popup_group_item_label">更多信息</view>
|
||||
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
|
||||
<view><span class="iconfont"></span></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<block>
|
||||
<view class="input_content">
|
||||
<view class="input_content_describe" style="border: none;padding-bottom: 0;">
|
||||
<view class="input_content_describe_title">
|
||||
<view class="input_content_describe_title_msg">商品简介</view>
|
||||
<view class="input_content_describe_title_num">
|
||||
<text v-if="setFormData.store_info">{{ setFormData.store_info.length }}</text>
|
||||
<text v-else>0</text>
|
||||
/200
|
||||
</view>
|
||||
</view>
|
||||
<view class="input_content_describe_textarea">
|
||||
<textarea v-model="setFormData.store_info" style="width: 100%;" value=""
|
||||
placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="input_content_keyword">
|
||||
<view class="input_content_keyword_label">关键字</view>
|
||||
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
|
||||
placeholder="填写关键字" /></view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="input_content">
|
||||
<view class="input_content_keyword">
|
||||
<view class="input_content_keyword_label">最少购买件数</view>
|
||||
<view class="input_content_keyword_value"><input v-model="setFormData.once_min_count" type="number" value=""
|
||||
placeholder="不限量" /></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="radio">
|
||||
<view class="radio_label ">送货方式</view>
|
||||
<checkbox-group class="select_group flex_start" @change="changeDelivery">
|
||||
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
|
||||
<view>
|
||||
<checkbox :value="val.value"
|
||||
:checked="setFormData.delivery_way.includes(val.value+'')" />
|
||||
</view>
|
||||
<view>{{ val.name }}</view>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="handle">
|
||||
<view class="handle_button" @click="submitCreatedGoods">提交</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 图片选择器 -->
|
||||
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
|
||||
</avatar>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
TOKENNAME,
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app.js';
|
||||
import {
|
||||
categoryBrandlist,
|
||||
categorySelect,
|
||||
storeClassifyLst,
|
||||
categoryList,
|
||||
attrList,
|
||||
templateList,
|
||||
productDetail,
|
||||
getDeliveryType,
|
||||
productCreate,
|
||||
productUpdate
|
||||
} from '@/api/product.js';
|
||||
import {
|
||||
serialize,
|
||||
Toast,
|
||||
Loading,
|
||||
hideLoading,
|
||||
Modal
|
||||
} from "@/libs/uniApi.js";
|
||||
import avatar from "@/components/yq-avatar/yq-avatar.vue";
|
||||
import platfrom from "./components/platform.vue";
|
||||
import storeClassification from '../components/store_classification.vue';
|
||||
import commodityComponent from "./components/commodity.vue";
|
||||
import priceComponent from "./components/price.vue";
|
||||
export default {
|
||||
components: {
|
||||
avatar,
|
||||
platfrom,
|
||||
commodityComponent,
|
||||
priceComponent,
|
||||
storeClassification
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bar_code_dis: false,
|
||||
merId: '', //商户id
|
||||
product_id: '', //商品id
|
||||
import: 0, //是否为导入商品
|
||||
code: '', //商品条码
|
||||
show: false, //是否预览图片
|
||||
image: false, //预览的图
|
||||
setFormData: {
|
||||
store_name: '',
|
||||
imageList: [],
|
||||
attrValue: [],
|
||||
cate_name: '', //平台名称
|
||||
unit_name: '', //商品单位
|
||||
cate_id: '', // 平台分类id
|
||||
mer_cate_id: '', // 店铺分类
|
||||
mer_cate_name: '', // 店铺分类名称
|
||||
spec_type: '0', // 0.单规格 1:多规格
|
||||
attr: [], // 商品规格
|
||||
specifica: '', // 商品规格名称
|
||||
// setSpecificaValue: '', // 价格设置提示
|
||||
// setSpecificaValue2: '',
|
||||
delivery_way: ['1', '2'], // 配送方式 1 到店核销 2 快递配送
|
||||
delivery_free: '1', // 是否包邮 0不包邮 1包邮
|
||||
temp_id: '', // 运费模板ID
|
||||
tempName: '', // 运费模板名称
|
||||
once_min_count: '', //最少购买件数
|
||||
},
|
||||
platformClassificationData: [], // 平台分类数据
|
||||
merchantClassification: [], // 店铺分类
|
||||
brand: [], // 品牌
|
||||
showCommodity: false, // 是否显示商品,售价
|
||||
deliveryFreeList: [{
|
||||
value: '1',
|
||||
name: '到店核销'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
name: '快递配送'
|
||||
}
|
||||
],
|
||||
// 分类数据容器
|
||||
classified: {
|
||||
cate_id: [],
|
||||
mer_cate_id: [],
|
||||
brand_id: [],
|
||||
attr: [],
|
||||
temp_id: []
|
||||
},
|
||||
productItem: {} || [],
|
||||
showSpecType: false, // 是否显示切换窗口弹窗
|
||||
spec_type: 0, //临时规格,0单规格,1多规格
|
||||
};
|
||||
},
|
||||
onLoad(opt) {
|
||||
this.merId = Number(opt.mer_id);
|
||||
this.product_id = opt.product_id;
|
||||
this.import = opt.import;
|
||||
// if (!opt.product_id) this.showCommodity = true;
|
||||
this.showCommodity = true;
|
||||
this.initData();
|
||||
|
||||
if (this.import == 1) {
|
||||
this.getOpenerEventChannel().once('importAttrValue', (e) => {
|
||||
this.attrValue = e.attrValue;
|
||||
uni.setStorageSync('attrValue', JSON.stringify(e.attrValue));
|
||||
this.attr = e.attr;
|
||||
uni.setStorageSync('attr', JSON.stringify(e.attr));
|
||||
this.setFormData = Object.assign({}, this.setFormData, e);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.commodityRef?.setDatas({
|
||||
addGoodsSecoundData: {
|
||||
is_good: this.setFormData.is_good, // 是否推荐
|
||||
is_gift_bag: this.setFormData.is_gift_bag,
|
||||
sort: this.setFormData.sort,
|
||||
once_count: this.setFormData.once_count, // 限购数量
|
||||
video_link: this.setFormData.video_link,
|
||||
},
|
||||
goodsDis: {
|
||||
store_name: this.setFormData.content?.title,
|
||||
imageList: this.setFormData.content?.image
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
} else if (this.product_id) {
|
||||
this.initDataEditData();
|
||||
}
|
||||
},
|
||||
onBackPress() {},
|
||||
onShow() {
|
||||
this.initClasiffy();
|
||||
// this.setFormData = Object.assign(this.setFormData, {
|
||||
// "store_name": "方法",
|
||||
// "imageList": [
|
||||
// "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/457c6202311181745387896.jpeg",
|
||||
// "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/185e2202311181745434402.jpeg"
|
||||
// ],
|
||||
// "cate_name": "丧葬服务",
|
||||
// "unit_name": "给",
|
||||
// "cate_id": 445,
|
||||
// "keyword": "22"
|
||||
// })
|
||||
// this.$nextTick(async () => {
|
||||
// await this.$u.sleep(200)
|
||||
// this.$refs.commodityRef.addGoodsSecoundData = {
|
||||
// "is_good": 1,
|
||||
// "is_gift_bag": 0,
|
||||
// "sort": "20",
|
||||
// "once_count": "",
|
||||
// "video_link": "https://lihai001.oss-cn-chengdu.aliyuncs.com/media/7ce3d202311181816166215.mp4"
|
||||
// }
|
||||
// this.$refs.commodityRef.goodsDis = {
|
||||
// "store_name": "",
|
||||
// "imageList": [
|
||||
// "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/fb73d202311181751262661.png"
|
||||
// ]
|
||||
// }
|
||||
// this.$refs.priceRef.singleSpecification = {
|
||||
// "price": "1",
|
||||
// "cost": "1",
|
||||
// "stock": "11",
|
||||
// "ot_price": "",
|
||||
// "wholesale_price": "",
|
||||
// "bar_code": "666",
|
||||
// "weight": "10",
|
||||
// "volume": "5",
|
||||
// "image": "",
|
||||
// "extension_one": "",
|
||||
// "extension_two": ""
|
||||
// }
|
||||
// })
|
||||
},
|
||||
beforeDestroy() {},
|
||||
watch: {
|
||||
'setFormData.imageList'(val) {
|
||||
this.setFormData.image = val.length ? val[0] : '';
|
||||
this.setFormData.slider_image = val.length ? serialize(val).splice(1) : [];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeDelivery(e) {
|
||||
this.setFormData.delivery_way = e.detail.value;
|
||||
},
|
||||
// 查询详情数据
|
||||
initDataEditData() {
|
||||
this.setFormData = {
|
||||
imageList: [],
|
||||
attrValue: [],
|
||||
specification: '',
|
||||
image: '', //主图
|
||||
slider_image: '', // 轮播图
|
||||
store_name: '', // 商品名
|
||||
store_info: '', // 简介
|
||||
keyword: '', // 关键字
|
||||
brand_id: '', // 品牌id
|
||||
brand_name: '', // 品牌名称
|
||||
cate_id: '', // 平台分类
|
||||
cate_name: '', // 平台名称
|
||||
mer_cate_id: '', // 店铺分类
|
||||
mer_cate_name: '', // 店铺分类名称
|
||||
unit_name: '', // 商品单位
|
||||
spec_type: '0', // 0.单规格 1:多规格
|
||||
attr: [], // 商品规格
|
||||
specifica: '', // 商品规格名称
|
||||
// setSpecificaValue: '', // 价格设置提示
|
||||
// setSpecificaValue2: '', // 价格设置提示
|
||||
delivery_way: [], // 配送方式 1 到店核销 2 快递配送
|
||||
delivery_free: '0', // 是否包邮 0不包邮 1包邮
|
||||
temp_id: '', // 运费模板ID
|
||||
tempName: '', // 运费模板名称
|
||||
once_min_count: '', //最小购买数量
|
||||
};
|
||||
productDetail(this.merId, this.product_id).then(async (res) => {
|
||||
this.showCommodity = true;
|
||||
if (res.data.content_arr && res.data.content_arr.length > 0) res.data.content = res.data
|
||||
.content_arr;
|
||||
let editGoodsDetils = res.data;
|
||||
Object.keys(this.setFormData).forEach(item => {
|
||||
this.setFormData[item] = editGoodsDetils[item];
|
||||
});
|
||||
this.setFormData.product_id = this.product_id;
|
||||
this.setFormData.imageList = [...(this.setFormData.image ? [this.setFormData.image] : []),
|
||||
...
|
||||
this
|
||||
.setFormData.slider_image
|
||||
];
|
||||
this.setFormData.cate_name = editGoodsDetils?.storeCategory?.cate_name; // 平台分类回显
|
||||
this.setFormData.mer_cate_name = editGoodsDetils.merCateId ? editGoodsDetils.merCateId.map(
|
||||
item => item
|
||||
.category && item.category.cate_name).join(',') : '';
|
||||
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
|
||||
.content);
|
||||
this.setFormData.once_min_count <= 0 ? this.setFormData.once_min_count = '' : null;
|
||||
this.setFormData.delivery_way = res.data.delivery_way;
|
||||
//向组件注入数据
|
||||
this.$nextTick(() => {
|
||||
this.$refs.commodityRef.setDatas({
|
||||
addGoodsSecoundData: {
|
||||
is_good: res.data.is_good, // 是否推荐
|
||||
is_gift_bag: res.data.is_gift_bag,
|
||||
sort: res.data.sort,
|
||||
once_count: res.data.once_count, // 限购数量
|
||||
video_link: res.data.video_link,
|
||||
},
|
||||
goodsDis: {
|
||||
store_name: res.data.content?.title,
|
||||
imageList: res.data.content?.image
|
||||
}
|
||||
})
|
||||
// 单规格
|
||||
if (this.setFormData.spec_type == 0) {
|
||||
this.$refs.priceRef.setDatas(res.data.attrValue[0]);
|
||||
}
|
||||
})
|
||||
editGoodsDetils.temp && (this.setFormData.tempName = editGoodsDetils.temp.name);
|
||||
hideLoading();
|
||||
|
||||
});
|
||||
},
|
||||
//获取商户分类
|
||||
async initClasiffy() {
|
||||
this.merchantClassification = (await storeClassifyLst(this.merId)).data;
|
||||
},
|
||||
initData() {
|
||||
// 获取品牌
|
||||
categoryBrandlist(this.merId).then((res) => {
|
||||
this.brand = res.data;
|
||||
}).catch(e => {
|
||||
console.log(e);
|
||||
});
|
||||
// 获取平台分类
|
||||
categoryList(this.merId).then((res) => {
|
||||
res.data.forEach((item1) => {
|
||||
item1.children.forEach((item2) => {
|
||||
item2.children = null;
|
||||
})
|
||||
})
|
||||
this.platformClassificationData = res.data;
|
||||
}).catch(e => {
|
||||
console.log(e);
|
||||
})
|
||||
|
||||
},
|
||||
// 更新商品条码
|
||||
updateCode(e) {
|
||||
this.code = e + '';
|
||||
},
|
||||
// 选择图片
|
||||
handleChooseImage() {
|
||||
let that = this;
|
||||
that.$util.uploadImageOne('upload/image', function(res) {
|
||||
that.setFormData.imageList.push(res.data.path);
|
||||
});
|
||||
},
|
||||
clk() {
|
||||
// let avatar = this.$refs.avatar;
|
||||
// avatar.fChooseImg(1, {
|
||||
// selWidth: '350upx',
|
||||
// selHeight: '350upx',
|
||||
// inner: true
|
||||
// });
|
||||
this.$util.uploadImageOne({
|
||||
url: 'upload/image',
|
||||
crop: {
|
||||
width: 2000,
|
||||
height: 2000,
|
||||
}
|
||||
}, (res) => {
|
||||
this.setFormData.imageList.push(res.data.path);
|
||||
});
|
||||
},
|
||||
doUpload(rsp) {
|
||||
let that = this
|
||||
// console.log(rsp);
|
||||
uni.uploadFile({
|
||||
url: HTTP_REQUEST_URL + '/api/upload/image/field',
|
||||
filePath: rsp.path,
|
||||
name: 'field',
|
||||
formData: {
|
||||
'filename': rsp.path,
|
||||
'name': that.imgName
|
||||
},
|
||||
header: {
|
||||
// #ifdef MP
|
||||
"Content-Type": "multipart/form-data",
|
||||
// #endif
|
||||
[TOKENNAME]: 'Bearer ' + this.$store.state.app.token
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
// console.log(uploadFileRes.data);
|
||||
let imgData = JSON.parse(uploadFileRes.data)
|
||||
that.setFormData.imageList.push(imgData.data.path)
|
||||
},
|
||||
complete(res) {
|
||||
// console.log(res)
|
||||
}
|
||||
});
|
||||
},
|
||||
getImgName(name) {
|
||||
this.imgName = name
|
||||
},
|
||||
//图片预览
|
||||
pop(e) {
|
||||
this.show = true
|
||||
this.image = e
|
||||
},
|
||||
// 关闭弹框
|
||||
close() {
|
||||
this.$refs.select_popup.close();
|
||||
this.show = false
|
||||
},
|
||||
// 删除图片
|
||||
deleteImage(index) {
|
||||
this.setFormData.imageList.splice(index, 1);
|
||||
},
|
||||
// 选择平台分类
|
||||
selectPlatform() {
|
||||
this.$refs.select_platform.open();
|
||||
},
|
||||
// 关闭频台分类
|
||||
closePlatfrom() {
|
||||
this.$refs.select_platform.close();
|
||||
},
|
||||
// 获取平台类数据
|
||||
getPlatData(item, taplist) {
|
||||
this.setFormData.cate_id = item.value;
|
||||
this.setFormData.cate_name = item.label;
|
||||
this.$refs.select_platform.close();
|
||||
},
|
||||
// 选择店铺分类
|
||||
selectStoreClass() {
|
||||
this.$refs.select_store.open();
|
||||
},
|
||||
// 关闭店铺分类
|
||||
merchantClose() {
|
||||
this.$refs.select_store.close();
|
||||
},
|
||||
|
||||
// 获取已选择得店铺数据
|
||||
handleGetSelectStore(item) {
|
||||
console.log(item);
|
||||
this.setFormData.mer_cate_id = item.map(val => val.store_category_id);
|
||||
this.setFormData.mer_cate_name = item.map(val => val.cate_name).join(',');
|
||||
this.$refs.select_store.close();
|
||||
},
|
||||
|
||||
// 获取品牌分类弹框
|
||||
selectBrand() {
|
||||
this.$refs.select_popup.open();
|
||||
},
|
||||
// 获取品牌分类数据
|
||||
getLinkageData(item) {
|
||||
this.setFormData.brand_id = item[0].value;
|
||||
this.setFormData.brand_name = item[0].cate_name;
|
||||
this.$refs.select_popup.close();
|
||||
},
|
||||
// 获取多选数据
|
||||
multipleList(data, model) {
|
||||
if (model == 'mer_cate_id') {
|
||||
this.platformClassification[1].value = data.map(item => item.label).join(',');
|
||||
this.platformClassification[1].allreadySelect = data;
|
||||
this.setFormData.mer_cate_id = data.map(item => item.value);
|
||||
}
|
||||
},
|
||||
// popup弹框中返回数据结束
|
||||
// 关闭弹框
|
||||
close() {
|
||||
this.$refs.select_popup.close();
|
||||
this.show = false
|
||||
},
|
||||
// 拼接字符串
|
||||
getLinkDataOfRecursion(arr, child = 'children', key = 'value') {
|
||||
let str = '';
|
||||
let id = '';
|
||||
arr.forEach(item => {
|
||||
str = item.label;
|
||||
id = item.value;
|
||||
});
|
||||
// str = str.slice(0, str.length - 1);
|
||||
return {
|
||||
str,
|
||||
id
|
||||
};
|
||||
},
|
||||
// 求运费模板列表
|
||||
getTemplateList() {
|
||||
templateList(this.merId, this.templateListPage).then(res => {
|
||||
res.data.list.forEach(item => {
|
||||
this.$set(item, 'value', item.shipping_template_id);
|
||||
this.$set(item, 'label', item.name);
|
||||
});
|
||||
this.classified['temp_id'] = res.data.list;
|
||||
this.$refs.tempId.open();
|
||||
});
|
||||
},
|
||||
|
||||
// 创建商品
|
||||
submitCreatedGoods() {
|
||||
console.log('创建商品');
|
||||
// return console.log('商品规格', this.setFormData.attr);
|
||||
console.log('是否推荐', this.$refs.commodityRef.addGoodsSecoundData);
|
||||
console.log('商品详情', this.$refs.commodityRef.goodsDis, this.$refs.commodityRef.store_name);
|
||||
if (this.setFormData.spec_type == 0) {
|
||||
console.log('价格库存', this.$refs.priceRef.singleSpecification);
|
||||
}
|
||||
if (this.setFormData.delivery_way.length == 0) return Toast('请至少选择一种送货方式');
|
||||
let postData = {
|
||||
...this.setFormData,
|
||||
...this.$refs.commodityRef.addGoodsSecoundData,
|
||||
content: {
|
||||
title: this.$refs.commodityRef.goodsDis?.store_name || '',
|
||||
image: this.$refs.commodityRef.goodsDis?.imageList || []
|
||||
},
|
||||
video_link: this.$refs.commodityRef.addGoodsSecoundData.video_link,
|
||||
};
|
||||
if (this.setFormData.spec_type == 0) {
|
||||
postData.attrValue = [this.$refs.priceRef.singleSpecification];
|
||||
} else postData.attrValue = this.setFormData.attrValue;
|
||||
postData.stock = postData.attrValue[0]?.stock || 0;
|
||||
if (!postData.store_name || postData.store_name?.trim().length <= 0) return Toast('请输入商品名称');
|
||||
if (!postData.imageList || postData.imageList?.length < 2) return Toast('请上传2张以上商品图片');
|
||||
if (!postData.cate_name || postData.cate_name?.trim().length <= 0) return Toast('请选择平台分类');
|
||||
if (!postData.unit_name || postData.unit_name?.trim().length <= 0) return Toast('请输入商品单位');
|
||||
let userInfo = this.$store.state.app.userInfo;
|
||||
if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
|
||||
let showFlag = '';
|
||||
|
||||
console.log(postData);
|
||||
|
||||
postData.attrValue.forEach(t => {
|
||||
if (userInfo.mer_info.wholesale && (!t.wholesale_price || +t.wholesale_price <= 0)) {
|
||||
showFlag = '批发价不能小于0'
|
||||
}
|
||||
if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0';
|
||||
if (!t.stock || +t.stock <= 0) showFlag = '库存不能小于0';
|
||||
// if (!t.cost || +t.cost <= 0) showFlag = '成本价不能小于0';
|
||||
})
|
||||
if (showFlag) {
|
||||
if (this.setFormData.spec_type == 1) showFlag += ', 请点击设置多规格设置';
|
||||
return Toast(showFlag);
|
||||
}
|
||||
Loading();
|
||||
if (this.product_id) {
|
||||
productUpdate(this.merId, this.product_id, postData)
|
||||
.then(res => {
|
||||
hideLoading()
|
||||
Modal('提交成功', '点击确定, 前往商品列表页面').then(() => {
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
|
||||
})
|
||||
}).catch(() => {
|
||||
uni.navigateBack()
|
||||
})
|
||||
})
|
||||
.catch(rej => {
|
||||
Toast(rej);
|
||||
});
|
||||
|
||||
} else {
|
||||
productCreate(this.merId, postData)
|
||||
.then(res => {
|
||||
hideLoading();
|
||||
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
|
||||
if (this.import == 1) {
|
||||
uni.$emit('importAttrValueOK', this.setFormData.import_id);
|
||||
uni.navigateBack();
|
||||
} else uni.redirectTo({
|
||||
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
|
||||
})
|
||||
}).catch(() => {
|
||||
uni.navigateBack()
|
||||
})
|
||||
})
|
||||
.catch(rej => {
|
||||
Toast(rej);
|
||||
});
|
||||
}
|
||||
},
|
||||
// 选择规格
|
||||
changeSpecType(e) {
|
||||
if (this.setFormData.spec_type != e.detail.value) {
|
||||
this.showSpecType = true;
|
||||
}
|
||||
this.spec_type = e.detail.value;
|
||||
},
|
||||
// 二次确认
|
||||
changeSpecType2() {
|
||||
this.showSpecType = false;
|
||||
this.setFormData.spec_type = this.spec_type + '';
|
||||
this.setFormData.attrValue = [];
|
||||
this.setFormData.attr = [];
|
||||
},
|
||||
// 跳转多规格页面
|
||||
navToSpecGood() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/product/addGood/specGood?product_id=' + this.product_id,
|
||||
success: (e) => {
|
||||
// console.log(this.setFormData.attrValue, e);
|
||||
e.eventChannel.emit('updateAttrValue', {
|
||||
attrValue: JSON.parse(JSON.stringify(this.setFormData.attrValue)),
|
||||
attr: JSON.parse(JSON.stringify(this.setFormData.attr))
|
||||
});
|
||||
uni.$once('updateSpecType', (e) => {
|
||||
this.setFormData.attrValue = JSON.parse(JSON.stringify(e.attrValue));
|
||||
this.setFormData.attr = JSON.parse(JSON.stringify(e.attr));
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './scss/index.scss';
|
||||
|
||||
.pop {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.guanbi {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
</style>
|
@ -47,7 +47,7 @@
|
||||
</commodityComponent>
|
||||
|
||||
<view class="popup_group">
|
||||
<!-- <view class="popup_group_item" @click="selectPlatform">
|
||||
<!-- <view class="popup_group_item popup_group_item_b" @click="selectPlatform">
|
||||
<view class="popup_group_item_label">平台分类</view>
|
||||
<view class="popup_group_item_value">
|
||||
<view class="popup_group_item_message">
|
||||
@ -69,7 +69,7 @@
|
||||
<view><span class="iconfont"></span></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="popup_group_item">
|
||||
<view class="popup_group_item popup_group_item_b">
|
||||
<view class="popup_group_item_label">商品单位</view>
|
||||
<view class="popup_group_item_value"><input v-model="setFormData.unit_name" type="text"
|
||||
placeholder="请填写商品单位" /></view>
|
||||
@ -120,7 +120,7 @@
|
||||
</view>
|
||||
|
||||
|
||||
<view v-if="false" class="popup_group">
|
||||
<view class="popup_group">
|
||||
<!-- <view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
|
||||
<view class="popup_group_item_label">更多信息</view>
|
||||
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
|
||||
@ -128,8 +128,8 @@
|
||||
</view>
|
||||
</view> -->
|
||||
<block>
|
||||
<!-- <view class="input_content">
|
||||
<view class="input_content_describe" style="border-top: none">
|
||||
<view class="input_content">
|
||||
<view class="input_content_describe" style="border: none;padding-bottom: 0;">
|
||||
<view class="input_content_describe_title">
|
||||
<view class="input_content_describe_title_msg">商品简介</view>
|
||||
<view class="input_content_describe_title_num">
|
||||
@ -139,17 +139,17 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="input_content_describe_textarea">
|
||||
<textarea v-model="setFormData.store_info" value="" placeholder="请填写商品简介"
|
||||
<textarea v-model="setFormData.store_info" style="width: 100%;" value="" placeholder="请填写商品简介"
|
||||
placeholderClass="placeholderClass" maxlength="200" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="input_content_keyword">
|
||||
<!-- <view class="input_content_keyword">
|
||||
<view class="input_content_keyword_label">关键字</view>
|
||||
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
|
||||
placeholder="填写关键字" /></view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="input_content">
|
||||
<view class="input_content_keyword">
|
||||
<view class="input_content_keyword_label">最少购买件数</view>
|
||||
@ -159,10 +159,10 @@
|
||||
</view> -->
|
||||
<view class="radio">
|
||||
<view class="radio_label ">送货方式</view>
|
||||
<checkbox-group class="select_group flex_start">
|
||||
<checkbox-group class="select_group flex_start" @change="changeDelivery">
|
||||
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
|
||||
<view>
|
||||
<checkbox :value="val.value" disabled :checked="val.value" />
|
||||
<checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value+'')" />
|
||||
</view>
|
||||
<view>{{ val.name }}</view>
|
||||
</label>
|
||||
@ -246,7 +246,7 @@
|
||||
specifica: '', // 商品规格名称
|
||||
// setSpecificaValue: '', // 价格设置提示
|
||||
// setSpecificaValue2: '',
|
||||
delivery_way: [1, 2], // 配送方式 1 到店核销 2 快递配送
|
||||
delivery_way: ['1', '2'], // 配送方式 1 到店核销 2 快递配送, // 配送方式 1 到店核销 2 快递配送
|
||||
delivery_free: '1', // 是否包邮 0不包邮 1包邮
|
||||
temp_id: '', // 运费模板ID
|
||||
tempName: '' ,// 运费模板名称
|
||||
@ -346,7 +346,7 @@
|
||||
// "cost": "1",
|
||||
// "stock": "11",
|
||||
// "ot_price": "",
|
||||
// "procure_price": "",
|
||||
// "wholesale_price": "",
|
||||
// "bar_code": "666",
|
||||
// "weight": "10",
|
||||
// "volume": "5",
|
||||
@ -364,6 +364,9 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeDelivery(e){
|
||||
this.setFormData.delivery_way = e.detail.value;
|
||||
},
|
||||
// 查询详情数据
|
||||
initDataEditData() {
|
||||
this.setFormData = {
|
||||
@ -395,7 +398,7 @@
|
||||
};
|
||||
productDetail(this.merId, this.product_id).then(async (res) => {
|
||||
this.showCommodity = true;
|
||||
if (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;
|
||||
Object.keys(this.setFormData).forEach(item => {
|
||||
this.setFormData[item] = editGoodsDetils[item];
|
||||
@ -413,6 +416,7 @@
|
||||
if (res.data.content && typeof res.data.content == 'string') res.data.content = JSON.parse(res.data
|
||||
.content);
|
||||
this.setFormData.once_min_count <= 0 ? this.setFormData.once_min_count = '' : null;
|
||||
this.setFormData.delivery_way = res.data.delivery_way;
|
||||
//向组件注入数据
|
||||
this.$nextTick(() => {
|
||||
this.$refs.commodityRef.setDatas({
|
||||
@ -615,6 +619,7 @@
|
||||
if (this.setFormData.spec_type == 0) {
|
||||
console.log('价格库存', this.$refs.priceRef.singleSpecification);
|
||||
}
|
||||
if(this.setFormData.delivery_way.length==0) return Toast('请至少选择一种送货方式');
|
||||
let postData = {
|
||||
...this.setFormData,
|
||||
...this.$refs.commodityRef.addGoodsSecoundData,
|
||||
@ -636,7 +641,7 @@
|
||||
if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
|
||||
let showFlag = '';
|
||||
postData.attrValue.forEach(t => {
|
||||
if (userInfo?.mer_info?.type_code == "TypeSupplyChain" && (!t.procure_price || +t.procure_price <= 0)) {
|
||||
if (userInfo.mer_info.wholesale && (!t.wholesale_price || +t.wholesale_price <= 0)) {
|
||||
showFlag = '批发价不能小于0'
|
||||
}
|
||||
if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0';
|
||||
@ -652,12 +657,12 @@
|
||||
productUpdate(this.merId, this.product_id, postData)
|
||||
.then(res => {
|
||||
hideLoading()
|
||||
Modal('提交成功', '点击确定,返回商品管理', {
|
||||
showCancel: false
|
||||
}).then(() => {
|
||||
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
|
||||
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
|
||||
})
|
||||
}).catch(()=>{
|
||||
uni.navigateBack()
|
||||
})
|
||||
})
|
||||
.catch(rej => {
|
||||
@ -668,15 +673,15 @@
|
||||
productCreate(this.merId, postData)
|
||||
.then(res => {
|
||||
hideLoading();
|
||||
Modal('提交成功', '点击确定,返回商品管理', {
|
||||
showCancel: false,
|
||||
}).then(() => {
|
||||
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
|
||||
if (this.import == 1) {
|
||||
uni.$emit('importAttrValueOK', this.setFormData.import_id);
|
||||
uni.navigateBack();
|
||||
} else uni.redirectTo({
|
||||
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
|
||||
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
|
||||
})
|
||||
}).catch(()=>{
|
||||
uni.navigateBack()
|
||||
})
|
||||
})
|
||||
.catch(rej => {
|
||||
|
@ -47,7 +47,7 @@
|
||||
</commodityComponent>
|
||||
|
||||
<view class="popup_group">
|
||||
<view class="popup_group_item" @click="selectPlatform">
|
||||
<view class="popup_group_item popup_group_item_b" @click="selectPlatform">
|
||||
<view class="popup_group_item_label">平台分类</view>
|
||||
<view class="popup_group_item_value">
|
||||
<view class="popup_group_item_message">
|
||||
@ -133,7 +133,7 @@
|
||||
</view>
|
||||
|
||||
|
||||
<view v-if="false" class="popup_group">
|
||||
<view class="popup_group">
|
||||
<!-- <view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
|
||||
<view class="popup_group_item_label">更多信息</view>
|
||||
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
|
||||
@ -141,8 +141,8 @@
|
||||
</view>
|
||||
</view> -->
|
||||
<block>
|
||||
<!-- <view class="input_content">
|
||||
<view class="input_content_describe" style="border-top: none">
|
||||
<view class="input_content">
|
||||
<view class="input_content_describe" style="border: none;padding-bottom: 0;">
|
||||
<view class="input_content_describe_title">
|
||||
<view class="input_content_describe_title_msg">商品简介</view>
|
||||
<view class="input_content_describe_title_num">
|
||||
@ -152,30 +152,30 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="input_content_describe_textarea">
|
||||
<textarea v-model="setFormData.store_info" value="" placeholder="请填写商品简介"
|
||||
<textarea v-model="setFormData.store_info" style="width: 100%;" value="" placeholder="请填写商品简介"
|
||||
placeholderClass="placeholderClass" maxlength="200" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="input_content_keyword">
|
||||
<!-- <view class="input_content_keyword">
|
||||
<view class="input_content_keyword_label">关键字</view>
|
||||
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
|
||||
placeholder="填写关键字" /></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="input_content">
|
||||
</view>
|
||||
<!-- <view class="input_content">
|
||||
<view class="input_content_keyword">
|
||||
<view class="input_content_keyword_label">最少购买件数</view>
|
||||
<view class="input_content_keyword_value"><input v-model="setFormData.once_min_count" type="number" value=""
|
||||
placeholder="不限量" /></view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="radio">
|
||||
<view class="radio_label ">送货方式</view>
|
||||
<checkbox-group class="select_group flex_start">
|
||||
<checkbox-group class="select_group flex_start" @change="changeDelivery">
|
||||
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
|
||||
<view>
|
||||
<checkbox :value="val.value" disabled :checked="val.value" />
|
||||
<checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value+'')" />
|
||||
</view>
|
||||
<view>{{ val.name }}</view>
|
||||
</label>
|
||||
@ -265,7 +265,7 @@
|
||||
specifica: '', // 商品规格名称
|
||||
// setSpecificaValue: '', // 价格设置提示
|
||||
// setSpecificaValue2: '',
|
||||
delivery_way: [1, 2], // 配送方式 1 到店核销 2 快递配送
|
||||
delivery_way: ['1', '2'], // 配送方式 1 到店核销 2 快递配送, // 配送方式 1 到店核销 2 快递配送
|
||||
delivery_free: '1', // 是否包邮 0不包邮 1包邮
|
||||
temp_id: '', // 运费模板ID
|
||||
tempName: '' ,// 运费模板名称
|
||||
@ -365,7 +365,7 @@
|
||||
// "cost": "1",
|
||||
// "stock": "11",
|
||||
// "ot_price": "",
|
||||
// "procure_price": "",
|
||||
// "wholesale_price": "",
|
||||
// "bar_code": "666",
|
||||
// "weight": "10",
|
||||
// "volume": "5",
|
||||
@ -399,6 +399,9 @@
|
||||
this.setFormData.attrValue[this.deleteIndex].is_d_show = true;
|
||||
this.showDelete = false;
|
||||
},
|
||||
changeDelivery(e){
|
||||
this.setFormData.delivery_way = e.detail.value;
|
||||
},
|
||||
// 查询详情数据
|
||||
initDataEditData() {
|
||||
this.setFormData = {
|
||||
@ -430,7 +433,7 @@
|
||||
};
|
||||
productDetail(this.merId, this.product_id).then(async (res) => {
|
||||
this.showCommodity = true;
|
||||
if (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;
|
||||
Object.keys(this.setFormData).forEach(item => {
|
||||
this.setFormData[item] = editGoodsDetils[item];
|
||||
@ -451,6 +454,7 @@
|
||||
if(res.data.attr.length==1&&res.data.attr[0].value=='规格'){ // 供应链默认规格时页面改成默认规格
|
||||
this.setFormData.spec_type = 0;
|
||||
}
|
||||
this.setFormData.delivery_way = res.data.delivery_way;
|
||||
//向组件注入数据
|
||||
this.$nextTick(() => {
|
||||
this.$refs.commodityRef.setDatas({
|
||||
@ -654,6 +658,7 @@
|
||||
// if (this.setFormData.spec_type == 0) {
|
||||
// console.log('价格库存', this.$refs.priceRef.singleSpecification);
|
||||
// }
|
||||
if(this.setFormData.delivery_way.length==0) return Toast('请至少选择一种送货方式');
|
||||
let postData = {
|
||||
...this.setFormData,
|
||||
...this.$refs.commodityRef.addGoodsSecoundData,
|
||||
@ -683,7 +688,7 @@
|
||||
if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
|
||||
let showFlag = '';
|
||||
postData.attrValue.forEach(t => {
|
||||
if (userInfo?.mer_info?.type_code == "TypeSupplyChain" && (!t.procure_price || +t.procure_price <= 0)) {
|
||||
if (userInfo.mer_info.wholesale && (!t.wholesale_price || +t.wholesale_price <= 0)) {
|
||||
showFlag = '结算价不能小于0'
|
||||
}
|
||||
if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0';
|
||||
@ -715,12 +720,12 @@
|
||||
productUpdate(this.merId, this.product_id, postData)
|
||||
.then(res => {
|
||||
hideLoading()
|
||||
Modal('提交成功', '点击确定,返回商品管理', {
|
||||
showCancel: false
|
||||
}).then(() => {
|
||||
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
|
||||
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
|
||||
})
|
||||
}).catch(()=>{
|
||||
uni.navigateBack()
|
||||
})
|
||||
})
|
||||
.catch(rej => {
|
||||
@ -731,15 +736,15 @@
|
||||
productCreate(this.merId, postData)
|
||||
.then(res => {
|
||||
hideLoading();
|
||||
Modal('提交成功', '点击确定,返回商品管理', {
|
||||
showCancel: false,
|
||||
}).then(() => {
|
||||
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
|
||||
if (this.import == 1) {
|
||||
uni.$emit('importAttrValueOK', this.setFormData.import_id);
|
||||
uni.navigateBack();
|
||||
} else uni.redirectTo({
|
||||
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
|
||||
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
|
||||
})
|
||||
}).catch(()=>{
|
||||
uni.navigateBack()
|
||||
})
|
||||
})
|
||||
.catch(rej => {
|
||||
|
@ -5,10 +5,13 @@
|
||||
<view class="content_list_item">
|
||||
<view>商品详情</view>
|
||||
</view>
|
||||
<input-goods-detils class="input-goods-detils" @getProductContent="getProductContent" :title="store_name" :prodectContent="goodsDis" :maxLength="200"></input-goods-detils>
|
||||
<input-goods-detils class="input-goods-detils" @getProductContent="getProductContent" :title="store_name"
|
||||
:prodectContent="goodsDis" :maxLength="200"></input-goods-detils>
|
||||
<block v-if="!moreThanFlag">
|
||||
<view class="content_list_video input-goods-detils">
|
||||
|
||||
<view class="content_list_video_title">商品视频</view>
|
||||
|
||||
<view class="video_list">
|
||||
<view class="video_list_item photo" v-if="addGoodsSecoundData.video_link">
|
||||
<view class="jiao" @click="deleteImage()">
|
||||
@ -46,13 +49,15 @@
|
||||
<view>添加视频</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="container_input marginTop_none input-goods-detils">
|
||||
<view class="container_input_item">
|
||||
<view class="container_input_item_label"><span>是否推荐</span></view>
|
||||
<view class="container_input_item_value">
|
||||
<switch :checked="addGoodsSecoundData.is_good == 1" color="#E93323" style="transform:scale(0.8)"
|
||||
@change="isGood" />
|
||||
<switch :checked="addGoodsSecoundData.is_good == 1" color="#E93323"
|
||||
style="transform:scale(0.8)" @change="isGood" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="container_input_item">
|
||||
@ -103,7 +108,10 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { TOKENNAME, HTTP_REQUEST_URL } from '@/config/app.js';
|
||||
import {
|
||||
TOKENNAME,
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app.js';
|
||||
import store from 'store';
|
||||
import {
|
||||
navigateTo,
|
||||
@ -116,7 +124,10 @@
|
||||
hideLoading,
|
||||
Modal
|
||||
} from '@/libs/uniApi.js';
|
||||
import { productCreate, productUpdate } from 'api/product.js';
|
||||
import {
|
||||
productCreate,
|
||||
productUpdate
|
||||
} from 'api/product.js';
|
||||
import inputGoodsDetils from './inputGoodsDetils.vue';
|
||||
export default {
|
||||
components: {
|
||||
@ -157,14 +168,16 @@
|
||||
once_count: '', // 限购数量
|
||||
video_link: ''
|
||||
},
|
||||
goodsDis: {imageList: [],store_name:""},
|
||||
goodsDis: {
|
||||
imageList: [],
|
||||
store_name: ""
|
||||
},
|
||||
store_name: '',
|
||||
moreThanFlag: true,
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
videoshow() {
|
||||
this.showVideo = true
|
||||
@ -191,7 +204,9 @@
|
||||
},
|
||||
// 跳转商品详情
|
||||
inputGoodsDetils() {
|
||||
navigateTo(1, '/pages/product/addGoods/addGoodDetils', { mer_id: this.merId });
|
||||
navigateTo(1, '/pages/product/addGoods/addGoodDetils', {
|
||||
mer_id: this.merId
|
||||
});
|
||||
},
|
||||
// 上传视频
|
||||
uploadVideo() {
|
||||
@ -206,9 +221,9 @@
|
||||
filePath: res.tempFilePath,
|
||||
name: 'file',
|
||||
//请求参数
|
||||
formData: {
|
||||
user: 'test'
|
||||
},
|
||||
// formData: {
|
||||
// user: 'test'
|
||||
// },
|
||||
header: {
|
||||
// #ifdef MP
|
||||
'Content-Type': 'multipart/form-data',
|
||||
|
@ -32,8 +32,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="input_content_describe_textarea">
|
||||
<textarea v-model="prodectContent.store_info" value=""
|
||||
placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200" /></view>
|
||||
<textarea v-model="prodectContent.store_info" value="" placeholder="请填写商品简介" placeholderClass="placeholderClass"
|
||||
maxlength="200" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="input_content_keyword" v-if="isShowDescribe">
|
||||
@ -41,7 +42,8 @@
|
||||
<view class="input_content_keyword_value"><input v-model="prodectContent.keyword" type="text" value=""
|
||||
placeholder="填写关键字" /></view>
|
||||
</view>
|
||||
<avatar style="height: 1px;" @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
|
||||
<avatar style="height: 1px;" @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx"
|
||||
selHeight="250upx">
|
||||
</avatar>
|
||||
</view>
|
||||
</template>
|
||||
@ -122,8 +124,22 @@
|
||||
});
|
||||
},
|
||||
clk() {
|
||||
let avatar = this.$refs.avatar;
|
||||
avatar.fChooseImg(1, { selWidth: '350upx', selHeight: '350upx', inner: true });
|
||||
// let avatar = this.$refs.avatar;
|
||||
// avatar.fChooseImg(1, {
|
||||
// selWidth: '350upx',
|
||||
// selHeight: '350upx',
|
||||
// inner: true
|
||||
// });
|
||||
this.$util.uploadImageOne({
|
||||
url: 'upload/image',
|
||||
crop: {
|
||||
width: 2000,
|
||||
height: 2000,
|
||||
}
|
||||
}, (res)=> {
|
||||
this.uploadImg.push(res.data.path);
|
||||
this.$set(this.prodectContent, 'imageList', this.uploadImg);
|
||||
});
|
||||
},
|
||||
doUpload(rsp) {
|
||||
// console.log(rsp);
|
||||
@ -147,7 +163,8 @@
|
||||
let imgData = JSON.parse(uploadFileRes.data)
|
||||
// that.prodectContent.imageList.push(imgData.data.path)
|
||||
if (!that.prodectContent.imageList) that.prodectContent.imageList = [];
|
||||
that.prodectContent = { imageList: [...that.prodectContent.imageList, imgData.data.path] ,store_name:this.upstore};
|
||||
that.prodectContent = { imageList: [...that.prodectContent.imageList, imgData.data.path],
|
||||
store_name: this.upstore };
|
||||
},
|
||||
complete(res) {
|
||||
// console.log(res)
|
||||
|
@ -31,7 +31,7 @@
|
||||
cost: '', // 成本价
|
||||
stock: '', // 库存
|
||||
ot_price: '', // 市场价
|
||||
procure_price: '', // 批发价
|
||||
wholesale_price: '', // 批发价
|
||||
bar_code: '', // 商品条码
|
||||
weight: '', // 重量
|
||||
volume: '', // 体积
|
||||
@ -129,13 +129,13 @@
|
||||
let userInfo = this.$store.state.app.userInfo;
|
||||
if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
|
||||
// 市级供应链才需填写批发价
|
||||
if(userInfo.mer_info?.type_code=="TypeSupplyChain"){
|
||||
if(userInfo.mer_info?.wholesale){
|
||||
this.formList.unshift({
|
||||
id: 3,
|
||||
label: '批发价',
|
||||
type: 'digit',
|
||||
holder: '请填写批发价',
|
||||
model: 'procure_price',
|
||||
model: 'wholesale_price',
|
||||
require: true,
|
||||
})
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
cost: '', // 成本价
|
||||
stock: '', // 库存
|
||||
ot_price: '', // 市场价
|
||||
procure_price: '', // 批发价
|
||||
wholesale_price: '', // 批发价
|
||||
bar_code: '', // 商品条码
|
||||
weight: '', // 重量
|
||||
volume: '', // 体积
|
||||
@ -137,7 +137,7 @@
|
||||
label: '批发价',
|
||||
type: 'digit',
|
||||
holder: '请填写批发价',
|
||||
model: 'procure_price',
|
||||
model: 'wholesale_price',
|
||||
require: true,
|
||||
})
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
cost: '', // 成本价
|
||||
stock: '', // 库存
|
||||
ot_price: '', // 市场价
|
||||
procure_price: '', // 结算价
|
||||
wholesale_price: '', // 批发价
|
||||
bar_code: '', // 商品条码
|
||||
weight: '', // 重量
|
||||
volume: '', // 体积
|
||||
@ -61,10 +61,10 @@
|
||||
require: true,
|
||||
},{
|
||||
id: 3,
|
||||
label: '结算价',
|
||||
label: '批发价',
|
||||
type: 'digit',
|
||||
holder: '请填写结算价',
|
||||
model: 'procure_price',
|
||||
holder: '请填写批发价',
|
||||
model: 'wholesale_price',
|
||||
require: true,
|
||||
}, {
|
||||
id: 10,
|
||||
@ -155,7 +155,7 @@
|
||||
|
||||
let userInfo = this.$store.state.app.userInfo;
|
||||
if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
|
||||
// 市级供应链才需填写结算价
|
||||
// 市级供应链才需填写批发价
|
||||
// if(userInfo.mer_info?.type_code=="TypeSupplyChain"){
|
||||
// let list = []
|
||||
// this.formList = [...list, ...this.formList]
|
||||
|
77
pages/product/addGood/components/uploadImgVideo.vue
Normal file
77
pages/product/addGood/components/uploadImgVideo.vue
Normal file
@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
|
||||
:maxCount="10"></u-upload>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
TOKENNAME,
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fileList1: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 删除图片
|
||||
deletePic(event) {
|
||||
this[`fileList${event.name}`].splice(event.index, 1)
|
||||
},
|
||||
// 新增图片
|
||||
async afterRead(event) {
|
||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||
let lists = [].concat(event.file)
|
||||
let fileListLen = this[`fileList${event.name}`].length
|
||||
lists.map((item) => {
|
||||
this[`fileList${event.name}`].push({
|
||||
...item,
|
||||
status: 'uploading',
|
||||
message: '上传中'
|
||||
})
|
||||
})
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
const result = await this.uploadFilePromise(lists[i].url)
|
||||
let item = this[`fileList${event.name}`][fileListLen]
|
||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||
status: 'success',
|
||||
message: '',
|
||||
url: result
|
||||
}))
|
||||
fileListLen++
|
||||
}
|
||||
},
|
||||
uploadFilePromise(url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let a = uni.uploadFile({
|
||||
url: HTTP_REQUEST_URL + '/api/upload/image/field',
|
||||
filePath: url,
|
||||
// formData: {
|
||||
// 'filename': rsp.path,
|
||||
// 'name': that.imgName
|
||||
// },
|
||||
header: {
|
||||
// #ifdef MP
|
||||
"Content-Type": "multipart/form-data",
|
||||
// #endif
|
||||
[TOKENNAME]: 'Bearer ' + this.$store.state.app.token
|
||||
},
|
||||
success: (res) => {
|
||||
setTimeout(() => {
|
||||
resolve(res.data.data)
|
||||
}, 1000)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
@ -6,6 +6,7 @@
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 156rpx;
|
||||
}
|
||||
|
||||
.bar-code{
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
@ -286,3 +287,10 @@
|
||||
background: #FD6523;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.popup_group_item_b{
|
||||
padding-left: 20rpx !important;
|
||||
.popup_group_item_label::before{
|
||||
color: #e93323;
|
||||
content: "* ";
|
||||
}
|
||||
}
|
@ -138,6 +138,7 @@
|
||||
"cost": "",
|
||||
"ot_price": "",
|
||||
"price": "",
|
||||
"wholesale_price": "",
|
||||
"volume": "",
|
||||
"weight": "",
|
||||
},
|
||||
@ -420,7 +421,7 @@
|
||||
// flag = false;
|
||||
// str = '成本价不能小于等于0';
|
||||
// }
|
||||
else if ((!item.procure_price||+item.procure_price<=0) && this.userInfo.mer_info.type_code == 'TypeSupplyChain') {
|
||||
else if ((!item.wholesale_price||+item.wholesale_price<=0) && this.userInfo.mer_info.wholesale) {
|
||||
flag = false;
|
||||
str = '批发价不能小于等于0';
|
||||
}
|
||||
|
929
pages/product/addGoodDetail/addGoodDetail.vue
Normal file
929
pages/product/addGoodDetail/addGoodDetail.vue
Normal file
@ -0,0 +1,929 @@
|
||||
<template>
|
||||
<view class='content'>
|
||||
<u--form :model="formData" :rules="rules" ref="formData" :labelStyle="{fontSize:'32rpx',color:'#444444'}"
|
||||
labelWidth='auto'>
|
||||
<view class="good-baseInfo card">
|
||||
<u-form-item label="商品标题" prop="store_name" ref="item1" required>
|
||||
<text slot='right'
|
||||
style="font-size:28rpx ; color:#989898 ;">{{stroeNameLength}}/{{maxLength}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label="" prop="userInfo.name" ref="item1">
|
||||
<u--textarea v-model="formData.store_name" placeholder="建议描述产品品牌、名称、规格、口味"
|
||||
style="background-color: #F9F9F9;height: 166rpx;" :maxlength='maxLength'></u--textarea>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="商品主图" prop="formData.imageList" ref="item1" required>
|
||||
<text style="color: #E18C34;font-size: 24rpx">上传时应注重真实性、清晰度、至少上传两张</text>
|
||||
</u-form-item>
|
||||
<view class="card" style="min-height: 150rpx;margin-bottom: 0;padding: 0;">
|
||||
<view class="" style="display: flex;flex-wrap: wrap;">
|
||||
<view v-for="(item,index) in formData.imageList"
|
||||
style="margin-right: 20rpx;margin-bottom: 20rpx;">
|
||||
<view class="video_list" v-if='vidioTypeList.includes(getSuffix(item))'>
|
||||
<view class="video_list_item photo" style="position: relative;">
|
||||
<view class="jiao">
|
||||
<!-- video标签在app端层级过高 -->
|
||||
<!--#ifndef APP-PLUS-->
|
||||
<video :src="item"></video>
|
||||
<!--#endif-->
|
||||
<!--#ifdef APP-PLUS-->
|
||||
<view class="" style="position: relative;">
|
||||
<img :src="item+coverUrl" style=" width:140rpx;height: 140rpx;"></img>
|
||||
<view class="image-play-icon">
|
||||
<u-icon name="play-right-fill" size="30" color="white"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!--#endif-->
|
||||
<image @click="formData.imageList.splice(index,1)"
|
||||
src="@/static/images/gban.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view style="position: absolute;top: 20rpx;z-index: 99;width: 140rpx;height: 100%;"
|
||||
@click="videoshow(index)">
|
||||
<view class="videoHover">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="position: relative;" v-else>
|
||||
<view class="jiao" @click="formData.imageList.splice(index,1)">
|
||||
<image src="@/static/images/gban.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<u--image @click="preViewImg(item)" :src="item" :fade="true" duration="450"
|
||||
width='140rpx' height='140rpx'></u--image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class='uploadimg' @click="show=true,isDetail=false">
|
||||
<u-icon name="plus" color="#777777"></u-icon>
|
||||
<view class="" style="color: #777777;font-size: 20rpx;">
|
||||
上传图片/视频
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-form-item label="商品详情" prop="formData.content.image" required>
|
||||
<text style="color: #E18C34;font-size: 24rpx">上传时应注重真实性、清晰度</text>
|
||||
</u-form-item>
|
||||
<view class="card" style="min-height: 150rpx;margin-bottom: 0;padding: 0;">
|
||||
<view class="" style="display: flex;flex-wrap: wrap;">
|
||||
<view v-for="(item,index) in formData.content.image"
|
||||
style="margin-right: 20rpx;margin-bottom: 20rpx;">
|
||||
<view class="video_list" v-if='vidioTypeList.includes(getSuffix(item))'>
|
||||
<view class="video_list_item photo" style="position: relative;">
|
||||
<view class="jiao" @click="formData.content.image.splice(index,1)">
|
||||
<!-- video标签在app端层级过高 -->
|
||||
<!--#ifndef APP-PLUS-->
|
||||
<video :src="item"></video>
|
||||
<!--#endif-->
|
||||
<!--#ifdef APP-PLUS-->
|
||||
<view class="" style="position: relative;">
|
||||
<img :src="item+coverUrl" style=" width:140rpx;height: 140rpx;"></img>
|
||||
<view class="image-play-icon">
|
||||
<u-icon name="play-right-fill" size="30" color="white"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!--#endif-->
|
||||
<image src="@/static/images/gban.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view style="position: absolute;top: 20rpx;z-index: 99;width: 140rpx;height: 100%;"
|
||||
@click="videoshow(index)">
|
||||
<view class="videoHover">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="position: relative;" v-else>
|
||||
<view class="jiao" @click="formData.content.image.splice(index,1)">
|
||||
<image src="@/static/images/gban.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<u--image @click="preViewImg(item)" :src="item" :fade="true" duration="450"
|
||||
width='140rpx' height='140rpx'></u--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class='uploadimg' @click="show=true,isDetail=true">
|
||||
<u-icon name="plus" color="#777777"></u-icon>
|
||||
<view class="" style="color: #777777;font-size: 20rpx;">
|
||||
上传图片/视频
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='tips'>
|
||||
商品类目属性
|
||||
</view>
|
||||
<view class="card" style="padding: 14rpx 30rpx;">
|
||||
<u-form-item label="商品分类" prop="cate_name" ref="item1" labelPosition="left" required>
|
||||
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
|
||||
@click="navgo(`/pages/product/addGoodDetail/goodsType?mer_id=${mer_id}&&formData=${JSON.stringify(formData)}`)">
|
||||
<view style="margin-right: 10rpx;line-height: 25rpx;">{{ formData.cate_name|| '请选择'}}</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="商品属性" prop="userInfo.name" ref="item1" labelPosition="left">
|
||||
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
|
||||
@click="navgo(`/pages/product/addGoodDetail/goodsAttr?mer_id=${mer_id}&&formData=${JSON.stringify(formData)}`)">
|
||||
<view style="margin-right: 10rpx;line-height: 25rpx;">
|
||||
{{isSet(formData.product_attribute)?'已设置':'未设置' }}
|
||||
</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class='tips'>
|
||||
规格与价格
|
||||
</view>
|
||||
<view class="card" style="min-height: 100rpx;padding: 14rpx 30rpx;">
|
||||
|
||||
<u-form-item label="规格与价格" prop="formData.attrValue" ref="item1" labelPosition="left" required>
|
||||
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
|
||||
@click="navgo(`/pages/product/addGoodDetail/goodsPrice?formData=${JSON.stringify(formData)}&&mer_id=${mer_id}`)">
|
||||
<view style="margin-right: 10rpx;line-height: 25rpx;">{{sets?"已设置":""}}
|
||||
</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<view class="" v-if="showSet">
|
||||
<view class="" v-for="(item,index) in formData.attrValue.filter(item=> item.is_use==0)">
|
||||
<view class="" v-if='formData.attrValue.filter(item=> item.is_use==0).length==1'>
|
||||
<u-form-item v-if='isWholeSale == 2 || isWholeSale == 1' label="批发价格" label-width="auto"
|
||||
labelPosition="left" border-bottom>
|
||||
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
||||
{{item.wholesale_price}}元/{{item.wholesale_unit_name}}
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item v-if='isWholeSale == 2 || isWholeSale == 0' label="零售价格" label-width="auto"
|
||||
labelPosition="left" border-bottom>
|
||||
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
||||
{{item.price}}元/{{item.unit_name}}
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="商品库存" label-width="auto" labelPosition="left" border-bottom>
|
||||
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
||||
{{item.stock}}
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<u-form-item :label="item.sku" label-width="350rpx" prop="userInfo.name" ref="item1"
|
||||
labelPosition="left" border-bottom v-if='isWholeSale == 2 || isWholeSale == 0'>
|
||||
<view class="" style="display: flex;justify-content: space-between;width: 100%">
|
||||
<view style="font-size: 28rpx;color:#777777 ;">
|
||||
零售价
|
||||
</view>
|
||||
<view style="font-size: 28rpx;color:#777777 ;">
|
||||
{{item.price}}元/{{item.unit_name}}
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label=" " label-width="350rpx" prop="userInfo.name" ref="item1"
|
||||
labelPosition="left" border-bottom v-if='isWholeSale == 2 || isWholeSale == 1'>
|
||||
<view class="" style="display: flex;justify-content: space-between;width: 100%">
|
||||
<view style="font-size: 28rpx;color:#777777 ;">
|
||||
批发价
|
||||
</view>
|
||||
<view style="font-size: 28rpx;color:#777777 ;">
|
||||
{{item.wholesale_price}}元/{{item.wholesale_unit_name}}
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='tips'>
|
||||
|
||||
</view>
|
||||
<view class="card" style="padding: 14rpx 30rpx;">
|
||||
<u-form-item label="商品详细描述" prop="userInfo.name" ref="item1" labelPosition="left">
|
||||
<text slot='right' style="font-size:28rpx ; color:#989898 ;">{{storeInfoLength}}/{{300}}</text>
|
||||
</u-form-item>
|
||||
<u--textarea v-model="formData.store_info" placeholder="货品描述请严格遵循《广告法》规定,避免出现虚假宣传和误导消费者的词语"
|
||||
style="background-color: #F9F9F9;height: 166rpx;" :maxlength='300'></u--textarea>
|
||||
|
||||
<u-line color="#F3F3F3" style="margin: 30rpx 0;"></u-line>
|
||||
|
||||
<u-form-item label="送货方式" labelPosition="left" prop='delivery_way' required>
|
||||
<u-checkbox-group v-model="formData.delivery_way" placement="row" slot="right">
|
||||
<u-checkbox shape="circle" v-for="(item, index) in checkboxList1" :key="index"
|
||||
:label="item.name" :name="item.value" activeColor="#20B128"
|
||||
:customStyle="{marginRight: '8px'}"
|
||||
:labelColor="checkboxValue1.includes(item.name)?'#20B128':'#777777'">
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u--form>
|
||||
<view class="submit-btn">
|
||||
<u-button text="确认发布" @click="submit" color="#33BB3C" class="custom-style"></u-button>
|
||||
</view>
|
||||
|
||||
<view class="overlay">
|
||||
<u-overlay :show="showlay">
|
||||
<view class="overlay-content">
|
||||
<view class="">
|
||||
温馨提示
|
||||
</view>
|
||||
<view class="" style="font-size: 36rpx;">
|
||||
发布中断可能导致商机流失
|
||||
</view>
|
||||
<view class="" style="font-size: 26rpx;color: #777777;">
|
||||
<view class="">
|
||||
您的商品信息已经填写了大半,
|
||||
</view>
|
||||
<view class="">
|
||||
只差最后几步就能上架销售了!
|
||||
</view>
|
||||
</view>
|
||||
<view class=""
|
||||
style="font-size: 28rpx;color: #444444;background-color: #EDF8ED;padding: 20rpx 44rpx;border-radius: 12rpx;">
|
||||
<view class="">
|
||||
越早发布产品<text style='color: #21B129;'>曝光量越高</text>
|
||||
</view>
|
||||
<view class="">
|
||||
越早发布产品可提前 <text style='color: #21B129;'>抢占商机</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;">
|
||||
<view style="width: 236rpx;height: 84rpx;margin-right: 30rpx;">
|
||||
<u-button text="确定返回" @click='back'></u-button>
|
||||
</view>
|
||||
<view style="width: 236rpx;height: 84rpx;">
|
||||
<u-button type='primary' text="继续编辑" @click='showlay=false'></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</view>
|
||||
|
||||
<u-picker :show="show" :columns="columns" confirmColor='#33BB3C' @close='show=false' @confirm='choseMedia'
|
||||
@cancel='show=false'></u-picker>
|
||||
|
||||
<view v-if="showVideo" class="video-count">
|
||||
<video id="myVideo" class="videoLink" autoplay loop muted
|
||||
:src=" isDetail?formData.content.image[videoIndex]: formData.imageList[videoIndex]"></video>
|
||||
</view>
|
||||
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
seachBarCodeAPI
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
Toast,
|
||||
Modal
|
||||
} from "@/libs/uniApi.js";
|
||||
import {
|
||||
HTTP_REQUEST_URL,
|
||||
TOKENNAME
|
||||
} from '@/config/app.js';
|
||||
import store from 'store';
|
||||
import {
|
||||
productCreate,
|
||||
productUpdate,
|
||||
productDetail
|
||||
} from '@/api/product.js';
|
||||
import uploadImgVideo from "../addGood/components/uploadImgVideo.vue"
|
||||
import form from "../../../uni_modules/uview-ui/libs/config/props/form";
|
||||
export default {
|
||||
components: {
|
||||
uploadImgVideo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
coverUrl: '?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast',
|
||||
mode: 'add',
|
||||
isDetail: false,
|
||||
columns: [
|
||||
['图片', '视频', ]
|
||||
],
|
||||
sets: false,
|
||||
showVideo: false,
|
||||
vidioTypeList: ['mp4', 'avi', 'mov', 'wmv', 'mkv', 'flv', 'mpeg', '3gp', 'webm'],
|
||||
videoIndex: 0,
|
||||
upload_max: 100,
|
||||
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
|
||||
show: false, //选择图片还是视屏
|
||||
showSet: false,
|
||||
delivery_way: [],
|
||||
isWholeSale: '',
|
||||
formData: {
|
||||
store_info: "",
|
||||
product_id: "",
|
||||
"store_name": "",
|
||||
"imageList": [],
|
||||
attr: [{
|
||||
detail: [{
|
||||
attr: 'name'
|
||||
}],
|
||||
value: " "
|
||||
}, ],
|
||||
"attrValue": [{
|
||||
detail: {},
|
||||
"price": "",
|
||||
"unit_name": "",
|
||||
"wholesale_unit_name": "",
|
||||
"wholesale_price": '',
|
||||
"cost": "",
|
||||
"stock": "",
|
||||
sku: '',
|
||||
"ot_price": "",
|
||||
"procure_price": "",
|
||||
"bar_code": "",
|
||||
"weight": "",
|
||||
"extension_one": "",
|
||||
"extension_two": "",
|
||||
uuid: "",
|
||||
volume: "",
|
||||
"is_use": 0,
|
||||
}],
|
||||
"cate_name": "",
|
||||
"unit_name": "",
|
||||
"cate_id": '',
|
||||
"mer_cate_id": [],
|
||||
"mer_cate_name": "",
|
||||
"spec_type": "",
|
||||
"specifica": "",
|
||||
"delivery_way": [],
|
||||
"delivery_free": "1",
|
||||
"temp_id": "",
|
||||
"tempName": "",
|
||||
"once_min_count": "",
|
||||
"image": "",
|
||||
"slider_image": [""],
|
||||
"is_good": 0,
|
||||
"is_gift_bag": 0,
|
||||
"sort": "",
|
||||
"once_count": "",
|
||||
"video_link": "",
|
||||
"content": {
|
||||
"title": "",
|
||||
"image": []
|
||||
},
|
||||
"stock": "",
|
||||
product_attribute: {
|
||||
address: "",
|
||||
leval: "",
|
||||
pack: "",
|
||||
attr: [{
|
||||
label: "",
|
||||
value: ''
|
||||
}]
|
||||
}
|
||||
},
|
||||
mer_id: "",
|
||||
maxLength: 30,
|
||||
fileList6: [],
|
||||
showSex: false,
|
||||
showlay: false,
|
||||
go: true,
|
||||
model1: {
|
||||
userInfo: {
|
||||
name: '',
|
||||
sex: '',
|
||||
},
|
||||
},
|
||||
range: [{
|
||||
value: 0,
|
||||
text: "篮球"
|
||||
}, {
|
||||
value: 1,
|
||||
text: "足球"
|
||||
}, {
|
||||
value: 2,
|
||||
text: "游泳"
|
||||
}],
|
||||
text: "",
|
||||
text1: "",
|
||||
value1: "",
|
||||
checkboxValue1: [],
|
||||
checkboxList1: [{
|
||||
name: '到店核销',
|
||||
value: '1',
|
||||
}, {
|
||||
name: '快递配送',
|
||||
value: '2',
|
||||
}],
|
||||
attrRules: {
|
||||
price: '单价不能为空',
|
||||
unit_name: '计量单位不能为空',
|
||||
wholesale_price: '批发价格不能为空',
|
||||
wholesale_unit_name: '批发单位不能为空',
|
||||
stock: '库存不能为空'
|
||||
},
|
||||
rules: {
|
||||
"formData.imageList": [{
|
||||
validator: (rule, value, callback) => {
|
||||
return this.formData.imageList.length >= 2
|
||||
},
|
||||
message: '请至少上传2张图片',
|
||||
trigger: ['change', 'blur'],
|
||||
}],
|
||||
"formData.attrValue": [{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!this.isWholeSale) {
|
||||
delete this.attrRules.wholesale_unit_name
|
||||
delete this.attrRules.wholesale_price
|
||||
}
|
||||
let errList = []
|
||||
this.formData.attrValue.forEach(item => {
|
||||
for (let key in this.attrRules) {
|
||||
if (!item[key]) {
|
||||
errList.push(this.rules[key])
|
||||
}
|
||||
}
|
||||
})
|
||||
return errList.length == 0
|
||||
},
|
||||
message: '请填写完整商品规格',
|
||||
trigger: ['change', 'blur'],
|
||||
}],
|
||||
'store_name': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写商品标题',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'cate_name': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写商品分类',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'delivery_way': {
|
||||
validator: (rule, value, callback) => {
|
||||
return this.formData.delivery_way.length > 0
|
||||
},
|
||||
required: true,
|
||||
message: '请选择送货方式',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'formData.content.image': {
|
||||
validator: (rule, value, callback) => {
|
||||
return this.formData.content.image.length > 0
|
||||
},
|
||||
required: true,
|
||||
message: '请上传商品详情图',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
},
|
||||
radio: '',
|
||||
switchVal: false
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
stroeNameLength() {
|
||||
return this.formData.store_name?.length || 0
|
||||
},
|
||||
storeInfoLength() {
|
||||
return this.formData.store_info?.length || 0
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
preViewImg(url) {
|
||||
let that = this
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
});
|
||||
},
|
||||
deleteImage(index) {
|
||||
// this.addGoodsSecoundData.video_link = '';
|
||||
},
|
||||
videoshow(index) {
|
||||
this.videoIndex = index
|
||||
this.showVideo = true
|
||||
this.videoContext = uni.createVideoContext('myVideo', this);
|
||||
this.$nextTick(() => {
|
||||
this.videoContext.play();
|
||||
})
|
||||
},
|
||||
getSuffix(url) {
|
||||
const str = url;
|
||||
const lastIndex = str.lastIndexOf(".");
|
||||
if (lastIndex !== -1) {
|
||||
const extension = str.substring(lastIndex + 1);
|
||||
return extension
|
||||
} else {
|
||||
return 'asdasdsadsd'
|
||||
}
|
||||
},
|
||||
choseMedia(e) {
|
||||
this.show = false
|
||||
if (e.value[0] == '图片') {
|
||||
this.handleChooseImage()
|
||||
|
||||
} else {
|
||||
this.uploadVideo()
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 选择图片
|
||||
handleChooseImage() {
|
||||
let that = this;
|
||||
that.$util.uploadImages({
|
||||
count: 6,
|
||||
url: 'upload/image'
|
||||
}, function(res) {
|
||||
if (that.isDetail) {
|
||||
that.formData.content.image.push(res.data.path.replace(
|
||||
/\\/g, ""));
|
||||
|
||||
} else {
|
||||
that.$set(that.formData.imageList, that.formData.imageList.length, res.data.path.replace(
|
||||
/\\/g,
|
||||
""));
|
||||
}
|
||||
// that.formData.imageList.push(res.data.path);
|
||||
});
|
||||
},
|
||||
// 上传视频
|
||||
uploadVideo() {
|
||||
let that = this
|
||||
uni.chooseVideo({
|
||||
sourceType: ['camera', 'album'],
|
||||
success: res => {
|
||||
uni.showLoading({
|
||||
title: '正在上传中。。。'
|
||||
});
|
||||
if (Math.ceil(res.size / 1024) < this.upload_max * 1024) {
|
||||
uni.uploadFile({
|
||||
url: this.uploadUrl, //仅为示例,非真实的接口地址
|
||||
filePath: res.tempFilePath,
|
||||
name: 'file',
|
||||
header: {
|
||||
// #ifdef MP
|
||||
'Content-Type': 'multipart/form-data',
|
||||
// #endif
|
||||
[TOKENNAME]: 'Bearer ' + store.state.app.token
|
||||
},
|
||||
success: uploadFileRes => {
|
||||
uni.hideLoading();
|
||||
let data = JSON.parse(uploadFileRes.data);
|
||||
if (that.isDetail) {
|
||||
that.formData.content.image.push(data.data.src.replace(
|
||||
/\\/g, ""));
|
||||
|
||||
} else {
|
||||
that.formData.imageList.push(data.data.src.replace(/\\/g,
|
||||
""))
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
complete: a => {
|
||||
// console.log(a);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `视频超出限制${this.upload_max}MB,已过滤`
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
isSet(obj) {
|
||||
for (let key in obj) {
|
||||
if (typeof obj[key] == 'object') this.isSet(obj[key])
|
||||
else {
|
||||
if (Boolean(obj[key])) return 'true12';
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
isSet2(obj) {
|
||||
let lists = ['unit_name', 'price', 'wholesale_price', 'stock']
|
||||
lists.forEach(item => {
|
||||
if (Boolean(this.formData.attrValue[0][item])) {
|
||||
this.sets = true
|
||||
}
|
||||
})
|
||||
},
|
||||
sexSelect(e) {
|
||||
this.model1.userInfo.sex = e.name
|
||||
this.$refs.uForm.validateField('userInfo.sex')
|
||||
},
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
back() {
|
||||
this.go = false;
|
||||
let delta = uni.getStorageSync('delta') || 1;
|
||||
uni.navigateBack({
|
||||
delta: delta,
|
||||
success() {
|
||||
uni.removeStorageSync('delta');
|
||||
}
|
||||
})
|
||||
},
|
||||
showlayFn() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
getAttr(object) {
|
||||
this.formData.product_attribute = object
|
||||
},
|
||||
getAttrValue(object) {
|
||||
this.formData.attrValue = object
|
||||
},
|
||||
async handAdd() {
|
||||
let that = this
|
||||
let data = uni.$u.deepClone(this.formData)
|
||||
data.image = data.imageList.find(item => {
|
||||
return !this.vidioTypeList.includes(this.getSuffix(item))
|
||||
})
|
||||
data.slider_image = this.formData.imageList.filter((item, index) => index != 0)
|
||||
that.formData.product_id ?
|
||||
productUpdate(that.mer_id, that.formData.product_id, data)
|
||||
.then(res => {
|
||||
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
|
||||
if (this.import == 1) {
|
||||
uni.$emit('importAttrValueOK', this.setFormData.import_id);
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/list/index?mer_id=${that.mer_id}&type=6`
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.navigateBack()
|
||||
})
|
||||
})
|
||||
.catch(rej => {
|
||||
// Toast(rej);
|
||||
}) :
|
||||
productCreate(that.mer_id, data)
|
||||
.then(res => {
|
||||
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
|
||||
if (this.import == 1) {
|
||||
uni.$emit('importAttrValueOK', this.setFormData.import_id);
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`
|
||||
})
|
||||
})
|
||||
})
|
||||
.catch(rej => {
|
||||
// Toast(rej);
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.$refs.formData.validate().then(res => {
|
||||
this.handAdd()
|
||||
}).catch(errors => {
|
||||
uni.$u.toast(errors[0].message)
|
||||
})
|
||||
|
||||
},
|
||||
oldToNew(formData) {
|
||||
if (formData.attr.length <= 1) return
|
||||
formData.attr.splice(1, 999)
|
||||
formData.attr[0].value = ' '
|
||||
formData.attr[0].detail = formData.attrValue.map(item => item.sku)
|
||||
|
||||
formData.attrValue.forEach((item, index) => {
|
||||
item.detail = {}
|
||||
item.detail[' '] = formData.attr[0].detail[index]
|
||||
})
|
||||
this.formData = formData
|
||||
},
|
||||
|
||||
|
||||
async initFormData(option) {
|
||||
// if (this.$store.state.app.userInfo?.mer_info?.wholesale == 0) {
|
||||
// this.isWholeSale = false;
|
||||
// } else {
|
||||
// this.isWholeSale = true;
|
||||
// }
|
||||
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale;
|
||||
|
||||
|
||||
this.mer_id = option.mer_id
|
||||
if (option.formData) {
|
||||
this.formData = JSON.parse(option.formData)
|
||||
}
|
||||
if (option.goodsInfoId) {
|
||||
|
||||
let res = await await seachBarCodeAPI({
|
||||
id: option.goodsInfoId,
|
||||
name: option.name
|
||||
})
|
||||
let goods = res.data.list[0]
|
||||
console.log(goods)
|
||||
this.formData.store_name = goods.store_name
|
||||
this.formData.imageList = [goods.image, ...goods.slider_image]
|
||||
this.formData.attrValue[0].bar_code = goods.bar_code
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(option) {
|
||||
this.initFormData(option)
|
||||
this.showSet = option.showSet ? JSON.parse(option.showSet) : this.showSet
|
||||
this.isSet2()
|
||||
this.formData.delivery_way = this.$store.state.app.userInfo?.mer_info.delivery_way.split(',');
|
||||
|
||||
if (this.formData.delivery_way.length == 1) {
|
||||
|
||||
let checkboxList1 = uni.getStorageSync('checkboxList1');
|
||||
if (checkboxList1 && checkboxList1.length > 0) {
|
||||
this.checkboxList1 = checkboxList1;
|
||||
} else {
|
||||
this.checkboxList1 = this.checkboxList1.filter(item => {
|
||||
return item.value == this.formData.delivery_free[0]
|
||||
});
|
||||
uni.setStorageSync('checkboxList1', this.checkboxList1)
|
||||
}
|
||||
}
|
||||
if (option.product_id) {
|
||||
this.formData.product_id = option.product_id
|
||||
this.mode = 'edit'
|
||||
this.showSet = true
|
||||
productDetail(option.mer_id, option.product_id).then(res => {
|
||||
Object.assign(this.formData, res.data)
|
||||
this.$set(this.formData, "imageList", res.data.image_list)
|
||||
this.formData.product_attribute = JSON.parse(this.formData.product_attribute)
|
||||
this.formData.cate_name = this.formData.storeCategory.cate_name
|
||||
this.formData.cate_id = this.formData.storeCategory.store_category_id
|
||||
delete this.formData.image_list
|
||||
if (!this.formData.imageList) this.formData.imageList = []
|
||||
this.oldToNew(this.formData)
|
||||
if (this.formData.delivery_free.length == 1) {
|
||||
this.checkboxList1 = this.checkboxList1.filter(item => {
|
||||
return item.value == this.formData.delivery_free[0]
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onBackPress: function(e) {
|
||||
this.showlay = true
|
||||
return this.go;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.content {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
background-color: #F1F1F1;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 280rpx;
|
||||
padding: 20rpx 20rpx 200rpx 20rpx;
|
||||
|
||||
.card {
|
||||
background-color: white;
|
||||
padding: 28rpx 30rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.uploadimg {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 16rpx;
|
||||
border: 2rpx solid #F1F1F1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tips {
|
||||
color: #777777;
|
||||
font-size: 28rpx;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
position: fixed;
|
||||
bottom: 50rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 670rpx;
|
||||
border-radius: 40rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.overlay-content {
|
||||
width: 570rpx;
|
||||
height: 640rpx;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
border-radius: 16rpx;
|
||||
background-image: url('/static/images/addGodd/addGoodBg.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 70rpx 0 40rpx 0;
|
||||
}
|
||||
|
||||
.jiao {
|
||||
image {
|
||||
position: absolute;
|
||||
top: -14rpx;
|
||||
right: -14rpx;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
border-radius: 50%;
|
||||
padding: 8rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
video {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.preview_video {
|
||||
position: absolute;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.content_list_video {
|
||||
min-height: 154rpx;
|
||||
padding: 23rpx 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.content_list_video_title {
|
||||
/* padding-top: 10rpx; */
|
||||
}
|
||||
}
|
||||
|
||||
.video-count {
|
||||
position: fixed;
|
||||
width: 600rpx;
|
||||
height: 500rpx;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -300rpx;
|
||||
margin-top: -250rpx;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.videoLink {
|
||||
width: 600rpx;
|
||||
height: 500rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.video-text {
|
||||
color: red;
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
/* position: absolute; */
|
||||
}
|
||||
|
||||
.image-play-icon {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
</style>
|
512
pages/product/addGoodDetail/goodsAttr.vue
Normal file
512
pages/product/addGoodDetail/goodsAttr.vue
Normal file
@ -0,0 +1,512 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<u--form :model="model1" ref="uForm" labelPosition="left" :labelStyle="{fontSize:'32rpx',color:'#444444'}"
|
||||
labelWidth='120' borderBottom style="padding-bottom: 100rpx;">
|
||||
|
||||
<view class="description">
|
||||
产品属性
|
||||
</view>
|
||||
<view class="label-cls">
|
||||
<u-form-item label="产地" prop="userInfo.name" ref="item1">
|
||||
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
|
||||
@click="showPouple=true,popType='place',getLocation()">
|
||||
<view style="margin-right: 10rpx;line-height: 25rpx;">
|
||||
{{formData.product_attribute.address||'请选择'}}
|
||||
</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="商品等级" prop="userInfo.name" ref="item1">
|
||||
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
|
||||
@click="showPouple=true,popType='leval'">
|
||||
<view style="margin-right: 10rpx;line-height: 25rpx;">
|
||||
{{formData.product_attribute.leval||'请选择'}}
|
||||
</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="货品包装" prop="userInfo.name" ref="item1">
|
||||
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
|
||||
@click="showPouple=true,popType='packing'">
|
||||
<view style="margin-right: 10rpx;line-height: 25rpx;">{{formData.product_attribute.pack||'请选择'}}
|
||||
</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="description" style="display: flex;justify-content: space-between;align-items: center">
|
||||
<text>产品属性</text>
|
||||
<view class="attr-custom" @click="formData.product_attribute.attr.push({label:'',value:''})">
|
||||
<u-icon name="plus" color='#20B128' style="margin-right: 8rpx;font-weight: bold;"></u-icon> 自定义
|
||||
</view>
|
||||
</view>
|
||||
<view class="label-cls"
|
||||
style="display: flex;padding: 20rpx 20rpx 20rpx 2rpx;justify-content: space-between;margin-bottom: 30rpx;"
|
||||
v-for="(item,index) in formData.product_attribute.attr">
|
||||
<view class="" style="display: flex;width: 70%;align-items: center;">
|
||||
<u--input placeholder="请填写属性名称" border="surround" v-model="item.label"></u--input>
|
||||
<u-line direction="col" length="40rpx" color="#CECECE"></u-line>
|
||||
<u--input placeholder="请填写属性值" border="surround" v-model="item.value"></u--input>
|
||||
<u-line direction="col" length="40rpx" color="#CECECE"></u-line>
|
||||
</view>
|
||||
<view style="color: #777777;display: flex; align-items: center;"
|
||||
@click="formData.product_attribute.attr.splice(index, 1);">
|
||||
<u-icon name="trash" style='margin-right: 8rpx;'></u-icon> 删除
|
||||
</view>
|
||||
</view>
|
||||
</u--form>
|
||||
<view class="submit-btn">
|
||||
<u-button type="primary" shape="circle" text="保存" @click="submit"></u-button>
|
||||
</view>
|
||||
|
||||
|
||||
<u-popup :show="showPouple" @close="showPouple=false,positionType=0" @open="showPouple=true" :round="10">
|
||||
<view class="RegularFont" style="padding: 42rpx 40rpx">
|
||||
<view class="pop-head">
|
||||
<text v-if="popType=='place' || !show " @click="showPouple=false,positionType=0">取消</text>
|
||||
<text v-else @click="show=false"><u-icon name="arrow-left" size="20"></u-icon></text>
|
||||
<text
|
||||
style="font-size:32rpx ;color:#333333 ;">{{popType=='place'?'商品产地': popType=='leval'?'商品等级':'商品包装' }}
|
||||
</text>
|
||||
<text @click="confirm">确定</text>
|
||||
</view>
|
||||
<!-- 地区 -->
|
||||
<view v-if="popType=='place'">
|
||||
<view class="Positioning " style="color: #989898;margin-bottom: 30rpx;">
|
||||
<view class="" style="display: flex;" @click="confirm">
|
||||
<u-icon name="map" style='margin-right: 8rpx;'></u-icon>
|
||||
<text>{{(address.province+address.city+address.district )||errMag}} </text>
|
||||
</view>
|
||||
<view class="" @click="getLocation">
|
||||
刷新定位
|
||||
</view>
|
||||
</view>
|
||||
<u-line color="#CECECE"></u-line>
|
||||
<view class="province">
|
||||
<view class="province-li" @click='positionType=0,positionList=provinceList'
|
||||
:style="{color:positionType==0?'#20B128':'#707070'} ">
|
||||
{{address.province||'请选择' }}
|
||||
</view>
|
||||
<view class="province-li" @click='choseCity'
|
||||
:style="{color:positionType==1?'#20B128':'#707070'} ">
|
||||
{{address.city ||'请选择'}}
|
||||
</view>
|
||||
<view class="province-li" @click='choseArea'
|
||||
:style="{color:positionType==2?'#20B128':'#707070'} ">
|
||||
{{address.district ||'请选择'}}
|
||||
</view>
|
||||
<view class="province-line" :style="{left:positionType*130+30+'rpx'}" />
|
||||
</view>
|
||||
<u-line color="#CECECE"></u-line>
|
||||
<view class="" style="color:#989898;font-size:24rpx ;margin-top: 40rpx;">
|
||||
请选择
|
||||
</view>
|
||||
<view class="position-content">
|
||||
<view class="position-li" :class="{act:address[wacthType()]==item.name}"
|
||||
v-for="item in positionList" @click="chosePosition(item)">
|
||||
<text>
|
||||
{{item.name}}
|
||||
</text>
|
||||
<u-icon v-if='address[wacthType()]==item.name' name="checkbox-mark" color="#38BE41"
|
||||
style='margin-left: 8rpx;'></u-icon>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 地区结束 -->
|
||||
|
||||
<!-- 商品等级 -->
|
||||
<view v-if="popType=='leval'" style="height: 500rpx;">
|
||||
<u-transition :show="!show" mode="slide-right">
|
||||
<view class="goods-leval">
|
||||
<view class="goods-leval-li" :class="{act:formData.product_attribute.leval==item}"
|
||||
v-for='item in levalList'
|
||||
@click="formData.product_attribute.leval=item,showPouple=false">
|
||||
{{item}}
|
||||
</view>
|
||||
<view class="goods-leval-li " style="display: flex;color:#38BE41;" @click="show=true">
|
||||
<u-icon name="plus" color="#38BE41" style='margin-right: 8rpx;'></u-icon> 自定义
|
||||
</view>
|
||||
</view>
|
||||
</u-transition>
|
||||
<u-transition :show="show" mode="slide-left">
|
||||
<view class="transition">
|
||||
<u--textarea v-model="selfLeval" placeholder="请输入商品等级"></u--textarea>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
<!-- 商品等级结束 -->
|
||||
|
||||
<!-- 商品包装 -->
|
||||
<view v-if="popType=='packing'" style="height: 500rpx;">
|
||||
<u-transition :show="!show" mode="slide-right">
|
||||
<view class="goods-leval">
|
||||
<view class="goods-leval-li" :class="{act:formData.pack==item}" v-for='item in packList'
|
||||
@click="formData.product_attribute.pack=item,showPouple=false">
|
||||
{{item}}
|
||||
</view>
|
||||
|
||||
<view class="goods-leval-li " style="display: flex;color:#38BE41 ;" @click="show=true">
|
||||
<u-icon name="plus" color="#38BE41" style='margin-right: 8rpx;'></u-icon> 自定义
|
||||
</view>
|
||||
</view>
|
||||
</u-transition>
|
||||
<u-transition :show="show" mode="slide-left">
|
||||
<view class="transition">
|
||||
<u--textarea v-model="selfPack" placeholder="请输入商品等级"></u--textarea>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getGeocoder,
|
||||
} from '@/api/store.js';
|
||||
import {
|
||||
getProvince,
|
||||
getCity,
|
||||
getArea
|
||||
} from "@/api/common.js"
|
||||
import {
|
||||
formatDate
|
||||
} from '../../../libs/uniApi';
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
errMag: "",
|
||||
provinceList: [],
|
||||
cityList: [],
|
||||
districtList: [],
|
||||
positionList: [],
|
||||
areaList: [],
|
||||
districtList: [],
|
||||
posType: {
|
||||
|
||||
},
|
||||
selfLeval: "",
|
||||
levalList: [
|
||||
"优等品",
|
||||
"一等品",
|
||||
"合格品",
|
||||
],
|
||||
selfPack: "",
|
||||
packList: [
|
||||
"盒装",
|
||||
"箱装",
|
||||
"袋装",
|
||||
"盆装",
|
||||
"泡沫箱"
|
||||
],
|
||||
address: {
|
||||
province: '',
|
||||
province_code: '',
|
||||
city: "",
|
||||
city_code: "",
|
||||
district: "",
|
||||
district_code: ""
|
||||
},
|
||||
|
||||
show: false,
|
||||
popType: 'leval',
|
||||
showPouple: false,
|
||||
showSex: false,
|
||||
positionType: 0,
|
||||
data: {},
|
||||
formData: {
|
||||
// address: "",
|
||||
// leval: "",
|
||||
// pack: "",
|
||||
// attr: [{
|
||||
// label: "",
|
||||
// value: ''
|
||||
// }]
|
||||
},
|
||||
|
||||
model1: {
|
||||
userInfo: {
|
||||
name: '',
|
||||
sex: '',
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
sexSelect(e) {
|
||||
this.model1.userInfo.sex = e.name
|
||||
this.$refs.uForm.validateField('userInfo.sex')
|
||||
},
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
if (this.popType == 'place') {
|
||||
this.formData.product_attribute.address = this.address.province + this.address.city + this.address
|
||||
.district
|
||||
} else if (this.popType == 'leval') {
|
||||
this.levalList.push(this.selfLeval)
|
||||
this.formData.product_attribute.leval = this.levalList[this.levalList.length - 1]
|
||||
this.selfLeval = ''
|
||||
|
||||
} else if (this.popType == 'packing') {
|
||||
this.packList.push(this.selfPack)
|
||||
this.formData.pack = this.packList[this.packList.length - 1]
|
||||
this.selfPack = ''
|
||||
}
|
||||
this.show = false
|
||||
this.showPouple = false
|
||||
},
|
||||
chosePosition(item) {
|
||||
if (this.positionType == 0) {
|
||||
this.address.province = item.name
|
||||
this.address.province_code = item.code
|
||||
this.address.city = ''
|
||||
this.address.district = ''
|
||||
|
||||
} else if (this.positionType == 1) {
|
||||
this.address.city = item.name
|
||||
this.address.city_code = item.code
|
||||
this.address.district = ''
|
||||
console.log(this.address)
|
||||
} else {
|
||||
this.address.district = item.name
|
||||
this.address.district_code = item.code
|
||||
}
|
||||
|
||||
},
|
||||
wacthType() {
|
||||
if (this.positionType == 0) return "province";
|
||||
else if (this.positionType == 1) return "city";
|
||||
else if (this.positionType == 2) return "district";
|
||||
},
|
||||
choseCity() {
|
||||
this.positionType = 1;
|
||||
getCity({
|
||||
province_code: this.address.province_code
|
||||
}).then(res => {
|
||||
this.cityList = res.data
|
||||
this.positionList = this.cityList
|
||||
this.cityList.forEach(item => {
|
||||
if (this.address.city == item.name) {
|
||||
this.address.city_code = item.code
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
choseArea() {
|
||||
this.positionType = 2;
|
||||
console.log(this.address)
|
||||
getArea({
|
||||
city_code: this.address.city_code
|
||||
}).then(res => {
|
||||
this.areaList = res.data
|
||||
this.positionList = this.areaList
|
||||
|
||||
})
|
||||
},
|
||||
getLocation() {
|
||||
let that = this
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function(res) {
|
||||
console.log(res, 'res')
|
||||
getGeocoder({
|
||||
lat: res.latitude,
|
||||
long: res.longitude
|
||||
}).then(res1 => {
|
||||
that.address = res1.data.address_component
|
||||
that.positionList = that.provinceList
|
||||
that.provinceList.forEach(item => {
|
||||
if (that.address.province == item.name) {
|
||||
that.address.province_code = item.code
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log("获取位置失败")
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
fail: function(err) {
|
||||
that.errMag = "获取位置失败,请手动先择"
|
||||
console.log('sad', err)
|
||||
}
|
||||
});
|
||||
},
|
||||
submit() {
|
||||
let that = this
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${that.mer_id}&&formData=${JSON.stringify(that.formData) }`
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(option) {
|
||||
getProvince().then(res => {
|
||||
this.provinceList = res.data
|
||||
this.positionList = res.data
|
||||
})
|
||||
this.formData = JSON.parse(option.formData)
|
||||
if (option.mer_id) {
|
||||
this.mer_id = option.mer_id
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.MediumFont {}
|
||||
|
||||
.RegularFont {}
|
||||
|
||||
.content {
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
background-color: #F1F1F1;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.label-cls {
|
||||
background-color: white;
|
||||
padding: 8rpx 30rpx;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
}
|
||||
|
||||
.description {
|
||||
background-color: #F1F1F1;
|
||||
padding: 30rpx 0rpx;
|
||||
font-size: 28rpx;
|
||||
color: #777777;
|
||||
width: 690rpx;
|
||||
}
|
||||
|
||||
.attr-custom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #38BE41;
|
||||
background-color: #E0EFE1;
|
||||
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
||||
padding: 7rpx 10rpx;
|
||||
color: #20B128;
|
||||
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
position: fixed;
|
||||
bottom: 50rpx;
|
||||
width: 670rpx;
|
||||
}
|
||||
|
||||
.pop-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #20B128;
|
||||
margin-bottom: 42rpx;
|
||||
}
|
||||
|
||||
.Positioning {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.province {
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.province-li {
|
||||
color: #707070;
|
||||
font-size: 32rpx;
|
||||
margin: 30rpx 40rpx 30rpx 0;
|
||||
}
|
||||
|
||||
.province-line {
|
||||
position: absolute;
|
||||
height: 2px;
|
||||
width: 40rpx;
|
||||
background-color: #20B128;
|
||||
bottom: 20rpx;
|
||||
left: 30rpx;
|
||||
transition: 500ms;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.position-content {
|
||||
height: 600rpx;
|
||||
overflow-y: auto;
|
||||
|
||||
.position-li {
|
||||
font-size: 28rpx;
|
||||
color: #707070;
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.act {
|
||||
color: #20B128;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-leval {
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.goods-leval-li {
|
||||
margin-right: 20rpx;
|
||||
padding: 10rpx 40rpx;
|
||||
height: 60rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
||||
background-color: #F1F1F1;
|
||||
}
|
||||
|
||||
.act {
|
||||
color: #20B128;
|
||||
background-color: #E8F7E9;
|
||||
border: 1px solid #20B128;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* .toast {
|
||||
position: absolute;
|
||||
color: white;
|
||||
background-color: #20B128;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
|
||||
|
||||
} */
|
||||
</style>
|
425
pages/product/addGoodDetail/goodsPrice.vue
Normal file
425
pages/product/addGoodDetail/goodsPrice.vue
Normal file
@ -0,0 +1,425 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
|
||||
<view class="card" v-for="(item,index) in attrValue">
|
||||
<view class="card-head card-li">
|
||||
<text style="font-size: 32rpx;">规格{{index+1}}</text>
|
||||
<view class="" style="width: 300rpx;">
|
||||
<!-- {{formData.attr}} -->
|
||||
<!-- <u--input placeholder="请输入规格名称" inputAlign='right' v-model="formData.attr[index].value"></u--input> -->
|
||||
<u--input placeholder="请输入规格名称" inputAlign='right' v-model="item.sku"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="row" style="margin: 30rpx 0;" color="#ECECEC"></u-line>
|
||||
|
||||
<view class="">
|
||||
<view class="" v-if='isWholeSale == 1 || isWholeSale == 2'
|
||||
style="display: flex;align-items: center;justify-content: space-between;margin-top: 30rpx;margin-bottom: 20rpx;">
|
||||
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输入批发价格"
|
||||
placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);" v-model="item.wholesale_price"
|
||||
type='number'></u--input>
|
||||
<view class="" style="flex: 1;text-align: center;">
|
||||
/
|
||||
</view>
|
||||
<view class="" @click="unitIptClick(index,true)" style="width: 100rpx;flex: 2.4">
|
||||
<u--input style="background-color: #F6F6F6;pointer-events: none;" readonly placeholder="请输入计量单位"
|
||||
placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);"
|
||||
v-model="item.wholesale_unit_name"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if='isWholeSale == 0 || isWholeSale == 2' class=""
|
||||
style="display: flex;align-items: center;justify-content: space-between;">
|
||||
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输入零售价格" v-model="item.price"
|
||||
placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);" type='number'></u--input>
|
||||
<view class="" style="flex: 1;text-align: center;">
|
||||
/
|
||||
</view>
|
||||
<view class="" @click="unitIptClick(index,false)" style="width: 100rpx;flex: 2.4">
|
||||
<u--input readonly style=" background-color: #F6F6F6;pointer-events: none;"
|
||||
placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);" placeholder="请输入计量单位"
|
||||
v-model="item.unit_name"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="row" style="margin: 25rpx 0;" color="#ECECEC"></u-line>
|
||||
<view class=" card-li">
|
||||
<text style="font-size: 32rpx;">商品库存</text>
|
||||
<view class="" style="width: 300rpx;">
|
||||
<u--input type='number' placeholder="请填写库存数量" inputAlign='right' :value="item.stock"
|
||||
@input="onInput($event,item)"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="row" style="margin: 25rpx 0;" color="#ECECEC"></u-line>
|
||||
<view class=" card-li">
|
||||
<text style="font-size: 32rpx;">条形码</text>
|
||||
<view class="" style="width: 300rpx;">
|
||||
<u--input placeholder="请填写商品条形码" inputAlign='right' v-model="item.bar_code"
|
||||
type='number'></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="row" style="margin: 25rpx 0;" color="#ECECEC"></u-line>
|
||||
<view class="card-li">
|
||||
<view style="display: flex;color: #777777;" @click="delFn(index)">
|
||||
<u-icon name="trash" style='margin-right: 8rpx;'></u-icon> 删除
|
||||
</view>
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<u-switch :disabled='attrValue.length==1' v-model="item.is_use" type='primaryy'
|
||||
activeColor="#38BE41" size="19"></u-switch>
|
||||
<text style="margin-left: 8rpx;color: #777777;">启用</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<u-button icon="plus" text="新增规格" @click="pushFn" class="custom-style" iconColor='#38BE41'></u-button>
|
||||
</view>
|
||||
|
||||
<view class="submit-btn">
|
||||
<u-button type="primary" shape="circle" text="保存" @click="submit"></u-button>
|
||||
</view>
|
||||
|
||||
<u-popup :show="showPouple" @close="showPouple=false" @open="showPouple=true" :round="10">
|
||||
<view class="RegularFont" style="padding: 42rpx 40rpx">
|
||||
<view class="pop-head">
|
||||
<text v-if='!showCustom' @click='showPouple=false'>取消</text>
|
||||
<text v-else @click='showCustom=false'>
|
||||
<u-icon name="arrow-left" size="20"></u-icon>
|
||||
</text>
|
||||
<text style="font-size:32rpx ;color:#333333 ;">计量单位</text>
|
||||
<text v-if='showCustom' @click='addAttr'>确定</text>
|
||||
<text v-else></text>
|
||||
</view>
|
||||
<view style="height: 500rpx;">
|
||||
<u-transition :show="!showCustom" mode="slide-right">
|
||||
<view class="goods-leval">
|
||||
<view class="goods-leval-li" v-for='(item,index) in attrList' :key='index'
|
||||
@click='choseAttr(item)'>
|
||||
{{item}}
|
||||
</view>
|
||||
<view class="goods-leval-li " style="display: flex;color:#38BE41 ;"
|
||||
@click="showCustom=true">
|
||||
<u-icon name="plus" color="#38BE41" style='margin-right: 8rpx;'></u-icon> 自定义
|
||||
</view>
|
||||
</view>
|
||||
</u-transition>
|
||||
<u-transition :show="showCustom" mode="slide-left">
|
||||
<view class="transition">
|
||||
<u--textarea v-model="selfAttr" placeholder="请输入计量单位"></u--textarea>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
formatDate
|
||||
} from '../../../libs/uniApi'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selfAttr: "",
|
||||
attrList: ['斤',
|
||||
"公斤",
|
||||
"吨",
|
||||
"升",
|
||||
"个",
|
||||
"台",
|
||||
"瓶",
|
||||
"桶",
|
||||
"箱",
|
||||
"袋",
|
||||
"包",
|
||||
"盒",
|
||||
"件",
|
||||
"罐"
|
||||
],
|
||||
showCustom: false, //计量单位自定义
|
||||
showPouple: false,
|
||||
unitIndex: 0,
|
||||
mer_id: "",
|
||||
isWholeSale: "",
|
||||
isWhose: false,
|
||||
text: "",
|
||||
value: "",
|
||||
formData: {},
|
||||
"attrValue": [{
|
||||
detail: {
|
||||
' ': '',
|
||||
},
|
||||
"price": "",
|
||||
"unit_name": "",
|
||||
"wholesale_unit_name": "",
|
||||
"wholesale_price": '',
|
||||
"cost": "",
|
||||
"stock": "",
|
||||
sku: '',
|
||||
"ot_price": "",
|
||||
"procure_price": "",
|
||||
"bar_code": "",
|
||||
"weight": "",
|
||||
"extension_one": "",
|
||||
"extension_two": "",
|
||||
uuid: "",
|
||||
volume: "",
|
||||
"is_use": 0,
|
||||
}],
|
||||
rules: {
|
||||
price: '单价不能为空',
|
||||
unit_name: '计量单位不能为空',
|
||||
wholesale_price: '批发价格不能为空',
|
||||
wholesale_unit_name: '批发单位不能为空',
|
||||
stock: '库存不能为空',
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
onInput(event, item) {
|
||||
if (!/^\d*$/.test(event)) {
|
||||
event = event.replace(/[^\d]/g, '');
|
||||
}
|
||||
item.stock = event;
|
||||
this.$forceUpdate();
|
||||
// 更新整数值
|
||||
},
|
||||
|
||||
delFn(index) {
|
||||
if (this.attrValue.length == 1) {
|
||||
return this.$util.Tips({
|
||||
title: "最少保留一个规格"
|
||||
})
|
||||
}
|
||||
this.attrValue.splice(index, 1)
|
||||
this.formData.attr[0].detail.splice(index, 1)
|
||||
},
|
||||
|
||||
choseAttr(name) {
|
||||
this.isWhose ?
|
||||
this.attrValue[this.unitIndex].wholesale_unit_name = name :
|
||||
this.attrValue[this.unitIndex].unit_name = name;
|
||||
this.showPouple = false
|
||||
},
|
||||
addAttr() {
|
||||
if (!this.selfAttr) return;
|
||||
this.attrList.push(this.selfAttr)
|
||||
this.isWhose ?
|
||||
this.attrValue[this.unitIndex].wholesale_unit_name = this.attrList[this.attrList.length - 1] :
|
||||
this.attrValue[this.unitIndex].unit_name = this.attrList[this.attrList.length - 1];
|
||||
// this.attrValue[this.unitIndex].unit_name = this.attrList[this.attrList.length - 1]
|
||||
// this.attrValue[this.unitIndex].wholesale_unit_name = this.attrList[this.attrList.length - 1]
|
||||
this.selfAttr = ''
|
||||
this.showCustom = false
|
||||
this.showPouple = false
|
||||
},
|
||||
// hide() {
|
||||
// uni.hideKeyboard()
|
||||
// },
|
||||
unitIptClick(index, type) {
|
||||
this.isWhose = type
|
||||
this.unitIndex = index
|
||||
this.showPouple = true
|
||||
uni.hideKeyboard()
|
||||
},
|
||||
pushFn() {
|
||||
this.attrValue.push({
|
||||
detail: {
|
||||
' ': '',
|
||||
},
|
||||
"price": "",
|
||||
"unit_name": "",
|
||||
"wholesale_unit_name": "",
|
||||
"wholesale_price": '',
|
||||
"cost": "",
|
||||
"stock": "",
|
||||
sku: '',
|
||||
"ot_price": "",
|
||||
"procure_price": "",
|
||||
"bar_code": "",
|
||||
"weight": "",
|
||||
"extension_one": "",
|
||||
"extension_two": "",
|
||||
uuid: "",
|
||||
volume: "",
|
||||
"is_use": true,
|
||||
|
||||
})
|
||||
// this.formData.attr.push({
|
||||
// value: '',
|
||||
// detail: [],
|
||||
// })
|
||||
|
||||
},
|
||||
submit() {
|
||||
// 校验
|
||||
let errList = []
|
||||
// if (!this.isWholeSale) {
|
||||
// delete this.rules.wholesale_unit_name
|
||||
// delete this.rules.wholesale_price
|
||||
// }
|
||||
|
||||
if (this.isWholeSale == 0) { //零售
|
||||
delete this.rules.wholesale_unit_name
|
||||
delete this.rules.wholesale_price
|
||||
} else if (this.isWholeSale == 1) { //批发
|
||||
delete this.rules.price;
|
||||
delete this.rules.unit_name;
|
||||
}
|
||||
|
||||
this.attrValue.forEach(item => {
|
||||
for (let key in this.rules) {
|
||||
if (!item[key]) {
|
||||
errList.push(this.rules[key])
|
||||
}
|
||||
}
|
||||
if (this.attrValue.length > 1) {
|
||||
if (!item['sku']) {
|
||||
errList.push('规格名称不能为空')
|
||||
}
|
||||
}
|
||||
})
|
||||
if (errList.length > 0) {
|
||||
console.log(errList)
|
||||
uni.$u.toast(errList[0])
|
||||
return
|
||||
}
|
||||
// 校验结束
|
||||
if (this.formData.attr && this.formData.attr.length > 0)
|
||||
this.formData.attr[0].detail = [];
|
||||
|
||||
this.attrValue.forEach(item => {
|
||||
typeof(item.detail) == 'object' ?
|
||||
item.detail[' '] = item.sku: (item.detail = {}, item.detail[' '] = item.sku)
|
||||
this.formData.attr[0].detail.push(item.sku)
|
||||
})
|
||||
this.formData.attrValue = this.attrValue
|
||||
this.formData.attrValue.forEach(item => {
|
||||
item.is_use = item.is_use ? '0' : '1'
|
||||
})
|
||||
let that = this
|
||||
this.formData.spec_type = this.formData.attrValue.length > 1 ? '1' : '0'
|
||||
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${that.mer_id}&&formData=${JSON.stringify(that.formData) }&&showSet=${true}`,
|
||||
success(res) {
|
||||
|
||||
let delta = uni.getStorageSync('delta');
|
||||
if (delta) delta += 1;
|
||||
else delta = 2;
|
||||
uni.setStorageSync('delta', delta);
|
||||
}
|
||||
})
|
||||
},
|
||||
initFomrData(option) {
|
||||
if (option.mer_id) {
|
||||
this.mer_id = option.mer_id
|
||||
}
|
||||
if (option.formData) {
|
||||
this.formData = JSON.parse(option.formData)
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
|
||||
this.initFomrData(option)
|
||||
this.attrValue = this.formData.attrValue
|
||||
this.attrValue.forEach(item => {
|
||||
item.is_use = !Boolean(Number(item.is_use))
|
||||
})
|
||||
if (this.formData.attr.length == 0) {
|
||||
this.formData.attr.push({
|
||||
value: '',
|
||||
detail: [],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.custom-style {
|
||||
color: $uni-newTheme-color;
|
||||
height: 104rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
background-color: #F1F1F1;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
font-size: 28rpx;
|
||||
padding-bottom: 200rpx;
|
||||
|
||||
|
||||
.card {
|
||||
margin-bottom: 30rpx;
|
||||
padding: 30rpx 46rpx;
|
||||
background-color: white;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
position: relative;
|
||||
|
||||
.card-li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.card-head::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
font-size: 32rpx;
|
||||
left: 20rpx;
|
||||
width: 8rpx;
|
||||
height: 32rpx;
|
||||
top: 50rpx;
|
||||
background-color: #40AE36;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
position: fixed;
|
||||
bottom: 50rpx;
|
||||
width: 670rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pop-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #20B128;
|
||||
margin-bottom: 42rpx;
|
||||
}
|
||||
|
||||
.goods-leval {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
overflow-y: auto;
|
||||
|
||||
.goods-leval-li {
|
||||
margin-right: 20rpx;
|
||||
padding: 10rpx 40rpx;
|
||||
/* height: 60rpx; */
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
||||
background-color: #F1F1F1;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.act {
|
||||
color: #20B128;
|
||||
background-color: #E8F7E9;
|
||||
border: 1px solid #20B128;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
154
pages/product/addGoodDetail/goodsSearch.vue
Normal file
154
pages/product/addGoodDetail/goodsSearch.vue
Normal file
@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="" style="padding: 30rpx;">
|
||||
<u-search v-model="keyword" :showAction="true" actionText="搜索" :animation="true"
|
||||
@change="hdChange"></u-search>
|
||||
</view>
|
||||
<view class="" v-if='!keyword' style="padding-left: 44rpx;">
|
||||
<view style="margin: 60rpx 0 30rpx 14rpx;">
|
||||
常用分类
|
||||
</view>
|
||||
<view class="types">
|
||||
<view class="types-li" v-for="(item,index) in typeList" @click='hdChose(item)'>
|
||||
{{item.label}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view style="margin: 60rpx 0 30rpx 14rpx;">
|
||||
热门分类
|
||||
</view>
|
||||
<view class="types">
|
||||
<view class="types-li" v-for="(item,index) in hotList" @click='hdChose(item)'>
|
||||
{{item.label}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="" v-else style="margin: 10rpx 0 0 30rpx;">
|
||||
<view class="" v-if='searchList.length'>
|
||||
<view class="keyword-li" v-for='item in searchList' @click='hdChose(item)'>
|
||||
{{item.label}}
|
||||
<u-line direction="row" color="#ECECEC"></u-line>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else style="text-align: center;margin-top: 50rpx;">
|
||||
暂无搜索结果,点击 <text @click="navgo" style='color:#35BC3E;text-decoration: underline;'>手动选择</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
categorySearch,
|
||||
categoryHotcate,
|
||||
categorySearchHistory,
|
||||
} from '@/api/product.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
type: 'detail',
|
||||
keyword: "",
|
||||
mer_id: "",
|
||||
searchList: [],
|
||||
hotList: [],
|
||||
typeList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hdChange() {
|
||||
console.log(this.searchList)
|
||||
categorySearch(this.mer_id, {
|
||||
keyword: this.keyword
|
||||
}).then(res => {
|
||||
this.searchList = res.data
|
||||
})
|
||||
},
|
||||
navgo() {
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/addGoodDetail/goodsType?mer_id=${this.mer_id}&&type=${this.type}&&formData=${JSON.stringify(this.formData)}`
|
||||
})
|
||||
},
|
||||
hdChose(item) {
|
||||
this.formData.cate_name = item.label.includes('--') ? item.label
|
||||
.split('--')[1] : item.label;
|
||||
this.formData.cate_id = item.value
|
||||
categorySearchHistory(this.mer_id, this.$store.state.app.userInfo.uid, {
|
||||
cate_id: item.value
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/addGood/addGood?mer_id=${this.mer_id}&&formData=${JSON.stringify(this.formData)}`
|
||||
})
|
||||
},
|
||||
initFormData(option) {
|
||||
this.mer_id = option.mer_id
|
||||
if (option.type) {
|
||||
this.type = 'simple'
|
||||
}
|
||||
this.formData = JSON.parse(option.formData)
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.initFormData(option)
|
||||
categoryHotcate(
|
||||
option.mer_id,
|
||||
this.$store.state.app.userInfo.uid
|
||||
).then(res => {
|
||||
this.hotList = res.data.hot_cate.map(item => ({
|
||||
label: item.cate_name,
|
||||
value: item.store_category_id
|
||||
}))
|
||||
this.typeList = res.data.active_cate.map(item => ({
|
||||
label: item.cate_name,
|
||||
value: item.store_category_id
|
||||
|
||||
})
|
||||
|
||||
)
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.MediumFont {}
|
||||
|
||||
.RegularFont {}
|
||||
|
||||
.content {
|
||||
box-sizing: border-box;
|
||||
background-color: #FFFFFF;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
font-size: 28rpx;
|
||||
|
||||
.types {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.types-li {
|
||||
background-color: #F6F6F6;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
margin-bottom: 46rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.keyword-li {
|
||||
padding-right: 30rpx;
|
||||
/* background-color: #F6F6F6; */
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
.keyword-li:active {
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
}
|
||||
</style>
|
180
pages/product/addGoodDetail/goodsType.vue
Normal file
180
pages/product/addGoodDetail/goodsType.vue
Normal file
@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<!-- <view class="" style="padding: 30rpx;font-size: 28rpx;color: #989898;font-family: PingFangRegular;">
|
||||
<text>当前已选</text>
|
||||
<text style="margin-left: 48rpx;color: #20B128;">生鲜--水果阿萨</text>
|
||||
</view> -->
|
||||
<view class="content">
|
||||
<view class="lines" :style="{top:(actIndex*40)+16+'px'}" />
|
||||
<view class="left">
|
||||
<view class="left-li" v-for="(item,index) in leftList" :class="actIndex==index?'act-li':''"
|
||||
@click="hdClick(index)">
|
||||
{{item.label}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<u-line direction="col" color="#ECECEC"></u-line>
|
||||
</view>
|
||||
<view class="right">
|
||||
<u-search :showAction="true" v-model="keyword" actionText="搜索" :animation="true" @search='hdSearch'
|
||||
@custom='hdSearch'> </u-search>
|
||||
<view style="margin: 30rpx 0;font-size: 28rpx; color: #989898;">
|
||||
可能在找
|
||||
</view>
|
||||
<view class="right-content">
|
||||
<view class="right-content-li" v-for="(item,index) in rightList" @click="choseType(item)">
|
||||
{{item.label}}
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
formatDate
|
||||
} from '../../../libs/uniApi';
|
||||
import {
|
||||
categoryList,
|
||||
categorySearch
|
||||
} from '@/api/product.js'
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
type: 'detail',
|
||||
mer_id: "",
|
||||
keyword: "",
|
||||
actIndex: 0,
|
||||
leftList: [],
|
||||
rightList: [],
|
||||
formData: {}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
hdClick(index) {
|
||||
this.actIndex = index
|
||||
this.rightList = this.leftList[index].children
|
||||
},
|
||||
choseType(item) {
|
||||
|
||||
this.formData.cate_name = item.label.includes('--') ? item.label
|
||||
.split('--')[1] : item.label;
|
||||
this.formData.cate_id = item.value
|
||||
if (this.type == 'detail') {
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${this.mer_id}&&formData=${JSON.stringify(this.formData)} `
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/addGood/addGood?mer_id=${this.mer_id}&&formData=${JSON.stringify(this.formData)}`
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
hdSearch() {
|
||||
categorySearch(this.mer_id, {
|
||||
keyword: this.keyword
|
||||
}).then(res => {
|
||||
this.rightList = res.data
|
||||
})
|
||||
},
|
||||
initFormData(option) {
|
||||
this.mer_id = option.mer_id
|
||||
if (option.type) {
|
||||
this.type = 'simple'
|
||||
}
|
||||
this.formData = JSON.parse(option.formData)
|
||||
}
|
||||
|
||||
},
|
||||
onLoad(option) {
|
||||
this.initFormData(option)
|
||||
categoryList(option.mer_id).then((res) => {
|
||||
this.leftList = res.data
|
||||
this.rightList = res.data[0].children
|
||||
}).catch(e => {
|
||||
console.log(e);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.content {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
background-color: white;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
|
||||
.lines {
|
||||
height: 16px;
|
||||
border-radius: 5px;
|
||||
width: 3px;
|
||||
background-color: #40AE36;
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
transition: 200ms;
|
||||
top: 33rpx;
|
||||
}
|
||||
|
||||
.left {
|
||||
margin-right: 30rpx;
|
||||
width: 160rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
.left-li {
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #444444;
|
||||
height: 40px;
|
||||
/* border-top: 1px solid red; */
|
||||
}
|
||||
|
||||
.act-li {
|
||||
color: $uni-newTheme-color;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
padding: 0 20rpx;
|
||||
position: fixed;
|
||||
width: 530rpx;
|
||||
left: 220rpx;
|
||||
min-height: 100vh;
|
||||
overflow-y: auto;
|
||||
|
||||
.right-content {
|
||||
display: flex;
|
||||
/* justify-content: space-around; */
|
||||
flex-wrap: wrap;
|
||||
|
||||
.right-content-li {
|
||||
margin-right: 20rpx;
|
||||
color: #444444;
|
||||
font-size: 28rpx;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
border: 2rpx solid #989898;
|
||||
padding: 16rpx 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
@ -596,7 +596,7 @@
|
||||
}
|
||||
productDetail(this.merId, this.product_id).then(res => {
|
||||
setStorage('editGoodsDetils', res.data);
|
||||
if(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;
|
||||
if(typeof res.data.content == 'string')res.data.content = JSON.parse(res.data.content);
|
||||
this.$store.commit('setStorage', res.data);
|
||||
let editGoodsDetils = res.data;
|
||||
|
@ -30,7 +30,7 @@
|
||||
cost: '', // 成本价
|
||||
stock: '', // 库存
|
||||
ot_price: '', // 市场价
|
||||
procure_price: '', // 批发价
|
||||
wholesale_price: '', // 批发价
|
||||
bar_code: '', // 商品条码
|
||||
weight: '', // 重量
|
||||
volume: '', // 体积
|
||||
@ -159,7 +159,7 @@
|
||||
label: '批发价',
|
||||
type: 'digit',
|
||||
holder: '请填写批发价',
|
||||
model: 'procure_price',
|
||||
model: 'wholesale_price',
|
||||
require: true,
|
||||
})
|
||||
}
|
||||
|
@ -271,7 +271,7 @@
|
||||
if(!postData.unit_name||postData.unit_name?.trim().length<=0)return Toast('请输入商品单位');
|
||||
let userInfo = this.$store.state.app.userInfo;
|
||||
if(typeof userInfo == 'string')userInfo= JSON.parse(userInfo);
|
||||
if(userInfo?.mer_info?.type_code=="TypeSupplyChain" && (!postData.attrValue[0]?.procure_price||postData.attrValue[0]?.procure_price<=0) )return Toast('批发价不能小于0');
|
||||
if(userInfo?.mer_info?.type_code=="TypeSupplyChain" && (!postData.attrValue[0]?.wholesale_price||postData.attrValue[0]?.wholesale_price<=0) )return Toast('批发价不能小于0');
|
||||
if(!postData.attrValue[0]?.price||postData.attrValue[0]?.price<=0)return Toast('零售价不能小于0');
|
||||
if(!postData.stock||postData.stock<0)return Toast('库存不能小于0');
|
||||
// if(!postData.attrValue[0]?.cost||postData.attrValue[0]?.cost<=0)return Toast('成本价不能小于0');
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user