<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>验收单管理-添加验收单</title>
    <link rel="stylesheet" type="text/css" href="/css/external/fileUploadBase.css">
    <style>
        .btn-info:active,
        .btn-info:focus {
            background-color: #fff;
        }

        li.notcompanyli:hover {
            color: #333 !important;
        }

        .base-extend .newTabAddUpdateBox td.enter .viewDetailWord {
            width: 0.75rem;
            text-align: center;
            top: 0.1rem;
            color: #333 !important;
            cursor: default;
            font-style: normal;
        }
        .base-extend .newTabAddUpdateBox td.enter .prevDetailWord {
            width: 0.85rem;
            text-align: center;
            top: 0.1rem;
            color: #333 !important;
            cursor: default;
            font-style: normal;
        }
        .error option, select.error{
            color: #333!important;
        }
        input::-webkit-outer-spin-button,
        input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            appearance: none;
            margin: 0;
        }
        .chooseGoodsTable td {
            border-left: 1px solid #E8F0F3;
            border-top: 1px solid #E8F0F3;
            padding: 0.1rem;
            text-align: left;
            background-color: #F0F9FC;
            font-size: 0.12rem;
            color: #333;
            min-height: 0.34rem;
            word-break: break-all;
            position: relative;
        }
        .emptyData {
            float: right;
            cursor: pointer;
            color: #169bd5;
            line-height: 30px;
            margin-left: 5px;
        }
        xm-select > .xm-label.single-row {
            position: relative;
        }
        xm-select > .xm-label .scroll .label-content {
            flex-wrap: wrap;
        }
        xm-select {
            min-height: 0.4rem;
        }
    </style>
