Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
evoxwht committed Feb 16, 2023
1 parent 3e0f798 commit c963fd6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions crmeb/app/adminapi/controller/v1/order/StoreOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public function lst()
]);
$where['is_system_del'] = 0;
$where['pid'] = 0;
if ($where['status'] == 1) $where = $where + ['shipping_type' => 1];
return app('json')->success($this->services->getOrderList($where, ['*'], ['split' => function ($query) {
$query->field('id,pid');
}, 'pink', 'invoice', 'division']));
Expand Down
2 changes: 1 addition & 1 deletion crmeb/app/services/agent/AgentManageServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function agentSystemPage(array $where, $is_page = true)
$item['new_money'] = bcsub((string)$item['brokerage_price'], (string)$item['broken_commission'], 2);
else
$item['new_money'] = 0;
$item['brokerage_money'] = $item['brokerage_price'];
$item['brokerage_money'] = bcadd((string)$item['brokerage_price'], (string)$item['extract_count_price'], 2);
unset($item['extract'], $item['order'], $item['bill'], $item['spreadUser'], $item['spreadCount']);
if (strpos($item['headimgurl'], '/statics/system_images/') !== false) {
$item['headimgurl'] = set_file_url($item['headimgurl']);
Expand Down
4 changes: 2 additions & 2 deletions crmeb/app/services/order/StoreOrderRefundServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ public function agreeRefund(int $id, array $refundData)

return $splitOrderInfo;
});
//处理开票
app()->make(StoreOrderInvoiceServices::class)->update(['order_id' => $order['id']], ['is_refund' => 1]);
//订单退款记录
ProductLogJob::dispatch(['refund', ['uid' => $order['uid'], 'order_id' => $order['id']]]);
//订单同意退款事件
event('order.refund', [$refundData, $order, 'order_refund']);
event('notice.notice', [['data' => $refundData, 'order' => $order], 'order_refund']);
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion crmeb/app/services/user/UserBillServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ public function getCommissionList(array $where, int $limit = 0)
$userExtract = app()->make(UserExtractServices::class);
$extractSumList = $userExtract->getUsersSumList($uids);
foreach ($list as &$item) {
$item['sum_number'] = $item['income'] > $item['pay'] ? bcsub($item['income'], $item['pay'], 2) : 0;
$item['sum_number'] = $item['income'];
$item['nickname'] = $item['nickname'] . "|" . ($item['phone'] ? $item['phone'] . "|" : '') . $item['uid'];
$item['extract_price'] = $extractSumList[$item['uid']] ?? 0;
$item['time'] = $item['time'] ? date('Y-m-d H:i:s', $item['time']) : '';
Expand Down
14 changes: 7 additions & 7 deletions crmeb/public/install/crmeb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33326,13 +33326,13 @@ INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config
(33, 'offline_postage', 'radio', 'input', 27, '1=>包邮\n0=>不包邮', 1, '', 0, 0, '0', '线下支付是否包邮', '用户选择线下支付时是否包邮', 97, 1),
(34, 'integral_ratio', 'text', 'input', 11, '', 0, 'number:true', 100, 0, '\"0.1\"', '积分抵用', '积分抵用比例(1积分抵多少金额)单位:元', 10, 1),
(44, 'store_user_min_recharge', 'text', 'number', 28, '', 1, 'required:true,number:true,min:0', 100, 0, '0.01', '用户最低充值金额', '用户单次最低充值金额', 3, 1),
(46, 'system_express_app_code', 'text', 'input', 92, '', 1, '', 0, 0, '\"\"', '快递查询密钥', '阿里云云市场快递查询接口密钥购买地址:http://market.aliyun.com/products/57126001/cmapi021863.html?spm=5176.2020520132.101.4.42a672183nvgfH#sku=yuncode1586300000', 0, 1),
(46, 'system_express_app_code', 'text', 'input', 92, '', 1, '', 0, 0, '\"\"', '快递查询密钥', '阿里云云市场快递查询接口密钥购买地址:https://market.aliyun.com/products/57126001/cmapi021863.html?spm=5176.2020520132.101.4.42a672183nvgfH#sku=yuncode1586300000', 0, 1),
(49, 'store_brokerage_ratio', 'text', 'input', 73, '', 0, 'required:true,min:0,max:100,number:true', 100, 0, '\"10\"', '一级返佣比例', '订单交易成功后给上级返佣的比例0 - 100,例:5 = 反订单商品金额的5%', 5, 1),
(53, 'user_extract_min_price', 'text', 'input', 74, '', 0, 'required:true,number:true,min:0', 100, 0, '\"1\"', '提现最低金额', '用户提现最低金额限制', 0, 1),
(58, 'replenishment_num', 'text', 'number', 27, '', 0, 'required:true,number:true,min:0', 100, 0, '5', '待补货数量', '商品待补货数量低于多少时,提示补货', 0, 1),
(59, 'routine_appId', 'text', 'input', 7, '', 0, '', 100, 0, '\"\"', 'appId', '小程序appID', 0, 1),
(60, 'routine_appsecret', 'text', 'input', 7, '', 0, '', 100, 0, '\"\"', 'AppSecret', '小程序AppSecret', 0, 1),
(61, 'api', 'text', 'input', 2, '', 1, '', 0, 0, '\"\\/api\\/wechat\\/serve\"', '接口地址', '配置服务器域名使用的接口地址,填入http://您的域名/api/wechat/serve', 92, 1),
(61, 'api', 'text', 'input', 2, '', 1, '', 0, 0, '\"\\/api\\/wechat\\/serve\"', '接口地址', '配置服务器域名使用的接口地址,填入https://您的域名/api/wechat/serve', 92, 1),
(74, 'routine_name', 'text', 'input', 7, '', 0, '', 100, 0, '\"\"', '小程序名称', '小程序名称', 0, 1),
(77, 'store_stock', 'text', 'number', 27, '', 1, '', 0, 0, '\"2\"', '警戒库存', '商品待补货数量低于多少时,提示库存不足', 0, 1),
(85, 'stor_reason', 'textarea', 'input', 71, '', 1, '', 100, 8, '\"\\u6536\\u8d27\\u5730\\u5740\\u586b\\u9519\\u4e86\\n\\u4e0e\\u63cf\\u8ff0\\u4e0d\\u7b26\\n\\u4fe1\\u606f\\u586b\\u9519\\u4e86\\uff0c\\u91cd\\u65b0\\u62cd\\n\\u6536\\u5230\\u5546\\u54c1\\u635f\\u574f\\u4e86\\n\\u672a\\u6309\\u9884\\u5b9a\\u65f6\\u95f4\\u53d1\\u8d27\\n\\u5176\\u5b83\\u539f\\u56e0\"', '退货理由', '配置退货理由,一行一个理由', 0, 1),
Expand All @@ -33353,7 +33353,7 @@ INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config
(138, 'h5_avatar', 'upload', 'input', 101, '', 1, '', 0, 0, '\"\\/statics\\/system_images\\/default_avatar.jpeg\"', '用户默认头像', '用户默认头像,后台添加用户以及用户登录的默认头像显示,尺寸(80*80)', 3, 1),
(139, 'offline_pay_status', 'radio', 'input', 109, '1=>开启\n2=>关闭', 1, '', 0, 0, '\"1\"', '线下支付', '线下支付请选择开启或关闭', 89, 1),
(141, 'recharge_switch', 'radio', 'input', 28, '1=>开启\n0=>关闭', 1, '', 0, 0, '0', '小程序充值开关', '仅小程序端的充值开关,小程序提交审核前,需要关闭此功能', 4, 1),
(142, 'tengxun_map_key', 'text', 'input', 26, '', 1, '', 0, 0, '\"SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7\"', '腾讯地图KEY', '腾讯地图KEY,申请地址:http://lbs.qq.com', 0, 1),
(142, 'tengxun_map_key', 'text', 'input', 26, '', 1, '', 0, 0, '\"SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7\"', '腾讯地图KEY', '腾讯地图KEY,申请地址:https://lbs.qq.com', 0, 1),
(143, 'store_self_mention', 'radio', 'input', 27, '1=>开启\n0=>关闭', 1, '', 0, 0, '1', '是否开启到店自提', '开启后下单页面支持到店自提,需要在设置->发货设置->提货点设置中添加提货点,关闭则隐藏此功能', 95, 1),
(145, 'pay_success_printing_switch', 'radio', 'input', 86, '1=>开\n0=>关', 1, '', 0, 0, '0', '小票打印开关', '支付成功自动小票打印功能,需要购买易联云K4或者K6无线打印机,或者购买飞鹅云V58系列', 10, 1),
(146, 'develop_id', 'text', 'input', 87, '', 1, '', 0, 0, '\"\"', '开发者ID', '易联云申请应用后页面开发者信息中的用户ID', 0, 1),
Expand Down Expand Up @@ -33397,14 +33397,14 @@ INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config
(288, 'alipay_public_key', 'textarea', '', 63, '', 1, '', 100, 5, '\"\"', '支付应用公钥', '支付宝加签完成后申城的支付宝公钥', 0, 1),
(289, 'alipay_merchant_private_key', 'textarea', '', 63, '', 0, '', 100, 5, '\"\"', '支付应用私钥', '支付应用私钥', 0, 1),
(290, 'ali_pay_appid', 'text', 'input', 63, '', 0, '', 100, 0, '\"\"', '支付应用Appid', '支付应用Appid', 91, 1),
(291, 'logistics_type', 'radio', 'input', 91, '1=>一号通\n2=>阿里云物流查询', 1, '', 0, 0, '1', '接口选择', '建议使用一号通更方便不用配置密钥,阿里云云市场购买链接:http://0x9.me/w9vnq', 0, 1),
(292, 'system_product_copy_type', 'radio', 'input', 89, '1=>一号通\n2=>99Api', 1, '', 0, 0, '1', '接口选择', '采集商品接口选择,一号通快速注册开通使用不用配置apikey,或者去99api网址:http://www.99api.com/注册帐号,推荐一号通方便快捷', 999, 1),
(291, 'logistics_type', 'radio', 'input', 91, '1=>一号通\n2=>阿里云物流查询', 1, '', 0, 0, '1', '接口选择', '建议使用一号通更方便不用配置密钥,阿里云云市场购买链接:https://0x9.me/w9vnq', 0, 1),
(292, 'system_product_copy_type', 'radio', 'input', 89, '1=>一号通\n2=>99Api', 1, '', 0, 0, '1', '接口选择', '采集商品接口选择,一号通快速注册开通使用不用配置apikey,或者去99api网址:https://www.99api.com/注册帐号,推荐一号通方便快捷', 999, 1),
(299, 'config_export_id', 'text', 'input', 94, '', 1, '', 0, 0, '\"\"', '快递公司', '快递公司', 0, 0),
(300, 'config_export_temp_id', 'text', 'input', 94, '', 1, '', 0, 0, '\"\"', '快递模板', '快递模板', 0, 0),
(301, 'config_export_to_name', 'text', 'input', 94, '', 1, '', 0, 0, '\"\"', '发货人姓名', '快递面单发货人姓名', 0, 1),
(302, 'config_export_to_tel', 'text', 'input', 94, '', 1, '', 0, 0, '\"\"', '发货人电话', '快递面单发货人电话', 0, 1),
(303, 'config_export_to_address', 'text', 'input', 94, '', 1, '', 0, 0, '\"\"', '发货人详细地址', '快递面单发货人详细地址', 0, 1),
(304, 'config_export_siid', 'text', 'input', 94, '', 1, '', 0, 0, '\"\"', '电子面单打印机编号', '请购买快递100二代云打印机(KX100L3),官网:http://www.kuaidi100.com/cloud/print/cloudprinterSecond.shtml', 0, 1),
(304, 'config_export_siid', 'text', 'input', 94, '', 1, '', 0, 0, '\"\"', '电子面单打印机编号', '请购买快递100二代云打印机(KX100L3),官网:https://www.kuaidi100.com/cloud/print/cloudprinterSecond.shtml', 0, 1),
(305, 'service_feedback', 'textarea', 'input', 69, '', 1, '', 100, 7, '\"\\u5c0a\\u656c\\u7684\\u7528\\u6237\\uff0c\\u5ba2\\u670d\\u5f53\\u524d\\u4e0d\\u5728\\u7ebf\\uff0c\\u6709\\u95ee\\u9898\\u8bf7\\u7559\\u8a00\\uff0c\\u6211\\u4eec\\u4f1a\\u7b2c\\u4e00\\u65f6\\u95f4\\u8fdb\\u884c\\u5904\\u7406\\uff01\\uff01\\uff01\"', '客服反馈', '暂无客服在线是,联系客服跳转的客服反馈页面的显示文字', 0, 1),
(307, 'integral_max_num', 'text', 'input', 11, '', 0, '', 100, 0, '\"100\"', '积分抵扣上限', '单次下单积分使用上限,0不限制', 0, 1),
(308, 'brokerage_type', 'radio', 'input', 74, '0=>线下手动转账\n1=>自动到微信零钱', 1, '', 0, 0, '0', '佣金到账方式', '佣金到账方式支持线下转账和微信零钱自动转账,手动转账更安全,自动转账更方便', 0, 1),
Expand Down Expand Up @@ -34726,7 +34726,7 @@ INSERT INTO `eb_system_notification` (`id`, `mark`, `name`, `title`, `is_system`
(21, 'order_postage_success', '发货快递提醒发送', '发货快递用户提醒发送', 1, 0, 1, 1, 2, 0, '发货通知', '亲爱的用户{nickname}您的商品{store_name},订单号{order_id}已发货,请注意查收', 0, '520269', '亲爱的用户{$nickname}您的商品{$store_name},订单号{$order_id}已发货,请注意查收', 16, 5, '0', '{nickname}用户昵称,{store_name}商品名称,{order_id}订单号,{delivery_name}快递名称,{delivery_id}快递单号,{user_address}收货地址', '', 1, 0),
(22, 'send_order_pink_clone', '取消拼团提醒发送', '取消拼团给用户提醒发送', 1, 0, 1, 0, 0, 0, '取消拼团通知', '亲,您的拼团取消,活动名称{title}', 0, '0', '', 24, 15, '0', '{title}活动名称{count}拼团人数', '', 1, 0),
(23, 'can_pink_success', '参团成功提醒发送', '参团成功给用户提醒发送', 1, 0, 1, 0, 0, 0, '参团成功通知', '亲,您已成功参与拼团,活动名称{title}', 0, '0', '', 23, 6, '0', '{title}活动名称,{nickname}团长,{count}拼团人数,{pink_time}开团时间', '', 1, 0),
(24, 'kefu_send_extract_application', '提现申请给客服发消息', '提现申请给客服发消息', 1, 0, 0, 0, 0, 1, '你有个新的提现申请待处理', '您有一笔提现申请待处理,提现金额{money}!', 0, '0', '', 0, 0, '您有个提现申请请注意查收\\n>提现金额{money}', '{nickname}用户昵称,{money}提现金额', 'http://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ae3s-safwea-aa', 2, 0),
(24, 'kefu_send_extract_application', '提现申请给客服发消息', '提现申请给客服发消息', 1, 0, 0, 0, 0, 1, '你有个新的提现申请待处理', '您有一笔提现申请待处理,提现金额{money}!', 0, '0', '', 0, 0, '您有个提现申请请注意查收\\n>提现金额{money}', '{nickname}用户昵称,{money}提现金额', 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ae3s-safwea-aa', 2, 0),
(25, 'send_admin_confirm_take_over', '收货给客服发消息', '收货给客服发消息', 1, 0, 1, 0, 2, 1, '你有个新的用户收货待处理', '您有一笔订单已经确认收货,订单号{order_id}!', 0, '520422', '{$admin_name}管理员,您有一笔订单已经确认收货,订单号{$order_id}!', 0, 0, '您有个订单确认收货\\n>订单号{order_id}', '{storeTitle}商品名称,{order_id}订单号', '', 2, 0),
(26, 'order_pay_false', '提醒付款通知', '提醒付款通知用户提醒发送', 1, 0, 1, 0, 2, 0, '提醒付款通知', '您有未付款订单,订单号为:{order_id},商品数量有限,请及时付款。', 0, '528116', '您有未付款订单,订单号为:{$order_id},商品数量有限,请及时付款。', 40, 0, '0', '', '', 1, 0),
(27, 'verify_code', '短信验证码', '短信验证码', 0, 0, 0, 0, 2, 0, '短信验证码', '您的验证码是:{code},有效期为{time}分钟。如非本人操作,可不予理会。', 0, '538393', '您的验证码是:{$code},有效期为{$time}分钟。如非本人操作,可不予理会。', 0, 0, '0', '', '', 1, 0);
Expand Down
4 changes: 2 additions & 2 deletions template/admin/src/pages/setting/multiLanguage/langList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<Card :bordered="false" dis-hover>
<Row type="flex">
<Col>
<Button type="primary" icon="md-add" @click="add">添加语言</Button>
<Button type="primary" icon="md-add" @click="add">添加词汇</Button>
</Col>
</Row>
<Table
Expand Down Expand Up @@ -88,7 +88,7 @@
<Modal
v-model="addlangModal"
width="750"
title="添加语言"
title="添加词汇"
:loading="FormLoading"
@on-ok="ok"
@on-cancel="addlangModal = false"
Expand Down

0 comments on commit c963fd6

Please sign in to comment.