123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362 |
- {template 'common/header'}
- {template 'account/account-header'}
- <div id="js-account-manage-modules-tpl" ng-controller="AccountMangeModulesTpl" ng-cloak>
- {if in_array($owner['uid'], $founders)}
- <div class="panel we7-panel user-permission">
- <div class="panel-heading">
- 主管理员的会员权限
- </div>
- <div class="panel-body we7-padding">
- 全部
- </div>
- </div>
- {/if}
- {if !in_array($owner['uid'], $founders)}
- <!--主管理员会员权限-->
- <div class="panel we7-panel user-permission">
- <div class="panel-heading">
- <span>主管理员: {{owner.group.name}}</span>
-
- {if $_W['role'] == ACCOUNT_MANAGE_NAME_FOUNDER && !in_array($owner['uid'], $founders) || $_W['role'] == ACCOUNT_MANAGE_NAME_VICE_FOUNDER && $owner['uid'] != $_W['uid']}
- <a href="{if $owner['founder_groupid'] == ACCOUNT_MANAGE_GROUP_VICE_FOUNDER}{php echo url('founder/edit/edit_modules_tpl', array('uid' => $owner['uid']))}{else}{php echo url('user/edit/edit_modules_tpl',array('uid'=>$owner['uid']))}{/if}" class="pull-right color-default">修改</a>
- {/if}
-
-
- </div>
- <div class="we7-group-show we7-padding" ng-repeat="module_tpl in modules_tpl">
- <div class="name">
- {{module_tpl.name}}
- </div>
- <div class="group-app-list" >
- <div class="group-app-item" ng-repeat="module in module_tpl[account_type_sign]">
- <img ng-src="{{module.logo}}" class="module-img" alt="">
- <div class="info">
- <div class="title text-over">
- {{module.title}}
- </div>
- <div class="type-list">
- <i ng-class="we7TypeDefault[account_type_sign]['icon']"></i>
- </div>
- </div>
- </div>
- <div class="group-app-item" ng-repeat="module in module_tpl.templates" ng-if="account_type_sign == 'account'">
- <img ng-src="{{module.logo}}" class="template-img" alt="">
- <div class="info">
- <div class="title">
- {{module.title}}
- </div>
- <div class="type-list">
- <i class="wi wi-template"></i>
- </div>
- </div>
- </div>
- </div>
- <a class="action" ></a>
- </div>
- <div class="we7-group-show we7-padding">
- <div class="name">
- 附加应用
- </div>
- <div class="group-app-list" >
- <div class="group-app-item" ng-repeat="module in user_extend_modules">
- <img ng-src="{{module.logo}}" class="module-img" alt="">
- <div class="info">
- <div class="title text-over">
- {{module.title}}
- </div>
- <div class="type-list">
- <i ng-class="we7TypeDefault[account_type_sign]['icon']"></i>
- </div>
- </div>
- </div>
- <div class="group-app-item" ng-repeat="module in module_tpl.templates" ng-if="account_type_sign == 'account'">
- <img ng-src="{{module.logo}}" class="template-img" alt="">
- <div class="info">
- <div class="title">
- {{module.title}}
- </div>
- <div class="type-list">
- <i class="wi wi-template"></i>
- </div>
- </div>
- </div>
- </div>
- <a class="action" ></a>
- </div>
- </div>
-
- <!--附加会员权限-->
- <div class="panel we7-panel user-permission">
- <div class="panel-heading">
- <span>附加应用权限组</span>
-
- {if $_W['role'] == ACCOUNT_MANAGE_NAME_FOUNDER && !in_array($owner['uid'], $founders) || $_W['role'] == ACCOUNT_MANAGE_NAME_VICE_FOUNDER && $owner['uid'] != $_W['uid']}
- <we7-modal-app title="'修改附加应用权限组'" module-list="groupList" multiple="true" on-confirm="changeGroup()"><a href="javascript:;" class="pull-right color-default">修改</a></we7-modal-app>
- {/if}
-
-
-
- </div>
- <div class="we7-group-show we7-padding" ng-repeat="uni_group in extend.groups">
- <div class="name">
- {{uni_group.name}}
- </div>
- <div class="group-app-list" >
- <div class="group-app-item" ng-repeat="module in uni_group[account_type_sign]" ng-if="module[account_type_sign + '_support'] == 2">
- <img ng-src="{{module.logo}}" class="module-img" alt="">
- <div class="info">
- <div class="title text-over">
- {{module.title}}
- </div>
- <div class="type-list">
- <i ng-class="we7TypeDefault[account_type_sign]['icon']"></i>
- </div>
- </div>
- </div>
- <div class="group-app-item" ng-repeat="module in uni_group.templates" ng-if="account_type_sign == 'account'">
- <img ng-src="{{module.logo}}" class="template-img" alt="">
- <div class="info">
- <div class="title">
- {{module.title}}
- </div>
- <div class="type-list">
- <i class="wi wi-template"></i>
- </div>
- </div>
- </div>
- </div>
- <a class="action" ></a>
- </div>
- <div class="we7-empty-block" ng-if="extend.groups | we7IsEmpty">
- 暂无
- </div>
- </div>
- <!-- 附加应用 -->
- <div class="panel we7-panel user-permission">
- <div class="panel-heading">
- <span>附加应用</span>
-
- {if $_W['role'] == ACCOUNT_MANAGE_NAME_FOUNDER && !in_array($owner['uid'], $founders) || $_W['role'] == ACCOUNT_MANAGE_NAME_VICE_FOUNDER && $owner['uid'] != $_W['uid']}
- <we7-modal-app module-list="moduleList" multiple="true" on-confirm="addExtend()"><a href="javascript:;" class="pull-right color-default">修改</a></we7-modal-app>
- {/if}
-
-
- </div>
- <div class="we7-group-show we7-padding">
- <div class="name">
- 附加应用
- </div>
- <div class="group-app-list" >
- <div class="group-app-item" ng-repeat="module in extend.modules" ng-if="module[account_type_sign + '_support'] == 2">
- <img ng-src="{{module.logo}}" class="module-img" alt="">
- <div class="info">
- <div class="title text-over">
- {{module.title}}
- </div>
- <div class="type-list">
- <i ng-class="we7TypeDefault[account_type_sign]['icon']"></i>
- </div>
- </div>
- </div>
- <div class="group-app-item" ng-repeat="module in extend.templates" ng-if="account_type_sign == 'account'">
- <img ng-src="{{module.logo}}" class="template-img" alt="">
- <div class="info">
- <div class="title">
- {{module.title}}
- </div>
- <div class="type-list">
- <i class="wi wi-template"></i>
- </div>
- </div>
- </div>
- </div>
- <a class="action" ></a>
- </div>
- </div>
- {/if}
- {if !empty($account_buy_package) || !empty($account_buy_modules)}
- <div class="panel we7-panel user-permission">
- <div class="panel-heading ">
- 商城购买权限
- </div>
- <div class="panel-body">
-
- {if !empty($account_buy_package)}
- <table class="table we7-table" >
- <tr>
- <th colspan="2" class="text-left">
- <span class="we7-padding-right">商城购买权限组</span>
- <span></span>
- </th>
- <th colspan="4">
- 到期时间
- </th>
- </tr>
- <tbody ng-repeat="package in packagelist">
- <tr>
- <td colspan="3" class="text-left we7-padding-right" ng-init="module_tpl.show = false">
- <span>{{ package['name'] }}</span>
- <span class="text text-danger" ng-if="package.near_expire">即将到期</span>
- </td>
- <td>
- {{ package.expire_time }}
- {if permission_check_account_user('see_account_post_modules_tpl_edit_store_endtime')}<a href="javascript:;" class="color-default" data-toggle="modal" ng-click="editEndTime(package.expire_time, package.order_id)">修改</a>{/if}
- </td>
- <td>
- <a class="color-default" href="{php echo url('site/entry/goodsbuyer', array('direct' => 1, 'operate' => 'goods_info', 'm' => 'store'))}&goods={{ package.goods_id }}">续费</a>
- </td>
- <td>
- <div class="link-group">
- <a href="javascript:;" class="color-default" ng-show="module_tpl.show" ng-click="module_tpl.show = false">收起</a>
- <a href="javascript:;" class="color-default" ng-show="!module_tpl.show" ng-click="module_tpl.show = true">展开</a>
- </div>
- </td>
- </tr>
- <tr ng-show="module_tpl.show">
- <td colspan="5">
- <div class="col-sm-1 color-gray text-left we7-padding-none">{php echo $account->typeName}应用</div>
- <div class="col-sm-11">
- <div class="col-sm-3 text-left we7-margin-bottom"
- {if $account->typeSign == ACCOUNT_TYPE_SIGN} ng-repeat="module in package.account"
- {elseif $account->typeSign == WXAPP_TYPE_SIGN} ng-repeat="module in package.wxapp"
- {elseif $account->typeSign == WEBAPP_TYPE_SIGN} ng-repeat="module in package.webapp"
- {elseif $account->typeSign == PHONEAPP_TYPE_SIGN} ng-repeat="module in package.phoneapp"
- {elseif $account->typeSign == XZAPP_TYPE_SIGN} ng-repeat="module in package.xzapp"
- {elseif $account->typeSign == ALIAPP_TYPE_SIGN} ng-repeat="module in package.aliapp"
- {/if} >
- <div ng-if="module.name != 'all'" class="text-over text-left">
- <img ng-src="{{ module.logo }}" alt="" style="width:50px;height:50px;">
- {{ module.title }}
- </div>
- <label class="label label-info" ng-if="module.name == 'all'">所有模块</label>
- </div>
- </div>
- </td>
- <td class="we7-padding-right color-default"></td>
- </tr>
- {if $account->typeSign == ACCOUNT_TYPE_SIGN}
- <tr ng-show="module_tpl.show">
- <td colspan="5">
- <div class="col-sm-1 color-gray text-left we7-padding-none">模板</div>
- <div class="col-sm-11">
- <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="tpl in package.templates">
- <a href="javascript:;" class="label label-info" ng-bind="tpl.title"></a>
- </div>
- </div>
- </td>
- <td class="we7-padding-right color-default"></td>
- </tr>
- {/if}
- </tbody>
- </table>
- {/if}
- {if !empty($account_buy_modules)}
- <table class="table we7-table" >
- <tr>
- <th colspan="7" class="text-left">
- <span class="we7-padding-right">商城购买模块</span>
- <span></span>
- </th>
- <th class="text-left">
- <span class="we7-padding-right">到期时间</span>
- <span></span>
- </th>
- <th class="text-left">
- <span class="we7-padding-right">操作</span>
- <span></span>
- </th>
- </tr>
- <tbody>
- <tr>
- <td colspan="9">
- {php echo $account->typeName}应用
- </td>
- </tr>
- {loop $account_buy_modules $module}
- {if $module['goods_id']}
- <tr>
- <td>
- <img src="{$module['logo']}" class="img-responsive icon" alt="" style="width:50px;height:50px;">
- </td>
- <td>
- {$module['title']}
- </td>
- <td>
- {php $expire_week = strtotime('-1 week', $module['expire_time']);}
- {if $module['expire_time'] > TIMESTAMP && $expire_week < TIMESTAMP}
- <span class="text text-error">即将到期</span>
- {/if}
- </td>
- <td colspan="5">
- {if $module['expire_time'] < TIMESTAMP}
- 已到期
- {else}
- {php echo date('Y-m-d', $module['expire_time'])}
- {/if}
- {if permission_check_account_user('see_account_post_modules_tpl_edit_store_endtime')}
- <a href="javascript:;" class="color-default" data-toggle="modal" ng-click="editEndTime('{php echo date('Y-m-d', $module['expire_time'])}', {$module['order_id']})">修改</a>
- {/if}
- </td>
- <td class="we7-padding-right color-default">
- {if permission_check_account_user('see_modules_recharge')}
- <a href="{php echo url('site/entry/goodsbuyer', array('direct' => 1, 'operate' => 'goods_info', 'm' => 'store', 'goods' => $module['goods_id']))}">续费</a>
- {/if}
- {if permission_check_account_user('see_modules_deactivate')}
- <a href="{php echo url('site/entry/deactivateOrder', array('direct' => 1, 'm' => 'store', 'order_id' => $module['order_id'], 'goods_id' => $module['goods_id'], 'uniacid' => $uniacid, 'type' => $_GPC['account_type']))}">删除</a>
- {/if}
- </td>
- </tr>
- {/if}
- {/loop}
- </tbody>
- </table>
- {/if}
- <div class="modal fade" id="endtime" role="dialog">
- <div class="we7-modal-dialog modal-dialog we7-form">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
- <div class="modal-title">设置到期时间</div>
- </div>
- <div class="modal-body">
- <div class="form-group">
- {php echo tpl_form_field_date('endtime', '');}
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange()">确定</button>
- <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- </div>
- {/if}
- </div>
- <script>
- angular.module('accountApp').value('config', {
- owner: {php echo !empty($owner) ? json_encode($owner) : 'null'},
-
- packagelist: {php echo !empty($account_buy_package) ? json_encode($account_buy_package) : 'null'},
-
- modules_tpl: {php echo !empty($modules_tpl) ? json_encode($modules_tpl) : 'null'},
- user_extend_modules: {php echo !empty($user_extend_modules) ? json_encode($user_extend_modules) : 'null'},
- extend: {php echo !empty($extend) ? json_encode($extend) : 'null'},
- uni_groups: {php echo !empty($uni_groups) ? json_encode($uni_groups) : 'null'},
- links: {
- postModulesTpl: "{php echo url('account/post/modules_tpl', array('acid' => $acid, 'uniacid' => $uniacid))}",
- },
- modules: {php echo !empty($modules) ? json_encode($modules) : 'null'},
- templates: {php echo !empty($templates) ? json_encode($templates) : 'null'},
- account_type_sign: '{php echo $account->typeSign}',
- });
- angular.bootstrap($('#js-account-manage-modules-tpl'), ['accountApp']);
- </script>
- {template 'common/footer'}
|