Compare commits

..

136 Commits

Author SHA1 Message Date
1154079537
8d3e871c6c 批发价格修改 2024-05-25 11:19:40 +08:00
1154079537
aa3e8e8b6b 头像点击修改 2024-05-23 10:22:33 +08:00
1154079537
0810b43ff8 批发字段修改 2024-05-22 18:21:10 +08:00
1154079537
707e8635b9 批发 2024-05-22 17:53:47 +08:00
1154079537
b9567e1099 按钮undefined 修改 2024-05-22 17:28:09 +08:00
1154079537
a0950db415 批发价格还原 2024-05-21 16:37:50 +08:00
1154079537
8eb4c1f97d 价格修改 返回bug修改 2024-05-21 16:35:54 +08:00
1154079537
fc96dceea9 商品优化 返回 优化 2024-05-20 17:34:52 +08:00
zmj
04abb8b1b9 add 2024-05-20 16:01:11 +08:00
zmj
b7be7ef93e Merge branch 'pre-release' of https://gitea.lihaink.cn/mkm/shop-applet into pre-release 2024-05-20 15:44:19 +08:00
1154079537
5d29f788c3 商品管理 2024-05-18 19:40:29 +08:00
ff2c438d88 修改版本号 2024-05-18 11:50:47 +08:00
ecbbdee9ce 修改订单重复加载的错误 2024-05-18 11:15:44 +08:00
dd214e72f3 Merge branch 'pre-release' of https://gitea.lihaink.cn/mkm/shop-applet into pre-release 2024-05-17 14:43:41 +08:00
7ce5b1ce33 修改商品视频上传 2024-05-17 14:43:36 +08:00
1154079537
47a2387fb6 规格修改 2024-05-17 11:54:30 +08:00
1154079537
939406afba 单位显示问题修改 2024-05-16 18:12:21 +08:00
zmj
065cb758ef Merge branch 'pre-release' of https://gitea.lihaink.cn/mkm/shop-applet into pre-release 2024-05-16 18:02:38 +08:00
zmj
bd39369d24 add 2024-05-16 18:02:23 +08:00
1154079537
1bc054be5d 价格 数量修改 2024-05-16 17:34:29 +08:00
fdd60d7eb1 Merge branch 'dev' into pre-release
# Conflicts:
#	manifest.json
#	pages/admin/orderList/index.vue
#	pages/chat/customer_list/index.vue
#	pages/index/index.vue
#	pages/product/list/index.vue
2024-05-16 14:22:02 +08:00
1154079537
a96332fa2d 订单刷新 文字益处隐藏 店铺详情 提现 2024-05-16 14:12:36 +08:00
zmj
31cce22ba3 回收站恢复 2024-05-16 11:57:36 +08:00
c4e545d92d Merge branch 'pre-release' of https://gitea.lihaink.cn/mkm/shop-applet into pre-release 2024-05-16 11:44:47 +08:00
5d3981c27e 添加恢复商品 2024-05-16 11:44:45 +08:00
zmj
1d63aad673 商品扫码入库添加条形码 2024-05-16 11:34:36 +08:00
zmj
39a49b1b43 add 2024-05-15 18:36:33 +08:00
zmj
c5a5557da8 商品为空时出现两个两个暂无商品 2024-05-15 14:28:45 +08:00
a6c5f9581a Merge branch 'feature-releaseGoods' into pre-release
# Conflicts:
#	config/app.js
#	manifest.json
#	pages.json
#	pages/chat/customer_list/index.vue
#	pages/index/index.vue
#	pages/product/addGood/addGood.vue
#	pages/product/basicSet.vue
#	pages/product/list/index.vue
#	pages/users/gather_list/index.vue
#	pages/withdrawal/index.vue
#	pages/withdrawal/progress.vue
#	uni_modules/h-datetime-picker/components/h-datetime-picker/h-datetime-picker.vue
#	utils/util.js
2024-05-14 17:59:48 +08:00
515b0ace72 init 2024-05-14 17:25:13 +08:00
94b7c1aaaf reset 2024-05-14 17:13:29 +08:00
SK-20231103YIXF\Administrator
189a7000b9 首页刷新 2024-05-13 23:40:45 +08:00
1154079537
df9a67f164 1 2024-05-13 18:32:53 +08:00
1154079537
8bb249a2b5 聊天商品链接 2024-05-11 16:46:58 +08:00
1154079537
e5b880933c 优化 2024-05-11 14:23:35 +08:00
zmj
765f13eea4 add 2024-05-08 19:18:54 +08:00
1154079537
895ad285b1 提现输入 bug修改 2024-05-08 16:46:05 +08:00
zmj
0c6e085b65 add 2024-05-07 22:29:30 +08:00
1154079537
2f6ca46b15 订单跳转修改 2024-05-07 17:42:27 +08:00
zmj
c3c658671b add 2024-05-07 17:32:45 +08:00
zmj
c104b03819 add 2024-05-06 18:19:27 +08:00
1154079537
9b6befad9c 消息修改,回话bug修改 2024-05-06 17:51:33 +08:00
zmj
f84d98efd6 app图片加载不出来 2024-05-06 10:07:36 +08:00
zmj
eaff04f995 发布商品bu修复 2024-05-03 15:03:12 +08:00
zmj
fd5181b55c add 2024-04-30 18:57:01 +08:00
1154079537
613742e706 id变更 2024-04-30 17:56:47 +08:00
zmj
9c08d45e09 add 2024-04-30 09:33:57 +08:00
zmj
448733a1c8 add 2024-04-29 23:05:49 +08:00
1154079537
04204cb0fc 订单修改 2024-04-29 17:19:12 +08:00
zmj
0aed25b996 商品管理bug修复 2024-04-28 23:01:15 +08:00
zmj
2792269537 引导页面bug修复 2024-04-28 18:08:14 +08:00
1154079537
ae3a666040 订单列表修改 2024-04-28 17:42:20 +08:00
zmj
ec548c021c add 2024-04-28 08:48:30 +08:00
zmj
6555449109 引导 2024-04-27 18:16:11 +08:00
zmj
cc568d9124 退款提示 2024-04-27 16:00:55 +08:00
zmj
b50c8c6b10 商品发布 2024-04-27 10:55:52 +08:00
DESKTOP-GMUNQ1B\k
1e7a8f76d1 订单暂存修改 2024-04-26 11:14:07 +08:00
zmj
7e98709d06 add 2024-04-25 18:09:35 +08:00
zmj
1a01e1ae65 商品详情修改 2024-04-25 08:40:17 +08:00
zmj
6dff85d544 商品发布 2024-04-24 18:11:06 +08:00
DESKTOP-GMUNQ1B\k
18a02eaacb 1 2024-04-24 09:37:17 +08:00
zmj
5b7783d015 更新商品甘丽 2024-04-24 08:47:26 +08:00
zmj
773efe87ca 商品管理页面修改 2024-04-23 18:01:32 +08:00
zmj
9802fda53a 发布商品 2024-04-23 08:45:17 +08:00
zmj
12acca43be 商品发布 2024-04-22 18:05:44 +08:00
zmj
8c05ceb8fb 视频上传 2024-04-22 08:38:39 +08:00
zmj
b22db99e63 商品发布接口对接 2024-04-20 18:02:16 +08:00
DESKTOP-GMUNQ1B\k
d8b90ee847 1 2024-04-20 15:23:06 +08:00
zmj
b52f4fca4c add 2024-04-20 14:59:16 +08:00
zmj
9cb77a57e4 add 2024-04-20 14:51:26 +08:00
zmj
56921854dd add 2024-04-20 08:40:27 +08:00
zmj
336c7078bb add 2024-04-19 18:08:04 +08:00
zmj
794beec9df add 2024-04-18 23:59:06 +08:00
zmj
63a0a9194e add 2024-04-18 18:02:57 +08:00
zmj
006041fca6 add 2024-04-17 18:02:49 +08:00
zmj
b8e1824d21 add 2024-04-17 11:29:01 +08:00
DESKTOP-GMUNQ1B\k
c6034c4ae4 1 2024-04-16 16:21:11 +08:00
weipengfei
cd8513ec02 调整拍照上传功能 2024-04-15 17:48:03 +08:00
weipengfei
d23ad0114f 1 2024-04-15 10:50:24 +08:00
weipengfei
f4cba29c3d 更新 2024-04-13 18:03:43 +08:00
DESKTOP-GMUNQ1B\k
81a37e5283 1 2024-04-11 18:11:28 +08:00
DESKTOP-GMUNQ1B\k
1f13c5daf4 1 2024-04-10 17:05:24 +08:00
DESKTOP-GMUNQ1B\k
64b7a52d22 1 2024-04-09 18:04:54 +08:00
SK-20231103YIXF\Administrator
e8d2053c69 1 2024-04-09 09:22:14 +08:00
SK-20231103YIXF\Administrator
7ce2829aa5 2 2024-04-08 16:42:44 +08:00
DESKTOP-GMUNQ1B\k
20834e3d99 bug修改 2024-04-07 17:16:49 +08:00
DESKTOP-GMUNQ1B\k
068b3a12df 1 2024-04-03 17:41:28 +08:00
weipengfei
2b2d3891ba 1 2024-04-03 13:47:09 +08:00
DESKTOP-GMUNQ1B\k
cda31b548e 1 2024-04-02 18:35:04 +08:00
DESKTOP-GMUNQ1B\k
48018b340b 1 2024-04-02 16:37:16 +08:00
DESKTOP-GMUNQ1B\k
4e9e9862db 1 2024-04-02 14:46:49 +08:00
weipengfei
5bf33c61c0 新增商品送货方式 2024-04-02 14:43:54 +08:00
weipengfei
761fef7e32 更新 2024-04-02 14:22:22 +08:00
DESKTOP-GMUNQ1B\k
fde2ed3eee 1 2024-04-01 11:36:40 +08:00
DESKTOP-GMUNQ1B\k
34a21b8fb0 提现修改 2024-03-30 11:05:34 +08:00
DESKTOP-GMUNQ1B\k
926c71c0d3 1 2024-03-29 17:09:20 +08:00
weipengfei
83e56bb3ff 更新 2024-03-29 11:20:59 +08:00
weipengfei
db2f611ba2 更新 2024-03-27 17:20:24 +08:00
DESKTOP-GMUNQ1B\k
2fab29d60c 1 2024-03-27 15:39:38 +08:00
DESKTOP-GMUNQ1B\k
e9a8aed642 q 2024-03-27 15:10:27 +08:00
weipengfei
bc4a352a2d 更新 2024-03-26 18:07:58 +08:00
weipengfei
2244c6edac Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-26 17:21:27 +08:00
weipengfei
38d8bb7c81 更新 2024-03-26 17:21:22 +08:00
DESKTOP-GMUNQ1B\k
cdd1fee2f8 1 2024-03-26 17:10:08 +08:00
DESKTOP-GMUNQ1B\k
f4cf86803e 商户审核 2024-03-25 17:00:20 +08:00
DESKTOP-GMUNQ1B\k
9ce6ec1c2a 1 2024-03-23 18:24:59 +08:00
DESKTOP-GMUNQ1B\k
8f36cee5a4 1 2024-03-23 18:01:12 +08:00
DESKTOP-GMUNQ1B\k
ec27fd1ffe 1 2024-03-23 14:40:10 +08:00
weipengfei
f433a6f239 修复bug 2024-03-22 18:23:17 +08:00
DESKTOP-GMUNQ1B\k
8405461850 1 2024-03-22 17:42:25 +08:00
weipengfei
51448c0cf6 更新 2024-03-22 16:32:27 +08:00
weipengfei
dd2396275a 更新 2024-03-22 16:02:41 +08:00
weipengfei
57b2bc9b59 更新 2024-03-22 15:49:25 +08:00
weipengfei
d80bac72e2 更新 2024-03-22 14:51:05 +08:00
weipengfei
4ae04408b4 Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-22 10:52:03 +08:00
weipengfei
00f2d3487a 更新 2024-03-22 10:51:54 +08:00
DESKTOP-GMUNQ1B\k
47b4284326 1 2024-03-22 10:50:55 +08:00
weipengfei
8167f71bfd Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-21 17:31:38 +08:00
weipengfei
95431d4bd6 修复bug 2024-03-21 17:26:58 +08:00
DESKTOP-GMUNQ1B\k
735e91b8b2 1 2024-03-21 16:44:52 +08:00
weipengfei
ece51bf8d8 Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-21 15:26:03 +08:00
weipengfei
af0d0b8ef8 更新 2024-03-21 15:25:58 +08:00
DESKTOP-GMUNQ1B\k
e0f0987ea6 1 2024-03-21 14:42:09 +08:00
weipengfei
9d5b5426f9 更新 2024-03-21 14:36:49 +08:00
weipengfei
c9fd0ac0ab 更新 2024-03-21 14:08:57 +08:00
weipengfei
b832389a2c Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-21 11:23:03 +08:00
weipengfei
6b11dd932c 更新 2024-03-21 11:21:29 +08:00
DESKTOP-GMUNQ1B\k
0a4bfff2df 1 2024-03-21 11:20:37 +08:00
DESKTOP-GMUNQ1B\k
6a2a0778b4 类型改变 2024-03-20 17:32:43 +08:00
weipengfei
b92ef54b5f 新增商品详情 2024-03-20 16:42:39 +08:00
weipengfei
bd06f19214 更新 2024-03-20 16:29:58 +08:00
weipengfei
9f71108ece Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-19 18:15:34 +08:00
weipengfei
c6baaf7555 更新 2024-03-19 18:15:20 +08:00
DESKTOP-GMUNQ1B\k
a0b3ec00f6 1 2024-03-19 18:10:33 +08:00
weipengfei
d69560e61d 更新 2024-03-19 14:46:13 +08:00
DESKTOP-GMUNQ1B\k
4537bbaa0f 商户收款 2024-03-18 16:36:42 +08:00
167 changed files with 30036 additions and 15350 deletions

20
.hbuilderx/launch.json Normal file
View File

@ -0,0 +1,20 @@
{
// launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version" : "0.0",
"configurations" : [
{
"app-plus" : {
"launchtype" : "local"
},
"default" : {
"launchtype" : "local"
},
"type" : "uniCloud"
},
{
"playground" : "custom",
"type" : "uni-app:app-android"
}
]
}

21
App.vue
View File

@ -67,7 +67,6 @@
auto_arrival: 0, auto_arrival: 0,
mer_location: 0, mer_location: 0,
statusBarHeight: 0, statusBarHeight: 0,
mer_location: 0,
store_street_theme: 1, store_street_theme: 1,
sys_intention_agree: '', sys_intention_agree: '',
copyright_status: '', copyright_status: '',
@ -91,6 +90,21 @@
// //
console.log('消息成功' + JSON.stringify(option)); 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 // #endif
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'; this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
@ -434,6 +448,11 @@
@import 'static/css/style.scss'; @import 'static/css/style.scss';
//
* {
scrollbar-color: #e5e5e500 #f7f7f9 !important;
}
view { view {
box-sizing: border-box; box-sizing: border-box;
} }

View File

@ -9,6 +9,24 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import request from "@/utils/request.js"; 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 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
});
}

View File

