12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351 |
- /**
- * Created by pushkeji on 2018/8/16.
- */
- angular.module('push')
- .controller('technicalawardapplicationCtrl', ['$scope', '$stateParams', '$ionicActionSheet', '$ionicLoading', '$ionicScrollDelegate', 'UtilService', 'dataToolsService', '$sce', 'AccountService', 'UserService', '$ionicSlideBoxDelegate', '$timeout', '$state', '$http', 'ConfigService', 'CommonService', '$ionicPopup', 'ResourceLibraryService', 'taskModuleService', 'ScienceCircleService', '$ionicModal', '$q', function ($scope, $stateParams, $ionicActionSheet, $ionicLoading, $ionicScrollDelegate, UtilService, dataToolsService, $sce, AccountService, UserService, $ionicSlideBoxDelegate, $timeout, $state, $http, ConfigService, CommonService, $ionicPopup, ResourceLibraryService, taskModuleService, ScienceCircleService, $ionicModal, $q) {
- console.log($stateParams);
- // 弹出任务邀请框
- $scope.defaultLan = UserService.defaultLan;
- $scope.tempData = {};
- $scope.node = UserService.node;
- $scope.resid = $stateParams.resid;
- $scope.restype = $stateParams.restype;
- $scope.list = $stateParams.list;
- $scope.flag = $stateParams.flag;
- $scope.userid = UserService.id;
- $scope.org = {};
- var tecBrokerPictureList = [];
- var getTechnicalAwardDetail = function (needInsertDBFlag) {
- AccountService.getTechnicalAwardDetail($scope.userid, $scope.resid, $scope.node, needInsertDBFlag, 0, 0, $scope.restype).then(function (res) {
- if (res.code == 3350) {
- var data = res.data;
- $scope.list.restype= res.data.demandReward.restype
- $scope.applyname = data.sysUsersInfo.applyname;
- $scope.certificate = data.sysUsersInfo.brokercertificate;
- $scope.tel = data.sysUsersInfo.tel;
- $scope.orgname = data.orgName;
- $scope.org.orgtel = data.demandReward.orgtel;
- $scope.org.orguser = data.demandReward.orguser;
- if($scope.org.orgtel == '' || $scope.org.orgtel == null){
- $scope.orgtelinfo = "show";
- }
- $scope.demandname = data.sysUsersTaskInfo.projectname;
- $scope.demandstatus = data.demandReward.demandstatus;
- $scope.refusereason = data.demandReward.refusereason;
- $scope.capitalScale = data.sysUsersTaskInfo.capitalScale;
- $scope.cooperationmodel = data.sysUsersTaskInfo.cooperationmodel;
- $scope.restype = data.demandReward.restype;
- $scope.demandcontent = data.sysUsersTaskInfo.taskintroduction;
- $scope.abutList = data.companyAbutLkList;
- $scope.technical = data.technicalContractList[0];
- $scope.picturelist = data.systemPictureList;
- angular.forEach(tecBroker, function (val, index) {
- angular.forEach($scope.picturelist, function (picture, index) {
- if (val.title == picture.title) {
- val.imagelist.push(picture);
- val.imageSaveList.push(picture);
- }
- })
- })
- dataToolsService.getCooperationmodelByCode($scope.cooperationmodel).then(function (newRes) {
- if (newRes.code == 3350) {
- $scope.cooperationmodelInfo = newRes.data;
- }
- })
- }
- })
- }
- getTechnicalAwardDetail(false);
- $scope.reGoToReward = function (list) {
- console.log(list)
- if (!ConfigService.islogin) {
- if (localStorage.wxFlag == "true") {
- if (localStorage.isUserFocusXW == 0) {
- var title = localStorage.appidStr;
- $ionicPopup.alert({
- title: '提示',
- template: '请先关注微信公众号"' + title + '"!'
- });
- return;
- } else {
- if (localStorage.isUserBindWx == 0) {
- var wxFlag = JSON.parse(localStorage.params);
- if (wxFlag.weChatModel) {
- $scope.go('bindPhone', {
- params: localStorage.params,
- comfrom: 'maincontroller',
- url: window.location.href.split('#/')[1]
- });
- } else {
- $scope.go('login');
- return;
- }
- } else {
- $scope.go('login');
- return;
- }
- }
- } else {
- $scope.go('login');
- return;
- }
- } else {
- if (list.restype == 4801) {
- $scope.go('technicalawardapplication', {
- pageTitle: "技术经纪人技术合作类奖励",
- code: 4801,
- type: 5100,
- action: 'submit',
- resid: list.resid,
- restype: list.restype,
- list: list,
- flag:'re'
- });
- }
- if (list.restype == 1) {
- $scope.go("demandRewardDetail", {
- resid: list.resid,
- comefrom: 'reward',
- list: list,
- flag:'re'
- });
- }
- }
- }
- $scope.bigImage = false; //初始默认大图是隐藏的
- $scope.hideBigImage = function () {
- if ($scope.app) {
- $scope.setStatusBar(0);
- }
- $scope.bigImage = false;
- }
- $scope.shouBigImage = function (outindex, innerindex) {
- if ($scope.app) {
- $scope.setStatusBar(1);
- }
- $scope.bigImageList = $scope.abutList[outindex].photoList;
- $scope.bigImage = true; //显示大图
- $(function () {
- $('div.pinch-zoom').each(function () {
- new RTP.PinchZoom($(this), {});
- });
- });
- $ionicSlideBoxDelegate.update();//重绘,让图片显示出来
- //图片总数量
- setTimeout(function () {
- $ionicSlideBoxDelegate.$getByHandle('slide_detail').slide(innerindex, 0);
- //获取图片
- var imgObj = document.getElementsByClassName('bigimage');
- var n;
- for (n = 0; n < imgObj.length; n++) {
- // 获取图片的原始高度和宽度
- var oldWid = imgObj[n].naturalWidth;
- var oldHei = imgObj[n].naturalHeight;
- var screen = document.body.offsetWidth;
- var screenH = window.innerHeight;
- // console.log(oldWid/oldHei);
- // console.log(screen );
- var rate = oldWid / oldHei;
- if (oldWid >= screen && oldHei >= screenH) {
- var tw = screen;
- var th = tw / rate;
- if (th < screenH) {
- imgObj[n].style.width = tw + 'px';
- imgObj[n].style.height = th + 'px';
- imgObj[n].style.marginTop = (screenH - th) / 2 + 'px';
- } else {
- imgObj[n].style.width = screenH * rate + 'px';
- imgObj[n].style.height = screenH + 'px';
- imgObj[n].style.marginLeft = (screen - screenH * rate) / 2 + 'px';
- }
- } else if (oldWid >= screen && oldHei <= screenH) {
- imgObj[n].style.width = screen + 'px';
- imgObj[n].style.height = screen / rate + 'px';
- imgObj[n].style.marginTop = (screenH - screen / rate) / 2 + 'px';
- } else if (oldWid <= screen && oldHei >= screenH) {
- // var hh=screenH;
- // var ww=screenH*rate;
- imgObj[n].style.width = screenH * rate + 'px';
- imgObj[n].style.height = screenH + 'px';
- imgObj[n].style.marginLeft = (screen - screenH * rate) / 2 + 'px';
- } else {
- imgObj[n].style.width = oldWid + 'px';
- imgObj[n].style.height = oldHei + 'px';
- imgObj[n].style.marginLeft = (screen - oldWid) / 2 + 'px';
- imgObj[n].style.marginTop = (screenH - oldHei) / 2 + 'px';
- }
- }
- }, 500);
- }
- $scope.submitTechnicalAwardDetail = function (needInsertDBFlag) {
- var orguser = $scope.org.orguser;
- var orgtel = $scope.org.orgtel;
- var mess = false;
- if (orguser == null || orguser == undefined || orguser == "") {
- mess = true;
- $ionicPopup.alert({
- title: '提示',
- template: '请填写单位负责人姓名'
- })
- return;
- }
- if (orgtel == null || orgtel == undefined || orgtel == "") {
- mess = true;
- $ionicPopup.alert({
- title: '提示',
- template: '请填写负责人联系方式'
- })
- return;
- }
- angular.forEach(tecBroker, function (val, index) {
- if (val.imageSaveList.length == 0) {
- mess = true;
- $ionicPopup.alert({
- title: '提示',
- template: '请' + val.title + '!'
- })
- return;
- }
- })
- angular.forEach(tecBroker, function (val, index) {
- tecBrokerPictureList.push(val);
- })
- if (!mess) {
- angular.forEach(tecBrokerPictureList, function(value){
- value.infoid = $scope.list.id;
- })
- var pictureRecord = angular.toJson(tecBrokerPictureList);
- AccountService.insertApplicationPicture(pictureRecord).then(function (pictureRes) {
- if (pictureRes.code == 3350) {
- console.log($scope.node)
- AccountService.getTechnicalAwardDetail($scope.userid, $scope.resid, $scope.node, needInsertDBFlag, $scope.org.orguser, $scope.org.orgtel, $scope.restype).then(function (res) {
- if (res.code == 3350) {
- var resource = res.data.resourcelibrary;
- $scope.go('reward');
- /*$scope.go('taskDetail', {
- resid: resource.id,
- node: '330122000',
- restype: resource.restype,
- comefrom: 'technicalawardapplication',
- status: 'technicalreward'
- })*/
- }
- })
- }
- })
- }
- }
- $scope.url = 'http://pic.ubittc.com/group2/M00/03/B7/wKjIKluVD3OAfkH4AAA74dltjKY89.docx';
- $scope.alertInfo = function () {
- // CommonService.showMessage('请在电脑端下载打印',$scope)
- if ($scope.app) {
- $ionicPopup.alert({
- title: '提示',
- template: '《企业认证申请公函》请在电脑端下载打印,并加盖企业公章后上传。电脑端web网址:ubittc.com'
- });
- }
- }
- if ($scope.app) {
- $scope.url = '';
- // $scope.alertInfo()
- }
- if ($stateParams.pageTitle) {
- $scope.pageTitle = $stateParams.pageTitle;
- } else {
- $scope.pageTitle = sessionStorage.indentifyDetailTitle;
- }
- if ($stateParams.code) {
- $scope.code = $stateParams.code;
- } else {
- $scope.code = sessionStorage.indentifyDetailCode;
- }
- $scope.action = $stateParams.action;
- $scope.type = $stateParams.type;
- // console.log($stateParams);
- // console.log($scope.pageTitle,$scope.code,$scope.action);
- // if($stateParams.type=){
- // $scope.type=$stateParams.type;
- // }else{
- // $scope.type=sessionStorage.type;
- // }
- $scope.orgid = null;
- $scope.showNew = false;
- $scope.showHistory = false;
- $scope.showFinish = false;
- $scope.showReject = false;
- $scope.refusereason = '';
- if ($stateParams.type == 5100) {
- $scope.showNew = true;
- } else if ($stateParams.type == 5101 || $stateParams.type == 0 || $scope.action == 'check' || $stateParams.type == 5102 || $stateParams.type == 5103) {
- $scope.showHistory = true;
- if ($stateParams.type == 5102 || $stateParams.type == 5103) {
- $scope.showFinish = true;
- }
- if ($stateParams.type == 5103) {
- $scope.showReject = true;
- }
- }
- $scope.personalNotices = [
- {
- image: '1',
- title: '注意事项',
- item: [
- '1.每个证件只能绑定一个账号',
- '2.证件照不清晰或与输入的信息不匹配,将导致实名认证被驳回',
- '3.您提供的证件信息将受到严格保护,仅用于身份验证,未经本人许可不会用于其他用途'
- ]
- }, {
- image: '2',
- title: '证件要求',
- item: [
- '1.需上传本人二代身份证背面照+身份证反面照(不需手持)',
- '2.证件必须在有效期内,有效期需在一个月以上',
- ]
- }, {
- image: '2',
- title: '照片要求',
- item: [
- '1.证件照上信息需完整且清晰可辩(无反光、遮挡、水印、证件套、logo等)',
- '2.申请人填写的“真实姓名”和“证件号码”需和提交证件照片信息一致',
- '3.证件必须真实拍摄,不能使用复印件',
- '4.确保照片完整(不缺边角),证件周围不允许加上边角框(如:加上红框等)'
- ]
- },
- ];
- var personal = [
- {
- title: '真实姓名',
- placeholder: '请填写真实姓名',
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'applyname',
- }, {
- title: '证件类型',
- placeholder: '请选择证件类型',
- // type:'certificateType',
- content: '',
- key: '',
- saveKey: 'idtype',
- type: 'select',
- selectkey: 'id_type',
- needed: true,
- }, {
- title: '证件号码',
- placeholder: '请填写证件号码',
- type: 'input',
- content: '',
- needed: true,
- saveKey: 'cardno',
- }, {
- title: '证件正面照',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4906,
- remarkType: 'identify',
- }, {
- title: '证件背面照',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4907,
- remarkType: 'identify',
- },
- ];
- var tecBroker = [
- {
- title: '上传合作双方认可证明',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4900,
- remarkType: 'normal'
- }, {
- title: '上传发票',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4900,
- remarkType: 'add'
- },
- {
- title: '上传转账凭证',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4900,
- remarkType: 'identify'
- }
- ];
- var enterprise = [
- {
- title: '企业全称',
- placeholder: '请填写企业全称',
- fuzzyQuery: true,
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'applyname',
- }, {
- title: '统一社会信用代码',
- placeholder: '请填写统一社会信用代码',
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'orgcode',
- }, {
- title: '所属行业',
- placeholder: '请选择所属行业',
- content: '',
- key: '',
- type: 'selectDomain',
- needed: false,
- saveKey: 'categoryid',
- }, {
- title: '所在地区',
- content: '',
- type: 'selectArea',
- needed: false,
- saveKey: 'district',
- code: ''
- }, {
- title: '企业详细地址',
- placeholder: '请填写企业详细地址',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'detailaddress',
- }, {
- title: '企业法人',
- placeholder: '请填写企业法人',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'legalperson',
- }, {
- title: '职务',
- placeholder: '请填写职务',
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'title',
- }, {
- title: '工作证明',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4903,
- remarkType: 'normal',
- }, {
- title: '是否认领机构管理员',
- type: 'toggle',
- content: '10502',
- togglecontent: false,
- saveKey: 'ifleader'
- }, {
- title: '机构管理运营确认函',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4908,
- remarkType: 'manage'
- }, {
- title: '补充文件',
- content: '[]',
- type: 'upload',
- needed: false,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4900,
- remarkType: 'add'
- },
- ];
- var college = [
- {
- title: '高校全称',
- placeholder: '请填写高校全称',
- fuzzyQuery: true,
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'applyname',
- }, {
- title: '职务',
- placeholder: '请填写职务',
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'title',
- }, {
- title: '所在地区',
- content: '',
- type: 'selectArea',
- needed: false,
- saveKey: 'district',
- code: ''
- }, {
- title: '所属领域',
- content: '',
- key: '',
- type: 'selectDomain',
- needed: true,
- saveKey: 'categoryid',
- }, {
- title: '工作证明',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4903,
- remarkType: 'normal',
- }, {
- title: '是否认领机构管理员',
- type: 'toggle',
- content: '10502',
- togglecontent: false,
- saveKey: 'ifleader'
- }, {
- title: '机构管理运营确认函',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4908,
- remarkType: 'manage'
- }, {
- title: '补充文件',
- content: '[]',
- type: 'upload',
- needed: false,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4900,
- remarkType: 'add'
- },
- ];
- var government = [
- {
- title: '政府全称',
- placeholder: '请填写政府全称',
- fuzzyQuery: true,
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'applyname',
- }, {
- title: '职务',
- placeholder: '请填写职务',
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'title',
- }, {
- title: '所在地区',
- content: '',
- type: 'selectArea',
- needed: false,
- saveKey: 'district',
- code: ''
- }, {
- title: '所在部门',
- placeholder: '请填写所在部门',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'department',
- }, {
- title: '工作证明',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4903,
- remarkType: 'normal',
- }, {
- title: '是否认领机构管理员',
- type: 'toggle',
- content: '10502',
- togglecontent: false,
- saveKey: 'ifleader'
- }, {
- title: '机构管理运营确认函',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4908,
- remarkType: 'manage'
- }, {
- title: '补充文件',
- content: '[]',
- type: 'upload',
- needed: false,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4900,
- remarkType: 'add'
- },
- ];
- var serviceorg = [
- {
- title: '服务机构全称',
- placeholder: '请填写服务机构全称',
- fuzzyQuery: true,
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'applyname',
- }, {
- title: '统一社会信用代码',
- placeholder: '请填写统一社会信用代码',
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'orgcode',
- }, {
- // title:'服务类型',
- // content:'',
- // type:'input',
- // needed:true,
- // saveKey:'categoryid',
- // dictionarytype:30050,
- // dictionary:0
- // },{
- title: '所在地区',
- content: '',
- type: 'selectArea',
- needed: false,
- saveKey: 'district',
- code: ''
- }, {
- title: '机构详细地址',
- placeholder: '请填写机构详细地址',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'detailaddress',
- }, {
- title: '企业法人',
- placeholder: '请填写企业法人',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'legalperson',
- }, {
- title: '职务',
- placeholder: '请填写职务',
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'title',
- }, {
- title: '工作证明',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4903,
- remarkType: 'normal',
- }, {
- title: '是否认领机构管理员',
- type: 'toggle',
- content: '10502',
- togglecontent: false,
- saveKey: 'ifleader'
- }, {
- title: '机构管理运营确认函',
- content: '[]',
- type: 'upload',
- needed: true,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4908,
- remarkType: 'manage'
- }, {
- title: '补充文件',
- content: '[]',
- type: 'upload',
- needed: false,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4900,
- remarkType: 'add'
- },
- ];
- switch ($scope.code) {
- case 4800:
- $scope.formList = personal;
- break;
- case 4803:
- $scope.formList = enterprise;
- break;
- case 4801:
- $scope.formList = tecBroker;
- break;
- case 4804:
- $scope.formList = college;
- break;
- case 4805:
- $scope.formList = government;
- break;
- case 4806:
- $scope.formList = serviceorg;
- break;
- }
- // 对接录入
- if ($stateParams.comfrom == 'dockingInput') {
- $scope.formList = [
- {
- title: '企业',
- placeholder: '请填写企业全称',
- fuzzyQuery: true,
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'companyid',
- rowMargin: true
- }, {
- title: '需求',
- placeholder: '请选择对接需求',
- content: null,
- selectkey: '',
- type: 'companyTaskSelect',
- needed: true,
- saveKey: 'taskid',
- key: null,
- list: []
- }, {
- title: '状态',
- placeholder: '请填写状态',
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'title',
- recommend: '热门状态',
- recommendLable: ['洽谈', '签约', '合作中', '完成']
- }, {
- title: '内容',
- placeholder: '请填写对接内容',
- type: 'textarea',
- maxlength: 500,
- content: '',
- needed: true,
- saveKey: 'content',
- }, {
- title: '补充文件',
- content: '[]',
- type: 'upload',
- needed: false,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4900,
- remarkType: 'add',
- rowMargin: true
- }
- ]
- for (var i = 0; i < $scope.formList.length; i++) {
- if ($scope.formList[i].saveKey == 'taskid') {
- $scope.formList[i].content = $stateParams.taskTitle;
- $scope.tempData.resourceid = $stateParams.taskid;
- }
- if ($scope.formList[i].saveKey == 'companyid') {
- $scope.formList[i].content = $stateParams.companyName;
- }
- }
- taskModuleService.searchCompanyTask($stateParams.companyid, 1, 200).then(function (res) {
- console.log(res);
- if (res.code == 3350) {
- $scope.formList[1].listItem = [];
- angular.forEach(res.data, function (val) {
- $scope.formList[1].listItem.push({
- text: '<a class="action-sheet-push">' + val.projectname + '</a>',
- itemkey: val.id,
- itemvalue: val.projectname //名字
- })
- })
- }
- })
- }
- if ($stateParams.comfrom == 'taskRelease') {
- if (UserService.node != '330122000') {
- $scope.formList = [
- {
- title: '所属企业',
- placeholder: '请填写企业全称',
- fuzzyQuery: true,
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'companyid',
- rowMargin: true
- }, {
- title: '需求名称',
- placeholder: '请填写需求名称',
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'projectname',
- }, {
- title: '投入预算(w)',
- placeholder: '请填写预算',
- content: 0,
- type: 'input',
- needed: false,
- saveKey: 'capitalScale',
- inputType: 'number',
- }, {
- title: '联系人',
- placeholder: '请填写联系人',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'contactor',
- }, {
- title: '联系电话',
- placeholder: '请填联系电话',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'tel',
- inputType: 'number',
- }, {
- title: '合作模式',
- placeholder: '请选择合作模式',
- content: '',
- selectkey: 'cooperationmodel',
- type: 'select',
- needed: false,
- saveKey: 'cooperationmodel',
- key: ''
- }, {
- title: '需求类型',
- placeholder: '请选择需求类型',
- content: '',
- selectkey: 'usertask_type',
- type: 'select',
- needed: true,
- saveKey: 'tasktype',
- key: '',
- }, {
- title: '需求介绍',
- placeholder: '请填写需求介绍',
- type: 'textarea',
- maxlength: 500,
- content: '',
- needed: true,
- saveKey: 'taskintroduction',
- }, {
- title: '关键字',
- placeholder: '请请写关键字,多个请用逗号分隔',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'labelname',
- }, {
- title: '添加图片',
- content: '[]',
- type: 'upload',
- needed: false,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4911,
- remarkType: 'add',
- rowMargin: true
- }
- // ,{
- // title:'关键字',
- // placeholder:'请填写关键字,逗号隔开',
- // content:'',
- // type:'input',
- // needed:true,
- // saveKey:'',
- // },
- ];
- }
- if (UserService.node == '330122000') {
- $scope.formList = [
- {
- title: '所属企业',
- placeholder: '请填写企业全称',
- fuzzyQuery: true,
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'companyid',
- rowMargin: true
- }, {
- title: '需求名称',
- placeholder: '请填写需求名称',
- content: '',
- type: 'input',
- needed: true,
- saveKey: 'projectname',
- }, {
- title: '投入预算(w)',
- placeholder: '请填写预算',
- content: 0,
- type: 'input',
- needed: false,
- saveKey: 'capitalScale',
- inputType: 'number',
- }, {
- title: '联系人',
- placeholder: '请填写联系人',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'contactor',
- }, {
- title: '联系电话',
- placeholder: '请填联系电话',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'tel',
- inputType: 'number',
- }, {
- title: '合作模式',
- placeholder: '请选择合作模式',
- content: '',
- selectkey: 'cooperationmodel',
- type: 'select',
- needed: false,
- saveKey: 'cooperationmodel',
- key: ''
- }, {
- title: '需求介绍',
- placeholder: '请填写需求介绍',
- type: 'textarea',
- maxlength: 500,
- content: '',
- needed: true,
- saveKey: 'taskintroduction',
- }, {
- title: '关键字',
- placeholder: '请请写关键字,多个请用逗号分隔',
- content: '',
- type: 'input',
- needed: false,
- saveKey: 'labelname',
- }, {
- title: '添加图片',
- content: '[]',
- type: 'upload',
- needed: false,
- imagelist: [],
- imageSaveList: [],
- imageDeleteList: [],
- doctype: 4911,
- remarkType: 'add',
- rowMargin: true
- }
- // ,{
- // title:'关键字',
- // placeholder:'请填写关键字,逗号隔开',
- // content:'',
- // type:'input',
- // needed:true,
- // saveKey:'',
- // },
- ];
- }
- if (JSON.stringify($stateParams.data) != '{}') {
- // console.log($stateParams.data);
- $scope.formList[0].disable = true;
- $scope.orgid = $stateParams.data.baseInfoModel.oid;
- $scope.tempData.id = $stateParams.data.resid;
- angular.forEach($scope.formList, function (val) {
- if (val.type == 'upload') {
- val.content = JSON.stringify($stateParams.data.images);
- val.imagelist = $stateParams.data.images;
- val.imageSaveList = $stateParams.data.images;
- }
- for (var i = 0; i < $stateParams.data.infoSectionList[0].unitlist.length; i++) {
- var item = $stateParams.data.infoSectionList[0].unitlist[i];
- console.log(item.tcname);
- if (val.saveKey == 'companyid' && item.tcname == 'oid') {
- val.content = item.content;
- }
- if (val.saveKey == item.tcname) {
- val.content = item.content;
- if (val.type == 'upload') {
- var temp = JSON.parse(item.content);
- val.imagelist = temp;
- val.imageSaveList = temp;
- item.content = [];
- }
- }
- }
- console.log(val);
- val.saveKey == 'projectname' ? val.content = $stateParams.data.title :
- val.saveKey == 'capitalScale' ? val.content = Number($stateParams.data.capitalScale) :
- val.saveKey == 'taskintroduction' ? val.content = $stateParams.data.content :
- val.saveKey == 'tel' ? val.content = Number($stateParams.data.tel) :
- "";
- })
- }
- // 接单类型
- dataToolsService.getTypeEntryListByTypeName('usertask_show').then(function (res) {
- console.log(res);
- if (res.code == 3350) {
- angular.forEach(res.data, function (val) {
- val.class = val.itemvalue == 5310 ? 'iconfont-single-select'
- : val.itemvalue == 5311 ? 'iconfont-add-person' : '';
- val.checked = false;
- })
- $scope.taskType = res.data;
- $scope.taskType[0].checked = true;
- if ($stateParams.data.opentowho && $stateParams.data.opentowho.length > 0) {
- $scope.taskType[0].checked = false;
- $scope.taskType[1].checked = true;
- $scope.releaseToWhoList = $stateParams.data.opentowho;
- }
- }
- })
- // $scope.taskType=[
- // {name:'自主接单',checked:true,class:'iconfont-single-select',id:5310},
- // {name:'邀请接单',checked:false,class:'iconfont-add-person',id:5311},
- // ];
- }
- $scope.addressList = false;
- $scope.releaseToWhoList = [];
- var opentype = 5310;
- $scope.selectOpentype = function (index) {
- console.log(index);
- angular.forEach($scope.taskType, function (val) {
- val.checked = false;
- })
- $scope.taskType[index].checked = true;
- $scope.addressList = $scope.taskType[index].itemvalue == 5311;
- opentype = $scope.taskType[index].itemvalue;
- console.log(opentype);
- if ($scope.taskType[index].itemvalue == 5311) {
- $scope.taskInvite.show();
- }
- }
- var getContacts = function () {
- ScienceCircleService.getContacts(0).then(function (res) {
- console.log(res);
- angular.forEach(res, function (val) {
- angular.forEach(val.userlist, function (value) {
- value.select = false;
- })
- });
- $scope.mailDatas = res;
- })
- }
- getContacts();
- $scope.closeAddressList = function () {
- $scope.addressList = false;
- }
- $scope.selectPeople = function (outerIndex, innerIndex) {
- $scope.mailDatas[outerIndex].userlist[innerIndex].select = !$scope.mailDatas[outerIndex].userlist[innerIndex].select;
- if ($scope.mailDatas[outerIndex].userlist[innerIndex].select) {
- $scope.releaseToWhoList.push($scope.mailDatas[outerIndex].userlist[innerIndex]);
- } else {
- for (var i = 0; i < $scope.releaseToWhoList.length; i++) {
- if ($scope.releaseToWhoList[i] == $scope.mailDatas[outerIndex].userlist[innerIndex].userid) {
- $scope.releaseToWhoList.splice(i, 1);
- }
- }
- }
- console.log($scope.releaseToWhoList);
- }
- $scope.deleteSelectedPerson = function (id, index) {
- for (var i = 0; i < $scope.mailDatas.length; i++) {
- if ($scope.mailDatas[i].userUpper == $scope.releaseToWhoList[index].userNamePinYin) {
- for (var j = 0; j < $scope.mailDatas[i].userlist.length; j++) {
- if ($scope.mailDatas[i].userlist[j].userid == id) {
- $scope.mailDatas[i].userlist[j].select = false;
- }
- }
- }
- }
- $scope.releaseToWhoList.splice(index, 1);
- }
- $scope.keyfilter = {
- key: ""
- }
- $scope.isShowSearchButton = true;
- $scope.showSearchButtonLeft = function () {
- // console.log('aaa');
- $scope.isShowSearchButton = false;
- $timeout(function () {
- $(".showSearchInput").focus();
- }, 300)
- };
- $scope.clearSearch = function () {
- $scope.isShowSearchButton = true;
- $scope.keyfilter.key = "";
- $scope.searchDatas = [];
- }
- $scope.getPersonData = function () {
- console.log(1)
- $scope.showLoadingToast();
- ScienceCircleService.searchUser($scope.keyfilter.key, 1).then(function (response) {
- console.log(response);
- $scope.searchDatas = response.data.user;
- // if ($scope.userList.length < 1) {
- // $scope.shownone = true;
- // } else {
- // $scope.shownone = false;
- // }
- if ($scope.searchDatas.length == 0) {
- if ($scope.app) {
- UtilService.showMess("未搜索到相关用户");
- } else {
- CommonService.showMessage("未搜索到相关用户", $scope);
- }
- }
- // toSelectUserList(response);
- }, function () {
- if ($scope.app) {
- UtilService.showMess("网络不给力,请重试");
- } else {
- CommonService.showMessage("网络不给力,请重试", $scope);
- }
- }).finally(function () {
- $scope.hideLoadingToast();
- });
- }
- $scope.selectSearchPeople = function (index) {
- $scope.releaseToWhoList.push($scope.searchDatas[index]);
- $scope.keyfilter.key = '';
- $scope.searchDatas = [];
- }
- // 模糊查询
- $scope.queryOrgName = function (index) {
- if ($scope.formList[index].fuzzyQuery) {
- if ($scope.formList[index].content) {
- var pagecode = $scope.code == 4803 ? 1000003 : 1000004;
- dataToolsService.getOrganizationModelByOrgname($scope.formList[index].content, pagecode, 0).then(function (response) {
- // console.log(response);
- if (response.code == 3350) {
- $scope.orgList = response.data;
- $scope.isRelateUl = true;
- } else {
- $scope.orgList = [];
- $scope.isRelateUl = false;
- }
- }, function () {
- })
- } else {
- $scope.isRelateUl = false;
- $scope.orgList = [];
- }
- }
- }
- $scope.ttt = function (tmptitle) {
- return $sce.trustAsHtml(tmptitle);
- }
- var getSaveKeyContent = function (list, key, org) {
- for (var i = 0; i < list.length; i++) {
- if (list[i].tcname == key) {
- list[i].content = org[key];
- return;
- }
- ;
- }
- }
- if ($scope.code == 4803 && $stateParams.companyName != '') {
- $scope.formList[0].content = $stateParams.companyName;
- $scope.queryOrgName(0);
- }
- //*************选择区域
- $scope.areaDropDown = [
- {
- title: '省',
- code: '0',
- showList: false,
- list: [],
- selectName: '',
- }, {
- title: '市',
- code: '1',
- showList: false,
- list: [],
- selectName: '',
- }, {
- title: '区',
- showList: false,
- code: '1',
- list: [],
- selectName: '',
- }
- ]
- $scope.domainDropDown = [
- {
- title: '请选择',
- code: '0',
- showList: false,
- list: [],
- selectName: '',
- }, {
- title: '请选择',
- code: '1',
- showList: false,
- list: [],
- selectName: '',
- }, {
- title: '请选择',
- showList: false,
- code: '1',
- list: [],
- selectName: '',
- }
- ]
- var getAreaList = function (code, index) {
- AccountService.getAreaInfo(code).then(function (res) {
- if (res.code == 3350) {
- // console.log(res);
- // $scope.areaDropDown[index].list=res.data;
- $scope.areaDropDown[index].list = [];
- angular.forEach(res.data, function (val) {
- $scope.areaDropDown[index].list.push({
- text: '<a class="action-sheet-push">' + val.areaname + '</a>',
- itemkey: val.id,
- itemvalue: val.areaname //名字
- })
- })
- } else {
- }
- })
- }
- var getDomainList = function (code, index) {
- AccountService.getDomainInfo(code, UserService.node).then(function (res) {
- if (res.code == 3350) {
- // console.log(res);
- angular.forEach(res.data, function (val) {
- $scope.domainDropDown[index].list.push({
- text: '<a class="action-sheet-push">' + val.name + '</a>',
- itemkey: val.id,
- itemvalue: val.name, //名字,
- itemcode: val.code
- })
- })
- } else {
- }
- })
- }
- $scope.seeTechnicalInfo = function (technical) {
- $scope.go('signDemandContractDetail', {contract: technical});
- }
- //获取所有节点列表
- var getNodeList = function () {
- };
- angular.forEach($scope.formList, function (val) {
- if (val.type == 'affiliatedOrg') {
- var pagecode = $scope.code == 4803 ? 1000003 : 1000004;
- dataToolsService.getOrganizationModelByOrgname(' ', pagecode, 0, 1).then(function (response) {
- console.log(response);
- if (response.data.length > 0) {
- if ($stateParams.type == 5100) {
- $scope.brokernode = UserService.node;
- if (UserService.node != '330122000') {
- val.content = '普适云平台';
- val.key = '123456';
- }
- }
- val.listItem = [];
- angular.forEach(response.data, function (value) {
- val.listItem.push({
- text: '<a class="action-sheet-push">' + value.name + '</a>',
- itemkey: value.id,
- itemvalue: value.name //名字
- })
- })
- }
- }, function () {
- });
- }
- if (val.type == 'select') {
- val.listItem = [];
- dataToolsService.getTypeEntryListByTypeName(val.selectkey).then(function (res) {
- if (res.code == 3350) {
- angular.forEach(res.data, function (value) {
- val.listItem.push({
- text: '<a class="action-sheet-push">' + value.itemkey + '</a>',
- itemkey: value.itemvalue,
- itemvalue: value.itemkey //名字
- })
- })
- $timeout(function () {
- if (val.content) {
- var temp = val.listItem.filter(function (vv) {
- return vv.itemvalue == val.content;
- })
- if (temp.length > 0) {
- val.key = temp[0].itemkey;
- }
- }
- }, 1000);
- }
- })
- }
- if (val.type == 'selectArea') {
- getAreaList(0, 0);
- }
- if (val.type == 'selectDomain') {
- // getDomainList(0,0);
- // console.log(val);
- val.listItem = [];
- AccountService.getDomainInfo(0, UserService.node).then(function (res) {
- if (res.code == 3350) {
- // console.log(res);
- angular.forEach(res.data, function (value) {
- val.listItem.push({
- text: '<a class="action-sheet-push">' + value.name + '</a>',
- itemkey: value.code,
- itemvalue: value.name, //名字,
- // itemcode:value.code
- })
- })
- } else {
- }
- })
- }
- })
- $timeout(function () {
- console.log($scope.formList);
- }, 4000)
- // 获取数据处理
- var dealWithData = function (temp) {
- console.log(temp);
- $scope.orgid = temp.orgid ? temp.orgid : 0;
- // 处理数据
- var arr = [];
- $scope.refusereason = temp.refusereason;
- if (temp.images != '' && temp.images != null) {
- arr = JSON.parse(temp.images);
- }
- // console.log(temp);
- for (var key in temp) {
- for (var i = 0; i < $scope.formList.length; i++) {
- if (key == $scope.formList[i].saveKey) {
- console.log(key);
- $scope.formList[i].content = temp[key];
- // if(key=='district'&&temp[key]!=''&&$scope.formList[i].type=='selectArea'){
- // console.log(temp[key]);
- // var tp=JSON.parse(temp[key]);
- // var str='';
- // angular.forEach(tp,function(val,index){
- // str+=val.name+' ';
- // })
- // $scope.formList[i].content=str;
- // }
- if ($scope.showNew == true && key == 'district' && temp[key] != '' && $scope.formList[i].type == 'selectArea') {
- var tempArry = temp[key].split('/')
- // console.log(temp);
- for (var j = 0; j < $scope.areaDropDown.length; j++) {
- $scope.areaDropDown[j].selectName = tempArry[j];
- }
- }
- if ($scope.formList[i].type == 'select' || $scope.formList[i].type == 'selectDomain' || $scope.formList[i].type == 'affiliatedOrg' || $scope.formList[i].type == 'companyTaskSelect') {
- // console.log($scope.formList[i]);
- // console.log(temp[key]);
- var tparr = $scope.formList[i].listItem.filter(function (vv) {
- return vv.itemkey == temp[key];
- })
- // console.log(tparr);
- $scope.formList[i].content = tparr.length > 0 ? tparr[0].itemvalue : '';
- $scope.formList[i].key = tparr.length > 0 ? tparr[0].itemkey : '';
- }
- if ($scope.formList[i].type == 'toggle') {
- $scope.formList[i].content = temp[key] == 10501 ? '是' : '否';
- $scope.formList[i].togglecontent = temp[key] == 10501 ? true : false;
- }
- }
- if ($scope.formList[i].type == 'upload' && arr.length > 0) {
- $scope.formList[i].imagelist = arr.filter(function (va, ind) {
- return $scope.formList[i].doctype == va.doctype;
- })
- $scope.formList[i].imageSaveList = arr.filter(function (va, ind) {
- return $scope.formList[i].doctype == va.doctype;
- })
- $scope.formList[i].content = '点击放大查看图片';
- }
- // if($scope.formList[i].type=='selectArea'){
- // console.log($scope.formList[i].content);
- // if($scope.formList[i].content!=''){
- // var tempArea=JSON.parse($scope.formList[i].content);
- // var str='';
- // angular.forEach(tempArea,function(val,index){
- // str+=val.name+' ';
- // })
- // $scope.formList[i].content=str;
- // }
- // }
- // if($scope.formList[i].type=='select'){
- // var tempArr=JSON.parse(temp[key]);
- //
- // }
- }
- }
- console.log($scope.formList);
- };
- $scope.checkData = {};
- $scope.agree = true;
- if ($scope.showHistory == true) {
- if ($scope.action == 'submit') {
- // 获取认证信息
- // console.log($scope.code);
- AccountService.getAuthMessageInfo($scope.code).then(function (res) {
- console.log(res);
- if (res.code == 3350) {
- // $scope.dataList=res.data;
- // console.log(res);
- // console.log($stateParams);
- var temp = res.data.filter(function (val, index, arr) {
- return val.id == $stateParams.id;
- })[0];
- $scope.id = temp.id;
- dealWithData(temp);
- }
- })
- } else if ($scope.action == 'check') {
- // console.log(2);
- AccountService.getAuthCheckInfo($stateParams.pagenum, $stateParams.pagesize, '', 0, 0).then(function (res) {
- // console.log(res);
- if (res.code == 3350) {
- // $scope.dataList=res.data;
- var temp = res.data.filter(function (val, index, arr) {
- return val.id == $stateParams.id;
- })[0];
- console.log(temp);
- $scope.checkData = temp;
- $scope.agree = $scope.checkData.authenstatus != 5103
- dealWithData(temp);
- }
- })
- }
- }
- $scope.selectItems = function (index) {
- // console.log(index);
- if ($scope.formList[index].type == 'select' || $scope.formList[index].type == 'selectDomain' || $scope.formList[index].type == 'affiliatedOrg' || $scope.formList[index].type == 'companyTaskSelect') {
- var list = $scope.formList[index].listItem;
- $ionicActionSheet.show({
- buttons: list,
- cancelText: '取消',
- buttonClicked: function (indx) {
- if ($stateParams.comfrom == 'dockingInput') {
- $stateParams.taskid = list[indx].itemkey
- }
- $scope.formList[index].key = list[indx].itemkey;
- $scope.formList[index].content = list[indx].itemvalue;
- return true;
- }
- })
- }
- }
- $scope.gobackpage = function () {
- $scope.goback();
- /*if(UserService.isTaskFlag == 1){
- $scope.go('taskHoll');
- UserService.isTaskFlag = 0;
- }else{
- goback();
- }*/
- }
- // 选中机构
- $scope.setOrgName = function (org, list) {
- // console.log(org);
- $scope.orgid = org.id;
- for (var key in org) {
- for (var i = 0; i < $scope.formList.length; i++) {
- if ($scope.formList[i].saveKey == key) {
- $scope.formList[i].content = org[key];
- if ($scope.formList[i].type == 'select') {
- var tparr = $scope.formList[i].listItem.filter(function (vv) {
- return vv.itemkey == org[key];
- })
- $scope.formList[i].content = tparr.length > 0 ? tparr[0].itemvalue : '';
- }
- }
- if ($scope.formList[i].saveKey == list.saveKey) {
- $scope.formList[i].content = org.name;
- }
- }
- }
- // console.log($scope.formList);
- $scope.isRelateUl = false;
- if ($stateParams.comfrom == 'dockingInput') {
- taskModuleService.searchCompanyTask(org.id, 1, 200).then(function (res) {
- console.log(res);
- if (res.code == 3350) {
- $scope.formList[1].listItem = [];
- angular.forEach(res.data, function (val) {
- $scope.formList[1].listItem.push({
- text: '<a class="action-sheet-push">' + val.projectname + '</a>',
- itemkey: val.id,
- itemvalue: val.projectname //名字
- })
- })
- }
- })
- }
- }
- var hasArea = function () {
- angular.forEach($scope.formList, function (val, index) {
- if (val.type == 'selectArea') {
- if (val.content != '') {
- // var temp=JSON.parse(val.content);
- var temp = val.content.split('/');
- for (var i = 0; i < $scope.areaDropDown.length; i++) {
- // $scope.areaDropDown[i].code=temp[i].code;
- // $scope.areaDropDown[i].selectName=temp[i].name;
- $scope.areaDropDown[i].selectName = temp[i];
- // getAreaList(temp[i].code,i);
- }
- }
- return true
- }
- ;
- })
- return false;
- }
- $scope.showAreaList = function (index, outerIndex, arr, key) {
- // console.log(arr);
- var list = arr[index].list;
- $ionicActionSheet.show({
- buttons: list,
- cancelText: '取消',
- buttonClicked: function (indx) {
- // 先清除
- if (index == 0) {
- arr[1].selectName = '';
- arr[2].selectName = '';
- arr[1].code = '';
- arr[2].code = '';
- } else if (index == 1) {
- arr[2].selectName = '';
- arr[2].code = '';
- }
- if (index < 2) {
- arr[index + 1].code = list[indx].itemkey;
- if (key == 'area') {
- getAreaList(list[indx].itemkey, index + 1);
- } else {
- getDomainList(list[indx].itemkey, index + 1);
- }
- }
- arr[index].selectName = list[indx].itemvalue;
- // var tempArr=[];
- // angular.forEach(arr,function(val,index){
- // tempArr.push({name:val.selectName,code:val.code});
- // })
- var tempArr = '';
- angular.forEach(arr, function (val, index) {
- tempArr += val.selectName + '/';
- })
- $scope.formList[outerIndex].code = list[indx].itemkey;
- if (index == 0) {
- $scope.formList[outerIndex].content = tempArr.slice(0, tempArr.length - 3);
- } else {
- $scope.formList[outerIndex].content = tempArr.slice(0, tempArr.length - 1);
- }
- // console.log($scope.formList[outerIndex].content);
- return true;
- }
- })
- }
- $scope.setAreaListCode = function (code, name, index, outerIndex) {
- // 先清除
- if (index == 0) {
- $scope.areaDropDown[1].selectName = '';
- $scope.areaDropDown[2].selectName = '';
- $scope.areaDropDown[1].code = '1';
- $scope.areaDropDown[2].code = '1';
- } else if (index == 1) {
- $scope.areaDropDown[2].selectName = '';
- $scope.areaDropDown[2].code = '1';
- }
- // 然后再新赋值,准备下一级别数据
- $scope.areaDropDown[index].showList = false;
- if (index + 1 < $scope.areaDropDown.length) {
- $scope.areaDropDown[index + 1].code = code;
- getAreaList(code, index + 1);
- }
- $scope.areaDropDown[index].selectName = name;
- var tempArr = [];
- angular.forEach($scope.areaDropDown, function (val, index) {
- tempArr.push({name: val.selectName, code: val.code});
- })
- $scope.formList[outerIndex].content = JSON.stringify(tempArr);
- }
- // *************有效证件
- $scope.showCTList = false;
- // $scope.certificateType=[
- // {name:'身份证',code:1},
- // {name:'军官证',code:2},
- // ]
- $scope.showCertificateTypeList = function (index) {
- $scope.clickIndex = index;
- $scope.showCTList = true;
- }
- $scope.setCertificateType = function (index) {
- $scope.showCTList = false;
- $scope.formList[$scope.clickIndex].content = $scope.formList[$scope.clickIndex].listItem[index].itemkey;
- $scope.formList[$scope.clickIndex].itemvalue = $scope.formList[$scope.clickIndex].listItem[index].itemvalue;
- }
- // *************上传照片
- // 先从数据中读取照片
- angular.forEach($scope.formList, function (val, index) {
- if (val.type == 'upload') {
- if (val.content != '') {
- var temp = JSON.parse(val.content);
- val.imagelist = Object.assign([], JSON.parse(val.content));
- val.imageSaveList = Object.assign([], JSON.parse(val.content));
- val.content = [];
- console.log(val);
- }
- }
- ;
- })
- // console.log($scope.formList);
- //加载动画
- $scope.showLoadingToast = function () {
- $ionicLoading.show({
- template: '<ion-spinner icon="bubbles" class="spinner-calm"></ion-spinner>',
- content: '努力加载中',
- animation: 'fade-in',
- showBackdrop: true,//是否显示蒙层
- maxWidth: 150,
- showDelay: 0
- });
- // $timeout(function () {
- // $ionicLoading.hide();
- // }, 15000);
- };
- //关闭加载动画
- $scope.hideLoadingToast = function () {
- $ionicLoading.hide();
- };
- var listIndex = 1000;
- $scope.addImage = function (index) {
- listIndex = index;
- if ($scope.app) {
- var list = [
- {text: '<a class="action-sheet-push">拍照</a>'},
- {text: '<a class="action-sheet-push">从相册上传</a>'},
- ];
- var clickfunction = function (indx) {
- if (indx == 0) {
- $scope.openCamera();
- } else {
- getPictures();
- }
- return true;
- }
- } else {
- var list = [
- {text: '<a class="action-sheet-push">从相册上传</a>'},
- ];
- var clickfunction = function (indx) {
- if (indx == 0) {
- var files = document.getElementById('file');
- files.click();
- $(files).unbind().on('change', function (e) {
- // console.log(e);
- if ($scope.formList[listIndex].imagelist.length > 1) {
- if ($scope.app) {
- UtilService.showMess('只能上传一张照片');
- } else {
- CommonService.showMessage('只能上传一张照片', $scope);
- }
- return;
- }
- $.each(e.target.files, function (i, file) {
- var url = null;
- if (window.createObjectURL != undefined) { // basic
- url = window.createObjectURL(file);
- } else if (window.URL != undefined) { // mozilla(firefox)
- url = window.URL.createObjectURL(file);
- } else if (window.webkitURL != undefined) { // webkit or chrome
- url = window.webkitURL.createObjectURL(file);
- }
- $scope.formList[listIndex].imagelist.push({photoName: url, originalName: url});
- })
- $.each(e.target.files, function (i, file) {
- var data = new FormData();
- data.append('file', file);
- CommonService.webUploadImage(data).then(function (res) {
- var temp = {
- id: 0,
- title: "",
- doctype: $scope.formList[listIndex].doctype,//文档类型 1图片,2文件,3pdf,4xls
- isenabled: 1,//是否可用:0-不可用,1-可用,2-已停用
- photoName: res.photoName,
- originalName: res.originalName,
- sourceName: res.sourceName,
- sourceSize: res.sourceSize
- }
- $scope.formList[listIndex].imageSaveList.push(temp);
- // console.log(temp);
- // console.log($scope.formList[listIndex]);
- })
- });
- })
- }
- return true;
- }
- }
- $ionicActionSheet.show({
- buttons: list,
- cancelText: '取消',
- buttonClicked: clickfunction
- })
- }
- $scope.openCamera = function () {
- if ($scope.formList[listIndex].imagelist.length >= 9) {
- if ($scope.app) {
- UtilService.showMess("最多选取9张图片");
- } else {
- CommonService.showMessage("最多选取9张图片", $scope)
- }
- return;
- }
- UtilService.getPicture(1).then(function (results) {
- $scope.showLoadingToast();
- $scope.formList[listIndex].imagelist.push({photoName: results, originalName: results})
- UtilService.uploadFile([results], 0, "image/jpeg").then(function (response) {
- angular.forEach(response, function (value) {
- $scope.formList[listIndex].imageSaveList.push({
- id: 0,
- title: "",
- doctype: $scope.formList[listIndex].doctype,//文档类型 1图片,2文件,3pdf,4xls
- isenabled: 1,//是否可用:0-不可用,1-可用,2-已停用
- photoName: value.photoName,
- originalName: value.originalName,
- sourceName: value.sourceName,
- sourceSize: value.sourceSize
- })
- })
- $scope.hideLoadingToast();
- }, function () {
- $scope.hideLoadingToast();
- if ($scope.app) {
- UtilService.showMess("网络不给力,请重试");
- } else {
- CommonService.showMessage("网络不给力,请重试", $scope)
- }
- });
- $ionicScrollDelegate.$getByHandle("scrollimage").resize();
- }, function (err) {
- });
- }
- var getPictures = function () {
- if (device.platform == "Android") {
- verifyStorage();
- } else {
- getPic();
- }
- };
- var verifyStorage = function () {
- window.imagePicker.verifyStorage(
- function (results) {
- if (results == "1") {
- getPic();
- }
- }, function (error) {
- }
- );
- };
- var getPic = function () {
- var imagelistLength = $scope.formList[listIndex].imagelist.length;
- if (imagelistLength >= 9) {
- if ($scope.app) {
- UtilService.showMess("最多选取9张图片");
- } else {
- CommonService.showMessage("最多选取9张图片", $scope)
- }
- return;
- }
- UtilService.getPictureList(9 - imagelistLength).then(function (results) {
- $scope.showLoadingToast();
- angular.forEach(results, function (val, i) {
- $scope.formList[listIndex].imagelist.push({photoName: val, originalName: val});
- })
- UtilService.uploadFile(results, 0, "image/jpeg").then(function (response) {
- angular.forEach(response, function (value) {
- if (value.status) {
- $scope.formList[listIndex].imageSaveList.push({
- id: 0,
- title: "",
- doctype: $scope.formList[listIndex].doctype,//文档类型 1图片,2文件,3pdf,4xls
- isenabled: 1,//是否可用:0-不可用,1-可用,2-已停用
- photoName: value.photoName,
- originalName: value.originalName,
- sourceName: value.sourceName,
- sourceSize: value.sourceSize
- });
- }
- })
- $scope.hideLoadingToast();
- }, function () {
- $scope.hideLoadingToast();
- if ($scope.app) {
- UtilService.showMess("网络不给力,请重试");
- } else {
- CommonService.showMessage("网络不给力,请重试", $scope)
- }
- });
- $ionicScrollDelegate.$getByHandle("scrollimage").resize();
- }, function (err) {
- });
- };
- //删除图片
- $scope.deletePhoto = function (index, outerIndex) {
- console.log($scope.formList[outerIndex]);
- if ($scope.formList[outerIndex].imageSaveList[index].id != 0) {
- $scope.formList[outerIndex].imageSaveList[index].isenabled = 2;
- $scope.formList[outerIndex].imageDeleteList.push($scope.formList[outerIndex].imageSaveList[index]);
- }
- $scope.formList[outerIndex].imagelist.splice(index, 1);
- $scope.formList[outerIndex].imageSaveList.splice(index, 1);
- // console.log($scope.formList[outerIndex].imagelist);
- // console.log($scope.formList[outerIndex].imageSaveList);
- // console.log($scope.formList[outerIndex].imageDeleteList);
- }
- $scope.uploadPic = function (e) {
- // console.log(2);
- // console.log(e.target);
- }
- // **************切换开关
- $scope.watchIsChange = function (index) {
- $scope.formList[index].content = $scope.formList[index].togglecontent ? "10501" : "10502";
- }
- // **************提交按钮
- $scope.checkNotice = function () {
- $scope.isChecked = !$scope.isChecked;
- }
- // 处理审核
- $scope.reSubmit = function () {
- $scope.showNew = true;
- $scope.showHistory = false;
- $scope.tempData = {};
- $scope.tempData.id = $scope.id;
- console.log($scope.formList);
- angular.forEach($scope.formList, function (val) {
- if (val.type == 'upload') {
- val.imageSaveList = Object.assign([], val.imagelist);
- }
- if (val.type == 'selectArea' && val.content != '') {
- var temp = val.content.split('/')
- // console.log(temp);
- for (var i = 0; i < $scope.areaDropDown.length; i++) {
- $scope.areaDropDown[i].selectName = temp[i];
- }
- }
- })
- }
- if ($stateParams.comfrom == 'resubmit') {
- $scope.id = $stateParams.id;
- $scope.reSubmit();
- }
- var dealWidthData = function () {
- console.log($scope.formList);
- var tempImages = [];
- angular.forEach($scope.formList, function (val, index) {
- if (val.type == 'upload') {
- // 处理照片
- // if(val.imagelist.length>0){
- // val.imageSaveList=Object.assign([],val.imagelist);
- // }
- val.content = '';
- var temp = Object.assign([], val.imageSaveList);
- angular.forEach(val.imageSaveList, function (v) {
- tempImages.push(v);
- })
- if (val.imageDeleteList.length > 0) {
- angular.forEach(val.imageDeleteList, function (value) {
- tempImages.push(value);
- temp.push(value)
- })
- }
- val.content = JSON.stringify(temp);
- } else if (val.type == 'select' || val.type == 'selectDomain' || val.type == 'affiliatedOrg' || val.type == 'companyTaskSelect') {
- $scope.tempData[val.saveKey] = val.key;
- } else if (val.type == 'selectArea') {
- $scope.tempData[val.saveKey] = val.content;
- $scope.tempData.regionsid = val.code;
- } else if (val.type == 'toggle') {
- if (val.content == '是' || val.content == '否') {
- val.content = val.content == '是' ? 10502 : 10501;
- }
- $scope.tempData[val.saveKey] = val.content;
- } else {
- $scope.tempData[val.saveKey] = val.content;
- }
- })
- console.log(tempImages);
- $scope.tempData.images = JSON.stringify(tempImages);
- }
- // 发布任务
- // 获取connid
- var getConnid = function () {
- var def = $q.defer();
- $scope.requestModel = {
- data: {
- orgtype: 10104,
- templettype: 4,
- title: $scope.formList[0].content,
- organizationInfo: {
- orgtype: 10104,
- name: $scope.formList[0].content,
- id: $scope.orgid ? $scope.orgid : 0
- },
- userModel: {
- userid: UserService.id
- }
- },
- node: UserService.node,
- userid: UserService.id
- }
- console.log($scope.requestModel);
- dataToolsService.saveOrganizationInfo($scope.requestModel).then(function (response) {
- console.log(response);
- if (response.code == 3350) {
- def.resolve(response.data);
- } else {
- def.reject('错误');
- }
- })
- return def.promise;
- }
- var submitTaskAction = false;
- $scope.submitTask = function () {
- if (submitTaskAction) {
- return;
- }
- submitTaskAction = true;
- $scope.tempData = $scope.tempData ? $scope.tempData : {};
- for (var i = 0; i < $scope.formList.length; i++) {
- var val = $scope.formList[i];
- if (val.remarkType == 'manage' && $scope.formList[i - 1].type == 'toggle' && ($scope.formList[i - 1].content == '10502' || $scope.formList[i - 1].content == '否')) {
- continue;
- }
- // if(!$scope.orgid){
- // if($scope.app){
- // UtilService.showMess('所属企业请输入关键字,从列表中选择');
- // }else{
- // CommonService.showMessage('所属企业请输入关键字,从列表中选择',$scope);
- // }
- // submitTaskAction=false;
- // return;
- // }
- if (val.needed && (val.content === '' || (val.type == 'upload' && val.imagelist.length == 0))) {
- if (val.type == 'upload') {
- if ($scope.app) {
- UtilService.showMess('请上传' + val.title);
- } else {
- CommonService.showMessage('请上传' + val.title, $scope);
- }
- } else if (val.type == 'select' || val.type == 'affiliatedOrg' || val.type == 'selectArea' || val.type == 'selectDomain' || val.type == 'companyTaskSelect') {
- if ($scope.app) {
- UtilService.showMess('请选择' + val.title);
- } else {
- CommonService.showMessage('请选择' + val.title, $scope);
- }
- } else {
- if ($scope.app) {
- UtilService.showMess('请填写' + val.title);
- } else {
- CommonService.showMessage('请填写' + val.title, $scope);
- }
- }
- submitTaskAction = false;
- return;
- }
- }
- if (opentype == 5311 && $scope.releaseToWhoList.length == 0) {
- if ($scope.app) {
- UtilService.showMess('请至少选择一位邀请接单人员!');
- } else {
- CommonService.showMessage('请至少选择一位邀请接单人员!', $scope);
- }
- submitTaskAction = false;
- return;
- }
- dealWidthData();
- $scope.tempData.opentype = opentype;
- $scope.tempData.creator = UserService.id;
- // console.log($scope.tempData);
- var array = [];
- angular.forEach($scope.releaseToWhoList, function (val) {
- array.push(val.userid);
- })
- $scope.tempData.opentowho = array.join(',');
- $scope.showLoadingToast();
- getConnid().then(function (data) {
- console.log(data);
- $scope.tempData.connid = data.id;
- $scope.tempData.orgid = data.organizationInfo.id;
- $scope.tempData.companyid = data.organizationInfo.id;
- console.log($scope.tempData);
- $scope.tempData.images = $scope.tempData.images == '[]' ? '' : $scope.tempData.images;
- var senddata = {
- data: $scope.tempData,
- node: UserService.node
- }
- if (senddata.capitalScale == NaN || senddata.capitalScale == null || senddata.capitalScale == undefined) {
- senddata.capitalScale = 0;
- }
- if (senddata.tel == -1 || senddata.tel == null || senddata.tel == undefined) {
- senddata.tel = "";
- }
- console.log(senddata);
- taskModuleService.releaseOrEditTask(senddata).then(function (res) {
- console.log(res);
- if (res.code == 3350) {
- if (JSON.stringify($stateParams.data) != '{}') {
- $scope.go('taskDetail', {
- actions: "5322,5325",
- comefrom: "taskHoll",
- node: UserService.node,
- opentowho: JSON.stringify($scope.releaseToWhoList),
- opentype: res.data.opentype,
- resid: $stateParams.data.resid,
- restype: 1,
- taskid: res.data.id,
- taskstatus: 5300,
- title: $stateParams.data.title
- })
- } else {
- $scope.goback();
- }
- }
- $scope.hideLoadingToast();
- })
- })
- }
- // 保存对接信息
- // 获取connid
- var getDockingConnid = function () {
- var def = $q.defer();
- $scope.requestModel = {
- data: {
- templettype: 16,
- title: $scope.formList[0].content,
- organizationInfo: {
- name: $scope.formList[0].content,
- id: $scope.orgid ? $scope.orgid : 0
- },
- userModel: {
- userid: UserService.id
- }
- },
- node: UserService.node,
- userid: UserService.id
- }
- console.log($scope.requestModel);
- dataToolsService.saveOrganizationInfo($scope.requestModel).then(function (response) {
- console.log(response);
- if (response.code == 3350) {
- def.resolve(response.data);
- } else {
- def.reject('错误');
- }
- })
- return def.promise;
- }
- var submitTaskDocking = false;
- $scope.submitTaskDocking = function () {
- if (submitTaskDocking) {
- return;
- }
- submitTaskDocking = true;
- $scope.tempData = $scope.tempData ? $scope.tempData : {};
- for (var i = 0; i < $scope.formList.length; i++) {
- var val = $scope.formList[i];
- if (val.remarkType == 'manage' && $scope.formList[i - 1].type == 'toggle' && ($scope.formList[i - 1].content == '10502' || $scope.formList[i - 1].content == '否')) {
- continue;
- }
- if (val.needed && (val.content === '' || (val.type == 'upload' && val.imagelist.length == 0))) {
- if (val.type == 'upload') {
- if ($scope.app) {
- UtilService.showMess('请上传' + val.title);
- } else {
- CommonService.showMessage('请上传' + val.title, $scope);
- }
- } else if (val.type == 'select' || val.type == 'affiliatedOrg' || val.type == 'selectArea' || val.type == 'selectDomain' || val.type == 'companyTaskSelect') {
- if ($scope.app) {
- UtilService.showMess('请选择' + val.title);
- } else {
- CommonService.showMessage('请选择' + val.title, $scope);
- }
- } else {
- if ($scope.app) {
- UtilService.showMess('请填写' + val.title);
- } else {
- CommonService.showMessage('请填写' + val.title, $scope);
- }
- }
- submitTaskDocking = false;
- return;
- }
- }
- dealWidthData();
- $scope.tempData.companyid = $scope.orgid;
- $scope.tempData.action = 5322;
- $scope.tempData.creator = UserService.id;
- // var senddata={
- // data:$scope.tempData,
- // node:UserService.node
- // }
- $scope.showLoadingToast();
- getDockingConnid().then(function (data) {
- console.log(data);
- $scope.tempData.connid = data.id;
- $scope.tempData.orgid = data.organizationInfo.id;
- $scope.tempData.companyid = data.organizationInfo.id;
- $scope.tempData.taskid = $stateParams.taskid;
- var senddata = {
- data: $scope.tempData,
- node: UserService.node
- }
- console.log(senddata);
- taskModuleService.saveOrupdatetaskDocking(senddata).then(function (res) {
- console.log(res);
- if (res.code == 3350) {
- $scope.goback();
- }
- $scope.hideLoadingToast();
- })
- })
- }
- var submitFormAction = false;
- $scope.submitForm = function () {
- // if(!$scope.isChecked){
- // return;
- // }
- if (submitFormAction) {
- return;
- }
- submitFormAction = true;
- console.log($scope.formList);
- // 先处理数据 判断非空
- $scope.tempData = $scope.tempData ? $scope.tempData : {};
- for (var i = 0; i < $scope.formList.length; i++) {
- var val = $scope.formList[i];
- if (val.remarkType == 'manage' && $scope.formList[i - 1].type == 'toggle' && ($scope.formList[i - 1].content == '10502' || $scope.formList[i - 1].content == '否')) {
- continue;
- }
- if (val.type == 'upload') {
- console.log(val.content == '');
- console.log(val.type == 'upload');
- console.log(val.imagelist.length == 0);
- }
- if (val.needed && (val.content === '' || (val.type == 'upload' && val.imagelist.length == 0))) {
- if (val.type == 'upload') {
- if ($scope.app) {
- UtilService.showMess('请上传' + val.title);
- } else {
- CommonService.showMessage('请上传' + val.title, $scope);
- }
- } else {
- if ($scope.app) {
- UtilService.showMess('请填写' + val.title);
- } else {
- CommonService.showMessage('请填写' + val.title, $scope);
- }
- }
- submitFormAction = false;
- return;
- }
- }
- dealWidthData();
- // console.log($scope.tempData);
- $scope.tempData.applytype = $scope.code;
- $scope.tempData.creator = UserService.id;
- $scope.tempData.authenstatus = 5101;
- $scope.tempData.userid = UserService.id;
- $scope.tempData.usercomefrom = UserService.node;
- $scope.tempData.orgid = $scope.orgid;
- $scope.tempData.node = UserService.node;
- console.log($scope.tempData);
- $scope.showLoadingToast();
- AccountService.submitTechnicalContractInfo($scope.tempData).then(function (res) {
- console.log(res);
- $scope.hideLoadingToast();
- if (res.code == 3350) {
- if ($scope.app) {
- UtilService.showMess("需求合同签订成功");
- } else {
- CommonService.showMessage('需求合同签订成功!', $scope);
- }
- $scope.go('taskDetail', {
- resid: $scope.resid,
- node: '330122000',
- restype: 1,
- comefrom: 'signDemandContract',
- status: 'technicalreward'
- })
- }
- })
- }
- $scope.agreeClick = function () {
- $scope.agree = true;
- }
- $scope.rejectClick = function () {
- $scope.agree = false;
- }
- var submitCheckAction = false;
- $scope.submitCheck = function () {
- if (submitCheckAction) {
- return;
- }
- submitCheckAction = true;
- // console.log($scope.agree);
- $scope.checkData.authenstatus = $scope.agree ? 5102 : 5103;
- $scope.checkData.refusereason = $scope.agree ? '' : $scope.checkData.refusereason;
- $scope.checkData.authorityid = UserService.id;
- // console.log($scope.checkData);
- $scope.showLoadingToast();
- AccountService.submitAuthCheckInfo($scope.checkData).then(function (res) {
- $scope.hideLoadingToast();
- // console.log(res);
- if (res.code == 3350) {
- $state.go('identifyDetail', {pageTitle: '认证审核', code: $scope.code, action: 'check'});
- }
- })
- }
- window.addEventListener("resize", function () {
- var domWidth = window.document.documentElement.getBoundingClientRect().width;
- if (domWidth > 540) {
- $scope.viewscreen = 'browser';
- } else {
- $scope.viewscreen = 'app';
- }
- })
- // 任务邀请页面
- var taskInviteModal = function () {
- $ionicModal.fromTemplateUrl('./modules/common/views/taskInviteModal.html', {
- scope: $scope,
- animation: 'slide-in-left'
- }).then(function (modal) {
- $scope.taskInvite = modal;
- });
- }
- taskInviteModal();
- // 选择热门标签
- $scope.selectLable = function (index, label) {
- $scope.formList[index].content = label;
- }
- }])
- ;
|