<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('中药代煎需求单表新增')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-role-add">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                            <label class="col-sm-3 control-label">创建人:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="createdBy" id="createdBy" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">创建日期:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="createdDate" id="createdDate" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">需求单号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="demandOrderNumber" id="demandOrderNumber" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">第三方订单ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="thirdOrderId" id="thirdOrderId" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">平台用户ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="platformUserId" id="platformUserId" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">业务ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="businessId" id="businessId" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">下单人:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="orderer" id="orderer" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">下单人手机号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="ordererPhone" id="ordererPhone" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">收货人:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="consignee" id="consignee" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">加密收货人:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="encryptedConsignee" id="encryptedConsignee" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">加密收货人手机号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="encryptedConsigneePhone" id="encryptedConsigneePhone" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">收货人手机号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="consigneePhone" id="consigneePhone" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">连锁公司名称:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="chainCompanyName" id="chainCompanyName" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">存储ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="storageId" id="storageId" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">是否保存:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="isSaved" id="isSaved" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">处方图片:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="prescriptionImage" id="prescriptionImage" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">药品剂量:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="medicineDosage" id="medicineDosage" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">煎药方式:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="decoctionMethod" id="decoctionMethod" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">下单门店:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="orderStore" id="orderStore" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">提交时间:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="submitTime" id="submitTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">取消时间:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="cancelTime" id="cancelTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">支付时间:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="paymentTime" id="paymentTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">订单状态：1待录方，2待付款，3已完成，4已取消:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="orderStatus" id="orderStatus" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">备注:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="remarks" id="remarks" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                </div>
            </div>

        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">

    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }

    function add() {
           var createdBy = $("input[name='createdBy']").val();
           var createdDate = $("input[name='createdDate']").val();
           var demandOrderNumber = $("input[name='demandOrderNumber']").val();
           var thirdOrderId = $("input[name='thirdOrderId']").val();
           var platformUserId = $("input[name='platformUserId']").val();
           var businessId = $("input[name='businessId']").val();
           var orderer = $("input[name='orderer']").val();
           var ordererPhone = $("input[name='ordererPhone']").val();
           var consignee = $("input[name='consignee']").val();
           var encryptedConsignee = $("input[name='encryptedConsignee']").val();
           var encryptedConsigneePhone = $("input[name='encryptedConsigneePhone']").val();
           var consigneePhone = $("input[name='consigneePhone']").val();
           var chainCompanyName = $("input[name='chainCompanyName']").val();
           var storageId = $("input[name='storageId']").val();
           var isSaved = $("input[name='isSaved']").val();
           var prescriptionImage = $("input[name='prescriptionImage']").val();
           var medicineDosage = $("input[name='medicineDosage']").val();
           var decoctionMethod = $("input[name='decoctionMethod']").val();
           var orderStore = $("input[name='orderStore']").val();
           var submitTime = $("input[name='submitTime']").val();
           var cancelTime = $("input[name='cancelTime']").val();
           var paymentTime = $("input[name='paymentTime']").val();
           var orderStatus = $("input[name='orderStatus']").val();
           var remarks = $("input[name='remarks']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "ypdg/sypdgchinesedecoctionst/sYpdgChineseDecoctionstAdd",
            data : {
                "createdBy": createdBy,
                "createdDate": createdDate,
                "demandOrderNumber": demandOrderNumber,
                "thirdOrderId": thirdOrderId,
                "platformUserId": platformUserId,
                "businessId": businessId,
                "orderer": orderer,
                "ordererPhone": ordererPhone,
                "consignee": consignee,
                "encryptedConsignee": encryptedConsignee,
                "encryptedConsigneePhone": encryptedConsigneePhone,
                "consigneePhone": consigneePhone,
                "chainCompanyName": chainCompanyName,
                "storageId": storageId,
                "isSaved": isSaved,
                "prescriptionImage": prescriptionImage,
                "medicineDosage": medicineDosage,
                "decoctionMethod": decoctionMethod,
                "orderStore": orderStore,
                "submitTime": submitTime,
                "cancelTime": cancelTime,
                "paymentTime": paymentTime,
                "orderStatus": orderStatus,
                "remarks": remarks,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
