|
|
@@ -60,92 +60,11 @@ Page({
|
|
|
functionItems: [
|
|
|
],
|
|
|
// 模块名称
|
|
|
- functionRegionItems: [
|
|
|
- {
|
|
|
- diamondflg: false,
|
|
|
- titlesrc: 'home-add-order.png',
|
|
|
- cardname: '采购管理',
|
|
|
- background: 'linear-gradient(200.98deg, #FFFFFF -13.39%, #A1CDFF 100%)',
|
|
|
- arrowBackground: '#A9CCFF',
|
|
|
- color: '#3785E5',
|
|
|
- image: 'pur-icon',
|
|
|
- items: [
|
|
|
- { code: 'pur-order', url: '/package-purchase/pages/purchase-order/purchase-order', title: '采购订单', color: '#7AADDF' },
|
|
|
- { code: 'pur-enter', url: '/package-purchase/pages/purchase-receipt/purchase-receipt', title: '采购入库', color: '#7AADDF' }
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- diamondflg: true,
|
|
|
- titlesrc: 'home-customer-data.png',
|
|
|
- cardname: '销售管理',
|
|
|
- background: 'linear-gradient(224.58deg, #FFFFFF -11.05%, #FFC9C2 100%)',
|
|
|
- arrowBackground: '#FDD4C7',
|
|
|
- color: '#CC5E64',
|
|
|
- image: 'sale-icon',
|
|
|
- items: [
|
|
|
- { code: 'order', url: '/package-sales/pages/order-billing/order-billing', title: '订单开单', color: '#E6725F' },
|
|
|
- { code: 'order-out', url: '/package-sales/pages/sales-outbound/sales-outbound', title: '销售出库', color: '#E6725F' }
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- diamondflg: false,
|
|
|
- titlesrc: 'home-receive-customer.png',
|
|
|
- background: 'linear-gradient(225.36deg, #FFFFFF -10.7%, #F2D1AC 100%)',
|
|
|
- arrowBackground: '#EABB92',
|
|
|
- color: '#D27E52',
|
|
|
- cardname: '存货管理',
|
|
|
- image: 'ivt-icon',
|
|
|
- items: [
|
|
|
- { code: 'entry-handle', url: '/package-inventory/pages/warehousing-processing/warehousing-processing', title: '入库办理', color: '#EEA05B' },
|
|
|
- { code: 'out-handle', url: '/package-inventory/pages/outbound-processing/outbound-processing', title: '出库办理', color: '#EEA05B' }
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- diamondflg: false,
|
|
|
- titlesrc: 'home-customer-payment.png',
|
|
|
- cardname: '客户管理',
|
|
|
- background: 'linear-gradient(200.98deg, #FFFFFF -13.39%, #D7DFFF 100%)',
|
|
|
- arrowBackground: '#C3D0FF',
|
|
|
- color: '#606EB2',
|
|
|
- image: 'customer-icon',
|
|
|
- items: [
|
|
|
- { code: 'customer', url: '/package-basic-data/pages/customer-list/customer-list', title: '客户档案', color: '#606EB2' },
|
|
|
- { code: 'cus-follow', url: '/package-basic-data/pages/customer-reception/customer-reception', title: '客户跟进', color: '#606EB2' }
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- diamondflg: true,
|
|
|
- titlesrc: 'home-customer-payment.png',
|
|
|
- cardname: '资金管理',
|
|
|
- background: 'linear-gradient(223.67deg, #FFFFFF -15.06%, #FFF5E2 100%)',
|
|
|
- arrowBackground: '#ECD1A7',
|
|
|
- color: '#A5814A',
|
|
|
- image: 'fin-icon',
|
|
|
- items: [
|
|
|
- { code: 'receipt', url: '/package-accounts-manage/pages/receipt/receipt', title: '收款单', color: '#A5814A' },
|
|
|
- { code: 'payment', url: '/package-accounts-manage/pages/payment-order/payment-order', title: '付款单', color: '#A5814A' }
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- diamondflg: false,
|
|
|
- titlesrc: 'home-customer-payment.png',
|
|
|
- cardname: '系统管理',
|
|
|
- background: 'linear-gradient(225.36deg, #FFFFFF -10.7%, #C2DFFF 100%)',
|
|
|
- arrowBackground: '#B7D6FF',
|
|
|
- color: '#89B9FF',
|
|
|
- image: 'analysis-icon',
|
|
|
- items: [
|
|
|
- { code: 'goods-attr', url: '/package-basic-data/pages/product-attribute/product-attribute', title: '商品属性', color: '#89B9FF' },
|
|
|
- { code: 'goods', url: '/package-basic-data/pages/product-file/product-file', title: '商品档案', color: '#89B9FF' }
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
+ functionRegionItems: [],
|
|
|
// 功能模块组件高度和宽度
|
|
|
funcViewHeight: 0,
|
|
|
funcViewWidth: 0,
|
|
|
freeVersionFlag: true,
|
|
|
- // 是否标准版专业版标识
|
|
|
- flgStd: true,
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 切换公司
|
|
|
@@ -449,15 +368,7 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onShow: function name(params) {
|
|
|
- if (app.globalData.company.gradeCode == Constants.gradeCode.STD) {
|
|
|
- this.setData({
|
|
|
- flgStd: true
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.setData({
|
|
|
- flgStd: false
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
// 获取常用菜单
|
|
|
this.getComMenu();
|
|
|
// 查询应收和收款额(本周) 本周数据点击首页就能刷新
|
|
|
@@ -473,6 +384,136 @@ Page({
|
|
|
this.setData({
|
|
|
freeVersionFlag: gradeCode === 'STD'
|
|
|
})
|
|
|
+ // 标准版
|
|
|
+ if (gradeCode == Constants.gradeCode.STD) {
|
|
|
+ this.setData({
|
|
|
+ functionRegionItems: [
|
|
|
+ {
|
|
|
+ diamondflg: false,
|
|
|
+ titlesrc: 'home-add-order.png',
|
|
|
+ cardname: '精准管理',
|
|
|
+ background: 'linear-gradient(200.98deg, #FFFFFF -13.39%, #A1CDFF 100%)',
|
|
|
+ arrowBackground: '#A9CCFF',
|
|
|
+ color: '#3785E5',
|
|
|
+ image: 'pur-icon',
|
|
|
+ subTitle: '助力企业腾飞,共创企业辉煌',
|
|
|
+ items: [
|
|
|
+ { code: 'pur-order', url: '/package-purchase/pages/purchase-order/purchase-order', title: '立即升级', color: '#7AADDF' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ diamondflg: false,
|
|
|
+ titlesrc: 'home-customer-data.png',
|
|
|
+ cardname: '分享不停歇',
|
|
|
+ background: 'linear-gradient(224.58deg, #FFFFFF -11.05%, #FFC9C2 100%)',
|
|
|
+ arrowBackground: '#FDD4C7',
|
|
|
+ color: '#CC5E64',
|
|
|
+ image: 'sale-icon',
|
|
|
+ subTitle: '云币数量涨不停',
|
|
|
+ items: [
|
|
|
+ { code: 'order', url: '/package-sales/pages/order-billing/order-billing', title: '立即分享', color: '#E6725F' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ diamondflg: false,
|
|
|
+ titlesrc: 'home-receive-customer.png',
|
|
|
+ background: 'linear-gradient(225.36deg, #FFFFFF -10.7%, #F2D1AC 100%)',
|
|
|
+ arrowBackground: '#EABB92',
|
|
|
+ color: '#D27E52',
|
|
|
+ cardname: '签到有奖',
|
|
|
+ image: 'ivt-icon',
|
|
|
+ subTitle: '云币不断,快快行动',
|
|
|
+ items: [
|
|
|
+ { code: 'entry-handle', url: '/package-inventory/pages/warehousing-processing/warehousing-processing', title: '立即分享', color: '#EEA05B' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+
|
|
|
+ ],
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.setData({
|
|
|
+ functionRegionItems: [
|
|
|
+ {
|
|
|
+ diamondflg: false,
|
|
|
+ titlesrc: 'home-add-order.png',
|
|
|
+ cardname: '采购管理',
|
|
|
+ background: 'linear-gradient(200.98deg, #FFFFFF -13.39%, #A1CDFF 100%)',
|
|
|
+ arrowBackground: '#A9CCFF',
|
|
|
+ color: '#3785E5',
|
|
|
+ image: 'pur-icon',
|
|
|
+ items: [
|
|
|
+ { code: 'pur-order', url: '/package-purchase/pages/purchase-order/purchase-order', title: '采购订单', color: '#7AADDF' },
|
|
|
+ { code: 'pur-enter', url: '/package-purchase/pages/purchase-receipt/purchase-receipt', title: '采购入库', color: '#7AADDF' }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ diamondflg: true,
|
|
|
+ titlesrc: 'home-customer-data.png',
|
|
|
+ cardname: '销售管理',
|
|
|
+ background: 'linear-gradient(224.58deg, #FFFFFF -11.05%, #FFC9C2 100%)',
|
|
|
+ arrowBackground: '#FDD4C7',
|
|
|
+ color: '#CC5E64',
|
|
|
+ image: 'sale-icon',
|
|
|
+ items: [
|
|
|
+ { code: 'order', url: '/package-sales/pages/order-billing/order-billing', title: '订单开单', color: '#E6725F' },
|
|
|
+ { code: 'order-out', url: '/package-sales/pages/sales-outbound/sales-outbound', title: '销售出库', color: '#E6725F' }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ diamondflg: false,
|
|
|
+ titlesrc: 'home-receive-customer.png',
|
|
|
+ background: 'linear-gradient(225.36deg, #FFFFFF -10.7%, #F2D1AC 100%)',
|
|
|
+ arrowBackground: '#EABB92',
|
|
|
+ color: '#D27E52',
|
|
|
+ cardname: '存货管理',
|
|
|
+ image: 'ivt-icon',
|
|
|
+ items: [
|
|
|
+ { code: 'entry-handle', url: '/package-inventory/pages/warehousing-processing/warehousing-processing', title: '入库办理', color: '#EEA05B' },
|
|
|
+ { code: 'out-handle', url: '/package-inventory/pages/outbound-processing/outbound-processing', title: '出库办理', color: '#EEA05B' }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ diamondflg: false,
|
|
|
+ titlesrc: 'home-customer-payment.png',
|
|
|
+ cardname: '客户管理',
|
|
|
+ background: 'linear-gradient(200.98deg, #FFFFFF -13.39%, #D7DFFF 100%)',
|
|
|
+ arrowBackground: '#C3D0FF',
|
|
|
+ color: '#606EB2',
|
|
|
+ image: 'customer-icon',
|
|
|
+ items: [
|
|
|
+ { code: 'customer', url: '/package-basic-data/pages/customer-list/customer-list', title: '客户档案', color: '#606EB2' },
|
|
|
+ { code: 'cus-follow', url: '/package-basic-data/pages/customer-reception/customer-reception', title: '客户跟进', color: '#606EB2' }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ diamondflg: true,
|
|
|
+ titlesrc: 'home-customer-payment.png',
|
|
|
+ cardname: '资金管理',
|
|
|
+ background: 'linear-gradient(223.67deg, #FFFFFF -15.06%, #FFF5E2 100%)',
|
|
|
+ arrowBackground: '#ECD1A7',
|
|
|
+ color: '#A5814A',
|
|
|
+ image: 'fin-icon',
|
|
|
+ items: [
|
|
|
+ { code: 'receipt', url: '/package-accounts-manage/pages/receipt/receipt', title: '收款单', color: '#A5814A' },
|
|
|
+ { code: 'payment', url: '/package-accounts-manage/pages/payment-order/payment-order', title: '付款单', color: '#A5814A' }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ diamondflg: false,
|
|
|
+ titlesrc: 'home-customer-payment.png',
|
|
|
+ cardname: '系统管理',
|
|
|
+ background: 'linear-gradient(225.36deg, #FFFFFF -10.7%, #C2DFFF 100%)',
|
|
|
+ arrowBackground: '#B7D6FF',
|
|
|
+ color: '#89B9FF',
|
|
|
+ image: 'analysis-icon',
|
|
|
+ items: [
|
|
|
+ { code: 'goods-attr', url: '/package-basic-data/pages/product-attribute/product-attribute', title: '商品属性', color: '#89B9FF' },
|
|
|
+ { code: 'goods', url: '/package-basic-data/pages/product-file/product-file', title: '商品档案', color: '#89B9FF' }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ })
|
|
|
+ }
|
|
|
// 如果企业还有15天到期给出提示信息
|
|
|
let company = app.globalData.company;
|
|
|
if (company && company.endDate) {
|
|
|
@@ -484,7 +525,7 @@ Page({
|
|
|
}
|
|
|
}
|
|
|
// // 判断当前用户是否到期 标准版
|
|
|
- if (app.globalData.company.gradeCode == Constants.gradeCode.STD
|
|
|
+ if (gradeCode == Constants.gradeCode.STD
|
|
|
&& !app.globalData.user.flgInit
|
|
|
&& company
|
|
|
&& company.userEndDate) {
|
|
|
@@ -495,6 +536,7 @@ Page({
|
|
|
util.showToast('企业即将到期,到期日期为【' + company.userEndDate + '】', 5000);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
let res = wx.getSystemInfoSync();
|
|
|
let statusHeight = res.statusBarHeight
|
|
|
this.setData({
|
|
|
@@ -544,18 +586,18 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- // 获取功能卡片模块高度 以便设置水印蒙版高度
|
|
|
- const that = this;
|
|
|
- let query = wx.createSelectorQuery();
|
|
|
- query.select('.func').boundingClientRect(rect => {
|
|
|
- let height = rect.height;
|
|
|
- let width = rect.width;
|
|
|
- that.setData({
|
|
|
- funcViewWidth: width,
|
|
|
- funcViewHeight: height
|
|
|
- })
|
|
|
- that.drawWatermark('watermarkCanvas', '专业版功能', width * 2, height * 2)
|
|
|
- }).exec();
|
|
|
+ // // 获取功能卡片模块高度 以便设置水印蒙版高度
|
|
|
+ // const that = this;
|
|
|
+ // let query = wx.createSelectorQuery();
|
|
|
+ // query.select('.func').boundingClientRect(rect => {
|
|
|
+ // let height = rect.height;
|
|
|
+ // let width = rect.width;
|
|
|
+ // that.setData({
|
|
|
+ // funcViewWidth: width,
|
|
|
+ // funcViewHeight: height
|
|
|
+ // })
|
|
|
+ // that.drawWatermark('watermarkCanvas', '专业版功能', width * 2, height * 2)
|
|
|
+ // }).exec();
|
|
|
|
|
|
//小程序推送消息传过来的值 pages/login/login?loginType=1&otherParam=值
|
|
|
// loginType
|