</head>
<body>
<div class="base-extend">
    <div class="modal fade businessDialog" id="myModal-chooseGoods" data-backdrop="static">
        <div class="modal-dialog" style="width:10.5rem;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true" style="font-size:0.18rem">×</span><span class="sr-only">关闭</span>
                </button>
                <span class="modal-title">选择货物</span>
            </div>
            <div class="modal-content" style="max-height:4.7rem;overflow-y:auto;overflow-x:hidden;">
                <div class="listBackBox" style="padding-top:0;">
                    <div class="projectTableBox" id="formForProjectListBox" style="margin:0;">
                        <div class="customerMarketingList formForProjectList col-xs-12 businessTable"
                             style="left:0;padding:0.1rem 0.2rem 0 0.2rem;" tipword="">
                            <p class="detailContentBox-title">可选货物 <span style="color: red;font-size: 12px">【说明：货物来源为采购合同，如无可选，请变更采购合同后再做验收】</span></p>
                            <table id="chooseGoodsList" class="tablebox" style="width: 100%;"></table>
                            <div id="chooseGoodsListPage" class="tablepagebox"></div>
                            <p class="detailContentBox-title" style="margin-top: 20px;display: none">已选货物</p>
                            <table class="chooseGoodsTable" style="width: 100%!important;display: none">
                                <tr>
                                    <td width="5%">
                                        <span style="color: #656565;font-weight: 700">编号</span>
                                    </td>
                                    <td width="14%">
                                        <span style="color: #656565;font-weight: 700">名称</span>
                                    </td>
                                    <td width="14%">
                                        <span style="color: #656565;font-weight: 700">厂家</span>
                                    </td>
                                    <td width="14%">
                                        <span style="color: #656565;font-weight: 700">型号</span>
                                    </td>
                                    <td width="13%">
                                        <span style="color: #656565;font-weight: 700">单位</span>
                                    </td>
                                    <td width="13%">
                                        <span style="color: #656565;font-weight: 700">数量</span>
                                    </td>
                                    <td width="13%">
                                        <span style="color: #656565;font-weight: 700">销售单价</span>
                                    </td>
                                    <td width="10%">
                                        <span style="color: #656565;font-weight: 700">操作</span>
                                    </td>
                                </tr>
                                <tbody class="choosedGoodsList">

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-default btn-white btn-info colorbtn chooseSure" style='margin-bottom:0;'>确定
                </button>
                <button class="btn btn-default btn-white btn-info" data-dismiss="modal" style='margin-bottom:0;'>取消
                </button>
            </div>
        </div>
    </div>
    <ol class="breadcrumb">
        <i class="icon-chevron-sign-left newBackBtn"></i>
        <li>验收单管理</li>
        <li>添加验收单</li>
    </ol>
    <div class="detailContentBox">
        <p class="detailContentBox-title">添加验收单</p>
        <form class="form-horizontal" id="entryForm" autocomplete="off">
            <input type="hidden" name="basicId" th:value="${acceptanceBasicInfo?.id}">
            <div class="newTabAddUpdateBox">
                <div class="row">
                    <table>
                        <tr>
                            <td colspan="4">
                                <span class="detailContentBox-tabletitle">下游验收信息</span>
                            </td>
                        </tr>
                        <tr>
                            <td width="15%">
                                <span class="required_fileds_star">供应商名称</span>：
                            </td>
                            <td width="35%" class="enter">
                                <select name="supplierName" class="form-control">
                                    <option th:each="supplier,supplierStat:${suppliers}" th:value="${supplier?.id}" th:text="${supplier?.enterpriseName}"></option>
                                </select>
                            </td>
                            <td width="15%">
                                <span class="required_fileds_star">核心企业名称</span>：
                            </td>
                            <td width="35%" class="enter">
                                <select name="enterpriseName" class="form-control">
                                    <option th:each="supplier,supplierStat:${acceptanceBasicInfo?.suppliers}" th:value="${supplier?.id}" th:text="${supplier?.enterpriseName}"></option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td width="15%">
                                <span class="required_fileds_star">业务名称</span>：
                            </td>
                            <!-- <td width="35%" class="enter">
                                <select name="businessName" class="form-control">
                                    <option value=""></option>
                                </select>
                            </td> -->
                            <td width="35%" class="enter">
                                <ul class="allBusinessName" style="display:none;"></ul>
                                <input type="text" readOnly name="businessName" id="businessName" class="form-control">
                                <div class="entCustomerListBox busListBox" style="position:absolute !important;z-index:999;background-color: #fff;border: 1px solid #ccc;box-shadow: 0px 0px 2px 2px rgba(62, 192, 230,0.3);display:none;">
                                    <input type="text" class="form-control" style="margin:0.05rem auto;width:97%;border-color: #5AC4FC;box-shadow: inset 0 1px 1px rgba(90,196,252,.075), 0 0 8px rgba(90,196,252,.6);" placeholder="可输入关键词查询">
                                    <button class="btn btn-info btn-white colorbtn searchBus" style="position:absolute;right:0;top:0.05rem;height:0.34rem;width:0.3rem;text-align:center;padding-left:0;padding-right:0;">查</button>
                                    <ul style="overflow:auto;"></ul>
                                </div>
                                <input type="hidden" id="businessNameId">
                            </td>
                            <td width="15%">
                                <span class="required_fileds_star">业务编号</span>：
                            </td>
                            <td width="35%" class="enter">
                                <input type="hidden" name="businessNoId" readonly>
                                <input type="text" name="businessNo" readonly class="form-control">
                            </td>
                            <!-- <td width="15%">
                                <span class="required_fileds_star">收货单位名称</span>：
                            </td>
                            <td width="35%" class="enter">
                                <input type="text" name="receivingUnit" class="form-control" th:value="${acceptanceBasicInfo?.receivingUnit}">
                            </td>
                            <td width="15%">
                                <span class="required_fileds_star">经办人姓名</span>：
                            </td>
                            <td width="35%" class="enter">
                                <input type="text" name="managerName" class="form-control" th:value="${acceptanceBasicInfo?.managerName}">
                            </td> -->
                        </tr>
                        <tr>
                            <td width="15%">
                                <span class="required_fileds_star">贸易平台</span>：
                            </td>
                            <td width="35%" class="enter">
                                <input type="hidden" readonly name="tradingPlatformId" >
                                <input type="text" readonly name="platformName" th:value="${acceptanceBasicInfo?.platform}" class="form-control">
                            </td>
                            <td width="15%">
                                <span class="required_fileds_star">预估结算日期</span>：
                            </td>
                            <td width="35%" class="enter">
                                <input type="text" name="expectedSettlementDate" readonly class="form-control">
                            </td>
                        </tr>
                        <!-- <tr>
                            <td width="15%">
                                <span class="required_fileds_star">验收日期</span>：
                            </td>
                            <td width="35%" class="enter">
                                <input type="text" name="acceptanceDate" readonly class="form-control">
                            </td>
                            <td width="15%">
                                <span class="required_fileds_star">预估结算日期</span>：
                            </td>
                            <td width="35%" class="enter">
                                <input type="text" name="expectedSettlementDate" readonly class="form-control">
                            </td>
                        </tr> -->
                    </table>
                </div>

                <div class="row">
                    <table>
                        <tr>
                            <td colspan="2">
                                <span class="detailContentBox-tabletitle">签署确认(关于下游验收单请选择是否需要签署确认)</span>
                            </td>
                        </tr>
                        <tr class="">
                            <td width="15%">
                                <span class="required_fileds_star">签署确认</span>：
                            </td>
                            <td class="enter hasradio">
                                <label>
                                    <input type="radio" class="radios" value="1" name="sign">
                                    <span>是</span>
                                </label>
                                <label>
                                    <input type="radio" class="radios" value="0" name="sign">
                                    <span>否</span>
                                </label>
                            </td>
                        </tr>
                        <tr class="hide specification">
                            <td width="15%">
                                <span class="approvalCommentTitle">特别说明</span>：
                            </td>
                            <td width="85%" class="enter">
                                <textarea type="text" class="form-control" maxlength="500" name="approvalComment" readonly></textarea>
                            </td>
                        </tr>
                    </table>
                </div>

                <div class="row">
                    <table class="personalTable">
                        <tr>
                            <td colspan="4">
                                <span class="detailContentBox-tabletitle">人员信息</span>
                                <span id="personalAdd" class="colorbtn btn" style="float: right;margin-right: 5px;display: none;">添加</span>
                            </td>
                        </tr>
                        <tr class="operatorChange">
                            <td width="20%">
                                <span class="required_fileds_star">验收人（核心企业）变更</span>：
                            </td>
                            <td class="enter hasradio" colspan="4">
                                <label>
                                    <input type="radio" class="radios" value="1" name="operator">
                                    <span>是</span>
                                </label>
                                <label>
                                    <input type="radio" class="radios" value="0" name="operator">
                                    <span>否</span>
                                </label>
                            </td>
                        </tr>
                        <tr>
                            <td width="25%">
                                <span>类型</span>
                            </td>
                            <td width="25%">
                                <span>姓名</span>
                            </td>
                            <!-- <td width="20%">
                                <span>证件类型</span>
                            </td>
                            <td width="20%">
                                <span>证件号码</span>
                            </td> -->
                            <td width="25%">
                                <span>联系方式</span>
                            </td>
                            <td width="25%">
                                <span>操作</span>
                            </td>
                        </tr>
                        <tr class="personalListTbody" style="display: none ;">
                            <td width="25%" style="background-color:#fff;">
                                <!-- <input type="text" name="type" class="form-control type"  style="background-color:#fff;" readonly> -->
                                <select class="form-control type validInput" name="type" placeholder="请选择类型">
                                    <option value="">请选择</option>
                                    <option value="验收经办人（供应商）">验收经办人（供应商）</option>
                                    <option value="验收经办人（核心企业）">验收经办人（核心企业）</option>
                                </select>
                                <span class="error" style="display:none;font-size:0.12rem;">请选择类型</span>
                            </td>
                            <td width="25%" style="background-color:#fff;" class="enter">
                                <input type="text" name="name" maxlength="500" class="form-control name">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入姓名</span>
                            </td>
                            <!-- <td width="20%" style="background-color:#fff;">
                                <input type="text" name="cardType" class="form-control cardType" style="background-color:#fff;" readonly>
                                <span class="error" style="display:none;font-size:0.12rem;">请选择证件类型</span>
                            </td>
                            <td width="25%" style="background-color:#fff;" class="enter">
                                <input type="text" name="socialCreditCode" maxlength="500" class="form-control socialCreditCode">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入证件号码</span>
                            </td> -->
                            <td width="25%" style="background-color:#fff;" class="enter">
                                <input type="text" name="mobile" maxlength="500" class="form-control mobile">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入联系方式</span>
                            </td>
                            <td width="25%" style="background-color:#fff;" class="eTrandHide">
                                <span class="negativeInformationReduce" style="margin-right: 1.5rem;">删除</span>
                                <input type="radio" name="radio" value="0" class="radios hide" th:id="${personalTerm?.id}">
                            </td>
                        </tr>
                        <tbody class="personalListTable">

                        </tbody>
                    </table>
                </div>

                <div class="row">
                    <table>
                        <tr>
                            <td colspan="2">
                                <span class="detailContentBox-tabletitle">合作平台</span>
                            </td>
                        </tr>
                        <tr class="">
                            <td width="15%">
                                <span class="required_fileds_star">是否为钢小二</span>：
                            </td>
                            <td class="enter hasradio">
                                <label>
                                    <input type="radio" class="radios" value="1" name="steelWaiter" >
                                    <span>是</span>
                                </label>
                                <label>
                                    <input type="radio" class="radios" value="0" name="steelWaiter">
                                    <span>否</span>
                                </label>
                            </td>
                        </tr>
                        <tr class="steelWaiterChange hide">
                            <td width="15%">
                                <span class="required_fileds_star">销售单号</span>：
                            </td>
                            <td class="enter">
                                <div class="selectDemo" style="width: 100%;"></div>
                            </td>
                        </tr>
                    </table>
                </div>

                <div class="row hide cargoInformation">
                    <table class="goodsTable">
                        <tr>
                            <td colspan="10">
                                <span class="detailContentBox-tabletitle">下游验收货物信息</span>
                                <div class="emptyData">清空</div>
                                <div  style="float: right;">
                                    <input type="file" name="file" class="fileGoodsInput" style="display:none">
                                    <div id="downstreamGoodsTem" class="colorbtn btn" style="margin-left: 5px">
                                        模板导入
                                    </div>
                                </div>
                                <div  style="float: right;">
                                    <div id="downloadFileTemp" class="colorbtn btn" >
                                        下载模板
                                    </div>
                                </div>
                                <div  style="float: right;margin-right: 5px ">
                                    <div id="downloadFoods" class="colorbtn btn" >
                                        下载货物
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td width="5%">
                                <span>序号</span>
                            </td>
                            <td width="10%">
                                <span>名称</span>
                            </td>
                            <td width="10%">
                                <span>材质</span>
                            </td>
                            <td width="13%">
                                <span>型号</span>
                            </td>
                            <td width="10%">
                                <span>厂家</span>
                            </td>
                            <td width="10%">
                                <span>单位</span>
                            </td>
                            <td width="7%">
                                <span>数量</span>
                            </td>
                            <td width="10%">
                                <span>销售单价</span>
                            </td>
                            <td width="15%">
                                <span>验收日期</span>
                            </td>
                            <td width="10%">
                                <span>操作</span>
                            </td>
                        </tr>
                        <tr class="goodsListTbody" style="display: none">
                            <td width="5%" style="background-color:#fff;">
                                <span>1</span>
                            </td>
                            <td width="10%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsName" maxlength="50" readonly class="form-control goodsName">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入名称</span>
                            </td>
                            <td width="10%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsMaterial" maxlength="50" readonly class="form-control goodsMaterial">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入材质</span>
                            </td>
                            <td width="13%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsType" maxlength="50" readonly class="form-control goodsType">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入型号</span>
                            </td>
                            <td width="10%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsFactory" maxlength="50" readonly class="form-control goodsFactory">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入厂家</span>
                            </td>

                            <td width="10%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsUnit" maxlength="50" readonly class="form-control goodsUnit">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入单位</span>
                            </td>
                            <td width="7%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsQuantity" readonly class="form-control goodsQuantity">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入数量</span>
                            </td>
                            <td width="10%" style="background-color:#fff;" class="enter">
                                <input type="text" name="salesPrice" readonly class="form-control ">
                                <!-- <span class="error" style="display:none;font-size:0.12rem;">请输入销售单价</span> -->
                            </td>
                            <td width="15%" style="background-color:#fff;" class="enter">
                                <input type="text" name="acceptanceDate" readonly class="form-control acceptanceDate">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入验收日期</span>
                            </td>
                            <td width="10%" style="background-color:#fff;">
                                <span class="negativeInformationReduce">-删除</span>
                            </td>
                        </tr>
                        <tbody class="goodsListTable">

                        </tbody>
                        <tr>
                            <td style="background-color:#fff;" colspan="10">
                                数量合计:
                                <span class="totalNum"></span>
                                销售总价合计：
                                <span class="totalPrice"></span>
                            </td>
                        </tr>
                    </table>
                </div>

                <!-- <div class="row">
                    <table class="goodsTable">
                        <tr>
                            <td colspan="7">
                                <span class="detailContentBox-tabletitle">业务相关货物信息</span>
                                <span id="chooseButton" class="colorbtn btn" style="float: right;">
                                    选择货物
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td width="10%">
                                <span>编号</span>
                            </td>
                            <td width="20%">
                                <span>名称</span>
                            </td>
                            <td width="20%">
                                <span>厂家</span>
                            </td>
                            <td width="15%">
                                <span>型号</span>
                            </td>
                            <td width="12%">
                                <span>单位</span>
                            </td>
                            <td width="13%">
                                <span>数量</span>
                            </td>
                            <td width="10%">
                                <span>操作</span>
                            </td>
                        </tr>
                        <tr class="goodsListTbody" style="display: none">
                            <td width="10%" style="background-color:#fff;">
                                <span>1</span>
                            </td>
                            <td width="20%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsName" maxlength="50" readonly class="form-control goodsName">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入名称</span>
                            </td>
                            <td width="20%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsFactory" maxlength="50" readonly class="form-control goodsFactory">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入厂家</span>
                            </td>
                            <td width="15%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsType" maxlength="50" readonly class="form-control goodsType">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入型号</span>
                            </td>
                            <td width="12%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsUnit" maxlength="50" readonly class="form-control goodsUnit">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入单位</span>
                            </td>
                            <td width="13%" style="background-color:#fff;" class="enter">
                                <input type="text" name="goodsNum" class="form-control goodsNum">
                                <span class="error" style="display:none;font-size:0.12rem;">请输入数量</span>
                            </td>
                            <td width="10%" style="background-color:#fff;">
                                <span class="negativeInformationReduce">-删除</span>
                            </td>
                        </tr>
                        <tbody class="goodsListTable">

                        </tbody>
                    </table>
                </div> -->

                <div class="row fileStorage">
                    <table class="fileInfoListBox">
                        <tr>
                            <td colspan="3">
                                <span class="detailContentBox-tabletitle">下游验收文件(文件格式限定：图片（jpg，png，jpeg，bmp）、PDF、EXCEL)</span>
                            </td>
                        </tr>
                        <tr>
                            <td width="15%">
                                <span class="required_fileds_star">验收单附件</span>：
                            </td>
                            <td  class="enter addFileList">
                                <input type="file" name="file" class="fileinput" multiple style="display:none" accept="image/bmp,image/png,image/jpeg,image/jpg,application/pdf,xls, .xlsx, .excel">
                                <div class="uploaderFile">
                                    <div class="fileContent">
                                        <span class="spanHolder">上传附件</span>
                                    </div>
                                </div>
                                <span class="error" style="display:none;">请上传验收单文件</span>
                            </td>
                            <td width="13%" class="choiceFile" style="text-align:center;">
                                +上传附件
                            </td>
                        </tr>
                    </table>
                </div>

                <div class="row supplementFiles">
                    <table class="fileInfoListBox">
                        <tr>
                            <td colspan="4">
                                <span class="detailContentBox-tabletitle">补充说明</span>
                            </td>
                        </tr>
                        <tr>
                            <td width="15%">
                                <span class="explanation">补充说明</span>：
                            </td>
                            <td colspan="3" class="enter">
                                <textarea name="additionalRemarks" class="form-control" maxlength="500" style="resize:none;padding:0.05rem;padding-left:0.1rem !important;"></textarea>
                                <span class="error illustrate" style="display:none;">请输入补充说明</span>
                            </td>
                        </tr>
                        <tr>
                            <td width="15%">
                                <span class="explanationFile">补充说明附件</span>：
                            </td>
                            <td colspan="2" class="enter addFileList">
                                <input type="file" name="additional" class="fileinput" multiple style="display:none">
                                <div class="uploaderFile">
                                    <div class="fileContent">
                                        <span class="spanHolder">上传附件</span>
                                    </div>
                                </div>
                                <span class="error" style="display:none;">请上传补充说明附件</span>
                            </td>
                            <td width="13%" class="choiceFile" style="text-align:center;">
                                +上传附件
                            </td>
                        </tr>
                    </table>
                </div>

                <div class="row yk_addNewMsg downLoad hide">
                    <button class="btn btn-white btn-info colorbtn downLoadFile">
                        预览上游验收单
                    </button>
                </div>
            </div>
            <div class="yk_addBtns yk_addNewMsg newTabAddUpdateBtnBox">
                <button class="btn btn-white btn-info colorbtn submitTemSave">暂存</button>
                <button class="btn btn-white btn-info colorbtn submitBusiness">提交</button>
                <button class="btn btn-white btn-info btn-cancel">关闭</button>
            </div>
        </form>
    </div>
</div>
</body>
<script src="/js/base/uploadFile.js"></script>
<script src="/js/acceptanceManage/entry.js"></script>
<script src="/js/acceptanceManage/xm-select.js"></script>
</html>
