|
@@ -258,10 +258,14 @@ const projTreeObj = {
|
|
|
name: "分享",
|
|
|
icon: 'fa-share',
|
|
|
disabled: function () {
|
|
|
+ let selectedItem = projTreeObj.tree.selected;
|
|
|
return true;
|
|
|
+ // return !(selectedItem && selectedItem.data.projType === projectType.tender);
|
|
|
},
|
|
|
callback: function (key, opt) {
|
|
|
-
|
|
|
+ $('#share-info').hide();
|
|
|
+ $('#share').find('.card').hide();
|
|
|
+ $('#share').modal('show');
|
|
|
}
|
|
|
},
|
|
|
}
|
|
@@ -2814,4 +2818,54 @@ function refreshTenderFile(tenders, type, newName){
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-//获取当前版本信息
|
|
|
+//添加分享
|
|
|
+$('#sharePhone').change(function () {
|
|
|
+ let phone = $(this).val();
|
|
|
+ let hintInfo = $('#share-info');
|
|
|
+ if(!phone || phone.trim() === ''){
|
|
|
+ replaceClass(hintInfo, 'text-info', 'text-danger');
|
|
|
+ setDangerInfo(hintInfo, '请输入手机号码。', true);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //根据手机号获取用户
|
|
|
+ CommonAjax.post('/user/getUserByMobile', {mobile: phone}, function (rstData) {
|
|
|
+ if(!rstData){
|
|
|
+ replaceClass(hintInfo, 'text-info', 'text-danger');
|
|
|
+ setDangerInfo(hintInfo, '账号不存在。', true);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ console.log(rstData);
|
|
|
+ $('#user_name').text(rstData.real_name ? rstData.real_name : '');
|
|
|
+ $('#user_company').text(rstData.company ? rstData.company : '');
|
|
|
+ $('#user_mobile').text(rstData.mobile ? rstData.mobile : '');
|
|
|
+ $('#user_email').text(rstData.email ? rstData.email : '');
|
|
|
+ $('#share').find('.card').show();
|
|
|
+ //判断项目是否已经分享
|
|
|
+ //CommonAjax.post('/pm/api/getProjectShareInfo');
|
|
|
+ }
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
+function shareTender(){
|
|
|
+ let phone = $('#sharePhone').val();
|
|
|
+ let hintInfo = $('#share-info');
|
|
|
+ if(!phone || phone.trim() === ''){
|
|
|
+ replaceClass(hintInfo, 'text-info', 'text-danger');
|
|
|
+ setDangerInfo(hintInfo, '请输入手机号码。', true);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //根据手机号获取用户
|
|
|
+ CommonAjax.post('/user/getUserByMobile', {mobile: phone}, function (rstData) {
|
|
|
+ if(!rstData){
|
|
|
+ replaceClass(hintInfo, 'text-info', 'text-danger');
|
|
|
+ setDangerInfo(hintInfo, '账号不存在。', true);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ $('#user_name').text(rstData.real_name ? rstData.real_name : '');
|
|
|
+ $('#user_company').text(rstData.company ? rstData.company : '');
|
|
|
+ $('#user_mobile').text(rstData.mobile ? rstData.mobile : '');
|
|
|
+ $('#user_email').text(rstData.email ? rstData.email : '');
|
|
|
+ $('#share').find('.card').show();
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|