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
luofei ff2c438d88 修改版本号 2024-05-18 11:50:47 +08:00
luofei ecbbdee9ce 修改订单重复加载的错误 2024-05-18 11:15:44 +08:00
luofei dd214e72f3 Merge branch 'pre-release' of https://gitea.lihaink.cn/mkm/shop-applet into pre-release 2024-05-17 14:43:41 +08:00
luofei 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
luofei 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
luofei c4e545d92d Merge branch 'pre-release' of https://gitea.lihaink.cn/mkm/shop-applet into pre-release 2024-05-16 11:44:47 +08:00
luofei 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
luofei 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
luofei 515b0ace72 init 2024-05-14 17:25:13 +08:00
luofei 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 30082 additions and 15394 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"
}
]
}

111
App.vue
View File

@ -1,6 +1,6 @@
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
@ -20,9 +20,9 @@
getUserInfo
} from '@/api/user.js';
import {
parseToken
} from "@/api/appLet.js";
import {
parseToken
} from "@/api/appLet.js";
import {
HTTP_REQUEST_URL
} from './config/app';
@ -32,7 +32,9 @@
history
} from '@/api/public.js'
import Routine from './libs/routine.js';
import { Toast } from "./libs/uniApi";
import {
Toast
} from "./libs/uniApi";
export default {
data() {
@ -65,7 +67,6 @@
auto_arrival: 0,
mer_location: 0,
statusBarHeight: 0,
mer_location: 0,
store_street_theme: 1,
sys_intention_agree: '',
copyright_status: '',
@ -89,6 +90,21 @@
//
console.log('消息成功' + JSON.stringify(option));
});
uni.onHostEventReceive((event, data) => {
if (event == 'tocustomlist') {
if (data.page_type == 1) {
uni.switchTab({
url: data.route
});
} else {
uni.navigateTo({
url: data.route
})
}
}
});
// #endif
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
@ -97,26 +113,26 @@
key: 'launchFlag'
})
//
// parseToken({
// token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXNoaS1taWRkbGUubGloYWluay5jbiIsImF1ZCI6ImNlc2hpLW1pZGRsZS5saWhhaW5rLmNuIiwiaWF0IjoxNzAwNjIwMjUxLCJuYmYiOjE3MDA2MjAyNTEsImV4cCI6MTcwMTIyNTA1MSwiZGF0YSI6eyJ1aWQiOjUsInBob25lIjoiMTc2ODUxNTE2NDMiLCJhdmF0YXIiOiIvcmVzb3VyY2UvaW1hZ2UvYWRtaW5hcGkvZGVmYXVsdC9kZWZhdWx0X2F2YXRhci5wbmciLCJuaWNrbmFtZSI6Ilx1NzUyOFx1NjIzNzE3Njg1MTUxNjQzIn19.sTWAHCScRY9FExwJw1MReHTnRBcK7tYu1AMSia_Sm4M'
// }).then((res)=>{
// this.$store.commit("LOGIN", {
// 'token': res.data.token,
// 'time': 604800
// });
// this.$isResolve()
// }).catch((err)=>{
// if(err==''){
// this.$store.commit("LOGIN", {
// 'token': option.referrerInfo?.extraData?.uniMP,
// 'time': 604800
// });
// }else {
// Toast(err);
// }
// this.$isResolve()
// })
//
// parseToken({
// token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXNoaS1taWRkbGUubGloYWluay5jbiIsImF1ZCI6ImNlc2hpLW1pZGRsZS5saWhhaW5rLmNuIiwiaWF0IjoxNzAwNjIwMjUxLCJuYmYiOjE3MDA2MjAyNTEsImV4cCI6MTcwMTIyNTA1MSwiZGF0YSI6eyJ1aWQiOjUsInBob25lIjoiMTc2ODUxNTE2NDMiLCJhdmF0YXIiOiIvcmVzb3VyY2UvaW1hZ2UvYWRtaW5hcGkvZGVmYXVsdC9kZWZhdWx0X2F2YXRhci5wbmciLCJuaWNrbmFtZSI6Ilx1NzUyOFx1NjIzNzE3Njg1MTUxNjQzIn19.sTWAHCScRY9FExwJw1MReHTnRBcK7tYu1AMSia_Sm4M'
// }).then((res)=>{
// this.$store.commit("LOGIN", {
// 'token': res.data.token,
// 'time': 604800
// });
// this.$isResolve()
// }).catch((err)=>{
// if(err==''){
// this.$store.commit("LOGIN", {
// 'token': option.referrerInfo?.extraData?.uniMP,
// 'time': 604800
// });
// }else {
// Toast(err);
// }
// this.$isResolve()
// })
if (option?.referrerInfo?.extraData?.uniMP) {
uni.setStorageSync('uniMP', option.referrerInfo?.extraData?.uniMP);
@ -124,25 +140,25 @@
// 'token': option.referrerInfo?.extraData?.token,
// 'time': 604800
// });
parseToken({
token: option.referrerInfo?.extraData?.token
}).then((res)=>{
this.$store.commit("LOGIN", {
'token': res.data.token,
'time': 604800
});
this.$isResolve()
}).catch((err)=>{
this.$store.commit("LOGIN", {
'token': option.referrerInfo?.extraData?.token,
'time': 604800
});
console.log('TOKEN解析错误:', err);
this.$isResolve()
})
}else {
this.$isResolve()
}
parseToken({
token: option.referrerInfo?.extraData?.token
}).then((res) => {
this.$store.commit("LOGIN", {
'token': res.data.token,
'time': 604800
});
this.$isResolve()
}).catch((err) => {
this.$store.commit("LOGIN", {
'token': option.referrerInfo?.extraData?.token,
'time': 604800
});
console.log('TOKEN解析错误:', err);
this.$isResolve()
})
} else {
this.$isResolve()
}
// #ifdef APP-PLUS
// #endif
@ -432,6 +448,11 @@
@import 'static/css/style.scss';
//
* {
scrollbar-color: #e5e5e500 #f7f7f9 !important;
}
view {
box-sizing: border-box;
}

View File

@ -9,6 +9,24 @@
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 设置自提人姓名 电话
* @returns {*}
*/
export function delivery(data) {
return request.post(`admin/${data.mer_id}/delivery/${data.order_id}`, data);
}
/**
* 查询暂存订单
* @returns {*}
*/
export function lockList(data, merid) {
return request.get(`admin/${merid}/lock_list`, data);
}
/**
* 统计数据
*/
@ -363,4 +381,22 @@ export function getSubsidyRecord(merId, data) {
return request.get(`server/${merId}/subsidyRecord`, data, {
login: true
});
}
/*
领取补贴
*/
export function couponReceive(data) {
return request.get(`server/${data.mer_id}/subsidyReceive/${data.id}`);
}
/*
拒绝领取补贴
*/
export function couponRefuse(data) {
return request.post(`server/${data.mer_id}/subsidyRefuse/${data.id}`, {
reason: data.reason
}, {
login: true
});
}

View File

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

View File

@ -1,7 +1,7 @@
import request from "@/utils/request.js";
/**
* 文章详情
*
*
*/
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";
/**
* 校验支付密码是否正确
* @param numType
*/
export function verifyPwd(data) {
return request.post("order/verifyPwd", data);
}
/**
* 获取购物车列表
* @param numType boolean true 购物车数量,false=购物车产品数量
@ -39,6 +47,13 @@ export function changeCartNum(cartId, data) {
export function cartDel(data) {
return request.post('user/cart/delete', data);
}
/**
* 购物车商品属性
* @param object ids
*/
export function cartProductAttr(id) {
return request.get(`store/product/get_attr_value/${id}`);
}
/**
* 订单列表
* @param object data

View File

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

View File

@ -9,6 +9,17 @@
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 商户类型列表
*/
export const intentionList = (data) => request.get('intention/detail', data)
/**
* 商户类型申请
*/
export const shopTypeChange = (data) => request.post('intention/change', data)
/**
* 获取商品详情
*/
@ -42,6 +53,22 @@ export function productLstApi(merId, data) {
login: true
});
}
/**
* 检测收银状态
*/
export function micropayQueryApi(data) {
return request.get(`micropay_query`, data, {
login: true
});
}
/**
* 支付失败后进行提单
*/
export function orderLadingApi(data) {
return request.get(`order_lading`, data, {
login: true
});
}
/**
* 商品列表 -- 删除
@ -120,6 +147,35 @@ export function categoryList(merId) {
})
}
/*
添加修改商品 搜索上平
*/
export function categorySearch(merId, data) {
return request.get(`server/${merId}/category/search`, data, {
login: true
})
}
/*
添加修改商品 热门分类商品
*/
export function categorySearchHistory(merId, uid, data) {
return request.post(`server/${merId}/category/search_history/${uid}`, data, {
login: true
})
}
/*
添加修改商品 添加热门分类商品
*/
export function categoryHotcate(merId, uid) {
return request.get(`server/${merId}/category/hotcate/${uid}`, {
login: true
})
}
/*
商品管理 添加商品
*/
@ -328,5 +384,4 @@ export function intention(data) {
*/
export function intentionbus(data) {
return request.post(`intention/business`, data);
}
}

View File

@ -1,5 +1,16 @@
import request from "@/utils/request.js";
/**
* 获取商铺云商品列表
* @param {Object} id 商铺 id
* @param {Object} data 商铺商品列表数据
*/
export function getStoreCloudGoods(id, data) {
return request.get("product/spu/merchant/" + id + "/merCloudProduct", data, {
noAuth: true
});
}
/**
* 扫码查询商品
*
@ -595,8 +606,7 @@ export function vicinityStoreApi(data) {
商家入驻 -- 获取商户入驻申请协议内容
*/
export function agreeiness(data) {
return request.get(`business/agree`, data, { noAuth: true });
}
return request.get(`business/agree`, data, {
noAuth: true
});
}

View File

