Просмотр исходного кода

在客户公共询价和客户采购询价中针对已采纳和未采纳和已过期的单据增加我要报价功能,转成主动报价单

hejq 8 лет назад
Родитель
Сommit
1faba16dea

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

@@ -562,7 +562,7 @@ public class PubInquiryServiceImpl implements PubInquiryService {
     @Override
     public ModelMap refuseInquiry(Long id) throws Exception {
         ModelMap map = new ModelMap();
-        InquiryUtils.decide(id, Constant.YES);
+        InquiryUtils.decide(id, Constant.NO);
         map.put("success", "操作成功");
         return map;
     }

+ 36 - 5
src/main/java/com/uas/platform/b2b/service/impl/SaleQuotationServiceImpl.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2b.service.impl;
 
 import com.uas.platform.b2b.core.util.ContextUtils;
+import com.uas.platform.b2b.core.util.ThreadUtils;
 import com.uas.platform.b2b.dao.*;
 import com.uas.platform.b2b.erp.model.Inquiry;
 import com.uas.platform.b2b.event.SaleQuotationDecideReleaseEvent;
@@ -9,10 +10,13 @@ import com.uas.platform.b2b.model.*;
 import com.uas.platform.b2b.service.ProductUsersService;
 import com.uas.platform.b2b.service.SaleQuotationService;
 import com.uas.platform.b2b.support.SystemSession;
+import com.uas.platform.b2b.support.UsageBufferedLogger;
 import com.uas.platform.core.exception.NotFoundException;
+import com.uas.platform.core.logging.BufferedLoggerManager;
 import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.Status;
+import com.uas.platform.core.persistence.Logger;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.search.b2b.model.SPage;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -52,6 +56,11 @@ public class SaleQuotationServiceImpl implements SaleQuotationService {
 	@Autowired
     private ProductUsersService productUsersService;
 
+	@Autowired
+    private VendorDao vendorDao;
+
+    private final static UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
+
 	@Override
 	public void save(List<SaleQuotationItem> items) {
 		saleQuotationItemDao.save(items);
@@ -112,15 +121,37 @@ public class SaleQuotationServiceImpl implements SaleQuotationService {
 		item.getQuotation().setEnUU(SystemSession.getUser().getEnterprise().getUu());
 		item.getQuotation().setUserUU(SystemSession.getUser().getUserUU());
 		item.setNumber((short) 1);
-		SaleQuotationItem newItem = saleQuotationItemDao.save(item);
+		final SaleQuotationItem newItem = saleQuotationItemDao.save(item);
 		List<SaleQuotationItem> list = new ArrayList<SaleQuotationItem>();
 		list.add(newItem);
-        // 更新我的物料库信息
-        productUsersService.coverToMyProduct(item.getProductId(), SystemSession.getUser().getEnterprise().getUu(), SystemSession.getUser().getUserUU(), "主动报价");
-		return newItem;
+        ThreadUtils.task(new Runnable() {
+            @Override
+            public void run() {
+                // 更新我的物料库信息
+                productUsersService.coverToMyProduct(newItem.getProductId(), SystemSession.getUser().getEnterprise().getUu(), SystemSession.getUser().getUserUU(), "主动报价");
+            }
+        }).run();
+        checkCust(item.getQuotation().getCustUU(), item.getQuotation().getEnUU(), item.getQuotation().getCustUserUU(), item.getQuotation().getUserUU());
+        return newItem;
 	}
 
-	@Override
+    private void checkCust(Long custUU, Long enUU, Long custUserUU, Long userUU) {
+        List<Vendor> vendors = vendorDao.findByMyEnUUAndVendUU(custUU, enUU);
+        if (CollectionUtils.isEmpty(vendors)) {
+            // 添加客户
+            Vendor vendor = new Vendor();
+            vendor.setCustswitch(Constant.YES);
+            vendor.setVendswitch(Constant.YES);
+            vendor.setMyEnUU(custUU);
+            vendor.setMyUserUU(custUserUU);
+            vendor.setVendEnUU(enUU);
+            vendor.setVendUserUU(userUU);
+            vendor = vendorDao.save(vendor);
+            logger.log("添加客户", "通过主动报价自动添加客户", "关联id: " + vendor.getId());
+        }
+    }
+
+    @Override
 	public SaleQuotationItem findItemById(Long id) {
 		SaleQuotationItem item = null;
 		List<SaleQuotationItem> items = saleQuotationItemDao.findByQuid(id);

+ 40 - 343
src/main/webapp/resources/js/index/app.js

@@ -368,7 +368,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         }).state('sale.quotation.new', {
             url: "/new",
             templateUrl: "static/tpl/index/sale/quotation_new.html",
-            controller: 'SaleQuotationNewCtrl'
+            controller: 'SaleQuotationNewCtrl',
+            params: {
+                'inquiryItem': null
+            }
         }).state('sale.quotation.list', {
             url: "/list",
             templateUrl: "static/tpl/index/sale/quotation_list.html",
@@ -4354,6 +4357,15 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 toaster.pop('error', '数据加载失败', response.data);
             })
         }
+
+        $scope.isoverdue = function(time) {
+            var timeSpan = new Date().getTime();
+            if (time > timeSpan) {
+                return false;
+            } else {
+                return true;
+            }
+        }
     }]);
 
     // 询价单明细
