<!--{include file="<!--{$salepath}-->public/header.tpl"}-->
	<body>
		<form class="layui-form column-content-detail">
					<div class="layui-tab">
						
						<div class="layui-tab-content">
							<div class="layui-tab-item layui-show">
                                                            <input type="hidden" name="opmode" value="<!--{$opmode}-->">                                                          
                                                            <!--{if $opmode=='edit'}-->
                                                             <input type="hidden" id="id" name="id" value="<!--{$vo.id}-->">
                                                            <!--{/if}-->
 								<div class="layui-form-item">
									<label class="layui-form-label">供应商编号：</label>
									<div class="layui-input-block">
                                                                            <input type="text" name="supplier_number" required lay-verify="required" placeholder="请输入编号" autocomplete="off" class="layui-input" value="<!--{$number}-->">
									</div>
								</div>                                                           
								<div class="layui-form-item">
									<label class="layui-form-label">供应商名称：</label>
									<div class="layui-input-block">
										<input type="text" name="supplier_name" required lay-verify="required" placeholder="请输入供应商名称" autocomplete="off" class="layui-input" value="<!--{$vo.supplier_name}-->">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">联系人：</label>
									<div class="layui-input-block">
										<input type="text" name="supplier_link" required lay-verify="required" placeholder="请输入联系人" autocomplete="off" class="layui-input" value="<!--{$vo.supplier_link}-->">
									</div>
								</div>
                                                            	<div class="layui-form-item">
									<label class="layui-form-label">手机号：</label>
									<div class="layui-input-block">
										<input type="text" name="supplier_phone" required lay-verify="required" placeholder="请输入手机号" autocomplete="off" class="layui-input" value="<!--{$vo.supplier_phone}-->">
									</div>
								</div>
                                                                <div class="layui-form-item">
                                                            		<label class="layui-form-label">地址：</label>
									<div class="layui-input-block">
										<input type="text" name="address" required lay-verify="required" placeholder="请输入供应商地址" autocomplete="off" class="layui-input" value="<!--{$vo.address}-->">
									</div>
								</div>
                                                                <div class="layui-form-item">
									<label class="layui-form-label">预付款：</label>
									<div class="layui-input-block">
										<input type="number" name="supplier_money" required lay-verify="required" placeholder="供应商预付款" autocomplete="off" class="layui-input" value="<!--{$vo.supplier_money}-->">
									</div>
								</div>
                                                                <div class="layui-form-item">
									<label class="layui-form-label">供应商描述：</label>
									<div class="layui-input-block">
										<textarea placeholder="请输入对供应商的描述" class="layui-textarea" name="supplier_desc"><!--{$vo.supplier_desc}--></textarea>
									</div>
								</div>                                  
							</div>
						</div>
					</div>
					<div class="layui-form-item" style="padding-left: 10px;">
						<div class="layui-input-block">
							<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">立即提交</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>
				</form>
	
		
		<script src="<!--{$salepath}-->static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="<!--{$salepath}-->static/js/common.js" type="text/javascript" charset="utf-8"></script>
                <script src="<!--{$salepath}-->static/js/jquery-3.2.1.js" type="text/javascript" charset="utf-8"></script>
                 <script type="text/javascript">
                  			layui.use(['form', 'layedit', 'laydate'], function() {
				var form = layui.form(),
					layer = layui.layer;
				form.on('submit(formDemo)', function(data) {   
                                            $.ajax({
                                                type: 'POST',
                                                url:"sale.php?c=Supplier&a=save",
                                                async:true,
                                                data:data.field,
                                                dataType : "json",
                                                success:function(data){
                                                      if(data.code=='1'){                                                           
                                                            layer.msg(data.msg);
                                                            setTimeout(function(){
                                                                    parent.location.reload(true);
                                                                    layer.closeAll();
                                                              //  document.frames("iframe7").location.reload(true); 
                                                              //  parent.location.reload(true);
                                                               // window.frames["iframe7"].location.reload();
                                                              //     layer.closeAll();
                                                            }, 1500);
                                                      }
                                                      return false;
                                                },
                                                error:function(e){
                                                       return false;
                                                }
                                            });
                                          
					return false;
				});

			});
			
		</script>
	</body>
</html>