@ -8,88 +8,134 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
import request1 from "@/utils/requestb.js";
import Cache from '@/utils/cache'
/**
* 报错信息记录
*/
export function errorReport(data) {
return request.post(`api/err/report`, data);
}
/**
* 新商户
*/
export function isNewMer(uid, mer_id, data) {
return request.post(`auth/guide/${uid}/${mer_id}`, data);
}
/**
/**
* 提现----查询单条信息
*/
export function getById(id) {
return request.get(`admin/${id}/get_one`);
}
/**
* 提现----审核进度
*/
export function progressBankList(merId) {
return request.get(`admin/${merId}/bank_progress`);
}
/**
* 提现----添加银行卡
*/
export function addBank(merId, data) {
return request.post(`admin/${merId}/add_bank`, data);
}
/**
* 提现----查询银行卡
*/
export function searchBank(merId) {
return request.get(`admin/${merId}/bank_list`);
}
/**
* 获取版本信息
*/
export function Appversion(data) {
return request.get(`app/version`, data, {
noAuth: true
});
return request.get(`app/version`, data, {
noAuth: true
});
}
/**
* 提交提现
*/
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) {
return request.get(`admin/${merId}/apply`, data);
return request.get(`admin/${merId}/apply`, data);
}
/**
* 提现记录
*/
export function getAdminApplyListAPI(merId) {
return request.get(`admin/${merId}/lis_apply`);
export function getAdminApplyListAPI(merId, data) {
return request.get(`admin/${merId}/lis_apply`, data);
}
/**
* 获取用户信息
*
*/
export function getUserInfo() {
return request.get('user');
return request.get('user');
}
/**
* 头像
*
*/
export function editAvatar(data) {
return request.post('user/change/info', data);
return request.post('user/change/info', data);
}
// 修改昵称
export function updateInfo(data) {
return request.post('user/change/avatar', data);
return request.post('user/change/avatar', data);
}
/**
* h5用户登录
* @param data object 用户账号密码
*/
export function loginH5(data) {
return request.post("auth/login", data, {
noAuth: true
});
return request.post("auth/login", data, {
noAuth: true
});
}
/**
* h5用户手机号登录
* @param data object 用户手机号 也只能
*/
export function loginMobile(data) {
return request.post("auth/smslogin", data, {
noAuth: true
});
return request.post("auth/smslogin", data, {
noAuth: true
});
}
/**
* h5用户手机号登录
* @param data object 用户手机号 也只能
*/
export function loginMpPhone(data) {
return request.post("auth/mp_phone", data, {
noAuth: true
});
return request.post("auth/mp_phone", data, {
noAuth: true
});
}
/**
* 验证码key
*/
export function getCodeApi() {
return request.get("verify_code", {}, {
noAuth: true
});
return request.get("verify_code", {}, {
noAuth: true
});
}
/**
@ -97,18 +143,18 @@ export function getCodeApi() {
* @param data object 用户手机号
*/
export function registerVerify(data) {
return request.post("auth/verify", data, {
noAuth: true
});
return request.post("auth/verify", data, {
noAuth: true
});
}
/**
* h5用户手机号注册
* @param data object 用户手机号 验证码 密码
*/
export function register(data) {
return request.post("auth/register", data, {
noAuth: true
});
return request.post("auth/register", data, {
noAuth: true
});
}
/**
@ -116,30 +162,32 @@ export function register(data) {
* @param data object 用户手机号 验证码 密码
*/
export function registerReset(data) {
return request.post("/register/reset", data, {
noAuth: true
});
return request.post("/register/reset", data, {
noAuth: true
});
}
/**
* 用户手机号忘记密码
*/
export function registerForget(data) {
return request.post("user/change_pwd", data, {
noAuth: true
});
return request.post("user/change_pwd", data, {
noAuth: true
});
}
/**
* 获取用户中心菜单
*
*/
export function getMenuList() {
return request.get("common/menus", {}, { noAuth: true });
return request.get("common/menus", {}, {
noAuth: true
});
}
/*
* 签到用户信息
* */
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() {
return request.get('sign/config')
return request.get('sign/config')
}
/**
* 获取签到列表
* @param object data
*/
export function getSignList(data) {
return request.get('user/sign/lst', data);
return request.get('user/sign/lst', data);
}
/**
* 用户签到
*/
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) {
return request.get('user/sign/month', data)
return request.get('user/sign/month', data)
}
/**
* 活动状态
*
*/
export function userActivity() {
return request.get('user/activity');
return request.get('user/activity');
}
/*
* 资金明细types|0=全部,1=消费,2=充值,3=返佣
* */
export function getCommissionInfo(q, types) {
return request.get("user/bill", q);
return request.get("user/bill", q);
}
/*
* 提现列表
* */
export function extractLst(data) {
return request.get("user/extract/lst", data);
return request.get("user/extract/lst", 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() {
//#ifdef H5
return request.get('user/spread_image', {
type: 'wechat'
});
//#endif
//#ifdef MP
return request.get('user/spread_image', {
type: 'routine'
});
//#endif
//#ifdef H5
return request.get('user/spread_image', {
type: 'wechat'
});
//#endif
//#ifdef MP
return request.get('user/spread_image', {
type: 'routine'
});
//#endif
}
/**
*
@ -219,7 +267,7 @@ export function spreadBanner() {
* @param object 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
*/
export function spreadCount(type) {
return request.get('spread/count/' + type);
return request.get('spread/count/' + type);
}
/*
* 推广数据
* */
export function getSpreadInfo() {
return request.get("/commission");
return request.get("/commission");
}
/**
*
@ -241,54 +289,54 @@ export function getSpreadInfo() {
* @param object data
*/
export function spreadOrder(data) {
return request.get('user/spread_order', data);
return request.get('user/spread_order', data);
}
/*
* 获取推广人排行
* */
export function getRankList(data) {
return request.get("user/spread_top", data);
return request.get("user/spread_top", data);
}
/*
* 获取佣金排名
* */
export function getBrokerageRank(q) {
return request.get("user/brokerage_top", q);
return request.get("user/brokerage_top", q);
}
/**
* 提现申请
* @param object data
*/
export function extractCash(data) {
return request.post('user/extract/create', data)
return request.post('user/extract/create', data)
}
/**
* 提现银行/提现最低金额
*
*/
export function extractBank() {
return request.get('user/extract/banklst');
return request.get('user/extract/banklst');
}
/**
* 会员等级列表
*
*/
export function userLevelGrade() {
return request.get('user/level/grade');
return request.get('user/level/grade');
}
/**
* 获取某个等级任务
* @param int id 任务id
*/
export function userLevelTask(id) {
return request.get('user/level/task/' + id);
return request.get('user/level/task/' + id);
}
/**
* 检查用户是否可以成为会员
*
*/
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
*/
export function getAddressList(data) {
return request.get('user/address/lst', data);
return request.get('user/address/lst', data);
}
/**
* 设置默认地址
* @param int id
*/
export function setAddressDefault(id) {
return request.post('user/address/update/' + id)
return request.post('user/address/update/' + id)
}
/**
* 修改 添加地址
* @param object 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) {
return request.post('user/address/delete/' + id)
return request.post('user/address/delete/' + id)
}
/**
* 获取单个地址
* @param int id
*/
export function getAddressDetail(id) {
return request.get('user/address/detail/' + id);
return request.get('user/address/detail/' + id);
}
/**
* 修改用户信息
* @param object
*/
export function userEdit(data) {
return request.post('user/edit', data);
return request.post('user/edit', data);
}
/*
* 退出登录
* */
export function getLogout() {
return request.post("logout");
return request.post("logout");
}
/**
* 佣金转入
*
*/
export function rechargeBrokerage(data) {
return request.post('user/recharge/brokerage', data)
return request.post('user/recharge/brokerage', data)
}
/**
* 小程序充值
*
*/
export function rechargeRoutine(data) {
return request.post('recharge/routine', data)
return request.post('recharge/routine', data)
}
/*
* 公众号充值
* */
export function rechargeWechat(data) {
return request.post("user/recharge", data);
return request.post("user/recharge", data);
}
/**
* 获取默认地址
*
*/
export function getAddressDefault() {
return request.get('address/default');
return request.get('address/default');
}
/**
* 充值金额选择
*/
export function getRechargeApi() {
return request.get("common/recharge_quota");
return request.get("common/recharge_quota");
}
/**
* 登陆记录
*/
export function setVisit(data) {
return request.post('user/set_visit', {
...data
}, {
noAuth: true
});
return request.post('user/set_visit', {
...data
}, {
noAuth: true
});
}
/**
* 客服列表
*/
export function serviceList(data) {
return request.get("service/list", data);
return request.get("service/list", 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) {
return request.get("service/user_list/" + mer_id, data);
return request.get("service/user_list/" + mer_id, 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) {
return request.get("service/mer_history/" + mer_id + '/' + userid, data);
return request.get("service/mer_history/" + mer_id + '/' + userid, data);
}
/**
* 静默绑定推广人
* @param {Object} puid
*/
export function spread(puid) {
Cache.set("spread", puid || 0);
return request.post("user/spread", {
spread_spid: puid
});
Cache.set("spread", puid || 0);
return request.post("user/spread", {
spread_spid: puid
});
}
/**
* 反馈类型
*/
export function feedbackType() {
return request.get("common/feedback_type");
return request.get("common/feedback_type");
}
/**
* 提交反馈
*/
export function feedback(data) {
return request.post("user/feedback", {
...data
});
return request.post("user/feedback", {
...data
});
}
/**
* 反馈列表
*/
export function feedbackList(data) {
return request.get("user/feedback/list", data);
return request.get("user/feedback/list", data);
}
/**
* 反馈列表
*/
export function feedbackDetail(id) {
return request.get("user/feedback/detail/" + id);
return request.get("user/feedback/detail/" + id);
}
/**
* 浏览记录
*/
export function historyList(data) {
return request.get("user/history", data);
return request.get("user/history", data);
}
/**
* 删除浏览记录
*/
export function historyDelete(id) {
return request.post("user/history/delete/" + id);
return request.post("user/history/delete/" + id);
}
/**
* 批量删除浏览记录
*/
export function historyBatchDelete(data) {
return request.post("user/history/batch/delete", data);
return request.post("user/history/batch/delete", 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) {
return request.get("user/brokerage_list", data);
return request.get("user/brokerage_list", data);
}
/**
* 佣金数据
*/
export function spreadInfo() {
return request.get("user/spread_info");
return request.get("user/spread_info");
}
// 图片验证码
export function getCaptcha() {
return request.get('captcha', {}, {
noAuth: true
});
return request.get('captcha', {}, {
noAuth: true
});
}
// 用户账户列表
export function userAcc() {
return request.get('user/account', {}, {
noAuth: true
});
return request.get('user/account', {}, {
noAuth: true
});
}
// 创建发票
export function invoiceSave(data) {
return request.post('user/receipt/create', data);
return request.post('user/receipt/create', 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) {
return request.post('user/receipt/is_default/' + id);
return request.post('user/receipt/is_default/' + id);
}
// 发票抬头--列表
export function invoice(data) {
return request.get('user/receipt/lst', data);
return request.get('user/receipt/lst', data);
}
// 发票抬头--删除
export function invoiceDelete(id) {
return request.post('user/receipt/delete/' + id);
return request.post('user/receipt/delete/' + id);
}
// 发票--详情
export function invoiceDetail(id) {
return request.get('user/receipt/detail/' + id);
return request.get('user/receipt/detail/' + id);
}
/**
* 新版分享海报信息获取
*
*/
export function spreadMsg(data) {
return request.get('user/v2/spread_image', data);
return request.get('user/v2/spread_image', data);
}
/**
* 图片链接转base64
*
*/
export function imgToBase(data) {
return request.post('common/base64', data);
return request.post('common/base64', data);
}
/**
* 获取协议
*
*/
export function getAgreementApi(key) {
return request.get('agreement/' + key, {}, { noAuth: true });
return request.get('agreement/' + key, {}, {
noAuth: true
});
}
/**
* 获取协议
*
*/
export function getIntegralInfo() {
return request.get('user/integral/info');
return request.get('user/integral/info');
}
/**
* 获取店铺列表
*
*/
export function getStoreList(data) {
return request.get('user/services', data);
return request.get('user/services', data);
}
/*
获取佣金说明
*/
export function commissionDescription() {
return request.get('agreement/sys_extension_agree')
return request.get('agreement/sys_extension_agree')
}
/*
获取用户分销等级信息
*/
export function getBrokerageInfo() {
return request.get('user/brokerage/info')
return request.get('user/brokerage/info')
}
/*
获取用户分销等级表格数据
*/
export function getBrokerageGrade() {
return request.get('user/brokerage/all')
return request.get('user/brokerage/all')
}
/*
分销员升级提醒
*/
export function brokerageNotice(data) {
return request.get(`user/brokerage/notice`, data)
return request.get(`user/brokerage/notice`, data)
}
/*
口令解析
*/
export function pwdResolution(data) {
return request.get(`command/copy?key=${data}`)
return request.get(`command/copy?key=${data}`)
}
/*
获取佣金说明
*/
export function getInstructions(key) {
return request.get(`agreement/${key}`)
return request.get(`agreement/${key}`)
}
/*
会员信息
*/
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) {
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() {
return request.get('agreement_lst', {}, { noAuth: true })
return request.get('agreement_lst', {}, {
noAuth: true
})
}
/**
* 协议规则列表对应的数据
@ -620,7 +672,9 @@ export function cacheLst() {
*
*/
export function cacheInfo(key) {
return request.get(`agreement/${key}`, {}, { noAuth: true })
return request.get(`agreement/${key}`, {}, {
noAuth: true
})
}
/**
* 注销账户
@ -628,7 +682,7 @@ export function cacheInfo(key) {
*
*/
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) {
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) {
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() {
return request.get(`svip/pay_lst`)
return request.get(`svip/pay_lst`)
}
/**
* 开通付费会员--支付
@ -660,7 +716,7 @@ export function memberCard() {
*
*/
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() {
return request.get(`svip/user_info`, {}, { noAuth: true })
return request.get(`svip/user_info`, {}, {
noAuth: true
})
}
/**
* 付费会员优惠券
@ -676,7 +734,9 @@ export function memberEquity() {
*
*/
export function memberCouponLst() {
return request.get(`svip/coupon_lst`, {}, { noAuth: true })
return request.get(`svip/coupon_lst`, {}, {
noAuth: true
})
}
/**
* 付费会员优惠券--领取
@ -684,7 +744,7 @@ export function memberCouponLst() {
*
*/
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) {
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) {
return request.post(`service/recall/${id}`)
return request.post(`service/recall/${id}`)
}
/**
* 客服聊天--判断店铺是否有在线客服
@ -708,7 +770,7 @@ export function chatReverstApi(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() {
return request.get(`user/extract/history_bank`)
return request.get(`user/extract/history_bank`)
}
// 商户账单管理
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) {
return request1.get(`company/street_company`, data);
}
return request1.get(`company/street_company`, data);
}

View File

@ -19,9 +19,9 @@
<image src="/static/images/svip.png"></image>
</view>
</view>
<view class="item_tags">
<text v-if="item.product_type == 0 && item.merchant.type_name"
class="font-bg-red b-color">{{item.merchant.type_name}}</text>
<text v-else-if="item.product_type == 0 && item.merchant.is_trader"
@ -44,8 +44,9 @@
<view class='text'>
<view class='name line2'>{{item.store_name}}</view>
<view class="score"><span
style="font-size: 23rpx;font-family: PingFang SC-Semibold, PingFang SC;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
{{item.reply_count}}条评论</view>
style="font-size: 23rpx;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
{{item.reply_count}}条评论
</view>
<view class="" style="display: flex;justify-content: space-between;">
<view class='money'>
<span style="font-size:30rpx;"></span>
@ -59,14 +60,14 @@
<view v-if="item.show_svip_info.show_svip && item.show_svip_info.show_svip_price"
class="acea-row row-middle svip">
<text class='vip-money'>{{item.svip_price}}</text>
<view class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
</view>
<view class="item_tags acea-row">
<text v-if="item.merchant.type_name && item.product_type == 0"
class="font-bg-red b-color">{{item.merchant.type_name}}</text>
<text v-else-if="item.merchant.is_trader && item.product_type == 0"
@ -76,7 +77,7 @@
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
</view>
<view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
<text class="line1">{{item.merchant.mer_name}}</text>
<view class="flex" v-if="isStore != '1'">

View File

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

View File

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

View File

@ -19,7 +19,7 @@
<image src="/static/images/svip.png"></image>
</view>
</view>
<!-- <view class="item_tags">
<text v-if="item.product_type == 0 && item.merchant.type_name"
@ -44,8 +44,9 @@
<view class='text'>
<view class='name line2'>{{item.store_name}}</view>
<view class="score"><span
style="font-size: 23rpx;font-family: PingFang SC-Semibold, PingFang SC;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
{{item.reply_count}}条评论</view>
style="font-size: 23rpx;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
{{item.reply_count}}条评论
</view>
<view class="" style="display: flex;justify-content: space-between;">
<view class='money'>
<span style="font-size:30rpx;"></span>
@ -59,7 +60,7 @@
<view v-if="item.show_svip_info.show_svip && item.show_svip_info.show_svip_price"
class="acea-row row-middle svip">
<text class='vip-money'>{{item.svip_price}}</text>
<view class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
@ -76,7 +77,7 @@
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
</view> -->
<view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
<text class="line1">{{item.merchant.mer_name}}</text>
<view class="flex" v-if="isStore != '1'">

View File

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

View File

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

BIN
components/aaa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -5,7 +5,7 @@
<view class="c_card">
<view class="c_content">
<scroll-view style="height: 100%;" scroll-y>
<view v-if="info.content" v-html="info.content.content"></view>
<view v-if="info&&info.content&&info.content.content" v-html="info.content.content"></view>
</scroll-view>
</view>
</view>

View File

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

View File

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

View File

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

View File

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

View File

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

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

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

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

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

View File

@ -63,13 +63,13 @@
},
methods: {
navigtion(item) {
if (item.title1 =='发布调货商品') {
if (item.title1 == '发布调货商品') {
uni.navigateTo({
url: '/pages/trading_hall/transfer_goods/index'
})
} else {
uni.navigateTo({
url: '/pages/trading_hall/adddiscounts/index'
})
@ -121,7 +121,7 @@
.release_content_left {
display: flex;
}
.release_content_right {
@ -135,7 +135,7 @@
height: 96rpx;
margin-top: 21rpx;
margin-right: 19rpx;
image {
width: 111rpx;
@ -144,10 +144,10 @@
}
.release_imga {
width: 76rpx;
height: 113rpx;
margin-top: 5rpx;
margin-right: 50rpx;
@ -163,14 +163,12 @@
.title1 {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.title2 {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
margin-top: 11rpx;

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

@ -1,218 +1,345 @@
{
"name" : "惠农商户平台",
"appid" : "__UNI__1EE148C",
"description" : "",
"versionName" : "1.3.9",
"versionCode" : 139,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"titleNView" : true,
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {
"VideoPlayer" : {},
"iBeacon" : {},
"Barcode" : {},
"Camera" : {},
"Geolocation" : {},
"Payment" : {},
"Share" : {},
"OAuth" : {},
"UniMP" : {
"description" : "uni小程序"
},
"Maps" : {}
},
"safearea" : {
"bottom" : {
"offset" : "none"
}
},
/* */
"distribute" : {
/* android */
"android" : {
"resizeableActivity" : true,
"permissions" : [
"<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_LOCATION_EXTRA_COMMANDS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"permissionExternalStorage" : {
"request" : "none",
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
},
"permissionPhoneState" : {
"request" : "none" //
}
},
/* ios */
"ios" : {
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "上传用户头像保存分享海报",
"NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报",
"NSCameraUsageDescription" : "上传用户头像保存分享海报",
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店"
},
"idfa" : false,
"dSYMs" : false
},
/* SDK */
"sdkConfigs" : {
"maps" : {
"amap" : {
"appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945",
"name" : "amapIvoVHpJR"
}
},
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://mer.crmeb.net/"
}
},
"share" : {
"weixin" : {
"appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://mer.crmeb.net/"
}
},
"geolocation" : {
"amap" : {
"name" : "amapIvoVHpJR",
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945"
},
"system" : {
"__platform__" : [ "ios", "android" ]
}
},
"oauth" : {},
"ad" : {}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"useOriginalMsgbox" : true
}
}
},
/* */
"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"
}
"name": "惠农商户平台",
"appid": "__UNI__7626C0F",
"description": "",
"versionName": "1.5.4",
"versionCode": 1540,
"transformPx": false,
/* 5+App */
"app-plus": {
"titleNView": true,
"usingComponents": true,
"nvueCompiler": "uni-app",
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"compatible": {
"ignoreVersion": true //trueHBuilderX1.9.0
},
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* */
"modules": {
"VideoPlayer": {},
"iBeacon": {},
"Barcode": {},
"Camera": {},
"Geolocation": {},
"Payment": {},
"Share": {},
"OAuth": {},
"UniMP": {
"description": "uni小程序"
},
"Maps": {}
},
"safearea": {
"bottom": {
"offset": "none"
}
},
/* */
"distribute": {
/* android */
"android": {
"resizeableActivity": true,
"permissions": [
"<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_LOCATION_EXTRA_COMMANDS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
"permissionExternalStorage": {
"request": "none",
"prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
},
"permissionPhoneState": {
"request": "none" //
}
},
/* ios */
"ios": {
"privacyDescription": {
"NSPhotoLibraryUsageDescription": "上传用户头像保存分享海报",
"NSPhotoLibraryAddUsageDescription": "上传用户头像保存分享海报",
"NSCameraUsageDescription": "上传用户头像保存分享海报",
"NSLocationWhenInUseUsageDescription": "根据客户地理位置推荐最近门店",
"NSLocationAlwaysUsageDescription": "根据客户地理位置推荐最近门店",
"NSLocationAlwaysAndWhenInUseUsageDescription": "根据客户地理位置推荐最近门店"
},
"idfa": false,
"dSYMs": false
},
/* SDK */
"sdkConfigs": {
"maps": {
"amap": {
"appkey_ios": "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android": "0354f5ddc11e2ea76c5aac647f44d945",
"name": "amapIvoVHpJR"
}
},
"payment": {
"weixin": {
"__platform__": ["ios", "android"],
"appid": "wx9d68c92b550ddd1e",
"UniversalLinks": "https://mer.crmeb.net/"
}
},
"share": {
"weixin": {
"appid": "wx9d68c92b550ddd1e",
"UniversalLinks": "https://mer.crmeb.net/"
}
},
"geolocation": {
"amap": {
"name": "amapIvoVHpJR",
"__platform__": ["ios", "android"],
"appkey_ios": "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android": "0354f5ddc11e2ea76c5aac647f44d945"
},
"system": {
"__platform__": ["ios", "android"]
}
},
"oauth": {},
"ad": {}
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen": {
"useOriginalMsgbox": true
}
},
"nativePlugins": {
"JG-JCore": {
"JPUSH_APPKEY_IOS": "",
"JPUSH_CHANNEL_IOS": "",
"JPUSH_APPKEY_ANDROID": "",
"JPUSH_CHANNEL_ANDROID": "",
"__plugin_info__": {
"name": "JG-JCore",
"description": "极光推送JCore插件",
"platforms": "Android,iOS",
"url": "",
"android_package_name": "",
"ios_bundle_id": "",
"isCloud": false,
"bought": -1,
"pid": "",
"parameters": {
"JPUSH_APPKEY_IOS": {
"des": "[iOS]极光portal配置应用信息时分配的AppKey",
"key": "JCore:APP_KEY",
"value": ""
},
"JPUSH_CHANNEL_IOS": {
"des": "[iOS]用于统计分发渠道不需要可填默认值developer-default",
"key": "JCore:CHANNEL",
"value": ""
},
"JPUSH_APPKEY_ANDROID": {
"des": "[Android]极光portal配置应用信息时分配的AppKey",
"key": "JPUSH_APPKEY",
"value": ""
},
"JPUSH_CHANNEL_ANDROID": {
"des": "[Android]用于统计分发渠道不需要可填默认值developer-default",
"key": "JPUSH_CHANNEL",
"value": ""
}
}
}
},
"JG-JPush": {
"JPUSH_ISPRODUCTION_IOS": "",
"JPUSH_ADVERTISINGID_IOS": "",
"JPUSH_DEFAULTINITJPUSH_IOS": "",
"JPUSH_OPPO_APPKEY": "",
"JPUSH_OPPO_APPID": "",
"JPUSH_OPPO_APPSECRET": "",
"JPUSH_VIVO_APPKEY": "",
"JPUSH_VIVO_APPID": "",
"JPUSH_MEIZU_APPKEY": "",
"JPUSH_MEIZU_APPID": "",
"JPUSH_XIAOMI_APPKEY": "",
"JPUSH_XIAOMI_APPID": "",
"__plugin_info__": {
"name": "JG-JPush",
"description": "极光推送Hbuilder插件",
"platforms": "Android,iOS",
"url": "",
"android_package_name": "",
"ios_bundle_id": "",
"isCloud": false,
"bought": -1,
"pid": "",
"parameters": {
"JPUSH_ISPRODUCTION_IOS": {
"des": "[iOS]是否是生产环境是填true不是填false或者不填",
"key": "JPush:ISPRODUCTION",
"value": ""
},
"JPUSH_ADVERTISINGID_IOS": {
"des": "[iOS]广告标识符IDFA如果不需要使用IDFA可不填",
"key": "JPush:ADVERTISINGID",
"value": ""
},
"JPUSH_DEFAULTINITJPUSH_IOS": {
"des": "[iOS]是否默认初始化是填true不是填false或者不填",
"key": "JPush:DEFAULTINITJPUSH",
"value": ""
},
"JPUSH_OPPO_APPKEY": {
"des": "厂商OPPO-appkey,示例OP-12345678",
"key": "OPPO_APPKEY",
"value": ""
},
"JPUSH_OPPO_APPID": {
"des": "厂商OPPO-appId,示例OP-12345678",
"key": "OPPO_APPID",
"value": ""
},
"JPUSH_OPPO_APPSECRET": {
"des": "厂商OPPO-appSecret,示例OP-12345678",
"key": "OPPO_APPSECRET",
"value": ""
},
"JPUSH_VIVO_APPKEY": {
"des": "厂商VIVO-appkey,示例12345678",
"key": "com.vivo.push.api_key",
"value": ""
},
"JPUSH_VIVO_APPID": {
"des": "厂商VIVO-appId,示例12345678",
"key": "com.vivo.push.app_id",
"value": ""
},
"JPUSH_MEIZU_APPKEY": {
"des": "厂商MEIZU-appKey,示例MZ-12345678",
"key": "MEIZU_APPKEY",
"value": ""
},
"JPUSH_MEIZU_APPID": {
"des": "厂商MEIZU-appId,示例MZ-12345678",
"key": "MEIZU_APPID",
"value": ""
},
"JPUSH_XIAOMI_APPKEY": {
"des": "厂商XIAOMI-appKey,示例MI-12345678",
"key": "XIAOMI_APPKEY",
"value": ""
},
"JPUSH_XIAOMI_APPID": {
"des": "厂商XIAOMI-appId,示例MI-12345678",
"key": "XIAOMI_APPID",
"value": ""
}
}
}
}
}
},
/* */
"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,
// #endif
"app-plus": {
"scrollIndicator": false //
"scrollIndicator": false, //
"subNVues": [{
"id": "concat", //
"path": "pages/index/subnvue/concat", //
"type": "popup",
"style": {
"position": "absolute",
"dock": "right",
"width": "750rpx",
"height": "1500rpx",
"background": "rgba(0,0,0,0.2)"
}
}]
}
}
},
{
"path": "pages/test/index", //
"style": {
"app-plus": {
"subNVues": [{
"id": "concat", //
"path": "pages/test/subnvue/concat", //
/*"type": "popup", */
"style": {
"position": "absolute",
"dock": "right",
"width": "100rpx",
"height": "150rpx",
"background": "transparent"
}
}]
}
}
},
@ -78,6 +109,12 @@
"scrollIndicator": false //
}
}
}, {
"path": "pages/index/unregist",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/nongKe/supply_chain/shopping_trolley",
@ -300,9 +337,38 @@
"navigationBarTitleText": "补贴",
"enablePullDownRefresh": false
}
},
{
"path": "pages/cashier/cashier",
"style": {
"navigationBarTitleText": "收银",
"enablePullDownRefresh": true
}
}
],
"subPackages": [{
"root": "pages/withdrawal",
"name": "withdrawal",
"pages": [{
"path": "index",
"style": {
"navigationBarTitleText": "提货付款",
"navigationStyle": "custom"
}
}, {
"path": "add",
"style": {
"navigationBarTitleText": "添加银行卡",
"navigationStyle": "custom"
}
}, {
"path": "progress",
"style": {
"navigationBarTitleText": "提现进度",
"navigationStyle": "custom"
}
}]
}, {
"root": "pages/payment",
"name": "payment",
"pages": [{
@ -1250,7 +1316,9 @@
{
"path": "orderList/index",
"style": {
"navigationBarTitleText": "订单列表"
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": true
}
},
{
@ -1331,7 +1399,15 @@
"navigationBarTitleText": "商品详情"
}
}, {
},
{
"path": "goods_details/videoPlay",
"style": {
"navigationBarTitleText": "视屏详情"
}
},
{
"path": "stockOut/index",
"style": {
"navigationBarTitleText": "扫码出库",
@ -1354,7 +1430,22 @@
"path": "list/index",
"style": {
"navigationBarTitleText": "商品管理",
"enablePullDownRefresh": true
"enablePullDownRefresh": true,
"app-plus": {
"scrollIndicator": false, //
"subNVues": [{
"id": "concatpro", //
"path": "list/subnvue/concat", //
"type": "popup",
"style": {
"position": "absolute",
"dock": "right",
"width": "750rpx",
"height": "2000rpx",
"background": "rgba(0,0,0,0.2)"
}
}]
}
}
},
{
@ -1392,74 +1483,91 @@
"style": {
"navigationBarTitleText": "添加店铺分类"
}
},
{
}, {
"path": "addGoods/index",
"style": {
"navigationBarTitleText": "添加商品"
}
},
{
}, {
"path": "addGoods/secound",
"style": {
"navigationBarTitleText": "添加商品"
}
},
{
}, {
"path": "addGoods/addGoodDetils",
"style": {
"navigationBarTitleText": "商品详情"
}
},
{
}, {
"path": "addGoods/singleSpecification",
"style": {
"navigationBarTitleText": "单规格"
}
},
{
}, {
"path": "addGoods/mulSpecification",
"style": {
"navigationBarTitleText": "多规格"
}
},
{
}, {
"path": "addGoods/specificationProperties",
"style": {
"navigationBarTitleText": "规格属性"
}
},
{
}, {
"path": "addGoods/freightTemplate",
"style": {
"navigationBarTitleText": "运费模板",
"onReachBottomDistance": 100,
"enablePullDownRefresh": false
}
},
{
}, {
"path": "addGoods/addFreightTemplate",
"style": {
"navigationBarTitleText": "新增运费模板"
}
},
{
}, {
"path": "addGoods/modifyPrice",
"style": {
"navigationBarTitleText": "修改价格-多规格"
}
},
{
}, {
"path": "basicSet",
"style": {
"navigationBarTitleText": "商户基本设置",
"enablePullDownRefresh": false
}
},
{
}, {
"path": "shop_type_change/index",
"style": {
"navigationBarTitleText": "类型变更",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "shop_type_change/progress",
"style": {
"navigationBarTitleText": "变更进度",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "shop_type_change/list",
"style": {
"navigationBarTitleText": "申请记录",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "addGood/addGood",
"style": {
"navigationBarTitleText": "商品设置",
"navigationBarTitleText": "发布商品",
"enablePullDownRefresh": false
}
},
{
"path": "addGood/addGoodOld",
"style": {
"navigationBarTitleText": "发布商品",
"enablePullDownRefresh": false
}
},
@ -1490,7 +1598,43 @@
"navigationBarTitleText": "更新库存",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/addGoodDetail",
"style": {
"navigationBarTitleText": "发布商品",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/goodsType",
"style": {
"navigationBarTitleText": "商品分类",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/goodsAttr",
"style": {
"navigationBarTitleText": "商品属性",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/goodsPrice",
"style": {
"navigationBarTitleText": "价格与规格",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/goodsSearch",
"style": {
"navigationBarTitleText": "商品分类",
"enablePullDownRefresh": false
}
}
]
},
{
@ -1675,14 +1819,14 @@
"iconPath": "static/tabbar_icon/s.png",
"selectedIconPath": "static/tabbar_icon/s-a.png",
"text": "统计"
},
{
"pagePath": "pages/nongKe/supply_chain/shopping_trolley",
"iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png",
"text": "采购车"
}
// {
// "pagePath": "pages/nongKe/supply_chain/shopping_trolley",
// "iconPath": "static/tabbar_icon/d.png",
// "selectedIconPath": "static/tabbar_icon/d-a.png",
// "text": "采购车"
// }
// {
// "pagePath": "pages/product/list/index",
// "iconPath": "static/tabbar_icon/c.png",
// "selectedIconPath": "static/tabbar_icon/c-a.png",

View File

@ -1,389 +1,574 @@
<template>
<view class="page">
<view class="bg">
<image mode="widthFix" style="width: 100%;"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/87960202402291430371479.webp"></image>
<view class="card" :class="{card2:type==2}">
<view class="c-head">
<view :class="type==2?'left':'right'" @click="changeType(2)">增收销售补贴</view>
<!-- <view :class="type==1?'left':'right'" @click="changeType(1)">春耕采购补贴</view> -->
<view v-if="mer_info.type_code=='PersonalStore'" :class="type==1?'left':'right'" @click="changeType(1)">春耕采购补贴</view>
<view v-else></view>
</view>
<view class="c-body-title">
<view>补贴金额</view>
<view>补贴状态</view>
</view>
<view class="c-body-text">
<view class="price">{{info.subsidy_amount}}</view>
<view>
<text v-if="info.subsidy_status" class="price">已到账</text>
<text v-else>未激活</text>
</view>
</view>
</view>
<view class="bottom"></view>
</view>
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_title">补贴进度</view>
<view class="body" >
<view class="b-card" v-if="type==1">
<view class="b-top">
<view>春耕采购金额{{info.spring_subsidy_amount}}</view>
<view>剩余金额{{info.balance}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
<view class="text">{{info.spring_subsidy_rate}}%</view>
</view>
</view>
<view v-if="info.spring_subsidy_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card">
<view class="b-top">
<view>销售目标金额{{info.sale_target}}</view>
<view>当前进度{{info.sale_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.sale_finish_rate}%`}">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
<view class="text">{{info.sale_finish_rate}}%</view>
</view>
</view>
<view v-if="info.sale_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card">
<view class="b-top">
<view>里海云仓采购目标金额{{info.official_purchase_target}}</view>
<view>当前进度{{info.official_purchase_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.official_purchase_finish_rate}%`}">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
<view class="text">{{info.official_purchase_finish_rate}}%</view>
</view>
</view>
<view v-if="info.official_purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card">
<view class="b-top">
<view>其他采购目标金额{{info.purchase_target}}</view>
<view>当前进度{{info.purchase_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
<view class="text">{{info.purchase_finish_rate}}%</view>
</view>
</view>
<view v-if="info.purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-tips" v-if="type==1">
*春耕采购余额使用完采购金额和销售金额达到后才可获取补贴
</view>
<view class="b-list" v-else>
<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">{{ 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 class="page">
<view class="bg">
<image mode="widthFix" style="width: 100%;"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/87960202402291430371479.webp"></image>
<view class="card" :class="{card2:type==2}">
<view class="c-head">
<view :class="type==2?'left':'right'" @click="changeType(2)">增收销售补贴</view>
<!-- <view :class="type==1?'left':'right'" @click="changeType(1)">春耕采购补贴</view> -->
<view v-if="mer_info.type_code=='PersonalStore'" :class="type==1?'left':'right'"
@click="changeType(1)">春耕采购补贴</view>
<view v-else></view>
</view>
<view class="c-body-title">
<view>补贴金额</view>
<view>补贴状态</view>
</view>
<view class="c-body-text">
<view class="price">{{info.subsidy_amount}}</view>
<view>
<text v-if="info.subsidy_status==2" class="price">{{info.subsidy_status_name}}</text>
<text v-else>{{info.subsidy_status_name}}</text>
</view>
</view>
</view>
<view class="bottom"></view>
</view>
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_title">补贴进度</view>
<view class="body">
<view class="b-card" v-if="type==1">
<view class="b-top">
<view>春耕采购金额{{info.spring_subsidy}}</view>
<view>剩余金额{{info.balance}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.spring_subsidy_rate}%`}">
<image class="image"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.spring_subsidy_rate}}%</view>
</view>
</view>
<view v-if="info.spring_subsidy_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card">
<view class="b-top">
<view>销售目标金额{{info.sale_target}}</view>
<view>当前进度{{info.sale_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.sale_finish_rate}%`}">
<image class="image"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.sale_finish_rate}}%</view>
</view>
</view>
<view v-if="info.sale_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card" v-if="type==1">
<view class="b-top">
<view>采购目标金额{{info.purchase_target}}</view>
<view>当前进度{{info.purchase_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}">
<image class="image"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.purchase_finish_rate}}%</view>
</view>
</view>
<view v-if="info.purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<block v-else>
<view class="b-card">
<view class="b-top">
<view>里海云仓采购目标金额{{info.official_purchase_target}}</view>
<view>当前进度{{info.official_purchase_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.official_purchase_finish_rate}%`}">
<image class="image"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.official_purchase_finish_rate}}%</view>
</view>
</view>
<view v-if="info.official_purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card">
<view class="b-top">
<view>其他采购目标金额{{info.purchase_target}}</view>
<view>当前进度{{info.purchase_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}">
<image class="image"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.purchase_finish_rate}}%</view>
</view>
</view>
<view v-if="info.purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
</block>
<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>
<script>
import { getSubsidy, getSubsidyRecord } from "@/api/admin.js"
export default {
data() {
return {
type: 2,
mer_id: '',
info: {},
list: [],
where:{
page: 1,
limit: 20,
type: 2
},
mer_info:{
type_code: ''
}
}
},
onLoad() {
let user = this.$store.state.app.userInfo;
if(typeof user == 'string') user = JSON.parse(user);
this.mer_info.type_code = user.mer_info.type_code;
this.mer_id = user.service.mer_id;
this.getSubsidy();
if(this.type==2)this.getSubsidyRecord();
},
onShow() {},
methods: {
back() {
uni.navigateBack();
},
changeType(type){
this.type = type;
this.getSubsidy();
if(type==2)this.getSubsidyRecord();
},
getSubsidy(){
if(!this.mer_id) return ;
getSubsidy(this.mer_id, {
type: this.type
}).then(res=>{
this.info = res.data;
})
},
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);
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
import {
getSubsidy,
getSubsidyRecord,
couponReceive,
couponRefuse
} from "@/api/admin.js"
import {
Toast
} from "../../libs/uniApi";
export default {
data() {
return {
type: 2,
mer_id: '',
info: {},
list: [],
send_status_cn: '1',
send_id: 0,
reason: '',
where: {
page: 1,
limit: 20,
type: 2
},
mer_info: {
type_code: ''
}
}
},
onLoad() {
let user = this.$store.state.app.userInfo;
if (typeof user == 'string') user = JSON.parse(user);
this.mer_info.type_code = user.mer_info.type_code;
this.mer_id = user.service.mer_id;
this.getSubsidy();
this.getSubsidyRecord();
},
onShow() {},
methods: {
showPopup(type, send_id) {
this.send_status_cn = type;
this.send_id = send_id;
if (type == 2) Toast('已经领取过啦');
else this.$refs.pupRef.open();
},
closePopup() {
this.$refs.pupRef.close();
},
back() {
uni.navigateBack();
},
changeType(type) {
this.type = type;
this.where.type = type;
this.getSubsidy();
this.getSubsidyRecord();
},
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>
<style lang="scss">
page{
background-color: #fff;
}
.page {
position: relative;
font-size: 28rpx;
background-color: #fff;
}
page {
background-color: #fff;
}
.bg {
position: absolute;
top: 0;
left: 0;
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;
}
}
.page {
position: relative;
font-size: 28rpx;
background-color: #fff;
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.bg {
position: absolute;
top: 0;
left: 0;
width: 750rpx;
height: 530rpx;
.bg_title {
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 50%;
transform: translate(-50%);
}
.body{
padding: 530rpx 30rpx 30rpx 30rpx;
.b-card{
padding-bottom: 30rpx;
.b-top{
display: flex;
justify-content: space-between;
font-size: 26rpx;
}
.b-bottom{
display: flex;
justify-content: space-between;
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;
}
.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;
}
}
}
}
}
.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 {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.bg_title {
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 50%;
transform: translate(-50%);
}
.body {
padding: 530rpx 30rpx 30rpx 30rpx;
.b-card {
padding-bottom: 30rpx;
.b-top {
display: flex;
justify-content: space-between;
font-size: 26rpx;
}
.b-bottom {
display: flex;
justify-content: space-between;
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>

View File

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

View File

@ -137,7 +137,7 @@
<view class="info" v-if="item.cart_info && item.cart_info.product">
<view class="name line2">{{item.cart_info.product.store_name}}</view>
<view class="info_sku" v-if="item.cart_info && item.cart_info.productAttr">{{item.cart_info.productAttr.sku}}</view>
<view class="info_price" v-if="item.cart_info && item.cart_info.productAttr"><text>{{item.cart_info.productAttr.procure_price}}</text></view>
<view class="info_price" v-if="item.cart_info && item.cart_info.productAttr"><text>{{item.cart_info.productAttr.wholesale_price}}</text></view>
<view class='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(item)'>-</view>
<view class='num'>{{item.split_num}}</view>
@ -161,7 +161,7 @@
<view class="info_sku" v-if="item.cart_info && item.cart_info.productAttr">{{item.cart_info.productAttr.sku}}</view>
</view>
<view class="pro_price" v-if="item.cart_info && item.cart_info.productAttr">
<view class="info_price">{{item.cart_info.productAttr.procure_price}}</view>
<view class="info_price">{{item.cart_info.productAttr.wholesale_price}}</view>
<view class="info_num">x{{item.product_num}}</view>
<view class="refund_num" v-if="item.product_num-item.refund_num>0">{{item.product_num-item.refund_num}}{{item.is_refund==1?'退款中' : item.is_refund==2 ? '已退款' : item.is_refund==3?'全部退款':''}}</view>
</view>

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");
this.getOrderStatistics(this.mer_id);
this.getList(this.mer_id)
this.purchaseOrderList(this.mer_id)
// this.purchaseOrderList(this.mer_id)
},
methods: {
getIndex: function() {

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@
</view>
</view>
<view class="money">
<view class="x-money">{{ item.cart_info.productAttr.procure_price }}</view>
<view class="x-money">{{ item.cart_info.productAttr.wholesale_price }}</view>
<view class="num">x{{ item.product_num }}
<text class="font-color refund_num" v-if="item.product_num-item.refund_num>0">(-{{item.product_num-item.refund_num}})</text>
</view>

View File

@ -11,6 +11,9 @@
<view>
<scroll-view class="nav acea-row" scroll-x="true" style="white-space: nowrap; display: flex;"
scroll-with-animation show-scrollbar="true">
<view class="item" :class="where.status == '' ? 'on' : ''" @click="changeStatus('')">
全部
</view>
<view class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">
待付款
</view>
@ -32,11 +35,14 @@
<view class="item" :class="where.status == 6 ? 'on' : ''" @click="changeStatus(6)">
退款
</view>
<view class="item" :class="where.status == 7 ? 'on' : ''" @click="changeStatus(7)">
暂存
</view>
</scroll-view>
</view>
</view>
<view v-if="where.status == 6" class="list">
<view v-if="(where.status == 6)" class="list">
<view class="item" v-for="(item, index) in list" :key="index">
<view class="order-num acea-row row-middle">
<text v-if="item.order && item.order.activity_type != 0" class="activity_type">
@ -50,7 +56,8 @@
<view v-if="val.product" class="goods acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="val.product.cart_info.productAttr.image||val.product.cart_info.product.image" />
<image
:src="val.product.cart_info.productAttr.image||val.product.cart_info.product.image" />
</view>
<view class="text acea-row row-between row-column">
<view class="info line1 refund-info">
@ -93,15 +100,116 @@
</view>
</view>
</view>
<view v-else-if="(where.status == 7)" class="list">
<block v-for="(item, index) in list" :key="index">
<view class="item">
<view class="order-num acea-row row-middle">
暂存单号{{ item.order_sn }}
<text class="time">暂存时间{{ item.c_time }}</text>
<text class="fk_status" v-if="item.order_status == 0">未支付</text>
<text class="fk_status" v-if="item.order_status == 1">
<view>待核销</view>
<view style="color: #FFE4BF;"
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status != 3">
退款中</view>
</text>
<text class="fk_status" v-if="item.order_status == 2">
<view>待发货</view>
<view style="color: #FFE4BF;"
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status != 3">
退款中</view>
</text>
<text class="fk_status" v-if="item.order_status == 3">
<view>待收货</view>
<view style="color: #FFE4BF;"
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status != 3">
退款中</view>
</text>
<text class="fk_status" v-if="item.order_status == 4">
<view>待评价</view>
<view style="color: #FFE4BF;"
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status != 3">
退款中</view>
</text>
<text class="fk_status" v-if="item.order_status == 5">
<view>交易完成</view>
<view style="color: #FFE4BF;"
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status != 3">
退款中</view>
</text>
<text class="fk_status" v-if="item.refund_mark == 1">
<view>退款成功</view>
</text>
</view>
<view class="pos-order-goods" v-for="(val, key) in item.storeOrder.orderProduct" :key="key"
@click="toDetail(item)">
<view class="goods acea-row row-between-wrapper" v-if="val.cart_info">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="val.cart_info.product.image || val.cart_info.productAttr.image" />
</view>
<view class="text acea-row row-between row-column">
<view class="info line1 refund-info">
{{ val.cart_info.product.store_name }}
</view>
<view class="attr" v-if="val.cart_info.productAttr.sku">
{{ val.cart_info.productAttr.sku }}
</view>
<view class="y-money refund-y-money">
价格{{ val.product_price}}
</view>
</view>
</view>
<view class="money refund-money">
<view class="num">x{{ val.product_num }}</view>
</view>
</view>
</view>
<view class="public-total" v-if="item.refund_mark == 1">
{{ item.total_num }}件商品
已退款
<span class="money" style="margin-right: 30rpx;">{{ item.pay_price }}</span> (邮费
¥{{ item.pay_postage}})
</view>
<view class="public-total" v-else>
{{ item.total_num }}件商品
<span v-if="item.order_status < 1"></span>
<span v-else></span>
支付
<span class="money" style="margin-right: 30rpx;">{{ item.pay_price }}</span> (邮费
¥{{ item.pay_postage}})
</view>
<view class="operation acea-row row-between-wrapper">
<view class="more"></view>
<view class="acea-row row-middle">
<view class="bnt" @click="modify(item, 1)">订单备注</view>
<view class="bnt bnt_color" v-if="item.order_status == 1" @click="toDetail(item)">去核销</view>
<view class="bnt bnt_color" v-if="item.order_status == 2" @click="toPostagequ(item)">去发货
</view>
<navigator class="bnt bnt_color"
v-if="!!item.refund_order_id && item.refund_status != -1 && item.refund_status!=3"
:url="'/pages/admin/orderRefund/index?id='+item.refund_order_id+'&merId='+merId">
立即退款
</navigator>
</view>
</view>
</view>
</block>
</view>
<view v-else class="list">
<view class="item" v-for="(item, index) in list" :key="index">
<view class="order-num acea-row row-middle">
<text class="cloud-tag" v-if="item.source==103">云商品</text>
<text class="cloud-tag" v-if="item.source==103">云商品</text>
<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 ? '套餐' :'' }}
</text>
订单号{{ item.order_sn }}
<text class="time">下单时间{{ item.create_time }}</text>
</text>
订单号{{ item.order_sn }}
<text class="time">下单时间{{ item.create_time }}</text>
<text class="order-status"
v-if="item.refunding != 0 && where.status != 1">{{item.refunding==1 ? '退款中' : item.refunding==2 ? '部分退款' : '全部退款'}}</text>
</view>
@ -120,9 +228,10 @@
<view class="attr" v-if="val.cart_info.productAttr.sku">
{{ val.cart_info.productAttr.sku }}
</view>
<view class="attr" @click.stop="showBarCode(val.cart_info.productAttr.product)" v-if="val.cart_info.productAttr.product&&val.cart_info.productAttr.product.bar_code">
商品条码: {{ val.cart_info.productAttr.product.bar_code }}
</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">
商品条码: {{ val.cart_info.productAttr.product.bar_code }}
</view>
</view>
</view>
<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>
</view>
<!-- <view v-if="item.order_type == 1" class="cancellate">
<text class="uncancell">1件已核销</text>
<text class="uncancell">1件已退款</text>
<text class="cancelled">1件退款中</text>
</view> -->
</view>
</view>
<view class="public-total" v-if="item.pay_type !== 8">
{{ item.total_num }}件商品
@ -174,14 +277,16 @@
一键改价
</view>
<view class="bnt" @click="modify(item, 1)">订单备注</view>
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&(item.activity_type==98||item.activity_type==99)"
<view class="bnt bnt_color"
v-if="where.status == 2 && item.order_type == 0&&(item.activity_type==98||item.activity_type==99)"
@click="toPostage(item)">去发货
</view>
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&& item.order_type !=1 &&item.activity_type==0"
<view class="bnt bnt_color"
v-if="(where.status == 2 || (item.order_type === 0 && item.status === 0 && item.paid == 1)) && item.order_type == 0 && item.order_type !=1 && item.activity_type==0"
@click="toPostagequ(item)">去发货
</view>
<view class="bnt bnt_color"
v-if="(where.status == 2 && item.order_type == 1) || where.is_verify == 1"
v-if="((item.order_type == 1 && item.status === 0 && item.paid == 1) && item.order_type == 1) || where.is_verify == 1"
@click="toDetail(item)">去核销</view>
</view>
</view>
@ -192,8 +297,10 @@
<image src="/static/images/no_thing.png" mode="widthFix"></image>
<view class="nothing_text">暂无订单~</view>
</view>
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)"
v-on:savePrice="savePrice" :status="status"></PriceChange>
<view>
<view class="priceChange" :class="refundMark === true ? 'on' : ''">
<view class="priceTitle">
@ -209,18 +316,53 @@
</view>
<view class="mask" @touchmove.prevent v-show="refundMark === true"></view>
</view>
<view class="form-wrap" v-if="popUpShow"
style="position: fixed;z-index: 11; top: 0;left: 0;width:100vw;height:100vh;background:rgba(0,0,0,.4);display: flex;align-items: center;justify-content: center;">
<view class="form">
<view class="form-item">
<view class="form-item-label">送货人姓名</view>
<view class="form-item-val">
<u-input v-model="deliveryForm.delivery_name" placeholder="请输入送货人姓名"
placeholderStyle="color:#999;font-size:26rpx;" border="surround"></u-input>
</view>
</view>
<view class="form-item">
<view class="form-item-label">送货人电话</view>
<view class="form-item-val">
<u-input v-model="deliveryForm.delivery_id" placeholder="请输入送货人电话"
placeholderStyle="color:#999;font-size:26rpx;" border="surround"></u-input>
</view>
</view>
<view class="form-item">
<view class="form-item-label">备注</view>
<view class="form-item-val">
<u-input v-model="deliveryForm.remark" placeholder="请输入备注"
placeholderStyle="color:#999;font-size:26rpx;"></u-input>
</view>
</view>
<view class="form-btn">
<view class="form-btn-cancel" @click="popUpShow = false">取消</view>
<view class="form-btn-confirm" @click="handleSubmitDelivery">确认</view>
</view>
</view>
</view>
<!--
<u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
<view style="text-align: center;margin-top: 30rpx;">
请把二维码展示给取货人员
</view>
<view style="padding: 28.07rpx;">
<image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image>
</view>
</u-popup>
<view class="bar-code" v-show="showBar" @click="showBar=false">
<barcode ref="code"></barcode>
</view>
</u-popup> -->
<view class="bar-code" v-show="showBar" @click="showBar=false">
<barcode ref="code"></barcode>
</view>
</view>
</template>
@ -244,7 +386,9 @@
refundOrderReceive,
setRefundMark,
postconfirm,
logisticsCode
logisticsCode,
delivery,
lockList
} from "@/api/admin";
import Loading from '@/components/Loading/index'
@ -252,6 +396,9 @@
import {
isMoney
} from '@/utils/validate.js'
import {
Toast
} from "../../../libs/uniApi";
export default {
name: "AdminOrderList",
components: {
@ -260,7 +407,14 @@
},
data() {
return {
showBar: false,
//
deliveryForm: {
delivery_name: '',
delivery_id: '',
delivery_type: 2,
mer_id: ''
},
showBar: false,
current: "",
change: false,
refundMark: false,
@ -271,7 +425,7 @@
status: 1,
search_info: '',
product_type: '',
pay_time: null,
pay_time: null,
},
list: [],
loaded: false,
@ -293,32 +447,55 @@
that.init();
}
},
},
onLoad(option) {
this.where.product_type = uni.getStorageSync("PRODUCT_TYPE") ?? ""
this.where.status = option.types
if (option.types == 99) {
delete this.where.status;
this.where.is_verify = 1;
}
if (option.types == 88) {
this.where.status = 7;
}
this.current = "";
this.merId = option.merId;
if(option.pay_time){
this.where.pay_time = option.pay_time;
}
if (option.pay_time) {
this.where.pay_time = option.pay_time;
}
this.getIndex();
},
onPullDownRefresh() {
this.loaded = false;
this.where.page = 1;
this.list = [];
this.getIndex();
},
methods: {
//
statusParse(item) {
const status = item.order[0].status;
if (status == 0) return "待发货";
if (status == 1) return "待收货";
if (status == 2) return "待评价";
if (status == 3) return "已完成";
},
//
popUpClose() {
this.popUpShow = false
},
showBarCode(val){
this.showBar = true
this.$refs['code'].init({
name: val.store_name,
code: val.bar_code
});
},
showBarCode(val) {
this.showBar = true
this.$refs['code'].init({
name: val.store_name,
code: val.bar_code
});
},
//
tongyi(id, number) {
let data = {
@ -342,33 +519,40 @@
},
handleSearch() {
this.loaded = false;
this.where.page = 1;
this.list = [];
this.where.page = 1;
this.list = [];
this.getIndex();
},
//
getIndex() {
let that = this;
// console.log(that.merId)
if (that.loading || that.loaded) return;
that.loading = true;
if (that.where.status == 6) {
getRefundOrderList(that.where, that.merId).then(
res => {
that.loading = false;
that.loaded = res.data.list.length < that.where.limit;
getRefundOrderList(that.where, that.merId).then(res => {
that.loading = false;
that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1;
},
err => {
that.$util.Tips({
title: err
});
}
);
that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1;
}, err => {
that.$util.Tips({
title: err
});
});
} else if (that.where.status == 7) {
lockList(that.where, that.merId).then(res => {
that.loading = false;
that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1;
uni.stopPullDownRefresh();
}, err => {
uni.stopPullDownRefresh();
that.$util.Tips({
title: err
});
})
} else {
getOrderList(that.where, that.merId).then(
res => {
@ -376,11 +560,10 @@
that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1;
// console.log(that.list)
// console.log(that.list);
uni.stopPullDownRefresh();
},
err => {
uni.stopPullDownRefresh();
that.$util.Tips({
title: err
});
@ -402,12 +585,12 @@
if (val != 'verify') {
if (this.where.status != val) {
this.where.status = val;
this.where.search_info=''
this.where.search_info = ''
delete this.where.is_verify;
this.init();
}
} else {
this.where.search_info=''
this.where.search_info = ''
this.where.is_verify = 1;
delete this.where.status;
this.init();
@ -434,21 +617,18 @@
}
setRefundMark(that.merId, that.refundInfo.refund_order_id, {
mer_mark: that.refundInfo.mer_mark
}).then(
res => {
that.refundMark = false;
this.$util.Tips({
title: res.message,
icon: 'success'
})
},
err => {
that.refundMark = false;
that.$util.Tips({
title: err
});
}
);
}).then(res => {
that.refundMark = false;
this.$util.Tips({
title: res.message,
icon: 'success'
})
}, err => {
that.refundMark = false;
that.$util.Tips({
title: err
});
});
},
changeclose: function(msg) {
this.change = msg;
@ -477,16 +657,55 @@
}
})
},
//
toPostagequ(item) {
this.popUpShow = true
logisticsCode(item.order_id).then(res => {
//
handleSubmitDelivery(item) {
if (!this.deliveryForm.delivery_name) return this.$util.Tips({
title: "请输入送货人姓名!"
})
if (!uni.$u.test.mobile(this.deliveryForm.delivery_id)) {
return uni.showToast({
title: "手机号输入有误!",
icon: "none"
});
}
let that = this;
delivery(this.deliveryForm).then(res => {
if (res.status == 200) {
this.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) {
let that = this;
if (item.refunding != 0) {
@ -572,10 +791,19 @@
}
},
toDetail(item) {
let order_id, mer_id;
if (item.order_id) {
order_id = item.order_id;
mer_id = item.mer_id;
} else {
order_id = item.order_id;
mer_id = item.mer_id;
}
uni.navigateTo({
url: `/pages/admin/orderDetail/index?id=${item.order_id}&mer_id=${item.mer_id}`
url: `/pages/admin/orderDetail/index?id=${order_id}&mer_id=${mer_id}`
})
},
toRefundDetail(item) {
uni.navigateTo({
@ -590,11 +818,72 @@
</script>
<style lang="scss">
.form {
position: relative;
z-index: 11;
padding: 40rpx 60rpx;
background-color: #fff;
border-radius: 20rpx;
.form-item {
display: flex;
align-items: center;
.form-item-label {
width: 140rpx;
font-size: 28rpx;
color: #333;
font-weight: bold;
margin-right: 20rpx;
}
.form-item-val {
flex: 1;
}
}
.form-btn {
display: flex;
justify-content: center;
margin-top: 50rpx;
.form-btn-cancel {
width: 83px;
height: 60rpx;
line-height: 60rpx;
border-radius: 30rpx;
text-align: center;
color: #2291F8;
border: 2rpx solid #2291F8;
margin-right: 40rpx;
}
.form-btn-confirm {
width: 83px;
height: 60rpx;
line-height: 60rpx;
background: linear-gradient(90deg, #2291F8 0%, #1CD1DC 100%);
border-radius: 30rpx;
text-align: center;
color: #fff;
font-size: 28rpx;
}
.form-btn-cancel:active {
background: rgba(209, 220, 255, .3);
}
.form-btn-confirm:active {
opacity: .8;
}
}
}
.pos-order-list .top-header {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
z-index: 10;
width: 100%;
background-color: #fff;
}
@ -676,6 +965,13 @@
position: relative;
}
.fk_status {
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
}
.pos-order-list .list .item .order-status {
color: #ff9600;
position: absolute;
@ -1017,25 +1313,27 @@
flex: 1;
}
}
.bar-code{
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100vw;
height: 100vh;
background-color: rgba(0,0,0,0.2);
display: flex;
align-items: center;
justify-content: center;
}
.cloud-tag{
font-size: 20rpx;
padding: 2rpx 5rpx;
font-weight: 400;
background-color: #ff4c3c;
border-radius: 8rpx;
margin-right: 6rpx;
color: #fff;
}
.bar-code {
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
justify-content: center;
}
.cloud-tag {
font-size: 20rpx;
padding: 2rpx 5rpx;
font-weight: 400;
background-color: #ff4c3c;
border-radius: 8rpx;
margin-right: 6rpx;
color: #fff;
}
</style>

View File

@ -125,7 +125,7 @@
</view>
</view>
<view class="money">
<view class="x-money">{{ val.cart_info.productAttr.procure_price }}</view>
<view class="x-money">{{ val.cart_info.productAttr.wholesale_price }}</view>
<view class="num">x{{ val.product_num }}</view>
<!-- <view class="refund-num" v-if="val.product_num-val.refund_num>0">{{val.product_num-val.refund_num}}{{val.is_refund==1?'退款中' : val.is_refund==2 ? '已退款' : val.is_refund==3?'全部退款':''}}</view> -->
</view>

View File

@ -5,7 +5,7 @@
<view class="state" v-else-if="orderInfo.status == -1">审核未通过</view>
<view class="state" v-else-if="orderInfo.status == 1">待退货</view>
<view class="state" v-else-if="orderInfo.status == 2">待收货</view>
<view class="state" v-else-if="orderInfo.status == 3">已退款</view>
<view class="state" v-else-if="orderInfo.status == 3">已退款</view>
</view>
<view v-if="orderInfo.refund_type == 2 && orderInfo.status > 0" class="orderingUser acea-row row-middle">
<span class="iconfont icon-yonghu2"></span>{{ orderInfo.user && orderInfo.user.nickname }}
@ -16,7 +16,8 @@
</view>
<view>{{ orderInfo.mer_delivery_address }}</view>
<!-- #ifdef H5 -->
<button class="copy copy-data" :data-clipboard-text="'收货人姓名'+orderInfo.mer_delivery_user+'\n收货人电话'+ orderInfo.phone+'\n收货人地址'+orderInfo.mer_delivery_address">复制</button>
<button class="copy copy-data"
:data-clipboard-text="'收货人姓名:'+orderInfo.mer_delivery_user+'\n收货人电话'+ orderInfo.phone+'\n收货人地址'+orderInfo.mer_delivery_address">复制</button>
<!-- #endif -->
<!-- #ifdef MP -->
<button class="copy" @tap="copyText">复制</button>
@ -26,7 +27,9 @@
<image :src="`${domain}/static/images/line.jpg`" />
</view>
<view class="pos-order-goods">
<navigator :url="`/pages/goods_details/index?id=${item.product.cart_info.product.product_id}`" hover-class="none" class="goods acea-row row-between-wrapper" v-for="(item, index) in orderInfo.refundProduct" :key="index">
<navigator :url="`/pages/goods_details/index?id=${item.product.cart_info.product.product_id}`"
hover-class="none" class="goods acea-row row-between-wrapper"
v-for="(item, index) in orderInfo.refundProduct" :key="index">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.product.cart_info.product.image || item.product.cart_info.product.image" />
@ -71,7 +74,7 @@
</view>
<view class="item acea-row row-between">
<view>退款原因</view>
<view class="conter">{{ orderInfo.refund_message }}</view>
<view class="conter">{{ getRightText(orderInfo.refund_message) }}</view>
</view>
<view class="item acea-row row-between">
<view>备注信息</view>
@ -90,26 +93,25 @@
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
<view class="more"></view>
<view class="bnt cancel" @click="modify('1')">订单备注</view>
<navigator class="bnt cancel" v-if="orderInfo.status == 2" :url="'/pages/users/goods_logistics/index?refundId='+orderInfo.refund_order_id+'&merId='+mer_id">查看物流</navigator>
<navigator class="bnt cancel" v-if="orderInfo.status == 2"
:url="'/pages/users/goods_logistics/index?refundId='+orderInfo.refund_order_id+'&merId='+mer_id">查看物流
</navigator>
<view class="bnt delivery" v-if="orderInfo.status == 2" @click="confirmOrder">确认收货</view>
</view>
<view>
<view class="priceChange" :class="change === true ? 'on' : ''">
<view class="priceTitle">
订单备注
<span class="iconfont icon-guanbi" @click="changeclose"></span>
</view>
<view class="listChange">
<textarea
placeholder="请填写备注信息..."
v-model="orderInfo.mer_mark"
></textarea>
</view>
<view class="modify" @click="save">
确认提交
</view>
</view>
<view class="mask" @touchmove.prevent v-show="change === true"></view>
<view class="priceChange" :class="change === true ? 'on' : ''">
<view class="priceTitle">
订单备注
<span class="iconfont icon-guanbi" @click="changeclose"></span>
</view>
<view class="listChange">
<textarea placeholder="请填写备注信息..." v-model="orderInfo.mer_mark"></textarea>
</view>
<view class="modify" @click="save">
确认提交
</view>
</view>
<view class="mask" @touchmove.prevent v-show="change === true"></view>
</view>
</view>
</template>
@ -132,12 +134,15 @@
refundOrderReceive,
setRefundMark
} from "@/api/admin";
import { isMoney } from '@/utils/validate.js'
import { HTTP_REQUEST_URL } from '@/config/app';
import {
isMoney
} from '@/utils/validate.js'
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default {
name: "AdminOrder",
components: {
},
components: {},
props: {},
data: function() {
return {
@ -155,7 +160,7 @@
payType: "",
types: "",
clickNum: 1,
goname:'',
goname: '',
domain: HTTP_REQUEST_URL,
};
},
@ -179,19 +184,27 @@
var clipboard = new ClipboardJS('.copy-data');
clipboard.on('success', function(e) {
self.$util.Tips({
title:'复制成功'
title: '复制成功'
})
});
clipboard.on('error', function(e) {
self.$util.Tips({
title:'复制失败'
title: '复制失败'
})
});
});
// #endif
},
methods: {
getRightText(str) {
const index = str.indexOf("@");
if (index !== -1) {
return str.substring(index + 1);
} else {
return str
}
},
more: function() {
this.order = !this.order;
},
@ -203,7 +216,7 @@
this.change = false;
},
//
loookImg(item,index){
loookImg(item, index) {
uni.previewImage({
urls: this.orderInfo.pics,
current: this.orderInfo.pics[index]
@ -216,38 +229,37 @@
urls: list
});
},
copyText: function (e) {
// var copy = e.currentTarget.dataset.copy; //data-copy
let arr = [
{
name: "收货人姓名",
value: this.orderInfo.real_name
},
{
name: "收货人电话",
value: this.orderInfo.user_phone
},
{
name: "收货人地址",
value: this.orderInfo.user_address
}
]
wx.setClipboardData({
data: `${arr.map(item =>`${item.name}: ${item.value}`).join("\n")}`,
success: function (res) {
wx.getClipboardData({
success: function (res) {
wx.showToast({
title: '复制成功'
})
}
})
}
})
copyText: function(e) {
// var copy = e.currentTarget.dataset.copy; //data-copy
let arr = [{
name: "收货人姓名",
value: this.orderInfo.real_name
},
{
name: "收货人电话",
value: this.orderInfo.user_phone
},
{
name: "收货人地址",
value: this.orderInfo.user_address
}
]
wx.setClipboardData({
data: `${arr.map(item =>`${item.name}: ${item.value}`).join("\n")}`,
success: function(res) {
wx.getClipboardData({
success: function(res) {
wx.showToast({
title: '复制成功'
})
}
})
}
})
},
getIndex: function() {
let that = this;
getRefundOrderDetail(that.mer_id,that.order_id).then(
getRefundOrderDetail(that.mer_id, that.order_id).then(
res => {
that.orderInfo = res.data;
},
@ -269,7 +281,7 @@
content: '为保障权益,请收到货确认无误后,再确认收货',
success: function(res) {
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({
title: '操作成功',
icon: 'success'
@ -286,14 +298,16 @@
})
},
//
save(){
save() {
let that = this;
if (!that.orderInfo.mer_mark) {
return this.$util.Tips({
title: '请输入备注'
})
}
setRefundMark(that.mer_id,that.orderInfo.refund_order_id,{ mer_mark: that.orderInfo.mer_mark }).then(
setRefundMark(that.mer_id, that.orderInfo.refund_order_id, {
mer_mark: that.orderInfo.mer_mark
}).then(
res => {
that.change = false;
this.$util.Tips({
@ -318,7 +332,7 @@
}
});
},
copyData(id){
copyData(id) {
uni.setClipboardData({
data: id,
success: function() {
@ -348,36 +362,44 @@
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
}
.pos-order-details .header .state {
font-size: 36upx;
color: #fff;
}
.pos-order-details .header .data {
margin-left: 35upx;
font-size: 28upx;
}
.pos-order-details .header .data .order-num {
font-size: 30upx;
margin-bottom: 8upx;
}
.pos-order-details .remarks {
width: 100%;
height: 86upx;
background-color: #fff;
padding: 0 30upx;
}
.pos-order-details .remarks .iconfont {
font-size: 40upx;
color: #2a7efb;
}
.pos-order-details .remarks input {
width: 630upx;
height: 100%;
font-size: 30upx;
}
.pos-order-details .remarks input::placeholder {
color: #666;
}
.pos-order-details .orderingUser {
font-size: 26upx;
color: #282828;
@ -387,17 +409,21 @@
margin-top: 16upx;
border-bottom: 1px solid #f5f5f5;
}
.pos-order-details .orderingUser .iconfont {
font-size: 40upx;
color: #2a7efb;
margin-right: 15upx;
}
.pos-order-details .address {
margin-top: 0;
}
.pos-order-details .pos-order-goods {
margin-top: 17upx;
}
.pos-order-details .footer .more {
font-size: 27upx;
color: #aaa;
@ -408,11 +434,13 @@
margin-right: 25upx;
position: relative;
}
.pos-order-details .footer .delivery {
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
}
.pos-order-details .footer .more .order .arrow {
width: 0;
height: 0;
@ -423,6 +451,7 @@
left: 15upx;
bottom: -18upx;
}
.pos-order-details .footer .more .order .arrow:before {
content: '';
width: 0;
@ -434,6 +463,7 @@
left: -10upx;
bottom: 0;
}
.pos-order-details .footer .more .order {
width: 200upx;
background-color: #fff;
@ -443,68 +473,84 @@
top: -200upx;
z-index: 9;
}
.pos-order-details .footer .more .order .item {
height: 77upx;
line-height: 77upx;
}
.pos-order-details .footer .more .order .item~.item {
border-top: 1px solid #f5f5f5;
}
.pos-order-details .footer .more .moreName {
width: 100%;
height: 100%;
}
.order-details .header {
padding: 0 30upx;
height: 150upx;
}
.order-details .header.on {
background-color: #666 !important;
}
.order-details .header .pictrue {
width: 110upx;
height: 110upx;
}
.order-details .header .pictrue image {
width: 100%;
height: 100%;
}
.order-details .header .data {
color: rgba(255, 255, 255, 0.8);
font-size: 24upx;
margin-left: 27upx;
}
.order-details .header.on .data {
margin-left: 0;
}
.order-details .header .data .state {
font-size: 30upx;
font-weight: bold;
color: #fff;
margin-bottom: 7upx;
}
.order-details .nav {
background-color: #fff;
font-size: 26upx;
color: #282828;
padding: 25upx 0;
}
.order-details .nav .navCon {
padding: 0 40upx;
}
.order-details .nav .navCon .on {
font-weight: bold;
color: #e93323;
}
.order-details .nav .progress {
padding: 0 65upx;
margin-top: 10upx;
}
.order-details .nav .progress .line {
width: 100upx;
height: 2upx;
background-color: #939390;
}
.order-details .nav .progress .iconfont {
font-size: 25upx;
color: #939390;
@ -515,6 +561,7 @@
text-align: center;
margin-right: 0 !important;
}
.order-details .address {
font-size: 26upx;
color: #868686;
@ -522,52 +569,64 @@
padding: 25upx 30upx 30upx 30upx;
position: relative;
}
.order-details .address .name {
font-size: 30upx;
color: #282828;
margin-bottom: 0.1rem;
}
.order-details .address .name .phone {
margin-left: 40upx;
}
.order-details .line {
width: 100%;
height: 3upx;
}
.order-details .line image {
width: 100%;
height: 100%;
display: block;
}
.order-details .wrapper {
background-color: #fff;
margin-top: 12upx;
padding: 30upx;
}
.order-details .wrapper .item {
font-size: 28upx;
color: #282828;
}
.order-details .wrapper .item~.item {
margin-top: 20upx;
}
.order-details .wrapper .item .conter {
color: #868686;
text-align: right;
}
.order-details .wrapper .item .virtual_image {
// text-align: left;
margin-left: 50rpx;
}
.order-details .wrapper .item .virtual_image .picture{
.order-details .wrapper .item .virtual_image .picture {
width: 106rpx;
height: 106rpx;
border-radius: 8rpx;
margin-right: 10rpx;
&:last-child{
&:last-child {
margin-right: 0;
}
}
.order-details .wrapper .item .conter .copy {
font-size: 20rpx;
color: #868686;
@ -581,7 +640,8 @@
justify-content: center;
border-radius: 16rpx;
}
.address .copy{
.address .copy {
font-size: 20rpx;
color: #868686;
border-radius: 3rpx;
@ -594,17 +654,20 @@
border-radius: 16rpx;
position: absolute;
right: 30rpx;
top: 20rpx;
top: 20rpx;
}
.order-details .wrapper .actualPay {
border-top: 1upx solid #eee;
margin-top: 30upx;
padding-top: 30upx;
}
.order-details .wrapper .actualPay .money {
font-weight: bold;
font-size: 30upx;
}
.order-details .footer {
width: 100%;
height: 100upx;
@ -615,6 +678,7 @@
padding: 0 30upx;
border-top: 1px solid #eee;
}
.order-details .footer .bnt {
width: auto;
height: 60upx;
@ -626,52 +690,65 @@
font-size: 27upx;
padding: 0 3%;
}
.order-details .footer .bnt.cancel {
color: #aaa;
border: 1px solid #ddd;
}
.order-details .footer .bnt.default {
color: #444;
border: 1px solid #444;
}
.order-details .footer .bnt~.bnt {
margin-left: 18upx;
}
.pos-order-goods {
padding: 0 30upx;
background-color: #fff;
}
.pos-order-goods .goods {
height: 185upx;
position: relative;
}
.pos-order-goods .goods~.goods {
border-top: 1px dashed #e5e5e5;
}
.pos-order-goods .goods .picTxt {
width: 515upx;
}
.pos-order-goods .goods .picTxt .pictrue {
width: 130upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 6upx;
}
.pos-order-goods .goods .picTxt .text {
width: 365upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .text .info {
font-size: 28upx;
color: #282828;
}
.pos-order-goods .goods .picTxt .text .attr {
font-size: 24upx;
color: #999;
}
.pos-order-goods .goods .money {
width: 164upx;
text-align: right;
@ -681,48 +758,117 @@
right: 0;
color: #999999;
}
.pos-order-goods .goods .money .refund_num{
.pos-order-goods .goods .money .refund_num {
display: inline-block;
margin-left: 10rpx;
}
.pos-order-goods .goods .x-money {
color: #FF9600;
}
.priceChange{position:fixed;width:580upx;background-color:#fff;border-radius:10upx;top:50%;left:50%;margin-left:-290upx;margin-top:-335upx;z-index:666;transition:all 0.3s ease-in-out 0s;transform: scale(0);opacity:0;}
.priceChange.on{opacity:1;transform: scale(1);}
.priceChange .priceTitle{background:url("~@/static/images/pricetitle.jpg") no-repeat;background-size:100% 100%;width:100%;height:160upx;border-radius:10upx 10upx 0 0;text-align:center;font-size:40upx;color:#fff;line-height:160upx;position:relative;}
.priceChange .priceTitle .iconfont{position:absolute;font-size:40upx;right:26upx;top:23upx;width:40upx;height:40upx;line-height:40upx;}
.priceChange .listChange{padding:0 40upx;}
.priceChange .listChange textarea{box-sizing: border-box;}
.priceChange .listChange .item{height:103upx;border-bottom:1px solid #e3e3e3;font-size:32upx;color:#333;}
.priceChange .modify{font-size:32upx;color:#fff;width:490upx;height:90upx;text-align:center;line-height:90upx;border-radius:45upx;background-color:#2291f8;margin:53upx auto;}
.priceChange .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;
.img-item{
.priceChange {
position: fixed;
width: 580upx;
background-color: #fff;
border-radius: 10upx;
top: 50%;
left: 50%;
margin-left: -290upx;
margin-top: -335upx;
z-index: 666;
transition: all 0.3s ease-in-out 0s;
transform: scale(0);
opacity: 0;
}
.priceChange.on {
opacity: 1;
transform: scale(1);
}
.priceChange .priceTitle {
background: url("~@/static/images/pricetitle.jpg") no-repeat;
background-size: 100% 100%;
width: 100%;
height: 160upx;
border-radius: 10upx 10upx 0 0;
text-align: center;
font-size: 40upx;
color: #fff;
line-height: 160upx;
position: relative;
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;
&:nth-child(4n){
margin-right: 0;
}
image{
.img-item {
position: relative;
width: 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
v-if="item.msn_type === 6 && item.refundOrder && item.refundOrder.refund_order_id"
open-type="navigate"
:url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
:url="'/pages/admin/refundDetail/index?id='+item.refundOrder.refund_order_id + '&mer_id=' + item.mer_id">
<div class="broadcast-details_num">
<span>退款单号{{ item.refundOrder.refund_order_sn }}</span>
</div>
@ -53,7 +53,8 @@
</div>
<div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit">
{{val.product.cart_info.product.store_name}}</div>
{{val.product.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic">
{{ item.refundOrder.refund_price }}
</div>
@ -77,7 +78,7 @@
</div>
<navigator
:url="'/pages/admin/orderDetail/index?id='+item.orderInfo.order_id+'&mer_id='+item.orderInfo.mer_id"
open-type="open-type" class="conter acea-row row-middle">
class="conter acea-row row-middle">
<div class="broadcast-details_order noPad"
v-for="(val, inx) in item.orderInfo.orderProduct" :key="val.id">
<div class="broadcast-details_box noPad" v-if="inx == 0">
@ -89,7 +90,8 @@
</div>
<div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div>
{{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }}
</div>
@ -101,7 +103,7 @@
<!--商品链接-->
<div class="conter acea-row row-middle"
v-if="item.msn_type === 4 && item.product">
<div class=" noPad">
<div class="noPad">
<navigator class="acea-row row-column-around noPad"
v-if="item.product.product_id"
:url="`/pages/goods_details/index?id=${item.product.product_id}`"
@ -109,13 +111,26 @@
<div class="broadcast_details_img_no">
<image :src="item.product.image" />
</div>
<div class="broadcast_details_picBox_no noPad">
<div class="broadcast_details_picBox_no noPad"
v-if="isWholeSale == 0 || isWholeSale == 2">
<div class="broadcast_details_pic">
{{ item.product.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div>
{{item.product.store_name}}
</div>
</div>
<div class="broadcast_details_picBox_no noPad"
v-if="isWholeSale == 1 || isWholeSale == 2">
<div class="broadcast_details_pic">
{{ item.product.wholesale_price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.product.store_name}}
</div>
</div>
</navigator>
</div>
</div>
@ -135,7 +150,8 @@
{{ item.presell.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div>
{{item.presell.store_name}}
</div>
</div>
</navigator>
</div>
@ -156,7 +172,8 @@
{{ item.productGroup.product.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div>
{{item.productGroup.product.store_name}}
</div>
</div>
</navigator>
</div>
@ -207,7 +224,8 @@
</div>
<div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit">
{{val.product.cart_info.product.store_name}}</div>
{{val.product.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic">
{{ item.refundOrder.refund_price }}
</div>
@ -243,7 +261,8 @@
</div>
<div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div>
{{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }}
</div>
@ -267,7 +286,8 @@
{{ item.product.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div>
{{item.product.store_name}}
</div>
</div>
</navigator>
</div>
@ -288,7 +308,8 @@
{{ item.presell.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div>
{{item.presell.store_name}}
</div>
</div>
</navigator>
</div>
@ -309,7 +330,8 @@
{{ item.productGroup.product.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div>
{{item.productGroup.product.store_name}}
</div>
</div>
</navigator>
</div>
@ -388,7 +410,8 @@
</div>
<div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit">
{{val.product.cart_info.product.store_name}}</div>
{{val.product.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic">
{{ val.product.cart_info.productAttr.price }}
</div>
@ -425,7 +448,8 @@
</div>
<div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div>
{{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }}
</div>
@ -450,7 +474,8 @@
{{ item.product.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div>
{{item.product.store_name}}
</div>
</div>
</navigator>
</div>
@ -471,7 +496,8 @@
{{ item.presell.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div>
{{item.presell.store_name}}
</div>
</div>
</navigator>
</div>
@ -492,7 +518,8 @@
{{ item.productGroup.product.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div>
{{item.productGroup.product.store_name}}
</div>
</div>
</navigator>
</div>
@ -534,7 +561,8 @@
</div>
<div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit">
{{val.product.cart_info.product.store_name}}</div>
{{val.product.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic">
{{item.refundOrder.refund_num}}件商品
合计 {{ item.refundOrder.refund_price }}
@ -571,7 +599,8 @@
</div>
<div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div>
{{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }}
</div>
@ -596,7 +625,8 @@
{{ item.product.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div>
{{item.product.store_name}}
</div>
</div>
</navigator>
</div>
@ -617,7 +647,8 @@
{{ item.presell.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div>
{{item.presell.store_name}}
</div>
</div>
</navigator>
</div>
@ -638,7 +669,8 @@
{{ item.productGroup.product.price }}
</div>
<div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div>
{{item.productGroup.product.store_name}}
</div>
</div>
</navigator>
</div>
@ -758,7 +790,7 @@
</div>
</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>
</view>
<view style="height: 100rpx;"></view>
@ -772,9 +804,9 @@
{{ speak }}
</div>
<view class="input_count">
<input type="text" placeholder-class='placeholder' :disabled="active" placeholder="输入内容" class="input" ref="input"
v-show="!voice" @input="bindInput" @keyup="keyup" @focus="focus" cursor-spacing="20"
v-model="textCon" @click="handleClick">
<input type="text" placeholder-class='placeholder' :disabled="active" placeholder="输入内容"
class="input" ref="input" v-show="!voice" @input="bindInput" @keyup="keyup" @focus="focus"
cursor-spacing="20" v-model="textCon" @click="handleClick">
<div class="send iconfont icon-fasong" :style="'color:'+iconColor" @click="sendTest"></div>
</view>
</div>
@ -790,7 +822,7 @@
</block>
</swiper>
</div>
</div>
<div class="recording" v-if="recording">
<image src="/static/images/recording.png" />
@ -817,7 +849,8 @@
getChatRecord,
getMerHistory,
chatReverstApi,
hasServiceApi
hasServiceApi,
getUserInfo
} from "@/api/user";
import {
getProductDetail,
@ -938,7 +971,8 @@
httpUrl: '',
press: false,
index: 0,
j: 0
j: 0,
isWholeSale: ''
};
},
watch: {
@ -987,6 +1021,9 @@
});
});
// #endif
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
console.log(this.isWholeSale);
},
onReady() {
this.httpUrl = `${HTTP_REQUEST_URL}/static/look.png`;
@ -1213,8 +1250,7 @@
let self = this
self.$util.uploadImageOne('upload/image', function(res) {
if (res.status == 200) {
self.sendMsg(res.data.path, 3
)
self.sendMsg(res.data.path, 3)
}
});
},
@ -1383,11 +1419,11 @@
focus: function() {
this.active = false;
},
handleClick(){
if(this.active){
this.active = false;
}
},
handleClick() {
if (this.active) {
this.active = false;
}
},
keyup: function() {
if (this.$refs.input.value.length > 0) {
this.sendColor = true;
@ -1610,7 +1646,8 @@
width: 710rpx;
position: fixed;
bottom: 180rpx;
bottom: calc(180rpx + env(safe-area-inset-bottom)); /* 适应底部安全距离 */
bottom: calc(180rpx + env(safe-area-inset-bottom));
/* 适应底部安全距离 */
left: 20rpx;
.broadcast-details_box,
@ -1952,7 +1989,7 @@
position: fixed;
// bottom:var(--status-bar-height);
bottom: 20rpx;
bottom: calc(20rpx + env(safe-area-inset-bottom) );
bottom: calc(20rpx + env(safe-area-inset-bottom));
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 == 3">[图片]</view>
<view class="con line1" v-if="item.last && item.last.msn_type == 4">[商品]</view>
<view class="con line1" v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
<view class="con line1"
v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
</view>
<view class="right-box">
<view class="time">{{item.last && item.last.create_time.split(' ')[1] || ''}}</view>
<view class="time">{{item.display_time}}</view>
<view class="num" v-if="item.num>0">{{item.num}}</view>
</view>
</div>
@ -23,18 +24,21 @@
<block v-if="type == 1 && list.length>0" v-for="(item,index) in list" :key="index">
<div class="item acea-row" @click="goPage(item)">
<view class="logo">
<image :src="(item.user && item.user.avatar) ? item.user.avatar : '/static/images/f.png'" mode=""></image>
<image :src="(item.user && item.user.avatar) ? item.user.avatar : '/static/images/f.png'"
mode=""></image>
</view>
<view class="info">
<view class="name">{{item.user && item.user.nickname}}</view>
<view class="con line1" v-if="item.last && item.last.msn_type == 1">{{item.last.msn}}</view>
<view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view>
<view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view>
<view class="con line1" v-if="item.last && (item.last.msn_type == 4 || item.last.msn_type == 7)">[商品]</view>
<view class="con line1" v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
<view class="con line1"
v-if="item.last && (item.last.msn_type == 4 || item.last.msn_type == 7)">[商品]</view>
<view class="con line1"
v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
</view>
<view class="right-box">
<view class="time">{{item.last && item.last.create_time.split(' ')[1]}}</view>
<view class="time">{{item.display_time}}</view>
<view class="num" v-if="item.num>0">{{item.num}}</view>
</view>
</div>
@ -65,10 +69,12 @@
import {
getUserInfo
} from '@/api/user.js';
import { mapGetters } from "vuex";
import {
mapGetters
} from "vuex";
export default {
name: "CustomerList",
components:{
components: {
emptyPage,
authorize
},
@ -77,70 +83,72 @@
list: [],
productId: 0,
orderId: "",
type: 0 ,// 0 1
type: 0, // 0 1
timer: null,
page:1,
limit:9999,
page: 1,
limit: 9999,
mer_id: '',
loading: false,
clear: false,
isAuto: false, //
isShowAuth: false, //
isWholeSale: ''
};
},
computed: mapGetters(['isLogin','viewColor']),
computed: mapGetters(['isLogin', 'viewColor']),
onLoad(optios) {
this.type = optios.type||1;
this.getindex()
this.type = optios.type || 1;
this.getindex();
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
console.log(this.isWholeSale);
},
onShow(option) {
if(this.isLogin){
if (this.isLogin) {
this.liveUpdate();
} else {
this.isAuto = true;
this.isShowAuth = true
}
this.getindex()
},
onHide(){
if(this.timer) {
clearInterval(this.timer);
this.timer = null;
}
onHide() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
this.clear = true;
},
onUnload() {
if(this.timer) {
clearInterval(this.timer);
this.timer = null;
}
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
this.clear = true;
},
methods: {
//
getindex(){
getindex() {
getUserInfo().then(res => {
if (res.data.mer_info.length == 0) {
return uni.showModal({
title: '暂未开通商户',
complete(res) {
// #ifdef APP-PLUS
uni.sendHostEvent('closeApp', (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
// #endif
}
})
}
if (res.data.mer_info.length == 0) {
return uni.showModal({
title: '暂未开通商户',
complete(res) {
// #ifdef APP-PLUS
uni.sendHostEvent('closeApp', (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
// #endif
}
})
}
this.mer_id = res.data.service.mer_id;
if(this.isLogin){
if (this.isLogin) {
this.getList(this.mer_id)
} else {
this.isAuto = true;
this.isShowAuth = true
}
// this.getList(this.mer_id)
// this.getList(res.data.service.mer_id, true);
});
},
onLoadFun() {
@ -152,84 +160,106 @@
authColse: function(e) {
this.isShowAuth = e
},
getList(mer_id) {
getList(mer_id) {
this.loading = true;
if(this.type == 0){
if (this.type == 0) {
serviceList({
page:this.page,
limit:this.limit
page: this.page,
limit: this.limit
}).then(res => {
this.list = res.data.list;
if(res.status == 400){
this.getCurrBadge();
if (res.status == 400) {
clearInterval(this.timer);
this.timer = null;
return this.$util.Tips({
title: res.message
})
}
}).finally(v=>{
this.loading = false;
return this.$util.Tips({
title: v
})
}).catch(err => {
return this.$util.Tips({
title: err
})
});
}else{
serviceUserList(mer_id,{
page:this.page,
limit:this.limit
}).then(res =>{
this.list = res.data.list;
if(res.status == 400){
clearInterval(this.timer);
this.timer = null;
this.timer = null;
return this.$util.Tips({
title: res.message
})
}
}).finally(v=>{
}).finally(v => {
this.loading = false;
return this.$util.Tips({
title: v
})
}).catch(err => {
return this.$util.Tips({
title: err
})
});
} else {
serviceUserList(mer_id, {
page: this.page,
limit: this.limit
}).then(res => {
this.list = res.data.list;
this.getCurrBadge();
if (res.status == 400) {
clearInterval(this.timer);
this.timer = null;
return this.$util.Tips({
title: res.message
})
}
}).finally(v => {
this.loading = false;
clearInterval(this.timer);
this.timer = null;
this.timer = null;
return this.$util.Tips({
title: v
})
}).catch(err => {
clearInterval(this.timer);
this.timer = null;
this.timer = null;
return this.$util.Tips({
title: err
})
});
}
}
},
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;
this.clear = false;
if(that.timer) {
if (that.timer) {
clearInterval(that.timer);
that.timer = null;
}
that.timer = setInterval(function(){
if(that.clear){
that.timer = null;
}
that.timer = setInterval(function() {
if (that.clear) {
clearInterval(that.timer);
return ;
return;
}
//
(!that.loading) && that.getList(that.mer_id);
},5000);
}, 5000);
},
goPage(item) {
item.num = 0;
if(this.type == 0){
this.getCurrBadge();
if (this.type == 0) {
uni.navigateTo({
url: `/pages/chat/customer_list/chat?mer_id=${item.mer_id}`
})
}else{
} else {
uni.navigateTo({
url: `/pages/chat/customer_list/chat?userId=${item.user.uid}&mer_id=${item.mer_id}`
})
@ -248,7 +278,8 @@
transform: rotate(180deg);
font-size: 36rpx;
}
.popupn{
.popupn {
position: fixed;
width: 100%;
text-align: center;
@ -258,65 +289,78 @@
height: 90rpx;
line-height: 90rpx;
z-index: 100;
.title{
.title {
max-width: 560rpx;
margin: 0 auto;
position: relative;
}
.iconfont{
.iconfont {
display: inline-block;
position: relative;
top: 4rpx;
right: 0;
}
.mer_logo{
.mer_logo {
width: 34rpx;
height: 34rpx;
position: relative;
top: 6rpx;
right: 10px;
right: 10px;
}
.mer_name{
.mer_name {
display: inline-block;
max-width: 650rpx;
}
.invoice-content{
.invoice-content {
background-color: #ffffff;
}
}
.list_count{
.list_count {
margin-top: 104rpx;
}
.item {
align-items: center;
border-bottom: 1px solid #eee;
padding: 20rpx 30rpx;
background-color: #fff;
.logo image{
.logo image {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
}
.info{
.info {
width: 334rpx;
margin-left: 20rpx;
.con{
.con {
margin-top: 10rpx;
color: #999999;
font-size: 24rpx;
}
}
.right-box{
.right-box {
flex: 1;
display: flex;
flex-direction: column;
align-items: flex-end;
font-size: 20rpx;
color: #BBBBBB;
.time{
.time {
margin-bottom: 10rpx;
}
.num{
.num {
min-width: 6px;
background-color: var(--view-theme);
border-radius: 15px;
@ -328,4 +372,4 @@
}
}
}
</style>
</style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -51,17 +51,20 @@
<view v-else class='share acea-row row-between row-bottom'>
<view class='money p-color skeleton-rect' style="min-width: 70rpx;">
<text class='num'>{{storeInfo.price}}</text>
<text class='num'
v-if="isWholeSale == 0 || isWholeSale == 2">{{storeInfo.price}}</text>
<text class='num'
v-if="isWholeSale == 1 || isWholeSale == 2">{{storeInfo.wholesale_price}}</text>
<view v-if="svipData && svipData.show_svip_price && svipData.show_svip"
style="display: inline-block;">
<text class="vip-money">{{storeInfo.svip_price}}</text>
<image class="vip-image" src="/static/images/svip.png"></image>
</view>
</view>
<view @click="listenerActionSheet" class="fenxiang_btn">
<!-- <view @click="listenerActionSheet" class="fenxiang_btn">
<view class='iconfont icon-fenxiang'></view>
分享
</view>
</view> -->
</view>
<!-- <view v-if="svipData && !svipData.is_svip && svipData.show_svip"
class="svipCon acea-row row-between-wrapper skeleton-rect" style="margin-top: 20rpx;">
@ -237,9 +240,9 @@
</view>
<view v-else class="txt">0人关注</view>
</view>
<navigator v-if="hide_mer_status != 1"
<!-- <navigator v-if="hide_mer_status != 1"
:url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id" class="link"
hover-class="none">进店</navigator>
hover-class="none">进店</navigator> -->
</view>
<view class="score-wrapper">
<view class="item">
@ -278,20 +281,22 @@
<view class='title'>产品介绍</view>
<view class='conter' v-if="description" style="min-height:50rpx;">
<!-- #ifndef APP-PLUS -->
<jyf-parser v-if="description.type == 0 && typeof description.content == 'string'" :domain='domain'
:html="description.content.replace(/<br\/>/ig, '')" ref="article"
<jyf-parser v-if="description.type == 0 && typeof description.content == 'string'"
:domain='domain' :html="description.content.replace(/<br\/>/ig, '')" ref="article"
:tag-style="tagStyle"></jyf-parser>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<view v-if="description.type == 0 && typeof description.content == 'string'" class="description"
v-html="description.content.replace(/<br\/>/ig, '')"></view>
<view v-if="description.type == 0 && typeof description.content == 'string'"
class="description" v-html="description.content.replace(/<br\/>/ig, '')"></view>
<!-- #endif -->
<view v-else class="product_content">
<view v-if="description.content && description.content.title" class="product_content_title">
{{description.content.title}}
<view v-if="description.content && description.content.title"
class="product_content_title">
{{description.content.title}}
</view>
<block v-if="description.content && description.content.image">
<image v-for="(item,index) in description.content.image" :key="index" :src="item" mode="widthFix" style="background-color: #fff;width: 100vw;">
<image v-for="(item,index) in description.content.image" :key="index" :src="item"
mode="widthFix" style="background-color: #fff;width: 100vw;">
</image>
</block>
</view>
@ -311,7 +316,7 @@
<view style='height:120rpx;'></view>
</scroll-view>
</view>
<view class='footer acea-row row-between-wrapper'>
<!-- <view class='footer acea-row row-between-wrapper'>
<view v-if="storeInfo.merchant && storeInfo.merchant.services_type == 1" class="item skeleton-rect"
@click="call">
<view class="iconfont icon-kefu"></view>
@ -355,7 +360,7 @@
<button v-else class='buy bnts sold_out' form-type="submit" disabled>商品已售罄</button>
</form>
</view>
</view>
</view> -->
<block v-if="sharePacket.max&&sharePacket.max>0">
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet"
@closeChange="closeChange" :showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets>
@ -617,7 +622,8 @@
params: []
},
product_type: 0,
referer: ''
referer: '',
isWholeSale: ''
};
},
computed: {
@ -631,7 +637,6 @@
])),
},
onLoad(options) {
// console.log(options)
this.referer = options.referer
if (options.product_type) {
this.product_type = options.product_type
@ -682,6 +687,7 @@
} else {
this.id = options.id
}
//广uid
if (options.spid) app.globalData.spid = options.spid;
// #endif
@ -695,6 +701,9 @@
this.downloadFilePromotionCode();
this.getHistory()
}
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
console.log(this.isWholeSale);
},
onReady() {
this.isNodes++;
@ -1059,14 +1068,16 @@
}
that.$set(that, 'storeInfo', storeInfo);
that.$set(that, 'description', storeInfo.content);
if(typeof that.description.content == 'string'){
try{
that.description.content = JSON.parse(that.description.content);
}catch(e){
console.log(e);
}
}
if (that.description.type == 0 && typeof that.description.content == 'string') {
if (storeInfo.content && typeof that.description.content == 'string') {
try {
that.description.content = JSON.parse(that.description.content);
} catch (e) {
console.log(e);
}
}
if (that.description && that.description.type && that.description.type == 0 && typeof that
.description
.content == 'string') {
that.description.content = that.description.content.replace(
/<img/gi,
'<img style="max-width:100%;height:auto;float:left;display:block" '
@ -1121,6 +1132,7 @@
that.getCouponList();
})
}).catch(err => {
console.log(err);
//
return that.$util.Tips({
title: err
@ -2527,21 +2539,23 @@
}
}
}
.product_content{
background-color: #fff;
&_title{
width: 100%;
height: auto;
line-height: 50rpx;
padding: 28rpx;
word-wrap: break-word;
text-align: center;
}
image{
width: 750rpx;
// height: auto;
// height: 750rpx;
}
}
.product_content {
background-color: #fff;
&_title {
width: 100%;
height: auto;
line-height: 50rpx;
padding: 28rpx;
word-wrap: break-word;
text-align: center;
}
image {
width: 750rpx;
// height: auto;
// height: 750rpx;
}
}
</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,52 +23,52 @@
<view class="tab">
<view class="item active" style="margin: 0;">{{merchant_Data.margin}}</view>
</view>
<button class="btn" :class="{'btn-d': merchant_Data.is_margin != 1}" @click="paydecimal">{{merchant_Data.is_margin != 1?"无需缴纳":"缴纳"}}</button>
<button class="btn" :class="{'btn-d': merchant_Data.is_margin != 1}"
@click="paydecimal">{{merchant_Data.is_margin != 1?"无需缴纳":"缴纳"}}</button>
</view>
<!-- <view class="tip">
<view class="title">注意事项</view>
<view class="text">充值后帐户的金额不能提现可用于商城消费使用佣金导入账户之后不能再次导出不可提现账户充值出现问题可联系商城客服也可拨打商城客服热线<text @click="copyPhone('4008888888')">4008888888</text>
</view>
</view> -->
<u-tabs :list="[{name: '订单补缴记录'},{name: '充值记录'}]" @click="changeCurrent" lineColor="#f56c6c" :activeStyle="{
<u-tabs :list="[{name: '订单补缴记录'},{name: '充值记录'}]" @click="changeCurrent" lineColor="#f56c6c" :activeStyle="{
color: '#333',
fontWeight: 'bold',
transform: 'scale(1.05)'
}"
:inactiveStyle="{
}" :inactiveStyle="{
color: '#333',
transform: 'scale(1)'
}"></u-tabs>
<block v-if="current==0">
<view class="content-order" v-for="(item,i ) in deductList">
<view class="deduct">扣除编号{{item.financial_record_sn}}</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.order_sn}}</view>
<view class="deduct">扣除时间{{item.create_time}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='deductList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle2}}
</view>
<view class='loadingicon acea-row row-center-wrapper' v-else>
没有更多了
</view>
</block>
<block v-if="current==1">
<view class="content-order" v-for="(item,i ) in productList">
<view class="view">订单编号{{item.order_sn}}</view>
<view class="view">支付金额{{item.total_price}}</view>
<view class="view">支付状态{{item.pay_type==1?'已支付':'待支付'}}</view>
<view class="view">支付时间{{item.pay_time}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<view class='loadingicon acea-row row-center-wrapper' v-else>
没有更多了
</view>
</block>
<view class="content-order" v-for="(item,i ) in deductList">
<view class="deduct">扣除编号{{item.financial_record_sn}}</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.order_sn}}</view>
<view class="deduct">扣除时间{{item.create_time}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='deductList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle2}}
</view>
<view class='loadingicon acea-row row-center-wrapper' v-else>
没有更多了
</view>
</block>
<block v-if="current==1">
<view class="content-order" v-for="(item,i ) in productList">
<view class="view">订单编号{{item.order_sn}}</view>
<view class="view">支付金额{{item.total_price}}</view>
<view class="view">支付状态{{item.pay_type==1?'已支付':'待支付'}}</view>
<view class="view">支付时间{{item.pay_time}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<view class='loadingicon acea-row row-center-wrapper' v-else>
没有更多了
</view>
</block>
</view>
</template>
@ -77,9 +77,11 @@
merchant,
paymerchant,
marginlist,
autoMarginlist
autoMarginlist
} from '@/api/api.js'
import { Toast } from '../../libs/uniApi'
import {
Toast
} from '../../libs/uniApi'
export default {
data() {
return {
@ -89,66 +91,40 @@
page: 1,
limit: 10
},
where2: {
page: 1,
limit: 10
},
where2: {
page: 1,
limit: 10
},
productList: [],
deductList: [],
deductList: [],
loadend: false,
loading: false,
loadTitle: '加载更多',
loadend2: false,
loading2: false,
loadTitle2: '加载更多',
current: 0
loadend2: false,
loading2: false,
loadTitle2: '加载更多',
current: 0
}
},
onLoad(e) {
this.mer_id = e.mer_id
this.decimal()
// this.list(true);
this.autoList(true);
this.autoList(true);
},
onReachBottom() {
if(this.current==0){
this.loadend2 = false;
this.loading2 = false;
this.autoList(false);
}else {
this.loadend = false;
this.loading = false;
this.list(false);
if (this.current == 0) {
this.loadend2 = false;
this.loading2 = false;
this.autoList(false);
} else {
this.loadend = false;
this.loading = false;
this.list(false);
}
},
methods: {
list(isPage) {
let that = this;
if (that.loadend) return;
if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []);
that.loading = true;
that.loadTitle = '';
marginlist(that.where).then(res => {
let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit;
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
setTimeout(() => {
that.$set(that, 'productList', productList);
}, 500)
that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
},
//
decimal() {
merchant({
@ -172,28 +148,28 @@
if (res.confirm) {
// console.log('');
paymerchant().then((res) => {
try{
uni.requestPayment({
provider: 'wxpay',
orderInfo: res.data
.config, //
success: (res) => {
this.$util.Tips({
title: '支付成功'
});
this.decimal()
this.list(true)
},
fail: (err) => {
this.$util.Tips({
title: '支付失败'
});
console.log('fail:' + JSON.stringify(err));
}
});
}catch(err){
Toast('请前往小程序中支付')
}
try {
uni.requestPayment({
provider: 'wxpay',
orderInfo: res.data
.config, //
success: (res) => {
this.$util.Tips({
title: '支付成功'
});
this.decimal()
this.list(true)
},
fail: (err) => {
this.$util.Tips({
title: '支付失败'
});
console.log('fail:' + JSON.stringify(err));
}
});
} catch (err) {
Toast('请前往小程序中支付')
}
}).catch((err) => {
this.$util.Tips({
title: err
@ -204,47 +180,74 @@
}
}
});
}
},
changeCurrent(e){
this.current = e.index;
if(e.index==0){
this.loadend = false;
this.loading = false;
this.autoList(true);
}else {
this.loadend = false;
this.loading = false;
this.list(true)
}
},
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);
changeCurrent(e) {
this.current = e.index;
if (e.index == 0) {
this.loadend = false;
this.loading = false;
this.autoList(true);
} else {
this.loadend = false;
this.loading = false;
this.list(true)
}
},
list(isPage) {
let that = this;
if (that.loadend) return;
if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []);
that.loading = true;
that.loadTitle = '';
marginlist(that.where).then(res => {
let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit;
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
setTimeout(() => {
that.$set(that, 'productList', productList);
}, 500)
if (isPage) that.where.page = 1;
else that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
},
autoList(isPage) {
let that = this;
if (that.loadend2) return;
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.loadTitle2 = '加载更多';
})
}
})
}
}
}
</script>
@ -260,10 +263,10 @@
.content-order {
background: #fff;
border-radius: 21rpx 21rpx;
margin: 0 28rpx;
margin: 0 28rpx;
margin-top: 30rpx;
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 {
font-size: 30rpx;
@ -271,9 +274,8 @@
font-weight: 400;
color: #333333;
}
.deduct{
}
.deduct {}
}
.info {
@ -302,13 +304,12 @@
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 31.5rpx 28rpx;
font-size: 30rpx;
font-size: 30rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
position: absolute;
top: 0;
.title {
font-size: 32rpx;
@ -328,12 +329,13 @@
flex-shrink: 0;
margin-right: 18rpx;
}
.text{
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.text {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
}
}
}
@ -407,9 +409,10 @@
font-weight: 400;
color: #FFFFFF;
}
.btn-d{
background-color: #999;
}
.btn-d {
background-color: #999;
}
}
.tip {

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -507,12 +507,12 @@
methods: {
//
handleToWithDraw(item, index) {
let url;
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`
uni.navigateTo({
url: url
})
let url;
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`
uni.navigateTo({
url: url
})
},
//
initTypeLiseMenu() {
@ -864,6 +864,7 @@
},
//
getindex() {
let that = this;
const data = {
product_type: this.where1.product_type
}

View File

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

View File

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

View File

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

View File

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

View File

@ -933,8 +933,8 @@
});
getOtherOrderDetail(that.order_id).then(res => {
uni.hideLoading();
res.data.orderProduct[0].cart_info.productAttr.price = res.data.orderProduct[0].cart_info.productAttr.procure_price;
res.data.orderProduct[0].cart_info.product.price = res.data.orderProduct[0].cart_info.productAttr.procure_price;
res.data.orderProduct[0].cart_info.productAttr.price = res.data.orderProduct[0].cart_info.productAttr.wholesale_price;
res.data.orderProduct[0].cart_info.product.price = res.data.orderProduct[0].cart_info.productAttr.wholesale_price;
that.$set(that, 'orderInfo', res.data);
that.orderInfo.take = res.data.take;
that.$set(that, 'cartInfo', res.data.orderProduct);

View File

@ -1,66 +1,73 @@
<template>
<view class="container">
<view class="v-navbar">
<view v-if="!isWeixin" class="v-navbar">
<u-navbar title="提货付款" :safeAreaInsetTop="false" :fixed="false" @leftClick="leftClick" bgColor="transparent"
leftIconColor="#fff" :titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
leftIconColor="#333" :titleStyle="{color:'#333',fontWeight:'bold',fontSize:'32rpx'}">
</u-navbar>
</view>
<view v-if="merchantInfo && !isEmpty">
<view class="v-desc">
<view>
<view class="v-desc-main">确认提货付款</view>
<view class="v-desc-sub">{{merchantInfo.merchant.mer_name}}</view>
</view>
<u-image :showLoading="true" :src="merchantInfo.merchant.mer_avatar" width="182rpx" height="182rpx"
:radius="10" />
<view style="height: 50rpx;"></view>
<view class="wrap">
<view class="shop">
<image src="@/static/shop_logo.webp" style="width: 62rpx;height: 54rpx;" />
<text class="shop-name" v-if="mer_name">{{mer_name||''}}</text>
</view>
<!-- 付款金额 -->
<view class="v-con">
<view class="v-con-text">付款金额</view>
<view class="v-con-input" style="margin-right: 10px;">
<text style="color: #303133;font-size:46rpx;"></text>
<u--input type="digit" fontSize="23" v-model="cartForm.total_amount" placeholder="请输入金额"
border="none" placeholderStyle="color:#999;font-size:30rpx" @input="validateDecimal">
<view class="v-con-text">订单金额</view>
<view class="v-con-input" @click="handleOpenKeyboard">
<text style="color: #303133;font-size:32rpx;"></text>
<u--input type="text" fontSize="23" height="112rpx" placeholder="请输入金额" border="none" readonly
v-model="cartForm.total_amount" placeholderStyle="color:#999;font-size:32rpx">
</u--input>
<view class="placeholder"></view>
</view>
<view class="v-wrap" v-if="cartForm.total_amount">
<view class="v-wrap-money">
<text class="icon"></text>
<text class="num">{{cartForm.total_amount}}</text>
</view>
<view class="v-wrap-desc">
<view class="v-wrap-desc-main">实物提货券</view>
<view class="v-wrap-desc-sub">即买即用</view>
<view class="v-con-group">
<view class="v-con-group-title">
<view class="v-con-group-title-left">套餐详情</view>
<view class="v-con-group-title-right" @click.stop="handleOpen">
<text>{{isOpen?'折叠':'展开'}}</text>
<u-icon :name="isOpen?'arrow-down' : 'arrow-right'" size="15"></u-icon>
</view>
</view>
<scroll-view scroll-y>
<view class="v-con-group-list" :style="{'max-height':isOpen?'400rpx':'0'}">
<block v-for="(item,indx) in merchantInfo" :key="indx">
<view class="v-con-group-list-item">
<image :src="item.image" :showLoading="true" style="width:86rpx;height:86rpx;" />
<text class="line1">{{item.store_name}}</text>
</view>
</block>
</view>
</scroll-view>
</view>
</view>
<view class="v-btn-wrap">
<view class="v-btn" @click="submitOrder">提交订单</view>
<view class="v-btn-wrap" @click="cartForm.total_amount?submitOrder():null">
<view class="v-btn">{{Number(cartForm.total_amount||0).toFixed(2)}} 确认支付</view>
</view>
<!-- 登陆 -->
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun">
</authorize>
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun" />
</view>
<!-- 无商户信息提示 -->
<view v-else class="empty">
<image src="/static/images/no_thing.png"></image>
<text style="margin-top: 60rpx;">{{tips}}</text>
<!-- 登陆 -->
<authorize :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth" @authColse="authColse"
@onLoadFun="onLoadFun">
<!-- <view class="empty">
<authorize v-show="!isWeixin" ref="authRef" :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth"
@authColse="authColse" @onLoadFun="onLoadFun">
</authorize>
</view>
</view> -->
<!-- 键盘 -->
<popups ref="popups" @confirm="handleConfirm" @clear="handleClear" @change="handleChange"></popups>
</view>
</template>
<script>
var that;
import {
getProductInfo,
getProductInfo1,
addCart,
orderCheck
} from "@/api/payment.js";
@ -69,17 +76,23 @@
mapGetters
} from "vuex";
import authorize from '@/components/Authorize';
import { Toast } from "../../libs/uniApi";
import {
Toast
} from "../../libs/uniApi";
import popups from "@/components/popups/index.vue";
export default {
components: {
authorize
authorize,
popups
},
computed: {
...mapGetters(['isLogin']),
},
data() {
return {
isEmpty: false,
isEmpty: true,
// isWeixin: this.$wechat.isWeixin(),
isWeixin: false,
cartForm: {
product_id: '',
product_attr_unique: '',
@ -103,29 +116,67 @@ import { Toast } from "../../libs/uniApi";
isAuto: false, //
isShowAuth: false, //
mer_id: '',
tips: '暂未登陆~'
changeTxt: '展开',
isOpen: false,
keyBoardShow: false,
mer_name: ''
}
},
onLoad(opt) {
that = this;
this.mer_id = opt.mer_id;
},
onShow() {
if (!this.isLogin) {
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
this.isAuto = true;
this.isShowAuth = true;
if (this.isWeixin) {
this.$nextTick(() => {
this.$refs.authRef.toWecahtAuth();
})
}
} else {
this.checkForm.cart_id = [];
this.getProductInfoByMerid(this.mer_id);
this.checkForm.cart_id = [];
this.getProductInfoByMerid();
}
},
methods: {
validateDecimal(event) {
let val = (this.cartForm.total_amount.match(/^\d*(\.?\d{0,2})/g)[0]) || ''
this.$nextTick(() => {
this.cartForm.total_amount = val;
})
//
handleOpenKeyboard() {
if (!this.isLogin) {
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
this.isAuto = true;
this.isShowAuth = true;
if (this.isWeixin) {
this.$nextTick(() => {
this.$refs.authRef.toWecahtAuth();
})
}
} else {
this.$refs.popups.handleOpen('money');
}
},
//
handleConfirm(e) {
if (!e) return;
this.cartForm.total_amount = e;
this.submitOrder();
},
//
handleClear() {
this.cartForm.total_amount = '';
this.merchantInfo = [];
},
//
handleChange(e) {
this.cartForm.total_amount = e;
uni.$u.debounce(that.getProductInfoByMerid, 200)
},
leftClick(e) {
@ -133,60 +184,94 @@ import { Toast } from "../../libs/uniApi";
url: '/pages/index/index'
})
},
//
authColse: function(e) {
this.isShowAuth = e;
},
onLoadFun() {
this.getProductInfoByMerid(this.mer_id);
this.isShowAuth = false;
},
//
submitOrder() {
async submitOrder() {
if (!this.cartForm.total_amount) {
return this.$util.Tips({
title: "请输入付款金额!"
})
}
//
this.cartForm.product_id = this.merchantInfo.product_id;
this.cartForm.product_type = this.merchantInfo.product_type;
this.cartForm.product_attr_unique = this.merchantInfo.sku[''].unique;
let that = this;
addCart(this.cartForm).then(res => {
// ID
that.checkForm.cart_id.push(res.data.cart_id);
//
for (var i = 0; i < that.merchantInfo.length; i++) {
let info = {
product_id: that.merchantInfo[i].product_id,
product_attr_unique: that.merchantInfo[i].unique,
cart_num: that.merchantInfo[i].num,
is_new: 1,
product_type: 0,
source: 999,
total_amount: that.cartForm.total_amount
};
try {
let res = await addCart(info);
that.checkForm.cart_id.push(res.data.cart_id);
} catch (e) {
return that.$util.Tips({
title: err.message || err.msg || err
})
}
}
if (that.checkForm.cart_id && that.checkForm.cart_id.length > 0) {
orderCheck(that.checkForm).then(res1 => {
uni.navigateTo({
url: "/pages/payment/settlement?cartId=" + this.checkForm
.cart_id + "&money=" + this.cartForm.total_amount +
"&merName=" + this.merchantInfo.merchant.mer_name,
url: "/pages/payment/settlement",
success: (res) => {
res.eventChannel.emit('datas', res1.data.platformConsumption);
uni.setStorageSync('datas', {
platformConsumption: res1.data.platformConsumption ||
[],
productData: that.merchantInfo,
checkForm: that.checkForm,
money: that.cartForm.total_amount,
merName: that.mer_name,
money: that.cartForm.total_amount,
key: res1.data.key
})
},
fail(err) {
console.log(err)
}
})
}).catch(err=>{
Toast(err.message || err)
});
}).catch((err) => {
this.$util.Tips({
title: err.message || err.msg || err
})
})
}).catch(err => {
Toast(err.message || err)
});
}
},
getProductInfoByMerid(merid) {
let that = this;
getProductInfo({
mer_id: merid
//
handleOpen() {
this.isOpen = !this.isOpen;
},
//
getProductInfoByMerid(merid, money) {
getProductInfo1({
mer_id: that.mer_id,
money: that.cartForm.total_amount
}).then(res => {
this.merchantInfo = res.data;
if (!that.cartForm.total_amount) {
this.mer_name = res.data.merchant;
} else {
that.merchantInfo = res.data.list;
}
}).catch((err) => {
this.tips = err.message || err.smg || err;
this.$util.Tips({
that.$util.Tips({
title: err.message || err.msg || err
}, () => {
})
// #ifdef APP
setTimeout(() => {
@ -200,49 +285,6 @@ import { Toast } from "../../libs/uniApi";
that.isEmpty = true;
// #endif
})
},
//
handleSavePic() {
// URL
let imageUrl = this.qrcodeUrl; // 使
// #ifdef H5
var a = document.createElement("a");
a.download = imageUrl;
a.href = imageUrl;
document.body.appendChild(a);
a.click();
a.remove();
// #endif
// #ifndef H5
let that = this;
uni.downloadFile({
url: imageUrl,
success(res) {
if (res.statusCode === 200) {
let tempFilePath = res.tempFilePath; //
uni.saveImageToPhotosAlbum({
filePath: tempFilePath,
success() {
return that.$util.Tips({
title: '图片已保存至相册!'
});
},
fail(err) {
console.error('保存失败', err);
}
});
} else {
console.error('下载失败', res.statusCode);
}
},
fail(err) {
console.error('下载失败', err);
}
});
// #endif
}
}
}
@ -250,11 +292,11 @@ import { Toast } from "../../libs/uniApi";
<style lang="scss">
page {
background-color: #FCDFAD;
background-color: #F9F9F9;
}
.empty {
margin: 130rpx 0 150rpx;
margin: 0;
text-align: center;
image,
@ -274,7 +316,7 @@ import { Toast } from "../../libs/uniApi";
.container {
position: relative;
height: 100vh;
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/c582c202402291601584806.webp");
// background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/c582c202402291601584806.webp");
background-size: 100% auto;
background-repeat: no-repeat;
padding-top: var(--status-bar-height);
@ -304,34 +346,56 @@ import { Toast } from "../../libs/uniApi";
}
}
.wrap {
margin: 0 52rpx 0 54rpx;
}
.shop {
display: flex;
align-items: center;
margin-bottom: 54rpx;
text {
margin-left: 32rpx;
}
}
.v-con {
position: absolute;
top: 436rpx;
left: 50%;
transform: translateX(-50%);
width: 710rpx;
height: 680rpx;
background: linear-gradient(180deg, #FEB992 0%, #FFFFFF 31%, #FFFFFF 100%);
border-radius: 20rpx;
margin: 0 auto;
box-shadow: 0 -4rpx 0px 0px #fff;
padding: 53rpx 30rpx 0 30rpx;
box-sizing: border-box;
margin: 0 auto 150rpx;
.v-con-text {
margin-bottom: 60rpx;
font-weight: 400;
font-size: 32rpx;
color: #2E2E2E;
line-height: 16rpx;
font-size: 30rpx;
color: #000000;
}
.v-con-input {
position: relative;
display: flex;
align-items: center;
margin-bottom: 83rpx;
padding: 0 0 40rpx 12rpx;
height: 112rpx;
margin-bottom: 32rpx;
border-bottom: 1rpx solid #D6D6D6;
/deep/.uni-input-input {
height: 112rpx;
font-weight: bold;
font-size: 72rpx;
}
text {
font-weight: 400;
font-size: 32rpx;
color: #000000;
}
.placeholder {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
.v-wrap {
@ -340,9 +404,6 @@ import { Toast } from "../../libs/uniApi";
padding-left: 20rpx;
width: 666rpx;
height: 210rpx;
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/2f9c2202402291652415355.webp");
background-size: 100% 100%;
background-repeat: no-repeat;
.v-wrap-money {
display: flex;
@ -377,37 +438,92 @@ import { Toast } from "../../libs/uniApi";
}
}
}
}
.v-btn-wrap {
position: fixed;
z-index: 11;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 240rpx;
background-color: #FDD6A6;
.v-btn {
width: 650rpx;
height: 100rpx;
line-height: 100rpx;
background: #FF8056;
box-shadow: 0rpx 3rpx 3rpx 1rpx rgba(255, 94, 12, 0.4);
border-radius: 55rpx 55rpx 55rpx 55rpx;
border: 1rpx solid #FF8056;
font-weight: 600;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
.v-con-group {
.v-con-group-title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
&:active {
opacity: .8;
.v-con-group-title-left {
font-weight: 400;
font-size: 30rpx;
color: #000000;
}
.v-con-group-title-right {
display: flex;
align-items: center;
text {
margin-right: 18rpx;
font-weight: 400;
font-size: 30rpx;
color: #000000;
}
}
}
.v-con-group-list {
transition: max-height linear .1s;
.v-con-group-list-item {
display: flex;
align-items: center;
margin-bottom: 14rpx;
text {
margin-left: 30rpx;
font-size: 26rpx;
color: #333333;
}
}
}
}
}
.v-btn-wrap {
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>

View File

@ -27,7 +27,8 @@
<block v-for="(item,indx) in paymentData" :key="indx">
<view class="payment-detail-con-item">
<view class="item-desc">
<text class="item-desc-name">{{item.come_msg}}</text>
<text class="item-desc-name line1" style="width:280rpx;">{{item.come_msg}}</text>
<text style="width:180rpx;">{{item.pay_type_name}}</text>
<text class="item-desc-price"
:style="{'color':item.msg=='收入'?'#EEC102':''}"><text>{{item.msg == '支出'?'-':'+'}}</text>{{item.pay_price}}</text>
</view>
@ -130,7 +131,13 @@
pickerConfirm(e) {
const date = new Date(e.value).format('yyyy-MM-dd');
if (this.pickStartShow) this.searchParams.section_startTime = date;
if (this.pickStartShow) {
this.searchParams.section_startTime = date;
this.searchParams.page = 1;
this.paymentData = [];
this.loadend = false;
this.getData();
}
if (this.pickEndShow) {
if (!this.searchParams.section_startTime)
this.searchParams.section_startTime = date;

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>
<view class="container">
<view class="v-navbar">
<u-navbar title="提货付款" :autoBack="true" :fixed="false" bgColor="transparent" leftIconColor="#fff"
<u-navbar title="商户收款" :autoBack="true" :fixed="false" bgColor="transparent" leftIconColor="#fff"
:titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
</u-navbar>
</view>
<!-- <view class="v-desc">
<view class="v-desc-main">扫描二维码</view>
<view class="v-desc-sub">即可进入面对面付款</view>
</view> -->
<view style="display:flex;justify-content:center;flex-direction:column;align-items:center;">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/82347202403181619505958.png"
style="width:350rpx;height:118rpx;" mode="widthFix" />
<text class="shop_name">店铺:{{userInfo.mer_info.mer_name || '-'}}</text>
</view>
<view class="v-qrcode">
<u-image width="540rpx" height="540rpx" :showLoading="true" :src="img" class="v-qrcode-img"></u-image>
<view style="color: #FF5E0C;text-align: center;" v-if="userInfo.mer_info">{{userInfo.mer_info.mer_name}}</view>
<u-image width="490rpx" height="490rpx" :showLoading="true" :src="img" class="v-qrcode-img"></u-image>
</view>
<view class="v-btn" @click="handleSavePic">
<image src="../../static/images/download_yellow.webp" />
<text>保存二维码</text>
</view>
</view>
@ -108,22 +29,32 @@
data() {
return {
img: '',
userInfo: {}
userInfo: {}
}
},
onLoad(opt) {
let user = this.$store.state.app.userInfo;
if(typeof user =='string') user = JSON.parse(user);
this.userInfo = user;
this.getQrcode(user.service.mer_id)
let user = this.$store.state.app.userInfo;
if (typeof user == 'string') user = JSON.parse(user);
this.userInfo = user;
this.getQrcode(user.service.mer_id)
},
methods: {
//
getQrcode(merid) {
qrcode({
mer_id: merid || 7
mer_id: merid
}).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;
}
})
},
@ -173,4 +104,53 @@
}
}
}
</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>
<view class="popup_group">
<!-- <view class="popup_group_item" @click="selectPlatform">
<!-- <view class="popup_group_item popup_group_item_b" @click="selectPlatform">
<view class="popup_group_item_label">平台分类</view>
<view class="popup_group_item_value">
<view class="popup_group_item_message">
@ -69,7 +69,7 @@
<view><span class="iconfont">&#xe6bd;</span></view>
</view>
</view> -->
<view class="popup_group_item">
<view class="popup_group_item popup_group_item_b">
<view class="popup_group_item_label">商品单位</view>
<view class="popup_group_item_value"><input v-model="setFormData.unit_name" type="text"
placeholder="请填写商品单位" /></view>
@ -120,7 +120,7 @@
</view>
<view v-if="false" class="popup_group">
<view class="popup_group">
<!-- <view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
<view class="popup_group_item_label">更多信息</view>
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
@ -128,8 +128,8 @@
</view>
</view> -->
<block>
<!-- <view class="input_content">
<view class="input_content_describe" style="border-top: none">
<view class="input_content">
<view class="input_content_describe" style="border: none;padding-bottom: 0;">
<view class="input_content_describe_title">
<view class="input_content_describe_title_msg">商品简介</view>
<view class="input_content_describe_title_num">
@ -139,17 +139,17 @@
</view>
</view>
<view class="input_content_describe_textarea">
<textarea v-model="setFormData.store_info" value="" placeholder="请填写商品简介"
<textarea v-model="setFormData.store_info" style="width: 100%;" value="" placeholder="请填写商品简介"
placeholderClass="placeholderClass" maxlength="200" />
</view>
</view>
<view class="input_content_keyword">
<!-- <view class="input_content_keyword">
<view class="input_content_keyword_label">关键字</view>
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
placeholder="填写关键字" /></view>
</view>
</view> -->
</view> -->
</view>
<!-- <view class="input_content">
<view class="input_content_keyword">
<view class="input_content_keyword_label">最少购买件数</view>
@ -159,17 +159,17 @@
</view> -->
<view class="radio">
<view class="radio_label ">送货方式</view>
<checkbox-group class="select_group flex_start">
<checkbox-group class="select_group flex_start" @change="changeDelivery">
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view>
<checkbox :value="val.value" disabled :checked="val.value" />
<checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value+'')" />
</view>
<view>{{ val.name }}</view>
</label>
</checkbox-group>
</view>
</block>
</view>
</view>
@ -246,7 +246,7 @@
specifica: '', //
// setSpecificaValue: '', //
// setSpecificaValue2: '',
delivery_way: [1, 2], // 1 2
delivery_way: ['1', '2'], // 1 2 , // 1 2
delivery_free: '1', // 0 1
temp_id: '', // ID
tempName: '' ,//
@ -346,7 +346,7 @@
// "cost": "1",
// "stock": "11",
// "ot_price": "",
// "procure_price": "",
// "wholesale_price": "",
// "bar_code": "666",
// "weight": "10",
// "volume": "5",
@ -364,6 +364,9 @@
}
},
methods: {
changeDelivery(e){
this.setFormData.delivery_way = e.detail.value;
},
//
initDataEditData() {
this.setFormData = {
@ -395,7 +398,7 @@
};
productDetail(this.merId, this.product_id).then(async (res) => {
this.showCommodity = true;
if (res.data.content_arr.length > 0) res.data.content = res.data.content_arr;
if (res.data.content_arr&&res.data.content_arr.length > 0) res.data.content = res.data.content_arr;
let editGoodsDetils = res.data;
Object.keys(this.setFormData).forEach(item => {
this.setFormData[item] = editGoodsDetils[item];
@ -413,6 +416,7 @@
if (res.data.content && typeof res.data.content == 'string') res.data.content = JSON.parse(res.data
.content);
this.setFormData.once_min_count <= 0 ? this.setFormData.once_min_count = '' : null;
this.setFormData.delivery_way = res.data.delivery_way;
//
this.$nextTick(() => {
this.$refs.commodityRef.setDatas({
@ -615,6 +619,7 @@
if (this.setFormData.spec_type == 0) {
console.log('价格库存', this.$refs.priceRef.singleSpecification);
}
if(this.setFormData.delivery_way.length==0) return Toast('请至少选择一种送货方式');
let postData = {
...this.setFormData,
...this.$refs.commodityRef.addGoodsSecoundData,
@ -636,7 +641,7 @@
if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
let showFlag = '';
postData.attrValue.forEach(t => {
if (userInfo?.mer_info?.type_code == "TypeSupplyChain" && (!t.procure_price || +t.procure_price <= 0)) {
if (userInfo.mer_info.wholesale && (!t.wholesale_price || +t.wholesale_price <= 0)) {
showFlag = '批发价不能小于0'
}
if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0';
@ -652,12 +657,12 @@
productUpdate(this.merId, this.product_id, postData)
.then(res => {
hideLoading()
Modal('提交成功', '点击确定,返回商品管理', {
showCancel: false
}).then(() => {
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
uni.redirectTo({
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
})
}).catch(()=>{
uni.navigateBack()
})
})
.catch(rej => {
@ -668,15 +673,15 @@
productCreate(this.merId, postData)
.then(res => {
hideLoading();
Modal('提交成功', '点击确定,返回商品管理', {
showCancel: false,
}).then(() => {
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
if (this.import == 1) {
uni.$emit('importAttrValueOK', this.setFormData.import_id);
uni.navigateBack();
} else uni.redirectTo({
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
})
}).catch(()=>{
uni.navigateBack()
})
})
.catch(rej => {

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

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-bottom: 156rpx;
}
.bar-code{
height: 80rpx;
display: flex;
@ -285,4 +286,11 @@
.margin_right {
background: #FD6523;
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": "",
"ot_price": "",
"price": "",
"wholesale_price": "",
"volume": "",
"weight": "",
},
@ -420,7 +421,7 @@
// flag = false;
// str = '0';
// }
else if ((!item.procure_price||+item.procure_price<=0) && this.userInfo.mer_info.type_code == 'TypeSupplyChain') {
else if ((!item.wholesale_price||+item.wholesale_price<=0) && this.userInfo.mer_info.wholesale) {
flag = false;
str = '批发价不能小于等于0';
}

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 => {
setStorage('editGoodsDetils', res.data);
if(res.data.content_arr.length>0) res.data.content = res.data.content_arr;
if(res.data.content_arr&&res.data.content_arr.length>0) res.data.content = res.data.content_arr;
if(typeof res.data.content == 'string')res.data.content = JSON.parse(res.data.content);
this.$store.commit('setStorage', res.data);
let editGoodsDetils = res.data;

View File

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

View File

@ -271,7 +271,7 @@
if(!postData.unit_name||postData.unit_name?.trim().length<=0)return Toast('请输入商品单位');
let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string')userInfo= JSON.parse(userInfo);
if(userInfo?.mer_info?.type_code=="TypeSupplyChain" && (!postData.attrValue[0]?.procure_price||postData.attrValue[0]?.procure_price<=0) )return Toast('批发价不能小于0');
if(userInfo?.mer_info?.type_code=="TypeSupplyChain" && (!postData.attrValue[0]?.wholesale_price||postData.attrValue[0]?.wholesale_price<=0) )return Toast('批发价不能小于0');
if(!postData.attrValue[0]?.price||postData.attrValue[0]?.price<=0)return Toast('零售价不能小于0');
if(!postData.stock||postData.stock<0)return Toast('库存不能小于0');
// if(!postData.attrValue[0]?.cost||postData.attrValue[0]?.cost<=0)return Toast('0');

Some files were not shown because too many files have changed in this diff Show More