Browse Source

1、处理询价筛选数据sql查询错误
2、处理对账时未选择对账信息给出提示

hejq 7 years ago
parent
commit
aaf48b8291

+ 2 - 1
src/main/java/com/uas/platform/b2b/service/impl/ErpProdIODetailServiceImpl.java

@@ -75,7 +75,8 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
 	    StringBuffer sql = new StringBuffer("select  mr_code as inoutno, mr_date as pidate, mr_rate as rate, mr_receivecode as receivecode, " +
                 "mr_receivename as receivename, '客户委外验退单' as piclass, 'make$returnitem' as sourcetable, ma_code as ordercode, 0 as orderdetno, " +
                 "mri_number as detno,  (-(1) *  mri_qty ) as qty, mri_orderpice as orderprice, mr_currency as currency, mri_taxrate as taxrate, " +
-                "mri_whname as whname, mri_ycheckqty as ycheckqty, pr_code as prodcode, pr_spec as prodspec, pr_title as prodtitle, pr_unit as produnit, " +
+                "mri_whname as whname, mri_ycheckqty as ycheckqty, make$orders.pr_code as prodcode, make$orders.pr_spec as prodspec, " +
+                "make$orders.pr_title as prodtitle, make$orders.pr_unit as produnit, " +
                 "((-(1) *  mri_qty ) - coalesce(mri_ycheckqty, 0)) as thischeckqty, mr_enuu as custuu, ma_useruu custuseruu, mr_venduu as enuu, mri_id as sourceid, " +
                 "mr_sendcode as sendcode, ma_factory as pd_factory, en_name custname from make$return  " +
                 "join make$returnitem on mr_id =  mri_paid " +

+ 12 - 7
src/main/webapp/resources/js/index/app.js

@@ -10107,14 +10107,19 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
             //保存生成的应收对账单
             $scope.saveApCheck = function () {
-                FaApCheck.saveApCheck({}, $scope.apCheck, function (data) {
+                if ($scope.apCheck.items.length == 0) {
                     $scope.loading = false;
-                    toaster.pop('success', '成功', '生成应收对账成功');
-                    $state.go('fa.apCheck_detail', {id: data.id}, {reload: true});
-                }, function (response) {
-                    $scope.loading = false;
-                    toaster.pop('error', '生成对账单失败', response.data);
-                })
+                    toaster.pop('error', '请先选择需要对账的数据');
+                } else {
+                    FaApCheck.saveApCheck({}, $scope.apCheck, function (data) {
+                        $scope.loading = false;
+                        toaster.pop('success', '成功', '生成应收对账成功');
+                        $state.go('fa.apCheck_detail', {id: data.id}, {reload: true});
+                    }, function (response) {
+                        $scope.loading = false;
+                        toaster.pop('error', '生成对账单失败', response.data);
+                    })
+                }
             };
 
             //如果是同一家客户,生成对账单的同时,关闭模态框