Ver Fonte

Merge remote-tracking branch 'origin/feature-b2b-ssr-wangcz' into feature-b2b-ssr-wangcz

# Conflicts:
#	src/main/webapp/resources/js/common/b2bServices.js
yangc há 8 anos atrás
pai
commit
cb5ab5de0e

+ 18 - 0
src/main/webapp/resources/js/common/b2bServices.js

@@ -1115,6 +1115,24 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
             }
           });
         }])
+        .factory('B2bPurcReturn', ['$resource',  'BaseService', function($resource, BaseService) {
+          var rootPath = BaseService.getB2bUrl();
+          return $resource(rootPath + 'sale/return/:id', {}, {
+            getAll: {},
+            getEnterpriseName: {
+              url: rootPath +  "sale/return/:id/enname",
+              method: "GET"
+            },
+            getDetail: {
+              url: rootPath +  'sale/return/:id/info',
+              method: 'GET'
+            },
+            exportXls: {
+              url: rootPath +  'sale/return/xls/permission',
+              method: 'GET'
+            }
+          });
+        }])
         .factory('B2bVendorPerformanceAssessService', ['$resource', 'BaseService', function($resource, BaseService) {
             var b2bUrl = BaseService.getB2bUrl();
         return $resource(b2bUrl + '/vendorPerformanceAssess/info/search', {}, {

+ 12 - 0
src/main/webapp/resources/js/vendor/app.js

@@ -728,6 +728,18 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
       templateUrl: 'static/view/vendor/b2b/sale/sale_accept_details.html',
       controller: 'SaleAcceptDetailCtrl',
       controllerUrl: 'app/controllers/b2b/sale/sale_accept_details'
+    })).state('sale_returns', angularAMD.route({
+      url: "/returns",
+      title: 'b2b客户出入库-客户采购验退单',
+      templateUrl: 'static/view/vendor/b2b/sale/sale_returns.html',
+      controller: 'SaleReturnsCtrl',
+      controllerUrl: 'app/controllers/b2b/sale/sale_returns'
+    })).state('sale_return_detail', angularAMD.route({
+      url: "/returnDetails/:id",
+      title: 'b2b客户出入库-客户采购验退单详情',
+      templateUrl: 'static/view/vendor/b2b/sale/sale_returns_details.html',
+      controller: 'SaleReturnsDetailCtrl',
+      controllerUrl: 'app/controllers/b2b/sale/sale_returns_details'
     })).state('sale_quotation_new', angularAMD.route({
 			url: "/sale/quotation/new",
 			templateUrl: "static/view/vendor/b2b/sale/quotation_new.html",

+ 218 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/sale/sale_returns.js

@@ -0,0 +1,218 @@
+define(['app/app'], function (app) {
+  /**
+   * 客户采购验退
+   */
+  app.register.controller('SaleReturnsCtrl', ['$rootScope', '$scope', '$filter', 'B2bPurcReturn', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', 'B2bCurrentRole', function ($rootScope, $scope, $filter, PurcReturn, ngTableParams, toaster, BaseService, Symbol, CurrentRole) {
+    $scope.tab = 'B2b';
+    $scope.storeType = 'returns'
+    $rootScope.active = "vendor_material"
+    BaseService.scrollBackToTop();
+    // 获取当前用户是否为普通用户
+    CurrentRole.isUser({}, {}, function (data) {
+      $scope.isUser = data.isUser;
+    });
+    $scope.active = 'all';
+    $scope.agreedText = '全部';
+    $scope.dateZoneText = '一个月内';
+    $scope.condition = {dateZone: 1};
+
+    /* 时间筛选初始化*/
+    var fromDate = new Date();
+    var toDate = new Date();
+    fromDate.setMonth(fromDate.getMonth() - 1);
+    fromDate.setHours(0, 0, 0, 0);
+    toDate.setHours(23, 59, 59, 999);
+    $scope.condition.dateFrom = fromDate;
+    $scope.condition.dateTo = toDate;
+
+    $scope.currency = Symbol.currency;//将币别转化为对应的符号
+    $scope.changeAgreed = function (agreed) {
+      $scope.condition.agreed = agreed;
+      $scope.agreedText = typeof agreed == 'undefined' ? '全部' : (agreed == 1 ? '已同意' : '不同意');
+      $scope.condition.$agreedOpen = false;
+    };
+    $scope.changeDateZone = function (zone) {
+      $scope.condition.dateZone = zone;
+      $scope.dateZoneText = zone == 1 ? '最近一个月' : (zone == 3 ? '最近三个月' : (zone == 6 ? '最近六个月' : '自定义'));
+      $scope.condition.$dateZoneOpen = false;
+      getDateCondition(zone, $scope.condition);
+      $scope.tableParams.page(1);
+      $scope.tableParams.reload();
+    };
+    $scope.setActive = function (state) {
+      if ($scope.active != state) {
+        $scope.active = state;
+        if ($scope.tableParams.page() == 1)
+          $scope.tableParams.reload();
+        else
+          $scope.tableParams.page(1);
+      }
+    };
+    var getService = function () {
+      return PurcReturn;
+    };
+
+    $scope.tableParams = new ngTableParams({
+      page: 1,
+      count: 20,
+      sorting: {
+        date: 'desc'
+      }
+    }, {
+      total: 0,
+      counts: [5, 10, 25, 50],
+      getData: function ($defer, params) {
+        $scope.loading = true;
+        var pageParams = params.url();
+        pageParams.searchFilter = {
+          keyword: $scope.keyword,
+          fromDate: getDateTime($scope.condition.dateFrom),
+          endDate: getDateTime($scope.condition.dateTo)
+        };
+        getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
+          $scope.loading = false;
+          if (page) {
+            params.total(page.totalElement);
+            $defer.resolve(page.content);
+            $scope.infoCommon = page
+            $scope.infoCommon.all = page.content.length
+            $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的关键词
+            angular.forEach(page.content, function (data) {
+              if (!data.returnItems[0].orderItem) {
+                PurcReturn.getEnterpriseName({id: data.id, enuu: data.enUU}, function (enterprise) {
+                  data.enName = enterprise.enName;
+                });
+              }
+            });
+          }
+        }, function (response) {
+          $scope.loading = false;
+          toaster.pop('error', '数据加载失败', response.data);
+        });
+      }
+    });
+
+    $scope.openDatePicker = function ($event, item, openParam) {
+      $event.preventDefault();
+      $event.stopPropagation();
+      item[openParam] = !item[openParam];
+    };
+
+    $scope.openFilterDatePicker = function ($event, item, openParam) {
+      $event.preventDefault();
+      $event.stopPropagation();
+      item[openParam] = !item[openParam];
+      if ($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]) {
+        $scope.tableParams.reload();
+      }
+    };
+
+    // 搜索框回车
+    $scope.onSearch = function () {
+      $scope.tableParams.page(1);
+      $scope.tableParams.reload();
+    };
+
+    // 导出
+    $scope.exportXls = function () {
+      PurcReturn.exportXls({}, {}, function (data) {
+        if (data.success){
+          window.location.href = 'sale/return/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+        }
+      }, function (response) {
+        toaster.pop('error', '数据加载失败', response.data);
+      });
+    }
+
+    /**
+     * 将日期转化为整数日期
+     */
+    var getDateTime = function (date) {
+      if (angular.isDate(date)) {
+        return date.getTime();
+      } else {
+        return null;
+      }
+    };
+
+    var getState = function (active) {
+      var fn = 'get';
+      switch (active) {
+        case 'done':
+          fn = 'getDone';
+          break;
+        case 'todo':
+          fn = 'getTodo';
+          break;
+        case 'end':
+          fn = 'getEnd';
+          break;
+        case 'waiting':
+          fn = 'getWaiting';
+          break;
+        case 'received':
+          fn = 'getReceived';
+          break;
+        case 'invalid':
+          fn = 'getInvalid';
+          break;
+          // 已采纳
+        case 'agreed':
+          fn = 'getAgreed';
+          break;
+          // 未采纳
+        case 'refused':
+          fn = 'getRefused';
+          break;
+          // 个人
+        case 'personal':
+          fn = 'getPersonal';
+          break;
+          // 集体
+        case 'teams':
+          fn = 'getTeams';
+          break;
+          // 非标准
+        case 'nonstandard':
+          fn = 'getNonstandard';
+          break;
+          // 标准
+        case 'standard':
+          fn = 'getStandard';
+          break;
+          // 变更单无需确认
+        case 'unread':
+          fn = 'getUnread';
+          break;
+      }
+      return fn;
+    };
+
+    var getDateCondition = function (zone, condition) {
+      var fromDate = new Date();
+      var toDate = new Date();
+      //去除时分秒限制,dateFrom设置成0时0分0秒,dateTo设置成23时59分59秒
+      fromDate.setHours(0, 0, 0, 0);
+      toDate.setHours(23, 59, 59, 999);
+      if (zone == -1) { // 自定义时间,什么都不做
+
+      } else if (zone == 1) {
+        fromDate.setMonth(fromDate.getMonth() - 1);
+        condition.dateFrom = fromDate;
+        condition.dateTo = toDate;
+      } else if (zone == 3) {
+        fromDate.setMonth(fromDate.getMonth() - 3);
+        condition.dateFrom = fromDate;
+        condition.dateTo = toDate;
+      } else if (zone == 6) {
+        fromDate.setMonth(fromDate.getMonth() - 6);
+        condition.dateFrom = fromDate;
+        condition.dateTo = toDate;
+      } else {
+        condition.dateFrom = null;
+        condition.dateTo = null;
+      }
+    };
+  }]);
+
+})

+ 29 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/sale/sale_returns_details.js

@@ -0,0 +1,29 @@
+define(['app/app'], function (app) {
+  /**
+   * 客户采购验退详情
+   */
+  app.register.controller('SaleReturnsDetailCtrl', ['$scope', 'B2bPurcReturn', 'toaster', 'BaseService', '$stateParams', 'B2bCurrentRole', function ($scope, PurcReturn, toaster, BaseService, $stateParams, CurrentRole) {
+    BaseService.scrollBackToTop();
+    // 获取当前用户是否为普通用户
+    CurrentRole.isUser({}, {}, function (data) {
+      $scope.isUser = data.isUser;
+    });
+    if ($stateParams.id != null) {
+      PurcReturn.getDetail({id: $stateParams.id}, {}, function (data) {
+        $scope.returns = data;
+        if ($scope.returns.returnItems != null) {
+          var sum = 0;
+          angular.forEach($scope.returns.returnItems, function (item) {
+            if (null != item.orderPrice) {
+              sum += item.orderPrice * item.qty;
+            }
+          });
+          $scope.totalPrice = sum;
+        }
+      }, function (response) {
+        toaster.pop('error', '提示', response.data);
+      });
+    }
+  }]);
+
+})

+ 3 - 3
src/main/webapp/resources/view/vendor/b2b/sale/sale_badIn.html

@@ -425,16 +425,16 @@
     <tr class="order-bd" ng-repeat="item in badIn.badInItems">
       <td class="product" style="text-align: left">
         <div class="text-num text-bold">
-          <span title="{{::item.orderItem.product.code}}">
+          <span title="{{::item.orderItem.product.code}}" >
             物料编号:{{::item.orderItem.product.code}}
           </span>
         </div>
         <div>
-          <span title="{{::item.orderItem.product.title}}">
+          <span title="{{::item.orderItem.product.title}}" style="color: #666 !important;">
             物料名称:{{::item.orderItem.product.title}}
           </span>
         </div>
-        <div class="text-muted" title="{{::item.orderItem.product.spec}}">
+        <div class="text-muted" title="{{::item.orderItem.product.spec}}" style="color: #666 !important;">
           物料规格:{{::item.orderItem.product.spec}}
         </div>
       </td>

+ 496 - 0
src/main/webapp/resources/view/vendor/b2b/sale/sale_returns.html

@@ -0,0 +1,496 @@
+<style>
+  .order-table .header>th {
+    height: 38px;
+    text-align: center;
+    background: #f5f5f5;
+    border-top: 1px solid #e8e8e8;
+    border-bottom: 1px solid #e8e8e8;
+  }
+
+  .order-table .sep-row {
+    height: 10px;
+  }
+
+  .order-table .selector {
+    vertical-align: middle;
+    margin: 0 0 2px 0;
+  }
+
+  .toolbar label {
+    margin-right: 10px;
+    margin-bottom: 0;
+  }
+
+  .toolbar .select_all {
+    margin: 0 6px 0 10px;
+    line-height: 20px;
+  }
+
+  .toolbar .btn {
+    -moz-border-radius: 2px;
+    margin-right: 5px;
+    border: 1px solid #dcdcdc;
+    border-radius: 2px;
+    -webkit-border-radius: 2px;
+  }
+
+  .order-table .order-hd {
+    background: #f5f5f5;
+    height: 40px;
+    line-height: 40px;
+  }
+
+  .order-table .order-hd td.first {
+    padding-left: 20px;
+  }
+
+  .order-table .order-hd .order-main span {
+    margin-right: 8px;
+  }
+
+  .order-table .order-hd .order-code {
+    font-style: normal;
+    font-family: verdana;
+  }
+
+  .order-table .order-hd .order-sum {
+    padding: 0 5px;
+  }
+
+  .order-table>tbody {
+    border: 1px solid transparent;
+  }
+
+  .order-table>tbody:hover {
+    border-color: #56a022;
+    border-width: 2px;
+  }
+
+  .order-table .operates {
+    display: none;
+  }
+
+  .order-table>tbody:hover .operates {
+    display: block;
+  }
+
+  .order-table .order-bd {
+    border-bottom: 1px solid #e6e6e6;
+  }
+
+  .order-table .order-bd>td {
+    padding: 10px 5px;
+    position: relative;
+    text-align: center;
+  }
+
+  .order-table .order-bd .product {
+    padding-left: 20px;
+  }
+
+  .input-xs, .input-group-xs>.form-control, .input-group-xs>.input-group-addon,
+  .input-group-xs>.input-group-btn>.btn {
+    height: 26px;
+    padding: 0 5px;
+    font-size: 12px;
+    line-height: 1.5;
+    border-radius: 3px;
+  }
+
+  .input-group-xs .form-control:last-child, .input-group-addon:last-child,
+  .input-group-btn:first-child>.btn:not (:first-child ), .input-group-btn:last-child>.btn
+  {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0;
+  }
+</style>
+<style>
+  .order-table {
+    background: #fff;
+    width: 100%;
+    /*margin-bottom: 10px;*/
+  }
+  .order-table thead tr {
+    background: #fff;
+  }
+  .order-table .header>th {
+    height: 38px;
+    text-align: center;
+    /*background: #f5f5f5;*/
+    border-top: 1px solid #e8e8e8;
+    /*border-bottom: 1px solid #e8e8e8;*/
+    font-size: 14px;
+  }
+
+  /*.order-table .sep-row {*/
+  /*height: 10px;*/
+  /*}*/
+
+  .order-table .selector {
+    vertical-align: middle;
+    margin: 0 0 2px 0;
+  }
+
+  .toolbar label {
+    margin-right: 10px;
+    margin-bottom: 0;
+  }
+
+  .toolbar .select_all {
+    margin: 0 6px 0 10px;
+    line-height: 20px;
+  }
+
+  .toolbar .btn {
+    -moz-border-radius: 2px;
+    margin-right: 5px;
+    border: 1px solid #dcdcdc;
+    border-radius: 2px;
+    -webkit-border-radius: 2px;
+  }
+
+  .order-table .order-hd {
+    /*background: #f5f5f5;*/
+    background: #f9f9f9;
+    height: 40px;
+    line-height: 40px;
+  }
+
+  .order-table .order-hd td.first {
+    padding-left: 20px;
+  }
+
+  .order-table .order-hd .order-main span {
+    margin-right: 8px;
+  }
+
+  .order-table .order-hd .order-code {
+    font-style: normal;
+    font-family: verdana;
+  }
+
+  .order-table .order-hd .order-sum {
+    padding: 0 5px;
+  }
+
+  .order-table .order-info {
+    padding-left: 20px;
+  }
+
+  .order-table>tbody {
+    border: 1px solid #e8e8e8;
+  }
+
+  .order-table>tbody:hover {
+    border-color: #3f84f6;
+    border-width: 2px;
+  }
+
+  .order-table>tbody:hover tr.order-bd {
+    background:#f8fafe
+  }
+  .order-table .operates {
+    display: none;
+  }
+
+  .order-table>tbody:hover .operates {
+    display: block;
+  }
+
+  .order-table .order-bd {
+    border-top: 1px solid #e8e8e8;
+    /*border-bottom: 1px solid #e6e6e6;*/
+  }
+
+  .order-table .order-bd>td {
+    /*height: 140px;*/
+    vertical-align: middle;
+    position: relative;
+    padding: 25px 0;
+    border-right: 1px solid #e8e8e8;
+  }
+  .order-table .order-bd>td:nth-last-of-type(1) {
+    border-right: 0px
+  }
+
+  .order-table .order-bd .product {
+    padding-left: 31px;
+  }
+
+  .menu .new-dot{
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    font-size: 12px;
+    color: #fff;
+    font-weight: inherit;
+    top: -2px;
+  }
+  .screen .radio-block.date-radio {
+    width: auto
+  }
+  .order-table span,.order-table div {
+    font-size: 14px;
+    color: #333;
+  }
+  .clearfix::after {
+    clear:both;
+    zoom: 1;
+    content: ' ';
+    display: block;
+    visibility: hidden;
+  }
+  .order-table .order-bd .order-number {
+    position: absolute;
+    top: -1px;
+    left: -1px;
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    text-align: center;
+    background: #f9f9f9;
+    font-weight: 500;
+    border: solid 1px #d5d5d5;
+    border-radius: 0 0 10px 0;
+  }
+  .text-trans {
+    top: 30px;
+    right: 25px;
+  }
+  .oder{
+    /*background: #fff;*/
+    /*padding-bottom: 60px;*/
+    position: relative;
+  }
+  .ng-table-pager::after {
+    clear: both;
+    content: ' ';
+    zoom: 1;
+    display: block;
+    visibility: hidden;
+  }
+  .ng-table-pager {
+    padding-right: 20px;
+    padding-top: 50px;
+    margin-right: 0 !important;
+  }
+  .text-mns {
+    padding-right: 15px;
+    position: absolute;
+    bottom: 64px;
+    right: 20px;
+  }
+  .order-table>tbody:hover .operates-status {
+    display: none;
+  }
+  .Boom18 {
+    bottom: 18px
+  }
+</style>
+<div class="block fr user_right"  id="public" style=" position: relative">
+  <div class="pro_management device">
+    <div class="com_tab" style="margin-bottom: 10px">
+      <ul class="fl" style="width: 100%">
+        <li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material">公司产品库</a></li>
+        <li ng-class="{'active': tab == 'material_person'}"><a ui-sref="vendor_material_person">个人产品库</a></li>
+        <li ng-class="{'active': tab == 'onSale'}"><a ui-sref="vendor_onSale">在售产品</a></li>
+        <li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架历史</a></li>
+        <li ng-if="isPcbStore"><a ui-sref="vendor_upload">产品导入</a></li>
+        <li ng-class="{'active': tab == 'B2b'}"><a ui-sref="sale_badOut">B2b客户出入库</a></li>
+        <li class="down-purchase">
+          <span ng-click="exportXls()">
+              <i class="fa fa-file-excel-o fa-fw"></i>导出Excel
+          </span>
+          <form style="display: none;" id="down-load-purchase" method="get" class="ng-pristine ng-valid">
+            <input type="hidden" name="ids" ng-value="localInfo.ids">
+          </form>
+        </li>
+      </ul>
+    </div>
+  </div>
+  <div class="tab_top" style="margin-bottom: 10px">
+    <ul class="fl" style="width: 100%">
+      <li ng-class="{'active': storeType=='badOut'}"><a ui-sref="sale_badOut">不良品出库单</a></li>
+      <li ng-class="{'active': storeType=='badIn'}"><a ui-sref="sale_badIn">不良品入库单</a></li>
+      <li ng-class="{'active': storeType=='accept'}"><a ui-sref="sale_accept">客户采购验收单</a></li>
+      <li ng-class="{'active': storeType=='returns'}"><a ui-sref="sale_returns">客户采购验退单</a></li>
+      <li ng-class="{'active': storeType=='makeaccept'}"><a ui-sref="sale_makeaccept">客户委外验收单</a></li>
+      <li ng-class="{'active': storeType=='makereturns'}"><a ui-sref="sale_makereturns">客户委外验退单</a></li>
+    </ul>
+  </div>
+  <div class="screen check-filter">
+    <div class="radio-block date-radio">
+      时间筛选:
+      <label class="com-check-radio">
+        <input type="radio" id="oneMonth" name="date" ng-click="autoMonth = false;changeDateZone(1);condition.$open=false" checked>
+        <label for="oneMonth"></label>
+        30天
+      </label>
+      <label class="com-check-radio">
+        <input type="radio" id="threeMonth" name="date" ng-click="autoMonth = false;changeDateZone(3);condition.$open=false">
+        <label for="threeMonth"></label>
+        90天
+      </label>
+      <label class="com-check-radio">
+        <input type="radio" id="sixMonth" name="date" ng-click="autoMonth = false;changeDateZone(6);condition.$open=false">
+        <label for="sixMonth"></label>
+        180天
+      </label>
+      <label class="com-check-radio">
+        <input type="radio" id="autoMonth" name="date" ng-click="autoMonth = true;condition.$open=!condition.$open;changeDateZone(-1)">
+        <label for="autoMonth"></label>
+        自定义
+      </label>
+    </div>
+    <div class="sreach fr">
+      <div ng-show="autoMonth" class="date fl">
+        <div class="data-input">
+          <input type="text" ng-model="condition.dateFrom"
+                 class="form-control select-adder" placeholder="起始时间"
+                 datepicker-popup="yyyy-MM-dd"
+                 is-open="condition.$fromOpened"
+                 max-date="condition.dateTo" current-text="今天" clear-text="清除" close-text="关闭"
+                 ng-click="openFilterDatePicker($event, condition, '$fromOpened')"
+                 ng-focus="openFilterDatePicker($event, condition, '$fromOpened')"
+                 datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+          />
+          <button class="open" ng-click="openFilterDatePicker($event, condition, '$fromOpened')"></button>
+        </div>
+
+        <em>–</em>
+        <div class="data-input">
+          <input type="text" ng-model="condition.dateTo"
+                 class="form-control select-adder" placeholder="结束时间"
+                 datepicker-popup="yyyy-MM-dd"
+                 is-open="condition.$toOpened"
+                 min-date="condition.dateFrom" current-text="今天" clear-text="清除" close-text="关闭"
+                 ng-click="openFilterDatePicker($event, condition, '$toOpened')"
+                 ng-focus="openFilterDatePicker($event, condition, '$toOpened')"
+                 datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+          />
+          <button class="open" ng-click="openFilterDatePicker($event, condition, '$toOpened')"></button>
+        </div>
+      </div>
+      <div class="sreach-input fr">
+        <input type="search" placeholder="单据编号/客户名称/物料名称" class="form-control" ng-model="keyword" ng-search="onSearch()"/>
+        <a class="seek" href="javascript:void(0)" ng-click="onSearch()">搜索</a>
+      </div>
+    </div>
+  </div>
+  <table class="order-table block" ng-table="tableParams">
+    <thead>
+    <tr class="header">
+      <th>产品</th>
+      <th width="120">单价</th>
+      <th width="100">验退数量</th>
+      <th width="120">批号</th>
+      <th width="140">单据信息</th>
+      <th width="70">操作</th>
+    </tr>
+    <!--<tr class="sep-row">-->
+      <!--<td colspan="6"></td>-->
+    <!--</tr>-->
+    </thead>
+    <tbody ng-repeat="returns in $data">
+    <tr class="order-hd">
+      <td class="first" colspan="4">
+        <div class="order-main">
+          <!--<span> <input type="checkbox" class="selector"
+            ng-model="returns.$selected">
+          </span> --><span class="text-num text-bold"
+                             title="{{::returns.date | date: 'yyyy年MM月dd日 hh:mm'}}"
+                             >
+          日期:{{::returns.date | date:'yyyy-MM-dd'}}
+        </span>
+          <span title="客户名称" ng-if="returns.returnItems[0].orderItem">
+            <img src="static/img/user/images/shop_home.png" style="margin-right: 5px;"> {{::returns.returnItems[0].orderItem.order.enterprise.enName}}
+          </span>
+          <span title="客户名称" ng-if="!returns.returnItems[0].orderItem"><img src="static/img/user/images/shop_home.png" style="margin-right: 5px;"> {{returns.enName}}</span>
+          <span>流水号:<a title="查看详情"
+                       class="text-num order-detail" ng-bind="::returns.code" ui-sref="sale_return_detail({id: returns.id})"></a></span>
+        </div>
+      </td>
+      <td colspan="1" class="order-sum">
+        <div class="text-ellipsis" ng-if="returns.sendCode != null" title="送货单号:{{::returns.sendCode}}">
+          <i style="color: #CC9933;" class="fa fa-truck"></i> <span
+            ng-bind="returns.sendCode"></span>
+        </div>
+      </td>
+      <td colspan="1" class="text-center">
+        <div class="operates">
+          <!-- <a href="#" class="text-muted" title="打印">
+          <i class="fa fa-print fa-lg fa-fw"></i>
+        </a> -->
+        </div>
+      </td>
+    </tr>
+    <tr class="order-bd" ng-repeat="item in returns.returnItems">
+      <td class="product" style="text-align: left">
+        <div class="text-num text-bold">
+          <span>
+            物料编码:{{::item.product.code}}
+          </span>
+        </div>
+        <div>
+          <span title="{{::item.product.title}}" style="color: #666 !important;">
+            物料名称:{{::item.product.title}}
+          </span>
+        </div>
+        <div class="text-muted" title="{{::item.product.spec}}" style="color: #666 !important;">
+          物料规格:{{::item.product.spec}}
+        </div>
+        <div class="text-bold text-inverse" title="送货工厂"
+             ng-if="item.orderItem.factory">
+          送货工厂:<span ng-bind="::item.orderItem.factory"></span>
+        </div>
+      </td>
+      <td>
+        <div ng-if="!isUser" class="text-num" title="{{::item.orderPrice}}">
+          <span ng-bind="::currency(returns.currency)"></span><span
+            ng-bind="::item.orderPrice | number:6"></span>
+        </div>
+        <div class="text-muted" title="{{item.taxrate}}%">
+          <br> 税率:<span ng-bind="::item.taxrate + '%'" class="text-num"></span>
+        </div>
+      </td>
+      <td class="text-center">
+        <div class="text-num text-bold" title="{{::item.qty}}"
+             ng-bind="::item.qty"></div>
+        <div class="::text-muted" ng-bind="::item.orderItem.product.unit"></div>
+      </td>
+      <td class="text-center br-l">
+        <div class="text-num" ng-bind="::item.batchCode"></div>
+      </td>
+      <td class="br-l" colspan="2">
+        <div>
+          单据编号:<a class="order-detail" title="查看采购单详情" ui-sref="sale_order_detail({id:item.orderItem.order.id})"
+                  ng-bind="::item.orderItem.order.code"></a>
+        </div>
+        <div>
+          第 <span ng-bind="::item.orderItem.number"></span> 行
+          &nbsp;&nbsp;&nbsp;&nbsp;数量:<span ng-bind="::item.orderItem.qty"></span>
+        </div>
+      </td>
+    </tr>
+    </tbody>
+    <tbody ng-if="$data.length === 0">
+    <tr>
+      <td colspan="6">
+        <div id="empty">
+          <div class="left_img">
+            <a href="http://www.ubtob.com/" target="_blank" title="优软云首页"><img src="static/img/empty/uas_empty.png"></a>
+            <a href="#/index" title="B2B商务首页">B2B 商务</a>
+          </div>
+          <div class="right_link">
+            <p>暂无对应的单据</p>
+            <a href="javascript:location.reload()">点击重新加载<i class="load_icon"></i></a>
+          </div>
+        </div>
+      </td>
+    </tr>
+    </tbody>
+  </table>
+  <div ng-if="infoCommon.totalElement > 0" class="text-mns text-right" ng-class="infoCommon.totalElement >= 20 ? '': 'Boom18'">
+    显示&nbsp;{{(infoCommon .page - 1 ) * infoCommon.size + 1}}-{{infoCommon.all >= 20 ? infoCommon.page *  infoCommon.size: (infoCommon.page - 1 ) * infoCommon.size + infoCommon.all}}&nbsp;条,共&nbsp;{{infoCommon.totalElement}}&nbsp;条
+  </div>
+</div>

+ 298 - 0
src/main/webapp/resources/view/vendor/b2b/sale/sale_returns_details.html

@@ -0,0 +1,298 @@
+<style>
+  #order-detail-list .table-default tbody tr td{
+    vertical-align: top;
+  }
+  .pub-com_head span.fr {
+    margin-right: 20px;
+    color: #fff;
+    float: right;
+  }
+  .pub-com_head span.fr em {
+    margin-right: 50px;
+    font-size: 14px;
+    font-style: inherit;
+    color:#fff;
+  }
+  .base-info .title{
+    width: 85px;
+  }
+  #order-detail-list .title-div:first-child{
+    margin-bottom: 10px;
+  }
+</style>
+<style>
+  .text-trans {
+    right: 24px
+  }
+  .base-info {
+    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    border-radius: 5px;
+    /*min-height: 1066px;*/
+    background: #fff;
+    width: 1026px;
+  }
+  #order-detail-list {
+    font-size: 14px;
+  }
+  .pub-com_head, .com_head {
+    width: 100%;
+    height: 35px;
+    line-height: 35px;
+    background: #5078cb;
+    border-radius: 5px 5px 0 0;
+    /* background: url(../img/approvalFlow/comm_bg01.png) no-repeat left; */
+    /* background-color: #f5f5f5; */
+    /* background-size: 100% 100%; */
+  }
+  .pub-com_head span, .com_head span {
+    margin-left: 10px;
+    color: #fff;
+    font-size: 14px;
+    font-weight: bold;
+  }
+  .pub-com_head .p-right {
+    float: right;
+  }
+  .pane .pane-body {
+    /*padding: 15px!important;*/
+  }
+  com_title01, .title-div {
+    /*border-bottom: 1px dashed #3f84f6 !important;*/
+  }
+  .title-div {
+    color: #5078cb;
+    font-size: 14px;
+    font-weight: 600;
+    /*padding-left: 20px !important;*/
+    height: 50px;
+    padding-top: 11px;
+    position: relative;
+  }
+  .f14 {
+    font-size: 14px !important;
+  }
+  #order-detail-list .row {
+    width: 96%;
+    margin: 0 auto;
+    line-height: 30px;
+  }
+  .base-info .item {
+    line-height: 26px;
+    /* border-bottom: 1px dotted #e8e8e8; */
+    padding: 5px 0;
+  }
+  #order-detail-list .title {
+    font-weight: inherit;
+  }
+  .base-info .title {
+    float: left;
+    width: 92px;
+    color: #333;
+    font-weight: bold;
+  }
+  #order-detail-list .content {
+    color: #666;
+  }
+  .base-info .content {
+    float: left;
+    white-space: nowrap;
+  }
+  .title-div .end {
+    position: absolute;
+    top: 10px;
+    right: 0;
+    line-height: 24px;
+    padding-left: 15px;
+    background: #fff;
+    z-index: 2;
+  }
+  .block {
+    background-color: #fff;
+    border-radius: 5px;
+    width: 100%;
+    position: relative;
+    margin-bottom: 0px;
+  }
+  #order-detail-list .table-default .header {
+    box-shadow: none;
+    border: none;
+    background: none;
+    background: #f9f9f9;
+  }
+  #order-detail-list .table-default .header th {
+    /*display: inline-block;*/
+    border-bottom: none;
+    font-weight: normal;
+    color: #999;
+    text-align: center;
+  }
+  #order-detail-list .table-default th, #order-detail-list .table-default td {
+    /*border-top: #ddd 1px dotted;*/
+  }
+  #order-detail-list .table-default tbody tr {
+    background: none;
+    position: relative;
+  }
+  #order-detail-list .table-default tbody tr td {
+    vertical-align: middle;
+    color: #323232;
+    position: relative;
+    padding: 25px 0px;
+    text-align: center;
+  }
+  [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
+    display: none !important;
+  }
+  .text-bold {
+    font-weight: 700;
+  }
+
+  .text-num {
+    font-style: normal;
+    word-break: break-all;
+    font-size: 14px;
+  }
+  .text-muted {
+    color: #333;
+    font-size: 14px;
+  }
+  .bottomB {
+    border-bottom: 2px solid #f5f5f5;
+    padding: 15px 30px 15px 15px;
+  }
+
+  .title-div .f14{
+    border-left: 5px solid #5078cb;padding-left: 10px;
+  }
+
+  .order-number {
+    position: absolute;
+    top: -1px;
+    left: -1px;
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    text-align: center;
+    background: #f9f9f9;
+    font-weight: 500;
+    border: solid 1px #d5d5d5;
+    border-radius: 0 0 10px 0;
+  }
+  #order-detail-list .table-default tbody tr td.product {
+    padding-left: 30px;
+  }
+  #order-detail-list .table-default tbody tr td{
+    border-right: 1px solid #e8e8e8;
+  }
+  .text-trans {
+    top: -20px;
+  }
+</style>
+<div class="pane base-info fr" id="order-detail-list">
+  <div class="pub-com_head">
+    <span>客户采购验退单</span>
+    <span class="fr"><em>操作员:{{returns.recorder}}</em><time>日期:{{returns.date | date:'yyyy-MM-dd'}}</time></span>
+  </div>
+  <div class="pane-body">
+    <div class="bottomB">
+    <div class="title-div" >
+      <span class="f14">单据信息</span>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <span class="title">验退单号:</span>
+        <div class="content" ng-bind="::returns.code"></div>
+      </div>
+      <div class="col-xs-6">
+        <span class="title">客户名称:</span>
+        <div class="content" ng-bind="::returns.custEnterprise.enName"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <span class="title">验退日期:</span>
+        <div class="content" ng-bind="::returns.date | date: 'yyyy-MM-dd'"></div>
+      </div>
+      <div class="col-xs-6">
+        <div class="title">应付供应商:</div>
+        <div class="unchanged-info" ng-bind="::returns.receivename"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <div class="title">送货单号:</div>
+        <div class="unchanged-info" ng-bind="::returns.sendCode"></div>
+      </div>
+      <div class="col-xs-6">
+        <span class="title">付款方式:</span>
+        <div class="content" ng-bind="::returns.payments"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <div class="title">币别:</div>
+        <div class="unchanged-info"  ng-bind="::returns.currency"></div>
+      </div>
+      <div class="col-xs-6">
+        <div class="title">金额:</div>
+        <div ng-if="!isUser" class="unchanged-info" ng-bind="::totalPrice| number: 6"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <span class="title">备注:</span>
+        <div class="content" ng-bind="::returns.remark"></div>
+      </div>
+    </div>
+    </div>
+    <div class="bottomB">
+    <div class="title-div" >
+      <span class="f14">产品价格详情</span>&nbsp;
+    </div>
+    </div>
+    <div class="block">
+      <table class="block table table-default table-striped" style=" margin-bottom: 0">
+        <thead>
+        <tr class="header">
+          <th width="50">序号</th>
+          <th width="180">采购单号</th>
+          <th width="180">产品</th>
+          <th width="100">品牌</th>
+          <th width="50">单位</th>
+          <th width="60">单价</th>
+          <th width="80">入库数</th>
+          <th width="80">金额</th>
+          <th width="120">批号</th>
+        </tr>
+        </thead>
+      </table>
+      <table class="block table table-default table-striped">
+        <tbody>
+        <tr ng-repeat="returnitem in returns.returnItems| orderBy:'number'" ng-class="{'scoroll':order.orderItems.length>10}">
+          <td width="50"><span ng-bind="::returnitem.number"></span></td>
+          <td width="180">
+            <a ng-if="returnitem.orderItem" ng-bind="returnitem.orderItem.order.code" ui-sref="sale.order_detail({id:returnitem.orderItem.order.id})" target="_blank"></a>
+            <span ng-if="!returnitem.orderItem">无关联的采购单</span>
+          </td>
+          <td width="180" class="text-center">
+            <div>
+              <span ng-bind="::returnitem.product.code"></span>
+              <span ng-bind="::returnitem.product.title"></span>
+              <span ng-bind="::returnitem.product.spec"></span>
+            </div>
+          </td>
+          <td width="100" class="text-center"><span ng-bind="::returnitem.product.brand"></span></td>
+          <td width="50" class="text-center"><span ng-bind="::returnitem.product.unit"></span></td>
+          <td width="60" class="text-center"><span ng-if="!isUser" ng-bind="::returnitem.orderPrice"></span></td>
+          <td width="80" class="text-center"><span ng-bind="::returnitem.qty"></span></td>
+          <td width="80" class="text-center"><span ng-if="!isUser" ng-bind="::returnitem.qty * returnitem.orderPrice| number: 6"></span></td>
+          <td width="120" class="text-center"><span ng-bind="::returnitem.batchCode"></span></td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
+  </div>
+</div>