/*
 * The Hefei Ceshi RDC(Research and Development Centre) Group.
 * __________________
 *
 *    Copyright 2015-2019
 *    All Rights Reserved.
 *
 *    NOTICE:  All information contained herein is, and remains
 *    the property of Ceshi Company and its suppliers,
 *    if any.
 */

/**
 *
 * @author BOGON
 * @version 1.0
 */
var TENDER_STATUS_CONST = {
    0: {val: 0, title: '新建', color: '<span style="color: red;">新建</span>'},
    1: {val: 1, title: '发布待确认', color: '<span style="color: red;">发布待确认</span>'},
    2: {val: 2, title: '已发布', color: '<span style="color: green;">已发布</span>'},
    3: {val: 3, title: '已截止', color: '<span style="color: red;">已截止</span>'},
    4: {val: 4, title: '已开标', color: '<span style="color: red;">已开标</span>'},
    5: {val: 5, title: '已定标', color: '<span style="color: cornflowerblue;">已定标</span>'},
    6: {val: 6, title: '定标审批中', color: '<span style="color: red;">定标审批中</span>'},
    7: {val: 7, title: '主管审批中', color: '<span style="color: red;">主管审批中</span>'},
    8: {val: 8, title: '总监审批中', color: '<span style="color: red;">总监审批中</span>'},
    9: {val: 9, title: '已完成', color: '<span style="color: green;">已完成</span>'},
    97: {val: 97, title: '定标驳回', color: '<span style="color: red;">定标驳回</span>'},
    98: {val: 98, title: '发布驳回', color: '<span style="color: red;">发布驳回</span>'},
    99: {val: 99, title: '已作废', color: '<span style="color: grey;">已作废</span>'}
};

var APPROV_STATUS = {
    0: {val: 0, title: '审批中', color: '<span style="color: red;">审批中</span>'},
    /**
     * 已发布
     */
    1: {val: 1, title: '已通过', color: '<span style="color: green;">已通过</span>'},
    2: {val: 2, title: '已驳回', color: '<span style="color: orangered;">已驳回</span>'}
}

var OA_APPROV_STATUS = {
    '': {val: '', title: '', color: ''},
    0: {val: 0, title: '', color: ''},
    1: {val: 1, title: '审批中', color: '<span style="color: red;">审批中</span>'},
    /**
     * 已发布
     */
    2: {val: 2, title: '已通过', color: '<span style="color: green;">已通过</span>'},
    3: {val: 3, title: '已驳回', color: '<span style="color: orangered;">已驳回</span>'}
}

var OPEN_BID_STATUS = {
    0: {val: 0, title: '初始化', color: '<span style="color: #404e80;">初始化</span>'},
    1: {val: 1, title: '待确认', color: '<span style="color: #372bff;">待确认</span>'},
    /**
     * 已发布
     */
    2: {val: 2, title: '已确认', color: '<span style="color: green;">已确认</span>'},
    3: {val: 3, title: '已驳回', color: '<span style="color: orangered;">已驳回</span>'}
}
var BID_STATUS_CONST = {
    0: {val: 0, title: '已创建', color: '<span style="color: red;">待确认</span>'},
    1: {val: 1, title: '已接受', color: '<span style="color: green;">已同意</span>'},
    2: {val: 2, title: '保证金缴纳中', color: '<span style="color: #0e21b3;">保证金缴纳中</span>'},
    3: {val: 3, title: '投标中', color: '<span style="color: #0e21b3;">投标中</span>'},
    4: {val: 4, title: '已投标', color: '<span style="color: green;">已投标</span>'},
    5: {val: 5, title: '议价中', color: '<span style="color: orangered;">议价中</span>'},
    6: {val: 6, title: '不参加', color: '<span style="color: orangered;">不参加</span>'},
    7: {val: 7, title: '已作废', color: '<span style="color: grey;">已作废</span>'},
    8: {val: 8, title: '保证金确认中', color: '<span style="color: goldenrod;">保证金确认中</span>'},
    9: {val: 9, title: '已发布', color: '<span style="color: red;">已发布</span>'},
    10: {val: 10, title: '已中标', color: '<span style="color: darkgreen;">已中标</span>'},
    11: {val: 11, title: '未中标', color: '<span style="color: red;">未中标</span>'}
};
var ATTACHMENT_TYPE = {
    1: {val: 1, title: '招标单技术文件', color: '<span style="color: green;">技术标文件</span>'},
    2: {val: 2, title: '招标单商务文件', color: '<span style="color: green;">商务标附件</span>'},
    3: {val: 3, title: '投标技术文件', color: '<span style="color: green;">技术文件</span>'},
    4: {val: 4, title: '投标商务文件', color: '<span style="color: green;">商务文件</span>'},
    5: {val: 5, title: '报价Excel附件', color: '<span style="color: green;">报价Excel附件</span>'},
    6: {val: 6, title: '报价PDF盖章附件', color: '<span style="color: green;">报价PDF盖章附件</span>'}
}
var BARGAINING_STATUS = {
    1: {val: 1, title: '议价中', color: '<span style="color: red;">议价中</span>'},
    2: {val: 2, title: '已回复', color: '<span style="color: green;">已回复</span>'},
    3: {val: 3, title: '已截止', color: '<span style="color: grey;">已截止</span>'}
}

function getTenderStatusOption() {
    var options = [];
    for (var key in TENDER_STATUS_CONST) {
        var tmp = {};
        tmp.value = TENDER_STATUS_CONST[key].val + "";
        tmp.txt = TENDER_STATUS_CONST[key].title;
        options.push(tmp);
    }
    return options;
}

function getBidStatusOption() {
    var options = [];
    options.push({value: '', txt: '请选择'});
    for (var key in BID_STATUS_CONST) {
        var tmp = {};
        tmp.value = BID_STATUS_CONST[key].val + "";
        tmp.txt = BID_STATUS_CONST[key].title;
        options.push(tmp);
    }
    return options;
}
