From 51ba561823b2761d245195c7ca97d949ad7849f5 Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 9 Nov 2023 15:57:17 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E7=9B=AE=E5=BD=95?=
=?UTF-8?q?=E3=80=91=E6=9B=B4=E6=96=B0v5.2.1=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../v1/statistic/BalanceStatistic.php | 69 ++++++++
.../v1/statistic/OrderStatistic.php | 68 ++++++++
.../v1/statistic/ProductStatistic.php | 106 ++++++++++++
.../v1/statistic/TradeStatistic.php | 74 +++++++++
.../controller/v1/statistic/UserStatistic.php | 152 ++++++++++++++++++
crmeb/app/dao/order/StoreOrderDao.php | 2 +-
.../services/user/UserBrokerageServices.php | 2 +
.../services/printer/storage/FeiEYun.php | 10 +-
crmeb/public/admin/index.html | 2 +-
.../{app.232e71fd.css => app.9806600e.css} | 2 +-
.../css/chunk-3f40a978.15ff25d0.css | 1 -
.../css/chunk-b17421ce.d36b48d6.css | 1 +
...4d0859.css => chunk-c5ed5c60.b274c9ca.css} | 2 +-
.../js/{app.bc071c4d.js => app.9b70e1d3.js} | 2 +-
.../js/chunk-0dfd6ce5.98a023b1.js | 1 -
...0ba48f81.js => chunk-33f50b83.19281364.js} | 6 +-
.../js/chunk-3f40a978.66e945ee.js | 1 -
.../js/chunk-b17421ce.d68ab905.js | 1 +
.../js/chunk-c5ed5c60.056f50ec.js | 1 +
....45aa3611.js => chunk-vendors.0e9b20a1.js} | 26 +--
crmeb/public/index.html | 2 +-
crmeb/public/install/crmeb.sql | 35 ++++
.../{index.c067094e.js => index.12480fc8.js} | 2 +-
...-user_distribution_level-index.49b97410.js | 1 +
...-user_distribution_level-index.faaede2e.js | 1 -
... pages-users-user_phone-index.2703283f.js} | 2 +-
.../mp_view/components/goodList/index.json | 4 +-
.../mp_view/components/kefuIcon/index.json | 4 +-
.../mp_view/components/recommend/index.json | 4 +-
.../verify/verifyPoint/verifyPoint.json | 4 +-
.../extension/components/shareInfo/index.json | 4 +-
.../lottery/components/lotteryAleart.json | 4 +-
.../goods/lottery/components/noticeBar.json | 4 +-
.../components/lotteryAleart.json | 4 +-
.../pages/index/diy/components/bargain.json | 4 +-
.../pages/index/diy/components/blankPage.json | 4 +-
.../index/diy/components/customerService.json | 4 +-
.../index/diy/components/headerSerch.json | 4 +-
.../pages/index/diy/components/news.json | 4 +-
.../index/diy/components/pictureCube.json | 4 +-
.../index/diy/components/promotionList.json | 4 +-
.../pages/index/diy/components/swiperBg.json | 4 +-
.../pages/index/diy/components/tabNav.json | 4 +-
.../visualization/components/tabBar.json | 4 +-
.../points_mall/component/productWindow.json | 4 +-
.../verify/verifySlider/verifySliderPc.json | 4 +-
.../users/user_distribution_level/index.js | 2 +-
.../users/user_distribution_level/index.wxml | 2 +-
.../users/user_distribution_level/index.wxss | 2 +-
.../statics/mp_view/project.config.json | 33 ++--
50 files changed, 595 insertions(+), 96 deletions(-)
create mode 100644 crmeb/app/adminapi/controller/v1/statistic/BalanceStatistic.php
create mode 100644 crmeb/app/adminapi/controller/v1/statistic/OrderStatistic.php
create mode 100644 crmeb/app/adminapi/controller/v1/statistic/ProductStatistic.php
create mode 100644 crmeb/app/adminapi/controller/v1/statistic/TradeStatistic.php
create mode 100644 crmeb/app/adminapi/controller/v1/statistic/UserStatistic.php
rename crmeb/public/admin/system_static/css/{app.232e71fd.css => app.9806600e.css} (55%)
delete mode 100644 crmeb/public/admin/system_static/css/chunk-3f40a978.15ff25d0.css
create mode 100644 crmeb/public/admin/system_static/css/chunk-b17421ce.d36b48d6.css
rename crmeb/public/admin/system_static/css/{chunk-0dfd6ce5.654d0859.css => chunk-c5ed5c60.b274c9ca.css} (91%)
rename crmeb/public/admin/system_static/js/{app.bc071c4d.js => app.9b70e1d3.js} (97%)
delete mode 100644 crmeb/public/admin/system_static/js/chunk-0dfd6ce5.98a023b1.js
rename crmeb/public/admin/system_static/js/{chunk-4468475e.0ba48f81.js => chunk-33f50b83.19281364.js} (98%)
delete mode 100644 crmeb/public/admin/system_static/js/chunk-3f40a978.66e945ee.js
create mode 100644 crmeb/public/admin/system_static/js/chunk-b17421ce.d68ab905.js
create mode 100644 crmeb/public/admin/system_static/js/chunk-c5ed5c60.056f50ec.js
rename crmeb/public/admin/system_static/js/{chunk-vendors.45aa3611.js => chunk-vendors.0e9b20a1.js} (96%)
rename crmeb/public/static/js/{index.c067094e.js => index.12480fc8.js} (99%)
create mode 100644 crmeb/public/static/js/pages-users-user_distribution_level-index.49b97410.js
delete mode 100644 crmeb/public/static/js/pages-users-user_distribution_level-index.faaede2e.js
rename crmeb/public/static/js/{pages-users-user_phone-index.0faa5fdc.js => pages-users-user_phone-index.2703283f.js} (64%)
diff --git a/crmeb/app/adminapi/controller/v1/statistic/BalanceStatistic.php b/crmeb/app/adminapi/controller/v1/statistic/BalanceStatistic.php
new file mode 100644
index 000000000..376b7e236
--- /dev/null
+++ b/crmeb/app/adminapi/controller/v1/statistic/BalanceStatistic.php
@@ -0,0 +1,69 @@
+services = $services;
+ }
+
+ /**
+ * 余额统计基础信息
+ * @return mixed
+ */
+ public function getBasic()
+ {
+ $data = $this->services->getBasic();
+ return app('json')->success($data);
+ }
+
+ /**
+ * 余额统计趋势图
+ * @return mixed
+ */
+ public function getTrend()
+ {
+ $where = $this->request->getMore([
+ ['time', '']
+ ]);
+ $data = $this->services->getTrend($where);
+ return app('json')->success($data);
+ }
+
+ /**
+ * 余额来源
+ * @return mixed
+ */
+ public function getChannel()
+ {
+ $where = $this->request->getMore([
+ ['time', '']
+ ]);
+ $data = $this->services->getChannel($where);
+ return app('json')->success($data);
+ }
+
+ /**
+ * 余额类型
+ * @return mixed
+ */
+ public function getType()
+ {
+ $where = $this->request->getMore([
+ ['time', '']
+ ]);
+ $data = $this->services->getType($where);
+ return app('json')->success($data);
+ }
+}
diff --git a/crmeb/app/adminapi/controller/v1/statistic/OrderStatistic.php b/crmeb/app/adminapi/controller/v1/statistic/OrderStatistic.php
new file mode 100644
index 000000000..0994e895d
--- /dev/null
+++ b/crmeb/app/adminapi/controller/v1/statistic/OrderStatistic.php
@@ -0,0 +1,68 @@
+services = $services;
+ }
+
+ /**
+ * 订单统计基础信息
+ * @return mixed
+ */
+ public function getBasic()
+ {
+ $where = $this->request->getMore([
+ ['time', '']
+ ]);
+ $data = $this->services->getBasic($where);
+ return app('json')->success($data);
+ }
+
+ /**
+ * 订单统计趋势图
+ * @return mixed
+ */
+ public function getTrend()
+ {
+ $where = $this->request->getMore([
+ ['time', '']
+ ]);
+ $data = $this->services->getTrend($where);
+ return app('json')->success($data);
+ }
+
+ /**
+ * 订单来源
+ * @return mixed
+ */
+ public function getChannel()
+ {
+ $where = $this->request->getMore([
+ ['time', '']
+ ]);
+ $data = $this->services->getChannel($where);
+ return app('json')->success($data);
+ }
+
+ /**
+ * 订单类型
+ * @return mixed
+ */
+ public function getType()
+ {
+ $where = $this->request->getMore([
+ ['time', '']
+ ]);
+ $data = $this->services->getType($where);
+ return app('json')->success($data);
+ }
+}
\ No newline at end of file
diff --git a/crmeb/app/adminapi/controller/v1/statistic/ProductStatistic.php b/crmeb/app/adminapi/controller/v1/statistic/ProductStatistic.php
new file mode 100644
index 000000000..167da5513
--- /dev/null
+++ b/crmeb/app/adminapi/controller/v1/statistic/ProductStatistic.php
@@ -0,0 +1,106 @@
+
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\controller\v1\statistic;
+
+
+use app\adminapi\controller\AuthController;
+use app\services\statistic\ProductStatisticServices;
+use think\facade\App;
+
+/**
+ * Class ProductStatistic
+ * @package app\adminapi\controller\v1\statistic
+ */
+class ProductStatistic extends AuthController
+{
+ /**
+ * ProductStatistic constructor.
+ * @param App $app
+ * @param ProductStatisticServices $services
+ */
+ public function __construct(App $app, ProductStatisticServices $services)
+ {
+ parent::__construct($app);
+ $this->services = $services;
+ }
+
+ /**
+ * 商品基础
+ * @return mixed
+ */
+ public function getBasic()
+ {
+ $where = $this->request->getMore([
+ ['data', '', '', 'time']
+ ]);
+ return app('json')->success($this->services->getBasic($where));
+ }
+
+ /**
+ * 商品趋势
+ * @return mixed
+ */
+ public function getTrend()
+ {
+ $where = $this->request->getMore([
+ ['data', '', '', 'time']
+ ]);
+ $where['time'] = $this->getDay($where['time']);
+ return app('json')->success($this->services->getTrend($where));
+ }
+
+ /**
+ * 商品排行
+ * @return mixed
+ */
+ public function getProductRanking()
+ {
+ $where = $this->request->getMore([
+ ['data', '', '', 'time'],
+ ['sort', '']
+ ]);
+ $where['time'] = $this->getDay($where['time']);
+ return app('json')->success($this->services->getProductRanking($where));
+ }
+
+ /**
+ * 导出
+ * @return mixed
+ */
+ public function getExcel()
+ {
+ $where = $this->request->getMore([
+ ['data', '', '', 'time']
+ ]);
+ $where['time'] = $this->getDay($where['time']);
+ return app('json')->success($this->services->getTrend($where, true));
+ }
+
+ /**
+ * 格式化时间
+ * @param $time
+ * @return string
+ */
+ public function getDay($time)
+ {
+ if (strstr($time, '-') !== false) {
+ [$startTime, $endTime] = explode('-', $time);
+ if (!$startTime || !$endTime) {
+ return date("Y/m/d 00:00:00", strtotime("-30 days", time())) . '-' . date("Y/m/d 23:59:59", time());
+ } else {
+ return date('Y/m/d 00:00:00', strtotime($startTime)).'-'.date('Y/m/d 23:59:59', strtotime($endTime));
+ }
+ } else {
+ return date("Y/m/d 00:00:00", strtotime("-30 days", time())) . '-' . date("Y/m/d 23:59:59", time());
+ }
+ }
+}
diff --git a/crmeb/app/adminapi/controller/v1/statistic/TradeStatistic.php b/crmeb/app/adminapi/controller/v1/statistic/TradeStatistic.php
new file mode 100644
index 000000000..2cded8c94
--- /dev/null
+++ b/crmeb/app/adminapi/controller/v1/statistic/TradeStatistic.php
@@ -0,0 +1,74 @@
+
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\controller\v1\statistic;
+
+
+use app\adminapi\controller\AuthController;
+use app\services\statistic\TradeStatisticServices;
+use think\facade\App;
+
+/**
+ * Class TradeStatistic
+ * @package app\controller\admin\v1\statistic
+ */
+class TradeStatistic extends AuthController
+{
+ /**
+ * TradeStatistic constructor.
+ * @param App $app
+ * @param TradeStatisticServices $services
+ */
+ public function __construct(App $app, TradeStatisticServices $services)
+ {
+ parent::__construct($app);
+ $this->services = $services;
+ }
+
+ /**
+ * 顶部数据
+ * @return mixed
+ */
+ public function topTrade()
+ {
+ $leftToday = $this->services->getTopLeftTrade(['time' => 'today']);
+ $leftyestoday = $this->services->getTopLeftTrade(['time' => 'yestoday']);
+ $rightOne = $this->services->getTopRightOneTrade();
+ $rightTwo = $this->services->getTopRightTwoTrade();
+ $right = ['today' => $rightOne, 'month' => $rightTwo];
+ $totalleft = [$leftToday, $leftyestoday];
+ $left = [];
+ foreach ($totalleft as $k => $v) {
+ $left['name'] = "当日订单金额";
+ $left['x'] = $v['curve']['x'];
+ $left['series'][$k]['money'] = round($v['total_money'], 2);
+ $left['series'][$k]['value'] = array_values($v['curve']['y']);
+ }
+
+ $data['left'] = $left;
+ $data['right'] = $right;
+ return app('json')->success($data);
+ }
+
+ /**
+ * 底部数据
+ * @return mixed
+ */
+ public function bottomTrade()
+ {
+ $day = $this->request->getMore([
+ ['data', ""],
+ ]);
+ $bottom = $this->services->getBottomTrade($day);
+ return app('json')->success($bottom);
+ }
+
+}
diff --git a/crmeb/app/adminapi/controller/v1/statistic/UserStatistic.php b/crmeb/app/adminapi/controller/v1/statistic/UserStatistic.php
new file mode 100644
index 000000000..b515d1fc6
--- /dev/null
+++ b/crmeb/app/adminapi/controller/v1/statistic/UserStatistic.php
@@ -0,0 +1,152 @@
+
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\controller\v1\statistic;
+
+
+use app\adminapi\controller\AuthController;
+use app\services\statistic\UserStatisticServices;
+use think\facade\App;
+
+/**
+ * Class UserStatistic
+ * @package app\adminapi\controller\v1\statistic
+ */
+class UserStatistic extends AuthController
+{
+ /**
+ * UserStatistic constructor.
+ * @param App $app
+ * @param UserStatisticServices $services
+ */
+ public function __construct(App $app, UserStatisticServices $services)
+ {
+ parent::__construct($app);
+ $this->services = $services;
+ }
+
+ /**
+ * 用户基础信息
+ * @return mixed
+ */
+ public function getBasic()
+ {
+ $where = $this->request->getMore([
+ ['channel_type', ''],
+ ['data', '', '', 'time']
+ ]);
+ return app('json')->success($this->services->getBasic($where));
+ }
+
+ /**
+ * 用户趋势
+ * @return mixed
+ */
+ public function getTrend()
+ {
+ $where = $this->request->getMore([
+ ['channel_type', ''],
+ ['data', '', '', 'time']
+ ]);
+ $where['time'] = $this->getDay($where['time']);
+ return app('json')->success($this->services->getTrend($where));
+ }
+
+ /**
+ * 微信用户信息
+ * @return mixed
+ */
+ public function getWechat()
+ {
+ $where = $this->request->getMore([
+ ['channel_type', ''],
+ ['data', '', '', 'time']
+ ]);
+ $where['time'] = $this->getDay($where['time']);
+ return app('json')->success($this->services->getWechat($where));
+ }
+
+ /**
+ * 微信用户趋势
+ * @return mixed
+ */
+ public function getWechatTrend()
+ {
+ $where = $this->request->getMore([
+ ['channel_type', ''],
+ ['data', '', '', 'time']
+ ]);
+ $where['time'] = $this->getDay($where['time']);
+ return app('json')->success($this->services->getWechatTrend($where));
+ }
+
+ /**
+ * 用户地域
+ * @return mixed
+ */
+ public function getRegion()
+ {
+ $where = $this->request->getMore([
+ ['channel_type', ''],
+ ['data', '', '', 'time'],
+ ['sort', 'allNum']
+ ]);
+ $where['time'] = $this->getDay($where['time']);
+ return app('json')->success($this->services->getRegion($where));
+ }
+
+ /**
+ * 用户性别
+ * @return mixed
+ */
+ public function getSex()
+ {
+ $where = $this->request->getMore([
+ ['channel_type', ''],
+ ['data', '', '', 'time']
+ ]);
+ $where['time'] = $this->getDay($where['time']);
+ return app('json')->success($this->services->getSex($where));
+ }
+
+ /**
+ * 用户统计导出
+ * @return mixed
+ */
+ public function getExcel()
+ {
+ $where = $this->request->getMore([
+ ['channel_type', ''],
+ ['data', '', '', 'time']
+ ]);
+ $where['time'] = $this->getDay($where['time']);
+ return app('json')->success($this->services->getTrend($where, true));
+ }
+
+ /**
+ * 格式化时间
+ * @param $time
+ * @return string
+ */
+ public function getDay($time)
+ {
+ if (strstr($time, '-') !== false) {
+ [$startTime, $endTime] = explode('-', $time);
+ if (!$startTime || !$endTime) {
+ return date("Y/m/d 00:00:00", strtotime("-30 days", time())) . '-' . date("Y/m/d 23:59:59", time());
+ } else {
+ return date('Y/m/d 00:00:00', strtotime($startTime)).'-'.date('Y/m/d 23:59:59', strtotime($endTime));
+ }
+ } else {
+ return date("Y/m/d 00:00:00", strtotime("-30 days", time())) . '-' . date("Y/m/d 23:59:59", time());
+ }
+ }
+}
diff --git a/crmeb/app/dao/order/StoreOrderDao.php b/crmeb/app/dao/order/StoreOrderDao.php
index ab16404a8..46daefaed 100644
--- a/crmeb/app/dao/order/StoreOrderDao.php
+++ b/crmeb/app/dao/order/StoreOrderDao.php
@@ -82,7 +82,7 @@ class StoreOrderDao extends BaseDao
$query->where('paid', 1)->where('status', 0)->where('refund_status', 0)->where('shipping_type', 2)->where('is_del', 0);
break;
case 6://已支付 已核销 没有退款
- $query->where('paid', 1)->where('status', 2)->where('refund_status', 0)->where('shipping_type', 2)->where('is_del', 0);
+ $query->where('paid', 1)->whereIn('status', [2,3])->where('refund_status', 0)->where('shipping_type', 2)->where('is_del', 0);
break;
case -1://退款中
$query->where('paid', 1)->whereIn('refund_status', [1, 4])->where('is_del', 0);
diff --git a/crmeb/app/services/user/UserBrokerageServices.php b/crmeb/app/services/user/UserBrokerageServices.php
index 2cc163560..7eee6f744 100644
--- a/crmeb/app/services/user/UserBrokerageServices.php
+++ b/crmeb/app/services/user/UserBrokerageServices.php
@@ -349,6 +349,8 @@ class UserBrokerageServices extends BaseServices
$data['uid'] = $uid;
$data['pm'] = 1;
$data['commissionSum'] = $this->getUsersBokerageSum($data);
+ $extract_fail = $this->dao->sum(['uid' => $uid, 'pm' => 1, 'type' => 'extract_fail'], 'number');
+ $data['commissionSum'] = bcadd($data['commissionSum'], $extract_fail, 2);
$data['pm'] = 0;
$data['commissionRefund'] = $this->getUsersBokerageSum($data);
$data['commissionCount'] = $data['commissionSum'] > $data['commissionRefund'] ? bcsub((string)$data['commissionSum'], (string)$data['commissionRefund'], 2) : 0.00;
diff --git a/crmeb/crmeb/services/printer/storage/FeiEYun.php b/crmeb/crmeb/services/printer/storage/FeiEYun.php
index 87529924e..830537585 100644
--- a/crmeb/crmeb/services/printer/storage/FeiEYun.php
+++ b/crmeb/crmeb/services/printer/storage/FeiEYun.php
@@ -151,11 +151,11 @@ class FeiEYun extends BasePrinter
unset($price);
}
$this->printerContent .= '--------------------------------
';
- $this->printerContent .= '合计:' . number_format($orderInfo['total_price'], 1) . '元
';
- $this->printerContent .= '邮费:' . number_format($orderInfo['pay_postage'], 1) . '元
';
- $this->printerContent .= '优惠:' . number_format($orderInfo['coupon_price'], 1) . '元
';
- $this->printerContent .= '抵扣:' . number_format($orderInfo['deduction_price'], 1) . '元
';
- $this->printerContent .= '实际支付:' . number_format($orderInfo['pay_price'], 1) . '元
';
+ $this->printerContent .= '合计:' . number_format($orderInfo['total_price'], 2) . '元
';
+ $this->printerContent .= '邮费:' . number_format($orderInfo['pay_postage'], 2) . '元
';
+ $this->printerContent .= '优惠:' . number_format($orderInfo['coupon_price'], 2) . '元
';
+ $this->printerContent .= '抵扣:' . number_format($orderInfo['deduction_price'], 2) . '元
';
+ $this->printerContent .= '实际支付:' . number_format($orderInfo['pay_price'], 2) . '元
';
$this->printerContent .= '
e)&&(t+=" ... ")," e)&&(t+=" ... "),"=f())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f().toString(16)+" bytes");return 0|t}function g(t,r){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;var e=(t="string"!=typeof t?""+t:t).length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return I(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return C(t).length;default:if(n)return I(t).length;r=(""+r).toLowerCase(),n=!0}}function y(t,r,e){var i,o=!1;if((r=void 0===r||r<0?0:r)>this.length)return"";if((e=void 0===e||e>this.length?this.length:e)<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":var f=this,u=r,s=e,h=f.length;(!s||s<0||h=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=s.from(r,n)),s.isBuffer(r))return 0===r.length?-1:v(t,r,e,n,i);if("number"==typeof r)return r&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,r,e):v(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,r,e,n,i){var o=1,f=t.length,u=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;f/=o=2,u/=2,e/=2}function s(t,r){return 1===o?t[r]:t.readUInt16BE(r*o)}if(i)for(var h=-1,a=e;a */
-r.read=function(t,r,e,n,i){var o,f,u=8*i-n-1,s=(1<>1,a=-7,c=e?i-1:0,l=e?-1:1;i=t[r+c];for(c+=l,o=i&(1<<-a)-1,i>>=-a,a+=u;0>=-a,a+=n;0>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1;o=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,f=h):(f=Math.floor(Math.log(r)/Math.LN2),r*(n=Math.pow(2,-f))<1&&(f--,n*=2),2<=(r+=1<=f+a?c/n:c*Math.pow(2,1-a))*n&&(f++,n/=2),h<=f+a?(u=0,f=h):1<=f+a?(u=(r*n-1)*Math.pow(2,i),f+=a):(u=r*Math.pow(2,a-1)*Math.pow(2,i),f=0));8<=i;t[e+l]=255&u,l+=p,u/=256,i-=8);for(f=f<>1,a=-7,c=e?i-1:0,l=e?-1:1;i=t[r+c];for(c+=l,o=i&(1<<-a)-1,i>>=-a,a+=u;0>=-a,a+=n;0>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1;o=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,f=h):(f=Math.floor(Math.log(r)/Math.LN2),r*(n=Math.pow(2,-f))<1&&(f--,n*=2),2<=(r+=1<=f+a?c/n:c*Math.pow(2,1-a))*n&&(f++,n/=2),h<=f+a?(u=0,f=h):1<=f+a?(u=(r*n-1)*Math.pow(2,i),f+=a):(u=r*Math.pow(2,a-1)*Math.pow(2,i),f=0));8<=i;t[e+l]=255&u,l+=p,u/=256,i-=8);for(f=f<@^][^\s!#%&*+<=>@^]*>/,I=/a/g,U=/a/g,$=(n=new T(I)!==I,p.MISSED_STICKY),M=p.UNSUPPORTED_Y;j=r&&(!n||$||_||w||b((function(){return U[C]=!1,T(I)!==I||T(U)===U||"/a/i"!==String(T(I,"i"))})));if(u("RegExp",j)){for(var A=function(t,e){var n,r,i=d(x,this),c=l(t),u=void 0===e,s=[],p=t;if(!i&&c&&u&&t.constructor===A)return t;if((c||d(x,t))&&(t=t.source,u)&&(e=m(p)),t=void 0===t?"":f(t),e=void 0===e?"":f(e),p=t,c=e=_&&"dotAll"in I&&(n=!!e&&-1(t||14))return e=i,!0}},h=function(t,e,i){var s,n,a,r,o,l=function l(){var c=(new Date).getTime()-r;cthis.maxOffset&&(t=this.maxOffset),e&&t>0&&t=i.default.toNumber(e)}},watch:{value:function(e){this.inputValue=e,this.changeValue()},type:function(){Object.assign(this,{inputValue:this.value,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}),this.initValue()},dateLabelFormat:function(){this.isDatePickerType&&(this.dateParseValue(this.datePanelValue),this.inputValue=this.multiple?this.dateMultipleLabel:this.datePanelLabel)}},created:function(){this.initValue(),c.GlobalEvent.on(this,"mousewheel",this.handleGlobalMousewheelEvent),c.GlobalEvent.on(this,"mousedown",this.handleGlobalMousedownEvent),c.GlobalEvent.on(this,"keydown",this.handleGlobalKeydownEvent),c.GlobalEvent.on(this,"blur",this.handleGlobalBlurEvent)},mounted:function(){this.dateConfig&&(0,f.warnLog)("vxe.error.removeProp",["date-config"]),this.isDatePickerType&&this.transfer&&document.body.appendChild(this.$refs.panel)},beforeDestroy:function(){var e=this.$refs.panel;e&&e.parentNode&&e.parentNode.removeChild(e)},destroyed:function(){this.numberStopDown(),c.GlobalEvent.off(this,"mousewheel"),c.GlobalEvent.off(this,"mousedown"),c.GlobalEvent.off(this,"keydown"),c.GlobalEvent.off(this,"blur")},render:function(e){var t,n,r,o,s=this.name,l=this.form,c=this.inputType,u=this.inpPlaceholder,d=this.inpMaxlength,f=this.inpReadonly,h=this.className,p=this.controls,m=this.showWordCount,g=this.countMethod,b=this.inputValue,y=this.isDatePickerType,_=this.visiblePanel,k=this.isActivated,S=this.vSize,C=this.type,E=this.align,T=this.readonly,M=this.disabled,D=this.autocomplete,O=[],L=function(e,t){var n=t.$scopedSlots,r=t.prefixIcon,i=[];return n.prefix?i.push(e("span",{class:"vxe-input--prefix-icon"},n.prefix.call(this,{},e))):r&&i.push(e("i",{class:["vxe-input--prefix-icon",r]})),i.length?e("span",{class:"vxe-input--prefix",on:{click:t.clickPrefixEvent}},i):null}(e,this),I=function(e,t){var n=t.$scopedSlots,r=t.inputValue,o=t.isClearable,s=t.disabled,l=t.suffixIcon,c=[];return n.suffix?c.push(e("span",{class:"vxe-input--suffix-icon"},n.suffix.call(this,{},e))):l&&c.push(e("i",{class:["vxe-input--suffix-icon",l]})),o&&c.push(e("i",{class:["vxe-input--clear-icon",a.default.icon.INPUT_CLEAR]})),c.length?e("span",{class:["vxe-input--suffix",{"is--clear":o&&!s&&!(""===r||i.default.eqNull(r))}],on:{click:t.clickSuffixEvent}},c):null}(e,this);L&&O.push(L),O.push(e("input",{ref:"input",class:"vxe-input--inner",domProps:{value:b},attrs:{name:s,form:l,type:c,placeholder:u,maxlength:d,readonly:f,disabled:M,autocomplete:D},on:{keydown:this.keydownEvent,keyup:this.triggerEvent,wheel:this.wheelEvent,click:this.clickEvent,input:this.inputEvent,change:this.changeEvent,focus:this.focusEvent,blur:this.blurEvent}})),I&&O.push(I),O.push(A(e,this)),y&&O.push((s=e,c=(l=this).type,u=l.vSize,f=l.isDatePickerType,D=l.transfer,y=l.animatVisible,t=l.visiblePanel,n=l.panelPlacement,r=l.panelStyle,o=[],f?(o.push("datetime"===c?s("div",{class:"vxe-input--panel-layout-wrapper"},[s("div",{class:"vxe-input--panel-left-wrapper"},w(s,l)),s("div",{class:"vxe-input--panel-right-wrapper"},x(s,l))]):s("div",{class:"vxe-input--panel-wrapper"},("time"===c?x:w)(s,l))),s("div",{ref:"panel",class:["vxe-table--ignore-clear vxe-input--panel","type--".concat(c),(v(f={},"size--".concat(u),u),v(f,"is--transfer",D),v(f,"animat--leave",y),v(f,"animat--enter",t),f)],attrs:{placement:n},style:r},o)):null)),l=!1;return m&&["text","search"].includes(C)&&(l=!0,O.push(e("span",{class:["vxe-input--count",{"is--error":this.isCountError}]},g?"".concat(g({value:b})):"".concat(this.inputCount).concat(d?"/".concat(d):"")))),e("div",{class:["vxe-input","type--".concat(C),h,(v(s={},"size--".concat(S),S),v(s,"is--".concat(E),E),v(s,"is--controls",p),v(s,"is--prefix",!!L),v(s,"is--suffix",!!I),v(s,"is--readonly",T),v(s,"is--visivle",_),v(s,"is--count",l),v(s,"is--disabled",M),v(s,"is--active",k),s)]},O)},methods:{focus:function(){return this.isActivated=!0,this.$refs.input.focus(),this.$nextTick()},blur:function(){return this.$refs.input.blur(),this.isActivated=!1,this.$nextTick()},select:function(){return this.$refs.input.select(),this.isActivated=!1,this.$nextTick()},triggerEvent:function(e){var t=this.$refs,n=this.inputValue;this.$emit(e.type,{$panel:t.panel,value:n,$event:e})},emitModel:function(e,t){this.inputValue=e,this.$emit("modelValue",e),this.$emit("input",{value:e,$event:t}),i.default.toValueString(this.value)!==e&&(this.$emit("change",{value:e,$event:t}),this.$xeform)&&this.$xeformiteminfo&&this.$xeform.triggerItemEvent(t,this.$xeformiteminfo.itemConfig.field,e)},emitInputEvent:function(e,t){var n=this.inpImmediate,r=this.isDatePickerType;this.inputValue=e,r||(n?this.emitModel(e,t):this.$emit("input",{value:e,$event:t}))},inputEvent:function(e){var t=e.target.value;this.emitInputEvent(t,e)},changeEvent:function(e){this.inpImmediate||this.triggerEvent(e)},focusEvent:function(e){this.isActivated=!0,this.isDatePickerType&&this.datePickerOpenEvent(e),this.triggerEvent(e)},blurEvent:function(e){var t=this.inputValue;this.inpImmediate||this.emitModel(t,e),this.afterCheckValue(),this.visiblePanel||(this.isActivated=!1),this.$emit("blur",{value:t,$event:e})},keydownEvent:function(e){var t,n,r,i,a=this.exponential,o=this.controls;this.isNumType&&(t=e.ctrlKey,n=e.shiftKey,r=e.altKey,i=e.keyCode,t||n||r||!(32===i||(!a||69!==i)&&65<=i&&i<=90||186<=i&&i<=188||191<=i)||e.preventDefault(),o)&&this.numberKeydownEvent(e),this.triggerEvent(e)},wheelEvent:function(e){var t;this.isNumType&&this.controls&&this.isActivated&&(0<(t=e.deltaY)?this.numberNextEvent(e):t<0&&this.numberPrevEvent(e),e.preventDefault()),this.triggerEvent(e)},clickEvent:function(e){this.triggerEvent(e)},clickPrefixEvent:function(e){var t=this.$refs,n=this.disabled,r=this.inputValue;n||this.$emit("prefix-click",{$panel:t.panel,value:r,$event:e})},clickSuffixEvent:function(e){var t=this.$refs,n=this.disabled,r=this.inputValue;n||(l.default.hasClass(e.currentTarget,"is--clear")?(this.emitModel("",e),this.clearValueEvent(e,"")):this.$emit("suffix-click",{$panel:t.panel,value:r,$event:e}))},clearValueEvent:function(e,t){var n=this.$refs,r=this.type,i=this.isNumType;this.isDatePickerType&&this.hidePanel(),(i||-1<["text","search","password"].indexOf(r))&&this.focus(),this.$emit("clear",{$panel:n.panel,value:t,$event:e})},parseDate:function(e,t){return"time"===this.type?(0,u.toStringTimeDate)(e):i.default.toStringDate(e,t)},initValue:function(){var e=this.type,t=this.isDatePickerType,n=this.inputValue,r=this.digitsValue;t?this.changeValue():"float"===e&&n&&n!==(t=(0,d.toFloatValueFixed)(n,r))&&this.emitModel(t,{type:"init"})},changeValue:function(){this.isDatePickerType&&(this.dateParseValue(this.inputValue),this.inputValue=this.multiple?this.dateMultipleLabel:this.datePanelLabel)},afterCheckValue:function(){var e=this.type,t=this.exponential,n=this.inpReadonly,r=this.inputValue,a=this.isDatePickerType,o=this.isNumType,s=this.datetimePanelValue,l=this.dateLabelFormat,c=this.min,f=this.max,h=this.firstDayOfWeek;n||(o?r&&(n="integer"===e?i.default.toInteger((0,d.handleNumber)(r)):i.default.toNumber((0,d.handleNumber)(r)),this.vaildMinNum(n)?this.vaildMaxNum(n)||(n=f):n=c,t&&(o=i.default.toValueString(r).toLowerCase())===i.default.toNumber(n).toExponential()&&(n=o),this.emitModel(g(this,n),{type:"check"})):a&&(r?"week"!==e&&"quarter"!==e&&(f=this.parseDate(r,l),i.default.isValidDate(f)?"time"===e?(r!==(f=(0,u.toStringTimeDate)(f))&&this.emitModel(f,{type:"check"}),this.inputValue=f):(c=!1,"datetime"===e?r===i.default.toDateString(this.dateValue,l)&&r===i.default.toDateString(f,l)||(c=!0,s.setHours(f.getHours()),s.setMinutes(f.getMinutes()),s.setSeconds(f.getSeconds())):c=!0,this.inputValue=i.default.toDateString(f,l,{firstDay:h}),c&&this.dateChange(f)):this.dateRevert()):this.emitModel("",{type:"check"})))},passwordToggleEvent:function(e){var t=this.disabled,n=this.readonly,r=this.showPwd;t||n||(this.showPwd=!r),this.$emit("toggle-visible",{visible:this.showPwd,$event:e})},searchEvent:function(e){this.$emit("search-click",{$event:e})},vaildMinNum:function(e){return null===this.min||e>=i.default.toNumber(this.min)},vaildMaxNum:function(e){return null===this.max||e<=i.default.toNumber(this.max)},numberStopDown:function(){clearTimeout(this.downbumTimeout)},numberDownPrevEvent:function(e){var t=this;this.downbumTimeout=setTimeout((function(){t.numberPrevEvent(e),t.numberDownPrevEvent(e)}),60)},numberDownNextEvent:function(e){var t=this;this.downbumTimeout=setTimeout((function(){t.numberNextEvent(e),t.numberDownNextEvent(e)}),60)},numberKeydownEvent:function(e){var t=e.keyCode,n=38===t;!n&&40!==t||(e.preventDefault(),n?this.numberPrevEvent(e):this.numberNextEvent(e))},numberMousedownEvent:function(e){var t,n=this;this.numberStopDown(),0===e.button&&((t=l.default.hasClass(e.currentTarget,"is--prev"))?this.numberPrevEvent(e):this.numberNextEvent(e),this.downbumTimeout=setTimeout((function(){t?n.numberDownPrevEvent(e):n.numberDownNextEvent(e)}),500))},numberPrevEvent:function(e){var t=this.disabled,n=this.readonly,r=this.isDisabledAddNumber;clearTimeout(this.downbumTimeout),t||n||r||this.numberChange(!0,e),this.$emit("prev-number",{$event:e})},numberNextEvent:function(e){var t=this.disabled,n=this.readonly,r=this.isDisabledSubtractNumber;clearTimeout(this.downbumTimeout),t||n||r||this.numberChange(!1,e),this.$emit("next-number",{$event:e})},numberChange:function(e,t){var n=this.min,r=this.max,a=this.type,o=this.inputValue,s=this.stepValue;a="integer"===a?i.default.toInteger((0,d.handleNumber)(o)):i.default.toNumber((0,d.handleNumber)(o)),o=e?i.default.add(a,s):i.default.subtract(a,s),e=this.vaildMinNum(o)?this.vaildMaxNum(o)?o:r:n;this.emitInputEvent(g(this,e),t)},datePickerOpenEvent:function(e){this.readonly||(e.preventDefault(),this.showPanel())},dateMonthHandle:function(e,t){this.selectMonth=i.default.getWhatMonth(e,t,"first")},dateNowHandle:function(){var e=i.default.getWhatDay(Date.now(),0,"first");this.currentDate=e,this.dateMonthHandle(e,0)},dateToggleTypeEvent:function(){var e="month"===(e=this.datePanelType)||"quarter"===e?"year":"month";this.datePanelType=e},datePrevEvent:function(e){var t=this.isDisabledPrevDateBtn,n=this.type,r=this.datePanelType;t||(this.selectMonth="year"===n?i.default.getWhatYear(this.selectMonth,-12,"first"):"month"===n||"quarter"===n?"year"===r?i.default.getWhatYear(this.selectMonth,-12,"first"):i.default.getWhatYear(this.selectMonth,-1,"first"):"year"===r?i.default.getWhatYear(this.selectMonth,-12,"first"):"month"===r?i.default.getWhatYear(this.selectMonth,-1,"first"):i.default.getWhatMonth(this.selectMonth,-1,"first"),this.$emit("date-prev",{type:n,$event:e}))},dateTodayMonthEvent:function(e){this.dateNowHandle(),this.multiple||(this.dateChange(this.currentDate),this.hidePanel()),this.$emit("date-today",{type:this.type,$event:e})},dateNextEvent:function(e){var t=this.isDisabledNextDateBtn,n=this.type,r=this.datePanelType;t||(this.selectMonth="year"===n?i.default.getWhatYear(this.selectMonth,12,"first"):"month"===n||"quarter"===n?"year"===r?i.default.getWhatYear(this.selectMonth,12,"first"):i.default.getWhatYear(this.selectMonth,1,"first"):"year"===r?i.default.getWhatYear(this.selectMonth,12,"first"):"month"===r?i.default.getWhatYear(this.selectMonth,1,"first"):i.default.getWhatMonth(this.selectMonth,1,"first"),this.$emit("date-next",{type:n,$event:e}))},dateSelectEvent:function(e){y(this,e)||this.dateSelectItem(e.date)},dateSelectItem:function(e){var t=this.type,n=this.datePanelType,r=this.multiple,i="week"===t;"month"===t?"year"===n?(this.datePanelType="month",this.dateCheckMonth(e)):(this.dateChange(e),r||this.hidePanel()):"year"===t?(this.dateChange(e),r||this.hidePanel()):"quarter"===t?"year"===n?(this.datePanelType="quarter",this.dateCheckMonth(e)):(this.dateChange(e),r||this.hidePanel()):"month"===n?(this.datePanelType="week"===t?t:"day",this.dateCheckMonth(e)):"year"===n?(this.datePanelType="month",this.dateCheckMonth(e)):(this.dateChange(e),r||this.hidePanel()),i&&this.changeValue()},dateMouseenterEvent:function(e){var t;y(this,e)||("month"===(t=this.datePanelType)?this.dateMoveMonth(e.date):"quarter"===t?this.dateMoveQuarter(e.date):"year"===t?this.dateMoveYear(e.date):this.dateMoveDay(e.date))},dateHourEvent:function(e,t){this.datetimePanelValue.setHours(t.value),this.dateTimeChangeEvent(e)},dateConfirmEvent:function(){var e,t=this.datetimePanelValue,n=this.isDateTimeType,r=this.dateValueFormat,a=this.dateMultipleValue;this.isDateTimeType&&(this.multiple?n?(n=this.dateListValue,e=[],n.forEach((function(n){n&&(n.setHours(t.getHours()),n.setMinutes(t.getMinutes()),n.setSeconds(t.getSeconds()),e.push(n))})),this.emitModel(e.map((function(e){return i.default.toDateString(e,r)})).join(","),{type:"update"})):this.emitModel(a.join(","),{type:"update"}):this.dateChange(this.dateValue||this.currentDate)),this.hidePanel()},dateMinuteEvent:function(e,t){this.datetimePanelValue.setMinutes(t.value),this.dateTimeChangeEvent(e)},dateSecondEvent:function(e,t){this.datetimePanelValue.setSeconds(t.value),this.dateTimeChangeEvent(e)},dateTimeChangeEvent:function(e){this.datetimePanelValue=new Date(this.datetimePanelValue.getTime()),this.updateTimePos(e.currentTarget)},updateTimePos:function(e){var t;e&&(t=e.offsetHeight,e.parentNode.scrollTop=e.offsetTop-4*t)},dateMoveDay:function(e){y(this,{date:e})||(this.dayList.some((function(t){return i.default.isDateSame(t.date,e,"yyyyMMdd")}))||this.dateCheckMonth(e),this.dateParseValue(e))},dateMoveMonth:function(e){y(this,{date:e})||(this.monthList.some((function(t){return i.default.isDateSame(t.date,e,"yyyyMM")}))||this.dateCheckMonth(e),this.dateParseValue(e))},dateMoveQuarter:function(e){y(this,{date:e})||(this.quarterList.some((function(t){return i.default.isDateSame(t.date,e,"yyyyq")}))||this.dateCheckMonth(e),this.dateParseValue(e))},dateMoveYear:function(e){y(this,{date:e})||(this.yearList.some((function(t){return i.default.isDateSame(t.date,e,"yyyy")}))||this.dateCheckMonth(e),this.dateParseValue(e))},dateParseValue:function(e){var t=this.type,n=this.dateLabelFormat,r=this.valueFormat,a=this.firstDayOfWeek,o=null,s="";e&&(o=this.parseDate(e,r)),i.default.isValidDate(o)?(s=i.default.toDateString(o,n,{firstDay:a}),n&&"week"===t&&i.default.getWhatWeek(o,0,a,a).getFullYear()>16)+(t>>16)+(n>>16)<<16|65535&n}),f.getCtx=d,e.exports=f},"74dc":function(e,t,n){!function(e){"use strict";
//! moment.js locale configuration
-e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n("c1df"))},"74e8":function(e,t,n){"use strict";function r(e,t){ee(e);for(var n=0,r=t.length,i=new e(r);n