Procházet zdrojové kódy

bom详情页提出来

yangc před 8 roky
rodič
revize
2dcdf2a65a

+ 5 - 0
src/main/webapp/resources/js/usercenter/app.js

@@ -420,6 +420,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
 			templateUrl: 'static/view/usercenter/forstore/seekPurchase.html',
 			templateUrl: 'static/view/usercenter/forstore/seekPurchase.html',
 			controller: 'seekPurchaseCtrl',
 			controller: 'seekPurchaseCtrl',
 			controllerUrl: 'app/controllers/forstore/seek_purchase_ctrl'
 			controllerUrl: 'app/controllers/forstore/seek_purchase_ctrl'
+		})).state('buyerBomDetail', angularAMD.route({
+			url: '/bomDetail/:id',
+			templateUrl: 'static/view/usercenter/forstore/bomDetail.html',
+			controller: 'seekPurchaseCtrl',
+			controllerUrl: 'app/controllers/forstore/bom_detail_ctrl'
 		}));
 		}));
 	}]);
 	}]);
 
 

+ 665 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/bom_detail_ctrl.js

@@ -0,0 +1,665 @@
+/**
+ * Created by yujia on 2017/3/19.
+ *  求购的控制器
+ */
+define(['app/app'], function (app) {
+    'use strict';
+    app.register.controller('seekPurchaseCtrl',
+        ['$scope', '$rootScope', 'seekPurchase', 'toaster', 'BaseService',
+            'ngTableParams', 'Order', 'SessionService', '$filter', '$upload',
+            function ($scope, $rootScope, seekPurchase, toaster, BaseService,
+                      ngTableParams, Order, SessionService, $filter, $upload) {
+                $rootScope.active = 'seek_purchase';
+                document.title = '我的求购-优软商城';
+                $scope.isEditName = false;
+
+                $scope.setIsEditName = function (flag) {
+                    $scope.isEditName = flag;
+                }
+
+                $scope.setIsBom = function (flag, bomId) {
+                    if (flag) {
+                        $scope.activeType = 'seekManage';
+                        $scope.seekPurchaseTableParams = new ngTableParams({
+                            page: 1,
+                            count: 10
+                        }, {
+                            total: 0,
+                            getData: function ($defer, params) {
+                                const param = BaseService.parseParams(params.url());
+                                param.isMallGoods = $scope.isMallGoods;
+                                param.deadline = $scope.deadline;
+                                param.keyWord = $scope.keyWord;
+                                param.status = $scope.searchStatus;
+
+                                param.minReleaseDate = $scope.startDate
+                                    ? $scope.startDate.getTime() : null;
+                                param.maxReleaseDate = $scope.endDate ? $scope.endDate.getTime()
+                                    : null;
+                                seekPurchase.getUserSeekPageInfo(param, function (data) {
+                                    params.total(data.totalElements);
+                                    $defer.resolve(data.content);
+                                    $scope.seekListData = data;
+                                }, function (response) {
+                                    toaster.pop('error', response.data);
+                                });
+                            }
+                        });
+                    }
+                    $scope.isBOM = flag;
+                }
+
+                var enIdFilter = $filter('EncryptionFilter');
+
+                $scope.applyObj = {
+                    code: '',
+                    brand: '',
+                    unitPrice: '',
+                    currency: 'RMB',
+                    encapsulation: '',
+                    produceDate: '',
+                    amount: '',
+                    deadline: ''
+                };
+                $scope.validObj = {
+                    code: true,
+                    brand: true,
+                    unitPrice: true,
+                    amount: true,
+                    deadline: true
+                };
+
+                var getRealLen = function (str) {
+                    var len = 0;
+                    for (var i = 0; i < str.length; i++) {
+                        if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
+                            len += 2;
+                        } else {
+                            len++;
+                        }
+                    }
+                    return len;
+                }
+
+                $scope.nowDate = new Date();
+
+                $scope.deadDate = new Date();
+                $scope.deadDate.setMonth($scope.deadDate.getMonth() + 3);
+
+                $scope.checkCode = function () {
+                    $scope.validObj.code = $scope.applyObj.code && $scope.applyObj.code
+                        !== '';
+                    return this.validObj.code;
+                }
+                $scope.checkBrand = function () {
+                    $scope.validObj.brand = $scope.applyObj.brand
+                        && $scope.applyObj.brand !== '';
+                    return $scope.validObj.brand;
+                }
+                $scope.checkUnitPrice = function () {
+                    $scope.validObj.unitPrice = ($scope.applyObj.unitPrice === '' || !$scope.applyObj.unitPrice ) ? true
+                        : $scope.applyObj.unitPrice > 0 && $scope.applyObj.unitPrice
+                    < 100000000;
+                    return $scope.validObj.unitPrice;
+                }
+                $scope.onUnitPriceInput = function () {
+                    var price = $scope.applyObj.unitPrice;
+                    if (angular.isNumber(price)) {
+                        if (price >= 10000) {
+                            $scope.applyObj.unitPrice = Number(price.toString().substring(0, 4));
+                        } else if (price.toString().indexOf('.') > -1) {
+                            var arr = price.toString().split(".");
+                            if (arr[0].length > 4) {
+                                $scope.applyObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1]);
+                            } else if (arr[1].length > 6) {
+                                $scope.applyObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6));
+                            }
+                        }
+                    }
+                }
+                $scope.onEncapsulationChange = function () {
+                    if ($scope.applyObj.encapsulation && getRealLen($scope.applyObj.encapsulation) > 20) {
+                        $scope.applyObj.encapsulation = $scope.applyObj.encapsulation.substring(0, $scope.applyObj.encapsulation.length - 1)
+                    }
+                }
+                $scope.onCodeChange = function () {
+                    if ($scope.applyObj.code && getRealLen($scope.applyObj.code) > 30) {
+                        $scope.applyObj.code = $scope.applyObj.code.substring(0, $scope.applyObj.code.length - 1)
+                    }
+                }
+                $scope.onBrandChange = function () {
+                    if ($scope.applyObj.brand && getRealLen($scope.applyObj.brand) > 20) {
+                        $scope.applyObj.brand = $scope.applyObj.brand.substring(0, $scope.applyObj.brand.length - 1)
+                    }
+                }
+                $scope.onProduceDateChange = function () {
+                    if ($scope.applyObj.produceDate && getRealLen($scope.applyObj.produceDate) > 12) {
+                        $scope.applyObj.produceDate = $scope.applyObj.produceDate.substring(0, $scope.applyObj.produceDate.length - 1)
+                    }
+                }
+                $scope.checkAmount = function () {
+                    $scope.validObj.amount = $scope.applyObj.amount === '' ? true
+                        : $scope.applyObj.amount > 0 && $scope.applyObj.amount
+                    < 100000000;
+                    return $scope.validObj.amount;
+                }
+                $scope.checkAll = function () {
+                    return $scope.checkCode() && $scope.checkBrand()
+                        && $scope.checkUnitPrice() && $scope.checkAmount()
+                        && $scope.checkDeadline();
+                }
+                $scope.checkDeadline = function () {
+                    $scope.validObj.deadline = $scope.applyObj.deadline
+                        && $scope.applyObj.deadline !== '';
+                    return $scope.validObj.deadline;
+                }
+                $scope.emptyForm = function () {
+                    for (var attr in $scope.applyObj) {
+                        $scope.applyObj[attr] = attr === 'currency' ? 'RMB' : '';
+                    }
+                }
+                // 发布求购
+                $scope.release = function () {
+                    // 校验
+                    if ($scope.checkAll()) {
+                        seekPurchase.saveOneSeekPurchase($scope.applyObj,
+                            function (data) {
+                                $scope.showUseFlag = false;
+                                $scope.seekPurchaseTableParams.reload();
+                                $scope.emptyForm();
+                                toaster.pop('success', '求购发布成功');
+                            }, function (res) {
+                                toaster.pop('error', res.data);
+                            });
+                    } else {
+                        if (!$scope.validObj.code) {
+                            toaster.pop('error', '型号不能为空');
+                        } else if (!$scope.validObj.brand) {
+                            toaster.pop('error', '品牌不能为空');
+                        } else if (!$scope.validObj.deadline) {
+                            toaster.pop('error', '截止日期不能为空');
+                        } else if (!$scope.validObj.amount || !$scope.validObj.unitPrice) {
+                            toaster.pop('error', '请输入正确的数值');
+                        }
+                    }
+                }
+
+                // 立即购买
+                $scope.purchase = function (go, index) {
+                    var goodsObj = {};
+                    goodsObj.batchCode = go.batchCode;
+                    goodsObj.currencyName = go.currencyName;
+                    goodsObj.minPackQty = go.minPackQty;
+                    goodsObj.number = $scope.fragments[index].num;
+                    goodsObj.storeUuid = go.storeid;
+                    goodsObj.storeid = go.storeid;
+                    var goodsList = [];
+                    goodsList.push(goodsObj);
+                    var rootPath = BaseService.getRootPath();
+                    if(go.minBuyQty > 0) {
+                        // 1、生成订单
+                        Order.buyNowInStore({spId: $scope.currentSeek.spId}, goodsList, function(data){
+                            if(data.message) {
+                                toaster.pop('info', data.message);
+                            }
+                            // 控制订单确认页,直接购买不显示进度条
+                            SessionService.set("buyNow", true);
+                            // 2、跳转到订单确认页面,进行付款操作
+                            window.open(rootPath + '/user#/order/pay/'+ enIdFilter(data.data.orderid));
+                        }, function(res){
+                            toaster.pop('error', '警告', res.data);
+                        });
+                    }else {
+                        toaster.pop('warning', '提示', '该商品库存为0,请等待上货或咨询客服');
+                    }
+                }
+
+                // 买家求购列表
+                $scope.searchStatus = 0;
+                $scope.seekPurchaseTableParams = new ngTableParams({
+                    page: 1,
+                    count: 10
+                }, {
+                    total: 0,
+                    getData: function ($defer, params) {
+                        const param = BaseService.parseParams(params.url());
+                        param.isMallGoods = $scope.isMallGoods;
+                        param.deadline = $scope.deadline;
+                        param.keyWord = $scope.keyWord;
+                        param.status = $scope.searchStatus;
+                        param.minReleaseDate = $scope.startDate
+                            ? $scope.startDate.getTime() : null;
+                        param.maxReleaseDate = $scope.endDate ? $scope.endDate.getTime()
+                            : null;
+                        seekPurchase.getUserSeekPageInfo(param, function (data) {
+                            params.total(data.totalElements);
+                            $defer.resolve(data.content);
+                            $scope.seekListData = data;
+                        }, function (response) {
+                            toaster.pop('error', response.data);
+                        });
+                    }
+                });
+
+                // 搜索
+                $scope.onSearch = function (searchStatus) {
+                    if (searchStatus) {
+                        $scope.searchStatus = searchStatus;
+                    }
+                    $scope.seekPurchaseTableParams.reload();
+                }
+
+                // 采纳报价
+                $scope.adopt = function () {
+                    if (!$scope.purchaseQuantity) {
+                        toaster.pop('error', "请输入正确的采购数量");
+                        return;
+                    }
+                    seekPurchase.updateSeekPurchaseStatus({
+                        spId: $scope.currentOffer.spId,
+                        ofId: $scope.currentOffer.id,
+                        purchaseQuantity: $scope.purchaseQuantity
+                    }, {}, function (data) {
+                        if (data.success) {
+                            $scope.currentOffer = null;
+                            $scope.seekPurchaseTableParams.reload();
+                            $scope.showUseFlag = false;
+                            toaster.pop('success', '采纳报价成功');
+                        } else {
+                            toaster.pop('error', data.message);
+                        }
+                    }, function (response) {
+                        toaster.pop('error', response.data);
+                    });
+                }
+
+                $scope.offerCount = 0;
+                $scope.goodsCount = 0;
+                $scope.currentSeek = {};
+                $scope.setSeekStatus = function (seek, status) {
+                    $scope.offerCount = seek.offerAmount;
+                    $scope.goodsCount = seek.goodsAmount;
+                    $scope.currentSeek = seek;
+                    // 查看报价
+                    if (status == 2 && $scope.offerCount != 0) {
+                        seekPurchase.getSeekPurchaseOfferPageInfo(
+                            {count: 100, page: 1, spId: seek.spId}, function (data) {
+                                $scope.offer = data.content;
+                                clearSeekStatus();
+                                seek.$status = status;
+                            });
+                    } else if (status == 1 && $scope.goodsCount != 0) {// 查看现货
+                        seekPurchase.getMallGoodsList({spId: seek.spId}, function (data) {
+                            $scope.goods = data;
+                            clearSeekStatus();
+                            initFragments();
+                            seek.$status = status;
+                        });
+                    } else if (status == 0) { // 收起
+                        seek.$status = status;
+                    }
+                    $scope.selectAmount = 0;
+                    $scope.selectPrice = 0;
+                }
+
+                var clearSeekStatus = function () {
+                    angular.forEach($scope.seekListData.content, function (item) {
+                        item.$status = 0;
+                    })
+                }
+
+                $scope.condition = {
+                    endDateOpen: false,
+                    startDateOpen: false,
+                    deadlineOpen: false
+                };
+                // 打开日期选择框
+                $scope.openDatePicker = function ($event, item, openParam, status) {
+                    if (status != null) {
+                        if (status == 1) {
+                            if ($scope.startDate != null) {
+                                return;
+                            }
+                        }
+                        if (status == 2) {
+                            if ($scope.endDate != null) {
+                                return;
+                            }
+                        }
+                    }
+                    $event.preventDefault();
+                    $event.stopPropagation();
+                    item[openParam] = !item[openParam];
+                    if (openParam == 'startDateOpen') {
+                        if (item['endDateOpen']) {
+                            item['endDateOpen'] = !item['endDateOpen'];
+                        }
+                    } else if (openParam == 'endDateOpen') {
+                        if (item['startDateOpen']) {
+                            item['startDateOpen'] = !item['startDateOpen'];
+                        }
+                    }
+                };
+                $scope.changeEndDate = function () {
+                    if ($scope.condition.endDateOpen) {
+                        $scope.endDate = $scope.endDate.toString().replace(
+                            /[0-9]{2}:[0-9]{2}:[0-9]{2}/g, '23:59:59');//;'23.59';//DateUtil.yyyyMmDd($scope.endDate.getTime() + 86399000);
+                        $scope.endDate = new Date(
+                            formatDateTime(new Date($scope.endDate.toString())));
+                    }
+                    $scope.vaildDate(false);
+                };
+                $scope.vaildDate = function (isStart) {
+                    if ($scope.endDate !== null && $scope.startDate > $scope.endDate) {
+                        if (isStart) {
+                            alert("开始日期大于结束日期,请重新输入!");
+                            $scope.startDate = null;
+                        } else {
+                            alert("开始日期大于结束日期,请重新输入!");
+                            $scope.endDate = null;
+                        }
+                    }
+                };
+                var formatDateTime = function (date) {
+                    var y = date.getFullYear();
+                    var m = date.getMonth() + 1;
+                    m = m < 10 ? ('0' + m) : m;
+                    var d = date.getDate();
+                    d = d < 10 ? ('0' + d) : d;
+                    var h = date.getHours();
+                    var minute = date.getMinutes();
+                    var sec = date.getSeconds();
+                    minute = minute < 10 ? ('0' + minute) : minute;
+                    return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + sec;
+                };
+                // 选择查找日期
+                $scope.onDateCondition = function () {
+                    $scope.param.page = 1;
+                    $scope.orderTableParams.page(1);
+                    $scope.orderTableParams.reload();
+                };
+
+                /*获取时间戳代表的天数*/
+                $scope.getDay = function (timeStamp) {
+                    return Math.floor(timeStamp / (1000 * 60 * 60 * 24));
+                }
+                /*获取时间戳代表的小时*/
+                $scope.getHours = function (timeStamp) {
+                    return Math.floor((timeStamp / (1000 * 60 * 60)) % 24);
+                }
+
+                /*
+                 * input 校验
+                 * */
+                $scope.fragments = [];
+
+                function initFragment(commodity) {
+                    if (!commodity) {
+                        return {};
+                    }
+                    var fragment = {};
+                    var prices = commodity.prices[0];
+                    fragment.num = commodity.minBuyQty;
+                    fragment.prices = prices;
+
+                    if (commodity.currencyName !== 'USD') {
+                        fragment.currency = 'RMB';
+                    } else {
+                        fragment.currency = 'USD';
+                    }
+
+                    if (fragment.currency !== 'USD') {
+                        fragment.price = prices.rMBPrice;
+                    } else {
+                        fragment.price = prices.uSDPrice;
+                    }
+                    fragment.canAdd = true;
+                    fragment.canSub = false;
+                    return fragment;
+                }
+
+                function initFragments() {
+                    angular.forEach($scope.goods, function (item) {
+                        $scope.fragments.push(initFragment(item));
+                    })
+                }
+
+                function getFragment(commodity, fragment) {
+                    // 判断是否小于第一分段的起订量
+                    if (commodity.prices[0].start > fragment.num) {
+                        fragment.num = commodity.prices[0].start;
+                    }
+                    // 获取分段的信息
+                    var prices = commodity.prices;
+                    for (var i = 0; i < prices.length; i++) {
+                        if (fragment.num <= prices[i].end) {
+                            fragment.prices = prices[i];
+                            break;
+                        }
+                    }
+                }
+
+                $scope.onInput = function (index) {
+                    var prices = $scope.goods[index].prices;
+                    if (prices && prices.length) {
+                        for (var i = 0; i < prices.length; i++) {
+                            if ($scope.fragments[index].num >= prices[i].start
+                                && $scope.fragments[index].num <= prices[i].end) {
+                                $scope.fragments[index].price = $scope.fragments[index].currency
+                                === 'RMB' ? prices[i].rMBPrice : prices[i].uSDPrice;
+                                break;
+                            }
+                        }
+                    }
+                    if ($scope.goods[index].$checked) {
+                        var amount = 0;
+                        angular.forEach($scope.seekListData.content, function (item) {
+                            if (item.$status == 1) {
+                                amount = item.amount;
+                            }
+                        })
+                        if (amount > 0) {
+                            $scope.selectAmount = 0;
+                        }
+                        $scope.selectPrice = 0;
+                        angular.forEach($scope.goods, function (item, index) {
+                            if (item.$checked) {
+                                if (amount > 0) {
+                                    if (amount < $scope.selectAmount
+                                        + $scope.fragments[index].num) {
+                                        $scope.fragments[index].num = amount
+                                            - $scope.selectAmount;
+                                    } else {
+                                        $scope.selectAmount += $scope.fragments[index].num;
+                                    }
+                                }
+                                $scope.selectPrice += $scope.fragments[index].num
+                                    * $scope.fragments[index].price;
+                            }
+                        })
+                    }
+                }
+                $scope.changeNum = function (newNum, index) {
+                    var pack = $scope.goods[index].perQty
+                        || $scope.goods[index].minPackQty;
+                    var buy = $scope.goods[index].minBuyQty;
+                    var reserve = $scope.goods[index].reserve;
+                    var breakUp = $scope.goods[index].breakUp;
+                    if (!newNum) {
+                        $scope.fragments[index].num = buy;
+                    } else {
+                        newNum = parseInt(newNum);
+                        if (breakUp) {
+                            if (newNum < buy) {
+                                toaster.pop('info', '提示', '最小起订量为' + buy);
+                                $scope.fragments[index].num = buy;
+                                $scope.fragments[index].canSub = false;
+                                $scope.fragments[index].canAdd = true;
+                            } else if (newNum > reserve) {
+                                toaster.pop('info', '提示', '库存不足');
+                                $scope.fragments[index].num = reserve;
+                                $scope.fragments[index].canAdd = false;
+                                $scope.fragments[index].canSub = true;
+                            } else {
+                                $scope.fragments[index].canSub = true;
+                                $scope.fragments[index].canAdd = true;
+                                $scope.fragments[index].num = newNum;
+                                newNum === buy && ($scope.fragments[index].canSub = false);
+                                newNum === reserve
+                                && ($scope.fragments[index].canAdd = false);
+                            }
+                        } else {
+                            if (newNum < buy) {
+                                toaster.pop('info', '提示', '最小起订量为' + buy);
+                                $scope.fragments[index].num = buy;
+                                $scope.fragments[index].canSub = false;
+                                if (newNum > reserve) {
+                                    toaster.pop('info', '提示', '库存不足');
+                                    $scope.fragments[index].num = reserve - (reserve % pack);
+                                    $scope.fragments[index].canAdd = false;
+                                }
+                            } else if (newNum > reserve) {
+                                $scope.fragments[index].canSub = true;
+                                $scope.fragments[index].canAdd = false;
+                                toaster.pop('info', '提示', '库存不足');
+                                $scope.fragments[index].num = reserve - (reserve % pack);
+                            } else {
+                                $scope.fragments[index].canSub = true;
+                                $scope.fragments[index].canAdd = true;
+                                var remainder = newNum % pack;
+                                if (remainder !== 0) {
+                                    toaster.pop('info', '提示', '不支持拆包且包装量为' + pack);
+                                    var res = (Math.floor(newNum / pack) + 1) * pack;
+                                    $scope.fragments[index].num = res > reserve
+                                        ? Math.floor(newNum / pack) * pack : res;
+                                } else {
+                                    $scope.fragments[index].num = newNum;
+                                }
+                                newNum === buy && ($scope.fragments[index].canSub = false);
+                                newNum === reserve
+                                && ($scope.fragments[index].canAdd = false);
+                            }
+                        }
+                    }
+                }
+                $scope.subNum = function (index) {
+                    if ($scope.fragments[index].canSub) {
+                        var pack = $scope.goods[index].perQty
+                            || $scope.goods[index].minPackQty;
+                        var newNum = 0;
+                        if ($scope.goods[index].breakUp) {
+                            newNum = $scope.fragments[index].num - 1;
+                        } else {
+                            newNum = $scope.fragments[index].num - pack;
+                        }
+                        $scope.changeNum(newNum, index)
+                        getFragment($scope.goods[index], $scope.fragments[index]);
+                        $scope.onInput(index);
+                    } else {
+                        toaster.pop('info', '提示', '该商品最少购买' + $scope.goods[index].minBuyQty + '件');
+                    }
+                }
+                $scope.addNum = function (index) {
+                    if ($scope.fragments[index].canAdd) {
+                        var pack = $scope.goods[index].perQty
+                            || $scope.goods[index].minPackQty;
+                        var newNum = 0;
+                        if ($scope.goods[index].breakUp) {
+                            newNum = $scope.fragments[index].num + 1;
+                        } else {
+                            newNum = $scope.fragments[index].num + pack;
+                        }
+                        $scope.changeNum(newNum, index)
+                        getFragment($scope.goods[index], $scope.fragments[index]);
+                        $scope.onInput(index);
+                    } else {
+                        toaster.pop('info', '提示', '库存不足');
+                    }
+                }
+                $scope.inputNum = function (index) {
+                    if ((/^[\d]*$/).test($scope.fragments[index].num)) {
+                        $scope.changeNum($scope.fragments[index].num, index);
+                        getFragment($scope.goods[index], $scope.fragments[index]);
+                    } else {
+                        toaster.pop('info', '提示', '请输入整数');
+                        $scope.fragments[index].num = $scope.goods[index].minBuyQty;
+                    }
+                    $scope.onInput(index);
+                }
+
+                $scope.showUseFlag = false;
+                $scope.setShowUseFlag = function (flag, offer) {
+                    if (flag) {
+                        $scope.currentOffer = offer;
+                    }
+                    // 如果当前求购数量不为空
+                    if ($scope.currentSeek.amount) {
+                        $scope.purchaseQuantity = $scope.currentSeek.amount;
+                        flag = false;
+                        $scope.adopt();
+                    }
+                    $scope.showUseFlag = flag;
+                }
+
+                $scope.selectAmount = 0;
+                $scope.selectPrice = 0;
+                $scope.onSelectGoods = function (goods, seek, goodsIndex) {
+                    if (goods.$checked) {
+                        if (seek.amount) {
+                            if (seek.amount < $scope.selectAmount
+                                + $scope.fragments[goodsIndex].num) {
+                                goods.$checked = false;
+                                return;
+                            }
+                            $scope.selectAmount += $scope.fragments[goodsIndex].num;
+                        }
+                        $scope.selectPrice += $scope.fragments[goodsIndex].num
+                            * $scope.fragments[goodsIndex].price;
+                    } else {
+                        if (seek.amount) {
+                            $scope.selectAmount -= $scope.fragments[goodsIndex].num;
+                        }
+                        $scope.selectPrice -= $scope.fragments[goodsIndex].num
+                            * $scope.fragments[goodsIndex].price;
+                    }
+                }
+
+                // 上传Excel批量发布(大量)
+                $scope.upload = function() {
+                    // if(($scope.bomFiles == null) || ($scope.bomFiles.length == 0)) {
+                    //   return ;
+                    // }
+                    var file = angular.element('#uploadCommodity')[0].files[0];
+                    console.info(file);
+                    if(!file) {
+                        toaster.pop('info', '请选择需要上传的文件');
+                        return;
+                    }
+                    $upload.upload({
+                        url: 'seek/importBom',
+                        file: file,
+                        method: 'POST'
+                    }).success(function(data) {
+                        window.open("http://10.1.51.90:3000/applyPurchase/" + data.data);
+                    }).error(function(response) {
+                    });
+                };
+
+                $scope.bomTableParams = new ngTableParams({
+                    page: 1,
+                    count: 10
+                }, {
+                    total: 0,
+                    getData: function ($defer, params) {
+                        const param = BaseService.parseParams(params.url());
+                        seekPurchase.getSeekPurchaseBomListPage(param, function (data) {
+                            params.total(data.totalElements);
+                            $scope.bomTotal = data.totalElements;
+                            $defer.resolve(data.content);
+                        }, function (response) {
+                            toaster.pop('error', response.data);
+                        });
+                    }
+                });
+            }]);
+});

