You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

309 lines
13 KiB

  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>教职工基本信息登记表</title>
  8. @Html.AppendCssFile("/Areas/AssetManagementSystem/Views/Ass_Acceptance/Print.css")
  9. </head>
  10. <body>
  11. <div id="table">
  12. <div class="tableBox">
  13. <div class="tableT">北京金隅科技学校固定资产验收单</div>
  14. <div>
  15. <span>项目名称:<span id="name"></span></span>
  16. <span style="margin-right: 20px;float: right;">日期:<span id="time"></span></span>
  17. </div>
  18. <table class="table">
  19. <tr>
  20. <td>序号</td>
  21. <td>设备名称</td>
  22. <td>规格型号</td>
  23. <td>单位</td>
  24. <td>数量</td>
  25. <td>单价(元)</td>
  26. <td>总价(元)</td>
  27. <td>使用部门</td>
  28. <td>放置地点</td>
  29. <td>使用人</td>
  30. <td>备注</td>
  31. </tr>
  32. <tbody id="t_tbody"></tbody>
  33. </table>
  34. <p></p>
  35. <table class="t_option" style="border: none">
  36. <tr>
  37. <td> 部门资产管理员(签字):</td>
  38. <td><span id="bmgl"></span></td>
  39. <td> 部门负责人(签字):</td>
  40. <td><span id="bmuser"></span></td>
  41. @*<td> 财务负责人(签字):</td>
  42. <td><span id="cwuser"></span></td>*@
  43. </tr>
  44. <tr><td></td> </tr>
  45. <tr>
  46. <td> 设备管理员(签字):</td>
  47. <td><span id="sbgl"></span></td>
  48. <td> 设备管理负责人(签字):</td>
  49. <td><span id="sbgluser"></span></td>
  50. </tr>
  51. <tr>
  52. <td> 校领导审核(签字):</td>
  53. <td><span id="xld"></span></td>
  54. <td> 财务处审核(签字):</td>
  55. <td><span id="cwc"></span></td>
  56. </tr>
  57. </table>
  58. </div>
  59. </div>
  60. <div class="btn">打印</div>
  61. <script src="~/Content/jquery/plugin/fullcalendar/js/jquery-1.7.2.min.js"></script>
  62. <script src="~/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js"></script>
  63. <script>
  64. $('.btn').click(function () {
  65. $('.tableBox').jqprint();
  66. })
  67. $(function () {
  68. var tempdatra = '';
  69. var TaskLogData = {};
  70. if (top["layer_formAss_Acceptance"]) {
  71. tempdatra = top["layer_formAss_Acceptance"].tempdatra;
  72. }
  73. else {
  74. var keyValue = getQueryString('keyValue');
  75. if (keyValue) {
  76. var data = top.learun.httpGet(
  77. top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/GetFormData?keyValue=' + keyValue, '');
  78. tempdatra = data.data.Ass_Acceptance;
  79. }
  80. }
  81. var createTime = getQueryString('createTime');
  82. $('#time').text(createTime);
  83. var ProcessId = getQueryString('ProcessId');
  84. if (ProcessId) {
  85. TaskLogData = top.learun.httpGet(
  86. top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetNWFTaskLogData?processId=' + ProcessId, '');
  87. }
  88. if (tempdatra) {
  89. var html = '';
  90. var num = 0, price = 0, pricenum = 0;
  91. for (var i = 0; i < tempdatra.length; i++) {
  92. //单位
  93. var AAIUnit = '';
  94. top.learun.clientdata.getAsync('dataItem', {
  95. key: tempdatra[i].AAIUnit,
  96. code: 'sldw',
  97. callback: function (_data) {
  98. if (_data.text && _data.text != 'undefined') {
  99. AAIUnit = _data.text;
  100. }
  101. }
  102. });
  103. //使用部门
  104. var AAIUseDeptName = '';
  105. top.learun.clientdata.getAsync('custmerData', {
  106. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  107. key: tempdatra[i].AAIUseDeptId,
  108. keyId: 'id',
  109. callback: function (_data) {
  110. if (_data['name'] && _data['name'] != 'undefined') {
  111. AAIUseDeptName = _data['name'];
  112. }
  113. }
  114. });
  115. //放置地点
  116. var AAIStorage = '';
  117. top.learun.clientdata.getAsync('custmerData', {
  118. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData',
  119. key: tempdatra[i].AAIStorageId,
  120. keyId: 'sid',
  121. callback: function (_data) {
  122. if (_data['sname'] && _data['sname'] != 'undefined') {
  123. AAIStorage += _data['sname'];
  124. }
  125. }
  126. });
  127. top.learun.clientdata.getAsync('custmerData', {
  128. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room',
  129. key: tempdatra[i].AAIStoragePosition,
  130. keyId: 'rid',
  131. callback: function (_data) {
  132. if (_data['rcode'] && _data['rcode'] != 'undefined') {
  133. AAIStorage += _data['rcode'];
  134. }
  135. }
  136. });
  137. //使用人
  138. var AAIUseUser = '';
  139. if (tempdatra[i].AAIUseUserId && tempdatra[i].AAIUseUserId != 'undefined') {
  140. top.learun.clientdata.getAsync('custmerData', {
  141. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  142. key: tempdatra[i].AAIUseUserId,
  143. keyId: 'f_userid',
  144. callback: function (_data) {
  145. AAIUseUser = _data['f_realname'];
  146. }
  147. });
  148. }
  149. var AAIStock = '';
  150. if (tempdatra[i].AAIStock && tempdatra[i].AAIStock != 'undefined') {
  151. AAIStock = tempdatra[i].AAIStock;
  152. }
  153. var AAIPrice = '';
  154. if (tempdatra[i].AAIPrice && tempdatra[i].AAIPrice != 'undefined') {
  155. AAIPrice = tempdatra[i].AAIPrice;
  156. }
  157. if (AAIStock && AAIStock != 'undefined') {
  158. num += parseFloat(AAIStock);
  159. }
  160. if (AAIPrice && AAIPrice != 'undefined') {
  161. price += parseFloat(AAIPrice);
  162. }
  163. if (AAIStock && AAIStock != 'undefined' && AAIPrice && AAIPrice != 'undefined') {
  164. pricenum += AAIPrice * AAIStock;
  165. }
  166. html += '<tr>';
  167. html += '<td>' + (i + 1) + '</td>';
  168. html += '<td>' + tempdatra[i].AAIName + '</td>';
  169. html += '<td>' + tempdatra[i].AAISpecification + '</td>';
  170. html += '<td>' + AAIUnit + '</td>';
  171. html += '<td>' + AAIStock + '</td>';
  172. html += '<td>' + AAIPrice + '</td>';
  173. html += '<td>' + AAIPrice * AAIStock + '</td>';
  174. html += '<td>' + AAIUseDeptName + '</td>';
  175. html += '<td>' + AAIStorage + '</td>';
  176. html += '<td>' + AAIUseUser + '</td>';
  177. var ARemark = '';
  178. if (tempdatra[i].ARemark && tempdatra[i].ARemark != 'null') {
  179. ARemark = tempdatra[i].ARemark;
  180. }
  181. html += '<td>' + ARemark + '</td>';
  182. html += '</tr>';
  183. }
  184. html += '<tr>';
  185. html += '<td></td>';
  186. html += '<td>合计</td>';
  187. html += '<td></td>';
  188. html += '<td></td>';
  189. html += '<td>' + num + '</td>';
  190. html += '<td>' + price + '</td>';
  191. html += '<td>' + pricenum + '</td>';
  192. html += '<td></td>';
  193. html += '<td></td>';
  194. html += '<td></td>';
  195. html += '<td></td>';
  196. html += '</tr>';
  197. //$('.table tbody').empty().append(html);
  198. $('#t_tbody').html(html);
  199. if (TaskLogData && TaskLogData.data) {
  200. var bmgl = "", bmuser = '', cwuser = '', sbgl = '', sbgluser = '', xld = '', cwc='';
  201. for (var i = 0; i < TaskLogData.data.length; i++) {
  202. var item = TaskLogData.data[i];
  203. if (item && item.F_NodeId) {
  204. //部门资产管理员
  205. if (item.F_NodeId == '7d6318b6-b5aa-a6c0-0d1d-ee47fd9aaf18') {
  206. bmgl = getUser(item.F_CreateUserId, item.F_CreateUserName);
  207. }
  208. //部门负责人1
  209. if (item.F_NodeId == '400c0918-cd01-45b7-7d1b-94211516c3cd') {
  210. bmuser = getUser(item.F_CreateUserId, item.F_CreateUserName);
  211. }
  212. ////财务负责人
  213. //if (item.F_NodeId == '1627782c-9244-f5ff-0da8-c36d348f032a') {
  214. // cwuser = getUser(item.F_CreateUserId, item.F_CreateUserName);
  215. //}
  216. //设备管理员2
  217. if (item.F_NodeId == 'a2b32308-ce97-219d-01e8-3088946faf74') {
  218. sbgl = getUser(item.F_CreateUserId, item.F_CreateUserName);
  219. }
  220. //设备管理负责人3
  221. if (item.F_NodeId == '35e03210-12b3-10a5-de59-0daeeaedd7d0') {
  222. sbgluser = getUser(item.F_CreateUserId, item.F_CreateUserName);
  223. }
  224. //校领导审核4
  225. if (item.F_NodeId == '199c2bd4-46d7-2142-2429-a9bb429181bf') {
  226. xld = getUser(item.F_CreateUserId, item.F_CreateUserName);
  227. }
  228. //财务处审核
  229. if (item.F_NodeId == '391378d7-439a-0a63-89d5-8444b717f784') {
  230. cwc = getUser(item.F_CreateUserId, item.F_CreateUserName);
  231. }
  232. }
  233. }
  234. $('#bmgl').html(bmgl);
  235. $('#bmuser').html(bmuser);
  236. $('#cwuser').html(cwuser);
  237. $('#sbgl').html(sbgl);
  238. $('#sbgluser').html(sbgluser);
  239. $('#xld').html(xld);
  240. $('#cwc').html(cwc);
  241. }
  242. }
  243. });
  244. function getUser(uid, name) {
  245. var deptid = '';
  246. var deptname = '';
  247. var result = '';
  248. top.learun.clientdata.getAsync('custmerData',
  249. {
  250. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  251. key: uid,
  252. keyId: 'f_userid',
  253. callback: function (_data) {
  254. deptid = _data['f_departmentid'];
  255. }
  256. });
  257. top.learun.clientdata.getAsync('custmerData',
  258. {
  259. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  260. key: deptid,
  261. keyId: 'id',
  262. callback: function (_data) {
  263. if (_data['name'] && _data['name'] != 'undefined') {
  264. deptname = _data['name'];
  265. }
  266. }
  267. });
  268. if (deptname && deptname != 'undefined') {
  269. return '【' + deptname + '】' + name;
  270. } else {
  271. return name;
  272. }
  273. }
  274. function getQueryString(name) {
  275. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", 'i'); // 匹配目标参数
  276. var result = window.location.search.substr(1).match(reg); // 对querystring匹配目标参数
  277. if (result != null) {
  278. return decodeURIComponent(result[2]);
  279. } else {
  280. return null;
  281. }
  282. }
  283. </script>
  284. </body>
  285. </html>