<!DOCTYPE html>
<html>
<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;
        }
        .changeBtn{
            color:#53c3fe;
            cursor:pointer;
        }
    </style>
</head>
<body>
<div class="base-extend">
    <ol class="breadcrumb">
        <li>销售合同管理</li>
        <li>变更合同</li>
    </ol>

    <div class="detailContentBox">
        <div class="businessNavigation">
            <ul></ul>
        </div>
        <!-- 查看历史消息部分 -->
        <div class="projectManagementTop">
            <div class="newTabAddUpdateBox" style="border:none;"></div>
        </div>

        <div class="projectManagementBottom">
            <p class="detailContentBox-title">变更合同</p>
            <form class="form-horizontal" id="contractEntryForm" autocomplete="off">
                <input type="hidden" name="taskId" th:value="${taskId}">
                <input type="hidden" name="businessKey" th:value="${businessKey}">
                <input type="hidden" name="salesContractSupplementInfoId" th:value="${salesContractChangeVo?.salesContractSupplementInfo?.id}">

                <div class="newTabAddUpdateBox">
                    <div class="row">
                        <table>
                            <tr>
                                <td width="15%">
                                    <span class="required_fileds_star">是否需要审核</span>：
                                </td>
                                <td colspan="3" class="enter hasradio">
                                    <label>
                                        <input type="radio" class="radios" value="1" name="approval" th:checked="${salesContractChangeVo?.salesContractSupplementInfo?.approval} == 1">
                                        <span>是</span>
                                    </label>
                                    <label>
                                        <input type="radio" class="radios" value="0" name="approval" th:checked="${salesContractChangeVo?.salesContractSupplementInfo?.approval} == 0">
                                        <span>否</span>
                                    </label>
                                </td>
                            </tr>
                            <tr class="approvalChange">
                                <td width="15%">
                                    <span class="required_fileds_star">是否新增货物</span>：
                                </td>
                                <td colspan="3" class="enter hasradio">
                                    <label>
                                        <input type="radio" class="radios" value="1" name="addGoods" th:checked="${salesContractChangeVo?.salesContractSupplementInfo?.addGoods} == 1">
                                        <span>是</span>
                                    </label>
                                    <label>
                                        <input type="radio" class="radios" value="0" name="addGoods" th:checked="${salesContractChangeVo?.salesContractSupplementInfo?.addGoods} == 0">
                                        <span>否</span>
                                    </label>
                                </td>
                            </tr>
                            <tr class="approvalChange">
                                <td width="15%">
                                    <span class="required_fileds_star">补充合同编号</span>：
                                </td>
                                <td colspan="3" class="enter">
                                    <input type="text" name="supplementContractNumber" th:value="${salesContractChangeVo?.salesContractSupplementInfo?.supplementContractNumber}" class="form-control" maxlength="50">
                                </td>
                            </tr>
                        </table>
                    </div>

                    <div class="row">
                        <!-- 附件信息回显 -->
                        <div class="fileInfoListOriginal" style="display:none"
                             th:each="file,files:${salesContractChangeVo?.fileList}">
                            <input type="text" class="originalId" th:value="${file?.id}">
                            <input type="text" class="originalUrl" th:value="${file?.path}">
                            <input type="text" class="originalType" th:value="${file?.fileType}">
                            <input type="text" class="originalName" th:value="${file?.originalName}">
                            <input type="text" class="originalSize" th:value="${file?.size}">
                        </div>
                        <table class="fileInfoListBox">
                            <tr>
                                <td colspan="3">
                                    <span class="detailContentBox-tabletitle">合同文件</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">
                                    <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>
                            <tr>
                                <td width="15%">
                                    <span>说明</span>：
                                </td>
                                <td colspan="3" class="enter">
                                    <input type="text" name="remark" th:value="${salesContractChangeVo?.salesContractSupplementInfo?.remark}" class="form-control">
                                </td>
                            </tr>
                        </table>
                    </div>

                    <div class="row addGoodsChange">
                        <table class="goodsTable">
                            <tr>
                                <td colspan="10">
                                    <span class="detailContentBox-tabletitle">货物信息</span>
                                    <span id="addGoods" class="colorbtn btn" style="float: right;margin-left: 5px">
                                        添加
                                    </span>
                                    <span id="importButton" class="colorbtn btn" style="float: right;margin-left: 5px">
                                        模板导入
                                    </span>
                                    <span id="downloadFileTemp" class="colorbtn btn" style="float: right;">
                                        下载模板
                                    </span>
                                    <input type="file" accept="xls, .xlsx, .excel" id="importFile" style="display: none">

                                </td>
                            </tr>
                            <tr>
                                <td width="5%">
                                    <span>编号</span>
                                </td>
                                <td width="10%">
                                    <span>名称</span>
                                </td>
                                <td width="10%">
                                    <span>厂家</span>
                                </td>
                                <td width="10%">
                                    <span>型号</span>
                                </td>
                                <td width="10%">
                                    <span>单位</span>
                                </td>
                                <td width="10%">
                                    <span>数量</span>
                                </td>
                                <td width="10%">
                                    <span>是否明确单价</span>
                                </td>
                                <td width="10%">
                                    <span>销售单价</span>
                                </td>
                                <td width="14%">
                                    <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" class="form-control validInput">
                                    <span class="error" style="display:none;">请填写名称</span>
                                </td>
                                <td width="10%" style="background-color:#fff;" class="enter">
                                    <input type="text" class="form-control validInput">
                                    <span class="error" style="display:none;">请填写厂家</span>
                                </td>
                                <td width="10%" style="background-color:#fff;" class="enter">
                                    <input type="text" class="form-control validInput">
                                    <span class="error" style="display:none;">请填写型号</span>
                                </td>
                                <td width="10%" style="background-color:#fff;" class="enter">
                                    <input type="text" class="form-control validInput">
                                    <span class="error" style="display:none;">请填写单位</span>
                                </td>
                                <td width="10%" style="background-color:#fff;" class="enter">
                                    <input  type="text" class="form-control validInput">
                                    <span class="error" style="display:none;">请填写数量</span>
                                </td>
                                <td width="10%" style="background-color:#fff;" class="enter">
                                    <select class="form-control validInput definePrice">
                                        <option value="">请选择</option>
                                        <option value="0">否</option>
                                        <option value="1">是</option>
                                    </select>
                                    <span class="error" style="display:none;">请选择是否明确单价</span>
                                </td>
                                <td width="10%" style="background-color:#fff;" class="enter">
                                    <input type="text" oninput="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)" class="form-control validInput">
                                    <span class="error" style="display:none;">请填写单价</span>
                                </td>
                                <td width="14%" style="background-color:#fff;" class="enter">
                                    <input type="text" class="form-control">
                                </td>
                                <td width="10%" style="background-color:#fff;">
    <!--                                <span class="negativeInformationPlus">+添加</span>-->
                                    <span class="negativeInformationReduce">-删除</span>
                                </td>
                            </tr>
                            <tbody class="goodsListTable">
                                <tr class="goodsListTbody goodsListTbodyBack" th:each="goods,goodsStat:${salesContractChangeVo?.goodsInfoList }">
                                    <td width="5%" style="background-color:#fff;">
                                        <span th:text="${goodsStat.count}"></span>
                                    </td>
                                    <td width="10%" style="background-color:#fff;" class="enter">
                                        <input type="text" class="form-control validInput" th:value="${goods?.goodsName}">
                                        <span class="error" style="display:none;">请填写名称</span>
                                    </td>
                                    <td width="10%" style="background-color:#fff;" class="enter">
                                        <input type="text" class="form-control validInput" th:value="${goods?.goodsFactory}">
                                        <span class="error" style="display:none;">请填写厂家</span>
                                    </td>
                                    <td width="10%" style="background-color:#fff;" class="enter">
                                        <input type="text" class="form-control validInput" th:value="${goods?.modelNumber}">
                                        <span class="error" style="display:none;">请填写型号</span>
                                    </td>
                                    <td width="10%" style="background-color:#fff;" class="enter">
                                        <input type="text" class="form-control validInput" th:value="${goods?.units}">
                                        <span class="error" style="display:none;">请填写单位</span>
                                    </td>
                                    <td width="10%" style="background-color:#fff;" class="enter">
                                        <!-- type="number" min="0" -->
                                        <input type="text"  class="form-control validInput" th:value="${goods?.quantity}">
                                        <span class="error" style="display:none;">请填写数量</span>
                                    </td>
                                    <td width="10%" style="background-color:#fff;" class="enter">
                                        <select class="form-control validInput definePrice">
                                            <option value="">请选择</option>
                                            <option value="0" th:selected="${goods?.clearPrice==0}">否</option>
                                            <option value="1" th:selected="${goods?.clearPrice==1}">是</option>
                                        </select>
                                        <span class="error" style="display:none;">请选择是否明确单价</span>
                                    </td>
                                    <td width="10%" style="background-color:#fff;" class="enter">
                                        <input type="text" oninput="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)" class="form-control validInput" th:value="${goods?.salesPrice}">
                                        <span class="error" style="display:none;">请填写单价</span>
                                    </td>
                                    <td width="14%" style="background-color:#fff;" class="enter">
                                        <input type="text" class="form-control" th:value="${goods?.remark}">
                                    </td>
                                    <td width="10%" style="background-color:#fff;">
                                       <!-- <span class="negativeInformationPlus">+添加</span> -->
                                        <span class="negativeInformationReduce">-删除</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>

                </div>
                <div class="yk_addBtns yk_addNewMsg newTabAddUpdateBtnBox" >
                    <button class="btn btn-white btn-info colorbtn submitBusiness">提交</button>
                    <button class="btn btn-white btn-info btn-cancel">关闭</button>
                </div>
            </form>
        </div>

    </div>
</div>
<script src="/js/base/uploadFile.js"></script>
<script src="/js/salesContractManage/contractChange.js"></script>
<script src="/js/salesContractManage/searchHistory.js"></script>
</body>
</html>
