list.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml" ng-app="app">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title>办公用品管理</title>
  7. <link href="../../AFrontEnd/css/animate.css" rel="stylesheet" />
  8. <link href="../../AFrontEnd/css/fontawesome/css/font-awesome.css" rel="stylesheet" />
  9. <link href="../../AFrontEnd/css/bootstrap.css" rel="stylesheet" />
  10. <link href="../../AFrontEnd/css/style.css" rel="stylesheet" />
  11. <script>document.write("<link href='../../AFrontEnd/css/special.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
  12. <script>document.write("<link href='css/list.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
  13. </head>
  14. <body ng-controller="indexCtrl as ctl" ng-cloak>
  15. <div>
  16. <div class="loading" ng-if="ctl.loading">
  17. <div class="loading-msg">
  18. <h3>数据加载中,请等待</h3>
  19. <div class="spinner">
  20. <div class="bounce1"></div>
  21. <div class="bounce2"></div>
  22. <div class="bounce3"></div>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="sp-page-mgn" >
  27. <div class="sp-page-pad">
  28. <div class="sp-page">
  29. <div class="sp-page-col sp-pull-left">
  30. <span class="sp-page-title">办公用品管理</span>
  31. </div>
  32. <div class="sp-page-col sp-pull-right">
  33. <span class="sp-btn-gray sp-md sp-btn-radius" ng-click="ctl.opneInsertLayer()"><i class="fa fa-plus"></i> 新 增</span>
  34. <span class="sp-btn-gray sp-md sp-btn-radius" ng-click="ctl.openSearchLayer()"><i class="fa fa-search"></i> 查 询</span>
  35. </div>
  36. </div>
  37. <div class="sp-line-gray"></div>
  38. <div class="sp-page sp-mt-10">
  39. <div class="fp-part-left">
  40. <div class="sp-page sp-text-center sp-color-white"
  41. style="height: 40px; line-height: 40px; background-color: #1c84c6; ">分类清单
  42. </div>
  43. <div class="sp-page" id="treeDivPart" style="overflow:auto;">
  44. <div style="width: 100%;" class="menu-list" tree-view tree-data="ctl.treeData" text-field="CNAME"
  45. item-up="ctl.itemUp($item,$event)"
  46. item-down="ctl.itemDown($item,$event)"
  47. item-add="ctl.itemAdd($item,$event)"
  48. item-edit="ctl.itemEdit($item,$event)"
  49. item-check="ctl.itemCheck($item,$event)"
  50. item-delete="ctl.itemDelete($item,$event)">
  51. </div>
  52. </div>
  53. </div>
  54. <div class="fp-part-right ng-hide" ng-show="ctl.nowNodeCode!=''">
  55. <div class="sp-page-mgn">
  56. <table class="sp-table">
  57. <thead>
  58. <tr>
  59. <th style="width:60px;">序号</th>
  60. <th>用品编号</th>
  61. <th>品牌</th>
  62. <th>用品名称</th>
  63. <th>分类</th>
  64. <th>规格</th>
  65. <th style="width:100px;">单价</th>
  66. <th style="width: 100px;">库存</th>
  67. <th style="width:100px;">计量单位</th>
  68. <th>备注</th>
  69. <th style="width:160px;">操作</th>
  70. </tr>
  71. </thead>
  72. <tbody>
  73. <tr dir-paginate="item in ctl.rows|itemsPerPage:ctl.itemsPerPage"
  74. total-items="ctl.total_count" ng-class="{'sp-color-red':(item.KC<10&&item.YPBH=='YP0101')||item.KC<5&&item.YPBH=='YP0102'}">
  75. <td ng-bind="$index+1"></td>
  76. <td ng-bind="item.YPBH1"></td>
  77. <td ng-bind="item.PP"></td>
  78. <td>
  79. <div class="sp-color-blue" ng-bind="item.YPMC"></div>
  80. </td>
  81. <td ng-bind="item.FL"></td>
  82. <td ng-bind="item.GG"></td>
  83. <td ng-bind="item.DJ"></td>
  84. <td ng-bind="item.KC"></td>
  85. <td ng-bind="item.JDLW"></td>
  86. <td ng-bind="item.BZ"></td>
  87. <td>
  88. <button class="sp-btn-blue-outline sp-btn-sm sp-radius" title="编辑" ng-click="ctl.itemDataEdit(item)">编 辑</button>
  89. <button class="sp-btn-red-outline sp-btn-sm sp-radius" title="删除" ng-click="ctl.deleteData(item)">删 除</button>
  90. </td>
  91. </tr>
  92. </tbody>
  93. </table>
  94. <div class="sp-table-tip ng-hide" ng-show="ctl.noDataTip == 0">
  95. <i class="fa fa-exclamation-circle"></i> 您好,暂无数据!
  96. </div>
  97. <div class="sp-page" ng-show="ctl.noDataTip != 0">
  98. <div class="sp-page-col sp-pull-right">
  99. <div class="sp-lh-34">
  100. 每页 <select ng-model="ctl.itemsPerPage" ng-options="x for x in ctl.pageOptions"
  101. ng-init="ctl.itemsPerPage=ctl.pageOptions[0]"></select> 条
  102. </div>
  103. </div>
  104. <div class="sp-page-col sp-pull-right">
  105. <dir-pagination-controls max-size="8" direction-links="true" boundary-links="true"
  106. on-page-change="ctl.getData(newPageNumber)">
  107. </dir-pagination-controls>
  108. </div>
  109. <div class="sp-page-col ng-hide" ng-show="ctl.sumTotalNum!=''" style="margin-left:5px;line-height: 45px;height: 45px;">
  110. 当前库存:<span class="sp-color-orange" ng-bind="ctl.sumTotalNum"></span>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. <div class="sp-layer" id="layer_box" style="width:500px;">
  120. <div class="sp-layer-head">
  121. <span class="sp-layer-title" ng-bind="ctl.selectedItem.layerTitle"></span>
  122. <span class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">×</span>
  123. </div>
  124. <div class="sp-layer-body">
  125. <div class="sp-page">
  126. <table class="sp-grid-job">
  127. <tbody>
  128. <tr>
  129. <td style="width:80px;">分类名称</td>
  130. <td>
  131. <input type="text" class="sp-input" ng-readonly="ctl.selectedItem.add"
  132. ng-model="ctl.selectedItem.name" sp-required/>
  133. </td>
  134. </tr>
  135. <tr ng-if="ctl.selectedItem.add">
  136. <td style="width:80px;">子分类名称</td>
  137. <td>
  138. <input type="text" class="sp-input" ng-model="ctl.selectedItem.child_title" sp-required />
  139. </td>
  140. </tr>
  141. </tbody>
  142. </table>
  143. <div class="sp-page sp-text-center sp-pt-10 sp-pad-10">
  144. <button class="sp-btn-blue sp-btn-md" ng-click="ctl.btnSetTitle()">
  145. <i class="fa fa-check"></i>&nbsp;提交
  146. </button>
  147. <button class="sp-btn-default sp-btn-md" onclick="sp.layerhide()">
  148. <i class="fa fa-close"></i>&nbsp;取消
  149. </button>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. <div class="sp-layer" id="layer_search" style="width: 500px;">
  155. <div class="sp-layer-head">
  156. <div class="sp-layer-title">
  157. 用品查询
  158. </div>
  159. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  160. ×
  161. </div>
  162. </div>
  163. <div class="sp-layer-body">
  164. <table class="sp-grid-job">
  165. <tbody>
  166. <tr>
  167. <td class="sp-text-center">
  168. 用品名称
  169. </td>
  170. <td>
  171. <input type="text" class="sp-input" placeholder="用品名称" ng-model="ctl.search.YPMC"/>
  172. </td>
  173. </tr>
  174. </tbody>
  175. </table>
  176. <div class="sp-line-txt sp-text-center sp-pt-10">
  177. <a class="sp-btn-blue sp-sm sp-radius" ng-click="ctl.doSearch()"><i class="fa fa-search"></i>&nbsp;查 询</a>
  178. <a class="sp-btn-blue sp-sm sp-radius" onclick="sp.closeCenter('.sp-layer')"><i class="fa fa-reply-all"></i>&nbsp;取
  179. 消</a>
  180. </div>
  181. </div>
  182. </div>
  183. <div class="sp-layer" id="layer_insert" style="width: 1000px;">
  184. <div class="sp-layer-head">
  185. <div class="sp-layer-title">
  186. 用品新增
  187. </div>
  188. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  189. ×
  190. </div>
  191. </div>
  192. <div class="sp-layer-body">
  193. <table class="sp-table">
  194. <thead>
  195. <tr>
  196. <th style="width:60px;">
  197. <i class="fa fa-plus" title="新增" ng-click="ctl.addItemData()"></i>
  198. </th>
  199. <th>用品编号</th>
  200. <th>品牌</th>
  201. <th>用品名称</th>
  202. <th style="width:150px;">分类</th>
  203. <th style="width:80px;">规格</th>
  204. <th style="width:80px;">单价</th>
  205. <th style="width: 80px;">库存</th>
  206. <th style="width:80px;">计量单位</th>
  207. <th>备注</th>
  208. </tr>
  209. </thead>
  210. <tbody>
  211. <tr ng-repeat="item in ctl.insertData">
  212. <td>
  213. <i class="fa fa-trash" ng-click="ctl.deleteItem($index)"></i>
  214. </td>
  215. <td>
  216. <input type="text" class="sp-input" ng-model="item.YPBH1" sp-required>
  217. </td>
  218. <td>
  219. <input type="text" class="sp-input" ng-model="item.PP">
  220. </td>
  221. <td>
  222. <input type="text" class="sp-input" ng-model="item.YPMC" sp-required>
  223. </td>
  224. <td>
  225. <select class="sp-select" ng-model="item.FL" ng-change="ctl.changeItem($index,item.FL)">
  226. <option ng-repeat="item in ctl.typeList" value="{{item.CODE}}" ng-bind="item.CNAME"></option>
  227. </select>
  228. </td>
  229. <td>
  230. <input type="text" class="sp-input" ng-model="item.GG">
  231. </td>
  232. <td>
  233. <input type="number" class="sp-input" ng-model="item.DJ">
  234. </td>
  235. <td>
  236. <input type="number" class="sp-input" ng-model="item.KC">
  237. </td>
  238. <td>
  239. <input type="text" class="sp-input" ng-model="item.JDLW">
  240. </td>
  241. <td>
  242. <input type="text" class="sp-input" ng-model="item.BZ">
  243. </td>
  244. </tr>
  245. </tbody>
  246. </table>
  247. <div class="sp-table-tip ng-hide" ng-show="ctl.insertData.length == 0">
  248. <i class="fa fa-exclamation-circle"></i> 暂未新增数据!
  249. </div>
  250. <div class="sp-line-txt sp-text-center sp-pt-10">
  251. <button ng-disabled="ctl.insertData.length == 0" class="sp-btn-blue sp-sm sp-radius" ng-click="ctl.saveInsertData()"><i class="fa fa-save"></i>&nbsp;保 存</button>
  252. <a class="sp-btn-blue sp-sm sp-radius" onclick="sp.closeCenter('.sp-layer')"><i class="fa fa-reply-all"></i>&nbsp;取
  253. 消</a>
  254. </div>
  255. </div>
  256. </div>
  257. <div class="sp-layer" id="layer_edit" style="width:500px;">
  258. <div class="sp-layer-head">
  259. <span class="sp-layer-title">用品编辑</span>
  260. <span class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">×</span>
  261. </div>
  262. <div class="sp-layer-body">
  263. <div class="sp-page">
  264. <table class="sp-grid-job">
  265. <tbody>
  266. <tr>
  267. <td style="width:80px;">品牌</td>
  268. <td>
  269. <input type="text" class="sp-input" ng-model="ctl.itemObj.PP" />
  270. </td>
  271. </tr>
  272. <tr>
  273. <td style="width:80px;">用品名称</td>
  274. <td>
  275. <input type="text" class="sp-input" ng-model="ctl.itemObj.YPMC" sp-required />
  276. </td>
  277. </tr>
  278. <tr>
  279. <td style="width:80px;">规格</td>
  280. <td>
  281. <input type="text" class="sp-input" ng-model="ctl.itemObj.GG"/>
  282. </td>
  283. </tr>
  284. <tr>
  285. <td style="width:80px;">单价</td>
  286. <td>
  287. <input type="number" class="sp-input" ng-model="ctl.itemObj.DJ"/>
  288. </td>
  289. </tr>
  290. <tr>
  291. <td style="width:80px;">库存</td>
  292. <td>
  293. <input type="number" class="sp-input" ng-model="ctl.itemObj.KC"/>
  294. </td>
  295. </tr>
  296. <tr>
  297. <td style="width:80px;">计量单位</td>
  298. <td>
  299. <input type="text" class="sp-input" ng-model="ctl.itemObj.JDLW"/>
  300. </td>
  301. </tr>
  302. <tr>
  303. <td style="width:80px;">备注</td>
  304. <td>
  305. <input type="text" class="sp-input" ng-model="ctl.itemObj.BZ"/>
  306. </td>
  307. </tr>
  308. </tbody>
  309. </table>
  310. <div class="sp-page sp-text-center sp-pt-10 sp-pad-10">
  311. <button class="sp-btn-blue sp-btn-md" ng-click="ctl.editBtn()">
  312. <i class="fa fa-check"></i>&nbsp;提交
  313. </button>
  314. <button class="sp-btn-default sp-btn-md" onclick="sp.layerhide()">
  315. <i class="fa fa-close"></i>&nbsp;取消
  316. </button>
  317. </div>
  318. </div>
  319. </div>
  320. </div>
  321. <script type="text/ng-template" id="/treeView.html">
  322. <ul>
  323. <li ng-repeat="item in treeData" ng-include="'/treeItem.html'"></li>
  324. </ul>
  325. </script>
  326. <script type="text/ng-template" id="/treeItem.html">
  327. <p ng-class="{'pActive':item.checked}">
  328. <i ng-click="itemExpended(item, $event);" class="{{getItemIcon(item)}}"></i>
  329. <span style="display: inline-block;height: 18px;line-height: 18px;" ng-click="warpCallback('itemCheck', item, $event);">
  330. {{item[textField]}}</span>
  331. <span class="edit-menu sp-color-gray">
  332. <i ng-click="warpCallback('itemAdd', item, $event);" title="新增分类" class="fa fa-plus"></i>
  333. <i ng-click="warpCallback('itemEdit', item, $event);" title="编辑分类" class="fa fa-pencil"></i>
  334. <i ng-if="!item.C_H_I_L_D_DATA || item.C_H_I_L_D_DATA.length<1"
  335. ng-click="warpCallback('itemDelete', item, $event);" title="删除分类" class="fa fa-trash"></i>
  336. </span>
  337. </p>
  338. <ul ng-if="!isEnd(item)" ng-show="!item.$$isExpend">
  339. <li ng-repeat="item in item.C_H_I_L_D_DATA" ng-include="'/treeItem.html'"></li>
  340. </ul>
  341. </script>
  342. <script src="../../AFrontEnd/js/jquery/jquery-2.1.4.min.js"></script>
  343. <script src="../../AFrontEnd/js/laydate/laydate.js"></script>
  344. <script src="../../AFrontEnd/js/angularjs/angular.js"></script>
  345. <script src="../../AFrontEnd/js/angularjs/dirPagination.js"></script>
  346. <script src="../../apiurljs.js"></script>
  347. <script src="../../js/sm4.js"></script>
  348. <script>document.write('<scri' + 'pt src="../../AFrontEnd/js/special/special.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>')</script>
  349. <script>document.write('<scri' + 'pt src="js/list.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>')</script>
  350. <script src="../../AFrontEnd/js/special/spng.js"></script>
  351. <script src="../../AFrontEnd/js/special/spngvld.js"></script>
  352. </body>
  353. </html>