order.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <style>
  2. .condition .more.open {
  3. margin-top: 10px;
  4. height: 36px;
  5. opacity: 1;
  6. }
  7. .condition .more .form-group {
  8. margin-bottom: 10px;
  9. }
  10. .order-table .header>th {
  11. height: 38px;
  12. text-align: center;
  13. background: #f5f5f5;
  14. border-top: 1px solid #e8e8e8;
  15. border-bottom: 1px solid #e8e8e8;
  16. }
  17. .order-table .sep-row {
  18. height: 10px;
  19. }
  20. .order-table .selector {
  21. vertical-align: middle;
  22. margin: 0 0 2px 0;
  23. }
  24. .toolbar label {
  25. margin-right: 10px;
  26. margin-bottom: 0;
  27. }
  28. .toolbar .select_all {
  29. margin: 0 6px 0 10px;
  30. line-height: 20px;
  31. }
  32. .toolbar .btn {
  33. -moz-border-radius: 2px;
  34. margin-right: 5px;
  35. border: 1px solid #dcdcdc;
  36. border-radius: 2px;
  37. -webkit-border-radius: 2px;
  38. }
  39. .order-table .order-hd {
  40. background: #f5f5f5;
  41. height: 40px;
  42. line-height: 40px;
  43. }
  44. .order-table .order-hd td.first {
  45. padding-left: 20px;
  46. }
  47. .order-table .order-hd .order-main span {
  48. margin-right: 8px;
  49. }
  50. .order-table .order-hd .order-code {
  51. font-style: normal;
  52. font-family: verdana;
  53. }
  54. .order-table .order-hd .order-sum {
  55. padding: 0 5px;
  56. }
  57. .order-table>tbody {
  58. border: 1px solid transparent;
  59. }
  60. .order-table>tbody:hover {
  61. border-color: #d32526;
  62. border-width: 2px;
  63. }
  64. .order-table .operates {
  65. display: none;
  66. }
  67. .order-table .operates i {
  68. padding: 0 2px;
  69. }
  70. .order-table>tbody:hover .operates {
  71. display: block;
  72. }
  73. .order-table>tbody:hover .operates-status {
  74. display: none;
  75. }
  76. .order-table .order-bd {
  77. border-bottom: 1px solid #e6e6e6;
  78. }
  79. .order-table .order-bd>td {
  80. padding: 10px 5px;
  81. vertical-align: top;
  82. position: relative;
  83. }
  84. .order-table .order-bd .product {
  85. padding-left: 20px;
  86. }
  87. .order-table .order-bd .order-number {
  88. position: absolute;
  89. top: -1px;
  90. left: -1px;
  91. width: 20px;
  92. height: 20px;
  93. line-height: 20px;
  94. text-align: center;
  95. background: #f5f5f5;
  96. font-weight: 500;
  97. border: solid 1px #d5d5d5;
  98. border-radius: 0 0 10px 0;
  99. }
  100. .order-table .order-bd .order-number.key {
  101. background: #56a022;
  102. color: #ffffff;
  103. }
  104. .unPrinted {
  105. color: #56a022;
  106. }
  107. .info-container .info:hover {
  108. color: #CC3333;
  109. }
  110. .buy-cart{
  111. font-size: 14px;
  112. }
  113. .buy-cart a{
  114. color: #5078cb;
  115. }
  116. </style>
  117. <link rel="stylesheet" href="static/css/public.css">
  118. <div class="block" id="public">
  119. <div class="loading in" ng-class="{'in': loading}">
  120. <i></i>
  121. </div>
  122. <div class="menu condition block">
  123. <div class="row">
  124. <div class="col-xs-10">
  125. <div class="btn-group btn-group-sm btn-group-justified">
  126. <div class="btn-group btn-group-sm">
  127. <button type="button" class="btn btn-default btn-line"
  128. ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">全部</button>
  129. </div>
  130. <div class="btn-group btn-group-sm">
  131. <button type="button" class="btn btn-default btn-line"
  132. ng-class="{'btn-info':active=='done'}" ng-click="setActive('done')">已回复</button>
  133. </div>
  134. <div class="btn-group btn-group-sm">
  135. <button type="button" class="btn btn-default btn-line"
  136. ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo')">待回复</button>
  137. </div>
  138. <div class="btn-group btn-group-sm">
  139. <button type="button" class="btn btn-default btn-line"
  140. ng-class="{'btn-info':active=='waiting'}" ng-click="setActive('waiting')">待交货</button>
  141. </div>
  142. <div class="btn-group btn-group-sm">
  143. <button type="button" class="btn btn-default btn-line"
  144. ng-class="{'btn-info':active=='end'}" ng-click="setActive('end')">已结案</button>
  145. </div>
  146. <div class="btn-group btn-group-sm">
  147. <a id="add" class="btn btn-default btn-line" ui-sref="purc.newOrder"><i class="fa fa-cart-plus" style="margin-left: 330px;"></i>采购单</a>
  148. </div>
  149. </div>
  150. </div>
  151. <div class="buy-cart col-xs-2">
  152. <a id="add" ui-sref="purc.newOrder"><i class="fa fa-cart-plus"></i>采购单</a>
  153. <a id="add" ui-sref="purc.newOrder"><i class="fa fa-cart-plus"></i>购物车</a>
  154. </div>
  155. </div>
  156. </div>
  157. <div class="height10">&nbsp;</div>
  158. <div class="condition block">
  159. <div class="search-bg condition block">
  160. <div class="row">
  161. <div id="topSearch" style="float: left">
  162. <span class="text-muted"><i class="fa fa-search fa-lg"></i> 搜索"{{tip}}",为您找到结果:</span>
  163. 单据{{tableParams.total()}}条
  164. </div>
  165. <div class="col-xs-6">
  166. <div class="search">
  167. <div class="form-group form-group-sm has-feedback" dropdown auto-close="outsideClick" on-toggle="searchAdvance=open">
  168. <input type="search" class="form-control input-sm" ng-model="keyword" ng-search="onSearch(keyword)" placeholder="输入商品、客户名称或单据流水号搜索" />
  169. <a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
  170. </div>
  171. </div>
  172. </div>
  173. <div class="fr toggle">
  174. <a ng-click="condition.$open=!condition.$open" class="text-simple"><span ng-bind="condition.$open ? '简化筛选条件' : '更多筛选条件'"></span><i class="fa fa-fw" ng-class="{'fa-angle-up': condition.$open, 'fa-angle-down': !condition.$open}"></i></a>
  175. </div>
  176. </div>
  177. <div class="more" ng-class="{'open': condition.$open}">
  178. <form class="form-inline">
  179. <div class="form-group ">
  180. <label>日期:</label>
  181. <div class="btn-group btn-menu" dropdown is-open="condition.$dateZoneOpen">
  182. <button type="button" dropdown-toggle style="width: 85px;" class="btn btn-default btn-xs dropdown-toggle">
  183. {{dateZoneText}}<i class="fa fa-fw fa-angle-down icon-right"></i></span>
  184. </button>
  185. <ul class="dropdown-menu">
  186. <li><a ng-click="changeDateZone(1)">一个月内</a></li>
  187. <li><a ng-click="changeDateZone(6)">半年内</a></li>
  188. <li><a ng-click="changeDateZone()">半年前</a></li>
  189. </ul>
  190. </div>
  191. <div class="form-group input-group input-group-xs input-trigger">
  192. <input type="text" ng-model="condition.dateFrom"
  193. class="form-control" placeholder="从"
  194. datepicker-popup="yyyy-MM-dd" is-open="condition.$fromOpened"
  195. ng-required="true"
  196. current-text="今天" clear-text="清除" close-text="关闭"
  197. datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
  198. ng-focus="openDatePicker($event, condition, '$fromOpened')">
  199. <span class="input-group-btn">
  200. <button type="button" class="btn btn-default"
  201. ng-click="openDatePicker($event, condition, '$fromOpened')">
  202. <i class="fa fa-calendar"></i>
  203. </button>
  204. </span>
  205. </div>
  206. <div class="form-group input-group input-group-xs input-trigger">
  207. <input type="text" ng-model="condition.dateTo"
  208. class="form-control" placeholder="到"
  209. datepicker-popup="yyyy-MM-dd" is-open="condition.$toOpened"
  210. ng-required="true"
  211. current-text="今天" clear-text="清除" close-text="关闭"
  212. datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
  213. ng-focus="openDatePicker($event, condition, '$toOpened')">
  214. <span class="input-group-btn">
  215. <button type="button" class="btn btn-default"
  216. ng-click="openDatePicker($event, condition, '$toOpened')">
  217. <i class="fa fa-calendar"></i>
  218. </button>
  219. </span>
  220. </div>
  221. </div>
  222. <div class="form-group">
  223. <label>采纳结果:</label>
  224. <div class="btn-group btn-menu" dropdown is-open="condition.$agreedOpen">
  225. <button type="button" dropdown-toggle style="width: 70px;" class="btn btn-default btn-xs dropdown-toggle">
  226. {{agreedText}}<i class="fa fa-fw fa-angle-down icon-right"></i></span>
  227. </button>
  228. <ul class="dropdown-menu">
  229. <li><a ng-click="changeAgreed()">全部</a></li>
  230. <li><a ng-click="changeAgreed(1)">已采纳</a></li>
  231. <li><a ng-click="changeAgreed(0)">未采纳</a></li>
  232. </ul>
  233. </div>
  234. </div>
  235. </form>
  236. </div>
  237. </div>
  238. </div>
  239. <table class="order-table block" ng-table="tableParams">
  240. <thead>
  241. <tr class="header">
  242. <th>商品</th>
  243. <th width="80">含税单价</th>
  244. <th width="100">税率(%)</th>
  245. <th width="100">数量</th>
  246. <th width="120">交货日期</th>
  247. <th width="180">单据状态</th>
  248. <th width="120">供应商</th>
  249. </tr>
  250. <tr class="sep-row">
  251. <td colspan="5"></td>
  252. </tr>
  253. <tr class="toolbar toolbar-top">
  254. <td colspan="6">
  255. <div>
  256. <label><input type="checkbox" class="selector select_all"
  257. ng-model="checkboxes.checked" ng-click="checkAll()">全选</label>
  258. </div> <!-- 分页 -->
  259. </td>
  260. <td class="text-center">
  261. <a href="sale/orders/purc/xls?_state={{active}}&searchFilter={{searchFilterXls}}"
  262. target="_self" class="text-simple" title="导出Excel表格"><i class="fa fa-file-excel-o fa-fw"></i>导出</a>
  263. </td>
  264. </tr>
  265. <tr class="sep-row">
  266. <td colspan="6"></td>
  267. </tr>
  268. </thead>
  269. <tbody ng-if="tableParams.total() == 0">
  270. <tr>
  271. <td colspan="6">
  272. <div class="row text-muted info-container" style="padding: 50px 10px;">
  273. <div class="col-md-4 text-center">
  274. <br>
  275. <br>
  276. <div><img src="static/img/all/info.png" width="130px" height="90px"></div>
  277. <div class="f16">当前没有对应的采购订单!</div>
  278. </div>
  279. <div class="col-md-8 br-l">
  280. <div class="f16">
  281. <p>为什么我没有采购订单?</p>
  282. </div>
  283. <div class="f14">
  284. <div class="info">
  285. <p>1、您的采购单在ERP系统上还没审核,订单无法上传到平台<br>
  286. 解决:采购员沟通确认单据是否已经审核(只有ERP中已经审核的单据才能接收到)</p>
  287. </div>
  288. <div class="info">
  289. <p>2、ERP中供应商信息有误<br>
  290. 解决:与您的供应商沟通确认他的资料在供应商资料中是否维护正确,尤其是企业UU号</p>
  291. </div>
  292. <div class="info">
  293. <p>3、您的供应商正在使用旧版本的UAS商务平台<br>
  294. 解决:我们仍有部分用户在使用旧版本UAS商务平台系统,你可以用您的企业UU号和管理员个人UU号 <a href="http://www.usoftchina.com" class="text-bold text-link" title="http://www.usoftchina.com" target="_blank">登陆旧版本UAS商务平台</a></p>
  295. </div>
  296. </div>
  297. <br>
  298. <br>
  299. </div>
  300. </div>
  301. </td>
  302. </tr>
  303. </tbody>
  304. <tbody ng-repeat="order in $data track by order.id">
  305. <tr class="order-hd" ng-dblclick="order.$collapsed=!order.$collapsed" ng-class="{'text-bold': order.display>0}">
  306. <td class="first" colspan="3">
  307. <div class="order-main">
  308. <span> <input type="checkbox" class="selector"
  309. ng-model="order.$selected" ng-click="checkOne(order)">
  310. </span>
  311. &nbsp;<span class="text-num text-bold"
  312. ng-bind="::order.date | date:'yyyy-MM-dd'"></span> <span>订单号:<a
  313. class="text-num" ng-bind="::order.code" ui-sref="purc.order_detail({id:order.id})" target="_self"></a></span>
  314. </div>
  315. </td>
  316. <td colspan="1" class="order-sum">{{::order.currency}}: <span
  317. ng-bind="getOrderTotal(order.orderItems) | number : 2"
  318. class="text-num text-bold"></span>
  319. </td>
  320. <td colspan="3" class="text-center">
  321. {{::order.receiveName}}
  322. </td>
  323. </tr>
  324. <tr class="order-bd" ng-repeat="item in order.orderItems track by item.id"
  325. ng-if="!order.$collapsed "><!-- && (!searchFilterXls.keyword || item.key || order.$showAll) -->
  326. <td class="product">
  327. <div class="text-num order-number" ng-class="{'key': item.key&&order.$showAll}" title="第{{::item.number}}行">{{::item.number}}</div>
  328. <div class="text-num text-bold">
  329. <span ng-bind="::item.product.code"></span>
  330. </div>
  331. <div>
  332. <span ng-bind="::item.product.title"></span>
  333. </div>
  334. <div class="text-muted"
  335. ng-bind="::item.product.spec"></div>
  336. <div class="text-muted text-bold" ng-if="item.vendspec"><span ng-bind="::item.vendspec"></span></div>
  337. <div class="text-bold text-inverse" ng-if="item.factory">送货工厂:<span ng-bind="::item.factory"></span></div>
  338. </td>
  339. <td class="text-center">
  340. <div class="text-num" ng-bind="::item.price | number:6"></div>
  341. </td>
  342. <td class="text-center"><div class="text-muted">{{::item.taxrate || 0}}</div></td>
  343. <td class="text-center">
  344. <div class="text-num" ng-bind="::item.qty"></div>
  345. <div class="text-muted" ng-bind="::item.product.unit"></div>
  346. <div style="margin: 0 auto" ng-if="item.$editing">
  347. <input type="number" ng-model="item.reply.qty" min="0" max="{{item.qty}}"
  348. ng-init="item.reply.qty=item.qty-item.replyQty"
  349. class="form-control input-xs" placeholder="0~{{item.qty-item.replyQty}}">
  350. </div>
  351. </td>
  352. <td class="text-center br-l">
  353. <div class="text-num" ng-bind="::item.delivery | date:'yyyy-MM-dd'"></div>
  354. <br>
  355. <div style="margin: 0 auto"
  356. class="input-group input-group-xs input-trigger"
  357. ng-if="item.$editing">
  358. <input type="text" ng-model="item.reply.delivery"
  359. class="form-control" placeholder="回复交期"
  360. datepicker-popup="yyyy-MM-dd" is-open="item.$opened"
  361. min-date="order.date" ng-required="true" current-text="今天"
  362. clear-text="清除" close-text="关闭"
  363. datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
  364. ng-focus="openDatePicker($event, item, '$opened')"> <span
  365. class="input-group-btn">
  366. <button type="button" class="btn btn-default"
  367. ng-click="openDatePicker($event, item, '$opened')">
  368. <i class="fa fa-calendar"></i>
  369. </button>
  370. </span>
  371. </div>
  372. </td>
  373. <td class="br-l">
  374. <div ng-if="!item.$editing">
  375. <div ng-if="!item.replyQty" class="text-muted text-center">未回复</div>
  376. <div ng-if="item.replyQty > 0 && item.replyQty < item.qty">
  377. <div class="progress progress-sm">
  378. <div class="progress-bar progress-bar-success"
  379. ng-style="{'width': 100*item.replyQty/item.qty + '%'}">
  380. <span class="sr-only"></span>
  381. </div>
  382. </div>
  383. 已回复 <span class="text-default">{{::item.replyQty}}</span> /
  384. <span>{{::item.qty}}</span>
  385. </div>
  386. <div ng-if="item.replyQty > 0" class="dropdown" ng-class="{'text-center': item.replyQty>=item.qty}">
  387. <a href="javascript:void(0);" class="dropdown-toggle text-default"
  388. ng-mouseover="getReply(item)">回复历史<i class="fa fa-fw fa-angle-down"></i></a>
  389. <div class="dropdown-menu pane" style="width: 270px;">
  390. <div class="pane-body">
  391. <ul class="list-unstyled list-menu">
  392. <li ng-repeat="reply in ::item.replies">
  393. <div class="row row-sm"
  394. ng-class="{'text-inverse': $index==0}">
  395. <div class="col-xs-6">
  396. <span ng-if="reply.qty < 0"> 撤销</span>
  397. 数量 {{::reply.qty}}
  398. </div>
  399. <div class="col-xs-6">交期{{::reply.delivery |
  400. date:'yyyy-MM-dd'}}</div>
  401. </div>
  402. <div class="text-muted">{{::reply.recorder}}&nbsp;&nbsp;{{::reply.date
  403. | date:'MM-dd HH:mm'}}&nbsp;回复</div>
  404. </li>
  405. </ul>
  406. </div>
  407. </div>
  408. </div>
  409. <div ng-if="item.acceptQty" class="text-success text-center text-bold f14">
  410. 已验收:{{::item.acceptQty}}{{::item.product.unit}}
  411. </div>
  412. <div ng-if="item.returnQty" class="text-error text-center text-bold f14">
  413. 已验退:{{::item.returnQty}}{{::item.product.unit}}
  414. </div>
  415. </div>
  416. <div style="margin: 0 auto" ng-if="item.$editing">
  417. <br><br><input type="text" ng-model="item.reply.remark"
  418. class="form-control input-xs" placeholder="回复备注" />
  419. </div>
  420. </td>
  421. <td ng-bind="::order.enName"></td>
  422. </tr>
  423. <!-- <tr ng-if="!order.$collapsed && searchFilterXls.keyword" style="cursor: pointer;padding: 10px 0;">
  424. <td colspan="6" class="text-center text-simple" ng-if="!order.$showAll" style="cursor: pointer;padding: 10px 0;" ng-click="order.$showAll = true">
  425. 展开所有明细(包括不含关键词的) <i class="fa fa-angle-down"></i>
  426. </td>
  427. <td colspan="6" class="text-center text-simple" ng-if="order.$showAll" style="cursor: pointer;padding: 10px 0;" ng-click="order.$showAll = false">
  428. 收起不含关键词的明细 <i class="fa fa-angle-up"></i>
  429. </td>
  430. </tr> -->
  431. </tbody>
  432. </table>
  433. </div>