网站
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

index.js 46 KiB

hace 4 años
hace 2 años
hace 4 años
hace 2 años
hace 4 años
hace 4 años
hace 2 años
hace 2 años
hace 1 año
hace 2 años
hace 4 años
hace 2 años
hace 3 años
hace 4 años
hace 4 años
hace 2 años
hace 2 años
hace 4 años
hace 2 años
hace 2 años
hace 2 años
hace 4 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 3 años
hace 3 años
hace 4 años
hace 4 años
hace 1 año
hace 2 años
hace 2 años
hace 4 años
hace 2 años
hace 4 años
hace 4 años
hace 4 años
hace 4 años
hace 2 años
hace 1 año
hace 2 años
hace 2 años
hace 2 años
hace 1 año
hace 3 años
hace 3 años
hace 3 años
hace 2 años
hace 3 años
hace 4 años
hace 3 años
hace 4 años
hace 2 años
hace 3 años
hace 2 años
hace 3 años
hace 2 años
hace 3 años
hace 2 años
hace 3 años
hace 3 años
hace 2 años
hace 3 años
hace 2 años
hace 2 años
hace 3 años
hace 4 años
hace 2 años
hace 2 años
hace 1 año
hace 2 años
hace 1 año
hace 2 años
hace 1 año
hace 2 años
hace 1 año
hace 2 años
hace 1 año
hace 1 año
hace 1 año
hace 1 año
hace 2 años
hace 4 años
hace 4 años
hace 4 años
hace 3 años
hace 3 años
hace 4 años
hace 3 años
hace 3 años
hace 4 años
hace 3 años
hace 2 años
hace 3 años
hace 4 años
hace 3 años
hace 4 años
hace 3 años
hace 4 años
hace 4 años
hace 4 años
hace 4 años
hace 4 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 4 años
hace 4 años
hace 2 años
hace 4 años
hace 2 años
hace 2 años
hace 2 años
hace 4 años
hace 4 años
hace 2 años
hace 4 años
hace 2 años
hace 4 años
hace 2 años
hace 2 años
hace 4 años
hace 2 años
hace 4 años
hace 2 años
hace 2 años
hace 4 años
hace 4 años
hace 4 años
hace 3 años
hace 3 años
hace 2 años
hace 3 años
hace 4 años
hace 3 años
hace 4 años
hace 3 años
hace 4 años
hace 3 años
hace 4 años
hace 3 años
hace 4 años
hace 3 años
hace 4 años
hace 4 años
hace 3 años
hace 2 años
hace 3 años
hace 3 años
hace 3 años
hace 4 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224
  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", 'swiper'], function ($, template, Tools ) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. //焦点图数据
  9. focusListTop: [],
  10. userInformationDetail:[],
  11. userSupplyInformationList:'',
  12. consultingInformationList:'',
  13. biddingInformationList:'',
  14. //页码
  15. pageNum: 1,
  16. //页码集合
  17. pageList: [],
  18. //每页数量
  19. pageSize: 5,
  20. //总页数
  21. pageCount:0,
  22. //用户ID
  23. memberId:0,
  24. //用户资料form
  25. form:{
  26. },
  27. modifyUrl:'',
  28. detailUrl:'',
  29. sheng:[],
  30. shi:[],
  31. sfzList:[],
  32. yhkList:[],
  33. sfz:'',
  34. yhk:'',
  35. khzm:'',
  36. companyLicense:'',
  37. upType1:false,
  38. upType2:false,
  39. upType5:false,
  40. },
  41. };
  42. var tools = new Tools();
  43. module.init = function (page) {
  44. //获取焦点图信息
  45. tools.doGet(websitePicture, {picType:1,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsTop , true);
  46. //底部友情链接
  47. tools.doGet(friendsLinks, {}, module.bottomFriendsLinks, true);
  48. //用户资料
  49. tools.doGet(userData, {}, module.userData);
  50. if(!tools.getCookie('Admin-Token')){
  51. tools.skip('../../index.html')
  52. }
  53. //用户资料
  54. //tools.doPut(userData, {id:}, module.userData,true);
  55. //个人中心选项卡鼠标悬浮
  56. module.userListHover();
  57. //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号)
  58. tools.getWebConfig();
  59. //所属银行
  60. tools.doGet(dictionaries+"/bank_type_all", {}, module.bankType, true);
  61. //账户类型
  62. tools.doGet(dictionaries+"/bank_account_type", {}, module.accountType, true);
  63. window.KindEditor.create('#editor_id')
  64. //console.log(tools.getParam('type'))
  65. var type = tools.getParam('type');
  66. module.getType(type);
  67. setTimeout(function(){
  68. //主题图片切换
  69. module.switchTheme();
  70. },2000)
  71. module.data.sheng = options;
  72. module.data.shi = options[0].children;
  73. var shengData = template('shengData', module.data);
  74. $("#sheng").html(shengData);
  75. var shiData = template('shiData', module.data);
  76. $("#shi").html(shiData);
  77. };
  78. getShi = function () {
  79. console.log($('#bankTypeData').val())
  80. // if (!$('#bankTypeData').val()){
  81. // return;
  82. // }
  83. module.data.shi = module.data.sheng.filter(function (e) { return e.label == $('#sheng').val(); })[0].children;
  84. var shiData = template('shiData', module.data);
  85. $("#shi").html(shiData);
  86. // tools.doGet(depositList, {sheng:$('#sheng').val(),shi:$('#shi').val()}, module.depositList, true);
  87. }
  88. getDeposit = function () {
  89. let data = {
  90. sheng:$('#sheng').val(),
  91. shi:$('#shi').val(),
  92. bankType:$('#bankType').val(),
  93. bankDeposit:$('#bankDeposit').val(),
  94. }
  95. console.log(data)
  96. tools.doGet(depositListYN, data,module.depositListYN);
  97. }
  98. changeBankAddress = function () {
  99. console.log($('#bankAddress').val())
  100. console.log(module.data.bankAddress.filter(function (e) { return e.bankDeposit == $('#bankAddress').val(); }))
  101. document.getElementById('payeePaymentLines').value =
  102. module.data.bankAddress.filter(function (e) { return e.bankDeposit == $('#bankAddress').val(); })[0].payeePaymentLines;
  103. }
  104. module.depositListYN = function (data) {
  105. var content = data.rows;
  106. if (content.length<1){
  107. let dataHtt = {
  108. sheng:$('#sheng').val(),
  109. shi:$('#shi').val(),
  110. bankType:$('#bankType').val(),
  111. bankDeposit:$('#bankDeposit').val(),
  112. }
  113. tools.doPost(depositListPub, dataHtt,module.depositList);
  114. }else{
  115. module.data.bankAddress = content;
  116. var bankAddressData = template('bankAddressData', module.data);
  117. $("#bankAddress").html(bankAddressData);
  118. if (content.length>0){
  119. changeBankAddress();
  120. }else{
  121. document.getElementById('payeePaymentLines').value = '';
  122. }
  123. }
  124. }
  125. module.depositList = function (data) {
  126. var content = data.data;
  127. module.data.bankAddress = content;
  128. var bankAddressData = template('bankAddressData', module.data);
  129. $("#bankAddress").html(bankAddressData);
  130. if (content.length>0){
  131. // changeBankAddress();
  132. }else{
  133. document.getElementById('payeePaymentLines').value = '';
  134. }
  135. }
  136. //底部友情链接
  137. module.bankType = function (data) {
  138. if (data.code == 200) {
  139. var content = data.data;
  140. module.data.bankTypeOption = content;
  141. var bankTypeData = template('bankTypeData', module.data);
  142. $("#bankType").html(bankTypeData);
  143. }
  144. }
  145. //账户类型
  146. module.accountType = function (data) {
  147. if (data.code == 200) {
  148. var content = data.data;
  149. module.data.accountTypeOption = content;
  150. var accountTypeData = template('accountTypeData', module.data);
  151. $("#accountType").html(accountTypeData);
  152. }
  153. }
  154. //焦点图数据
  155. module.focusNewsTop = function (data) {
  156. if (data.code == 200) {
  157. let focusArray = [];
  158. if(data.data.length<1){
  159. focusArray.push({
  160. picUrl:'../../../static/images/banner1.png'
  161. },{
  162. picUrl:'../../../static/images/banner2.png'
  163. },{
  164. picUrl:'../../../static/images/banner3.png'
  165. })
  166. }else{
  167. data.data.forEach(res=>{
  168. focusArray.push({
  169. picUrl:'/api'+res.picUrl
  170. })
  171. })
  172. }
  173. module.data.focusListTop = focusArray;
  174. var bannerFocusDataTop = template('bannerFocusDataTop', module.data);
  175. $("#bannerFocusTopContent").html(bannerFocusDataTop);
  176. new Swiper('#bannerFocusWrapTop', {
  177. paginationClickable: true,
  178. autoplay : 4000,
  179. loop:true
  180. })
  181. }
  182. }
  183. //主题图片切换
  184. module.switchTheme = function(){
  185. if(themeColor == 'red'){
  186. module.data.modifyUrl = '../../static/images/modify_red.png';
  187. module.data.detailUrl = '../../static/images/detail_red.png';
  188. }else if(themeColor == 'green'){
  189. module.data.modifyUrl = '../../static/images/modify.png';
  190. module.data.detailUrl = '../../static/images/detail.png';
  191. }
  192. }
  193. //底部友情链接
  194. module.bottomFriendsLinks = function (data) {
  195. if (data.code == 200) {
  196. var content = data.data;
  197. //console.log(content)
  198. module.data.friendsLinksList = content;
  199. var friendsLinksData = template('friendsLinksData', module.data);
  200. $("#friendsLinksContent").html(friendsLinksData);
  201. }
  202. }
  203. //获取类型
  204. module.getType = function(type){
  205. if (type == 'info'){
  206. document.getElementById("icon-list1").click();
  207. }
  208. if (type == 'demand'){
  209. document.getElementById("icon-list2").click();
  210. }
  211. if (type == 'interact'){
  212. document.getElementById("icon-list3").click();
  213. }
  214. if (type == 'bidding'){
  215. document.getElementById("icon-list4").click();
  216. }
  217. if (type == 'goDemand'){
  218. document.getElementById("icon-list2").click();
  219. document.getElementById("goSupply").click();
  220. }
  221. if (type == 'goInteract'){
  222. document.getElementById("icon-list3").click();
  223. document.getElementById("goRelease").click();
  224. }
  225. }
  226. //个人中心用户信息
  227. module.userData = function(data){
  228. if (data.code == 200) {
  229. var content = data.user;
  230. //console.log(content)
  231. module.data.userId = content.userId;
  232. tools.doGet(userMember + '/' + content.userId, {}, module.userMember);//memberType 1个人 2单位
  233. }
  234. }
  235. //个人中心用户资料
  236. module.userMember = function(data){
  237. if (data.code == 200) {
  238. var content = data.data;
  239. console.log(data)
  240. module.data.userInformationDetail = content;
  241. module.data.memberType = content.memberType;
  242. var bankTypeData = template('bankTypeData', module.data);
  243. $("#bankType").html(bankTypeData);
  244. var bankAddressData = template('bankAddressData', module.data);
  245. $("#bankAddress").html(bankAddressData);
  246. if(content.memberType == '1'){
  247. document.getElementById('companyInformationContent').style.display = 'none';
  248. document.getElementById('userInformationContent').style.display = 'block';
  249. var userInformationData = template('userInformationData', module.data);
  250. $("#userInformationContent").html(userInformationData);
  251. }else{
  252. document.getElementById('companyInformationContent').style.display = 'block';
  253. document.getElementById('userInformationContent').style.display = 'none';
  254. var companyInformationData = template('companyInformationData', module.data);
  255. $("#companyInformationContent").html(companyInformationData);
  256. }
  257. document.getElementById('bankAddress').value = content.bankAddress;
  258. document.getElementById('bankCardName').value = content.bankCardName;
  259. document.getElementById('bankCardNum').value = content.bankCardNum;
  260. document.getElementById('bankType').value = content.bankType;
  261. document.getElementById('accountType').value = content.accountType;
  262. document.getElementById('payeePaymentLines').value = content.payeePaymentLines;
  263. document.getElementById('phone').innerHTML = content.phone;
  264. module.data.memberId = content.id;
  265. //console.log(module.data.userId)
  266. //用户图片
  267. module.showUserImage(content);
  268. //我的供求
  269. tools.doGet(userSupply, {memberId:content.id,pageNum:module.data.pageNum,pageSize:10}, module.userSupply);
  270. //我的咨询
  271. tools.doGet(userConsulting, {memberId:content.id,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.consulting);
  272. //我的竞价
  273. tools.doGet(userBidding, {memberId:content.id,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.bidding);
  274. //个人资料提交
  275. $('#supplyAction').on('click', module.supplyAction)
  276. $('#releaseAction').on('click', module.releaseAction)
  277. //获取附件的值
  278. //$('#upLoadBtn').on('click',module.upLoadAction)
  279. //document.getElementById('userAction').addEventListener('click',module.formAction);
  280. }
  281. }
  282. module.showUserImage = function(data){
  283. console.log(data)
  284. var accountOpenCert = data.accountOpenCert==null||data.accountOpenCert == ''?null:['/api'+data.accountOpenCert];
  285. var idCardPic = data.idCardPic==null||data.idCardPic == ''?null:['/api'+data.idCardPic];
  286. var companyLicense = data.companyLicense==null||data.companyLicense == ''?null:['/api'+data.companyLicense];
  287. console.log(accountOpenCert)
  288. console.log(idCardPic)
  289. if(module.data.memberType == '1'){
  290. var cupload2 = new Cupload ({
  291. ele: '#cupload-3',
  292. num: 1,
  293. data:idCardPic
  294. });
  295. var cupload4 = new Cupload ({
  296. ele: '#cupload-4',
  297. num: 1,
  298. data:accountOpenCert
  299. });
  300. }else{
  301. var cupload5 = new Cupload ({
  302. ele: '#cupload-5',
  303. num: 1,
  304. data:accountOpenCert
  305. });
  306. var cupload6 = new Cupload ({
  307. ele: '#cupload-6',
  308. num: 1,
  309. data:idCardPic
  310. });
  311. var cupload7 = new Cupload ({
  312. ele: '#cupload-7',
  313. num: 1,
  314. data:companyLicense
  315. });
  316. }
  317. }
  318. module.showSupplyImage = function(data){
  319. //console.log(data)
  320. if (data.code == 200) {
  321. var content = data.data;
  322. var fileUrlList = [];
  323. var fileNum = [];
  324. for (var i = 0 ; i < content.length ; i++){
  325. fileUrlList[i] = serverApi + content[i].fileUrl ;
  326. fileNum[i] = content[i].id;
  327. }
  328. if (fileUrlList.length == 0){
  329. fileUrlList = '';
  330. }
  331. //console.log(fileUrlList)
  332. document.getElementById('cupload-1').innerHTML = '';
  333. module.data.fileNum = fileNum;
  334. var cupload1 = new Cupload ({
  335. ele: '#cupload-1',
  336. num: 5,
  337. data:fileUrlList
  338. });
  339. }
  340. }
  341. deleteList = function(){
  342. //console.log(module.data.fileNum[deleteNum])
  343. // tools.doGet(deleteUserImg+'/'+module.data.fileNum[deleteNum], {}, module.Tips);
  344. }
  345. module.getData = function(data){
  346. upLoadAction(data.data)
  347. }
  348. //获取上传图片list
  349. upLoadAction = function(type){
  350. //console.log(type)
  351. var upLoadList = [];
  352. var data = {};
  353. if(type == 'user'||type == 'company'){
  354. if(module.data.memberType == '1'){
  355. $('#cupload-3').find('input').each(function() {
  356. if($(this).val()!=''&&$(this).val().indexOf('http') == -1){
  357. upLoadList.push($(this).val())
  358. }
  359. })
  360. }else{
  361. $('#cupload-5').find('input').each(function() {
  362. if($(this).val()!=''&&$(this).val().indexOf('http') == -1){
  363. upLoadList.push($(this).val())
  364. }
  365. })
  366. data["files"] = upLoadList;
  367. }
  368. // tools.doPostImg(base64Upload, data, module.submitInfo());//memberType 1个人 2单位
  369. }else{
  370. $('#cupload-1').find('input').each(function() {
  371. if($(this).val()!=''&&$(this).val().indexOf('http') == -1){
  372. upLoadList.push($(this).val())
  373. }
  374. })
  375. data["tableName"] = 't_transaction_supply_demand';
  376. data["tableId"] = type?type:module.data.supplyId;
  377. data["files"] = upLoadList;
  378. data["fileType"] = '';
  379. data["bizPath"] = 'transaction';
  380. tools.doPostImg(base64Attach, data, module.upLoadOver);//memberType 1个人 2单位
  381. setTimeout(function(){
  382. tools.doGet(userSupply, {memberId:module.data.memberId,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.userSupply)
  383. document.getElementById('supplyInformation').style.display = "block";
  384. document.getElementById('releaseSupply').style.display = "none";
  385. $('#demandType').val('');
  386. $('#projectName').val('');
  387. $('#location').val('');
  388. $('#projectRealName').val('');
  389. $('#projectPhone').val('');
  390. $('#projectContent').val('');
  391. },2000)
  392. }
  393. // tools.initError('发布成功');
  394. }
  395. module.upLoadOver = function(type){
  396. }
  397. module.upLoadOverInfo1 = function(data){
  398. if (data.code == 200)
  399. module.data.sfz = data.fileName;
  400. }
  401. module.upLoadOverInfo2 = function(data){
  402. if (data.code == 200)
  403. module.data.yhk = data.fileName;
  404. }
  405. module.upLoadOverInfo5 = function(data){
  406. if (data.code == 200)
  407. module.data.khzm = data.fileName;
  408. }
  409. module.upLoadOverInfo6 = function(data){
  410. if (data.code == 200)
  411. module.data.frzjz = data.fileName;
  412. }
  413. module.upLoadOverInfo7 = function(data){
  414. if (data.code == 200)
  415. module.data.companyLicense = data.fileName;
  416. }
  417. submitInfo = function(type){
  418. var upLoadList = [];
  419. var data = {};
  420. if(type == 'user'||type == 'company'){
  421. if(module.data.memberType == '1'){
  422. $('#cupload-3').find('input').each(function() {
  423. if($(this).val()!=''&&$(this).val().indexOf('/api') == -1){
  424. module.data.upType1 = true;
  425. tools.doPostImg(base64Upload, {file:$(this).val()}, module.upLoadOverInfo1);
  426. }
  427. })
  428. $('#cupload-4').find('input').each(function() {
  429. if($(this).val()!=''&&$(this).val().indexOf('/api') == -1){
  430. module.data.upType2 = true;
  431. tools.doPostImg(base64Upload, {file:$(this).val()}, module.upLoadOverInfo2);
  432. }
  433. })
  434. console.log(type);
  435. setTimeout(function(){
  436. formAction(type)
  437. },1000);
  438. }else{
  439. $('#cupload-5').find('input').each(function() {
  440. if($(this).val()!=''&&$(this).val().indexOf('/api') == -1){
  441. module.data.upType5 = true;
  442. tools.doPostImg(base64Upload, {file:$(this).val()}, module.upLoadOverInfo5);
  443. }
  444. })
  445. $('#cupload-6').find('input').each(function() {
  446. if($(this).val()!=''&&$(this).val().indexOf('/api') == -1){
  447. module.data.upType6 = true;
  448. tools.doPostImg(base64Upload, {file:$(this).val()}, module.upLoadOverInfo6);
  449. }
  450. })
  451. $('#cupload-7').find('input').each(function() {
  452. if($(this).val()!=''&&$(this).val().indexOf('/api') == -1){
  453. module.data.upType7 = true;
  454. tools.doPostImg(base64Upload, {file:$(this).val()}, module.upLoadOverInfo7);
  455. }
  456. })
  457. setTimeout(function(){
  458. formAction(type)
  459. },1000);
  460. }
  461. //memberType 1个人 2单位
  462. }
  463. }
  464. //删除供求
  465. deleteUserSupply = function(ids){
  466. tools.doGet(deleteSupply+'/'+ids, {}, module.Tips);
  467. }
  468. //个人中心我的供求
  469. module.userSupply = function(data){
  470. //console.log(data)
  471. if (data.code == 200) {
  472. var content = data.rows;
  473. //console.log(data)
  474. var pageCount = (data.total/10).toFixed(0);
  475. if (pageCount < 1){
  476. pageCount = 1;
  477. }
  478. if(module.data.userSupplyInformationList == ''){
  479. $('.page_s1').html('');
  480. // 初始化 分页器
  481. var page_s1 = createPage('.page_s1');
  482. // 设置分页
  483. setPage(page_s1, {
  484. pageTotal: data.total, // 数据总条数
  485. pageSize: 10, // 每页显示条数
  486. pageCurrent: 1, // 当前页
  487. maxBtnNum: 5, // 最多按钮个数 (最少5个)
  488. })
  489. $('#page_s1').html('共' + pageCount + '页')
  490. }
  491. module.data.userSupplyInformationList = content;
  492. var userSupplyInformationData = template('userSupplyInformationData', module.data);
  493. $("#userSupplyInformationContent").html(userSupplyInformationData);
  494. }
  495. }
  496. //个人中心我的咨询
  497. module.consulting = function(data){
  498. if (data.code == 200) {
  499. var content = data.rows;
  500. //console.log(data )
  501. var pageCount = (data.total/module.data.pageSize).toFixed(0);
  502. if (pageCount < 1){
  503. pageCount = 1;
  504. }
  505. $('.page_s2').html('');
  506. // 初始化 分页器
  507. var page_s1 = createPage('.page_s2');
  508. // 设置分页
  509. setPage(page_s1, {
  510. pageTotal: data.total, // 数据总条数
  511. pageSize: module.data.pageSize, // 每页显示条数
  512. pageCurrent: 1, // 当前页
  513. maxBtnNum: 5, // 最多按钮个数 (最少5个)
  514. })
  515. module.data.consultingInformationList = content;
  516. $('#page_s2').html('共'+pageCount+'页')
  517. var consultingInformationData = template('consultingInformationData', module.data);
  518. $("#consultingInformationContent").html(consultingInformationData);
  519. }
  520. }
  521. //个人中心我的竞价
  522. module.bidding = function(data){
  523. if (data.code == 200) {
  524. var content = data.rows;
  525. //console.log(content)
  526. var pageCount = (data.total/module.data.pageSize).toFixed(0);
  527. if (pageCount < 1){
  528. pageCount = 1;
  529. }
  530. if(module.data.biddingInformationList == '') {
  531. // 初始化 分页器
  532. var page_s1=createPage('.page_s3');
  533. // 设置分页
  534. setPage(page_s1, {
  535. pageTotal: data.total, // 数据总条数
  536. pageSize: module.data.pageSize, // 每页显示条数
  537. pageCurrent: 1, // 当前页
  538. maxBtnNum: 5, // 最多按钮个数 (最少5个)
  539. })
  540. $('#page_s3').html('共' + pageCount + '页')
  541. }
  542. module.data.biddingInformationList = content;
  543. var biddingInformationData = template('biddingInformationData', module.data);
  544. $("#biddingInformationContent").html(biddingInformationData);
  545. }
  546. }
  547. tabCheck = function(type){
  548. document.getElementById('user').className = '';
  549. document.getElementById('bank').className = '';
  550. document.getElementById('passWord').className = '';
  551. document.getElementById(type).className = 'active';
  552. //console.log(type)
  553. document.getElementById('userInformationContent').style.display = 'none';
  554. document.getElementById('companyInformationContent').style.display = 'none';
  555. document.getElementById('bankInformationContent').style.display = 'none';
  556. document.getElementById('phoneInformationContent').style.display = 'none';
  557. document.getElementById('passWordInformationContent').style.display = 'none';
  558. if (module.data.memberType == '2' && type == 'user'){
  559. document.getElementById('companyInformationContent').style.display = 'block';
  560. }else if (module.data.memberType == '1' && type == 'user'){
  561. document.getElementById('userInformationContent').style.display = 'block';
  562. }else{
  563. document.getElementById(type+'InformationContent').style.display = 'block';
  564. }
  565. }
  566. phoneUpdate = function(type){
  567. document.getElementById(type+'InformationContent').style.display = 'none';
  568. document.getElementById('phoneInformationContent').style.display = 'block';
  569. }
  570. tabLeftCheck = function(type){
  571. for (var i = 1 ; i < 5 ; i++){
  572. document.getElementById('icon-list'+i).className = '';
  573. }
  574. document.getElementById(type).className = 'active';
  575. document.getElementById('userInformation').style.display = 'none';
  576. document.getElementById('supplyInformation').style.display = 'none';
  577. document.getElementById('consultingInformation').style.display = 'none';
  578. document.getElementById('biddingInformation').style.display = 'none';
  579. document.getElementById('releaseSupply').style.display = 'none';
  580. document.getElementById('release').style.display = 'none';
  581. if(type == 'icon-list1'){
  582. document.getElementById('userInformation').style.display = 'block';
  583. }
  584. if(type == 'icon-list2'){
  585. document.getElementById('supplyInformation').style.display = 'block';
  586. module.data.clickType = 'supply';
  587. $('#demandType').val('');
  588. $('#projectName').val('');
  589. $('#location').val('');
  590. $('#projectRealName').val('');
  591. $('#projectPhone').val('');
  592. $('#projectContent').val('');
  593. }
  594. if(type == 'icon-list3'){
  595. document.getElementById('consultingInformation').style.display = 'block';
  596. module.data.clickType = 'consulting';
  597. $('#title').val('');
  598. $('#releaseContent').val('');
  599. $('#releaseRealName').val('');
  600. $('#releasePhone').val('');
  601. }
  602. if(type == 'icon-list4'){
  603. document.getElementById('biddingInformation').style.display = 'block';
  604. module.data.clickType = 'bidding';
  605. }
  606. module.data.pageNum = 1 ;
  607. }
  608. goSupply = function(){
  609. document.getElementById('supplyInformation').style.display = "none";
  610. document.getElementById('releaseSupply').style.display = "block";
  611. document.getElementById('cupload-1').innerHTML = '';
  612. module.data.supplyType = 'add'
  613. var cupload1 = new Cupload ({
  614. ele: '#cupload-1',
  615. num: 5,
  616. });
  617. }
  618. gosupplyTable = function(){
  619. document.getElementById('supplyInformation').style.display = "block";
  620. document.getElementById('releaseSupply').style.display = "none";
  621. $('#demandType').val('');
  622. $('#projectName').val('');
  623. $('#location').val('');
  624. $('#projectRealName').val('');
  625. $('#projectPhone').val('');
  626. $('#projectContent').val('');
  627. }
  628. goRelease = function(){
  629. document.getElementById('consultingInformation').style.display = "none";
  630. document.getElementById('release').style.display = "block";
  631. }
  632. goReleaseTable = function(){
  633. document.getElementById('consultingInformation').style.display = "block";
  634. document.getElementById('release').style.display = "none";
  635. $('#title').val('');
  636. $('#releaseContent').val('');
  637. $('#releaseRealName').val('');
  638. $('#releasePhone').val('');
  639. }
  640. //翻页
  641. turnThePage = function (pageNum) {
  642. module.data.pageNum = pageNum ;
  643. if(module.data.clickType == 'supply'){
  644. tools.doGet(userSupply, {memberId:module.data.memberId,pageNum:pageNum,pageSize:module.data.pageSize}, module.userSupply);
  645. }
  646. if(module.data.clickType == 'consulting'){
  647. tools.doGet(userConsulting, {memberId:module.data.memberId,pageNum:pageNum,pageSize:module.data.pageSize}, module.consulting);
  648. }
  649. if(module.data.clickType == 'bidding'){
  650. tools.doGet(userBidding, {memberId:module.data.memberId,pageNum:pageNum,pageSize:module.data.pageSize}, module.bidding);
  651. }
  652. }
  653. //个人用户资料修改
  654. formAction = function (type){
  655. var data = {};
  656. //var password = $('#password').val();
  657. module.data.userFormType = type ;
  658. if(type == 'company'){
  659. //公司用户信息
  660. var companyName = $('#companyName').val();
  661. var idCardNum = $('#idCardNum').val();
  662. var realname = $('#realname').val();
  663. var companyCode = $('#companyCode').val();
  664. var companyNature = $('#companyNature').val();
  665. var companyScope = $('#companyScope').val();
  666. var companyTimeLimit = $('#companyTimeLimit').val();
  667. var companySetupTime = $('#companySetupTime').val();
  668. var companyCapital = $('#companyCapital').val();
  669. var companyLicense = $('#companyLicense').val();
  670. var address = $('#address').val();
  671. var accountOpenCert = module.data.khzm;
  672. var idCardPic = module.data.frzjz;
  673. if (companyName == '') {
  674. $('#companyName')[0].focus()
  675. tools.initTips('请输入公司名称', 'right', $('#companyName')[0], 2000)
  676. return false;
  677. }
  678. if (idCardNum == '') {
  679. $('#idCardNum')[0].focus()
  680. tools.initTips('请输入身份证号', 'right', $('#idCardNum')[0], 2000)
  681. return false;
  682. }
  683. if (realname == '') {
  684. $('#realname')[0].focus()
  685. tools.initTips('请输入负责人姓名', 'right', $('#realname')[0], 2000)
  686. return false;
  687. }
  688. let array = []
  689. $('#cupload-5').find('input').each(function() {
  690. if($(this).val()!=''){
  691. array.push($(this).val())
  692. }
  693. });
  694. if(array.length<1){
  695. $('#cupload-5')[0].focus()
  696. tools.initTips('请上传相关附件', 'right', $('#cupload-5')[0], 2000)
  697. return false;
  698. }
  699. let array6 = []
  700. $('#cupload-6').find('input').each(function() {
  701. if($(this).val()!=''){
  702. array6.push($(this).val())
  703. }
  704. });
  705. if(array6.length<1){
  706. $('#cupload-6')[0].focus()
  707. tools.initTips('请上传法人证件照', 'right', $('#cupload-6')[0], 2000)
  708. return false;
  709. }
  710. data['accountOpenCert'] = accountOpenCert;
  711. data['companyName'] = companyName;
  712. data['idCardNum'] = idCardNum;
  713. data['realname'] = realname;
  714. data['companyCode'] = companyCode;
  715. data['companyName'] = companyName;
  716. data['companyNature'] = companyNature;
  717. data['companyScope'] = companyScope;
  718. data['companyTimeLimit'] = companyTimeLimit;
  719. data['companySetupTime'] = companySetupTime;
  720. data['companyCapital'] = companyCapital;
  721. data['companyLicense'] = companyLicense;
  722. data['address'] = address;
  723. data['idCardPic'] = idCardPic;
  724. tools.setCookie('userName',realname,24 * 60 * 60)
  725. tools.setCookie('idCardNum',idCardNum,24 * 60 * 60)
  726. tools.setCookie('address',address,24 * 60 * 60)
  727. // upLoadAction('user');
  728. }
  729. if(type == 'user'){
  730. //个人用户信息
  731. var userFormRealName = $('#userFormRealName').val();
  732. var userFormIdCard = $('#userFormIdCard').val();
  733. var userFormAddress = $('#userFormAddress').val();
  734. var idCardPic = module.data.sfz;
  735. var accountOpenCert = module.data.yhk;
  736. if (userFormRealName == '') {
  737. $('#userFormRealName')[0].focus()
  738. tools.initTips('请输入姓名', 'right', $('#userFormRealName')[0], 2000)
  739. return false;
  740. }
  741. if (userFormIdCard == '') {
  742. $('#userFormIdCard')[0].focus()
  743. tools.initTips('请输入身份证号码', 'right', $('#userFormIdCard')[0], 2000)
  744. return false;
  745. }
  746. let array = []
  747. $('#cupload-3').find('input').each(function() {
  748. if($(this).val()!=''){
  749. array.push($(this).val())
  750. }
  751. });
  752. if(array.length<1){
  753. $('#cupload-3')[0].focus()
  754. tools.initTips('请上传身份证', 'right', $('#cupload-3')[0], 2000)
  755. return false;
  756. }
  757. let array2 = []
  758. $('#cupload-4').find('input').each(function() {
  759. if($(this).val()!=''){
  760. array2.push($(this).val())
  761. }
  762. });
  763. if(array2.length<1){
  764. $('#cupload-4')[0].focus()
  765. tools.initTips('请上传银行卡', 'right', $('#cupload-4')[0], 2000)
  766. return false;
  767. }
  768. data['idCardPic'] = idCardPic;
  769. data['accountOpenCert'] = accountOpenCert;
  770. data['idCardNum'] = userFormIdCard;
  771. data['realname'] = userFormRealName;
  772. data['address'] = userFormAddress;
  773. tools.setCookie('userName',userFormRealName,24 * 60 * 60)
  774. tools.setCookie('idCardNum',userFormIdCard,24 * 60 * 60)
  775. tools.setCookie('address',userFormAddress,24 * 60 * 60)
  776. // upLoadAction('user');
  777. }
  778. if(type == 'bank'){
  779. //银行卡信息
  780. var bankCardName = $('#bankCardName').val();
  781. var bankCardNum = $('#bankCardNum').val();
  782. var bankAddress = $('#bankAddress').val();
  783. var bankType = $('#bankType').val();
  784. var accountType = $('#accountType').val();
  785. var payeePaymentLines = $('#payeePaymentLines').val();
  786. if (bankCardName == '') {
  787. $('#bankCardName')[0].focus()
  788. tools.initTips('请输入开户姓名', 'right', $('#bankCardName')[0], 2000)
  789. return false;
  790. }
  791. if (bankCardNum == '') {
  792. $('#bankCardNum')[0].focus()
  793. tools.initTips('请输入开户账号', 'right', $('#bankCardNum')[0], 2000)
  794. return false;
  795. }
  796. if (bankType == '') {
  797. $('#bankType')[0].focus()
  798. tools.initTips('请选择所属银行', 'right', $('#bankType')[0], 2000)
  799. return false;
  800. }
  801. if (bankAddress == '') {
  802. $('#bankAddress')[0].focus()
  803. tools.initTips('请选择开户银行', 'right', $('#bankAddress')[0], 2000)
  804. return false;
  805. }
  806. if (payeePaymentLines == '') {
  807. $('#payeePaymentLines')[0].focus()
  808. tools.initTips('请输入联行号', 'right', $('#payeePaymentLines')[0], 2000)
  809. return false;
  810. }
  811. data['bankCardName'] = bankCardName;
  812. data['bankCardNum'] = bankCardNum;
  813. data['bankAddress'] = bankAddress;
  814. data['bankType'] = bankType;
  815. data['accountType'] = accountType;
  816. data['payeePaymentLines'] = payeePaymentLines;
  817. tools.setCookie('bankCardName',bankCardName,24 * 60 * 60)
  818. tools.setCookie('bankCardNum',bankCardNum,24 * 60 * 60)
  819. tools.setCookie('bankAddress',bankAddress,24 * 60 * 60)
  820. tools.setCookie('bankType',bankType,24 * 60 * 60)
  821. tools.setCookie('accountType',accountType,24 * 60 * 60)
  822. tools.setCookie('payeePaymentLines',payeePaymentLines,24 * 60 * 60)
  823. }
  824. //data['password'] = password;
  825. data['id'] = module.data.memberId;
  826. tools.doPost(userUpdate, data, module.Tips)
  827. }
  828. editPassword = function(){
  829. var data = {};
  830. if(module.passWordCompare()){
  831. var oldPassWord = $('#originalPassWord').val();
  832. var newPassWord = $('#newPassWord').val();
  833. data['oldPassword'] = oldPassWord;
  834. data['newPassword'] = newPassWord;
  835. tools.doPost(updatePwd, data, module.Tips)
  836. }
  837. }
  838. //手动验证密码是否一致
  839. module.passWordCompare = function(){
  840. var newPassword = $('#newPassWord').val();
  841. var determinePassWord = $('#determinePassWord').val();
  842. var originalPassWord = $('#originalPassWord').val();
  843. /*原密码*/
  844. if (originalPassWord == '') {
  845. $('#originalPassWord')[0].focus()
  846. tools.initTips('请输入原密码', 'right', $('#originalPassWord')[0], 2000)
  847. return false;
  848. }
  849. /* 新密码 */
  850. if (newPassword == '') {
  851. $('#newPassWord')[0].focus()
  852. tools.initTips('请输入新密码', 'right', $('#newPassWord')[0], 2000)
  853. return false;
  854. }
  855. /* 确认密码 */
  856. if (determinePassWord == '') {
  857. $('#determinePassWord')[0].focus()
  858. tools.initTips('请确认密码', 'right', $('#determinePassWord')[0], 2000)
  859. return false;
  860. }
  861. return true;
  862. }
  863. //发布供求
  864. module.supplyAction = function (){
  865. var data = {};
  866. if(module.supplyCheck()){
  867. //供求信息
  868. var demandType = $('#demandType').val();
  869. var projectName = $('#projectName').val();
  870. var location = $('#location').val();
  871. var projectRealName = $('#projectRealName').val();
  872. var projectPhone = $('#projectPhone').val();
  873. var projectContent = $('#projectContent').val();
  874. var logintime = tools.getNowFormatDate();
  875. //console.log(demandType);
  876. data['projectName'] = projectName;
  877. data['location'] = location;
  878. data['realname'] = projectRealName;
  879. data['phone'] = projectPhone;
  880. data['projectContent'] = projectContent;
  881. data['logintime'] = logintime;
  882. data['supplyDemandType'] = demandType;
  883. data['deptId'] = 100;
  884. data['memberId'] = module.data.memberId;
  885. if(module.data.supplyType == 'edit'){
  886. data['id'] = module.data.supplyId;
  887. tools.doPost(userEdit, data, module.getData)
  888. }else{
  889. tools.doPost(userDemand, data, module.getData)
  890. }
  891. }
  892. }
  893. //发布咨询
  894. module.releaseAction = function (){
  895. var data = {};
  896. if(module.releaseCheck()){
  897. //供求信息
  898. var title = $('#title').val();
  899. var releaseContent = $('#releaseContent').val();
  900. var releaseRealName = $('#releaseRealName').val();
  901. var releasePhone = $('#releasePhone').val();
  902. var logintime = tools.getNowFormatDate();
  903. data['title'] = title;
  904. data['content'] = releaseContent;
  905. data['realname'] = releaseRealName;
  906. data['phone'] = releasePhone;
  907. data['logintime'] = logintime;
  908. data['deptId'] = 100;
  909. data['memberId'] = module.data.memberId;
  910. tools.doPost(userCommunicate, data, module.releaseActionYes)
  911. }
  912. }
  913. module.releaseActionYes = function(data){
  914. tools.initError(data.msg);
  915. setTimeout(function(){
  916. tools.doGet(userConsulting, {memberId:module.data.memberId,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.consulting);
  917. document.getElementById('consultingInformation').style.display = "block";
  918. document.getElementById('release').style.display = "none";
  919. $('#title').val('');
  920. $('#releaseContent').val('');
  921. $('#releaseRealName').val('');
  922. $('#releasePhone').val('');
  923. },2000)
  924. }
  925. module.Tips = function(data){
  926. tools.initError(data.msg);
  927. }
  928. //手动验证表单
  929. module.check = function () {
  930. var usernameVal = $('#username').val();
  931. var passwordVal = $('#password').val();
  932. var codeVal = $('#code').val();
  933. /* 手机号 */
  934. if (usernameVal == '') {
  935. $('#username')[0].focus()
  936. tools.initTips('请输入用户名', 'right', $('#username')[0], 2000)
  937. return false;
  938. }
  939. /* 密码 */
  940. if (passwordVal == '') {
  941. $('#password')[0].focus()
  942. tools.initTips('请输入密码', 'right', $('#password')[0], 2000)
  943. return false;
  944. } else if (parseInt(passwordVal.length) < 6 || parseInt(passwordVal.length) > 18) {
  945. $('#password')[0].focus()
  946. tools.initTips('请输入正确格式密码', 'right', $('#password')[0], 2000)
  947. return false;
  948. }
  949. /*图形验证码*/
  950. if (module.uuid == '' || codeVal == '') {
  951. $('#code')[0].focus()
  952. tools.initTips('请输入图形验证码', 'right', $('#code')[0], 2000)
  953. return false;
  954. }
  955. return true;
  956. }
  957. module.supplyCheck = function () {
  958. var projectName = $('#projectName').val();
  959. var location = $('#location').val();
  960. var projectRealName = $('#projectRealName').val();
  961. var projectPhone = $('#projectPhone').val();
  962. var projectContent = $('#projectContent').val();
  963. if (projectName == '') {
  964. $('#projectName')[0].focus()
  965. tools.initTips('请输入项目名称', 'right', $('#projectName')[0], 2000)
  966. return false;
  967. }
  968. if (location == '') {
  969. $('#location')[0].focus()
  970. tools.initTips('请输入项目地址', 'right', $('#location')[0], 2000)
  971. return false;
  972. }
  973. if (projectRealName == '') {
  974. $('#projectRealName')[0].focus()
  975. tools.initTips('请输入姓名', 'right', $('#projectRealName')[0], 2000)
  976. return false;
  977. }
  978. if (projectPhone == '') {
  979. $('#projectPhone')[0].focus()
  980. tools.initTips('请输入联系电话', 'right', $('#projectPhone')[0], 2000)
  981. return false;
  982. }
  983. if (projectContent == '') {
  984. $('#projectContent')[0].focus()
  985. tools.initTips('请输入项目详情', 'right', $('#projectContent')[0], 2000)
  986. return false;
  987. }
  988. return true;
  989. }
  990. module.releaseCheck = function () {
  991. var title = $('#title').val();
  992. var releaseContent = $('#releaseContent').val();
  993. var releaseRealName = $('#releaseRealName').val();
  994. var releasePhone = $('#releasePhone').val();
  995. if (title == '') {
  996. $('#title')[0].focus()
  997. tools.initTips('请输入标题', 'right', $('#title')[0], 2000)
  998. return false;
  999. }
  1000. if (releaseContent == '') {
  1001. $('#releaseContent')[0].focus()
  1002. tools.initTips('请输入咨询内容', 'right', $('#releaseContent')[0], 2000)
  1003. return false;
  1004. }
  1005. if (releaseRealName == '') {
  1006. $('#releaseRealName')[0].focus()
  1007. tools.initTips('请输入姓名', 'right', $('#releaseRealName')[0], 2000)
  1008. return false;
  1009. }
  1010. if (releasePhone == '') {
  1011. $('#releasePhone')[0].focus()
  1012. tools.initTips('请输入联系电话', 'right', $('#releasePhone')[0], 2000)
  1013. return false;
  1014. }
  1015. return true;
  1016. }
  1017. //个人中心选项卡鼠标悬浮
  1018. module.userListHover = function(){
  1019. document.getElementById('icon-list1').onmouseout = function(){
  1020. document.getElementById('icon1').src = '../../static/images/user_index_icon1.png'
  1021. }
  1022. document.getElementById('icon-list1').onmouseover = function(){
  1023. if(themeColor == 'red'){
  1024. document.getElementById('icon1').src = '../../static/images/user_index_icon5_red.png'
  1025. }else if(themeColor == 'green'){
  1026. document.getElementById('icon1').src = '../../static/images/user_index_icon5.png'
  1027. }
  1028. }
  1029. document.getElementById('icon-list2').onmouseout = function(){
  1030. document.getElementById('icon2').src = '../../static/images/user_index_icon2.png'
  1031. }
  1032. document.getElementById('icon-list2').onmouseover = function(){
  1033. if(themeColor == 'red'){
  1034. document.getElementById('icon2').src = '../../static/images/user_index_icon6_red.png'
  1035. }else if(themeColor == 'green') {
  1036. document.getElementById('icon2').src = '../../static/images/user_index_icon6.png'
  1037. }
  1038. }
  1039. document.getElementById('icon-list3').onmouseout = function(){
  1040. document.getElementById('icon3').src = '../../static/images/user_index_icon3.png'
  1041. }
  1042. document.getElementById('icon-list3').onmouseover = function(){
  1043. if(themeColor == 'red'){
  1044. document.getElementById('icon3').src = '../../static/images/user_index_icon7_red.png'
  1045. }else if(themeColor == 'green') {
  1046. document.getElementById('icon3').src = '../../static/images/user_index_icon7.png'
  1047. }
  1048. }
  1049. document.getElementById('icon-list4').onmouseout = function(){
  1050. document.getElementById('icon4').src = '../../static/images/user_index_icon4.png'
  1051. }
  1052. document.getElementById('icon-list4').onmouseover = function(){
  1053. if(themeColor == 'red'){
  1054. document.getElementById('icon4').src = '../../static/images/user_index_icon8_red.png'
  1055. }else if(themeColor == 'green') {
  1056. document.getElementById('icon4').src = '../../static/images/user_index_icon8.png'
  1057. }
  1058. }
  1059. }
  1060. goSearch = function () {
  1061. var searchTitle = $('#searchTitle').val();
  1062. var searchContent = $('#searchContent').val();
  1063. //console.log(searchTitle)
  1064. module.data.searchType = 'YES';
  1065. tools.doGet(userConsulting,{title:searchTitle,content:searchContent,memberId:module.data.memberId,pageNum:module.data.pageNum,pageSize:module.data.pageSize},module.consulting);
  1066. }
  1067. selectUserSupply = function(ids) {
  1068. module.data.supplyType = 'edit';
  1069. module.data.supplyId = ids;
  1070. //console.log('点击修改')
  1071. tools.doGet(selectSupply + '/' + ids, {}, module.selectSupplyDetail);//memberType 1个人 2单位
  1072. }
  1073. module.selectSupplyDetail = function(data){
  1074. console.log('进入修改供求')
  1075. document.getElementById('supplyInformation').style.display = "none";
  1076. document.getElementById('releaseSupply').style.display = "block";
  1077. var content = data.data
  1078. $('#demandType').val(content.supplyDemandType);
  1079. $('#projectName').val(content.projectName);
  1080. $('#location').val(content.location);
  1081. $('#projectRealName').val(content.realname);
  1082. $('#projectPhone').val(content.phone);
  1083. $('#projectContent').val(content.projectContent);
  1084. tools.doGet(supplyDemandImg+'/'+content.id, {}, module.showSupplyImage);
  1085. }
  1086. goProject = function(id){
  1087. tools.skip('../listingItems/itemsDetail.html?id='+id)
  1088. }
  1089. openBiddingList = function(id){
  1090. tools.doGet(userBiddingList, {projectId:id,memberId:module.data.memberId}, module.openBidding);
  1091. }
  1092. module.openBidding = function(data){
  1093. $('#dialog-01').css('display','block')
  1094. if (data.code == 200) {
  1095. var content = data.rows;
  1096. module.data.moneyList = content;
  1097. var biddingMoneyData = template('biddingMoneyData', module.data);
  1098. $("#biddingMoneyContent").html(biddingMoneyData);
  1099. }
  1100. }
  1101. return module;
  1102. });