+ 641 - 0
src/main/webapp/resources/view/usercenter/forstore/bomDetail.html

@@ -0,0 +1,641 @@
+<style>
+    .seek-purchase .seek-purchase-content {
+        margin-top: 10px;
+        background: #fff;
+        min-height: 500px;
+        padding-bottom: 60px;
+    }
+    .seek-purchase select {
+        opacity: 1;
+    }
+    /*搜索时间筛选 start*/
+    .seek-purchase .screen {
+        font-size: 14px;
+        line-height: 32px;
+        clear: both;
+        background: #f5f8fe;
+        height: 40px;
+        margin-bottom: 15px;
+        padding-top: 4px;
+        padding-right: 13px;
+    }
+    .seek-purchase .screen .fl {
+        margin-left: 14px;
+    }
+    .seek-purchase .screen .fl select{
+        width: 88px;
+        height: 32px;
+        border: 1px solid #4290f7;
+        display: inline-block;
+        border-radius: 2px;
+        margin-right: 11px;
+        padding-left: 10px;
+        box-shadow: none;
+    }
+    .seek-purchase .screen .sreach >span {
+        float: left;
+    }
+    .seek-purchase .screen .sreach input{
+        border: #4290f7 1px solid;
+        height: 32px;
+        width: 267px;
+        box-shadow: none;
+    }
+    .seek-purchase .screen .sreach .date{
+        margin-right: 6px;
+    }
+    .seek-purchase .screen .sreach .date input{
+        width: 117px;
+        text-align: left;
+        border: 1px solid #4290f7;
+    }
+    .seek-purchase .screen .sreach .date input:hover{
+        cursor: pointer;
+    }
+    .seek-purchase .screen .sreach .date em{
+        float: left;
+        line-height: 32px;
+        color: #999;
+        margin: 0 5px;
+    }
+    .seek-purchase .screen .sreach a.seek{
+        width: 58px;
+        height: 32px;
+        background: #4290f7;
+        color: #fff;
+        line-height: 32px;
+        float: left;
+    }
+    .seek-purchase .screen .sreach a.seek:hover{
+        background: #3f7ae3;
+    }
+    .seek-purchase .screen .sreach .form-control{
+        border-radius: 2px;
+    }
+    .seek-purchase .data-input{
+        float: left;
+        position: relative;
+    }
+    .seek-purchase .data-input button.open{
+        position: absolute;
+        right: 1px;
+        top: 1px;
+        width: 20px;
+        height: 30px;
+        background: url('static/img/user/images/xiala.png') right no-repeat #fff !important;
+        background-position-x: 100% !important;
+        border: none;
+    }
+    .seek-purchase .screen .sreach .date input.form-control{
+        padding: 6px 6px;
+    }
+    .seek-purchase .seek-purchase-content .publish-purchase .fl .form-block .btn-default{
+        border: none;
+    }
+    /*搜索时间筛选 end*/
+    .seek-purchase .seek-purchase-content >table {
+        width: 1000px;
+        margin: 0 auto;
+    }
+    .seek-purchase .seek-purchase-content >table >thead {
+        background: #89aefa;
+    }
+    .seek-purchase .seek-purchase-content >table >thead >tr th {
+        height: 38px;
+        line-height: 38px;
+        color: #fff;
+        text-align: center;
+        font-weight: normal;
+        font-size: 14px;
+    }
+    .seek-purchase .seek-purchase-content >table >thead >tr th select {
+        color: #666;
+        padding: 0 5px;
+        height: 24px;
+        width: 70px;
+        opacity: 1;
+        border: #fff 1px solid;
+        border-radius: 2px;
+        position: relative;
+        left: 10px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody {
+        border-right: 1px solid #dae5fd;
+        border-left: 1px solid #dae5fd;
+        border-bottom: 1px solid #dae5fd;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row {
+        border-bottom: 1px solid #dae5fd;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row:hover {
+        background: #f1f5ff;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td {
+        font-size: 14px;
+        text-align: center;
+        height: 70px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td.operate-seek >span {
+        color: #4290f7;
+        cursor: pointer;
+    }
+    .seek-purchase .red-text {
+        color: #f62d37;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr .green-text{
+        color: #15a211;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table {
+        width: 100%;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table thead tr {
+        height: 34px;
+        line-height: 34px;
+        background: #fce8df;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table thead tr th,
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td{
+        text-align: center;
+        font-size: 14px;
+        position: relative;
+        font-size: 12px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td {
+        height: 48px;
+        line-height: 48px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr {
+        border: 1px solid #fce8df;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr:nth-child(even) {
+        background: #fce8df;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.input-number >div {
+        position: relative;
+        width: 100px;
+        margin: 0 auto;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.operate >img {
+        position: absolute;
+        right: 0;
+        top: 0;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.input-number input {
+        width: 80px;
+        height: 26px;
+        text-align: center;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.input-number span {
+        width: 17px;
+        height: 26px;
+        background: #4290f7;
+        line-height: 26px;
+        color: #fff;
+        display: inline-block;
+        font-size: 16px;
+        vertical-align: middle;
+        position: absolute;
+        cursor: pointer;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.input-number span.not-allowed {
+        cursor: not-allowed;
+        background: #e8e8e8;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.input-number span:first-child {
+        top: 12px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.input-number span:last-child {
+        top: 12px;
+        right: 10px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.operate a {
+        color: #5078cb;
+        font-size: 12px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.operate span {
+        display: inline-block;
+        width: 64px;
+        height: 24px;
+        line-height: 24px;
+        text-align: center;
+        background: #4290f7;
+        color: #fff;
+        margin-left: 13px;
+        cursor: pointer;
+        font-size: 12px;
+        border-radius: 2px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row .all-buy {
+        height: 39px;
+        line-height: 39px;
+        color: #fff;
+        font-size: 14px;
+        background: #4290f7;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row .all-buy span {
+        display: inline-block;
+        width: 29%;
+        text-align: center;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row .all-buy a {
+        display: inline-block;
+        text-align: center;
+        width: 77px;
+        height: 27px;
+        line-height: 27px;
+        background: #fff;
+        color: #f91d06;
+        font-weight: bold;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row > td {
+        padding: 0 12px 15px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row td .switch-line {
+        display: flex;
+        justify-content: space-between;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row td .switch-line a {
+        position: relative;
+        width: 50%;
+        height: 34px;
+        line-height: 34px;
+        text-align: center;
+        display: inline-block;
+        background: #d7d6d5;
+        color: #fff;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row td .switch-line a.active {
+        background: #414140;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row td .switch-line a:first-child::after {
+        position: absolute;
+        right: 0;
+        content: '';
+        width: 0;
+        height: 0;
+        border-bottom: 34px solid #414140;
+        border-left: 12px solid transparent;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row td .switch-line a:first-child.active::after {
+        border-bottom-color: #d7d6d5;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody tr.expand-row td .seek-list {
+        max-height: 250px;
+        overflow-y: auto;
+        overflow-x: hidden;
+    }
+    /*提示框样式 start*/
+    /*.seek-purchase .com-del-box {
+        display: none;
+    }*/
+    .seek-purchase .com-del-box .title {
+        background-color: #4290f7;
+    }
+    .seek-purchase .com-del-box .content p {
+        line-height: initial;
+        padding-bottom: 7px;
+    }
+    .seek-purchase .com-del-box .content p i{
+        color: #4290f7;
+    }
+    .seek-purchase .com-del-box >div a:first-child {
+        color: #fff;
+    }
+    .seek-purchase .com-del-box >div a:last-child {
+        background-color: #4290f7;
+    }
+    .seek-purchase .com-del-box >div {
+        font-size: 14px;
+    }
+    .seek-purchase .com-del-box .input-line {
+        margin: 17px 0 21px 0;
+    }
+    .seek-purchase .com-del-box .input-line input {
+        width: 109px;
+        height: 24px;
+        display: inline-block;
+        font-size: 12px;
+        padding: 0 10px;
+        border-radius: 2px;
+    }
+    .seek-purchase .com-del-box .btn-line {
+        margin: 0 0 18px 0;
+    }
+    /*提示框样式 end*/
+    .seek-purchase .seek-purchase-content >table >tbody tr.pager-row td div {
+        text-align: right;
+        padding-right: 15px;
+        margin: 20px 0 12px 0;
+    }
+    .seek-purchase table {
+        table-layout: fixed;
+    }
+    .seek-purchase table tbody tr td {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+    .seek-purchase .blue-text {
+        color: #4290f7;
+    }
+    .seek-purchase .seek-purchase-content .BOM-header {
+        height: 164px;
+        padding: 14px;
+    }
+    .seek-purchase .seek-purchase-content .BOM-header > a {
+        font-size: 14px;
+        color: #4290f7;
+    }
+    .seek-purchase .seek-purchase-content .BOM-header > div {
+        height: 100px;
+        margin: 14px 0 0 0;
+        line-height: 100px;
+        border: 1px dashed #fd7748;
+        padding: 0 66px 0 21px;
+    }
+    .seek-purchase .seek-purchase-content .BOM-header > div .fr {
+        line-height: normal;
+        font-size: 14px;
+        margin-top: 25px;
+    }
+    .seek-purchase .seek-purchase-content .BOM-header > div p.BOM-name-area {
+        font-size: 22px;
+        font-weight: bold;
+    }
+    .seek-purchase .seek-purchase-content .BOM-header > div p {
+        display: inline-block;
+    }
+    .seek-purchase .seek-purchase-content .BOM-header > div p.BOM-name-area a {
+        margin-left: 10px;
+        display: inline-block;
+        width: 102px;
+        height: 24px;
+        line-height: 24px;
+        text-align: center;
+        background: #fd7748;
+        color: #fff;
+        font-size: 12px;
+        cursor: pointer;
+        border-radius: 2px;
+        vertical-align: middle;
+        position: relative;
+        bottom: 2px;
+    }
+    .seek-purchase .seek-purchase-content .BOM-header > div p.BOM-edit input {
+        display: inline-block;
+        width: 358px;
+        height: 30px;
+        border-radius: 2px;
+        border: 1px solid #dedede;
+    }
+    .seek-purchase .seek-purchase-content .BOM-header > div p.BOM-edit a {
+        padding: 6px 14px;
+        color: #fff;
+        font-size: 12px;
+        border-radius: 2px;
+        background: #c6c6c6;
+        vertical-align: middle;
+    }
+    .seek-purchase .seek-purchase-content .BOM-header > div p.BOM-edit a:last-child {
+        background: #fd7748;
+    }
+</style>
+<div class="user_right fr seek-purchase">
+    <!--求购询价-->
+    <div class="seek-purchase-content">
+        <div class="BOM-header">
+            <a href="javascript:window.history.back(-1)">&lt;返回BOM列表</a>
+            <div>
+                <p class="BOM-name-area" ng-show="!isEditName">
+                    <span>我是Excel的名称哈哈哈</span>
+                    <a ng-click="setIsEditName(true)">编辑BOM名称</a>
+                </p>
+                <p class="BOM-edit" ng-show="isEditName">
+                    <input type="text" class="form-control">
+                    <a ng-click="setIsEditName(false)">取消</a>
+                    <a >确认</a>
+                </p>
+                <div class="fr">
+                    配单分析:<span>本单共<span class="blue-text">100</span>个产品,<span class="red-text">10</span>个有报价。</span><br/><b class="red-text">81</b>个有现货
+                </div>
+            </div>
+        </div>
+        <!--搜索时间筛选-->
+        <div class="screen">
+            <div class="fl">
+                截止时间&nbsp;
+                <select class="form-control select-adder" ng-model="deadline" ng-change="onSearch()" ng-init="deadline='全部'">
+                    <option value="全部">全部</option>
+                    <option value="已截止">已截止</option>
+                    <option value="正在生效">正在生效</option>
+                </select>
+            </div>
+            <div class="sreach fr">
+                <span>发布时间&nbsp;</span>
+                <div class="date fl">
+                    <div class="data-input">
+                        <input type="text" ng-model="startDate"
+                               class="form-control select-adder" placeholder="起始时间"
+                               datepicker-popup="yyyy-MM-dd"
+                               is-open="condition.startDateOpen"
+                               max-date="endDate" current-text="今天" clear-text="清除" close-text="关闭"
+                               ng-click="openDatePicker($event, condition, 'startDateOpen',1)"
+                               datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                               ng-change="vaildDate(true)"
+                        />
+                        <button class="open" ng-click="openDatePicker($event, condition, 'startDateOpen')"></button>
+                    </div>
+
+                    <em>–</em>
+                    <div class="data-input">
+                        <input type="text" ng-model="endDate"
+                               class="form-control select-adder" placeholder="结束时间"
+                               datepicker-popup="yyyy-MM-dd"
+                               is-open="condition.endDateOpen"
+                               min-date="startDate" current-text="今天" clear-text="清除" close-text="关闭"
+                               ng-click="openDatePicker($event, condition, 'endDateOpen',2)"
+                               datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                               ng-change="changeEndDate()"
+                        />
+                        <button class="open" ng-click="openDatePicker($event, condition, 'endDateOpen')"></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>
+        <!--<div class="upload-content">-->
+        <!--<input type="text" name="txt" id="upload_text" />-->
+        <!--<i>选择文件</i>-->
+        <!--<input type="file" id="uploadCommodity" ng-file-select="" ng-change="selectFile()" accept="*.xls,*.xlsx" ng-model="bomFiles" ng-multiple="false" class="upload01" />-->
+        <!--<a href="javascript:void(0)" ng-click="upload()" class="blue-bg" style="margin-left: 18px;">确认上传</a>-->
+        <!--</div>-->
+        <table ng-table="seekPurchaseTableParams">
+            <thead>
+            <tr>
+                <th width="165">发布时间</th>
+                <th width="125">型号</th>
+                <th width="77">品牌</th>
+                <th width="93">采购数量</th>
+                <th width="78">单价预算</th>
+                <th width="70">封装</th>
+                <th width="105">生产日期</th>
+                <th width="123">截止时间</th>
+                <th width="81">
+                    <select class="select-adder form-control" ng-model="searchStatus" ng-change="onSearch(searchStatus)">
+                        <option value="0">全部</option>
+                        <option value="200">待报价</option>
+                        <option value="201">已报价</option>
+                        <option value="202">已采纳</option>
+                    </select>
+                </th>
+                <th width="92">操作</th>
+            </tr>
+            </thead>
+            <tbody ng-repeat="seek in seekListData.content">
+            <tr class="default-row">
+                <td ng-bind="seek.releaseDate | date:'yyyy-MM-dd HH:mm:ss'"></td>
+                <td ng-bind="seek.code || '-'" title="{{seek.code}}"></td>
+                <td ng-bind="seek.brand || '-'" title="{{seek.brand}}"></td>
+                <td ng-bind="seek.amount || '-'"></td>
+                <td>
+                    <span>{{seek.currency + seek.unitPrice | currencyStr}}</span>
+                </td>
+                <td ng-bind="seek.encapsulation || '-'" title="{{seek.encapsulation}}">盘装</td>
+                <td ng-bind="seek.produceDate || '-'" title="{{seek.produceDate}}">2012-12-12</td>
+                <td class="left-time" ng-if="seek.remainingTime > 0">剩余&nbsp;<span ng-bind="getDay(seek.remainingTime)" class="red-text"></span>&nbsp;天&nbsp;<span ng-bind="getHours(seek.remainingTime)" class="red-text">5</span>&nbsp;小时</td>
+                <td class="left-time" ng-if="seek.remainingTime <= 0"><span style="color: red;">已截止</span></td>
+                <td ng-switch="seek.status">
+                    <span ng-switch-when="200" style="color:red;">待报价</span>
+                    <span ng-switch-when="201">已报价</span>
+                    <span ng-switch-when="202" style="color:green;">已采纳</span>
+                </td>
+                <td class="operate-seek">
+                    <span ng-if="seek.offerAmount > 0" ng-show="!seek.$status || seek.$status == 0" ng-click="setSeekStatus(seek, 2)">查看报价&nbsp;<i class="fa fa-angle-double-down"></i></span>
+                    <span ng-if="seek.offerAmount == 0 && seek.goodsAmount>0" ng-show="!seek.$status || seek.$status == 0" ng-click="setSeekStatus(seek, 1)">查看现货&nbsp;<i class="fa fa-angle-double-down"></i></span>
+                    <span ng-show="seek.$status && (seek.$status == 1 || seek.$status == 2)" ng-click="setSeekStatus(seek, 0)">收起&nbsp;<i class="fa fa-angle-double-up"></i></span>
+                </td>
+            </tr>
+            <tr class="expand-row" ng-if="seek.$status == 1 || seek.$status == 2">
+                <td colspan="10">
+                    <div>
+                        <div class="switch-line">
+                            <a ng-disabled="goodsCount == 0" ng-class="{'active': seek.$status == 1}" ng-click="setSeekStatus(seek, 1)">商城现货(<span ng-bind="goodsCount"></span>)</a>
+                            <a ng-disabled="offerCount == 0" ng-class="{'active': seek.$status == 2}"  ng-click="setSeekStatus(seek, 2)">当前报价(<span ng-bind="offerCount"></span>)</a>
+                        </div>
+                        <div ng-show="seek.$status == 1">
+                            <table>
+                                <thead>
+                                <tr>
+                                    <!-- <th width="68">全选</th>-->
+                                    <th width="214">卖家</th>
+                                    <th width="83">交期(天)</th>
+                                    <th width="104">单价</th>
+                                    <th width="137">生产日期</th>
+                                    <th width="111">库存</th>
+                                    <th width="142">购买数量</th>
+                                    <th width="186">操作</th>
+                                </tr>
+                                </thead>
+                            </table>
+                            <div class="seek-list">
+                                <table>
+                                    <tbody>
+                                    <tr ng-repeat="go in goods track by $index">
+                                        <!--<td width="68">
+                                            <label class="com-check-box">
+                                                <input type="checkbox" id="{{$index + 2}}" ng-model="go.$checked" ng-change="onSelectGoods(go, seek, $index)">
+                                                <label for="{{$index + 2}}"></label>
+                                            </label>
+                                        </td>-->
+                                        <td width="214" title="{{go.enterpriseName}}" ng-bind="go.enterpriseName">哈哈哈</td>
+                                        <td width="83" class="red-text" ng-bind="go.minDelivery+'-'+go.maxDelivery">4-6{{fragments[i].price}}</td>
+                                        <td width="104" class="red-text">{{go.currencyName + fragments[$index].price | currencyStr}}</td>
+                                        <td width="137" ng-bind="go.produceDate">2012-12-12</td>
+                                        <td width="111" ng-bind="go.reserve">21412</td>
+                                        <td width="142" class="input-number">
+                                            <div>
+                                                <span ng-click="subNum($index)" ng-class="{'not-allowed': !fragments[$index].canSub}">-</span>
+                                                <input type="number" ng-model="fragments[$index].num" ng-blur="inputNum($index)">
+                                                <span ng-click="addNum($index)" ng-class="{'not-allowed': !fragments[$index].canAdd}">+</span>
+                                            </div>
+                                        </td>
+                                        <td width="186" class="operate">
+                                            <a>联系卖家 <img src="static/img/seekPurchase/link-buyer.png" alt=""></a>
+                                            <span ng-click = "purchase(go, $index)">立即购买</span>
+                                        </td>
+                                    </tr>
+                                    </tbody>
+                                </table>
+                            </div>
+                            <!--
+                            <div class="all-buy">
+                                <span><div ng-if="seek.amount">剩余数量:{{seek.amount - selectAmount}}</div></span>
+                                <span><div ng-if="seek.amount">已选数量:{{selectAmount}}</div></span>
+                                <span>产品小计:{{selectPrice}}元</span>
+                                <a href="javascript:void(0)">立即购买</a>
+                            </div>
+                            -->
+                        </div>
+                        <div ng-show="seek.$status == 2">
+                            <table>
+                                <thead>
+                                <tr>
+                                    <th width="173">卖家</th>
+                                    <th width="186">交期(天)</th>
+                                    <th width="186">单价</th>
+                                    <th width="195">生产日期</th>
+                                    <th width="221">操作</th>
+                                </tr>
+                                </thead>
+                            </table>
+                            <div class="seek-list">
+                                <table>
+                                    <tbody>
+                                    <tr ng-repeat="of in offer">
+                                        <td width="173" ng-bind="(of.enterprise).enName"></td>
+                                        <td width="186" class="red-text" ng-bind="of.minDay+'-'+of.maxDay">4-6</td>
+                                        <td width="186"><span>{{of.currency + of.unitPrice | currencyStr}}</span></td>
+                                        <td width="195" ng-bind="of.produceDate || '-'"></td>
+                                        <td width="221" class="operate">
+                                            <a href = "of.user.usertTel">联系卖家<img src="static/img/seekPurchase/link-buyer.png" alt=""></a>
+                                            <img ng-if="of.status == 202" src="static/img/seekPurchase/recieved.png" alt="" class="ng-scope">
+                                            <span ng-if="seek.status != 202" ng-click="setShowUseFlag(true, of)">采纳报价</span>
+                                        </td>
+                                    </tr>
+                                    </tbody>
+                                </table>
+                            </div>
+                        </div>
+                    </div>
+                </td>
+            </tr>
+            </tbody>
+            <tbody>
+            <tr class="pager-row">
+                <td colspan="10">
+                    <div>
+                        显示&nbsp;{{(seekListData.number - 1 ) * seekListData.size + 1}}-{{seekListData.number * seekListData.size}}&nbsp;条,共&nbsp;{{seekListData.totalElements}}&nbsp;条
+                    </div>
+                </td>
+            </tr>
+            </tbody>
+        </table>
+    </div>
+    <div class="com-del-box" ng-if="showUseFlag">
+        <div class="title">
+            <i ng-click="setShowUseFlag(false)"></i>
+        </div>
+        <div class="content">
+            <p><i class="fa fa-exclamation-circle"></i>是否要采纳此报价?</p>
+            <div class="remind-line"><i class="red-text">*</i>点击【确认】后默认终止该求购</div>
+            <div class="input-line"><i class="red-text">*</i>采购数量&nbsp;<input type="number" placeholder="请输入采购数量" class="form-control" ng-model="purchaseQuantity"></div>
+            <div class="btn-line">
+                <a ng-click="setShowUseFlag(false)">取消</a>
+                <a ng-click="adopt()">确认</a>
+            </div>
+        </div>
+    </div>
+</div>