diff --git a/api/supplier.js b/api/supplier.js
new file mode 100644
index 0000000..83b6ad4
--- /dev/null
+++ b/api/supplier.js
@@ -0,0 +1,27 @@
+import request from "@/utils/requestSupplier.js";
+//报价单列表
+export const bindCradApi = (data) => {
+ return request.post('user/userbank/add_bank', data);
+}
+
+//报价单提交
+export const bankListApi = (data) => {
+ return request.get('bank/bank/lists', data);
+}
+export const amountAccountApi = (data) => {
+ return request.get('user/UserWithdraw/amount_account', data);
+}
+
+
+export const UserWithdrawApi = (data) => {
+ return request.post('user/UserWithdraw/withdraw', data);
+}
+
+
+export const UserWithdrawIndexApi = (data) => {
+ return request.get('user/UserWithdraw/index', data);
+}
+
+export const UserWithdrawListsApi = (data) => {
+ return request.get('user/UserWithdraw/lists', data);
+}
\ No newline at end of file
diff --git a/components/customTab.vue b/components/customTab.vue
index 3ce94ae..0b9040b 100644
--- a/components/customTab.vue
+++ b/components/customTab.vue
@@ -3,17 +3,7 @@
diff --git a/config/app.js b/config/app.js
index 5a95d14..fec7d0c 100644
--- a/config/app.js
+++ b/config/app.js
@@ -13,7 +13,7 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
let openPlantGrass = '-openPlantGrass-'
-let httpSix, httpApi;
+let httpSix, httpApi, httpTwo;
// const env = 'dev'; // 开发
// const env = 'prod'; // 生产
@@ -23,16 +23,19 @@ switch (env) {
case 'prod':
httpApi = 'https://shop.lihaink.cn' // 生产
httpSix = 'https://new-worker.lihaink.cn'
+ httpTwo = 'https://erp.lihaink.cn'
wsApi = 'wss://shop.lihaink.cn'
break;
case 'prew':
httpApi = 'https://test.shop.lihaink.cn' //预发布环境
httpSix = 'https://ceshi-new-wokr.lihaink.cn'
+ httpTwo = 'https://erp.lihaink.cn'
wsApi = 'wss://test.shop.lihaink.cn'
break;
default:
httpApi = "https://crmeb-test.shop.lihaink.cn" // 测试
httpSix = 'https://ceshi-new-wokr.lihaink.cn'
+ httpTwo = 'https://erp.lihaink.cn'
// wsApi = 'ws://192.168.1.22:8324'
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
}
@@ -59,6 +62,7 @@ module.exports = {
VUE_APP_WS_URL: process.env.NODE_ENV == 'development' ? `${wsApi}?type=user` : VUE_APP_WS_URL,
// #endif
HTTP_REQUEST_URL_SIX: httpSix,
+ HTTP_REQUEST_URL_TWO: httpTwo,
openPlantGrass: openPlantGrass,
ENV: env,
HEADER: {
diff --git a/pages.json b/pages.json
index 72e8341..987c2dc 100644
--- a/pages.json
+++ b/pages.json
@@ -55,7 +55,46 @@
"navigationBarTitleText": "批发",
"navigationStyle": "custom"
}
- }, {
+ },
+
+ {
+ "path": "pages/quote/list",
+ "style": {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": "报价",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/quote/index",
+ "style": {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": "报价订单"
+ }
+ },
+ {
+ "path": "pages/quote/supplierFinancialy",
+ "style": {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": "提现"
+ }
+ },
+ {
+ "path": "pages/quote/financialyDeatil",
+ "style": {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": "提现明细"
+ }
+ },
+ {
+ "path": "pages/quote/bindAccout",
+ "style": {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": "账户绑定"
+ }
+ },
+
+ {
"path": "pages/gather/gather",
"style": {
"enablePullDownRefresh": true,
@@ -81,7 +120,7 @@
"path": "pages/order_addcart/order_addcart",
"style": {
"enablePullDownRefresh": true,
- "navigationBarTitleText": "购物车",
+ "navigationBarTitleText": "报价",
"navigationStyle": "custom"
}
}, {
@@ -1628,7 +1667,7 @@
"pagePath": "pages/order_addcart/order_addcart",
"iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png",
- "text": "购物车"
+ "text": "报价"
},
{
"pagePath": "pages/user/index",
diff --git a/pages/order_addcart/order_addcart - 副本.vue b/pages/order_addcart/order_addcart - 副本.vue
new file mode 100644
index 0000000..71d0740
--- /dev/null
+++ b/pages/order_addcart/order_addcart - 副本.vue
@@ -0,0 +1,1581 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+ 购物数量:{{cartTotalCount}}
+
+ {{ footerswitch ? '管理' : '取消'}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.mer_name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{goods.product.store_name}}
+
+ {{goods.productAttr.sku}}
+
+
+
+
+
+ {{ii}}
+
+
+
+
+
+
+ {{goods.product.once_min_count}}件起购,最多{{goods.product.once_max_count}}件
+
+
+
+
+ ¥{{goods.productAttr.price}}
+ /{{goods.productAttr.sku || goods.product.unit_name}}
+
+
+
+
+
+ -
+ {{goods.cart_num}}
+ +
+
+
+
+
+
+
+
+ 失效商品
+ 清空
+
+
+
+
+ 失效
+
+
+
+
+
+ {{item.product.store_name}}
+
+
+
+ 该商品已失效
+
+
+
+
+
+
+
+
+
+
+ 暂无商品,去添加点什么吧
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/order_addcart/order_addcart.vue b/pages/order_addcart/order_addcart.vue
index 71d0740..ca3b046 100644
--- a/pages/order_addcart/order_addcart.vue
+++ b/pages/order_addcart/order_addcart.vue
@@ -1,1581 +1,96 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
- 购物数量:{{cartTotalCount}}
-
- {{ footerswitch ? '管理' : '取消'}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.mer_name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{goods.product.store_name}}
-
- {{goods.productAttr.sku}}
-
-
-
-
-
- {{ii}}
-
-
-
-
-
-
- {{goods.product.once_min_count}}件起购,最多{{goods.product.once_max_count}}件
-
-
-
-
- ¥{{goods.productAttr.price}}
- /{{goods.productAttr.sku || goods.product.unit_name}}
-
-
-
-
-
- -
- {{goods.cart_num}}
- +
-
-
-
-
-
-
-
- 失效商品
- 清空
-
-
-
-
- 失效
-
-
-
-
-
- {{item.product.store_name}}
-
-
-
- 该商品已失效
-
-
-
-
-
-
-
-
-
-
- 暂无商品,去添加点什么吧
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/quote/bindAccout.vue b/pages/quote/bindAccout.vue
new file mode 100644
index 0000000..d6eb6fd
--- /dev/null
+++ b/pages/quote/bindAccout.vue
@@ -0,0 +1,246 @@
+
+
+
+
+ 提现至
+
+
+ {{form.is_own?'对公账户':'个人账户'}}
+
+
+ 账户绑定
+
+
+
+
+
+ {{form.bank_name}}
+ 点击选择开户银行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 审核失败,请重新提交审核
+
+
+
+
+
+
+
+ 请选择银行
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ 请选择提现账户
+
+
+
+ 个人账户
+
+
+ 对公账户
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/quote/financialyDeatil.vue b/pages/quote/financialyDeatil.vue
new file mode 100644
index 0000000..ea2c4c1
--- /dev/null
+++ b/pages/quote/financialyDeatil.vue
@@ -0,0 +1,520 @@
+
+
+
+
+
+ 已提现金额
+
+
+
+
+ 已提现次数
+
+
+
+
+
+
+ {{formatTimestampToYearMonth(nowTimes) }}
+
+
+
+
+
+ 余额提现至
+ ({{item.merchant_bank_info.bank_code.substring(item.merchant_bank_info.bank_code.length - 4)}})
+ {{ item.merchant_bank_info.is_own?"对公" :"个人"}}
+
+
+
+ {{item.merchant_bank_info.bank_info.name }}
+
+ +{{item.amount}}
+
+
+ {{item.create_time}}
+ {{item.is_check==1?'审核通过':item.is_check==2?"审核不通过":"待审核" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/quote/index.vue b/pages/quote/index.vue
new file mode 100644
index 0000000..85258c7
--- /dev/null
+++ b/pages/quote/index.vue
@@ -0,0 +1,672 @@
+
+
+
+
+
+
+ 报价列表
+
+
+ 报价记录{{tabIndex}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{tabIndex==1?"未报价":"已报价" }}
+
+
+
+
+ {{item.goods.name}}
+
+
+ 需求量: {{item.need_num}}{{item.unit_name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/quote/list.vue b/pages/quote/list.vue
new file mode 100644
index 0000000..ce75a2a
--- /dev/null
+++ b/pages/quote/list.vue
@@ -0,0 +1,11 @@
+
+
+ list
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/quote/supplierFinancialy.vue b/pages/quote/supplierFinancialy.vue
new file mode 100644
index 0000000..55a9c79
--- /dev/null
+++ b/pages/quote/supplierFinancialy.vue
@@ -0,0 +1,212 @@
+
+
+
+
+ 账户总余额(元)
+
+
+ ¥{{balance||0.00}}
+
+
+
+
+ 提现至
+
+
+ {{target_bank.is_own?'对公账户':"个人账户"}}
+
+
+ 更换账户
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 说明:用户下单后该订单金额存放在暂存金额中,用户确认收货后次日18:00才可提现该笔订单金额
+ 提货付款订单在完成后次日18:00才可提现
+
+
+
+
+
+ 明细
+
+
+
+
+
+
+ 请选择提现账户
+
+
+
+ 个人账户
+
+
+
+ 对公账户
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/utils/request.js b/utils/request.js
index 0f1f2e8..3d36d12 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -9,13 +9,17 @@
// +----------------------------------------------------------------------
import {
HTTP_REQUEST_URL,
+ HTTP_REQUEST_URL_TWO,
HEADER,
TOKENNAME
} from '@/config/app';
-import { checkLogin } from '../libs/login';
+import {
+ checkLogin
+} from '../libs/login';
import store from '../store';
import pako from '../plugin/pako/pako.es5.min.js'
-function toLogin(){
+
+function toLogin() {
store.commit("LOGOUT");
uni.showToast({
title: '请登录',
@@ -23,40 +27,43 @@ function toLogin(){
duration: 1000
});
}
+
function decompress(str) {
return pako.inflateRaw(base64ToUint8Array(str), {
to: 'string'
});
}
+
function base64ToUint8Array(base64String) {
- let padding = '='.repeat((4 - base64String.length % 4) % 4);
- let base64 = (base64String + padding)
- .replace(/\-/g, '+')
- .replace(/_/g, '/');
- let rawData = atob(base64);
- let outputArray = new Uint8Array(rawData.length);
- for (var i = 0; i < rawData.length; ++i) {
- outputArray[i] = rawData.charCodeAt(i);
- }
- return outputArray;
+ let padding = '='.repeat((4 - base64String.length % 4) % 4);
+ let base64 = (base64String + padding)
+ .replace(/\-/g, '+')
+ .replace(/_/g, '/');
+ let rawData = atob(base64);
+ let outputArray = new Uint8Array(rawData.length);
+ for (var i = 0; i < rawData.length; ++i) {
+ outputArray[i] = rawData.charCodeAt(i);
+ }
+ return outputArray;
}
+
function atob(input) {
- const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
- let str = input.replace(/=+$/, '');
- let output = '';
- if (str.length % 4 === 1) {
- throw new Error('InvalidLengthError');
- }
- for (let i = 0, len = str.length; i < len; i += 4) {
- const a = chars.indexOf(str.charAt(i));
- const b = chars.indexOf(str.charAt(i + 1));
- const c = chars.indexOf(str.charAt(i + 2));
- const d = chars.indexOf(str.charAt(i + 3));
- const sum = (a << 18) | (b << 12) | (c << 6) | d;
- output += String.fromCharCode((sum >> 16) & 0xFF, (sum >> 8) & 0xFF, sum & 0xFF);
- }
-
- return output;
+ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ let str = input.replace(/=+$/, '');
+ let output = '';
+ if (str.length % 4 === 1) {
+ throw new Error('InvalidLengthError');
+ }
+ for (let i = 0, len = str.length; i < len; i += 4) {
+ const a = chars.indexOf(str.charAt(i));
+ const b = chars.indexOf(str.charAt(i + 1));
+ const c = chars.indexOf(str.charAt(i + 2));
+ const d = chars.indexOf(str.charAt(i + 3));
+ const sum = (a << 18) | (b << 12) | (c << 6) | d;
+ output += String.fromCharCode((sum >> 16) & 0xFF, (sum >> 8) & 0xFF, sum & 0xFF);
+ }
+
+ return output;
}
var HTTP_list = new Map();
@@ -67,7 +74,7 @@ var HTTP_list = new Map();
function baseRequest(url, method, data, {
noAuth = false,
noVerify = false,
- enLoad = false //终止上一个接口相同类型正在请求的接口, 防止快速切换tab时页面抖动
+ enLoad = false //终止上一个接口相同类型正在请求的接口, 防止快速切换tab时页面抖动
}) {
let Url = HTTP_REQUEST_URL,
header = HEADER;
@@ -80,16 +87,16 @@ function baseRequest(url, method, data, {
});
}
}
- let URL = Url + '/api/' + url
- if(enLoad) {
- let http = HTTP_list.get(URL);
- if(http){
- http.abort();
- }
- }
- HTTP_list.delete(URL);
+ let URL = Url + '/api/' + url
+ if (enLoad) {
+ let http = HTTP_list.get(URL);
+ if (http) {
+ http.abort();
+ }
+ }
+ HTTP_list.delete(URL);
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
- if(store.state.app.uuid) header['uuid'] = store.state.app.uuid
+ if (store.state.app.uuid) header['uuid'] = store.state.app.uuid
return new Promise((reslove, reject) => {
let http = uni.request({
url: URL,
@@ -98,10 +105,9 @@ function baseRequest(url, method, data, {
data: data || {},
success: (res) => {
if (res.data && res.data.encode) {
- try
- {
+ try {
res.data = JSON.parse(decompress(res.data.data));
- }catch(e){
+ } catch (e) {
res.data = decompress(decodeURI(res.data.data));
}
}
@@ -118,22 +124,22 @@ function baseRequest(url, method, data, {
})
reject(res.data);
} else {
- console.error("请求失败", res)
- reject(res.data.message || '系统错误');
- }
+ console.error("请求失败", res)
+ reject(res.data.message || '系统错误');
+ }
},
fail: (message) => {
reject('请求失败');
},
- complete: () => {
- // if(enLoad) HTTP_list.delete(URL);
- }
+ complete: () => {
+ // if(enLoad) HTTP_list.delete(URL);
+ }
})
- if(enLoad) HTTP_list.set(URL, http);
+ if (enLoad) HTTP_list.set(URL, http);
});
}
const request = {};
['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
request[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
});
-export default request;
+export default request;
\ No newline at end of file
diff --git a/utils/requestSupplier.js b/utils/requestSupplier.js
new file mode 100644
index 0000000..9a026b4
--- /dev/null
+++ b/utils/requestSupplier.js
@@ -0,0 +1,134 @@
+// +----------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +----------------------------------------------------------------------
+// | Author: CRMEB Team
+// +----------------------------------------------------------------------
+import {
+ HTTP_REQUEST_URL_TWO,
+ HEADER,
+
+} from '@/config/app';
+import {
+ checkLogin
+} from '../libs/login';
+import store from '../store';
+import pako from '../plugin/pako/pako.es5.min.js'
+
+let TOKENNAME = 'Token'
+
+function toLogin() {
+
+}
+
+console.log(HTTP_REQUEST_URL_TWO, 'HTTP_REQUEST_URL_TWO')
+
+function decompress(str) {
+ return pako.inflateRaw(base64ToUint8Array(str), {
+ to: 'string'
+ });
+}
+
+function base64ToUint8Array(base64String) {
+ let padding = '='.repeat((4 - base64String.length % 4) % 4);
+ let base64 = (base64String + padding)
+ .replace(/\-/g, '+')
+ .replace(/_/g, '/');
+ let rawData = atob(base64);
+ let outputArray = new Uint8Array(rawData.length);
+ for (var i = 0; i < rawData.length; ++i) {
+ outputArray[i] = rawData.charCodeAt(i);
+ }
+ return outputArray;
+}
+
+function atob(input) {
+ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ let str = input.replace(/=+$/, '');
+ let output = '';
+ if (str.length % 4 === 1) {
+ throw new Error('InvalidLengthError');
+ }
+ for (let i = 0, len = str.length; i < len; i += 4) {
+ const a = chars.indexOf(str.charAt(i));
+ const b = chars.indexOf(str.charAt(i + 1));
+ const c = chars.indexOf(str.charAt(i + 2));
+ const d = chars.indexOf(str.charAt(i + 3));
+ const sum = (a << 18) | (b << 12) | (c << 6) | d;
+ output += String.fromCharCode((sum >> 16) & 0xFF, (sum >> 8) & 0xFF, sum & 0xFF);
+ }
+
+ return output;
+}
+
+var HTTP_list = new Map();
+
+/**
+ * 发送请求
+ */
+function baseRequest(url, method, data, {
+ noAuth = false,
+ noVerify = false,
+ enLoad = false //终止上一个接口相同类型正在请求的接口, 防止快速切换tab时页面抖动
+}) {
+ let Url = HTTP_REQUEST_URL_TWO,
+ header = HEADER;
+ let URL = Url + '/api/' + url
+ if (enLoad) {
+ let http = HTTP_list.get(URL);
+ if (http) {
+ http.abort();
+ }
+ }
+ HTTP_list.delete(URL);
+ if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
+ if (store.state.app.uuid) header['uuid'] = store.state.app.uuid
+ return new Promise((reslove, reject) => {
+ let http = uni.request({
+ url: URL,
+ method: method || 'GET',
+ header: header,
+ data: data || {},
+ success: (res) => {
+ if (res.data && res.data.encode) {
+ try {
+ res.data = JSON.parse(decompress(res.data.data));
+ } catch (e) {
+ res.data = decompress(decodeURI(res.data.data));
+ }
+ }
+ if (noVerify)
+ reslove(res.data, res);
+ else if (res.data.status == 200)
+ reslove(res.data, res);
+ else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
+ toLogin();
+ reject(res.data);
+ } else if (res.data.status == 501) {
+ uni.reLaunch({
+ url: '/pages/error/index'
+ })
+ reject(res.data);
+ } else {
+ console.error("请求失败", res)
+ reject(res.data.message || '系统错误');
+ }
+ },
+ fail: (message) => {
+ reject('请求失败');
+ },
+ complete: () => {
+ // if(enLoad) HTTP_list.delete(URL);
+ }
+ })
+ if (enLoad) HTTP_list.set(URL, http);
+ });
+}
+const request = {};
+['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
+ request[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
+});
+export default request;
\ No newline at end of file