@ -206,6 +206,13 @@ export function modifyPhone(data) {
export function modifyPassword(data) { export function modifyPassword(data) {
return request.post('user/change/password', data); return request.post('user/change/password', data);
} }
/** 设置支付密码 */
export function setPayPwd(data) {
return request.post('User/set/withdrawal_pwd', data);
}
/** 退出登錄 */ /** 退出登錄 */
export function logout() { export function logout() {
return request.get('logout'); return request.get('logout');

View File

@ -1,7 +1,7 @@
import request from "@/utils/request.js"; import request from "@/utils/request.js";
/** /**
* 文章详情 *
* *
*/ */
export function parseToken(data) { export function parseToken(data) {

34
api/common.js Normal file
View 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);
}

View File

@ -9,6 +9,14 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import request from "@/utils/request.js"; import request from "@/utils/request.js";
/**
* 校验支付密码是否正确
* @param numType
*/
export function verifyPwd(data) {
return request.post("order/verifyPwd", data);
}
/** /**
* 获取购物车列表 * 获取购物车列表
* @param numType boolean true 购物车数量,false=购物车产品数量 * @param numType boolean true 购物车数量,false=购物车产品数量
@ -39,6 +47,13 @@ export function changeCartNum(cartId, data) {
export function cartDel(data) { export function cartDel(data) {
return request.post('user/cart/delete', 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 * @param object data

View File

@ -16,6 +16,13 @@ export function addCart(data) {
return request.post(`user/cart/create`, data); return request.post(`user/cart/create`, data);
} }
/**
* 根据店铺 获取商品
*/
export function getProductInfo1(data) {
return request.get(`order_mix`, data);
}
/** /**
* 根据店铺id 获取店铺信息 * 根据店铺id 获取店铺信息
*/ */

View File

@ -9,6 +9,17 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import request from "@/utils/request.js"; 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 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) { export function intentionbus(data) {
return request.post(`intention/business`, data); return request.post(`intention/business`, data);
} }

View File

@ -1,5 +1,16 @@
import request from "@/utils/request.js"; 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) { export function agreeiness(data) {
return request.get(`business/agree`, data, { noAuth: true }); return request.get(`business/agree`, data, {
noAuth: true
});
} }

View File

@ -8,88 +8,134 @@
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import request from "@/utils/request.js"; import request from "@/utils/request.js";
import request1 from "@/utils/requestb.js"; import request1 from "@/utils/requestb.js";
import Cache from '@/utils/cache' 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`);
}
/** /**
* 获取版本信息 * 获取版本信息
*/ */
export function Appversion(data) { export function Appversion(data) {
return request.get(`app/version`, data, { return request.get(`app/version`, data, {
noAuth: true noAuth: true
}); });
} }
/** /**
* 提交提现 * 提交提现
*/ */
export function postCreateApplyAPI(merId, data) { export function postCreateApplyAPI(merId, data) {
return request.post(`admin/${merId}/create_apply`, data); return request.post(`admin/${merId}/create_apply`, data);
} }
/** /**
* 申请提现 * 申请提现
*/ */
export function getAdminApplyAPI(merId, data) { export function getAdminApplyAPI(merId, data) {
return request.get(`admin/${merId}/apply`, data); return request.get(`admin/${merId}/apply`, data);
} }
/** /**
* 提现记录 * 提现记录
*/ */
export function getAdminApplyListAPI(merId) { export function getAdminApplyListAPI(merId, data) {
return request.get(`admin/${merId}/lis_apply`); return request.get(`admin/${merId}/lis_apply`, data);
} }
/** /**
* 获取用户信息 * 获取用户信息
* *
*/ */
export function getUserInfo() { export function getUserInfo() {
return request.get('user'); return request.get('user');
} }
/** /**
* 头像 * 头像
* *
*/ */
export function editAvatar(data) { export function editAvatar(data) {
return request.post('user/change/info', data); return request.post('user/change/info', data);
} }
// 修改昵称 // 修改昵称
export function updateInfo(data) { export function updateInfo(data) {
return request.post('user/change/avatar', data); return request.post('user/change/avatar', data);
} }
/** /**
* h5用户登录 * h5用户登录
* @param data object 用户账号密码 * @param data object 用户账号密码
*/ */
export function loginH5(data) { export function loginH5(data) {
return request.post("auth/login", data, { return request.post("auth/login", data, {
noAuth: true noAuth: true
}); });
} }
/** /**
* h5用户手机号登录 * h5用户手机号登录
* @param data object 用户手机号 也只能 * @param data object 用户手机号 也只能
*/ */
export function loginMobile(data) { export function loginMobile(data) {
return request.post("auth/smslogin", data, { return request.post("auth/smslogin", data, {
noAuth: true noAuth: true
}); });
} }
/** /**
* h5用户手机号登录 * h5用户手机号登录
* @param data object 用户手机号 也只能 * @param data object 用户手机号 也只能
*/ */
export function loginMpPhone(data) { export function loginMpPhone(data) {
return request.post("auth/mp_phone", data, { return request.post("auth/mp_phone", data, {
noAuth: true noAuth: true
}); });
} }
/** /**
* 验证码key * 验证码key
*/ */
export function getCodeApi() { export function getCodeApi() {
return request.get("verify_code", {}, { return request.get("verify_code", {}, {
noAuth: true noAuth: true
}); });
} }
/** /**
@ -97,18 +143,18 @@ export function getCodeApi() {
* @param data object 用户手机号 * @param data object 用户手机号
*/ */
export function registerVerify(data) { export function registerVerify(data) {
return request.post("auth/verify", data, { return request.post("auth/verify", data, {
noAuth: true noAuth: true
}); });
} }
/** /**
* h5用户手机号注册 * h5用户手机号注册
* @param data object 用户手机号 验证码 密码 * @param data object 用户手机号 验证码 密码
*/ */
export function register(data) { export function register(data) {
return request.post("auth/register", data, { return request.post("auth/register", data, {
noAuth: true noAuth: true
}); });
} }
/** /**
@ -116,30 +162,32 @@ export function register(data) {
* @param data object 用户手机号 验证码 密码 * @param data object 用户手机号 验证码 密码
*/ */
export function registerReset(data) { export function registerReset(data) {
return request.post("/register/reset", data, { return request.post("/register/reset", data, {
noAuth: true noAuth: true
}); });
} }
/** /**
* 用户手机号忘记密码 * 用户手机号忘记密码
*/ */
export function registerForget(data) { export function registerForget(data) {
return request.post("user/change_pwd", data, { return request.post("user/change_pwd", data, {
noAuth: true noAuth: true
}); });
} }
/** /**
* 获取用户中心菜单 * 获取用户中心菜单
* *
*/ */
export function getMenuList() { export function getMenuList() {
return request.get("common/menus", {}, { noAuth: true }); return request.get("common/menus", {}, {
noAuth: true
});
} }
/* /*
* 签到用户信息 * 签到用户信息
* */ * */
export function getSignUser() { export function getSignUser() {
return request.get("user/sign/info"); return request.get("user/sign/info");
} }
/** /**
@ -147,20 +195,20 @@ export function getSignUser() {
* *
*/ */
export function getSignConfig() { export function getSignConfig() {
return request.get('sign/config') return request.get('sign/config')
} }
/** /**
* 获取签到列表 * 获取签到列表
* @param object data * @param object data
*/ */
export function getSignList(data) { export function getSignList(data) {
return request.get('user/sign/lst', data); return request.get('user/sign/lst', data);
} }
/** /**
* 用户签到 * 用户签到
*/ */
export function setSignIntegral() { export function setSignIntegral() {
return request.post('user/sign/create') return request.post('user/sign/create')
} }
/** /**
@ -169,32 +217,32 @@ export function setSignIntegral() {
* *
*/ */
export function getSignMonthList(data) { export function getSignMonthList(data) {
return request.get('user/sign/month', data) return request.get('user/sign/month', data)
} }
/** /**
* 活动状态 * 活动状态
* *
*/ */
export function userActivity() { export function userActivity() {
return request.get('user/activity'); return request.get('user/activity');
} }
/* /*
* 资金明细types|0=全部,1=消费,2=充值,3=返佣 * 资金明细types|0=全部,1=消费,2=充值,3=返佣
* */ * */
export function getCommissionInfo(q, types) { export function getCommissionInfo(q, types) {
return request.get("user/bill", q); return request.get("user/bill", q);
} }
/* /*
* 提现列表 * 提现列表
* */ * */
export function extractLst(data) { export function extractLst(data) {
return request.get("user/extract/lst", data); return request.get("user/extract/lst", data);
} }
/* /*
* 积分记录 * 积分记录
* */ * */
export function getIntegralList(data) { export function getIntegralList(data) {
return request.get("user/integral/lst", data); return request.get("user/integral/lst", data);
} }
/** /**
@ -202,16 +250,16 @@ export function getIntegralList(data) {
* *
*/ */
export function spreadBanner() { export function spreadBanner() {
//#ifdef H5 //#ifdef H5
return request.get('user/spread_image', { return request.get('user/spread_image', {
type: 'wechat' type: 'wechat'
}); });
//#endif //#endif
//#ifdef MP //#ifdef MP
return request.get('user/spread_image', { return request.get('user/spread_image', {
type: 'routine' type: 'routine'
}); });
//#endif //#endif
} }
/** /**
* *
@ -219,7 +267,7 @@ export function spreadBanner() {
* @param object data * @param object data
*/ */
export function spreadPeople(data) { export function spreadPeople(data) {
return request.get('user/spread_list', data); return request.get('user/spread_list', data);
} }
/** /**
* *
@ -227,13 +275,13 @@ export function spreadPeople(data) {
* @param int type * @param int type
*/ */
export function spreadCount(type) { export function spreadCount(type) {
return request.get('spread/count/' + type); return request.get('spread/count/' + type);
} }
/* /*
* 推广数据 * 推广数据
* */ * */
export function getSpreadInfo() { export function getSpreadInfo() {
return request.get("/commission"); return request.get("/commission");
} }
/** /**
* *
@ -241,54 +289,54 @@ export function getSpreadInfo() {
* @param object data * @param object data
*/ */
export function spreadOrder(data) { export function spreadOrder(data) {
return request.get('user/spread_order', data); return request.get('user/spread_order', data);
} }
/* /*
* 获取推广人排行 * 获取推广人排行
* */ * */
export function getRankList(data) { export function getRankList(data) {
return request.get("user/spread_top", data); return request.get("user/spread_top", data);
} }
/* /*
* 获取佣金排名 * 获取佣金排名
* */ * */
export function getBrokerageRank(q) { export function getBrokerageRank(q) {
return request.get("user/brokerage_top", q); return request.get("user/brokerage_top", q);
} }
/** /**
* 提现申请 * 提现申请
* @param object data * @param object data
*/ */
export function extractCash(data) { export function extractCash(data) {
return request.post('user/extract/create', data) return request.post('user/extract/create', data)
} }
/** /**
* 提现银行/提现最低金额 * 提现银行/提现最低金额
* *
*/ */
export function extractBank() { export function extractBank() {
return request.get('user/extract/banklst'); return request.get('user/extract/banklst');
} }
/** /**
* 会员等级列表 * 会员等级列表
* *
*/ */
export function userLevelGrade() { export function userLevelGrade() {
return request.get('user/level/grade'); return request.get('user/level/grade');
} }
/** /**
* 获取某个等级任务 * 获取某个等级任务
* @param int id 任务id * @param int id 任务id
*/ */
export function userLevelTask(id) { export function userLevelTask(id) {
return request.get('user/level/task/' + id); return request.get('user/level/task/' + id);
} }
/** /**
* 检查用户是否可以成为会员 * 检查用户是否可以成为会员
* *
*/ */
export function userLevelDetection() { export function userLevelDetection() {
return request.get('user/level/detection'); return request.get('user/level/detection');
} }
/** /**
* *
@ -296,21 +344,21 @@ export function userLevelDetection() {
* @param object data * @param object data
*/ */
export function getAddressList(data) { export function getAddressList(data) {
return request.get('user/address/lst', data); return request.get('user/address/lst', data);
} }
/** /**
* 设置默认地址 * 设置默认地址
* @param int id * @param int id
*/ */
export function setAddressDefault(id) { export function setAddressDefault(id) {
return request.post('user/address/update/' + id) return request.post('user/address/update/' + id)
} }
/** /**
* 修改 添加地址 * 修改 添加地址
* @param object data * @param object data
*/ */
export function editAddress(data) { export function editAddress(data) {
return request.post('user/address/create', data); return request.post('user/address/create', data);
} }
/** /**
* 删除地址 * 删除地址
@ -318,285 +366,287 @@ export function editAddress(data) {
* *
*/ */
export function delAddress(id) { export function delAddress(id) {
return request.post('user/address/delete/' + id) return request.post('user/address/delete/' + id)
} }
/** /**
* 获取单个地址 * 获取单个地址
* @param int id * @param int id
*/ */
export function getAddressDetail(id) { export function getAddressDetail(id) {
return request.get('user/address/detail/' + id); return request.get('user/address/detail/' + id);
} }
/** /**
* 修改用户信息 * 修改用户信息
* @param object * @param object
*/ */
export function userEdit(data) { export function userEdit(data) {
return request.post('user/edit', data); return request.post('user/edit', data);
} }
/* /*
* 退出登录 * 退出登录
* */ * */
export function getLogout() { export function getLogout() {
return request.post("logout"); return request.post("logout");
} }
/** /**
* 佣金转入 * 佣金转入
* *
*/ */
export function rechargeBrokerage(data) { export function rechargeBrokerage(data) {
return request.post('user/recharge/brokerage', data) return request.post('user/recharge/brokerage', data)
} }
/** /**
* 小程序充值 * 小程序充值
* *
*/ */
export function rechargeRoutine(data) { export function rechargeRoutine(data) {
return request.post('recharge/routine', data) return request.post('recharge/routine', data)
} }
/* /*
* 公众号充值 * 公众号充值
* */ * */
export function rechargeWechat(data) { export function rechargeWechat(data) {
return request.post("user/recharge", data); return request.post("user/recharge", data);
} }
/** /**
* 获取默认地址 * 获取默认地址
* *
*/ */
export function getAddressDefault() { export function getAddressDefault() {
return request.get('address/default'); return request.get('address/default');
} }
/** /**
* 充值金额选择 * 充值金额选择
*/ */
export function getRechargeApi() { export function getRechargeApi() {
return request.get("common/recharge_quota"); return request.get("common/recharge_quota");
} }
/** /**
* 登陆记录 * 登陆记录
*/ */
export function setVisit(data) { export function setVisit(data) {
return request.post('user/set_visit', { return request.post('user/set_visit', {
...data ...data
}, { }, {
noAuth: true noAuth: true
}); });
} }
/** /**
* 客服列表 * 客服列表
*/ */
export function serviceList(data) { export function serviceList(data) {
return request.get("service/list", data); return request.get("service/list", data);
} }
/** /**
* 客服列表 * 客服列表
*/ */
export function serviceLogin(key, data) { export function serviceLogin(key, data) {
return request.post("service/scan_login/" + key, data); return request.post("service/scan_login/" + key, data);
} }
/** /**
* 客服获取客户列表 * 客服获取客户列表
*/ */
export function serviceUserList(mer_id, data) { export function serviceUserList(mer_id, data) {
return request.get("service/user_list/" + mer_id, data); return request.get("service/user_list/" + mer_id, data);
} }
/** /**
* 用户获取聊天记录详情 * 用户获取聊天记录详情
*/ */
export function getChatRecord(to_uid, data) { export function getChatRecord(to_uid, data) {
return request.get("service/history/" + to_uid, data); return request.get("service/history/" + to_uid, data);
} }
/** /**
* 客服获取聊天记录详情 * 客服获取聊天记录详情
*/ */
export function getMerHistory(userid, mer_id, data) { export function getMerHistory(userid, mer_id, data) {
return request.get("service/mer_history/" + mer_id + '/' + userid, data); return request.get("service/mer_history/" + mer_id + '/' + userid, data);
} }
/** /**
* 静默绑定推广人 * 静默绑定推广人
* @param {Object} puid * @param {Object} puid
*/ */
export function spread(puid) { export function spread(puid) {
Cache.set("spread", puid || 0); Cache.set("spread", puid || 0);
return request.post("user/spread", { return request.post("user/spread", {
spread_spid: puid spread_spid: puid
}); });
} }
/** /**
* 反馈类型 * 反馈类型
*/ */
export function feedbackType() { export function feedbackType() {
return request.get("common/feedback_type"); return request.get("common/feedback_type");
} }
/** /**
* 提交反馈 * 提交反馈
*/ */
export function feedback(data) { export function feedback(data) {
return request.post("user/feedback", { return request.post("user/feedback", {
...data ...data
}); });
} }
/** /**
* 反馈列表 * 反馈列表
*/ */
export function feedbackList(data) { export function feedbackList(data) {
return request.get("user/feedback/list", data); return request.get("user/feedback/list", data);
} }
/** /**
* 反馈列表 * 反馈列表
*/ */
export function feedbackDetail(id) { export function feedbackDetail(id) {
return request.get("user/feedback/detail/" + id); return request.get("user/feedback/detail/" + id);
} }
/** /**
* 浏览记录 * 浏览记录
*/ */
export function historyList(data) { export function historyList(data) {
return request.get("user/history", data); return request.get("user/history", data);
} }
/** /**
* 删除浏览记录 * 删除浏览记录
*/ */
export function historyDelete(id) { export function historyDelete(id) {
return request.post("user/history/delete/" + id); return request.post("user/history/delete/" + id);
} }
/** /**
* 批量删除浏览记录 * 批量删除浏览记录
*/ */
export function historyBatchDelete(data) { export function historyBatchDelete(data) {
return request.post("user/history/batch/delete", data); return request.post("user/history/batch/delete", data);
} }
/** /**
* 批量收藏浏览记录 * 批量收藏浏览记录
*/ */
export function historyBatchCollect(data) { export function historyBatchCollect(data) {
return request.post("user/relation/batch/create", data); return request.post("user/relation/batch/create", data);
} }
/** /**
* 佣金记录 * 佣金记录
*/ */
export function brokerage_list(data) { export function brokerage_list(data) {
return request.get("user/brokerage_list", data); return request.get("user/brokerage_list", data);
} }
/** /**
* 佣金数据 * 佣金数据
*/ */
export function spreadInfo() { export function spreadInfo() {
return request.get("user/spread_info"); return request.get("user/spread_info");
} }
// 图片验证码 // 图片验证码
export function getCaptcha() { export function getCaptcha() {
return request.get('captcha', {}, { return request.get('captcha', {}, {
noAuth: true noAuth: true
}); });
} }
// 用户账户列表 // 用户账户列表
export function userAcc() { export function userAcc() {
return request.get('user/account', {}, { return request.get('user/account', {}, {
noAuth: true noAuth: true
}); });
} }
// 创建发票 // 创建发票
export function invoiceSave(data) { export function invoiceSave(data) {
return request.post('user/receipt/create', data); return request.post('user/receipt/create', data);
} }
// 编辑发票 // 编辑发票
export function invoiceUpdate(id, data) { export function invoiceUpdate(id, data) {
return request.post('user/receipt/update/' + id, data); return request.post('user/receipt/update/' + id, data);
} }
// 获取默认发票 // 获取默认发票
export function invoiceDefault(id) { export function invoiceDefault(id) {
return request.post('user/receipt/is_default/' + id); return request.post('user/receipt/is_default/' + id);
} }
// 发票抬头--列表 // 发票抬头--列表
export function invoice(data) { export function invoice(data) {
return request.get('user/receipt/lst', data); return request.get('user/receipt/lst', data);
} }
// 发票抬头--删除 // 发票抬头--删除
export function invoiceDelete(id) { export function invoiceDelete(id) {
return request.post('user/receipt/delete/' + id); return request.post('user/receipt/delete/' + id);
} }
// 发票--详情 // 发票--详情
export function invoiceDetail(id) { export function invoiceDetail(id) {
return request.get('user/receipt/detail/' + id); return request.get('user/receipt/detail/' + id);
} }
/** /**
* 新版分享海报信息获取 * 新版分享海报信息获取
* *
*/ */
export function spreadMsg(data) { export function spreadMsg(data) {
return request.get('user/v2/spread_image', data); return request.get('user/v2/spread_image', data);
} }
/** /**
* 图片链接转base64 * 图片链接转base64
* *
*/ */
export function imgToBase(data) { export function imgToBase(data) {
return request.post('common/base64', data); return request.post('common/base64', data);
} }
/** /**
* 获取协议 * 获取协议
* *
*/ */
export function getAgreementApi(key) { export function getAgreementApi(key) {
return request.get('agreement/' + key, {}, { noAuth: true }); return request.get('agreement/' + key, {}, {
noAuth: true
});
} }
/** /**
* 获取协议 * 获取协议
* *
*/ */
export function getIntegralInfo() { export function getIntegralInfo() {
return request.get('user/integral/info'); return request.get('user/integral/info');
} }
/** /**
* 获取店铺列表 * 获取店铺列表
* *
*/ */
export function getStoreList(data) { export function getStoreList(data) {
return request.get('user/services', data); return request.get('user/services', data);
} }
/* /*
获取佣金说明 获取佣金说明
*/ */
export function commissionDescription() { export function commissionDescription() {
return request.get('agreement/sys_extension_agree') return request.get('agreement/sys_extension_agree')
} }
/* /*
获取用户分销等级信息 获取用户分销等级信息
*/ */
export function getBrokerageInfo() { export function getBrokerageInfo() {
return request.get('user/brokerage/info') return request.get('user/brokerage/info')
} }
/* /*
获取用户分销等级表格数据 获取用户分销等级表格数据
*/ */
export function getBrokerageGrade() { export function getBrokerageGrade() {
return request.get('user/brokerage/all') return request.get('user/brokerage/all')
} }
/* /*
分销员升级提醒 分销员升级提醒
*/ */
export function brokerageNotice(data) { export function brokerageNotice(data) {
return request.get(`user/brokerage/notice`, data) return request.get(`user/brokerage/notice`, data)
} }
/* /*
口令解析 口令解析
*/ */
export function pwdResolution(data) { export function pwdResolution(data) {
return request.get(`command/copy?key=${data}`) return request.get(`command/copy?key=${data}`)
} }
/* /*
获取佣金说明 获取佣金说明
*/ */
export function getInstructions(key) { export function getInstructions(key) {
return request.get(`agreement/${key}`) return request.get(`agreement/${key}`)
} }
/* /*
会员信息 会员信息
*/ */
export function memberInfo() { export function memberInfo() {
return request.get('user/member/info') return request.get('user/member/info')
} }
/** /**
* 成长值记录 * 成长值记录
@ -604,7 +654,7 @@ export function memberInfo() {
* *
*/ */
export function growthValueRecord(data) { export function growthValueRecord(data) {
return request.get('user/member/log', data) return request.get('user/member/log', data)
} }
/** /**
* 协议规则列表 * 协议规则列表
@ -612,7 +662,9 @@ export function growthValueRecord(data) {
* *
*/ */
export function cacheLst() { 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) { export function cacheInfo(key) {
return request.get(`agreement/${key}`, {}, { noAuth: true }) return request.get(`agreement/${key}`, {}, {
noAuth: true
})
} }
/** /**
* 注销账户 * 注销账户
@ -628,7 +682,7 @@ export function cacheInfo(key) {
* *
*/ */
export function userOut(data) { export function userOut(data) {
return request.post(`user/cancel`, data) return request.post(`user/cancel`, data)
} }
/** /**
* 获取聊天用户信息 * 获取聊天用户信息
@ -636,7 +690,7 @@ export function userOut(data) {
* *
*/ */
export function serviceUser(merId, uid) { export function serviceUser(merId, uid) {
return request.get(`service/user/${merId}/${uid}`) return request.get(`service/user/${merId}/${uid}`)
} }
/** /**
* 保存聊天用户备注 * 保存聊天用户备注
@ -644,7 +698,9 @@ export function serviceUser(merId, uid) {
* *
*/ */
export function serviceSaveMark(merId, uid, mark) { export function serviceSaveMark(merId, uid, mark) {
return request.post(`service/mark/${merId}/${uid}`, { mark }) return request.post(`service/mark/${merId}/${uid}`, {
mark
})
} }
/** /**
* 获取会员卡类型 * 获取会员卡类型
@ -652,7 +708,7 @@ export function serviceSaveMark(merId, uid, mark) {
* *
*/ */
export function memberCard() { export function memberCard() {
return request.get(`svip/pay_lst`) return request.get(`svip/pay_lst`)
} }
/** /**
* 开通付费会员--支付 * 开通付费会员--支付
@ -660,7 +716,7 @@ export function memberCard() {
* *
*/ */
export function memberCardCreate(id, data) { export function memberCardCreate(id, data) {
return request.post(`svip/pay/${id}`, data) return request.post(`svip/pay/${id}`, data)
} }
/** /**
* 付费会员权益 * 付费会员权益
@ -668,7 +724,9 @@ export function memberCardCreate(id, data) {
* *
*/ */
export function memberEquity() { 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() { export function memberCouponLst() {
return request.get(`svip/coupon_lst`, {}, { noAuth: true }) return request.get(`svip/coupon_lst`, {}, {
noAuth: true
})
} }
/** /**
* 付费会员优惠券--领取 * 付费会员优惠券--领取
@ -684,7 +744,7 @@ export function memberCouponLst() {
* *
*/ */
export function receiveMemberCoupon(id) { export function receiveMemberCoupon(id) {
return request.post(`svip/coupon_receive/${id}`) return request.post(`svip/coupon_receive/${id}`)
} }
/** /**
* 付费会员--会员商品 * 付费会员--会员商品
@ -692,7 +752,9 @@ export function receiveMemberCoupon(id) {
* *
*/ */
export function groomList(data) { export function groomList(data) {
return request.get(`svip/product_lst`, data, { noAuth: true }) return request.get(`svip/product_lst`, data, {
noAuth: true
})
} }
/** /**
* 客服聊天--撤回消息 * 客服聊天--撤回消息
@ -700,7 +762,7 @@ export function groomList(data) {
* *
*/ */
export function chatReverstApi(id) { export function chatReverstApi(id) {
return request.post(`service/recall/${id}`) return request.post(`service/recall/${id}`)
} }
/** /**
* 客服聊天--判断店铺是否有在线客服 * 客服聊天--判断店铺是否有在线客服
@ -708,7 +770,7 @@ export function chatReverstApi(id) {
* *
*/ */
export function hasServiceApi(id) { export function hasServiceApi(id) {
return request.get(`has_service/${id}`) return request.get(`has_service/${id}`)
} }
/** /**
* 银行卡提现--银行卡信息 * 银行卡提现--银行卡信息
@ -716,11 +778,11 @@ export function hasServiceApi(id) {
* *
*/ */
export function getBankInfo() { export function getBankInfo() {
return request.get(`user/extract/history_bank`) return request.get(`user/extract/history_bank`)
} }
// 商户账单管理 // 商户账单管理
export function getBillDetil() { export function getBillDetil() {
return request.get(`mer/financial_record`) return request.get(`mer/financial_record`)
} }
@ -728,5 +790,5 @@ export function getBillDetil() {
//获取商户入驻所签署公司 //获取商户入驻所签署公司
export function merstreet(data) { export function merstreet(data) {
return request1.get(`company/street_company`, data); return request1.get(`company/street_company`, data);
} }

View File

@ -44,8 +44,9 @@
<view class='text'> <view class='text'>
<view class='name line2'>{{item.store_name}}</view> <view class='name line2'>{{item.store_name}}</view>
<view class="score"><span <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> style="font-size: 23rpx;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
{{item.reply_count}}条评论</view> {{item.reply_count}}条评论
</view>
<view class="" style="display: flex;justify-content: space-between;"> <view class="" style="display: flex;justify-content: space-between;">
<view class='money'> <view class='money'>
<span style="font-size:30rpx;"></span> <span style="font-size:30rpx;"></span>

View File

@ -84,7 +84,6 @@
.title { .title {
font-size: 30rpx; font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin: 12px 0; margin: 12px 0;
@ -110,7 +109,6 @@
border-radius: 11rpx 11rpx 11rpx 11rpx; border-radius: 11rpx 11rpx 11rpx 11rpx;
border: 1px solid #3274F9; border: 1px solid #3274F9;
font-size: 19rpx; font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
margin-right: 15rpx; margin-right: 15rpx;
} }
@ -125,7 +123,6 @@
border-radius: 11rpx 0px 0px 0rpx; border-radius: 11rpx 0px 0px 0rpx;
border: 1px solid #F84221; border: 1px solid #F84221;
font-size: 19rpx; font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
} }
@ -136,7 +133,6 @@
border-radius: 0px 11rpx 11rpx 0px; border-radius: 0px 11rpx 11rpx 0px;
border: 1px solid #F84221; border: 1px solid #F84221;
font-size: 19rpx; font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
} }
} }
@ -161,7 +157,6 @@
.relase-two { .relase-two {
font-size: 23rpx; font-size: 23rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500; font-weight: 500;
color: #B3B3B3; color: #B3B3B3;
margin-left: 13rpx; margin-left: 13rpx;
@ -201,7 +196,6 @@
opacity: 1; opacity: 1;
font-size: 23rpx; font-size: 23rpx;
padding-left: 11rpx; padding-left: 11rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #737373; color: #737373;

View File

@ -64,8 +64,8 @@
width: 100% !important; width: 100% !important;
height: 345rpx; height: 345rpx;
image{ image {
width: 100% ; width: 100%;
height: 345rpx; height: 345rpx;
} }
} }
@ -94,7 +94,6 @@
.title { .title {
font-size: 30rpx; font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin: 12px 0; margin: 12px 0;

View File

@ -44,8 +44,9 @@
<view class='text'> <view class='text'>
<view class='name line2'>{{item.store_name}}</view> <view class='name line2'>{{item.store_name}}</view>
<view class="score"><span <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> style="font-size: 23rpx;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
{{item.reply_count}}条评论</view> {{item.reply_count}}条评论
</view>
<view class="" style="display: flex;justify-content: space-between;"> <view class="" style="display: flex;justify-content: space-between;">
<view class='money'> <view class='money'>
<span style="font-size:30rpx;"></span> <span style="font-size:30rpx;"></span>

View File

@ -84,7 +84,6 @@
.title { .title {
font-size: 30rpx; font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin: 12px 0; margin: 12px 0;
@ -110,7 +109,6 @@
border-radius: 11rpx 11rpx 11rpx 11rpx; border-radius: 11rpx 11rpx 11rpx 11rpx;
border: 1px solid #3274F9; border: 1px solid #3274F9;
font-size: 19rpx; font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
margin-right: 15rpx; margin-right: 15rpx;
} }
@ -125,7 +123,6 @@
border-radius: 11rpx 0px 0px 0rpx; border-radius: 11rpx 0px 0px 0rpx;
border: 1px solid #F84221; border: 1px solid #F84221;
font-size: 19rpx; font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
} }
@ -136,7 +133,6 @@
border-radius: 0px 11rpx 11rpx 0px; border-radius: 0px 11rpx 11rpx 0px;
border: 1px solid #F84221; border: 1px solid #F84221;
font-size: 19rpx; font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
} }
} }
@ -161,7 +157,6 @@
.relase-two { .relase-two {
font-size: 23rpx; font-size: 23rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500; font-weight: 500;
color: #B3B3B3; color: #B3B3B3;
margin-left: 13rpx; margin-left: 13rpx;
@ -201,7 +196,6 @@
opacity: 1; opacity: 1;
font-size: 23rpx; font-size: 23rpx;
padding-left: 11rpx; padding-left: 11rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #737373; color: #737373;

View File

@ -64,8 +64,8 @@
width: 100% !important; width: 100% !important;
height: 345rpx; height: 345rpx;
image{ image {
width: 100% ; width: 100%;
height: 345rpx; height: 345rpx;
} }
} }
@ -94,7 +94,6 @@
.title { .title {
font-size: 30rpx; font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin: 12px 0; margin: 12px 0;

BIN
components/aaa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -5,7 +5,7 @@
<view class="c_card"> <view class="c_card">
<view class="c_content"> <view class="c_content">
<scroll-view style="height: 100%;" scroll-y> <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> </scroll-view>
</view> </view>
</view> </view>

View File

@ -21,11 +21,11 @@
<view v-else class="money"> <view v-else class="money">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<text></text><text class="num">{{ attr.productSelect.procure_price }}</text> <text></text><text class="num">{{ attr.productSelect.price }}</text>
<view v-if="attr.productSelect && attr.productSelect.svip_price>0" class="acea-row row-middle"> <view v-if="attr.productSelect && attr.productSelect.svip_price" class="acea-row row-middle">
<text class='vip-money'>{{attr.productSelect.svip_price}}</text> <text class='vip-money'>{{attr.productSelect.svip_price}}</text>
<view class="vipImg"> <view class="vipImg">
<image src="/static/images/svip.png"></image> <image :src="`${domain}/static/images/svip.png`"></image>
</view> </view>
</view> </view>
</view> </view>
@ -61,13 +61,14 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | CRMEB [ CRMEB ] // | 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 CRMEBCRMEB // | Licensed CRMEBCRMEB
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { HTTP_REQUEST_URL } from '@/config/app';
export default { export default {
computed: mapGetters(['viewColor']), computed: mapGetters(['viewColor']),
props: { props: {
@ -109,10 +110,11 @@
} }
}, },
data() { data() {
return {}; return {
domain: HTTP_REQUEST_URL,
}
}, },
mounted(){ mounted(){
// console.log('sss',this.attr);
}, },
methods: { methods: {
// //
@ -339,5 +341,6 @@
.product-window .joinBnt.on { .product-window .joinBnt.on {
background-color: #bbb; background-color: #bbb;
color: #fff; color: #fff;
background-image: none;
} }
</style> </style>

View File

@ -55,8 +55,6 @@
font-size: 30rpx; font-size: 30rpx;
font-family: PingFang SC-Regular,
PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }

View File

@ -2,23 +2,20 @@
<view class="contentgb"> <view class="contentgb">
<view class="return_top"> <view class="return_top">
<view class="z-bootm-img1" @click="returnbom()"> <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>
<view class="z-bootm-l"></view> <view class="z-bootm-l"></view>
<view class="z-bootm-img2" @click="returnbom()"> <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> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {}
}
}, },
methods: { methods: {
returnbom() { returnbom() {
@ -34,58 +31,25 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.contentgb { .contentgb {
width: 166rpx; width: 166rpx;
height: 56rpx; height: 56rpx;
.return_top { .return_top {
display: flex;
justify-content: center;
align-items: center;
width: 166rpx; width: 166rpx;
height: 56rpx; height: 56rpx;
background: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.6);
border-radius: 44rpx 44rpx; border-radius: 44rpx 44rpx;
position: relative; position: relative;
.z-bootm-img1 {
width: 41rpx;
height: 13rpx;
position: absolute;
top: 5rpx;
left: 25rpx;
image {
width: 100%;
height: 100%;
}
}
.z-bootm-l { .z-bootm-l {
width: 1px; width: 1px;
height: 32rpx; height: 32rpx;
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
margin: auto 0; margin: 0 16rpx;
position: absolute;
top: 10rpx;
left: 85rpx;
} }
.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> </style>

View File

@ -38,7 +38,9 @@
// #ifdef H5 // #ifdef H5
import ClipboardJS from "@/plugin/clipboard/clipboard.js"; import ClipboardJS from "@/plugin/clipboard/clipboard.js";
// #endif // #endif
import { mapGetters } from "vuex"; import {
mapGetters
} from "vuex";
export default { export default {
props: { props: {
isCopy: { isCopy: {
@ -56,22 +58,22 @@
title: '复制以下口令' title: '复制以下口令'
}; };
}, },
mounted(){ mounted() {
let that = this let that = this
// #ifdef H5 // #ifdef H5
that.$nextTick(function() { that.$nextTick(function() {
var clipboard = new ClipboardJS('.copy-data'); var clipboard = new ClipboardJS('.copy-data');
clipboard.on('success', function(e) { clipboard.on('success', function(e) {
that.$util.Tips({ that.$util.Tips({
title:'复制成功' title: '复制成功'
}) })
setTimeout(()=>{ setTimeout(() => {
that.$emit('close'); that.$emit('close');
},500) }, 500)
}); });
clipboard.on('error', function(e) { clipboard.on('error', function(e) {
that.$util.Tips({ that.$util.Tips({
title:'复制失败' title: '复制失败'
}) })
}); });
}); });
@ -79,16 +81,18 @@
}, },
methods: { methods: {
//#ifndef H5 //#ifndef H5
copyText:function(){ copyText: function() {
let that = this; let that = this;
uni.setClipboardData({ data: this.copyUrl }); uni.setClipboardData({
setTimeout(()=>{ data: this.copyUrl
});
setTimeout(() => {
that.$emit('close'); that.$emit('close');
},500) }, 500)
}, },
// #endif // #endif
close: function(){ close: function() {
this.$emit('close'); this.$emit('close');
} }
} }
} }
@ -106,13 +110,15 @@
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
transition: all .1s cubic-bezier(.25, .5, .5, .9); transition: all .1s cubic-bezier(.25, .5, .5, .9);
padding: 50rpx 30rpx 30rpx; padding: 50rpx 30rpx 30rpx;
.icon-guanbi{
.icon-guanbi {
position: absolute; position: absolute;
top: 20rpx; top: 20rpx;
right: 20rpx; right: 20rpx;
color: #8A8A8A; color: #8A8A8A;
} }
.button{
.button {
height: 76rpx; height: 76rpx;
border-radius: 38rpx; border-radius: 38rpx;
margin: 30rpx 30rpx 0; margin: 30rpx 30rpx 0;
@ -122,22 +128,25 @@
color: #FFFFFF; color: #FFFFFF;
} }
} }
.copy-list-window.on { .copy-list-window.on {
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
} }
.copy-list-window .title { .copy-list-window .title {
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
font-family: 'PingFang SC';
.iconfont { .iconfont {
font-size: 30rpx; font-size: 30rpx;
color: #FBB324; color: #FBB324;
margin-right: 12rpx; margin-right: 12rpx;
} }
} }
.copy-url{
.copy-url {
margin-top: 30rpx; margin-top: 30rpx;
background: #F5F5F5; background: #F5F5F5;
padding: 20rpx 25rpx; padding: 20rpx 25rpx;

View File

@ -78,7 +78,6 @@
padding-right: 0rpx; padding-right: 0rpx;
scroll-behavior: smooth; // scroll-behavior: smooth; //
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang-SC-Heavy;
.my-tab-item { .my-tab-item {
padding: 20rpx 35rpx; // -- padding: 20rpx 35rpx; // --
@ -89,7 +88,6 @@
&.active { &.active {
color: #333333; // -- color: #333333; // --
font-family: PingFang-SC-Heavy;
font-weight: 600; font-weight: 600;
position: relative; position: relative;
@ -110,7 +108,6 @@
position: relative; position: relative;
z-index: 9; z-index: 9;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #F84221; color: #F84221;
color: #F84221; color: #F84221;

View 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>

View File

@ -5,7 +5,7 @@
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text> 选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
</view> </view>
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' <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="left acea-row row-between-wrapper">
<view class="iconfont" :class="item.icon"></view> <view class="iconfont" :class="item.icon"></view>
<view class="text"> <view class="text">
@ -20,6 +20,12 @@
</view> </view>
</view> </view>
<view class="mask" ref="close" @click='close' v-if="pay_close"></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> </view>
</template> </template>
@ -27,7 +33,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | CRMEB [ CRMEB ] // | 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 CRMEBCRMEB // | Licensed CRMEBCRMEB
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
@ -35,9 +41,17 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { import {
orderPay, orderPay,
presellOrderPay integralOrderPay,
presellOrderPay,
verifyPwd
} from '@/api/order.js'; } from '@/api/order.js';
import payPwd from "@/components/payPwd/index.vue";
import popups from "@/components/popups/index.vue";
export default { export default {
components: {
payPwd,
popups
},
props: { props: {
payMode: { payMode: {
type: Array, type: Array,
@ -64,13 +78,18 @@
isCall: { isCall: {
type: Boolean, type: Boolean,
default: false default: false
},
returnUrl: {
type: String,
default: ''
} }
}, },
data() { data() {
return { return {
type: ''
}; };
}, },
methods: { methods: {
close: function() { close: function() {
this.$emit('onChangeFun', { this.$emit('onChangeFun', {
@ -78,7 +97,6 @@
}); });
}, },
goPay: function(number, paytype) { goPay: function(number, paytype) {
if (this.isCall) { if (this.isCall) {
return this.$emit('onChangeFun', { return this.$emit('onChangeFun', {
action: 'payCheck', action: 'payCheck',
@ -99,7 +117,6 @@
// #endif // #endif
} else if (paytype == 'balance') { } else if (paytype == 'balance') {
type = 'balance'; type = 'balance';
console.log('123');
} else if (paytype == 'alipay') { } else if (paytype == 'alipay') {
// #ifndef MP // #ifndef MP
type = 'alipay'; type = 'alipay';
@ -107,9 +124,8 @@
// #ifdef MP // #ifdef MP
type = 'alipayQr'; type = 'alipayQr';
// #endif // #endif
} else if (paytype == 'creditBuy') { } else if (paytype == 'public') {
console.log('123123'); type = 'public';
type = 'creditBuy'
} }
if (!that.order_id) return that.$util.Tips({ if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单' title: '请选择要支付的订单'
@ -117,29 +133,79 @@
if (paytype == 'balance' && parseFloat(number) < parseFloat(that.totalPrice)) return that.$util.Tips({ if (paytype == 'balance' && parseFloat(number) < parseFloat(that.totalPrice)) return that.$util.Tips({
title: '余额不足!' title: '余额不足!'
}); });
uni.showLoading({
title: '支付中' this.type = type;
if (paytype == 'balance' || paytype == 'merBalance') {
this.$refs.popups.handleOpen();
} else {
uni.showLoading({
title: '订单支付中'
});
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"
}); });
let orderApi = that.order_type === 1 ? presellOrderPay : orderPay 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, { orderApi(that.order_id, {
type: type, type: that.type,
// #ifdef H5 // #ifdef H5
return_url: that.returnUrl !== '' ? 'http://' + window.location.host + that.returnUrl :
return_url: this.order_type == 98 ? 'http://' + window.location.host + 'http://' + window.location.host + '/pages/users/order_list/index',
'/pages/users/order_list/indexCopy' : 'http://' + window.location.host +
'/pages/users/order_list/index',
// #endif // #endif
}).then(res => { }).then(res => {
let status = res.data.status, let status = res.data.status,
orderId = res.data.result.order_id, orderId = res.data.result.order_id,
jsConfig = res.data.result.config, jsConfig = res.data.result.config,
callback_key = res.data.result.pay_key, callback_key = res.data.result.pay_key,
goPages = that.returnUrl ? that.returnUrl : '/pages/users/order_list/index';
goPages = this.order_type == 98 ? '/pages/users/order_list/indexCopy' :
'/pages/users/order_list/index'
switch (status) { switch (status) {
case 'ORDER_EXIST': case 'ORDER_EXIST':
case 'EXTEND_ORDER': case 'EXTEND_ORDER':
@ -163,7 +229,7 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + '?status=2' url: goPages + '?status=1'
}); });
break; break;
case 'alipay': case 'alipay':
@ -185,7 +251,7 @@
jsConfig.timeStamp = jsConfig.timestamp; jsConfig.timeStamp = jsConfig.timestamp;
// #ifndef APP-PLUS // #ifndef APP-PLUS
that.$wechat.pay(jsConfig).then(res => { that.$wechat.pay(jsConfig).then(res => {
// console.log('success'+res.data) console.log('测试支付数据无效的success' + res.data)
this.$emit('onChangeFun', { this.$emit('onChangeFun', {
action: 'payClose' action: 'payClose'
}); });
@ -195,10 +261,10 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + 'status=2' url: goPages + 'status=1'
}); });
}).catch(res => { }).catch(res => {
// console.log('catch'+res.data) console.log('测试支付数据无效的catch' + res.data)
if (res.errMsg == 'chooseWXPay:cancel') { if (res.errMsg == 'chooseWXPay:cancel') {
if (that.isCall) { if (that.isCall) {
return that.$util.Tips({ return that.$util.Tips({
@ -209,7 +275,7 @@
title: '取消支付' title: '取消支付'
}, { }, {
tab: 5, tab: 5,
url: goPages + '?status=1' url: goPages + '?status=0'
}); });
} }
} }
@ -222,7 +288,6 @@
} else { } else {
mp_pay_name = 'requestPayment' mp_pay_name = 'requestPayment'
} }
console.log(mp_pay_name, jsConfig)
uni[mp_pay_name]({ uni[mp_pay_name]({
provider: 'wxpay', provider: 'wxpay',
orderInfo: jsConfig, orderInfo: jsConfig,
@ -235,11 +300,10 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + 'status=2' url: goPages + 'status=1'
}); });
}, },
fail: (e) => { fail: (e) => {
console.log(e)
if (that.isCall) { if (that.isCall) {
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
@ -249,7 +313,7 @@
title: '取消支付' title: '取消支付'
}, { }, {
tab: 5, tab: 5,
url: goPages + '?status=1' url: goPages + '?status=0'
}); });
} }
}, },
@ -284,7 +348,7 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + '?status=2' url: goPages + '?status=1'
}); });
return that.$util.Tips({ return that.$util.Tips({
@ -292,7 +356,7 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + '?status=2' url: goPages + '?status=1'
}); });
}, },
fail: function(e) { fail: function(e) {
@ -307,10 +371,9 @@
complete: function(e) { complete: function(e) {
uni.hideLoading(); uni.hideLoading();
// //
if (res.errMsg == 'requestPayment:cancel') return that.$util if (res.errMsg == 'requestPayment:cancel') return that.$util.Tips({
.Tips({ title: '取消支付'
title: '取消支付' });
});
that.$emit('onChangeFun', { that.$emit('onChangeFun', {
action: 'payClose' action: 'payClose'
}); });
@ -329,6 +392,16 @@
}); });
break; break;
// #ifdef H5 // #ifdef H5
case "public":
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
//
return that.$util.Tips({
title: "下单成功,请上传付款凭证!"
});
break;
case 'h5': case 'h5':
let host = window.location.protocol + "//" + window.location.host; let host = window.location.protocol + "//" + window.location.host;
let url = `${host}/pages/order_pay_status/index?order_id=${orderId}` let url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
@ -355,7 +428,7 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + 'status=2' url: goPages + 'status=1'
}); });
}, },
@ -392,7 +465,7 @@
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
background-color: #fff; background-color: #fff;
padding-bottom: 60rpx; padding-bottom: 60rpx;
z-index: 99999; z-index: 99;
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9); transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
} }

View 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
View 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>

View File

@ -1,13 +1,14 @@
<template> <template>
<view class='product-bg'> <view class='product-bg'>
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay" :circular="circular" <swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay"
:interval="interval" :duration="duration" @change="change" v-if="isPlay"> :circular="circular" :interval="interval" :duration="duration" @change="change" v-if="isPlay">
<!-- #ifndef APP-PLUS --> <!-- #ifndef APP-PLUS -->
<swiper-item v-if="videoline && videoline != '' && videoline != 'https:'"> <swiper-item v-if="videoline && videoline != '' && videoline != 'https:'">
<view class="item"> <view class="item">
<video id="myVideo" :src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : ("http:" + videoline)' <video id="myVideo"
objectFit="cover" controls style="width:100%;height:100% " show-mute-btn="true" :src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : ("http:" + videoline)'
auto-pause-if-navigate @ended="endedFun()"></video> 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"> <view class="poster" v-if="controls">
<image class="image" :src="videoCoverImg"></image> <image class="image" :src="videoCoverImg"></image>
</view> </view>
@ -37,9 +38,11 @@
</swiper> </swiper>
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<view v-if="!isPlay" style="width: 100%; height: 750rpx;"> <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"
objectFit="cover" controls style="width:100%;height:100% " show-center-play-btn show-mute-btn="true" :src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : "http:" + videoline'
auto-pause-if-navigate :enable-progress-gesture="false" :poster="videoCoverImg" @pause="videoPause" @ended="endedFun()"></video> 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>
</view> </view>
<!-- #endif --> <!-- #endif -->
@ -119,7 +122,7 @@
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.isPlay = false this.isPlay = false
this.videoContext = uni.createVideoContext('myVideo', this); this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(()=>{ this.$nextTick(() => {
this.videoContext.play(); this.videoContext.play();
}) })
// #endif // #endif
@ -140,15 +143,18 @@
height: 750rpx; height: 750rpx;
position: relative; position: relative;
} }
.product-bg swiper { .product-bg swiper {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
} }
.product-bg .slide-image { .product-bg .slide-image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.product-bg .pages { .product-bg .pages {
position: absolute; position: absolute;
background-color: #fff; background-color: #fff;
@ -161,15 +167,18 @@
font-size: 24rpx; font-size: 24rpx;
color: #050505; color: #050505;
} }
#myVideo { #myVideo {
width: 100%; width: 100%;
height: 100% height: 100%
} }
.product-bg .item { .product-bg .item {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.product-bg .item .poster { .product-bg .item .poster {
position: absolute; position: absolute;
top: 0; top: 0;
@ -178,10 +187,12 @@
width: 100%; width: 100%;
z-index: 9; z-index: 9;
} }
.product-bg .item .poster .image { .product-bg .item .poster .image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.product-bg .item .stop { .product-bg .item .stop {
position: absolute; position: absolute;
top: 50%; top: 50%;
@ -192,6 +203,7 @@
margin-left: -68rpx; margin-left: -68rpx;
z-index: 9; z-index: 9;
} }
.product-bg .item .stop .image { .product-bg .item .stop .image {
width: 100%; width: 100%;
height: 100%; height: 100%;

View 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 CRMEBCRMEB
// +----------------------------------------------------------------------
// | 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>

View File

@ -1,6 +1,7 @@
<template> <template>
<view :style="viewColor"> <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="textpic acea-row row-between-wrapper">
<view class="pictrue"> <view class="pictrue">
<image :src="attr.productSelect.image ? attr.productSelect.image : image" @click="loookImg"></image> <image :src="attr.productSelect.image ? attr.productSelect.image : image" @click="loookImg"></image>
@ -13,7 +14,8 @@
<view> <view>
预售价 预售价
<text class="num">{{ attr.productSelect.price }}</text> <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> </view>
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text> <text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota_show}}</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="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<view class="title">{{ item.attr_name }}</view> <view class="title">{{ item.attr_name }}</view>
<view class="listn acea-row row-middle"> <view class="listn acea-row row-middle">
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attr_value" <view class="itemn" :class="item.index === itemn.attr ? 'on' : ''"
@click="tapAttr(indexw, indexn)" :key="indexn"> v-for="(itemn, indexn) in item.attr_value" @click="tapAttr(indexw, indexn)" :key="indexn">
{{ itemn.attr }} {{ itemn.attr }}
</view> </view>
</view> </view>
@ -53,25 +55,29 @@
<view class="title">数量</view> <view class="title">数量</view>
<view class="carnum acea-row row-left"> <view class="carnum acea-row row-left">
<view class="buy_limit" v-if="minCount>0 || maxCount>0"> <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>
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes"> <view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
- -
</view> </view>
<view class='item num'> <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>
<view v-if="iSplus" class="item plus" :class=" attr.productSelect.cart_num >= attr.productSelect.stock || destri ? 'on' : ''" <view v-if="iSplus" class="item plus"
@click="CartNumAdd">+</view> :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) <view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota_show)
|| (attr.productSelect.cart_num >= attr.productSelect.product_stock)? "on":""' || (attr.productSelect.cart_num >= attr.productSelect.product_stock)? "on":""' @click='CartNumAdd'>+
@click='CartNumAdd'>+</view> </view>
</view> </view>
</view> </view>
<view class="joinBnt b-color" v-if="destri && attr.productSelect.stock>0" @click="goCat">立即购买</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 on" v-else-if="destri && attr.productSelect.stock<=0">已售罄</view>
<view class="joinBnt b-color" v-if="iSbnt && attr.productSelect.stock>0" <view class="joinBnt b-color" v-if="iSbnt && attr.productSelect.stock>0" @click="goCat">我要参团</view>
@click="goCat">我要参团</view>
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.stock<=0)">已售罄</view> <view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.stock<=0)">已售罄</view>
</view> </view>
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view> <view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
@ -88,7 +94,9 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { mapGetters } from "vuex"; import {
mapGetters
} from "vuex";
export default { export default {
props: { props: {
attr: { attr: {
@ -144,11 +152,10 @@
data() { data() {
return {}; return {};
}, },
mounted(){ mounted() {},
},
methods: { methods: {
// //
loookImg(){ loookImg() {
let self = this let self = this
let arr = [self.attr.productSelect.image ? self.attr.productSelect.image : self.image] let arr = [self.attr.productSelect.image ? self.attr.productSelect.image : self.image]
uni.previewImage({ uni.previewImage({
@ -167,10 +174,11 @@
this.$emit('iptCartNum', num); this.$emit('iptCartNum', num);
}, },
btKeyDown(e) { btKeyDown(e) {
e.target.value = e.target.value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,""); e.target.value = e.target.value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g, "");
}, },
btKeyUp(e) { btKeyUp(e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g,"") e.target.value = e.target.value.replace(
/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g, "")
}, },
closeAttr: function() { closeAttr: function() {
this.$emit('myevent'); this.$emit('myevent');
@ -226,77 +234,95 @@
padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); /// IOS>11.2/ padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9); transition: all .3s cubic-bezier(.25, .5, .5, .9);
&.presell-window { &.presell-window {
padding-bottom: 200rpx; padding-bottom: 200rpx;
} }
} }
.product-window.on { .product-window.on {
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
} }
.product-window.join { .product-window.join {
padding-bottom: 30rpx; padding-bottom: 30rpx;
} }
.product-window .textpic { .product-window .textpic {
padding: 0 80rpx 0 30rpx; padding: 0 80rpx 0 30rpx;
margin-top: 29rpx; margin-top: 29rpx;
position: relative; position: relative;
} }
.product-window .textpic .pictrue { .product-window .textpic .pictrue {
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
} }
.product-window .textpic .pictrue image { .product-window .textpic .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 10rpx; border-radius: 10rpx;
} }
.product-window .textpic .text { .product-window .textpic .text {
width: 460rpx; width: 460rpx;
font-size: 32rpx; font-size: 32rpx;
color: #202020; color: #202020;
} }
.product-window .textpic .text .money { .product-window .textpic .text .money {
font-size: 24rpx; font-size: 24rpx;
margin-top: 26rpx; margin-top: 26rpx;
font-weight: 700; font-weight: 700;
color: var(--view-priceColor); color: var(--view-priceColor);
} }
.product-window .stock_count{
.product-window .stock_count {
margin-top: 5rpx; margin-top: 5rpx;
} }
.product-window .textpic .text .money .num { .product-window .textpic .text .money .num {
font-size: 36rpx; font-size: 36rpx;
} }
.product-window .textpic .text .money .stock { .product-window .textpic .text .money .stock {
color: #999; color: #999;
margin-left: 18rpx; margin-left: 18rpx;
font-weight: normal; font-weight: normal;
} }
.product-window .textpic .text .presell_price { .product-window .textpic .text .presell_price {
color: #FF7F00; color: #FF7F00;
.num { .num {
display: inline-block; display: inline-block;
margin-right: 20rpx; margin-right: 20rpx;
} }
.stock { .stock {
margin-left: 0; margin-left: 0;
} }
} }
.vip-money { .vip-money {
color: #282828; color: #282828;
font-size: 22rpx; font-size: 22rpx;
margin-left: 6rpx; margin-left: 6rpx;
} }
.vipImg { .vipImg {
width: 65rpx; width: 65rpx;
height: 28rpx; height: 28rpx;
margin-left: 4rpx; margin-left: 4rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
} }
.product-window .textpic .iconfont { .product-window .textpic .iconfont {
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
@ -304,22 +330,27 @@
font-size: 35rpx; font-size: 35rpx;
color: #8a8a8a; color: #8a8a8a;
} }
.product-window .productWinList { .product-window .productWinList {
max-height: 395rpx; max-height: 395rpx;
overflow: auto; overflow: auto;
margin-top: 36rpx; margin-top: 36rpx;
} }
.product-window .productWinList .item~.item { .product-window .productWinList .item~.item {
margin-top: 36rpx; margin-top: 36rpx;
} }
.product-window .productWinList .item .title { .product-window .productWinList .item .title {
font-size: 30rpx; font-size: 30rpx;
color: #999; color: #999;
padding: 0 30rpx; padding: 0 30rpx;
} }
.product-window .productWinList .item .listn { .product-window .productWinList .item .listn {
padding: 0 30rpx 0 16rpx; padding: 0 30rpx 0 16rpx;
} }
.product-window .productWinList .item .listn .itemn { .product-window .productWinList .item .listn .itemn {
border: 1px solid #bbb; border: 1px solid #bbb;
font-size: 26rpx; font-size: 26rpx;
@ -328,11 +359,13 @@
border-radius: 6rpx; border-radius: 6rpx;
margin: 14rpx 0 0 14rpx; margin: 14rpx 0 0 14rpx;
} }
.product-window .productWinList .item .listn .itemn.on { .product-window .productWinList .item .listn .itemn.on {
color: #fff; color: #fff;
background-color: var(--view-theme); background-color: var(--view-theme);
border-color: var(--view-theme); border-color: var(--view-theme);
} }
.product-window .cart { .product-window .cart {
margin-top: 36rpx; margin-top: 36rpx;
padding: 0 30rpx; padding: 0 30rpx;
@ -345,20 +378,24 @@
-ms-flex-pack: justify; -ms-flex-pack: justify;
justify-content: space-between; justify-content: space-between;
} }
.product-window .cart .title { .product-window .cart .title {
font-size: 30rpx; font-size: 30rpx;
color: #999; color: #999;
line-height: 54rpx; line-height: 54rpx;
} }
.product-window .cart .carnum { .product-window .cart .carnum {
height: 54rpx; height: 54rpx;
align-items: center; align-items: center;
} }
.product-window .cart .carnum .buy_limit { .product-window .cart .carnum .buy_limit {
font-size: 22rpx; font-size: 22rpx;
color: var(--view-theme); color: var(--view-theme);
margin-right: 30rpx; margin-right: 30rpx;
} }
.product-window .cart .carnum .item { .product-window .cart .carnum .item {
width: 63rpx; width: 63rpx;
@ -370,6 +407,7 @@
font-size: 26rpx; font-size: 26rpx;
} }
.product-window .cart .carnum .reduce { .product-window .cart .carnum .reduce {
border: 1px solid #a4a4a4; border: 1px solid #a4a4a4;
width: 44rpx; width: 44rpx;
@ -379,10 +417,12 @@
line-height: 30rpx; line-height: 30rpx;
} }
.product-window .cart .carnum .reduce.on { .product-window .cart .carnum .reduce.on {
border-color: #e3e3e3; border-color: #e3e3e3;
color: #dedede; color: #dedede;
} }
.product-window .cart .carnum .plus { .product-window .cart .carnum .plus {
border: 1px solid #a4a4a4; border: 1px solid #a4a4a4;
width: 44rpx; width: 44rpx;
@ -391,14 +431,17 @@
border-radius: 0 7rpx 7rpx 0; border-radius: 0 7rpx 7rpx 0;
line-height: 30rpx line-height: 30rpx
} }
.product-window .cart .carnum .plus.on { .product-window .cart .carnum .plus.on {
border-color: #e3e3e3; border-color: #e3e3e3;
color: #dedede; color: #dedede;
} }
.product-window .cart .carnum .num { .product-window .cart .carnum .num {
color: #282828; color: #282828;
font-size: 28rpx; font-size: 28rpx;
} }
.product-window .joinBnt { .product-window .joinBnt {
font-size: 30rpx; font-size: 30rpx;
width: 620rpx; width: 620rpx;
@ -408,10 +451,12 @@
line-height: 86rpx; line-height: 86rpx;
color: #fff; color: #fff;
margin: 21rpx auto 0 auto; margin: 21rpx auto 0 auto;
&.b-color{
&.b-color {
background-color: var(--view-theme); background-color: var(--view-theme);
} }
} }
.product-window .joinBnt.on { .product-window .joinBnt.on {
background-color: #bbb; background-color: #bbb;
color: #fff; color: #fff;

View 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 CRMEBCRMEB
// +----------------------------------------------------------------------
// | 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>

View File

@ -159,23 +159,23 @@
checkedObj: { checkedObj: {
handler(n) { handler(n) {
this.checkedArr = JSON.parse(JSON.stringify(n||{})) this.checkedArr = JSON.parse(JSON.stringify(n || {}))
}, },
deep: true deep: true
} }
}, },
mounted() { mounted() {
this.checkedArr = JSON.parse(JSON.stringify(this.checkedObj||{})) this.checkedArr = JSON.parse(JSON.stringify(this.checkedObj || {}))
this.aryys = JSON.parse(JSON.stringify(this.checkedObj||{})) this.aryys = JSON.parse(JSON.stringify(this.checkedObj || {}))
this.getBounht(); this.getBounht();
}, },
methods: { methods: {
// //
producrprice(e, i, item) { producrprice(e, i, item) {
this.bought[i].price = e.detail.value this.bought[i].price = e.detail.value
// , , // , ,
let obj = this.checkedArr.find((item)=>item.product_id==this.bought[i].product_id); let obj = this.checkedArr.find((item) => item.product_id == this.bought[i].product_id);
obj ? obj.price = e.detail.value:null; obj ? obj.price = e.detail.value : null;
// this.$set(item, 'check', false); // this.$set(item, 'check', false);
// for (let i in this.checkedArr) { // for (let i in this.checkedArr) {
// if (this.checkedArr[i].product_id == item.product_id) { // if (this.checkedArr[i].product_id == item.product_id) {
@ -216,9 +216,9 @@
numberChange(data, i) { numberChange(data, i) {
this.peicenumber = data.number; this.peicenumber = data.number;
this.bought[i].number = data.number; this.bought[i].number = data.number;
// , , // , ,
let obj = this.checkedArr.find((item)=>item.product_id==this.bought[i].product_id); let obj = this.checkedArr.find((item) => item.product_id == this.bought[i].product_id);
obj ? obj.number = data.number:null; obj ? obj.number = data.number : null;
}, },
tabs(index) { tabs(index) {
@ -289,7 +289,7 @@
that.$set(item, 'check', true); that.$set(item, 'check', true);
that.$set(item, 'number', val.number); that.$set(item, 'number', val.number);
that.$set(item, 'price', val.price); that.$set(item, 'price', val.price);
that.peicenumber=val.number that.peicenumber = val.number
} }
}) })
}) })
@ -344,7 +344,7 @@
}, },
/*确定提交*/ /*确定提交*/
submit() { submit() {
console.log(this.checkedArr); console.log(this.checkedArr);
this.$emit('getProduct', this.checkedArr); this.$emit('getProduct', this.checkedArr);
}, },
@ -483,7 +483,6 @@
line-height: 60rpx; line-height: 60rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #959595; color: #959595;
background-color: #E7E6E4; background-color: #E7E6E4;
@ -512,9 +511,7 @@
background: #F5F5F5; background: #F5F5F5;
border-radius: 7rpx 7rpx 7rpx 7rpx; border-radius: 7rpx 7rpx 7rpx 7rpx;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
margin-left: 20rpx; margin-left: 20rpx;

View File

@ -64,7 +64,7 @@
methods: { methods: {
navigtion(item) { navigtion(item) {
if (item.title1 =='发布调货商品') { if (item.title1 == '发布调货商品') {
uni.navigateTo({ uni.navigateTo({
url: '/pages/trading_hall/transfer_goods/index' url: '/pages/trading_hall/transfer_goods/index'
}) })
@ -163,14 +163,12 @@
.title1 { .title1 {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
.title2 { .title2 {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
margin-top: 11rpx; margin-top: 11rpx;

View File

@ -159,23 +159,23 @@
checkedObj: { checkedObj: {
handler(n) { handler(n) {
this.checkedArr = JSON.parse(JSON.stringify(n||{})) this.checkedArr = JSON.parse(JSON.stringify(n || {}))
}, },
deep: true deep: true
} }
}, },
mounted() { mounted() {
this.checkedArr = JSON.parse(JSON.stringify(this.checkedObj||{})) this.checkedArr = JSON.parse(JSON.stringify(this.checkedObj || {}))
this.aryys = JSON.parse(JSON.stringify(this.checkedObj||{})) this.aryys = JSON.parse(JSON.stringify(this.checkedObj || {}))
this.getBounht(); this.getBounht();
}, },
methods: { methods: {
// //
producrprice(e, i, item) { producrprice(e, i, item) {
this.bought[i].price = e.detail.value this.bought[i].price = e.detail.value
// , , // , ,
let obj = this.checkedArr.find((item)=>item.product_id==this.bought[i].product_id); let obj = this.checkedArr.find((item) => item.product_id == this.bought[i].product_id);
obj ? obj.price = e.detail.value:null; obj ? obj.price = e.detail.value : null;
// this.$set(item, 'check', false); // this.$set(item, 'check', false);
// for (let i in this.checkedArr) { // for (let i in this.checkedArr) {
// if (this.checkedArr[i].product_id == item.product_id) { // if (this.checkedArr[i].product_id == item.product_id) {
@ -212,9 +212,9 @@
numberChange(data, i) { numberChange(data, i) {
this.peicenumber = data.number; this.peicenumber = data.number;
this.bought[i].number = data.number this.bought[i].number = data.number
// , , // , ,
let obj = this.checkedArr.find((item)=>item.product_id==this.bought[i].product_id); let obj = this.checkedArr.find((item) => item.product_id == this.bought[i].product_id);
obj ? obj.number = data.number:null; obj ? obj.number = data.number : null;
}, },
tabs(index) { tabs(index) {
@ -285,7 +285,7 @@
that.$set(item, 'check', true); that.$set(item, 'check', true);
that.$set(item, 'number', val.number); that.$set(item, 'number', val.number);
that.$set(item, 'price', val.price); that.$set(item, 'price', val.price);
that.peicenumber=val.number that.peicenumber = val.number
} }
}) })
}) })
@ -456,7 +456,6 @@
line-height: 60rpx; line-height: 60rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #959595; color: #959595;
background-color: #E7E6E4; background-color: #E7E6E4;
@ -485,7 +484,6 @@
background: #F5F5F5; background: #F5F5F5;
border-radius: 7rpx 7rpx 7rpx 7rpx; border-radius: 7rpx 7rpx 7rpx 7rpx;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
margin-left: 20rpx; margin-left: 20rpx;

File diff suppressed because it is too large Load Diff

View File

@ -184,12 +184,14 @@
setTimeout(() => { setTimeout(() => {
this.fSelecting = false; this.fSelecting = false;
}, 500); }, 500);
console.log("选择图片");
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
sizeType: ['original', 'compressed'], sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: (r) => { success: (r) => {
console.log("选择图片成功");
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
uni.showLoading(); uni.showLoading();
// #endif // #endif
@ -254,7 +256,10 @@
uni.hideLoading(); uni.hideLoading();
} }
}); });
} },
fail: (err) => {
console.log("选择图片错误");
}
}) })
}, },
fUpload() { fUpload() {
@ -1261,7 +1266,7 @@
} }
</script> </script>
<style> <style scoped>
.my-canvas { .my-canvas {
display: flex; display: flex;
position: fixed !important; position: fixed !important;

View File

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

View File

@ -87,7 +87,7 @@ export function clearStorage() {
@title 最多汉字数量7个 @title 最多汉字数量7个
@icon success loading none @icon success loading none
*/ */
export function Toast(title, icon = 'none', obj = {}, duration = 800) { export function Toast(title, icon = 'none', obj = {}, duration = 1200) {
let toastData = { let toastData = {
title: title, title: title,
duration: duration, duration: duration,

View File

@ -25,10 +25,10 @@ Vue.component('BaseMoney', BaseMoney)
Vue.component('barcode', barcode) Vue.component('barcode', barcode)
Vue.prototype.$util = util; Vue.prototype.$util = util;
Vue.prototype.$Cache = Cache; Vue.prototype.$Cache = Cache;
Vue.prototype.$procure_price = (item)=>{ Vue.prototype.$wholesale_price = (item)=>{
if(item.sku){ if(item.sku){
let key = Object.keys(item.sku)||['']; let key = Object.keys(item.sku)||[''];
return item.sku[key[0]]?.procure_price; return item.sku[key[0]]?.wholesale_price;
} }
else return '无批发价'; else return '无批发价';
} }

View File

@ -1,218 +1,345 @@
{ {
"name" : "惠农商户平台", "name": "惠农商户平台",
"appid" : "__UNI__1EE148C", "appid": "__UNI__7626C0F",
"description" : "", "description": "",
"versionName" : "1.3.9", "versionName": "1.5.4",
"versionCode" : 139, "versionCode": 1540,
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"titleNView" : true, "titleNView": true,
"usingComponents" : true, "usingComponents": true,
"nvueCompiler" : "uni-app", "nvueCompiler": "uni-app",
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"compatible" : { "compatible": {
"ignoreVersion" : true //trueHBuilderX1.9.0 "ignoreVersion": true //trueHBuilderX1.9.0
}, },
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* */ /* */
"modules" : { "modules": {
"VideoPlayer" : {}, "VideoPlayer": {},
"iBeacon" : {}, "iBeacon": {},
"Barcode" : {}, "Barcode": {},
"Camera" : {}, "Camera": {},
"Geolocation" : {}, "Geolocation": {},
"Payment" : {}, "Payment": {},
"Share" : {}, "Share": {},
"OAuth" : {}, "OAuth": {},
"UniMP" : { "UniMP": {
"description" : "uni小程序" "description": "uni小程序"
}, },
"Maps" : {} "Maps": {}
}, },
"safearea" : { "safearea": {
"bottom" : { "bottom": {
"offset" : "none" "offset": "none"
} }
}, },
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"resizeableActivity" : true, "resizeableActivity": true,
"permissions" : [ "permissions": [
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>", "<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>", "<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>", "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>", "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>", "<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>", "<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
"permissionExternalStorage" : { "permissionExternalStorage": {
"request" : "none", "request": "none",
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。" "prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
}, },
"permissionPhoneState" : { "permissionPhoneState": {
"request" : "none" // "request": "none" //
} }
}, },
/* ios */ /* ios */
"ios" : { "ios": {
"privacyDescription" : { "privacyDescription": {
"NSPhotoLibraryUsageDescription" : "上传用户头像保存分享海报", "NSPhotoLibraryUsageDescription": "上传用户头像保存分享海报",
"NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报", "NSPhotoLibraryAddUsageDescription": "上传用户头像保存分享海报",
"NSCameraUsageDescription" : "上传用户头像保存分享海报", "NSCameraUsageDescription": "上传用户头像保存分享海报",
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店", "NSLocationWhenInUseUsageDescription": "根据客户地理位置推荐最近门店",
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店", "NSLocationAlwaysUsageDescription": "根据客户地理位置推荐最近门店",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店" "NSLocationAlwaysAndWhenInUseUsageDescription": "根据客户地理位置推荐最近门店"
}, },
"idfa" : false, "idfa": false,
"dSYMs" : false "dSYMs": false
}, },
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs": {
"maps" : { "maps": {
"amap" : { "amap": {
"appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d", "appkey_ios": "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945", "appkey_android": "0354f5ddc11e2ea76c5aac647f44d945",
"name" : "amapIvoVHpJR" "name": "amapIvoVHpJR"
} }
}, },
"payment" : { "payment": {
"weixin" : { "weixin": {
"__platform__" : [ "ios", "android" ], "__platform__": ["ios", "android"],
"appid" : "wx9d68c92b550ddd1e", "appid": "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://mer.crmeb.net/" "UniversalLinks": "https://mer.crmeb.net/"
} }
}, },
"share" : { "share": {
"weixin" : { "weixin": {
"appid" : "wx9d68c92b550ddd1e", "appid": "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://mer.crmeb.net/" "UniversalLinks": "https://mer.crmeb.net/"
} }
}, },
"geolocation" : { "geolocation": {
"amap" : { "amap": {
"name" : "amapIvoVHpJR", "name": "amapIvoVHpJR",
"__platform__" : [ "ios", "android" ], "__platform__": ["ios", "android"],
"appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d", "appkey_ios": "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945" "appkey_android": "0354f5ddc11e2ea76c5aac647f44d945"
}, },
"system" : { "system": {
"__platform__" : [ "ios", "android" ] "__platform__": ["ios", "android"]
} }
}, },
"oauth" : {}, "oauth": {},
"ad" : {} "ad": {}
}, },
"icons" : { "icons": {
"android" : { "android": {
"hdpi" : "unpackage/res/icons/72x72.png", "hdpi": "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png", "xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png", "xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png" "xxxhdpi": "unpackage/res/icons/192x192.png"
}, },
"ios" : { "ios": {
"appstore" : "unpackage/res/icons/1024x1024.png", "appstore": "unpackage/res/icons/1024x1024.png",
"ipad" : { "ipad": {
"app" : "unpackage/res/icons/76x76.png", "app": "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png", "app@2x": "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png", "notification": "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png", "proapp@2x": "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png", "settings": "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@2x": "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png", "spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png" "spotlight@2x": "unpackage/res/icons/80x80.png"
}, },
"iphone" : { "iphone": {
"app@2x" : "unpackage/res/icons/120x120.png", "app@2x": "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png", "app@3x": "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png", "notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png", "settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png", "spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png" "spotlight@3x": "unpackage/res/icons/120x120.png"
} }
} }
}, },
"splashscreen" : { "splashscreen": {
"useOriginalMsgbox" : true "useOriginalMsgbox": true
} }
} },
}, "nativePlugins": {
/* */ "JG-JCore": {
"quickapp" : {}, "JPUSH_APPKEY_IOS": "",
/* */ "JPUSH_CHANNEL_IOS": "",
"mp-weixin" : { "JPUSH_APPKEY_ANDROID": "",
"appid" : "wxfb4695444ab8d0d0", "JPUSH_CHANNEL_ANDROID": "",
"setting" : { "__plugin_info__": {
"urlCheck" : false, "name": "JG-JCore",
"minified" : true, "description": "极光推送JCore插件",
"postcss" : true, "platforms": "Android,iOS",
"es6" : true "url": "",
}, "android_package_name": "",
"permission" : { "ios_bundle_id": "",
"scope.userLocation" : { "isCloud": false,
"desc" : "获取您的位置" "bought": -1,
} "pid": "",
}, "parameters": {
"requiredPrivateInfos" : [ "getLocation", "chooseAddress" ], "JPUSH_APPKEY_IOS": {
"usingComponents" : true "des": "[iOS]极光portal配置应用信息时分配的AppKey",
}, "key": "JCore:APP_KEY",
"mp-alipay" : { "value": ""
"usingComponents" : true },
}, "JPUSH_CHANNEL_IOS": {
"mp-baidu" : { "des": "[iOS]用于统计分发渠道不需要可填默认值developer-default",
"usingComponents" : true "key": "JCore:CHANNEL",
}, "value": ""
"mp-toutiao" : { },
"usingComponents" : true "JPUSH_APPKEY_ANDROID": {
}, "des": "[Android]极光portal配置应用信息时分配的AppKey",
"h5" : { "key": "JPUSH_APPKEY",
"devServer" : { "value": ""
"https" : false },
}, "JPUSH_CHANNEL_ANDROID": {
"router" : { "des": "[Android]用于统计分发渠道不需要可填默认值developer-default",
"mode" : "history", "key": "JPUSH_CHANNEL",
"base" : "" "value": ""
}, }
"domain" : "", }
"sdkConfigs" : { }
"maps" : { },
"qqmap" : { "JG-JPush": {
"key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7" "JPUSH_ISPRODUCTION_IOS": "",
} "JPUSH_ADVERTISINGID_IOS": "",
} "JPUSH_DEFAULTINITJPUSH_IOS": "",
}, "JPUSH_OPPO_APPKEY": "",
"title" : "加载中...", "JPUSH_OPPO_APPID": "",
"template" : "template.h5.html" "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": ""
}
}
}
}
}
},
/* */
"quickapp": {},
/* */
"mp-weixin": {
"appid": "wxfb4695444ab8d0d0",
"setting": {
"urlCheck": false,
"minified": true,
"postcss": true,
"es6": true
},
"permission": {
"scope.userLocation": {
"desc": "获取您的位置"
}
},
"requiredPrivateInfos": ["getLocation", "chooseAddress"],
"usingComponents": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"h5": {
"devServer": {
"https": false
},
"router": {
"mode": "history",
"base": ""
},
"domain": "",
"sdkConfigs": {
"maps": {
"qqmap": {
"key": "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
}
}
},
"title": "加载中...",
"template": "template.h5.html"
}
} }
// //
/* ios */ /* ios */

View File

@ -47,7 +47,38 @@
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
// #endif // #endif
"app-plus": { "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 // "scrollIndicator": false //
} }
} }
}, {
"path": "pages/index/unregist",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}, },
{ {
"path": "pages/nongKe/supply_chain/shopping_trolley", "path": "pages/nongKe/supply_chain/shopping_trolley",
@ -300,9 +337,38 @@
"navigationBarTitleText": "补贴", "navigationBarTitleText": "补贴",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "pages/cashier/cashier",
"style": {
"navigationBarTitleText": "收银",
"enablePullDownRefresh": true
}
} }
], ],
"subPackages": [{ "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", "root": "pages/payment",
"name": "payment", "name": "payment",
"pages": [{ "pages": [{
@ -1250,7 +1316,9 @@
{ {
"path": "orderList/index", "path": "orderList/index",
"style": { "style": {
"navigationBarTitleText": "订单列表" "navigationBarTitleText": "订单列表",
"enablePullDownRefresh": true
} }
}, },
{ {
@ -1331,7 +1399,15 @@
"navigationBarTitleText": "商品详情" "navigationBarTitleText": "商品详情"
} }
}, { },
{
"path": "goods_details/videoPlay",
"style": {
"navigationBarTitleText": "视屏详情"
}
},
{
"path": "stockOut/index", "path": "stockOut/index",
"style": { "style": {
"navigationBarTitleText": "扫码出库", "navigationBarTitleText": "扫码出库",
@ -1354,7 +1430,22 @@
"path": "list/index", "path": "list/index",
"style": { "style": {
"navigationBarTitleText": "商品管理", "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": { "style": {
"navigationBarTitleText": "添加店铺分类" "navigationBarTitleText": "添加店铺分类"
} }
}, }, {
{
"path": "addGoods/index", "path": "addGoods/index",
"style": { "style": {
"navigationBarTitleText": "添加商品" "navigationBarTitleText": "添加商品"
} }
}, }, {
{
"path": "addGoods/secound", "path": "addGoods/secound",
"style": { "style": {
"navigationBarTitleText": "添加商品" "navigationBarTitleText": "添加商品"
} }
}, }, {
{
"path": "addGoods/addGoodDetils", "path": "addGoods/addGoodDetils",
"style": { "style": {
"navigationBarTitleText": "商品详情" "navigationBarTitleText": "商品详情"
} }
}, }, {
{
"path": "addGoods/singleSpecification", "path": "addGoods/singleSpecification",
"style": { "style": {
"navigationBarTitleText": "单规格" "navigationBarTitleText": "单规格"
} }
}, }, {
{
"path": "addGoods/mulSpecification", "path": "addGoods/mulSpecification",
"style": { "style": {
"navigationBarTitleText": "多规格" "navigationBarTitleText": "多规格"
} }
}, }, {
{
"path": "addGoods/specificationProperties", "path": "addGoods/specificationProperties",
"style": { "style": {
"navigationBarTitleText": "规格属性" "navigationBarTitleText": "规格属性"
} }
}, }, {
{
"path": "addGoods/freightTemplate", "path": "addGoods/freightTemplate",
"style": { "style": {
"navigationBarTitleText": "运费模板", "navigationBarTitleText": "运费模板",
"onReachBottomDistance": 100, "onReachBottomDistance": 100,
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, }, {
{
"path": "addGoods/addFreightTemplate", "path": "addGoods/addFreightTemplate",
"style": { "style": {
"navigationBarTitleText": "新增运费模板" "navigationBarTitleText": "新增运费模板"
} }
}, }, {
{
"path": "addGoods/modifyPrice", "path": "addGoods/modifyPrice",
"style": { "style": {
"navigationBarTitleText": "修改价格-多规格" "navigationBarTitleText": "修改价格-多规格"
} }
}, }, {
{
"path": "basicSet", "path": "basicSet",
"style": { "style": {
"navigationBarTitleText": "商户基本设置", "navigationBarTitleText": "商户基本设置",
"enablePullDownRefresh": false "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", "path": "addGood/addGood",
"style": { "style": {
"navigationBarTitleText": "商品设置", "navigationBarTitleText": "发布商品",
"enablePullDownRefresh": false
}
},
{
"path": "addGood/addGoodOld",
"style": {
"navigationBarTitleText": "发布商品",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@ -1490,7 +1598,43 @@
"navigationBarTitleText": "更新库存", "navigationBarTitleText": "更新库存",
"enablePullDownRefresh": false "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", "iconPath": "static/tabbar_icon/s.png",
"selectedIconPath": "static/tabbar_icon/s-a.png", "selectedIconPath": "static/tabbar_icon/s-a.png",
"text": "统计" "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", // "pagePath": "pages/product/list/index",
// "iconPath": "static/tabbar_icon/c.png", // "iconPath": "static/tabbar_icon/c.png",
// "selectedIconPath": "static/tabbar_icon/c-a.png", // "selectedIconPath": "static/tabbar_icon/c-a.png",

View File

@ -1,389 +1,574 @@
<template> <template>
<view class="page"> <view class="page">
<view class="bg"> <view class="bg">
<image mode="widthFix" style="width: 100%;" <image mode="widthFix" style="width: 100%;"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/87960202402291430371479.webp"></image> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/87960202402291430371479.webp"></image>
<view class="card" :class="{card2:type==2}"> <view class="card" :class="{card2:type==2}">
<view class="c-head"> <view class="c-head">
<view :class="type==2?'left':'right'" @click="changeType(2)">增收销售补贴</view> <view :class="type==2?'left':'right'" @click="changeType(2)">增收销售补贴</view>
<!-- <view :class="type==1?'left':'right'" @click="changeType(1)">春耕采购补贴</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'"
<view v-else></view> @click="changeType(1)">春耕采购补贴</view>
</view> <view v-else></view>
<view class="c-body-title"> </view>
<view>补贴金额</view> <view class="c-body-title">
<view>补贴状态</view> <view>补贴金额</view>
</view> <view>补贴状态</view>
<view class="c-body-text"> </view>
<view class="price">{{info.subsidy_amount}}</view> <view class="c-body-text">
<view> <view class="price">{{info.subsidy_amount}}</view>
<text v-if="info.subsidy_status" class="price">已到账</text> <view>
<text v-else>未激活</text> <text v-if="info.subsidy_status==2" class="price">{{info.subsidy_status_name}}</text>
</view> <text v-else>{{info.subsidy_status_name}}</text>
</view> </view>
</view> </view>
<view class="bottom"></view> </view>
</view> <view class="bottom"></view>
<image @click="back" class="bg_back" </view>
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image> <image @click="back" class="bg_back"
<view class="bg_title">补贴进度</view> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="body" > <view class="bg_title">补贴进度</view>
<view class="b-card" v-if="type==1"> <view class="body">
<view class="b-top"> <view class="b-card" v-if="type==1">
<view>春耕采购金额{{info.spring_subsidy_amount}}</view> <view class="b-top">
<view>剩余金额{{info.balance}}</view> <view>春耕采购金额{{info.spring_subsidy}}</view>
</view> <view>剩余金额{{info.balance}}</view>
<view class="b-bottom"> </view>
<view class="pro"> <view class="b-bottom">
<view class="loss"> <view class="pro">
<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}%`}">
<view class="text">{{info.spring_subsidy_rate}}%</view> <image class="image"
</view> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.spring_subsidy_rate}}%</view>
</view>
</view> </view>
<view v-if="info.spring_subsidy_rate>=100" style="color: #FF5E0C;">已完成</view> <view v-if="info.spring_subsidy_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view> <view v-else style="color: #ADADAD;">未完成</view>
</view> </view>
</view> </view>
<view class="b-card"> <view class="b-card">
<view class="b-top"> <view class="b-top">
<view>销售目标金额{{info.sale_target}}</view> <view>销售目标金额{{info.sale_target}}</view>
<view>当前进度{{info.sale_amount}}</view> <view>当前进度{{info.sale_amount}}</view>
</view> </view>
<view class="b-bottom"> <view class="b-bottom">
<view class="pro"> <view class="pro">
<view class="loss" :style="{left: `-${100-info.sale_finish_rate}%`}"> <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"
<view class="text">{{info.sale_finish_rate}}%</view> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</view> </image>
</view> <view class="text">{{info.sale_finish_rate}}%</view>
<view v-if="info.sale_finish_rate>=100" style="color: #FF5E0C;">已完成</view> </view>
<view v-else style="color: #ADADAD;">未完成</view> </view>
</view> <view v-if="info.sale_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
</view> <view v-else style="color: #ADADAD;">未完成</view>
<view class="b-card"> </view>
<view class="b-top"> </view>
<view>里海云仓采购目标金额{{info.official_purchase_target}}</view> <view class="b-card" v-if="type==1">
<view>当前进度{{info.official_purchase_amount}}</view> <view class="b-top">
</view> <view>采购目标金额{{info.purchase_target}}</view>
<view class="b-bottom"> <view>当前进度{{info.purchase_amount}}</view>
<view class="pro"> </view>
<view class="loss" :style="{left: `-${100-info.official_purchase_finish_rate}%`}"> <view class="b-bottom">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image> <view class="pro">
<view class="text">{{info.official_purchase_finish_rate}}%</view> <view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}">
</view> <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>
<view v-if="info.official_purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view> <view v-if="info.purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view> <view v-else style="color: #ADADAD;">未完成</view>
</view> </view>
</view> </view>
<view class="b-card"> <block v-else>
<view class="b-top"> <view class="b-card">
<view>其他采购目标金额{{info.purchase_target}}</view> <view class="b-top">
<view>当前进度{{info.purchase_amount}}</view> <view>里海云仓采购目标金额{{info.official_purchase_target}}</view>
</view> <view>当前进度{{info.official_purchase_amount}}</view>
<view class="b-bottom"> </view>
<view class="pro"> <view class="b-bottom">
<view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}"> <view class="pro">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image> <view class="loss" :style="{left: `-${100-info.official_purchase_finish_rate}%`}">
<view class="text">{{info.purchase_finish_rate}}%</view> <image class="image"
</view> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.official_purchase_finish_rate}}%</view>
</view>
</view> </view>
<view v-if="info.purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view> <view v-if="info.official_purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view> <view v-else style="color: #ADADAD;">未完成</view>
</view> </view>
</view> </view>
<view class="b-tips" v-if="type==1"> <view class="b-card">
*春耕采购余额使用完采购金额和销售金额达到后才可获取补贴 <view class="b-top">
</view> <view>其他采购目标金额{{info.purchase_target}}</view>
<view class="b-list" v-else> <view>当前进度{{info.purchase_amount}}</view>
<view class="list-head"></view> </view>
<view class="list-body"> <view class="b-bottom">
<view class="list-b-title"> <view class="pro">
<view>采购金额</view> <view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}">
<view>销售金额</view> <image class="image"
<view>补贴金额</view> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
<view>状态</view> </image>
</view> <view class="text">{{info.purchase_finish_rate}}%</view>
<view class="list-b-text" v-for="(item,index) in list" :key="index"> </view>
<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>
</view>
<view class="list-b-text" style="align-items: center;" v-if="list.length == 0">
<view>暂无数据</view>
</view>
</view>
</view>
</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>
<view class="b-tips" v-if="type==1">
*春耕采购余额使用完采购金额和销售金额达到后才可获取补贴<br>
*当进度完成时将在每月月底进行统计审核审核完成后经本人确认一个季度内到账
</view>
<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">
<view>采购金额</view>
<view>销售金额</view>
<view>补贴金额</view>
<view>状态</view>
</view>
<view class="list-b-text" v-for="(item,index) in list" :key="index">
<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">
<view>暂无数据</view>
</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> </template>
<script> <script>
import { getSubsidy, getSubsidyRecord } from "@/api/admin.js" import {
export default { getSubsidy,
data() { getSubsidyRecord,
return { couponReceive,
type: 2, couponRefuse
mer_id: '', } from "@/api/admin.js"
info: {}, import {
list: [], Toast
where:{ } from "../../libs/uniApi";
page: 1, export default {
limit: 20, data() {
type: 2 return {
}, type: 2,
mer_info:{ mer_id: '',
type_code: '' info: {},
} list: [],
} send_status_cn: '1',
}, send_id: 0,
onLoad() { reason: '',
let user = this.$store.state.app.userInfo; where: {
if(typeof user == 'string') user = JSON.parse(user); page: 1,
this.mer_info.type_code = user.mer_info.type_code; limit: 20,
this.mer_id = user.service.mer_id; type: 2
this.getSubsidy(); },
if(this.type==2)this.getSubsidyRecord(); mer_info: {
}, type_code: ''
onShow() {}, }
methods: { }
back() { },
uni.navigateBack(); onLoad() {
}, let user = this.$store.state.app.userInfo;
changeType(type){ if (typeof user == 'string') user = JSON.parse(user);
this.type = type; this.mer_info.type_code = user.mer_info.type_code;
this.getSubsidy(); this.mer_id = user.service.mer_id;
if(type==2)this.getSubsidyRecord(); this.getSubsidy();
}, this.getSubsidyRecord();
getSubsidy(){ },
if(!this.mer_id) return ; onShow() {},
getSubsidy(this.mer_id, { methods: {
type: this.type showPopup(type, send_id) {
}).then(res=>{ this.send_status_cn = type;
this.info = res.data; this.send_id = send_id;
}) if (type == 2) Toast('已经领取过啦');
}, else this.$refs.pupRef.open();
getSubsidyRecord(){ },
getSubsidyRecord(this.mer_id, this.where).then(res=>{ closePopup() {
this.list = res.data.record; this.$refs.pupRef.close();
}) },
}, back() {
cPrice(n){ // uni.navigateBack();
let t = Number(this.info.official_purchase_finish_rate) + Number(this.info.purchase_finish_rate) + Number(this.info.sale_finish_rate); },
t/=3*100; changeType(type) {
t==0?t=1:null; this.type = type;
return (+n*t).toFixed(2); this.where.type = type;
} this.getSubsidy();
}, this.getSubsidyRecord();
onPullDownRefresh() { },
uni.stopPullDownRefresh() getSubsidy() {
} if (!this.mer_id) return;
} getSubsidy(this.mer_id, {
type: this.type
}).then(res => {
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);
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() {
uni.stopPullDownRefresh()
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
page{ page {
background-color: #fff; background-color: #fff;
} }
.page {
position: relative;
font-size: 28rpx;
background-color: #fff;
}
.bg { .page {
position: absolute; position: relative;
top: 0; font-size: 28rpx;
left: 0; background-color: #fff;
width: 750rpx; }
height: 530rpx;
.card{
position: absolute;
transition: 300ms;
bottom: 30rpx;
left: 50%;
transform: translate(-50%);
width: 670rpx;
height: 290rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b4cfc20240229163236372.webp');
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;
color: #2E2E2E;
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;
bottom: -1px;
width: 100%;
height: 50rpx;
border-radius: 50rpx 50rpx 0 0;
background-color: #fff;
}
}
.bg_back { .bg {
height: 34rpx; position: absolute;
width: 20rpx; top: 0;
position: absolute; left: 0;
top: calc(var(--status-bar-height) + 30rpx); width: 750rpx;
left: 30rpx; height: 530rpx;
}
.bg_title { .card {
font-size: 32rpx; position: absolute;
color: #fff; transition: 300ms;
font-weight: 500; bottom: 30rpx;
position: absolute; left: 50%;
top: calc(var(--status-bar-height) + 30rpx); transform: translate(-50%);
left: 50%; width: 670rpx;
transform: translate(-50%); height: 290rpx;
} background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b4cfc20240229163236372.webp');
background-size: 100% 100%;
background-repeat: no-repeat;
padding-bottom: 40rpx;
.body{ .c-head {
padding: 530rpx 30rpx 30rpx 30rpx; display: flex;
.b-card{ justify-content: space-around;
padding-bottom: 30rpx; height: 90rpx;
.b-top{ overflow: hidden;
display: flex; margin-top: 20rpx;
justify-content: space-between;
font-size: 26rpx;
}
.b-bottom{
display: flex;
justify-content: space-between;
align-items: center;
height: 80rpx;
.pro{ view {
width: 570rpx; flex: 1;
height: 28rpx; text-align: center;
border-radius: 28rpx; }
overflow: hidden;
position: relative; .left {
background-color: #ffdfce; font-size: 32rpx;
.loss{ color: #DF4104;
width: 570rpx; line-height: 80rpx;
height: 28rpx; }
position: absolute;
top: 0; .right {
left: -100%; color: #7A7A7A;
} line-height: 100rpx;
.image{ }
width: 570rpx; }
height: 28rpx;
} .c-body-title {
.text{ display: flex;
position: absolute; justify-content: space-around;
right: 0; color: #2E2E2E;
top: 0; height: 70rpx;
font-size: 20rpx; align-items: center;
color: #fff; }
border-radius: 28rpx;
background-color: #FF5E0C; .c-body-text {
padding: 0 10rpx; display: flex;
height: 30rpx; justify-content: space-around;
border: 2rpx solid #ffad82; color: #7A7A7A;
} height: 70rpx;
} align-items: center;
}
} .price {
.b-tips{ color: #F13B3B;
color: #7A7A7A; }
font-size: 24rpx; }
} }
.b-list{
.list-head{ .card2 {
width: 690rpx; background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e5b2e202402291538018132.webp');
height: 45rpx; }
background: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/7bc46202402291702073308.webp');
background-size: 100% 100%; .bottom {
background-repeat: no-repeat; position: absolute;
} left: 0;
.list-body{ bottom: -1px;
.list-b-title{ width: 100%;
padding: 20rpx 0; height: 50rpx;
display: flex; border-radius: 50rpx 50rpx 0 0;
view{ background-color: #fff;
flex: 1; }
text-align: center; }
flex-shrink: 0;
} .bg_back {
} height: 34rpx;
.list-b-text{ width: 20rpx;
background-color: #F9F9F9; position: absolute;
border-radius: 12rpx; top: calc(var(--status-bar-height) + 30rpx);
padding: 20rpx 0; left: 30rpx;
margin-bottom: 20rpx; }
display: flex;
font-size: 24rpx; .bg_title {
view{ font-size: 32rpx;
flex: 1; color: #fff;
text-align: center; font-weight: 500;
flex-shrink: 0; position: absolute;
} top: calc(var(--status-bar-height) + 30rpx);
.item1{ left: 50%;
color: #F13B3B; transform: translate(-50%);
} }
.item2{
color: #20A162; .body {
} padding: 530rpx 30rpx 30rpx 30rpx;
.item3{
color: #FF8056; .b-card {
} padding-bottom: 30rpx;
.item4{
color: #2E2E2E; .b-top {
} display: flex;
} justify-content: space-between;
} font-size: 26rpx;
} }
}
.b-bottom {
display: flex;
justify-content: space-between;
align-items: center;
height: 80rpx;
.pro {
width: 570rpx;
height: 28rpx;
border-radius: 28rpx;
overflow: hidden;
position: relative;
background-color: #ffdfce;
.loss {
width: 570rpx;
height: 28rpx;
position: absolute;
top: 0;
left: -100%;
}
.image {
width: 570rpx;
height: 28rpx;
}
.text {
position: absolute;
right: 0;
top: 0;
font-size: 20rpx;
color: #fff;
border-radius: 28rpx;
background-color: #FF5E0C;
padding: 0 10rpx;
height: 30rpx;
border: 2rpx solid #ffad82;
}
}
}
}
.b-tips {
color: #7A7A7A;
font-size: 24rpx;
margin-bottom: 30rpx;
}
.b-list {
.list-head {
width: 690rpx;
height: 45rpx;
background: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/7bc46202402291702073308.webp');
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;
padding: 20rpx 0;
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;
}
}
}
}
}
.h430 {
height: 430rpx;
}
.h310 {
height: 310rpx;
}
</style> </style>

View File

@ -198,7 +198,6 @@
that.$util.Tips({ that.$util.Tips({
title: res.message title: res.message
}); });
that.getOrderData();
}) })
.catch(res => { .catch(res => {
that.$util.Tips({ that.$util.Tips({

View File

@ -137,7 +137,7 @@
<view class="info" v-if="item.cart_info && item.cart_info.product"> <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="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_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='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(item)'>-</view> <view class="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(item)'>-</view>
<view class='num'>{{item.split_num}}</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 class="info_sku" v-if="item.cart_info && item.cart_info.productAttr">{{item.cart_info.productAttr.sku}}</view>
</view> </view>
<view class="pro_price" v-if="item.cart_info && item.cart_info.productAttr"> <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="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 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> </view>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View 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>

View File

@ -201,7 +201,7 @@
options.product_type ? uni.setStorageSync("PRODUCT_TYPE", 98) : uni.removeStorageSync("PRODUCT_TYPE"); options.product_type ? uni.setStorageSync("PRODUCT_TYPE", 98) : uni.removeStorageSync("PRODUCT_TYPE");
this.getOrderStatistics(this.mer_id); this.getOrderStatistics(this.mer_id);
this.getList(this.mer_id) this.getList(this.mer_id)
this.purchaseOrderList(this.mer_id) // this.purchaseOrderList(this.mer_id)
}, },
methods: { methods: {
getIndex: function() { getIndex: function() {

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@
</view> </view>
</view> </view>
<view class="money"> <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 }} <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>

View File

@ -11,6 +11,9 @@
<view> <view>
<scroll-view class="nav acea-row" scroll-x="true" style="white-space: nowrap; display: flex;" <scroll-view class="nav acea-row" scroll-x="true" style="white-space: nowrap; display: flex;"
scroll-with-animation show-scrollbar="true"> 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 class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">
待付款 待付款
</view> </view>
@ -32,11 +35,14 @@
<view class="item" :class="where.status == 6 ? 'on' : ''" @click="changeStatus(6)"> <view class="item" :class="where.status == 6 ? 'on' : ''" @click="changeStatus(6)">
退款 退款
</view> </view>
<view class="item" :class="where.status == 7 ? 'on' : ''" @click="changeStatus(7)">
暂存
</view>
</scroll-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="item" v-for="(item, index) in list" :key="index">
<view class="order-num acea-row row-middle"> <view class="order-num acea-row row-middle">
<text v-if="item.order && item.order.activity_type != 0" class="activity_type"> <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 v-if="val.product" class="goods acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<view class="pictrue"> <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>
<view class="text acea-row row-between row-column"> <view class="text acea-row row-between row-column">
<view class="info line1 refund-info"> <view class="info line1 refund-info">
@ -93,6 +100,107 @@
</view> </view>
</view> </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 v-else class="list">
<view class="item" v-for="(item, index) in list" :key="index"> <view class="item" v-for="(item, index) in list" :key="index">
<view class="order-num acea-row row-middle"> <view class="order-num acea-row row-middle">
@ -100,8 +208,8 @@
<text v-else-if="item.activity_type != 0" class="activity_type"> <text v-else-if="item.activity_type != 0" class="activity_type">
{{ item.activity_type == 1 ? '秒杀' : item.activity_type == 2 ? '预售' : item.activity_type == 3 ? '助力' : item.activity_type == 4 ? '拼团' : item.activity_type == 10 ? '套餐' :'' }} {{ item.activity_type == 1 ? '秒杀' : item.activity_type == 2 ? '预售' : item.activity_type == 3 ? '助力' : item.activity_type == 4 ? '拼团' : item.activity_type == 10 ? '套餐' :'' }}
</text> </text>
订单号{{ item.order_sn }} 订单号{{ item.order_sn }}
<text class="time">下单时间{{ item.create_time }}</text> <text class="time">下单时间{{ item.create_time }}</text>
<text class="order-status" <text class="order-status"
v-if="item.refunding != 0 && where.status != 1">{{item.refunding==1 ? '退款中' : item.refunding==2 ? '部分退款' : '全部退款'}}</text> v-if="item.refunding != 0 && where.status != 1">{{item.refunding==1 ? '退款中' : item.refunding==2 ? '部分退款' : '全部退款'}}</text>
</view> </view>
@ -120,9 +228,10 @@
<view class="attr" v-if="val.cart_info.productAttr.sku"> <view class="attr" v-if="val.cart_info.productAttr.sku">
{{ val.cart_info.productAttr.sku }} {{ val.cart_info.productAttr.sku }}
</view> </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)"
商品条码: {{ val.cart_info.productAttr.product.bar_code }} v-if="val.cart_info.productAttr.product&&val.cart_info.productAttr.product.bar_code">
</view> 商品条码: {{ val.cart_info.productAttr.product.bar_code }}
</view>
</view> </view>
</view> </view>
<view class="money"> <view class="money">
@ -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 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> </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> </view>
<view class="public-total" v-if="item.pay_type !== 8"> <view class="public-total" v-if="item.pay_type !== 8">
{{ item.total_num }}件商品 {{ item.total_num }}件商品
@ -174,14 +277,16 @@
一键改价 一键改价
</view> </view>
<view class="bnt" @click="modify(item, 1)">订单备注</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)">去发货 @click="toPostage(item)">去发货
</view> </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)">去发货 @click="toPostagequ(item)">去发货
</view> </view>
<view class="bnt bnt_color" <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> @click="toDetail(item)">去核销</view>
</view> </view>
</view> </view>
@ -192,8 +297,10 @@
<image src="/static/images/no_thing.png" mode="widthFix"></image> <image src="/static/images/no_thing.png" mode="widthFix"></image>
<view class="nothing_text">暂无订单~</view> <view class="nothing_text">暂无订单~</view>
</view> </view>
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" <PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)"
v-on:savePrice="savePrice" :status="status"></PriceChange> v-on:savePrice="savePrice" :status="status"></PriceChange>
<view> <view>
<view class="priceChange" :class="refundMark === true ? 'on' : ''"> <view class="priceChange" :class="refundMark === true ? 'on' : ''">
<view class="priceTitle"> <view class="priceTitle">
@ -209,18 +316,53 @@
</view> </view>
<view class="mask" @touchmove.prevent v-show="refundMark === true"></view> <view class="mask" @touchmove.prevent v-show="refundMark === true"></view>
</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"> <u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
<view style="text-align: center;margin-top: 30rpx;"> <view style="text-align: center;margin-top: 30rpx;">
请把二维码展示给取货人员 请把二维码展示给取货人员
</view> </view>
<view style="padding: 28.07rpx;"> <view style="padding: 28.07rpx;">
<image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image> <image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image>
</view> </view>
</u-popup> </u-popup> -->
<view class="bar-code" v-show="showBar" @click="showBar=false">
<barcode ref="code"></barcode> <view class="bar-code" v-show="showBar" @click="showBar=false">
</view> <barcode ref="code"></barcode>
</view>
</view> </view>
</template> </template>
@ -244,7 +386,9 @@
refundOrderReceive, refundOrderReceive,
setRefundMark, setRefundMark,
postconfirm, postconfirm,
logisticsCode logisticsCode,
delivery,
lockList
} from "@/api/admin"; } from "@/api/admin";
import Loading from '@/components/Loading/index' import Loading from '@/components/Loading/index'
@ -252,6 +396,9 @@
import { import {
isMoney isMoney
} from '@/utils/validate.js' } from '@/utils/validate.js'
import {
Toast
} from "../../../libs/uniApi";
export default { export default {
name: "AdminOrderList", name: "AdminOrderList",
components: { components: {
@ -260,7 +407,14 @@
}, },
data() { data() {
return { return {
showBar: false, //
deliveryForm: {
delivery_name: '',
delivery_id: '',
delivery_type: 2,
mer_id: ''
},
showBar: false,
current: "", current: "",
change: false, change: false,
refundMark: false, refundMark: false,
@ -271,7 +425,7 @@
status: 1, status: 1,
search_info: '', search_info: '',
product_type: '', product_type: '',
pay_time: null, pay_time: null,
}, },
list: [], list: [],
loaded: false, loaded: false,
@ -293,32 +447,55 @@
that.init(); that.init();
} }
}, },
}, },
onLoad(option) { onLoad(option) {
this.where.product_type = uni.getStorageSync("PRODUCT_TYPE") ?? "" this.where.product_type = uni.getStorageSync("PRODUCT_TYPE") ?? ""
this.where.status = option.types 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.current = "";
this.merId = option.merId; this.merId = option.merId;
if(option.pay_time){ if (option.pay_time) {
this.where.pay_time = option.pay_time; this.where.pay_time = option.pay_time;
} }
this.getIndex(); this.getIndex();
}, },
onPullDownRefresh() {
this.loaded = false;
this.where.page = 1;
this.list = [];
this.getIndex();
},
methods: { 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() { popUpClose() {
this.popUpShow = false this.popUpShow = false
}, },
showBarCode(val){ showBarCode(val) {
this.showBar = true this.showBar = true
this.$refs['code'].init({ this.$refs['code'].init({
name: val.store_name, name: val.store_name,
code: val.bar_code code: val.bar_code
}); });
}, },
// //
tongyi(id, number) { tongyi(id, number) {
let data = { let data = {
@ -342,33 +519,40 @@
}, },
handleSearch() { handleSearch() {
this.loaded = false; this.loaded = false;
this.where.page = 1; this.where.page = 1;
this.list = []; this.list = [];
this.getIndex(); this.getIndex();
}, },
// //
getIndex() { getIndex() {
let that = this; let that = this;
// console.log(that.merId)
if (that.loading || that.loaded) return; if (that.loading || that.loaded) return;
that.loading = true; that.loading = true;
if (that.where.status == 6) { if (that.where.status == 6) {
getRefundOrderList(that.where, that.merId).then( getRefundOrderList(that.where, that.merId).then(res => {
res => { that.loading = false;
that.loading = false; that.loaded = res.data.list.length < that.where.limit;
that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list); that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
}, }, err => {
err => { that.$util.Tips({
that.$util.Tips({ title: err
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 { } else {
getOrderList(that.where, that.merId).then( getOrderList(that.where, that.merId).then(
res => { res => {
@ -376,11 +560,10 @@
that.loaded = res.data.list.length < that.where.limit; that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list); that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
// console.log(that.list) uni.stopPullDownRefresh();
// console.log(that.list);
}, },
err => { err => {
uni.stopPullDownRefresh();
that.$util.Tips({ that.$util.Tips({
title: err title: err
}); });
@ -402,12 +585,12 @@
if (val != 'verify') { if (val != 'verify') {
if (this.where.status != val) { if (this.where.status != val) {
this.where.status = val; this.where.status = val;
this.where.search_info='' this.where.search_info = ''
delete this.where.is_verify; delete this.where.is_verify;
this.init(); this.init();
} }
} else { } else {
this.where.search_info='' this.where.search_info = ''
this.where.is_verify = 1; this.where.is_verify = 1;
delete this.where.status; delete this.where.status;
this.init(); this.init();
@ -434,21 +617,18 @@
} }
setRefundMark(that.merId, that.refundInfo.refund_order_id, { setRefundMark(that.merId, that.refundInfo.refund_order_id, {
mer_mark: that.refundInfo.mer_mark mer_mark: that.refundInfo.mer_mark
}).then( }).then(res => {
res => { that.refundMark = false;
that.refundMark = false; this.$util.Tips({
this.$util.Tips({ title: res.message,
title: res.message, icon: 'success'
icon: 'success' })
}) }, err => {
}, that.refundMark = false;
err => { that.$util.Tips({
that.refundMark = false; title: err
that.$util.Tips({ });
title: err });
});
}
);
}, },
changeclose: function(msg) { changeclose: function(msg) {
this.change = msg; this.change = msg;
@ -477,16 +657,55 @@
} }
}) })
}, },
//
toPostagequ(item) {
this.popUpShow = true
logisticsCode(item.order_id).then(res => {
//
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) { if (res.status == 200) {
this.payCodeUrl = res.data.qrcode 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) { toPostage(item) {
let that = this; let that = this;
if (item.refunding != 0) { if (item.refunding != 0) {
@ -572,8 +791,17 @@
} }
}, },
toDetail(item) { 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({ 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> </script>
<style lang="scss"> <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 { .pos-order-list .top-header {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 9999; z-index: 10;
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
} }
@ -676,6 +965,13 @@
position: relative; position: relative;
} }
.fk_status {
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
}
.pos-order-list .list .item .order-status { .pos-order-list .list .item .order-status {
color: #ff9600; color: #ff9600;
position: absolute; position: absolute;
@ -1017,25 +1313,27 @@
flex: 1; flex: 1;
} }
} }
.bar-code{
position: fixed; .bar-code {
top: 0; position: fixed;
left: 0; top: 0;
z-index: 999999; left: 0;
width: 100vw; z-index: 999999;
height: 100vh; width: 100vw;
background-color: rgba(0,0,0,0.2); height: 100vh;
display: flex; background-color: rgba(0, 0, 0, 0.2);
align-items: center; display: flex;
justify-content: center; align-items: center;
} justify-content: center;
.cloud-tag{ }
font-size: 20rpx;
padding: 2rpx 5rpx; .cloud-tag {
font-weight: 400; font-size: 20rpx;
background-color: #ff4c3c; padding: 2rpx 5rpx;
border-radius: 8rpx; font-weight: 400;
margin-right: 6rpx; background-color: #ff4c3c;
color: #fff; border-radius: 8rpx;
} margin-right: 6rpx;
color: #fff;
}
</style> </style>

View File

@ -125,7 +125,7 @@
</view> </view>
</view> </view>
<view class="money"> <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="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 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 File

@ -16,7 +16,8 @@
</view> </view>
<view>{{ orderInfo.mer_delivery_address }}</view> <view>{{ orderInfo.mer_delivery_address }}</view>
<!-- #ifdef H5 --> <!-- #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 --> <!-- #endif -->
<!-- #ifdef MP --> <!-- #ifdef MP -->
<button class="copy" @tap="copyText">复制</button> <button class="copy" @tap="copyText">复制</button>
@ -26,7 +27,9 @@
<image :src="`${domain}/static/images/line.jpg`" /> <image :src="`${domain}/static/images/line.jpg`" />
</view> </view>
<view class="pos-order-goods"> <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="picTxt acea-row row-between-wrapper">
<view class="pictrue"> <view class="pictrue">
<image :src="item.product.cart_info.product.image || item.product.cart_info.product.image" /> <image :src="item.product.cart_info.product.image || item.product.cart_info.product.image" />
@ -71,7 +74,7 @@
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>退款原因</view> <view>退款原因</view>
<view class="conter">{{ orderInfo.refund_message }}</view> <view class="conter">{{ getRightText(orderInfo.refund_message) }}</view>
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>备注信息</view> <view>备注信息</view>
@ -90,26 +93,25 @@
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'"> <view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
<view class="more"></view> <view class="more"></view>
<view class="bnt cancel" @click="modify('1')">订单备注</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 class="bnt delivery" v-if="orderInfo.status == 2" @click="confirmOrder">确认收货</view>
</view> </view>
<view> <view>
<view class="priceChange" :class="change === true ? 'on' : ''"> <view class="priceChange" :class="change === true ? 'on' : ''">
<view class="priceTitle"> <view class="priceTitle">
订单备注 订单备注
<span class="iconfont icon-guanbi" @click="changeclose"></span> <span class="iconfont icon-guanbi" @click="changeclose"></span>
</view> </view>
<view class="listChange"> <view class="listChange">
<textarea <textarea placeholder="请填写备注信息..." v-model="orderInfo.mer_mark"></textarea>
placeholder="请填写备注信息..." </view>
v-model="orderInfo.mer_mark" <view class="modify" @click="save">
></textarea> 确认提交
</view> </view>
<view class="modify" @click="save"> </view>
确认提交 <view class="mask" @touchmove.prevent v-show="change === true"></view>
</view>
</view>
<view class="mask" @touchmove.prevent v-show="change === true"></view>
</view> </view>
</view> </view>
</template> </template>
@ -132,12 +134,15 @@
refundOrderReceive, refundOrderReceive,
setRefundMark setRefundMark
} from "@/api/admin"; } from "@/api/admin";
import { isMoney } from '@/utils/validate.js' import {
import { HTTP_REQUEST_URL } from '@/config/app'; isMoney
} from '@/utils/validate.js'
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default { export default {
name: "AdminOrder", name: "AdminOrder",
components: { components: {},
},
props: {}, props: {},
data: function() { data: function() {
return { return {
@ -155,7 +160,7 @@
payType: "", payType: "",
types: "", types: "",
clickNum: 1, clickNum: 1,
goname:'', goname: '',
domain: HTTP_REQUEST_URL, domain: HTTP_REQUEST_URL,
}; };
}, },
@ -179,12 +184,12 @@
var clipboard = new ClipboardJS('.copy-data'); var clipboard = new ClipboardJS('.copy-data');
clipboard.on('success', function(e) { clipboard.on('success', function(e) {
self.$util.Tips({ self.$util.Tips({
title:'复制成功' title: '复制成功'
}) })
}); });
clipboard.on('error', function(e) { clipboard.on('error', function(e) {
self.$util.Tips({ self.$util.Tips({
title:'复制失败' title: '复制失败'
}) })
}); });
}); });
@ -192,6 +197,14 @@
}, },
methods: { methods: {
getRightText(str) {
const index = str.indexOf("@");
if (index !== -1) {
return str.substring(index + 1);
} else {
return str
}
},
more: function() { more: function() {
this.order = !this.order; this.order = !this.order;
}, },
@ -203,7 +216,7 @@
this.change = false; this.change = false;
}, },
// //
loookImg(item,index){ loookImg(item, index) {
uni.previewImage({ uni.previewImage({
urls: this.orderInfo.pics, urls: this.orderInfo.pics,
current: this.orderInfo.pics[index] current: this.orderInfo.pics[index]
@ -216,38 +229,37 @@
urls: list urls: list
}); });
}, },
copyText: function (e) { copyText: function(e) {
// var copy = e.currentTarget.dataset.copy; //data-copy // var copy = e.currentTarget.dataset.copy; //data-copy
let arr = [ let arr = [{
{ name: "收货人姓名",
name: "收货人姓名", value: this.orderInfo.real_name
value: this.orderInfo.real_name },
}, {
{ name: "收货人电话",
name: "收货人电话", value: this.orderInfo.user_phone
value: this.orderInfo.user_phone },
}, {
{ name: "收货人地址",
name: "收货人地址", value: this.orderInfo.user_address
value: this.orderInfo.user_address }
} ]
] wx.setClipboardData({
wx.setClipboardData({ data: `${arr.map(item =>`${item.name}: ${item.value}`).join("\n")}`,
data: `${arr.map(item =>`${item.name}: ${item.value}`).join("\n")}`, success: function(res) {
success: function (res) { wx.getClipboardData({
wx.getClipboardData({ success: function(res) {
success: function (res) { wx.showToast({
wx.showToast({ title: '复制成功'
title: '复制成功' })
}) }
} })
}) }
} })
})
}, },
getIndex: function() { getIndex: function() {
let that = this; let that = this;
getRefundOrderDetail(that.mer_id,that.order_id).then( getRefundOrderDetail(that.mer_id, that.order_id).then(
res => { res => {
that.orderInfo = res.data; that.orderInfo = res.data;
}, },
@ -269,7 +281,7 @@
content: '为保障权益,请收到货确认无误后,再确认收货', content: '为保障权益,请收到货确认无误后,再确认收货',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
refundOrderReceive(that.mer_id,that.orderInfo.refund_order_id).then(res => { refundOrderReceive(that.mer_id, that.orderInfo.refund_order_id).then(res => {
return that.$util.Tips({ return that.$util.Tips({
title: '操作成功', title: '操作成功',
icon: 'success' icon: 'success'
@ -286,14 +298,16 @@
}) })
}, },
// //
save(){ save() {
let that = this; let that = this;
if (!that.orderInfo.mer_mark) { if (!that.orderInfo.mer_mark) {
return this.$util.Tips({ return this.$util.Tips({
title: '请输入备注' 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 => { res => {
that.change = false; that.change = false;
this.$util.Tips({ this.$util.Tips({
@ -318,7 +332,7 @@
} }
}); });
}, },
copyData(id){ copyData(id) {
uni.setClipboardData({ uni.setClipboardData({
data: id, data: id,
success: function() { success: function() {
@ -348,36 +362,44 @@
background: -webkit-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%); background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
} }
.pos-order-details .header .state { .pos-order-details .header .state {
font-size: 36upx; font-size: 36upx;
color: #fff; color: #fff;
} }
.pos-order-details .header .data { .pos-order-details .header .data {
margin-left: 35upx; margin-left: 35upx;
font-size: 28upx; font-size: 28upx;
} }
.pos-order-details .header .data .order-num { .pos-order-details .header .data .order-num {
font-size: 30upx; font-size: 30upx;
margin-bottom: 8upx; margin-bottom: 8upx;
} }
.pos-order-details .remarks { .pos-order-details .remarks {
width: 100%; width: 100%;
height: 86upx; height: 86upx;
background-color: #fff; background-color: #fff;
padding: 0 30upx; padding: 0 30upx;
} }
.pos-order-details .remarks .iconfont { .pos-order-details .remarks .iconfont {
font-size: 40upx; font-size: 40upx;
color: #2a7efb; color: #2a7efb;
} }
.pos-order-details .remarks input { .pos-order-details .remarks input {
width: 630upx; width: 630upx;
height: 100%; height: 100%;
font-size: 30upx; font-size: 30upx;
} }
.pos-order-details .remarks input::placeholder { .pos-order-details .remarks input::placeholder {
color: #666; color: #666;
} }
.pos-order-details .orderingUser { .pos-order-details .orderingUser {
font-size: 26upx; font-size: 26upx;
color: #282828; color: #282828;
@ -387,17 +409,21 @@
margin-top: 16upx; margin-top: 16upx;
border-bottom: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;
} }
.pos-order-details .orderingUser .iconfont { .pos-order-details .orderingUser .iconfont {
font-size: 40upx; font-size: 40upx;
color: #2a7efb; color: #2a7efb;
margin-right: 15upx; margin-right: 15upx;
} }
.pos-order-details .address { .pos-order-details .address {
margin-top: 0; margin-top: 0;
} }
.pos-order-details .pos-order-goods { .pos-order-details .pos-order-goods {
margin-top: 17upx; margin-top: 17upx;
} }
.pos-order-details .footer .more { .pos-order-details .footer .more {
font-size: 27upx; font-size: 27upx;
color: #aaa; color: #aaa;
@ -408,11 +434,13 @@
margin-right: 25upx; margin-right: 25upx;
position: relative; position: relative;
} }
.pos-order-details .footer .delivery { .pos-order-details .footer .delivery {
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%); background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -webkit-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%); background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
} }
.pos-order-details .footer .more .order .arrow { .pos-order-details .footer .more .order .arrow {
width: 0; width: 0;
height: 0; height: 0;
@ -423,6 +451,7 @@
left: 15upx; left: 15upx;
bottom: -18upx; bottom: -18upx;
} }
.pos-order-details .footer .more .order .arrow:before { .pos-order-details .footer .more .order .arrow:before {
content: ''; content: '';
width: 0; width: 0;
@ -434,6 +463,7 @@
left: -10upx; left: -10upx;
bottom: 0; bottom: 0;
} }
.pos-order-details .footer .more .order { .pos-order-details .footer .more .order {
width: 200upx; width: 200upx;
background-color: #fff; background-color: #fff;
@ -443,68 +473,84 @@
top: -200upx; top: -200upx;
z-index: 9; z-index: 9;
} }
.pos-order-details .footer .more .order .item { .pos-order-details .footer .more .order .item {
height: 77upx; height: 77upx;
line-height: 77upx; line-height: 77upx;
} }
.pos-order-details .footer .more .order .item~.item { .pos-order-details .footer .more .order .item~.item {
border-top: 1px solid #f5f5f5; border-top: 1px solid #f5f5f5;
} }
.pos-order-details .footer .more .moreName { .pos-order-details .footer .more .moreName {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.order-details .header { .order-details .header {
padding: 0 30upx; padding: 0 30upx;
height: 150upx; height: 150upx;
} }
.order-details .header.on { .order-details .header.on {
background-color: #666 !important; background-color: #666 !important;
} }
.order-details .header .pictrue { .order-details .header .pictrue {
width: 110upx; width: 110upx;
height: 110upx; height: 110upx;
} }
.order-details .header .pictrue image { .order-details .header .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.order-details .header .data { .order-details .header .data {
color: rgba(255, 255, 255, 0.8); color: rgba(255, 255, 255, 0.8);
font-size: 24upx; font-size: 24upx;
margin-left: 27upx; margin-left: 27upx;
} }
.order-details .header.on .data { .order-details .header.on .data {
margin-left: 0; margin-left: 0;
} }
.order-details .header .data .state { .order-details .header .data .state {
font-size: 30upx; font-size: 30upx;
font-weight: bold; font-weight: bold;
color: #fff; color: #fff;
margin-bottom: 7upx; margin-bottom: 7upx;
} }
.order-details .nav { .order-details .nav {
background-color: #fff; background-color: #fff;
font-size: 26upx; font-size: 26upx;
color: #282828; color: #282828;
padding: 25upx 0; padding: 25upx 0;
} }
.order-details .nav .navCon { .order-details .nav .navCon {
padding: 0 40upx; padding: 0 40upx;
} }
.order-details .nav .navCon .on { .order-details .nav .navCon .on {
font-weight: bold; font-weight: bold;
color: #e93323; color: #e93323;
} }
.order-details .nav .progress { .order-details .nav .progress {
padding: 0 65upx; padding: 0 65upx;
margin-top: 10upx; margin-top: 10upx;
} }
.order-details .nav .progress .line { .order-details .nav .progress .line {
width: 100upx; width: 100upx;
height: 2upx; height: 2upx;
background-color: #939390; background-color: #939390;
} }
.order-details .nav .progress .iconfont { .order-details .nav .progress .iconfont {
font-size: 25upx; font-size: 25upx;
color: #939390; color: #939390;
@ -515,6 +561,7 @@
text-align: center; text-align: center;
margin-right: 0 !important; margin-right: 0 !important;
} }
.order-details .address { .order-details .address {
font-size: 26upx; font-size: 26upx;
color: #868686; color: #868686;
@ -522,52 +569,64 @@
padding: 25upx 30upx 30upx 30upx; padding: 25upx 30upx 30upx 30upx;
position: relative; position: relative;
} }
.order-details .address .name { .order-details .address .name {
font-size: 30upx; font-size: 30upx;
color: #282828; color: #282828;
margin-bottom: 0.1rem; margin-bottom: 0.1rem;
} }
.order-details .address .name .phone { .order-details .address .name .phone {
margin-left: 40upx; margin-left: 40upx;
} }
.order-details .line { .order-details .line {
width: 100%; width: 100%;
height: 3upx; height: 3upx;
} }
.order-details .line image { .order-details .line image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
.order-details .wrapper { .order-details .wrapper {
background-color: #fff; background-color: #fff;
margin-top: 12upx; margin-top: 12upx;
padding: 30upx; padding: 30upx;
} }
.order-details .wrapper .item { .order-details .wrapper .item {
font-size: 28upx; font-size: 28upx;
color: #282828; color: #282828;
} }
.order-details .wrapper .item~.item { .order-details .wrapper .item~.item {
margin-top: 20upx; margin-top: 20upx;
} }
.order-details .wrapper .item .conter { .order-details .wrapper .item .conter {
color: #868686; color: #868686;
text-align: right; text-align: right;
} }
.order-details .wrapper .item .virtual_image { .order-details .wrapper .item .virtual_image {
// text-align: left; // text-align: left;
margin-left: 50rpx; margin-left: 50rpx;
} }
.order-details .wrapper .item .virtual_image .picture{
.order-details .wrapper .item .virtual_image .picture {
width: 106rpx; width: 106rpx;
height: 106rpx; height: 106rpx;
border-radius: 8rpx; border-radius: 8rpx;
margin-right: 10rpx; margin-right: 10rpx;
&:last-child{
&:last-child {
margin-right: 0; margin-right: 0;
} }
} }
.order-details .wrapper .item .conter .copy { .order-details .wrapper .item .conter .copy {
font-size: 20rpx; font-size: 20rpx;
color: #868686; color: #868686;
@ -581,7 +640,8 @@
justify-content: center; justify-content: center;
border-radius: 16rpx; border-radius: 16rpx;
} }
.address .copy{
.address .copy {
font-size: 20rpx; font-size: 20rpx;
color: #868686; color: #868686;
border-radius: 3rpx; border-radius: 3rpx;
@ -596,15 +656,18 @@
right: 30rpx; right: 30rpx;
top: 20rpx; top: 20rpx;
} }
.order-details .wrapper .actualPay { .order-details .wrapper .actualPay {
border-top: 1upx solid #eee; border-top: 1upx solid #eee;
margin-top: 30upx; margin-top: 30upx;
padding-top: 30upx; padding-top: 30upx;
} }
.order-details .wrapper .actualPay .money { .order-details .wrapper .actualPay .money {
font-weight: bold; font-weight: bold;
font-size: 30upx; font-size: 30upx;
} }
.order-details .footer { .order-details .footer {
width: 100%; width: 100%;
height: 100upx; height: 100upx;
@ -615,6 +678,7 @@
padding: 0 30upx; padding: 0 30upx;
border-top: 1px solid #eee; border-top: 1px solid #eee;
} }
.order-details .footer .bnt { .order-details .footer .bnt {
width: auto; width: auto;
height: 60upx; height: 60upx;
@ -626,52 +690,65 @@
font-size: 27upx; font-size: 27upx;
padding: 0 3%; padding: 0 3%;
} }
.order-details .footer .bnt.cancel { .order-details .footer .bnt.cancel {
color: #aaa; color: #aaa;
border: 1px solid #ddd; border: 1px solid #ddd;
} }
.order-details .footer .bnt.default { .order-details .footer .bnt.default {
color: #444; color: #444;
border: 1px solid #444; border: 1px solid #444;
} }
.order-details .footer .bnt~.bnt { .order-details .footer .bnt~.bnt {
margin-left: 18upx; margin-left: 18upx;
} }
.pos-order-goods { .pos-order-goods {
padding: 0 30upx; padding: 0 30upx;
background-color: #fff; background-color: #fff;
} }
.pos-order-goods .goods { .pos-order-goods .goods {
height: 185upx; height: 185upx;
position: relative; position: relative;
} }
.pos-order-goods .goods~.goods { .pos-order-goods .goods~.goods {
border-top: 1px dashed #e5e5e5; border-top: 1px dashed #e5e5e5;
} }
.pos-order-goods .goods .picTxt { .pos-order-goods .goods .picTxt {
width: 515upx; width: 515upx;
} }
.pos-order-goods .goods .picTxt .pictrue { .pos-order-goods .goods .picTxt .pictrue {
width: 130upx; width: 130upx;
height: 130upx; height: 130upx;
} }
.pos-order-goods .goods .picTxt .pictrue image { .pos-order-goods .goods .picTxt .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 6upx; border-radius: 6upx;
} }
.pos-order-goods .goods .picTxt .text { .pos-order-goods .goods .picTxt .text {
width: 365upx; width: 365upx;
height: 130upx; height: 130upx;
} }
.pos-order-goods .goods .picTxt .text .info { .pos-order-goods .goods .picTxt .text .info {
font-size: 28upx; font-size: 28upx;
color: #282828; color: #282828;
} }
.pos-order-goods .goods .picTxt .text .attr { .pos-order-goods .goods .picTxt .text .attr {
font-size: 24upx; font-size: 24upx;
color: #999; color: #999;
} }
.pos-order-goods .goods .money { .pos-order-goods .goods .money {
width: 164upx; width: 164upx;
text-align: right; text-align: right;
@ -681,48 +758,117 @@
right: 0; right: 0;
color: #999999; color: #999999;
} }
.pos-order-goods .goods .money .refund_num{
.pos-order-goods .goods .money .refund_num {
display: inline-block; display: inline-block;
margin-left: 10rpx; margin-left: 10rpx;
} }
.pos-order-goods .goods .x-money { .pos-order-goods .goods .x-money {
color: #FF9600; 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 {
.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;} position: fixed;
.priceChange .priceTitle .iconfont{position:absolute;font-size:40upx;right:26upx;top:23upx;width:40upx;height:40upx;line-height:40upx;} width: 580upx;
.priceChange .listChange{padding:0 40upx;} background-color: #fff;
.priceChange .listChange textarea{box-sizing: border-box;} border-radius: 10upx;
.priceChange .listChange .item{height:103upx;border-bottom:1px solid #e3e3e3;font-size:32upx;color:#333;} top: 50%;
.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;} left: 50%;
.priceChange .listChange textarea { margin-left: -290upx;
border: 1px solid #eee; margin-top: -335upx;
width: 100%; z-index: 666;
height: 200upx; transition: all 0.3s ease-in-out 0s;
margin-top: 50upx; transform: scale(0);
border-radius: 10upx; opacity: 0;
color: #333; }
padding: 20upx;
} .priceChange.on {
.upload-img{ opacity: 1;
display: flex; transform: scale(1);
flex-wrap: wrap; }
margin-top: 20rpx;
.img-item{ .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; position: relative;
width: 156rpx; }
height: 156rpx;
margin-right: 23rpx; .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%;
height: 200upx;
margin-top: 50upx;
border-radius: 10upx;
color: #333;
padding: 20upx;
}
.upload-img {
display: flex;
flex-wrap: wrap;
margin-top: 20rpx; margin-top: 20rpx;
&:nth-child(4n){
margin-right: 0; .img-item {
} position: relative;
image{
width: 156rpx; width: 156rpx;
height: 156rpx; height: 156rpx;
border-radius: 8rpx; margin-right: 23rpx;
margin-top: 20rpx;
&:nth-child(4n) {
margin-right: 0;
}
image {
width: 156rpx;
height: 156rpx;
border-radius: 8rpx;
}
} }
} }
}
</style> </style>

1785
pages/cashier/cashier.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -36,7 +36,7 @@
<navigator <navigator
v-if="item.msn_type === 6 && item.refundOrder && item.refundOrder.refund_order_id" v-if="item.msn_type === 6 && item.refundOrder && item.refundOrder.refund_order_id"
open-type="navigate" 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"> <div class="broadcast-details_num">
<span>退款单号{{ item.refundOrder.refund_order_sn }}</span> <span>退款单号{{ item.refundOrder.refund_order_sn }}</span>
</div> </div>
@ -53,7 +53,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <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"> <div class="broadcast_details_pic">
{{ item.refundOrder.refund_price }} {{ item.refundOrder.refund_price }}
</div> </div>
@ -77,7 +78,7 @@
</div> </div>
<navigator <navigator
:url="'/pages/admin/orderDetail/index?id='+item.orderInfo.order_id+'&mer_id='+item.orderInfo.mer_id" :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" <div class="broadcast-details_order noPad"
v-for="(val, inx) in item.orderInfo.orderProduct" :key="val.id"> v-for="(val, inx) in item.orderInfo.orderProduct" :key="val.id">
<div class="broadcast-details_box noPad" v-if="inx == 0"> <div class="broadcast-details_box noPad" v-if="inx == 0">
@ -89,7 +90,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div> {{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }} {{ item.orderInfo.pay_price }}
</div> </div>
@ -101,7 +103,7 @@
<!--商品链接--> <!--商品链接-->
<div class="conter acea-row row-middle" <div class="conter acea-row row-middle"
v-if="item.msn_type === 4 && item.product"> v-if="item.msn_type === 4 && item.product">
<div class=" noPad"> <div class="noPad">
<navigator class="acea-row row-column-around noPad" <navigator class="acea-row row-column-around noPad"
v-if="item.product.product_id" v-if="item.product.product_id"
:url="`/pages/goods_details/index?id=${item.product.product_id}`" :url="`/pages/goods_details/index?id=${item.product.product_id}`"
@ -109,13 +111,26 @@
<div class="broadcast_details_img_no"> <div class="broadcast_details_img_no">
<image :src="item.product.image" /> <image :src="item.product.image" />
</div> </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"> <div class="broadcast_details_pic">
{{ item.product.price }} {{ item.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div> {{item.product.store_name}}
</div>
</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> </navigator>
</div> </div>
</div> </div>
@ -135,7 +150,8 @@
{{ item.presell.price }} {{ item.presell.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div> {{item.presell.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -156,7 +172,8 @@
{{ item.productGroup.product.price }} {{ item.productGroup.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div> {{item.productGroup.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -207,7 +224,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <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"> <div class="broadcast_details_pic">
{{ item.refundOrder.refund_price }} {{ item.refundOrder.refund_price }}
</div> </div>
@ -243,7 +261,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div> {{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }} {{ item.orderInfo.pay_price }}
</div> </div>
@ -267,7 +286,8 @@
{{ item.product.price }} {{ item.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div> {{item.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -288,7 +308,8 @@
{{ item.presell.price }} {{ item.presell.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div> {{item.presell.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -309,7 +330,8 @@
{{ item.productGroup.product.price }} {{ item.productGroup.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div> {{item.productGroup.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -388,7 +410,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <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"> <div class="broadcast_details_pic">
{{ val.product.cart_info.productAttr.price }} {{ val.product.cart_info.productAttr.price }}
</div> </div>
@ -425,7 +448,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div> {{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }} {{ item.orderInfo.pay_price }}
</div> </div>
@ -450,7 +474,8 @@
{{ item.product.price }} {{ item.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div> {{item.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -471,7 +496,8 @@
{{ item.presell.price }} {{ item.presell.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div> {{item.presell.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -492,7 +518,8 @@
{{ item.productGroup.product.price }} {{ item.productGroup.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div> {{item.productGroup.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -534,7 +561,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <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"> <div class="broadcast_details_pic">
{{item.refundOrder.refund_num}}件商品 {{item.refundOrder.refund_num}}件商品
合计 {{ item.refundOrder.refund_price }} 合计 {{ item.refundOrder.refund_price }}
@ -571,7 +599,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div> {{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }} {{ item.orderInfo.pay_price }}
</div> </div>
@ -596,7 +625,8 @@
{{ item.product.price }} {{ item.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div> {{item.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -617,7 +647,8 @@
{{ item.presell.price }} {{ item.presell.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div> {{item.presell.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -638,7 +669,8 @@
{{ item.productGroup.product.price }} {{ item.productGroup.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div> {{item.productGroup.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -758,7 +790,7 @@
</div> </div>
</div> </div>
<div :style=" active === true ? 'height:' + footerConH + 'rem;' : 'height:' + footerH + 'rem;'"></div> <div :style=" active === true ? 'height:' + footerConH + 'rem;' : 'height:' + footerH + 'rem;'"></div>
<div :style=" active === true ? 'height: 0;' : 'height: 2rem;'"></div> <div :style=" active === true ? 'height: 0;' : 'height: 2rem;'"></div>
</scroll-view> </scroll-view>
</view> </view>
<view style="height: 100rpx;"></view> <view style="height: 100rpx;"></view>
@ -772,9 +804,9 @@
{{ speak }} {{ speak }}
</div> </div>
<view class="input_count"> <view class="input_count">
<input type="text" placeholder-class='placeholder' :disabled="active" placeholder="输入内容" class="input" ref="input" <input type="text" placeholder-class='placeholder' :disabled="active" placeholder="输入内容"
v-show="!voice" @input="bindInput" @keyup="keyup" @focus="focus" cursor-spacing="20" class="input" ref="input" v-show="!voice" @input="bindInput" @keyup="keyup" @focus="focus"
v-model="textCon" @click="handleClick"> cursor-spacing="20" v-model="textCon" @click="handleClick">
<div class="send iconfont icon-fasong" :style="'color:'+iconColor" @click="sendTest"></div> <div class="send iconfont icon-fasong" :style="'color:'+iconColor" @click="sendTest"></div>
</view> </view>
</div> </div>
@ -817,7 +849,8 @@
getChatRecord, getChatRecord,
getMerHistory, getMerHistory,
chatReverstApi, chatReverstApi,
hasServiceApi hasServiceApi,
getUserInfo
} from "@/api/user"; } from "@/api/user";
import { import {
getProductDetail, getProductDetail,
@ -938,7 +971,8 @@
httpUrl: '', httpUrl: '',
press: false, press: false,
index: 0, index: 0,
j: 0 j: 0,
isWholeSale: ''
}; };
}, },
watch: { watch: {
@ -987,6 +1021,9 @@
}); });
}); });
// #endif // #endif
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
console.log(this.isWholeSale);
}, },
onReady() { onReady() {
this.httpUrl = `${HTTP_REQUEST_URL}/static/look.png`; this.httpUrl = `${HTTP_REQUEST_URL}/static/look.png`;
@ -1213,8 +1250,7 @@
let self = this let self = this
self.$util.uploadImageOne('upload/image', function(res) { self.$util.uploadImageOne('upload/image', function(res) {
if (res.status == 200) { if (res.status == 200) {
self.sendMsg(res.data.path, 3 self.sendMsg(res.data.path, 3)
)
} }
}); });
}, },
@ -1383,11 +1419,11 @@
focus: function() { focus: function() {
this.active = false; this.active = false;
}, },
handleClick(){ handleClick() {
if(this.active){ if (this.active) {
this.active = false; this.active = false;
} }
}, },
keyup: function() { keyup: function() {
if (this.$refs.input.value.length > 0) { if (this.$refs.input.value.length > 0) {
this.sendColor = true; this.sendColor = true;
@ -1610,7 +1646,8 @@
width: 710rpx; width: 710rpx;
position: fixed; position: fixed;
bottom: 180rpx; bottom: 180rpx;
bottom: calc(180rpx + env(safe-area-inset-bottom)); /* 适应底部安全距离 */ bottom: calc(180rpx + env(safe-area-inset-bottom));
/* 适应底部安全距离 */
left: 20rpx; left: 20rpx;
.broadcast-details_box, .broadcast-details_box,
@ -1952,7 +1989,7 @@
position: fixed; position: fixed;
// bottom:var(--status-bar-height); // bottom:var(--status-bar-height);
bottom: 20rpx; bottom: 20rpx;
bottom: calc(20rpx + env(safe-area-inset-bottom) ); bottom: calc(20rpx + env(safe-area-inset-bottom));
left: 0; left: 0;
} }

View File

@ -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 == 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 == 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 == 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>
<view class="right-box"> <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 class="num" v-if="item.num>0">{{item.num}}</view>
</view> </view>
</div> </div>
@ -23,18 +24,21 @@
<block v-if="type == 1 && list.length>0" v-for="(item,index) in list" :key="index"> <block v-if="type == 1 && list.length>0" v-for="(item,index) in list" :key="index">
<div class="item acea-row" @click="goPage(item)"> <div class="item acea-row" @click="goPage(item)">
<view class="logo"> <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>
<view class="info"> <view class="info">
<view class="name">{{item.user && item.user.nickname}}</view> <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 == 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 == 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 == 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"
<view class="con line1" v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view> 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>
<view class="right-box"> <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 class="num" v-if="item.num>0">{{item.num}}</view>
</view> </view>
</div> </div>
@ -65,10 +69,12 @@
import { import {
getUserInfo getUserInfo
} from '@/api/user.js'; } from '@/api/user.js';
import { mapGetters } from "vuex"; import {
mapGetters
} from "vuex";
export default { export default {
name: "CustomerList", name: "CustomerList",
components:{ components: {
emptyPage, emptyPage,
authorize authorize
}, },
@ -77,39 +83,43 @@
list: [], list: [],
productId: 0, productId: 0,
orderId: "", orderId: "",
type: 0 ,// 0 1 type: 0, // 0 1
timer: null, timer: null,
page:1, page: 1,
limit:9999, limit: 9999,
mer_id: '', mer_id: '',
loading: false, loading: false,
clear: false, clear: false,
isAuto: false, // isAuto: false, //
isShowAuth: false, // isShowAuth: false, //
isWholeSale: ''
}; };
}, },
computed: mapGetters(['isLogin','viewColor']), computed: mapGetters(['isLogin', 'viewColor']),
onLoad(optios) { onLoad(optios) {
this.type = optios.type||1; 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) { onShow(option) {
if(this.isLogin){ if (this.isLogin) {
this.liveUpdate(); this.liveUpdate();
} else { } else {
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true this.isShowAuth = true
} }
this.getindex()
}, },
onHide(){ onHide() {
if(this.timer) { if (this.timer) {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
} }
this.clear = true; this.clear = true;
}, },
onUnload() { onUnload() {
if(this.timer) { if (this.timer) {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
} }
@ -117,30 +127,28 @@
}, },
methods: { methods: {
// //
getindex(){ getindex() {
getUserInfo().then(res => { getUserInfo().then(res => {
if (res.data.mer_info.length == 0) { if (res.data.mer_info.length == 0) {
return uni.showModal({ return uni.showModal({
title: '暂未开通商户', title: '暂未开通商户',
complete(res) { complete(res) {
// #ifdef APP-PLUS // #ifdef APP-PLUS
uni.sendHostEvent('closeApp', (ret) => { uni.sendHostEvent('closeApp', (ret) => {
// //
console.log('关闭应用' + JSON.stringify(ret)); console.log('关闭应用' + JSON.stringify(ret));
}); });
// #endif // #endif
} }
}) })
} }
this.mer_id = res.data.service.mer_id; this.mer_id = res.data.service.mer_id;
if(this.isLogin){ if (this.isLogin) {
this.getList(this.mer_id) this.getList(this.mer_id)
} else { } else {
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true this.isShowAuth = true
} }
// this.getList(this.mer_id)
// this.getList(res.data.service.mer_id, true);
}); });
}, },
onLoadFun() { onLoadFun() {
@ -154,20 +162,21 @@
}, },
getList(mer_id) { getList(mer_id) {
this.loading = true; this.loading = true;
if(this.type == 0){ if (this.type == 0) {
serviceList({ serviceList({
page:this.page, page: this.page,
limit:this.limit limit: this.limit
}).then(res => { }).then(res => {
this.list = res.data.list; this.list = res.data.list;
if(res.status == 400){ this.getCurrBadge();
if (res.status == 400) {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
return this.$util.Tips({ return this.$util.Tips({
title: res.message title: res.message
}) })
} }
}).finally(v=>{ }).finally(v => {
this.loading = false; this.loading = false;
return this.$util.Tips({ return this.$util.Tips({
title: v title: v
@ -177,20 +186,22 @@
title: err title: err
}) })
}); });
}else{ } else {
serviceUserList(mer_id,{ serviceUserList(mer_id, {
page:this.page, page: this.page,
limit:this.limit limit: this.limit
}).then(res =>{ }).then(res => {
this.list = res.data.list; this.list = res.data.list;
if(res.status == 400){ this.getCurrBadge();
if (res.status == 400) {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
return this.$util.Tips({ return this.$util.Tips({
title: res.message title: res.message
}) })
} }
}).finally(v=>{ }).finally(v => {
this.loading = false; this.loading = false;
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
@ -206,30 +217,49 @@
}); });
} }
}, },
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(){ liveUpdate() {
let that = this; let that = this;
this.clear = false; this.clear = false;
if(that.timer) { if (that.timer) {
clearInterval(that.timer); clearInterval(that.timer);
that.timer = null; that.timer = null;
} }
that.timer = setInterval(function(){ that.timer = setInterval(function() {
if(that.clear){ if (that.clear) {
clearInterval(that.timer); clearInterval(that.timer);
return ; return;
} }
// //
(!that.loading) && that.getList(that.mer_id); (!that.loading) && that.getList(that.mer_id);
},5000); }, 5000);
}, },
goPage(item) { goPage(item) {
item.num = 0; item.num = 0;
if(this.type == 0){
this.getCurrBadge();
if (this.type == 0) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/chat/customer_list/chat?mer_id=${item.mer_id}` url: `/pages/chat/customer_list/chat?mer_id=${item.mer_id}`
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url: `/pages/chat/customer_list/chat?userId=${item.user.uid}&mer_id=${item.mer_id}` url: `/pages/chat/customer_list/chat?userId=${item.user.uid}&mer_id=${item.mer_id}`
}) })
@ -248,7 +278,8 @@
transform: rotate(180deg); transform: rotate(180deg);
font-size: 36rpx; font-size: 36rpx;
} }
.popupn{
.popupn {
position: fixed; position: fixed;
width: 100%; width: 100%;
text-align: center; text-align: center;
@ -258,65 +289,78 @@
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
z-index: 100; z-index: 100;
.title{
.title {
max-width: 560rpx; max-width: 560rpx;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
} }
.iconfont{
.iconfont {
display: inline-block; display: inline-block;
position: relative; position: relative;
top: 4rpx; top: 4rpx;
right: 0; right: 0;
} }
.mer_logo{
.mer_logo {
width: 34rpx; width: 34rpx;
height: 34rpx; height: 34rpx;
position: relative; position: relative;
top: 6rpx; top: 6rpx;
right: 10px; right: 10px;
} }
.mer_name{
.mer_name {
display: inline-block; display: inline-block;
max-width: 650rpx; max-width: 650rpx;
} }
.invoice-content{
.invoice-content {
background-color: #ffffff; background-color: #ffffff;
} }
} }
.list_count{
.list_count {
margin-top: 104rpx; margin-top: 104rpx;
} }
.item { .item {
align-items: center; align-items: center;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
background-color: #fff; background-color: #fff;
.logo image{
.logo image {
width: 88rpx; width: 88rpx;
height: 88rpx; height: 88rpx;
border-radius: 50%; border-radius: 50%;
} }
.info{
.info {
width: 334rpx; width: 334rpx;
margin-left: 20rpx; margin-left: 20rpx;
.con{
.con {
margin-top: 10rpx; margin-top: 10rpx;
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
} }
} }
.right-box{
.right-box {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-end; align-items: flex-end;
font-size: 20rpx; font-size: 20rpx;
color: #BBBBBB; color: #BBBBBB;
.time{
.time {
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.num{
.num {
min-width: 6px; min-width: 6px;
background-color: var(--view-theme); background-color: var(--view-theme);
border-radius: 15px; border-radius: 15px;

View File

@ -9,8 +9,8 @@
<view class="item-one"> <view class="item-one">
被委托商家 被委托商家
</view> </view>
<e-select v-model="formData.entrust_mer_id" :value='formData.entrust_mer_id' :options="options1" @change="change1" <e-select v-model="formData.entrust_mer_id" :value='formData.entrust_mer_id' :options="options1"
placeholder="选择选项"></e-select> @change="change1" placeholder="选择选项"></e-select>
</view> </view>
<view class="release_item-one"> <view class="release_item-one">
<view class="item-one"> <view class="item-one">
@ -170,16 +170,16 @@
}, },
// //
getProduct(data) { getProduct(data) {
this.productList = []; this.productList = [];
this.formData.product_info = []; this.formData.product_info = [];
this.formData.content = ''; this.formData.content = '';
if (data.length > 0) { if (data.length > 0) {
this.productList = data; this.productList = data;
for (let i in data) { for (let i in data) {
this.formData.content += data[i].store_name + ','; this.formData.content += data[i].store_name + ',';
if(typeof this.productList[i].image == 'object'){ if (typeof this.productList[i].image == 'object') {
this.productList[i].image = this.productList[i].image[0] this.productList[i].image = this.productList[i].image[0]
} }
this.formData.product_info.push({ this.formData.product_info.push({
product_attr_unique: data[i].product_attr_unique, product_attr_unique: data[i].product_attr_unique,
number: Number(data[i].number), number: Number(data[i].number),
@ -187,7 +187,7 @@
}) })
} }
} }
this.formData.content = this.formData.content.slice(0,-1); this.formData.content = this.formData.content.slice(0, -1);
this.$refs.associated.close() this.$refs.associated.close()
}, },
// //
@ -199,79 +199,79 @@
if (value.entrust_day.length == 0 || value.entrust_day <= 0) return that.$util.Tips({ if (value.entrust_day.length == 0 || value.entrust_day <= 0) return that.$util.Tips({
title: '请选择委托周期' title: '请选择委托周期'
}); });
if (value.entrust_day < 15) return that.$util.Tips({ if (value.entrust_day < 15) return that.$util.Tips({
title: '委托周期不得小于15天' title: '委托周期不得小于15天'
}); });
if (value.entrust_day > 90) return that.$util.Tips({ if (value.entrust_day > 90) return that.$util.Tips({
title: '委托周期不得大于90天' title: '委托周期不得大于90天'
}); });
if (value.product_info.length == 0) return that.$util.Tips({ if (value.product_info.length == 0) return that.$util.Tips({
title: '请选择产品' title: '请选择产品'
}); });
if (!value.entrust_mer_id) return that.$util.Tips({ if (!value.entrust_mer_id) return that.$util.Tips({
title: '请添加商家' title: '请添加商家'
}); });
this.type? this.type ?
editentrust(this.id,value).then(res => { editentrust(this.id, value).then(res => {
if (res.status == '200') { if (res.status == '200') {
uni.hideLoading() uni.hideLoading()
that.$util.Tips({ that.$util.Tips({
title: '编辑成功', title: '编辑成功',
icon: 'success' icon: 'success'
}); });
that.formData = { that.formData = {
entrust_mer_id: '', entrust_mer_id: '',
entrust_day: 0, entrust_day: 0,
is_type: "4", is_type: "4",
product_info: [] product_info: []
}
uni.redirectTo({
url: '/pages/commissionedSales/initiateDelegation/index'
})
} else {
that.$util.Tips({
title: res.messge,
icon: 'success'
});
} }
uni.redirectTo({ }).catch(err => {
url: '/pages/commissionedSales/initiateDelegation/index'
})
} else { return that.$util.Tips({
that.$util.Tips({ title: err
title: res.messge,
icon: 'success'
}); });
} })
}).catch(err => {
return that.$util.Tips({ :
title: err entrustchain(value).then(res => {
}); if (res.status == '200') {
}) uni.hideLoading()
that.$util.Tips({
title: '提交成功',
icon: 'success'
});
that.formData = {
entrust_mer_id: '',
entrust_day: 0,
is_type: "4",
product_info: []
}
uni.redirectTo({
url: '/pages/commissionedSales/initiateDelegation/index'
})
: } else {
entrustchain(value).then(res => { that.$util.Tips({
if (res.status == '200') { title: res.messge,
uni.hideLoading() icon: 'success'
that.$util.Tips({ });
title: '提交成功',
icon: 'success'
});
that.formData = {
entrust_mer_id: '',
entrust_day: 0,
is_type: "4",
product_info: []
} }
uni.redirectTo({ }).catch(err => {
url: '/pages/commissionedSales/initiateDelegation/index'
})
} else { return that.$util.Tips({
that.$util.Tips({ title: err
title: res.messge,
icon: 'success'
}); });
} })
}).catch(err => {
return that.$util.Tips({
title: err
});
})
} }
} }
@ -316,7 +316,6 @@
.center-one-txt { .center-one-txt {
.one-txta { .one-txta {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
@ -325,7 +324,6 @@
display: flex; display: flex;
margin-top: 28rpx; margin-top: 28rpx;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
@ -351,7 +349,6 @@
margin-top: 32rpx; margin-top: 32rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
@ -525,7 +522,6 @@
background: linear-gradient(84deg, #F98649 0%, #F34E45 100%); background: linear-gradient(84deg, #F98649 0%, #F34E45 100%);
border-radius: 42px 42px 42px 42px; border-radius: 42px 42px 42px 42px;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
} }

View File

@ -101,7 +101,8 @@
<view class="center-twoa"> <view class="center-twoa">
拒绝原因: 拒绝原因:
</view> </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}} {{objinfo.entrust_finish_refusal}}
</view> </view>
</view> </view>
@ -111,7 +112,7 @@
<view class="content_bootm"> <view class="content_bootm">
<view class="content_bootm_txt"> <view class="content_bootm_txt">
查看TA提到的宝贝 查看TA提到的宝贝
<text v-if="objinfo.product_list">({{objinfo.product_list.length||0}})</text> <text v-if="objinfo.product_list">({{objinfo.product_list.length||0}})</text>
</view> </view>
@ -154,13 +155,13 @@
} }
], ],
type: 0, type: 0,
credit_buy: 0, credit_buy: 0,
} }
}, },
onLoad(e) { onLoad(e) {
this.list(e.id) this.list(e.id)
this.type = e.type this.type = e.type
this.credit_buy = e.credit_buy || 0; this.credit_buy = e.credit_buy || 0;
}, },
onShow() { onShow() {
@ -233,7 +234,6 @@
.top-two-one { .top-two-one {
font-size: 35rpx; font-size: 35rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
margin-top: 10rpx; margin-top: 10rpx;
@ -280,7 +280,6 @@
.center-one-txt { .center-one-txt {
.one-txta { .one-txta {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
@ -289,7 +288,6 @@
display: flex; display: flex;
margin-top: 28rpx; margin-top: 28rpx;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
@ -316,7 +314,6 @@
.center-twoa { .center-twoa {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
@ -327,7 +324,6 @@
word-wrap: break-word; word-wrap: break-word;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
} }
@ -377,7 +373,6 @@
background: linear-gradient(84deg, #F98649 0%, #F34E45 100%); background: linear-gradient(84deg, #F98649 0%, #F34E45 100%);
border-radius: 42px 42px 42px 42px; border-radius: 42px 42px 42px 42px;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
position: absolute; position: absolute;

View File

@ -147,7 +147,6 @@
.titlea { .titlea {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
} }
@ -155,7 +154,6 @@
.titleb { .titleb {
margin-top: 5rpx; margin-top: 5rpx;
font-size: 25rpx; font-size: 25rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: rgba(255, 255, 255, 0.8); color: rgba(255, 255, 255, 0.8);
} }

View File

@ -11,92 +11,92 @@
<view class="content-one"> <view class="content-one">
<view class="content-one-img"> <view class="content-one-img">
<!-- <image :src="item.mer_info&&item.mer_info.mer_avatar" mode="aspectFit"></image> --> <!-- <image :src="item.mer_info&&item.mer_info.mer_avatar" mode="aspectFit"></image> -->
<image :src="item.entrust_mer_info&&item.entrust_mer_info.mer_avatar" mode="aspectFill"></image> <image :src="item.entrust_mer_info&&item.entrust_mer_info.mer_avatar" mode="aspectFill"></image>
</view> </view>
<view class="content-text"> <view class="content-text">
<view class="flex" style="justify-content: space-between;"> <view class="flex" style="justify-content: space-between;">
<view class="one-txt-a"> <view class="one-txt-a">
{{item.title}} {{item.title}}
</view> </view>
<block> <block>
<view class="content-two_one" v-if="item.mer_status==0"> <view class="content-two_one" v-if="item.mer_status==0">
<view class="content-two-edita" style="font-weight: bold;"> <view class="content-two-edita" style="font-weight: bold;">
待处理 待处理
</view> </view>
</view> </view>
<view class="content-two_oneq" v-if="item.mer_status==1"> <view class="content-two_oneq" v-if="item.mer_status==1">
<view class="content-two-editb" @click="accepted" style="font-weight: bold;"> <view class="content-two-editb" @click="accepted" style="font-weight: bold;">
已接受 已接受
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.mer_status==2"> <view class="content-two_one" v-if="item.mer_status==2">
<view class="content-two-editc" @click="declined" style="font-weight: bold;"> <view class="content-two-editc" @click="declined" style="font-weight: bold;">
已拒绝 已拒绝
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.type==4" style="font-weight: bold;"> <view class="content-two_one" v-if="item.type==4" style="font-weight: bold;">
<view class="content-two-editd" @click="soldEdit"> <view class="content-two-editd" @click="soldEdit">
已完成 已完成
</view> </view>
</view> </view>
</block> </block>
</view> </view>
<view class="text-bottom"> <view class="text-bottom">
<view class="one-txt-b"> <view class="one-txt-b">
委托周期:{{item.entrust_day}} 委托周期:{{item.entrust_day}}
</view> </view>
<block> <block>
<view class="content-two_one" v-if="item.mer_status==0"> <view class="content-two_one" v-if="item.mer_status==0">
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a" style="margin-left: 10rpx;" @click="Edit(item)"> <view class="contentgn_a" style="margin-left: 10rpx;" @click="Edit(item)">
编辑 编辑
</view> </view>
<span></span> <span></span>
<view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)"> <view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)">
删除 删除
</view> </view>
<span></span> <span></span>
<view class="contentgn_b" @click="detail(item)"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_oneq" v-if="item.mer_status==1"> <view class="content-two_oneq" v-if="item.mer_status==1">
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a" @click="closingorder(item)" v-if="item.entrust_finish==3"> <view class="contentgn_a" @click="closingorder(item)" v-if="item.entrust_finish==3">
结束委托 结束委托
</view> </view>
<span v-if="item.entrust_finish==3"></span> <span v-if="item.entrust_finish==3"></span>
<view class="contentgn_b" @click="detail(item)"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.mer_status==2"> <view class="content-two_one" v-if="item.mer_status==2">
<view class="contentgn"> <view class="contentgn">
<!--<view class="contentgn_a" @click="deleteOrder(item)"> <!--<view class="contentgn_a" @click="deleteOrder(item)">
删除 删除
</view> </view>
<span></span> --> <span></span> -->
<view class="contentgn_b" @click="detail(item)"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.type==4"> <view class="content-two_one" v-if="item.type==4">
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a" @click="deleteOrder(item)"> <view class="contentgn_a" @click="deleteOrder(item)">
删除 删除
</view> </view>
<span></span> <span></span>
<view class="contentgn_b" @click="detail(item)"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -112,7 +112,7 @@
<emptyPage title="暂无订单~"></emptyPage> <emptyPage title="暂无订单~"></emptyPage>
</view> </view>
<u-loadmore :status="status" v-if="orderList.length >= where.limit" /> <u-loadmore :status="status" v-if="orderList.length >= where.limit" />
<view style="height: 200rpx;"></view> <view style="height: 200rpx;"></view>
<uni-popup ref="bindmobile" type="center" @click="close"> <uni-popup ref="bindmobile" type="center" @click="close">
<view class="" style="position: relative;"> <view class="" style="position: relative;">
<view class="entrust"> <view class="entrust">
@ -418,7 +418,7 @@
// this.$refs.bindmobile2.open() // this.$refs.bindmobile2.open()
this.$refs.bindmobile3.open() this.$refs.bindmobile3.open()
}, },
agree(item, status=2) { agree(item, status = 2) {
finishentrust(item.community_id, { finishentrust(item.community_id, {
status: status, status: status,
refusal: this.refuseds refusal: this.refuseds
@ -437,31 +437,31 @@
}, },
// //
deleteOrder(item) { deleteOrder(item) {
uni.showModal({ uni.showModal({
title:'警告', title: '警告',
content:'删除后不可恢复, 是否继续删除?', content: '删除后不可恢复, 是否继续删除?',
complete: (e) => { complete: (e) => {
if(e.confirm){ if (e.confirm) {
checkchain(item.community_id, { checkchain(item.community_id, {
status: 3 status: 3
}).then(res => { }).then(res => {
this.$util.Tips({ this.$util.Tips({
title: res.message, title: res.message,
icon: 'success' icon: 'success'
}) })
this.orderList = [] this.orderList = []
this.tabTitle = "tabOne" this.tabTitle = "tabOne"
this.commislist() this.commislist()
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
this.$util.Tips({ this.$util.Tips({
title: err, title: err,
icon: 'error' icon: 'error'
}) })
}) })
} }
} }
}) })
}, },
// //
auditEdit() { auditEdit() {
@ -542,7 +542,6 @@
.adddelegation-two { .adddelegation-two {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
margin-top: 25rpx; margin-top: 25rpx;
@ -569,7 +568,7 @@
.content-one { .content-one {
width: 100%; width: 100%;
display: flex; display: flex;
padding-bottom: 23rpx; padding-bottom: 23rpx;
@ -579,8 +578,8 @@
height: 148rpx; height: 148rpx;
margin-right: 28rpx; margin-right: 28rpx;
// border: 1px solid; // border: 1px solid;
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
image { image {
width: 100%; width: 100%;
@ -593,7 +592,6 @@
.txt-b-a { .txt-b-a {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
@ -612,7 +610,6 @@
.txt-b-b { .txt-b-b {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333 color: #333333
} }
@ -620,25 +617,28 @@
} }
.content-text{ .content-text {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.text-bottom{
display: flex; .text-bottom {
justify-content: space-between; display: flex;
} justify-content: space-between;
.one-txt-a{ }
flex: 1;
font-size: 30rpx; .one-txt-a {
display: -webkit-box; flex: 1;
-webkit-line-clamp: 2; /* 限制为三行 */ font-size: 30rpx;
-webkit-box-orient: vertical; display: -webkit-box;
overflow: hidden; -webkit-line-clamp: 2;
text-overflow: ellipsis; /* 限制为三行 */
} -webkit-box-orient: vertical;
} overflow: hidden;
text-overflow: ellipsis;
}
}
} }
@ -686,7 +686,6 @@
.contentgn_a { .contentgn_a {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #F84221; color: #F84221;
margin-right: 10rpx; margin-right: 10rpx;
@ -704,7 +703,6 @@
.contentgn_b { .contentgn_b {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
margin-left: 10rpx; margin-left: 10rpx;
@ -716,7 +714,7 @@
.content-two_one { .content-two_one {
flex-shrink: 0; flex-shrink: 0;
text-align: right; text-align: right;
@ -760,7 +758,6 @@
.contentgn_a { .contentgn_a {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #F84221; color: #F84221;
margin-right: 10rpx; margin-right: 10rpx;
@ -777,7 +774,6 @@
.contentgn_b { .contentgn_b {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
margin-left: 10rpx; margin-left: 10rpx;
@ -819,7 +815,6 @@
.bg-content-a { .bg-content-a {
margin-left: 242rpx; margin-left: 242rpx;
font-size: 35rpx; font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
@ -827,14 +822,12 @@
.bg-content-b { .bg-content-b {
margin-left: 35rpx; margin-left: 35rpx;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin-top: 32rpx; margin-top: 32rpx;
span { span {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #F84221; color: #F84221;
margin-left: 18rpx; margin-left: 18rpx;
@ -844,14 +837,12 @@
.bg-content-c { .bg-content-c {
margin-left: 35rpx; margin-left: 35rpx;
font-size: 35rpx; font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin-top: 32rpx; margin-top: 32rpx;
span { span {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #F84221; color: #F84221;
margin-left: 18rpx; margin-left: 18rpx;
@ -867,7 +858,6 @@
height: 95rpx; height: 95rpx;
line-height: 95rpx; line-height: 95rpx;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
margin-left: 121rpx; margin-left: 121rpx;
@ -880,7 +870,6 @@
line-height: 95rpx; line-height: 95rpx;
text-align: center; text-align: center;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%); background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
@ -904,7 +893,6 @@
.bg-content-a { .bg-content-a {
margin-left: 242rpx; margin-left: 242rpx;
font-size: 35rpx; font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
@ -917,7 +905,6 @@
height: 95rpx; height: 95rpx;
line-height: 95rpx; line-height: 95rpx;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
margin-left: 121rpx; margin-left: 121rpx;
@ -930,7 +917,6 @@
line-height: 95rpx; line-height: 95rpx;
text-align: center; text-align: center;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%); background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
@ -957,7 +943,6 @@
.bg-content-a { .bg-content-a {
margin-left: 242rpx; margin-left: 242rpx;
font-size: 35rpx; font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
@ -965,14 +950,12 @@
.bg-content-b { .bg-content-b {
margin-left: 35rpx; margin-left: 35rpx;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin-top: 32rpx; margin-top: 32rpx;
span { span {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #F84221; color: #F84221;
margin-left: 18rpx; margin-left: 18rpx;
@ -982,14 +965,12 @@
.bg-content-c { .bg-content-c {
margin-left: 35rpx; margin-left: 35rpx;
font-size: 35rpx; font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin-top: 22rpx; margin-top: 22rpx;
span { span {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #F84221; color: #F84221;
margin-left: 18rpx; margin-left: 18rpx;
@ -1017,7 +998,6 @@
line-height: 95rpx; line-height: 95rpx;
text-align: center; text-align: center;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%); background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);

View File

@ -13,94 +13,98 @@
</view> </view>
<view class="content-text"> <view class="content-text">
<view class="flex" style="justify-content: space-between;"> <view class="flex" style="justify-content: space-between;">
<view class="one-txt-a"> <view class="one-txt-a">
{{item.title}} {{item.title}}
</view> </view>
<block> <block>
<view class="content-two_one" v-if="item.mer_status==0"> <view class="content-two_one" v-if="item.mer_status==0">
<view class="content-two-edita" style="font-weight: bold;"> <view class="content-two-edita" style="font-weight: bold;">
待处理 待处理
</view> </view>
</view> </view>
<view class="content-two_oneq" v-if="item.mer_status==1"> <view class="content-two_oneq" v-if="item.mer_status==1">
<view class="content-two-editb" @click="accepted" style="font-weight: bold;"> <view class="content-two-editb" @click="accepted" style="font-weight: bold;">
已接受 已接受
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.mer_status==2"> <view class="content-two_one" v-if="item.mer_status==2">
<view class="content-two-editc" @click="declined" style="font-weight: bold;"> <view class="content-two-editc" @click="declined" style="font-weight: bold;">
已拒绝 已拒绝
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.type==4" style="font-weight: bold;"> <view class="content-two_one" v-if="item.type==4" style="font-weight: bold;">
<view class="content-two-editd" @click="soldEdit"> <view class="content-two-editd" @click="soldEdit">
已完成 已完成
</view> </view>
</view> </view>
</block> </block>
</view> </view>
<view class="text-bottom"> <view class="text-bottom">
<view class="one-txt-b"> <view class="one-txt-b">
委托周期:{{item.entrust_day}} 委托周期:{{item.entrust_day}}
</view> </view>
<block> <block>
<view class="content-two_one" v-if="item.mer_status==0"> <view class="content-two_one" v-if="item.mer_status==0">
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a" @click="soldEdit(item)"> <view class="contentgn_a" @click="soldEdit(item)">
处理 处理
</view> </view>
<span></span> <span></span>
<view class="contentgn_b" @click="detail(item)"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_oneq" v-if="item.mer_status==1"> <view class="content-two_oneq" v-if="item.mer_status==1">
<view class="contentgn"> <view class="contentgn">
<block v-if="item.entrust_order_id>0&&item.mer_status==1"> <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>
已结束 <view class="contentgn_a" v-else-if="item.entrust_finish==1"
</view> style="margin-left: 10rpx; color: #20A162;">
<view class="contentgn_a" v-else-if="item.entrust_finish==2" @click="closingorder(item)" style="margin-left: 10rpx;"> 已结束
被拒绝 </view>
</view> <view class="contentgn_a" v-else-if="item.entrust_finish==2"
<view class="contentgn_a" v-else-if="item.entrust_finish==3" style="margin-left: 10rpx; color: #FE9A10;"> @click="closingorder(item)" style="margin-left: 10rpx;">
申请中 被拒绝
</view> </view>
<span></span> <view class="contentgn_a" v-else-if="item.entrust_finish==3"
</block> style="margin-left: 10rpx; color: #FE9A10;">
<view class="contentgn_a" v-if="item.entrust_order_id==0" style="margin-left: 10rpx;" 申请中
@click="order(item)"> </view>
去下单 <span></span>
</view> </block>
<span v-if="item.entrust_order_id==0"></span> <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>
<view class="contentgn_b" @click="detail(item)"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.mer_status==2"> <view class="content-two_one" v-if="item.mer_status==2">
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_b" @click="detail(item)"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.type==4"> <view class="content-two_one" v-if="item.type==4">
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_b" @click="detail(item)"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -120,23 +124,23 @@
<view class="bg-content-a"> <view class="bg-content-a">
委托申请处理 委托申请处理
</view> </view>
<view class="bg-content-d" > <view class="bg-content-d">
委托方: <span>{{obj.mer_info.mer_name}}</span> 委托方: <span>{{obj.mer_info.mer_name}}</span>
</view> </view>
<block v-if="obj.mer_info.credit_buy"> <block v-if="obj.mer_info.credit_buy">
<view class="bg-content-b" > <view class="bg-content-b">
结算周期: <span>{{obj.mer_info.settle_cycle}}</span> 结算周期: <span>{{obj.mer_info.settle_cycle}}</span>
</view> </view>
<view class="bg-content-c" > <view class="bg-content-c">
利息比例: <span>{{obj.mer_info.interest_rate}}%</span> 利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
</view> </view>
</block> </block>
<block v-else> <block v-else>
<view class="bg-content-b" > <view class="bg-content-b">
该商户暂不支持先货后款 该商户暂不支持先货后款
</view> </view>
<view style="height: 60rpx;"></view> <view style="height: 60rpx;"></view>
</block> </block>
<view class="entrust_bga_btn"> <view class="entrust_bga_btn">
<view class="cancellation" @click="passDelete(obj)"> <view class="cancellation" @click="passDelete(obj)">
拒绝 拒绝
@ -249,7 +253,7 @@
entrustlist, entrustlist,
finishchain, finishchain,
checkchain, checkchain,
addEntrustCart addEntrustCart
} from '@/api/sale.js' } from '@/api/sale.js'
export default { export default {
components: { components: {
@ -264,7 +268,7 @@
activeItem: "tabOne", activeItem: "tabOne",
tabTitle: "", tabTitle: "",
orderList: [], orderList: [],
type_id: '', type_id: '',
where: { where: {
page: 1, page: 1,
type: 2, type: 2,
@ -316,7 +320,7 @@
} }
}, },
onLoad(options) { onLoad(options) {
this.type_id = options.type_id this.type_id = options.type_id
this.tabTitle = this.tabs[0].name this.tabTitle = this.tabs[0].name
// -- : // -- :
console.log(this.tabs[0]) console.log(this.tabs[0])
@ -390,20 +394,20 @@
// uni.navigateTo({ // uni.navigateTo({
// url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id + '&type=1' // url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id + '&type=1'
// }) // })
addEntrustCart({ addEntrustCart({
community_id: item.community_id community_id: item.community_id
}).then(res => { }).then(res => {
if (res.status == 200) { if (res.status == 200) {
this.$util.Tips({ this.$util.Tips({
title: res.message, title: res.message,
icon: 'success' icon: 'success'
}) })
uni.navigateTo({ uni.navigateTo({
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id.toString()}&type_id=${this.type_id}` url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id.toString()}&type_id=${this.type_id}`
}) })
} }
}) })
}, },
// //
deteragrss(item) { deteragrss(item) {
@ -421,7 +425,7 @@
this.commislist() this.commislist()
this.$refs.bindmobile1.close() this.$refs.bindmobile1.close()
}).catch((err) => { }).catch((err) => {
this.$refs.bindmobile1.close() this.$refs.bindmobile1.close()
this.$util.Tips({ this.$util.Tips({
title: err, title: err,
icon: 'error' icon: 'error'
@ -507,7 +511,7 @@
.content-one { .content-one {
width: 100%; width: 100%;
display: flex; display: flex;
padding-bottom: 23rpx; padding-bottom: 23rpx;
@ -516,9 +520,9 @@
height: 148rpx; height: 148rpx;
margin-right: 28rpx; margin-right: 28rpx;
// border: 1px solid; // border: 1px solid;
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
flex-shrink: 0; flex-shrink: 0;
image { image {
width: 100%; width: 100%;
@ -527,11 +531,10 @@
} }
.content-one-txt { .content-one-txt {
flex: 1; flex: 1;
.txt-b-a { .txt-b-a {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
@ -550,7 +553,6 @@
.txt-b-b { .txt-b-b {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333 color: #333333
} }
@ -558,31 +560,34 @@
} }
.content-text{ .content-text {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.text-bottom{
display: flex; .text-bottom {
justify-content: space-between; display: flex;
} justify-content: space-between;
.one-txt-a{ }
flex: 1;
font-size: 30rpx; .one-txt-a {
display: -webkit-box; flex: 1;
-webkit-line-clamp: 2; /* 限制为三行 */ font-size: 30rpx;
-webkit-box-orient: vertical; display: -webkit-box;
overflow: hidden; -webkit-line-clamp: 2;
text-overflow: ellipsis; /* 限制为三行 */
} -webkit-box-orient: vertical;
} overflow: hidden;
text-overflow: ellipsis;
}
}
} }
.content-two_oneq { .content-two_oneq {
text-align: right; text-align: right;
flex-shrink: 0; flex-shrink: 0;
.content-two-edita { .content-two-edita {
@ -624,7 +629,6 @@
.contentgn_a { .contentgn_a {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #F84221; color: #F84221;
margin-right: 10rpx; margin-right: 10rpx;
@ -642,7 +646,6 @@
.contentgn_b { .contentgn_b {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
margin-left: 10rpx; margin-left: 10rpx;
@ -654,7 +657,7 @@
.content-two_one { .content-two_one {
flex-shrink: 0; flex-shrink: 0;
text-align: right; text-align: right;
@ -698,7 +701,6 @@
.contentgn_a { .contentgn_a {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #F84221; color: #F84221;
margin-right: 10rpx; margin-right: 10rpx;
@ -716,7 +718,6 @@
.contentgn_b { .contentgn_b {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
margin-left: 10rpx; margin-left: 10rpx;
@ -757,7 +758,6 @@
.bg-content-a { .bg-content-a {
margin-left: 242rpx; margin-left: 242rpx;
font-size: 35rpx; font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
@ -765,14 +765,12 @@
.bg-content-b { .bg-content-b {
margin-left: 35rpx; margin-left: 35rpx;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin-top: 16rpx; margin-top: 16rpx;
span { span {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #F84221; color: #F84221;
margin-left: 18rpx; margin-left: 18rpx;
@ -782,35 +780,32 @@
.bg-content-c { .bg-content-c {
margin-left: 35rpx; margin-left: 35rpx;
font-size: 35rpx; font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin-top: 16rpx; margin-top: 16rpx;
span { span {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #F84221; color: #F84221;
margin-left: 18rpx; 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 { .bg-content-d {
font-size: 32rpx; margin-left: 35rpx;
font-family: PingFang SC-Medium, PingFang SC; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #F84221; color: #333333;
margin-left: 18rpx; margin-top: 16rpx;
}
} span {
font-size: 32rpx;
font-weight: 500;
color: #F84221;
margin-left: 18rpx;
}
}
} }
.entrust_bga_btn { .entrust_bga_btn {
@ -821,7 +816,6 @@
height: 95rpx; height: 95rpx;
line-height: 95rpx; line-height: 95rpx;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
margin-left: 121rpx; margin-left: 121rpx;
@ -834,7 +828,6 @@
line-height: 95rpx; line-height: 95rpx;
text-align: center; text-align: center;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%); background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);

View File

@ -51,17 +51,20 @@
<view v-else class='share acea-row row-between row-bottom'> <view v-else class='share acea-row row-between row-bottom'>
<view class='money p-color skeleton-rect' style="min-width: 70rpx;"> <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" <view v-if="svipData && svipData.show_svip_price && svipData.show_svip"
style="display: inline-block;"> style="display: inline-block;">
<text class="vip-money">{{storeInfo.svip_price}}</text> <text class="vip-money">{{storeInfo.svip_price}}</text>
<image class="vip-image" src="/static/images/svip.png"></image> <image class="vip-image" src="/static/images/svip.png"></image>
</view> </view>
</view> </view>
<view @click="listenerActionSheet" class="fenxiang_btn"> <!-- <view @click="listenerActionSheet" class="fenxiang_btn">
<view class='iconfont icon-fenxiang'></view> <view class='iconfont icon-fenxiang'></view>
分享 分享
</view> </view> -->
</view> </view>
<!-- <view v-if="svipData && !svipData.is_svip && svipData.show_svip" <!-- <view v-if="svipData && !svipData.is_svip && svipData.show_svip"
class="svipCon acea-row row-between-wrapper skeleton-rect" style="margin-top: 20rpx;"> class="svipCon acea-row row-between-wrapper skeleton-rect" style="margin-top: 20rpx;">
@ -237,9 +240,9 @@
</view> </view>
<view v-else class="txt">0人关注</view> <view v-else class="txt">0人关注</view>
</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" :url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id" class="link"
hover-class="none">进店</navigator> hover-class="none">进店</navigator> -->
</view> </view>
<view class="score-wrapper"> <view class="score-wrapper">
<view class="item"> <view class="item">
@ -278,20 +281,22 @@
<view class='title'>产品介绍</view> <view class='title'>产品介绍</view>
<view class='conter' v-if="description" style="min-height:50rpx;"> <view class='conter' v-if="description" style="min-height:50rpx;">
<!-- #ifndef APP-PLUS --> <!-- #ifndef APP-PLUS -->
<jyf-parser v-if="description.type == 0 && typeof description.content == 'string'" :domain='domain' <jyf-parser v-if="description.type == 0 && typeof description.content == 'string'"
:html="description.content.replace(/<br\/>/ig, '')" ref="article" :domain='domain' :html="description.content.replace(/<br\/>/ig, '')" ref="article"
:tag-style="tagStyle"></jyf-parser> :tag-style="tagStyle"></jyf-parser>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<view v-if="description.type == 0 && typeof description.content == 'string'" class="description" <view v-if="description.type == 0 && typeof description.content == 'string'"
v-html="description.content.replace(/<br\/>/ig, '')"></view> class="description" v-html="description.content.replace(/<br\/>/ig, '')"></view>
<!-- #endif --> <!-- #endif -->
<view v-else class="product_content"> <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"
{{description.content.title}} class="product_content_title">
{{description.content.title}}
</view> </view>
<block v-if="description.content && description.content.image"> <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> </image>
</block> </block>
</view> </view>
@ -311,7 +316,7 @@
<view style='height:120rpx;'></view> <view style='height:120rpx;'></view>
</scroll-view> </scroll-view>
</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" <view v-if="storeInfo.merchant && storeInfo.merchant.services_type == 1" class="item skeleton-rect"
@click="call"> @click="call">
<view class="iconfont icon-kefu"></view> <view class="iconfont icon-kefu"></view>
@ -355,7 +360,7 @@
<button v-else class='buy bnts sold_out' form-type="submit" disabled>商品已售罄</button> <button v-else class='buy bnts sold_out' form-type="submit" disabled>商品已售罄</button>
</form> </form>
</view> </view>
</view> </view> -->
<block v-if="sharePacket.max&&sharePacket.max>0"> <block v-if="sharePacket.max&&sharePacket.max>0">
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet" <shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet"
@closeChange="closeChange" :showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets> @closeChange="closeChange" :showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets>
@ -617,7 +622,8 @@
params: [] params: []
}, },
product_type: 0, product_type: 0,
referer: '' referer: '',
isWholeSale: ''
}; };
}, },
computed: { computed: {
@ -631,7 +637,6 @@
])), ])),
}, },
onLoad(options) { onLoad(options) {
// console.log(options)
this.referer = options.referer this.referer = options.referer
if (options.product_type) { if (options.product_type) {
this.product_type = options.product_type this.product_type = options.product_type
@ -682,6 +687,7 @@
} else { } else {
this.id = options.id this.id = options.id
} }
//广uid //广uid
if (options.spid) app.globalData.spid = options.spid; if (options.spid) app.globalData.spid = options.spid;
// #endif // #endif
@ -695,6 +701,9 @@
this.downloadFilePromotionCode(); this.downloadFilePromotionCode();
this.getHistory() this.getHistory()
} }
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
console.log(this.isWholeSale);
}, },
onReady() { onReady() {
this.isNodes++; this.isNodes++;
@ -1059,14 +1068,16 @@
} }
that.$set(that, 'storeInfo', storeInfo); that.$set(that, 'storeInfo', storeInfo);
that.$set(that, 'description', storeInfo.content); that.$set(that, 'description', storeInfo.content);
if(typeof that.description.content == 'string'){ if (storeInfo.content && typeof that.description.content == 'string') {
try{ try {
that.description.content = JSON.parse(that.description.content); that.description.content = JSON.parse(that.description.content);
}catch(e){ } catch (e) {
console.log(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( that.description.content = that.description.content.replace(
/<img/gi, /<img/gi,
'<img style="max-width:100%;height:auto;float:left;display:block" ' '<img style="max-width:100%;height:auto;float:left;display:block" '
@ -1121,6 +1132,7 @@
that.getCouponList(); that.getCouponList();
}) })
}).catch(err => { }).catch(err => {
console.log(err);
// //
return that.$util.Tips({ return that.$util.Tips({
title: err title: err
@ -2528,20 +2540,22 @@
} }
} }
.product_content{ .product_content {
background-color: #fff; background-color: #fff;
&_title{
width: 100%; &_title {
height: auto; width: 100%;
line-height: 50rpx; height: auto;
padding: 28rpx; line-height: 50rpx;
word-wrap: break-word; padding: 28rpx;
text-align: center; word-wrap: break-word;
} text-align: center;
image{ }
width: 750rpx;
// height: auto; image {
// height: 750rpx; width: 750rpx;
} // height: auto;
} // height: 750rpx;
}
}
</style> </style>

File diff suppressed because it is too large Load Diff

View 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
View 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>

View File

@ -23,7 +23,8 @@
<view class="tab"> <view class="tab">
<view class="item active" style="margin: 0;">{{merchant_Data.margin}}</view> <view class="item active" style="margin: 0;">{{merchant_Data.margin}}</view>
</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>
<!-- <view class="tip"> <!-- <view class="tip">
<view class="title">注意事项</view> <view class="title">注意事项</view>
@ -31,44 +32,43 @@
</view> </view>
</view> --> </view> -->
<u-tabs :list="[{name: '订单补缴记录'},{name: '充值记录'}]" @click="changeCurrent" lineColor="#f56c6c" :activeStyle="{ <u-tabs :list="[{name: '订单补缴记录'},{name: '充值记录'}]" @click="changeCurrent" lineColor="#f56c6c" :activeStyle="{
color: '#333', color: '#333',
fontWeight: 'bold', fontWeight: 'bold',
transform: 'scale(1.05)' transform: 'scale(1.05)'
}" }" :inactiveStyle="{
:inactiveStyle="{
color: '#333', color: '#333',
transform: 'scale(1)' transform: 'scale(1)'
}"></u-tabs> }"></u-tabs>
<block v-if="current==0"> <block v-if="current==0">
<view class="content-order" v-for="(item,i ) in deductList"> <view class="content-order" v-for="(item,i ) in deductList">
<view class="deduct">扣除编号{{item.financial_record_sn}}</view> <view class="deduct">扣除编号{{item.financial_record_sn}}</view>
<view class="deduct">扣除金额<text style="color: #ff5c2d;">{{item.number}}</text></view> <view class="deduct">扣除金额<text style="color: #ff5c2d;">{{item.number}}</text></view>
<view class="deduct">扣费方式{{item.financial_type=='auto_margin'? '订单自动补缴': '其他扣除'}}</view> <view class="deduct">扣费方式{{item.financial_type=='auto_margin'? '订单自动补缴': '其他扣除'}}</view>
<view class="deduct">订单编号{{item.order_sn}}</view> <view class="deduct">订单编号{{item.order_sn}}</view>
<view class="deduct">扣除时间{{item.create_time}}</view> <view class="deduct">扣除时间{{item.create_time}}</view>
</view> </view>
<view class='loadingicon acea-row row-center-wrapper' v-if='deductList.length > 0'> <view class='loadingicon acea-row row-center-wrapper' v-if='deductList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle2}} <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle2}}
</view> </view>
<view class='loadingicon acea-row row-center-wrapper' v-else> <view class='loadingicon acea-row row-center-wrapper' v-else>
没有更多了 没有更多了
</view> </view>
</block> </block>
<block v-if="current==1"> <block v-if="current==1">
<view class="content-order" v-for="(item,i ) in productList"> <view class="content-order" v-for="(item,i ) in productList">
<view class="view">订单编号{{item.order_sn}}</view> <view class="view">订单编号{{item.order_sn}}</view>
<view class="view">支付金额{{item.total_price}}</view> <view class="view">支付金额{{item.total_price}}</view>
<view class="view">支付状态{{item.pay_type==1?'已支付':'待支付'}}</view> <view class="view">支付状态{{item.pay_type==1?'已支付':'待支付'}}</view>
<view class="view">支付时间{{item.pay_time}}</view> <view class="view">支付时间{{item.pay_time}}</view>
</view> </view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'> <view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}} <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view> </view>
<view class='loadingicon acea-row row-center-wrapper' v-else> <view class='loadingicon acea-row row-center-wrapper' v-else>
没有更多了 没有更多了
</view> </view>
</block> </block>
</view> </view>
</template> </template>
@ -77,9 +77,11 @@
merchant, merchant,
paymerchant, paymerchant,
marginlist, marginlist,
autoMarginlist autoMarginlist
} from '@/api/api.js' } from '@/api/api.js'
import { Toast } from '../../libs/uniApi' import {
Toast
} from '../../libs/uniApi'
export default { export default {
data() { data() {
return { return {
@ -89,66 +91,40 @@
page: 1, page: 1,
limit: 10 limit: 10
}, },
where2: { where2: {
page: 1, page: 1,
limit: 10 limit: 10
}, },
productList: [], productList: [],
deductList: [], deductList: [],
loadend: false, loadend: false,
loading: false, loading: false,
loadTitle: '加载更多', loadTitle: '加载更多',
loadend2: false, loadend2: false,
loading2: false, loading2: false,
loadTitle2: '加载更多', loadTitle2: '加载更多',
current: 0 current: 0
} }
}, },
onLoad(e) { onLoad(e) {
this.mer_id = e.mer_id this.mer_id = e.mer_id
this.decimal() this.decimal()
// this.list(true); // this.list(true);
this.autoList(true); this.autoList(true);
}, },
onReachBottom() { onReachBottom() {
if(this.current==0){ if (this.current == 0) {
this.loadend2 = false; this.loadend2 = false;
this.loading2 = false; this.loading2 = false;
this.autoList(false); this.autoList(false);
}else { } else {
this.loadend = false; this.loadend = false;
this.loading = false; this.loading = false;
this.list(false); this.list(false);
} }
}, },
methods: { 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() { decimal() {
merchant({ merchant({
@ -172,28 +148,28 @@
if (res.confirm) { if (res.confirm) {
// console.log(''); // console.log('');
paymerchant().then((res) => { paymerchant().then((res) => {
try{ try {
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
orderInfo: res.data orderInfo: res.data
.config, // .config, //
success: (res) => { success: (res) => {
this.$util.Tips({ this.$util.Tips({
title: '支付成功' title: '支付成功'
}); });
this.decimal() this.decimal()
this.list(true) this.list(true)
}, },
fail: (err) => { fail: (err) => {
this.$util.Tips({ this.$util.Tips({
title: '支付失败' title: '支付失败'
}); });
console.log('fail:' + JSON.stringify(err)); console.log('fail:' + JSON.stringify(err));
} }
}); });
}catch(err){ } catch (err) {
Toast('请前往小程序中支付') Toast('请前往小程序中支付')
} }
}).catch((err) => { }).catch((err) => {
this.$util.Tips({ this.$util.Tips({
title: err title: err
@ -204,47 +180,74 @@
} }
} }
}); });
} }
}, },
changeCurrent(e){ changeCurrent(e) {
this.current = e.index; this.current = e.index;
if(e.index==0){ if (e.index == 0) {
this.loadend = false; this.loadend = false;
this.loading = false; this.loading = false;
this.autoList(true); this.autoList(true);
}else { } else {
this.loadend = false; this.loadend = false;
this.loading = false; this.loading = false;
this.list(true) this.list(true)
} }
}, },
autoList(isPage){
let that = this; list(isPage) {
if (that.loadend2) return; let that = this;
if (that.loading2) return; if (that.loadend) return;
if (isPage === true) that.$set(that, 'deductList', []); if (that.loading) return;
that.loading2 = true; if (isPage === true) that.$set(that, 'productList', []);
that.loadTitle2 = ''; that.loading = true;
autoMarginlist(this.mer_id, that.where2).then(res=>{ that.loadTitle = '';
let list = res.data; marginlist(that.where).then(res => {
let deductList = that.$util.SplitArray(list, that.deductList); let list = res.data.list;
let loadend = list.length < that.where2.limit; let productList = that.$util.SplitArray(list, that.productList);
that.loadend2 = loadend; let loadend = list.length < that.where.limit;
that.loading2 = false; that.loadend = loadend;
that.loadTitle2 = loadend ? '已全部加载' : '加载更多'; that.loading = false;
setTimeout(() => { that.loadTitle = loadend ? '已全部加载' : '加载更多';
that.$set(that, 'deductList', deductList); setTimeout(() => {
}, 500); that.$set(that, 'productList', productList);
that.$set(that.where2, 'page', that.where2.page + 1); }, 500)
if (that.where2.page == 1 && res.data.length <= 0) that.emptyShow = true
}).catch(err=>{ if (isPage) that.where.page = 1;
console.log(err); 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;
if (that.loading2) return;
if (isPage === true) that.$set(that, 'deductList', []);
that.loading2 = true;
that.loadTitle2 = '';
autoMarginlist(this.mer_id, that.where2).then(res => {
let list = res.data;
let deductList = that.$util.SplitArray(list, that.deductList);
let loadend = list.length < that.where2.limit;
that.loadend2 = loadend;
that.loading2 = false;
that.loadTitle2 = loadend ? '已全部加载' : '加载更多';
setTimeout(() => {
that.$set(that, 'deductList', deductList);
}, 500);
that.$set(that.where2, 'page', that.where2.page + 1);
if (that.where2.page == 1 && res.data.length <= 0) that.emptyShow = true
}).catch(err => {
console.log(err);
that.loading2 = false; that.loading2 = false;
that.loadTitle2 = '加载更多'; that.loadTitle2 = '加载更多';
}) })
} }
} }
} }
</script> </script>
@ -260,10 +263,10 @@
.content-order { .content-order {
background: #fff; background: #fff;
border-radius: 21rpx 21rpx; border-radius: 21rpx 21rpx;
margin: 0 28rpx; margin: 0 28rpx;
margin-top: 30rpx; margin-top: 30rpx;
padding: 28rpx; padding: 28rpx;
box-shadow: 0 0 10rpx 2rpx rgba(0, 0, 0, 0.1); box-shadow: 0 0 10rpx 2rpx rgba(0, 0, 0, 0.1);
.view { .view {
font-size: 30rpx; font-size: 30rpx;
@ -272,8 +275,7 @@
color: #333333; color: #333333;
} }
.deduct{ .deduct {}
}
} }
.info { .info {
@ -302,14 +304,13 @@
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1; opacity: 1;
padding: 31.5rpx 28rpx; padding: 31.5rpx 28rpx;
font-size: 30rpx; font-size: 30rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
position: absolute; position: absolute;
top: 0; top: 0;
.title { .title {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
@ -328,12 +329,13 @@
flex-shrink: 0; flex-shrink: 0;
margin-right: 18rpx; margin-right: 18rpx;
} }
.text{
display: -webkit-box; .text {
-webkit-line-clamp: 2; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-line-clamp: 2;
overflow: hidden; -webkit-box-orient: vertical;
} overflow: hidden;
}
} }
} }
} }
@ -407,9 +409,10 @@
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
} }
.btn-d{
background-color: #999; .btn-d {
} background-color: #999;
}
} }
.tip { .tip {

View File

@ -78,8 +78,8 @@
<view :class="{'active': storeParam.order=='sales'}" @click="set_where('sales')">销量</view> <view :class="{'active': storeParam.order=='sales'}" @click="set_where('sales')">销量</view>
<!-- <view :class="{'active': storeParam.order.includes('price')}" @click="set_where(price_order)"> <!-- <view :class="{'active': storeParam.order.includes('price')}" @click="set_where(price_order)">
<text style="margin-right: 5rpx;">价格</text> <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-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=='procure_price_desc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/down'+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> <image class="icon" v-else src='/static/images/horn.png'></image>
</view> --> </view> -->
</view> </view>
@ -104,7 +104,7 @@
<view v-else-if="item.unit_name">{{item.unit_name}}</view> <view v-else-if="item.unit_name">{{item.unit_name}}</view>
</view> </view>
<view class="r_btn" v-if="getAttr(item)"> <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> <image src="@/static/images/icon/plus.png" style="width: 40rpx;height: 40rpx;border-radius: 40rpx;"></image>
</view> </view>
</view> </view>
@ -254,7 +254,7 @@
street: "", street: "",
showPicker: false, showPicker: false,
status: "loadmore", 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: [{ downMenu: [{
title: '默认', title: '默认',
@ -685,8 +685,8 @@
// this.storeParam.order = 'location' //使 // this.storeParam.order = 'location' //使
this.storeParam.order = e // this.storeParam.order = e //
this.getStoreList(); this.getStoreList();
if(e=='procure_price_asc') return this.price_order = 'procure_price_desc'; if(e=='wholesale_price_asc') return this.price_order = 'wholesale_price_desc';
if(e=='procure_price_desc') return this.price_order = 'procure_price_asc'; if(e=='wholesale_price_desc') return this.price_order = 'wholesale_price_asc';
}, },
backjJump() { backjJump() {
uni.navigateBack({ uni.navigateBack({
@ -785,7 +785,7 @@
this.cartList = res.data.list this.cartList = res.data.list
this.cartList.forEach(e => { this.cartList.forEach(e => {
e.list.forEach(item => { 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) this.totalMoney = this.totalMoney.toFixed(2)

View File

@ -78,8 +78,8 @@
<view :class="{'active': storeParam.order=='sales'}" @click="set_where('sales')">销量</view> <view :class="{'active': storeParam.order=='sales'}" @click="set_where('sales')">销量</view>
<!-- <view :class="{'active': storeParam.order.includes('price')}" @click="set_where(price_order)"> <!-- <view :class="{'active': storeParam.order.includes('price')}" @click="set_where(price_order)">
<text style="margin-right: 5rpx;">价格</text> <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-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=='procure_price_desc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/down'+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> <image class="icon" v-else src='/static/images/horn.png'></image>
</view> --> </view> -->
</view> </view>
@ -104,7 +104,7 @@
<view v-else-if="item.unit_name">{{item.unit_name}}</view> <view v-else-if="item.unit_name">{{item.unit_name}}</view>
</view> </view>
<view class="r_btn" v-if="getAttr(item)"> <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> <image src="@/static/images/icon/plus.png" style="width: 40rpx;height: 40rpx;border-radius: 40rpx;"></image>
</view> </view>
</view> </view>
@ -253,7 +253,7 @@
street: "", street: "",
showPicker: false, showPicker: false,
status: "loadmore", 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: [{ downMenu: [{
title: '默认', title: '默认',
@ -681,8 +681,8 @@
// this.storeParam.order = 'location' //使 // this.storeParam.order = 'location' //使
this.storeParam.order = e // this.storeParam.order = e //
this.getStoreList(); this.getStoreList();
if(e=='procure_price_asc') return this.price_order = 'procure_price_desc'; if(e=='wholesale_price_asc') return this.price_order = 'wholesale_price_desc';
if(e=='procure_price_desc') return this.price_order = 'procure_price_asc'; if(e=='wholesale_price_desc') return this.price_order = 'wholesale_price_asc';
}, },
backjJump() { backjJump() {
uni.navigateBack({ uni.navigateBack({
@ -780,7 +780,7 @@
this.cartList = res.data.list this.cartList = res.data.list
this.cartList.forEach(e => { this.cartList.forEach(e => {
e.list.forEach(item => { 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) this.totalMoney = this.totalMoney.toFixed(2)

File diff suppressed because it is too large Load Diff

View File

@ -507,12 +507,12 @@
methods: { methods: {
// //
handleToWithDraw(item, index) { handleToWithDraw(item, index) {
let url; let url;
if(index<2) url = "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id; if (index < 2) url = "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id;
else url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=2` else url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=2`
uni.navigateTo({ uni.navigateTo({
url: url url: url
}) })
}, },
// //
initTypeLiseMenu() { initTypeLiseMenu() {
@ -864,6 +864,7 @@
}, },
// //
getindex() { getindex() {
let that = this;
const data = { const data = {
product_type: this.where1.product_type product_type: this.where1.product_type
} }

View File

@ -33,7 +33,7 @@
<view class="right_goods_msg"> <view class="right_goods_msg">
<view class="num"> <view class="num">
<text style="margin-right: 5rpx;">¥</text> <text style="margin-right: 5rpx;">¥</text>
<text>{{$procure_price(item)}}</text> <text>{{$wholesale_price(item)}}</text>
</view> </view>
<!-- <view class="add_goods" @click="getGoodsDetails(item)">加入购物单</view> --> <!-- <view class="add_goods" @click="getGoodsDetails(item)">加入购物单</view> -->
</view> </view>

View File

@ -58,7 +58,7 @@
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text> v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view> </view>
<view class='money acea-row row-middle'> <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"> <view v-if="goods.productAttr.show_svip_price" class="vipImg">
<image src="/static/images/svip.png"></image> <image src="/static/images/svip.png"></image>
</view> </view>
@ -238,7 +238,7 @@
cartAttr: false, cartAttr: false,
productAttr: [], productAttr: [],
productSelect: { productSelect: {
procure_price: '' wholesale_price: ''
} }
}, },
isOpen: false, // isOpen: false, //
@ -428,7 +428,7 @@
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product
.image); .image);
this.$set(this.attr.productSelect, "price", productSelect.price); 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, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price); 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, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price); 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, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", 0); this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
@ -464,7 +464,7 @@
); );
this.$set(this.attr.productSelect, "image", goods.product.image); this.$set(this.attr.productSelect, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price); 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, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", goods.product.stock); this.$set(this.attr.productSelect, "stock", goods.product.stock);
this.$set(this.attr.productSelect, "unique", goods.product.unique || ""); 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, "store_name", goods.product.store_name);
this.$set(this.attr.productSelect, "image", productSelect.image); this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price); 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, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
@ -551,7 +551,7 @@
if (productSelect && productSelect.stock > 0) { if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); 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, "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, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this, "uniqueValue", productSelect.unique); this.$set(this, "uniqueValue", productSelect.unique);
@ -560,7 +560,7 @@
} else { } else {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); 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, "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, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0); this.$set(this.attr.productSelect, "cart_num", 0);
@ -849,7 +849,7 @@
// // // //
el.list.forEach(e => { el.list.forEach(e => {
if (e.check) { 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 totalNum += +e.cart_num
} }
}) })

View File

@ -52,7 +52,7 @@
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text> v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view> </view>
<view class='money acea-row row-middle'> <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"> <view v-if="goods.productAttr.show_svip_price" class="vipImg">
<image src="/static/images/svip.png"></image> <image src="/static/images/svip.png"></image>
</view> </view>
@ -232,7 +232,7 @@
cartAttr: false, cartAttr: false,
productAttr: [], productAttr: [],
productSelect: { productSelect: {
procure_price: '' wholesale_price: ''
} }
}, },
isOpen: false, // isOpen: false, //
@ -422,7 +422,7 @@
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product
.image); .image);
this.$set(this.attr.productSelect, "price", productSelect.price); 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, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price); 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, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price); 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, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", 0); this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
@ -458,7 +458,7 @@
); );
this.$set(this.attr.productSelect, "image", goods.product.image); this.$set(this.attr.productSelect, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price); 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, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", goods.product.stock); this.$set(this.attr.productSelect, "stock", goods.product.stock);
this.$set(this.attr.productSelect, "unique", goods.product.unique || ""); 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, "store_name", goods.product.store_name);
this.$set(this.attr.productSelect, "image", productSelect.image); this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price); 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, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
@ -545,7 +545,7 @@
if (productSelect && productSelect.stock > 0) { if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); 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, "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, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this, "uniqueValue", productSelect.unique); this.$set(this, "uniqueValue", productSelect.unique);
@ -554,7 +554,7 @@
} else { } else {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); 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, "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, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0); this.$set(this.attr.productSelect, "cart_num", 0);
@ -836,7 +836,7 @@
// // // //
el.list.forEach(e => { el.list.forEach(e => {
if (e.check) { 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 totalNum += +e.cart_num
} }
}) })

View File

@ -52,7 +52,7 @@
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text> v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view> </view>
<view class='money acea-row row-middle'> <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"> <view v-if="goods.productAttr.show_svip_price" class="vipImg">
<image src="/static/images/svip.png"></image> <image src="/static/images/svip.png"></image>
</view> </view>
@ -232,7 +232,7 @@
cartAttr: false, cartAttr: false,
productAttr: [], productAttr: [],
productSelect: { productSelect: {
procure_price: '' wholesale_price: ''
} }
}, },
isOpen: false, // isOpen: false, //
@ -424,7 +424,7 @@
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product
.image); .image);
this.$set(this.attr.productSelect, "price", productSelect.price); 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, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price); 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, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price); 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, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", 0); this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
@ -460,7 +460,7 @@
); );
this.$set(this.attr.productSelect, "image", goods.product.image); this.$set(this.attr.productSelect, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price); 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, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", goods.product.stock); this.$set(this.attr.productSelect, "stock", goods.product.stock);
this.$set(this.attr.productSelect, "unique", goods.product.unique || ""); 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, "store_name", goods.product.store_name);
this.$set(this.attr.productSelect, "image", productSelect.image); this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price); 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, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
@ -547,7 +547,7 @@
if (productSelect && productSelect.stock > 0) { if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); 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, "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, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this, "uniqueValue", productSelect.unique); this.$set(this, "uniqueValue", productSelect.unique);
@ -556,7 +556,7 @@
} else { } else {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); 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, "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, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0); this.$set(this.attr.productSelect, "cart_num", 0);
@ -844,7 +844,7 @@
// // // //
el.list.forEach(e => { el.list.forEach(e => {
if (e.check) { 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 totalNum += +e.cart_num
} }
}) })

View File

@ -933,8 +933,8 @@
}); });
getOtherOrderDetail(that.order_id).then(res => { getOtherOrderDetail(that.order_id).then(res => {
uni.hideLoading(); 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.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.procure_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.$set(that, 'orderInfo', res.data);
that.orderInfo.take = res.data.take; that.orderInfo.take = res.data.take;
that.$set(that, 'cartInfo', res.data.orderProduct); that.$set(that, 'cartInfo', res.data.orderProduct);

View File

@ -1,66 +1,73 @@
<template> <template>
<view class="container"> <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" <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> </u-navbar>
</view> </view>
<view v-if="merchantInfo && !isEmpty"> <view style="height: 50rpx;"></view>
<view class="v-desc"> <view class="wrap">
<view> <view class="shop">
<view class="v-desc-main">确认提货付款</view> <image src="@/static/shop_logo.webp" style="width: 62rpx;height: 54rpx;" />
<view class="v-desc-sub">{{merchantInfo.merchant.mer_name}}</view> <text class="shop-name" v-if="mer_name">{{mer_name||''}}</text>
</view>
<u-image :showLoading="true" :src="merchantInfo.merchant.mer_avatar" width="182rpx" height="182rpx"
:radius="10" />
</view> </view>
<!-- 付款金额 --> <!-- 付款金额 -->
<view class="v-con"> <view class="v-con">
<view class="v-con-text">付款金额</view> <view class="v-con-text">订单金额</view>
<view class="v-con-input" style="margin-right: 10px;"> <view class="v-con-input" @click="handleOpenKeyboard">
<text style="color: #303133;font-size:46rpx;"></text> <text style="color: #303133;font-size:32rpx;"></text>
<u--input type="digit" fontSize="23" v-model="cartForm.total_amount" placeholder="请输入金额" <u--input type="text" fontSize="23" height="112rpx" placeholder="请输入金额" border="none" readonly
border="none" placeholderStyle="color:#999;font-size:30rpx" @input="validateDecimal"> v-model="cartForm.total_amount" placeholderStyle="color:#999;font-size:32rpx">
</u--input> </u--input>
<view class="placeholder"></view>
</view> </view>
<view class="v-wrap" v-if="cartForm.total_amount"> <view class="v-con-group">
<view class="v-wrap-money"> <view class="v-con-group-title">
<text class="icon"></text> <view class="v-con-group-title-left">套餐详情</view>
<text class="num">{{cartForm.total_amount}}</text> <view class="v-con-group-title-right" @click.stop="handleOpen">
</view> <text>{{isOpen?'折叠':'展开'}}</text>
<view class="v-wrap-desc"> <u-icon :name="isOpen?'arrow-down' : 'arrow-right'" size="15"></u-icon>
<view class="v-wrap-desc-main">实物提货券</view> </view>
<view class="v-wrap-desc-sub">即买即用</view>
</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> </view>
<view class="v-btn-wrap"> <view class="v-btn-wrap" @click="cartForm.total_amount?submitOrder():null">
<view class="v-btn" @click="submitOrder">提交订单</view> <view class="v-btn">{{Number(cartForm.total_amount||0).toFixed(2)}} 确认支付</view>
</view> </view>
<!-- 登陆 --> <!-- 登陆 -->
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"> <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun" />
</authorize>
</view> </view>
<!-- 无商户信息提示 --> <!-- 无商户信息提示 -->
<view v-else class="empty"> <!-- <view class="empty">
<image src="/static/images/no_thing.png"></image> <authorize v-show="!isWeixin" ref="authRef" :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth"
<text style="margin-top: 60rpx;">{{tips}}</text> @authColse="authColse" @onLoadFun="onLoadFun">
<!-- 登陆 -->
<authorize :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth" @authColse="authColse"
@onLoadFun="onLoadFun">
</authorize> </authorize>
</view> </view> -->
<!-- 键盘 -->
<popups ref="popups" @confirm="handleConfirm" @clear="handleClear" @change="handleChange"></popups>
</view> </view>
</template> </template>
<script> <script>
var that;
import { import {
getProductInfo, getProductInfo1,
addCart, addCart,
orderCheck orderCheck
} from "@/api/payment.js"; } from "@/api/payment.js";
@ -69,17 +76,23 @@
mapGetters mapGetters
} from "vuex"; } from "vuex";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { Toast } from "../../libs/uniApi"; import {
Toast
} from "../../libs/uniApi";
import popups from "@/components/popups/index.vue";
export default { export default {
components: { components: {
authorize authorize,
popups
}, },
computed: { computed: {
...mapGetters(['isLogin']), ...mapGetters(['isLogin']),
}, },
data() { data() {
return { return {
isEmpty: false, isEmpty: true,
// isWeixin: this.$wechat.isWeixin(),
isWeixin: false,
cartForm: { cartForm: {
product_id: '', product_id: '',
product_attr_unique: '', product_attr_unique: '',
@ -103,29 +116,67 @@ import { Toast } from "../../libs/uniApi";
isAuto: false, // isAuto: false, //
isShowAuth: false, // isShowAuth: false, //
mer_id: '', mer_id: '',
tips: '暂未登陆~' changeTxt: '展开',
isOpen: false,
keyBoardShow: false,
mer_name: ''
} }
}, },
onLoad(opt) { onLoad(opt) {
that = this;
this.mer_id = opt.mer_id; this.mer_id = opt.mer_id;
}, },
onShow() { onShow() {
if (!this.isLogin) { if (!this.isLogin) {
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id); Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true; this.isShowAuth = true;
if (this.isWeixin) {
this.$nextTick(() => {
this.$refs.authRef.toWecahtAuth();
})
}
} else { } else {
this.checkForm.cart_id = []; this.checkForm.cart_id = [];
this.getProductInfoByMerid(this.mer_id); this.getProductInfoByMerid();
} }
}, },
methods: { methods: {
validateDecimal(event) { //
let val = (this.cartForm.total_amount.match(/^\d*(\.?\d{0,2})/g)[0]) || '' handleOpenKeyboard() {
this.$nextTick(() => { if (!this.isLogin) {
this.cartForm.total_amount = val; 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.$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) { leftClick(e) {
@ -133,60 +184,94 @@ import { Toast } from "../../libs/uniApi";
url: '/pages/index/index' url: '/pages/index/index'
}) })
}, },
// //
authColse: function(e) { authColse: function(e) {
this.isShowAuth = e; this.isShowAuth = e;
}, },
onLoadFun() { onLoadFun() {
this.getProductInfoByMerid(this.mer_id); this.getProductInfoByMerid(this.mer_id);
this.isShowAuth = false; this.isShowAuth = false;
}, },
// //
submitOrder() { async submitOrder() {
if (!this.cartForm.total_amount) { if (!this.cartForm.total_amount) {
return this.$util.Tips({ return this.$util.Tips({
title: "请输入付款金额!" 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 => { for (var i = 0; i < that.merchantInfo.length; i++) {
// ID let info = {
that.checkForm.cart_id.push(res.data.cart_id); 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 => { orderCheck(that.checkForm).then(res1 => {
uni.navigateTo({ uni.navigateTo({
url: "/pages/payment/settlement?cartId=" + this.checkForm url: "/pages/payment/settlement",
.cart_id + "&money=" + this.cartForm.total_amount +
"&merName=" + this.merchantInfo.merchant.mer_name,
success: (res) => { 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=>{ }).catch(err => {
Toast(err.message || err) Toast(err.message || err)
}); });
}).catch((err) => { }
this.$util.Tips({
title: err.message || err.msg || err
})
})
}, },
getProductInfoByMerid(merid) { //
let that = this; handleOpen() {
getProductInfo({ this.isOpen = !this.isOpen;
mer_id: merid },
//
getProductInfoByMerid(merid, money) {
getProductInfo1({
mer_id: that.mer_id,
money: that.cartForm.total_amount
}).then(res => { }).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) => { }).catch((err) => {
this.tips = err.message || err.smg || err; that.$util.Tips({
this.$util.Tips({
title: err.message || err.msg || err title: err.message || err.msg || err
}, () => {
}) })
// #ifdef APP // #ifdef APP
setTimeout(() => { setTimeout(() => {
@ -200,49 +285,6 @@ import { Toast } from "../../libs/uniApi";
that.isEmpty = true; that.isEmpty = true;
// #endif // #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"> <style lang="scss">
page { page {
background-color: #FCDFAD; background-color: #F9F9F9;
} }
.empty { .empty {
margin: 130rpx 0 150rpx; margin: 0;
text-align: center; text-align: center;
image, image,
@ -274,7 +316,7 @@ import { Toast } from "../../libs/uniApi";
.container { .container {
position: relative; position: relative;
height: 100vh; 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-size: 100% auto;
background-repeat: no-repeat; background-repeat: no-repeat;
padding-top: var(--status-bar-height); 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 { .v-con {
position: absolute; margin: 0 auto 150rpx;
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;
.v-con-text { .v-con-text {
margin-bottom: 60rpx;
font-weight: 400; font-weight: 400;
font-size: 32rpx; font-size: 30rpx;
color: #2E2E2E; color: #000000;
line-height: 16rpx;
} }
.v-con-input { .v-con-input {
position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 83rpx; height: 112rpx;
padding: 0 0 40rpx 12rpx; margin-bottom: 32rpx;
border-bottom: 1rpx solid #D6D6D6; 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 { .v-wrap {
@ -340,9 +404,6 @@ import { Toast } from "../../libs/uniApi";
padding-left: 20rpx; padding-left: 20rpx;
width: 666rpx; width: 666rpx;
height: 210rpx; 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 { .v-wrap-money {
display: flex; display: flex;
@ -377,37 +438,92 @@ import { Toast } from "../../libs/uniApi";
} }
} }
} }
}
.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 { .v-con-group {
width: 650rpx; .v-con-group-title {
height: 100rpx; display: flex;
line-height: 100rpx; justify-content: space-between;
background: #FF8056; align-items: center;
box-shadow: 0rpx 3rpx 3rpx 1rpx rgba(255, 94, 12, 0.4); margin-bottom: 32rpx;
border-radius: 55rpx 55rpx 55rpx 55rpx;
border: 1rpx solid #FF8056;
font-weight: 600;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
&:active { .v-con-group-title-left {
opacity: .8; 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 {
width: 100%;
height: 90rpx;
line-height: 90rpx;
background: #40AE36;
border-radius: 10rpx;
font-weight: 400;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
// 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> </style>

View File

@ -27,7 +27,8 @@
<block v-for="(item,indx) in paymentData" :key="indx"> <block v-for="(item,indx) in paymentData" :key="indx">
<view class="payment-detail-con-item"> <view class="payment-detail-con-item">
<view class="item-desc"> <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" <text class="item-desc-price"
:style="{'color':item.msg=='收入'?'#EEC102':''}"><text>{{item.msg == '支出'?'-':'+'}}</text>{{item.pay_price}}</text> :style="{'color':item.msg=='收入'?'#EEC102':''}"><text>{{item.msg == '支出'?'-':'+'}}</text>{{item.pay_price}}</text>
</view> </view>
@ -130,7 +131,13 @@
pickerConfirm(e) { pickerConfirm(e) {
const date = new Date(e.value).format('yyyy-MM-dd'); 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.pickEndShow) {
if (!this.searchParams.section_startTime) if (!this.searchParams.section_startTime)
this.searchParams.section_startTime = date; this.searchParams.section_startTime = date;

View File

@ -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> <template>
<view class="container"> <view class="container">
<view class="v-navbar"> <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'}"> :titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
</u-navbar> </u-navbar>
</view> </view>
<view style="display:flex;justify-content:center;flex-direction:column;align-items:center;">
<!-- <view class="v-desc"> <image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/82347202403181619505958.png"
<view class="v-desc-main">扫描二维码</view> style="width:350rpx;height:118rpx;" mode="widthFix" />
<view class="v-desc-sub">即可进入面对面付款</view> <text class="shop_name">店铺:{{userInfo.mer_info.mer_name || '-'}}</text>
</view> --> </view>
<view class="v-qrcode"> <view class="v-qrcode">
<u-image width="540rpx" height="540rpx" :showLoading="true" :src="img" class="v-qrcode-img"></u-image> <u-image width="490rpx" height="490rpx" :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>
</view> </view>
<view class="v-btn" @click="handleSavePic"> <view class="v-btn" @click="handleSavePic">
<image src="../../static/images/download_yellow.webp" />
<text>保存二维码</text> <text>保存二维码</text>
</view> </view>
</view> </view>
@ -108,22 +29,32 @@
data() { data() {
return { return {
img: '', img: '',
userInfo: {} userInfo: {}
} }
}, },
onLoad(opt) { onLoad(opt) {
let user = this.$store.state.app.userInfo; let user = this.$store.state.app.userInfo;
if(typeof user =='string') user = JSON.parse(user); if (typeof user == 'string') user = JSON.parse(user);
this.userInfo = user; this.userInfo = user;
this.getQrcode(user.service.mer_id) this.getQrcode(user.service.mer_id)
}, },
methods: { methods: {
// //
getQrcode(merid) { getQrcode(merid) {
qrcode({ qrcode({
mer_id: merid || 7 mer_id: merid
}).then(res => { }).then(res => {
this.img = res.data.url; 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> </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>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View 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">&#xe6bd;</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">&#xe6bd;</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">&#xe6bd;</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">&#xe6bd;</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>

View File

@ -47,7 +47,7 @@
</commodityComponent> </commodityComponent>
<view class="popup_group"> <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_label">平台分类</view>
<view class="popup_group_item_value"> <view class="popup_group_item_value">
<view class="popup_group_item_message"> <view class="popup_group_item_message">
@ -69,7 +69,7 @@
<view><span class="iconfont">&#xe6bd;</span></view> <view><span class="iconfont">&#xe6bd;</span></view>
</view> </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_label">商品单位</view>
<view class="popup_group_item_value"><input v-model="setFormData.unit_name" type="text" <view class="popup_group_item_value"><input v-model="setFormData.unit_name" type="text"
placeholder="请填写商品单位" /></view> placeholder="请填写商品单位" /></view>
@ -120,7 +120,7 @@
</view> </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" @click="showMoreInfo=!showMoreInfo">
<view class="popup_group_item_label">更多信息</view> <view class="popup_group_item_label">更多信息</view>
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'"> <view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
@ -128,8 +128,8 @@
</view> </view>
</view> --> </view> -->
<block> <block>
<!-- <view class="input_content"> <view class="input_content">
<view class="input_content_describe" style="border-top: none"> <view class="input_content_describe" style="border: none;padding-bottom: 0;">
<view class="input_content_describe_title"> <view class="input_content_describe_title">
<view class="input_content_describe_title_msg">商品简介</view> <view class="input_content_describe_title_msg">商品简介</view>
<view class="input_content_describe_title_num"> <view class="input_content_describe_title_num">
@ -139,17 +139,17 @@
</view> </view>
</view> </view>
<view class="input_content_describe_textarea"> <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" /> placeholderClass="placeholderClass" maxlength="200" />
</view> </view>
</view> </view>
<view class="input_content_keyword"> <!-- <view class="input_content_keyword">
<view class="input_content_keyword_label">关键字</view> <view class="input_content_keyword_label">关键字</view>
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value="" <view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
placeholder="填写关键字" /></view> placeholder="填写关键字" /></view>
</view> </view> -->
</view> --> </view>
<!-- <view class="input_content"> <!-- <view class="input_content">
<view class="input_content_keyword"> <view class="input_content_keyword">
<view class="input_content_keyword_label">最少购买件数</view> <view class="input_content_keyword_label">最少购买件数</view>
@ -159,10 +159,10 @@
</view> --> </view> -->
<view class="radio"> <view class="radio">
<view class="radio_label ">送货方式</view> <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"> <label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view> <view>
<checkbox :value="val.value" disabled :checked="val.value" /> <checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value+'')" />
</view> </view>
<view>{{ val.name }}</view> <view>{{ val.name }}</view>
</label> </label>
@ -246,7 +246,7 @@
specifica: '', // specifica: '', //
// setSpecificaValue: '', // // setSpecificaValue: '', //
// setSpecificaValue2: '', // setSpecificaValue2: '',
delivery_way: [1, 2], // 1 2 delivery_way: ['1', '2'], // 1 2 , // 1 2
delivery_free: '1', // 0 1 delivery_free: '1', // 0 1
temp_id: '', // ID temp_id: '', // ID
tempName: '' ,// tempName: '' ,//
@ -346,7 +346,7 @@
// "cost": "1", // "cost": "1",
// "stock": "11", // "stock": "11",
// "ot_price": "", // "ot_price": "",
// "procure_price": "", // "wholesale_price": "",
// "bar_code": "666", // "bar_code": "666",
// "weight": "10", // "weight": "10",
// "volume": "5", // "volume": "5",
@ -364,6 +364,9 @@
} }
}, },
methods: { methods: {
changeDelivery(e){
this.setFormData.delivery_way = e.detail.value;
},
// //
initDataEditData() { initDataEditData() {
this.setFormData = { this.setFormData = {
@ -395,7 +398,7 @@
}; };
productDetail(this.merId, this.product_id).then(async (res) => { productDetail(this.merId, this.product_id).then(async (res) => {
this.showCommodity = true; this.showCommodity = true;
if (res.data.content_arr.length > 0) res.data.content = res.data.content_arr; if (res.data.content_arr&&res.data.content_arr.length > 0) res.data.content = res.data.content_arr;
let editGoodsDetils = res.data; let editGoodsDetils = res.data;
Object.keys(this.setFormData).forEach(item => { Object.keys(this.setFormData).forEach(item => {
this.setFormData[item] = editGoodsDetils[item]; this.setFormData[item] = editGoodsDetils[item];
@ -413,6 +416,7 @@
if (res.data.content && typeof res.data.content == 'string') res.data.content = JSON.parse(res.data if (res.data.content && typeof res.data.content == 'string') res.data.content = JSON.parse(res.data
.content); .content);
this.setFormData.once_min_count <= 0 ? this.setFormData.once_min_count = '' : null; this.setFormData.once_min_count <= 0 ? this.setFormData.once_min_count = '' : null;
this.setFormData.delivery_way = res.data.delivery_way;
// //
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.commodityRef.setDatas({ this.$refs.commodityRef.setDatas({
@ -615,6 +619,7 @@
if (this.setFormData.spec_type == 0) { if (this.setFormData.spec_type == 0) {
console.log('价格库存', this.$refs.priceRef.singleSpecification); console.log('价格库存', this.$refs.priceRef.singleSpecification);
} }
if(this.setFormData.delivery_way.length==0) return Toast('请至少选择一种送货方式');
let postData = { let postData = {
...this.setFormData, ...this.setFormData,
...this.$refs.commodityRef.addGoodsSecoundData, ...this.$refs.commodityRef.addGoodsSecoundData,
@ -636,7 +641,7 @@
if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo); if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
let showFlag = ''; let showFlag = '';
postData.attrValue.forEach(t => { 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' showFlag = '批发价不能小于0'
} }
if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0'; if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0';
@ -652,12 +657,12 @@
productUpdate(this.merId, this.product_id, postData) productUpdate(this.merId, this.product_id, postData)
.then(res => { .then(res => {
hideLoading() hideLoading()
Modal('提交成功', '点击确定,返回商品管理', { Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
showCancel: false
}).then(() => {
uni.redirectTo({ 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 => { .catch(rej => {
@ -668,15 +673,15 @@
productCreate(this.merId, postData) productCreate(this.merId, postData)
.then(res => { .then(res => {
hideLoading(); hideLoading();
Modal('提交成功', '点击确定,返回商品管理', { Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
showCancel: false,
}).then(() => {
if (this.import == 1) { if (this.import == 1) {
uni.$emit('importAttrValueOK', this.setFormData.import_id); uni.$emit('importAttrValueOK', this.setFormData.import_id);
uni.navigateBack(); uni.navigateBack();
} else uni.redirectTo({ } 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 => { .catch(rej => {

View File

@ -47,7 +47,7 @@
</commodityComponent> </commodityComponent>
<view class="popup_group"> <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_label">平台分类</view>
<view class="popup_group_item_value"> <view class="popup_group_item_value">
<view class="popup_group_item_message"> <view class="popup_group_item_message">
@ -133,7 +133,7 @@
</view> </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" @click="showMoreInfo=!showMoreInfo">
<view class="popup_group_item_label">更多信息</view> <view class="popup_group_item_label">更多信息</view>
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'"> <view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
@ -141,8 +141,8 @@
</view> </view>
</view> --> </view> -->
<block> <block>
<!-- <view class="input_content"> <view class="input_content">
<view class="input_content_describe" style="border-top: none"> <view class="input_content_describe" style="border: none;padding-bottom: 0;">
<view class="input_content_describe_title"> <view class="input_content_describe_title">
<view class="input_content_describe_title_msg">商品简介</view> <view class="input_content_describe_title_msg">商品简介</view>
<view class="input_content_describe_title_num"> <view class="input_content_describe_title_num">
@ -152,30 +152,30 @@
</view> </view>
</view> </view>
<view class="input_content_describe_textarea"> <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" /> placeholderClass="placeholderClass" maxlength="200" />
</view> </view>
</view> </view>
<view class="input_content_keyword"> <!-- <view class="input_content_keyword">
<view class="input_content_keyword_label">关键字</view> <view class="input_content_keyword_label">关键字</view>
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value="" <view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
placeholder="填写关键字" /></view> placeholder="填写关键字" /></view>
</view> </view> -->
</view> --> </view>
<view class="input_content"> <!-- <view class="input_content">
<view class="input_content_keyword"> <view class="input_content_keyword">
<view class="input_content_keyword_label">最少购买件数</view> <view class="input_content_keyword_label">最少购买件数</view>
<view class="input_content_keyword_value"><input v-model="setFormData.once_min_count" type="number" value="" <view class="input_content_keyword_value"><input v-model="setFormData.once_min_count" type="number" value=""
placeholder="不限量" /></view> placeholder="不限量" /></view>
</view> </view>
</view> </view> -->
<view class="radio"> <view class="radio">
<view class="radio_label ">送货方式</view> <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"> <label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view> <view>
<checkbox :value="val.value" disabled :checked="val.value" /> <checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value+'')" />
</view> </view>
<view>{{ val.name }}</view> <view>{{ val.name }}</view>
</label> </label>
@ -265,7 +265,7 @@
specifica: '', // specifica: '', //
// setSpecificaValue: '', // // setSpecificaValue: '', //
// setSpecificaValue2: '', // setSpecificaValue2: '',
delivery_way: [1, 2], // 1 2 delivery_way: ['1', '2'], // 1 2 , // 1 2
delivery_free: '1', // 0 1 delivery_free: '1', // 0 1
temp_id: '', // ID temp_id: '', // ID
tempName: '' ,// tempName: '' ,//
@ -365,7 +365,7 @@
// "cost": "1", // "cost": "1",
// "stock": "11", // "stock": "11",
// "ot_price": "", // "ot_price": "",
// "procure_price": "", // "wholesale_price": "",
// "bar_code": "666", // "bar_code": "666",
// "weight": "10", // "weight": "10",
// "volume": "5", // "volume": "5",
@ -399,6 +399,9 @@
this.setFormData.attrValue[this.deleteIndex].is_d_show = true; this.setFormData.attrValue[this.deleteIndex].is_d_show = true;
this.showDelete = false; this.showDelete = false;
}, },
changeDelivery(e){
this.setFormData.delivery_way = e.detail.value;
},
// //
initDataEditData() { initDataEditData() {
this.setFormData = { this.setFormData = {
@ -430,7 +433,7 @@
}; };
productDetail(this.merId, this.product_id).then(async (res) => { productDetail(this.merId, this.product_id).then(async (res) => {
this.showCommodity = true; this.showCommodity = true;
if (res.data.content_arr.length > 0) res.data.content = res.data.content_arr; if (res.data.content_arr&&res.data.content_arr.length > 0) res.data.content = res.data.content_arr;
let editGoodsDetils = res.data; let editGoodsDetils = res.data;
Object.keys(this.setFormData).forEach(item => { Object.keys(this.setFormData).forEach(item => {
this.setFormData[item] = editGoodsDetils[item]; this.setFormData[item] = editGoodsDetils[item];
@ -451,6 +454,7 @@
if(res.data.attr.length==1&&res.data.attr[0].value=='规格'){ // if(res.data.attr.length==1&&res.data.attr[0].value=='规格'){ //
this.setFormData.spec_type = 0; this.setFormData.spec_type = 0;
} }
this.setFormData.delivery_way = res.data.delivery_way;
// //
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.commodityRef.setDatas({ this.$refs.commodityRef.setDatas({
@ -654,6 +658,7 @@
// if (this.setFormData.spec_type == 0) { // if (this.setFormData.spec_type == 0) {
// console.log('', this.$refs.priceRef.singleSpecification); // console.log('', this.$refs.priceRef.singleSpecification);
// } // }
if(this.setFormData.delivery_way.length==0) return Toast('请至少选择一种送货方式');
let postData = { let postData = {
...this.setFormData, ...this.setFormData,
...this.$refs.commodityRef.addGoodsSecoundData, ...this.$refs.commodityRef.addGoodsSecoundData,
@ -683,7 +688,7 @@
if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo); if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
let showFlag = ''; let showFlag = '';
postData.attrValue.forEach(t => { 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' showFlag = '结算价不能小于0'
} }
if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0'; if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0';
@ -715,12 +720,12 @@
productUpdate(this.merId, this.product_id, postData) productUpdate(this.merId, this.product_id, postData)
.then(res => { .then(res => {
hideLoading() hideLoading()
Modal('提交成功', '点击确定,返回商品管理', { Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
showCancel: false
}).then(() => {
uni.redirectTo({ 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 => { .catch(rej => {
@ -731,15 +736,15 @@
productCreate(this.merId, postData) productCreate(this.merId, postData)
.then(res => { .then(res => {
hideLoading(); hideLoading();
Modal('提交成功', '点击确定,返回商品管理', { Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
showCancel: false,
}).then(() => {
if (this.import == 1) { if (this.import == 1) {
uni.$emit('importAttrValueOK', this.setFormData.import_id); uni.$emit('importAttrValueOK', this.setFormData.import_id);
uni.navigateBack(); uni.navigateBack();
} else uni.redirectTo({ } 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 => { .catch(rej => {

File diff suppressed because it is too large Load Diff

View File

@ -32,8 +32,9 @@
</view> </view>
</view> </view>
<view class="input_content_describe_textarea"> <view class="input_content_describe_textarea">
<textarea v-model="prodectContent.store_info" value="" <textarea v-model="prodectContent.store_info" value="" placeholder="请填写商品简介" placeholderClass="placeholderClass"
placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200" /></view> maxlength="200" />
</view>
</view> </view>
<view class="input_content_keyword" v-if="isShowDescribe"> <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="" <view class="input_content_keyword_value"><input v-model="prodectContent.keyword" type="text" value=""
placeholder="填写关键字" /></view> placeholder="填写关键字" /></view>
</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> </avatar>
</view> </view>
</template> </template>
@ -81,7 +83,7 @@
data() { data() {
return { return {
uploadImg: this.prodectContent.imageList, uploadImg: this.prodectContent.imageList,
upstore : '', upstore: '',
isUpload: true, isUpload: true,
imgName: "" imgName: ""
}; };
@ -90,12 +92,12 @@
watch: { watch: {
prodectContent: { prodectContent: {
handler(val) { handler(val) {
// console.log(val.store_name); // console.log(val.store_name);
this.upstore=val.store_name this.upstore = val.store_name
this.$emit('getProductContent', val); this.$emit('getProductContent', val);
}, },
immediate: true, immediate: true,
deep: true deep: true
}, },
uploadImg: { uploadImg: {
@ -106,7 +108,7 @@
this.isUpload = val.length < 1 ? true : false this.isUpload = val.length < 1 ? true : false
} }
}, },
immediate: true, immediate: true,
deep: true deep: true
} }
}, },
@ -122,8 +124,22 @@
}); });
}, },
clk() { clk() {
let avatar = this.$refs.avatar; // let avatar = this.$refs.avatar;
avatar.fChooseImg(1, { selWidth: '350upx', selHeight: '350upx', inner: true }); // 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) { doUpload(rsp) {
// console.log(rsp); // console.log(rsp);
@ -146,8 +162,9 @@
// console.log(JSON.parse(uploadFileRes.data)); // console.log(JSON.parse(uploadFileRes.data));
let imgData = JSON.parse(uploadFileRes.data) let imgData = JSON.parse(uploadFileRes.data)
// that.prodectContent.imageList.push(imgData.data.path) // that.prodectContent.imageList.push(imgData.data.path)
if(!that.prodectContent.imageList)that.prodectContent.imageList=[]; 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) { complete(res) {
// console.log(res) // console.log(res)

View File

@ -31,7 +31,7 @@
cost: '', // cost: '', //
stock: '', // stock: '', //
ot_price: '', // ot_price: '', //
procure_price: '', // wholesale_price: '', //
bar_code: '', // bar_code: '', //
weight: '', // weight: '', //
volume: '', // volume: '', //
@ -129,13 +129,13 @@
let userInfo = this.$store.state.app.userInfo; let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo); if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
// //
if(userInfo.mer_info?.type_code=="TypeSupplyChain"){ if(userInfo.mer_info?.wholesale){
this.formList.unshift({ this.formList.unshift({
id: 3, id: 3,
label: '批发价', label: '批发价',
type: 'digit', type: 'digit',
holder: '请填写批发价', holder: '请填写批发价',
model: 'procure_price', model: 'wholesale_price',
require: true, require: true,
}) })
} }

View File

@ -31,7 +31,7 @@
cost: '', // cost: '', //
stock: '', // stock: '', //
ot_price: '', // ot_price: '', //
procure_price: '', // wholesale_price: '', //
bar_code: '', // bar_code: '', //
weight: '', // weight: '', //
volume: '', // volume: '', //
@ -137,7 +137,7 @@
label: '批发价', label: '批发价',
type: 'digit', type: 'digit',
holder: '请填写批发价', holder: '请填写批发价',
model: 'procure_price', model: 'wholesale_price',
require: true, require: true,
}) })
} }

View File

@ -34,7 +34,7 @@
cost: '', // cost: '', //
stock: '', // stock: '', //
ot_price: '', // ot_price: '', //
procure_price: '', // wholesale_price: '', //
bar_code: '', // bar_code: '', //
weight: '', // weight: '', //
volume: '', // volume: '', //
@ -61,10 +61,10 @@
require: true, require: true,
},{ },{
id: 3, id: 3,
label: '结算价', label: '批发价',
type: 'digit', type: 'digit',
holder: '请填写结算价', holder: '请填写批发价',
model: 'procure_price', model: 'wholesale_price',
require: true, require: true,
}, { }, {
id: 10, id: 10,
@ -155,7 +155,7 @@
let userInfo = this.$store.state.app.userInfo; let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo); if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
// //
// if(userInfo.mer_info?.type_code=="TypeSupplyChain"){ // if(userInfo.mer_info?.type_code=="TypeSupplyChain"){
// let list = [] // let list = []
// this.formList = [...list, ...this.formList] // this.formList = [...list, ...this.formList]

View 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>

View File

@ -6,6 +6,7 @@
padding-top: 20rpx; padding-top: 20rpx;
padding-bottom: 156rpx; padding-bottom: 156rpx;
} }
.bar-code{ .bar-code{
height: 80rpx; height: 80rpx;
display: flex; display: flex;
@ -286,3 +287,10 @@
background: #FD6523; background: #FD6523;
margin-right: 30rpx; margin-right: 30rpx;
} }
.popup_group_item_b{
padding-left: 20rpx !important;
.popup_group_item_label::before{
color: #e93323;
content: "* ";
}
}

View File

@ -138,6 +138,7 @@
"cost": "", "cost": "",
"ot_price": "", "ot_price": "",
"price": "", "price": "",
"wholesale_price": "",
"volume": "", "volume": "",
"weight": "", "weight": "",
}, },
@ -420,7 +421,7 @@
// flag = false; // flag = false;
// str = '0'; // 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; flag = false;
str = '批发价不能小于等于0'; str = '批发价不能小于等于0';
} }

View 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>

View 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>

View 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>

View 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>

View 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>

View File

@ -596,7 +596,7 @@
} }
productDetail(this.merId, this.product_id).then(res => { productDetail(this.merId, this.product_id).then(res => {
setStorage('editGoodsDetils', res.data); 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); if(typeof res.data.content == 'string')res.data.content = JSON.parse(res.data.content);
this.$store.commit('setStorage', res.data); this.$store.commit('setStorage', res.data);
let editGoodsDetils = res.data; let editGoodsDetils = res.data;

View File

@ -30,7 +30,7 @@
cost: '', // cost: '', //
stock: '', // stock: '', //
ot_price: '', // ot_price: '', //
procure_price: '', // wholesale_price: '', //
bar_code: '', // bar_code: '', //
weight: '', // weight: '', //
volume: '', // volume: '', //
@ -159,7 +159,7 @@
label: '批发价', label: '批发价',
type: 'digit', type: 'digit',
holder: '请填写批发价', holder: '请填写批发价',
model: 'procure_price', model: 'wholesale_price',
require: true, require: true,
}) })
} }

View File

@ -271,7 +271,7 @@
if(!postData.unit_name||postData.unit_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; let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string')userInfo= JSON.parse(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.attrValue[0]?.price||postData.attrValue[0]?.price<=0)return Toast('零售价不能小于0');
if(!postData.stock||postData.stock<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'); // 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