@@ -6004,8 +6016,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                         }
                     });
 
-                    modalInstance.result.then(function (data) {
-                        $scope.tableParams.reload();
+                    modalInstance.result.then(function () {
+                        window.location.reload();
                     }, function () {
 
                     });
@@ -6442,7 +6454,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             // var file = $scope.myFiles;
             if (file.length > 0) {
                 for (var i = 0; i < file.length; i++) {
-                    console.log(file[i].name);
                     var flag = true;
 
                     if (mould.sellAttachs.length > 0) {
@@ -6478,23 +6489,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         // 保存并确认报价
         $scope.onReplyClick = function (mould, withSteps) {
             $scope.loading = true;
-////			var file = mould.attachFile.$viewValue, file = file && file.length > 0 ? file[0] : null;
-//			var file = mould.attachs[0];
-//			$scope.mould  = mould;
-//			$upload.upload({
-//				url: 'sale/mould/' + mould.id + '/send',
-//				method: 'POST',
-//				file: file,
-//				data: {
-//					json: $scope.mould
-//				}
-//			}).success(function(res){
-//				console.log("success");
-//				console.log(res);
-//			}).error(function(res){
-//				console.log("failure");
-//			});
-
             if (withSteps) {
                 PurcInquiryMould.reply({id: mould.id}, mould, function () {
                     $scope.loading = false;
@@ -6719,21 +6713,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
         $scope.onReplyClick = function (mould, withSteps) {
             $scope.loading = true;
-//			var file = mould.attachs[0];
-//			$scope.mould  = mould;
-//			$upload.upload({
-//				url: 'sale/mould/' + mould.id + '/send',
-//				method: 'POST',
-//				file: file,
-//				data: {
-//					json: $scope.mould
-//				}
-//			}).success(function(res){
-//
-//			}).error(function(res){
-//				console.log(res);
-//			});
-
             if (withSteps) {
                 PurcInquiryMould.reply({id: mould.id}, mould, function () {
                     $scope.loading = false;
@@ -7030,6 +7009,20 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             }
         };
 
+        // 根据传入的询价相关的信息封装成报价需要的信息
+        if ($stateParams.inquiryItem != null) {
+            var item = $stateParams.inquiryItem;
+            console.log(item);
+            $scope.item.quotation.cust = item.inquiry.enterprise;
+            $scope.item.quotation.custUser = item.user;
+            $scope.item.quotation.custUserUU = item.userUU;
+            if (item.product == null || item.product.id == null) {
+                toaster.pop('info', '暂未匹配到物料信息,请手动选择');
+            } else {
+                $scope.item.product = item.product;
+            }
+        }
+
         // 保存
         $scope.save = function () {
             var valid = true;
@@ -7045,15 +7038,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 if (!$scope.item.quotation.code) //新增,设单号
                     $scope.item.quotation.code = 'BJ' + $filter('date')(new Date(), 'yyMMddHHmmss_sss');
                 $scope.item.quotation.custUU = $scope.item.quotation.cust.uu;
-                $scope.item.quotation.custUserUU = $scope.item.quotation.custUser.userUU;
+                if ($scope.item.quotation.custUserUU == null) {
+                    $scope.item.quotation.custUserUU = $scope.item.quotation.custUser.userUU;
+                }
                 $scope.item.productId = $scope.item.product.id;
-                // $scope.item.quotation.status = 100;//在录入
-                // if ($scope.item.quotation.date instanceof Date) {
-                //     $scope.item.quotation.date = $scope.item.quotation.date.getTime();
-                // }
-                // if ($scope.item.quotation.endDate instanceof Date) {
-                //     $scope.item.quotation.endDate = $scope.item.quotation.endDate.getTime();
-                // }
                 Quotation.save({}, $scope.item, function (data) {
                     $scope.loading = false;
                     $scope.item = data;
@@ -23504,15 +23492,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             }
         };
 
-        // // 设置阅读状态
-        // $scope.setReadStatus = function(msg) {
-        //     if(!msg.read) {
-        //         PurcInquiry.setStatus({id: msg.inid}, {}, function(data) {
-        //
-        //         });
-        //     }
-        // }
-
         $scope.searchMethod = false;
         var getService = function () {
             return $scope.searchMethod ? PubInquirySearchInfo : PubInquiryNoSearchInfo;
@@ -23540,17 +23519,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 if ($scope.active == 'overdue') {
                     $scope.active = 'end';
                 }
-                /*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.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的关键词
-                    }
-                }, function (response) {
-                    $scope.loading = false;
-                    toaster.pop('error', '数据加载失败', response.data);
-                });*/
                 AccountEnterprise.get({}, function(data) {
                     $scope.currentEn = data;
                     publicInquiry.getUrl({}, function(data) {
@@ -23567,7 +23535,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                             if (response) {
                                 params.total(response.totalElements);
                                 $defer.resolve(response.content);
-                                // $scope.keywordXls = angular.copy($scope.keyword); // 保存当前取值的关键词  做导出时需要的字段
                             }
                         }).error(function (err) {
                             $scope.loading = false;
@@ -23578,264 +23545,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             }
         });
 
-        //获得各分类未阅读数量
-        // var getUnreadCount = function () {
-        //     PurcInquiry.getUnreadCount(null, function (data) {
-        //         $scope.unread = data;
-        //     });
-        // };
-        // getUnreadCount();
-
-        // //设置单据已读
-        // $scope.setOrdersRead = function (id) {
-        //     // 如果单据本身已读,则不发送请求修改数据
-        //     if (!$scope.isUnread(id)){
-        //         return;
-        //     }
-        //     var sourceId = [];
-        //     sourceId.push(id);
-        //     PurcInquiry.setRead({}, sourceId, function (message) {
-        //         getUnreadCount();
-        //         removeByValue($scope.unreadCode, id);
-        //     });
-        // };
-
-        // $scope.setOrdersReadByState = function () {
-        //     if (!$scope.unread.replied || $scope.unread.replied == 0) {
-        //         return;
-        //     }
-        //     PurcInquiry.setReadByState({}, function () {
-        //         getUnreadIds();
-        //         getUnreadCount();
-        //     });
-        // };
-
-        // var getUnreadIds = function () {
-        //     PurcInquiry.getUnreadIds({}, "", function (message) {
-        //         $scope.unreadCode = message.content;
-        //     });
-        // };
-        // getUnreadIds();
-
-        $scope.isUnread = function (id) {
-            for (var i in $scope.unreadCode) {
-                if (id == $scope.unreadCode[i]) {
-                    return true;
-                }
-            }
-        };
-
-        $scope.getMinDate = function (item) {
-            return $filter('date')(item.inquiry.date, 'yyyy-MM-dd');
-        };
-        $scope.replyPrices = [];
-        $scope.replylapQtys = [];
-        $scope.replyPrices.push(true);
-        $scope.replylapQtys.push(true);
-        $scope.addStep = function (inquiryItem) {
-            $scope.replyPrices.push(true);
-            if (inquiryItem.replies.length >= 10) {
-                toaster.pop('warning', '提示', '最多支持10个分段!');
-            } else {
-                inquiryItem.replies.push({});
-                if (inquiryItem.replies.length != 1) {
-                    $scope.replyPrices.push(true);
-                    $scope.replylapQtys.push(true);
-                }
-            }
-        };
-        $scope.removeStep = function (inquiryItem, stepIndex) {
-            inquiryItem.replies.splice(stepIndex, 1);
-            $scope.replyPrices.splice(stepIndex, 1);
-            $scope.replylapQtys.splice(stepIndex, 1);
-        };
-
-        $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.getHistory = function (item) {
-            if (!item.history) {
-                publicInquiry.getHistory({itemId: item.id}, function (data) {
-                    item.history = data;
-                });
-            }
-        };
-
-        // 报价
-        $scope.quote = function(inquiryItem) {
-            $modal.open({
-                animation: true,
-                templateUrl: 'static/tpl/index/sale/modal/quote_inquiry.html',
-                controller: 'QuoteInquiryCtrl',
-                resolve: {
-                    inquiryItem: function () {
-                        return inquiryItem
-                    }
-                }
-            }).result.then(function (data) {
-
-            }, function () {})
-        };
-
-        $scope.deleteAttach = function (attaches, index) {
-            attaches.splice(index, 1);
-        };
-
-        $scope.onReplyClick = function (item, withSteps) {
-            if (item.vendFromDate instanceof Date) {
-                item.vendFromDate = item.vendFromDate.getTime();
-            }
-            if (item.vendToDate instanceof Date) {
-                item.vendToDate = item.vendToDate.getTime();
-            }
-            if (item.vendFromDate > item.vendToDate) {
-                toaster.pop('warning', '警告', '有效开始日期不能超过有效截止日期');
-                return;
-            }
-            var replies = [];
-            // 判断分段数是否合法
-            var valid = true;
-            var validLapQty = 0;
-            angular.forEach(item.replies, function (r, i) {
-                if ((i > 0 ? r.lapQty : 1) || r.price) {
-                    replies.push(r);
-                }
-                // 直接比较是字符串比较,需要先转换再比较  2017年9月7日 15:05:51
-                if (i > 0 && parseInt(r.lapQty) <= parseInt(item.replies[i - 1].lapQty) || r.lapQty == null) {
-                    valid = false;
-                    validLapQty = r.lapQty;
-                }
-            });
-            item.replies = replies;
-            $scope.loading = true;
-            if (!valid) {
-                if (validLapQty) {
-                    toaster.pop('info', '提示', '分段' + validLapQty + '小于等于了上一分段数,不能保存!');
-                } else {
-                    toaster.pop('info', '提示', '分段数量不合法,不能保存!');
-                }
-                $scope.loading = false;
-            } else {
-                var file = item.myFiles, file = file && file.length > 0 ? file[0] : null;
-                if (withSteps) { // 保存并报价
-                    if(null != file) {
-                        $upload.upload({
-                            url: 'sale/pubInquiry/addAttach',
-                            file: file,
-                            method: 'POST',
-                            data: {
-                                item: item,
-                                method: 'reply'
-                            }
-                        }).success(function (data) {
-                            if (data.item) {
-                                item = data.item;
-                            }
-                            $scope.loading = false;
-                            toaster.pop('info', '提示', '报价成功');
-                            $scope.tableParams.reload();
-                        }).error(function (data) {
-                            $scope.loading = false;
-                            toaster.pop('error', '附件上传失败');
-                        });
-                    } else {
-                        publicInquiry.reply({itemId: item.id, token: $scope.token}, item, function (data) {
-                            $scope.loading = false;
-                            toaster.pop('info', '提示', '报价成功');
-                            $scope.tableParams.reload();
-                        }, function (response) {
-                            $scope.loading = false;
-                            toaster.pop('error', '询价失效', response.data);
-                        });
-                    }
-                } else {  // 保存
-                    if(null != file) {
-                        $upload.upload({
-                            url: 'sale/pubInquiry/addAttach',
-                            file: file,
-                            method: 'POST',
-                            data: {
-                                item: item,
-                                method: 'save'
-                            }
-                        }).success(function (data) {
-                            if (data.item) {
-                                item = data.item;
-                            }
-                            $scope.loading = false;
-                            toaster.pop('info', '提示', '保存成功');
-                            $scope.tableParams.reload();
-                        }).error(function (data) {
-                            $scope.loading = false;
-                            toaster.pop('error', '附件上传失败');
-                        });
-                    } else {
-                        publicInquiry.saveItem({itemId: item.id, token: $scope.token}, item, function (data) {
-                            $scope.loading = false;
-                            toaster.pop('info', '提示', '保存成功');
-                            $scope.tableParams.reload();
-                        }, function (response) {
-                            $scope.loading = false;
-                            toaster.pop('error', '保存失败', response.data);
-                        });
-                    }
-                }
-            }
-        };
-
-        $scope.isValid = function (item, withSteps) {
-            var bool = item.leadtime && item.replies && item.replies[0].price > 0;
-            if (!withSteps || !bool)
-                return bool;
-            angular.forEach(item.replies, function (r, i) {
-                $scope.verifylapQty(r.lapQty, i, item);
-                bool = (i > 0 ? r.lapQty : 1) && r.price && $scope.replylapQtys[i];
-            });
-            return bool;
-        };
-
-        $scope.verifylapQty = function (value, index, inquiryItem) {
-            value = parseInt(value);
-            var regex = /^\d+(.\d{1,5})?$/;
-            var valid = true;
-            angular.forEach(inquiryItem.replies, function(reply, $index) {
-                if ($index < index && reply.lapQty >= value) {
-                    valid = false;
-                }
-            });
-            $scope.replylapQtys[index] = regex.test(value) && valid;
-        };
-
-        $scope.minOrderQtyVerify = $scope.minPackQtyVerify = $scope.leadtimeVerify = true;
-        $scope.verify = function (value, type) {
-            var regex = /^\d+(.\d{1,5})?$/;//
-            switch (type) {
-                case 'minOrderQty':
-                    $scope.minOrderQtyVerify = regex.test(value);
-                    break;
-                case 'minPackQty':
-                    $scope.minPackQtyVerify = regex.test(value);
-                    break;
-                case 'leadtime':
-                    $scope.leadtimeVerify = regex.test(value);
-                    break;
-                default:
-                    $scope.replyPrices[type] = regex.test(value);
-                    break;
-            }
-        }
         // 搜索框回车
         $scope.onSearch = function (keyword) {
             // 每次搜索重置获取数据方法
@@ -23852,15 +23561,14 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $scope.tableParams.reload();
         }
 
-        // 导出
-        $scope.exportXls = function () {
-            PurcInquiry.exportXls({}, {}, function (data) {
-                if (data.success) {
-                    window.location.href = 'sale/inquiry/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
-                }
-            }, function (response) {
-                toaster.pop('error', '数据加载失败', response.data);
-            })
+        // 判断是否过期
+        $scope.isoverdue = function(time) {
+            var timeSpan = new Date().getTime();
+            if (time > timeSpan) {
+                return false;
+            } else {
+                return true;
+            }
         }
     }]);
 
@@ -24148,17 +23856,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 if ($scope.active == 'overdue') {
                     $scope.active = 'end';
                 }
-               /* 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.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的关键词
-                    }
-                }, function (response) {
-                    $scope.loading = false;
-                    toaster.pop('error', '数据加载失败', response.data);
-                });*/
                 AccountEnterprise.get({}, function(data) {
                     $scope.currentEn = data;
                     publicInquiry.getUrl({}, function(data) {

+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/modal/quotation_modal.html

@@ -211,7 +211,7 @@
             <div class="form-group">
                 <label for="inputEmail4" class="col-xs-2 control-label">备注</label>
                 <div class="col-xs-10">
-                    <input type="text" class="form-control" id="inputEmail8" ng-model="inquiryItem.reamrk" placeholder="请输入备注" >
+                    <input type="text" class="form-control" id="inputEmail8" ng-model="inquiryItem.remark" placeholder="请输入备注" >
                 </div>
             </div>
         </div>

+ 6 - 2
src/main/webapp/resources/tpl/index/purc/pubInquiry.html

@@ -505,6 +505,9 @@ margin-left: 55px;
 				<div ng-if="inquiryItem.attachUrl" class="text-muted">
 					<i class="fa fa-paperclip fa-fw" style="color: #ffa340; font-size: 18px;"></i>附件:<a class="file" href="{{inquiryItem.attachUrl}}" target="_blank">{{::inquiryItem.attachName}}</a>
 				</div>
+                <div ng-if="inquiryItem.remark" class="text-muted">
+                    备注:<span ng-bind="inquiryItem.remark"></span>
+                </div>
 			</td>
 			<td class="text-center">
 				<div ng-bind="inquiryItem.product.unit"></div>
@@ -627,8 +630,9 @@ margin-left: 55px;
 			<td class="text-center br-l">
 				<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == null && inquiryItem.invalid != 1" class="block">
 					<div ng-if="inquiryItem.replies.length > 0" class="text-muted" style="padding-top: 50px;">
-						<a ng-click="accept(inquiryItem.id);setOrdersRead(inquiryItem.id)">采纳</a>
-						<a ng-click="refuse(inquiryItem.id);setOrdersRead(inquiryItem.id)">拒绝</a></div>
+						<a ng-click="accept(inquiryItem.id)">采纳</a>
+						<a ng-click="refuse(inquiryItem.id)">拒绝</a>
+					</div>
 				</div>
 				<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == null && inquiryItem.invalid == 1" class="block">
 					<span class="text-trans text-light">已失效</span>

+ 4 - 0
src/main/webapp/resources/tpl/index/sale/inquiry.html

@@ -554,6 +554,10 @@
 						<span class="text-trans error">已过期</span>
 					</div>
 				</div>
+                <div ng-if="(inquiryItem.status == 201 && (inquiryItem.agreed == 1 || inquiryItem.agreed == 0)) || (inquiryItem.status == 201 && isoverdue(inquiryItem.inquiry.endDate) && inquiryItem.agreed != null)  && inquiryItem.inquiry.check != 1">
+                    <br><br>
+                    <a ui-sref="sale.quotation.new({inquiryItem:inquiryItem})">我要报价</a>
+                </div>
 			</td>
 		</tr>
 		</tbody>

+ 7 - 0
src/main/webapp/resources/tpl/index/sale/pubinquiry.html

@@ -412,6 +412,9 @@
 				</div>
                 <div ng-if="inquiryItem.attachUrl" class="text-muted">
                     <i class="fa fa-paperclip fa-fw" style="color: #ffa340; font-size: 18px;"></i>附件:<a class="file" href="{{inquiryItem.attachUrl}}" target="_blank">{{::inquiryItem.attachName}}</a>
+                </div>
+                <div ng-if="inquiryItem.remark" class="text-muted">
+                    备注:<span ng-bind="inquiryItem.remark"></span>
                 </div>
 			</td>
 			<td class="text-center">
@@ -450,6 +453,10 @@
 				<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == 0" class="block">
 					<span class="text-trans error">未采纳</span>
 				</div>
+				<div ng-if="(inquiryItem.status == 201 && (inquiryItem.agreed == 1 || inquiryItem.agreed == 0)) || isoverdue(inquiryItem.inquiry.endDate) && inquiryItem.checked != 1">
+					<br><br>
+                    <a ui-sref="sale.quotation.new({inquiryItem:inquiryItem})">我要报价</a>
+				</div>
 			</td>
 		</tr>
 		</tbody>