代码拉取完成,页面将自动刷新
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:replace="common/header::common_head"></head>
<link rel="stylesheet" href="../bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<link href="../dist/css/datePicker.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
<title>销售单</title>
<style>
table, td, th
{
border:1px ;
text-align: center;
}
th
{
font-size:1.1em;
}
td
{
height:50px;
}
.calendar-item {
position: absolute;
cols: 3;
rows: 1;
height: 27px;
width: 100px;
padding-left: 10px;
border: 1px solid #ccc;
border-radius: 2px;
}
</style>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<div th:replace="common/LeftCommon::common_top_left"></div>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<div>
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
销售单
</h1>
<ol class="breadcrumb">
<li><a href="/index"><i class="fa fa-dashboard"></i> 首页</a></li>
<li><a href="#">采购</a></li>
<li class="active">销售单</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="col-md-3">
<!--左上方导航-->
<div class="box box-primary">
<div class="box-header">
<ul class="nav nav-pills">
<li class="active"><a href="#all" data-toggle="tab">默认</a></li>
<li><a href="#draft" data-toggle="tab">草稿</a></li>
<li><a href="#ready-sold" data-toggle="tab">已出售</a></li>
<li><a href="#ready-revoke" data-toggle="tab">已撤销</a></li>
<li><a href="#ready-outgoing" data-toggle="tab">待出库</a></li>
<li><a href="#partial-outgoing" data-toggle="tab">部分出库</a></li>
</ul>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse">
<i class="fa fa-plus"></i>
</button>
</div><!-- /.box-tools -->
</div>
<form>
<div class="box-body">
<!-- Date range -->
<div class="form-group">
<!--日期选择-->
<div class="form-group">
<label>日期</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<textarea class="calendar-item" id="start"></textarea>
<p style="position: absolute;margin-left:120px;font-size: 1.2em">至</p>
<textarea style="margin-left:161px;" class="calendar-item" id="end"></textarea>
</div>
</div>
<!-- select -->
<div class="form-group">
<label>销售员</label>
<select class="form-control select2">
<option>全部</option>
<option></option>
</select>
</div>
<div class="form-group">
<label>客户</label>
<select class="form-control select2">
<option>全部</option>
<option></option>
</select>
</div>
<!--快递单号选择-->
<div class="form-group">
<label>快递单号</label>
<input type="text" class="form-control">
</div>
<!-- /.input group -->
<label>单号</label>
<div class="input-group input-group-sm">
<input type="text" class="form-control">
<span class="input-group-btn">
<button type="button" class="btn btn-info btn-flat">查询</button>
</span>
</div>
<!-- /.input group -->
</div>
<!-- /.form group -->
</div>
<!-- /.box-body -->
</form>
</div>
<!--左下方表格-->
<div class="box">
<div class="box-header with-border">
</div>
<!-- /.box-header -->
<form>
<div class="box-body">
<div class="tab-content">
<div class="tab-pane active" id="all">
<table class="table table-bordered">
<tr>
<th>供应商名称</th>
<th>日期</th>
<th style="width: 40px">状态</th>
<th>打印次数</th>
</tr>
<tr>
<td>1</td>
<td>2019-05-17 16:11</td>
<td><span class="badge bg-green">已经盘点</span></td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>2019-05-17 16:12</td>
<td><span class="badge bg-yellow">草稿</span></td>
<td>1</td>
</tr>
<tr>
<td>3</td>
<td>2019-05-17 16:11</td>
<td><span class="badge bg-default">已经盘点</span></td>
<td>1</td>
</tr>
</table>
</div>
<div class="tab-pane" id="draft">
<table class="table table-bordered">
<tr>
<th>供应商名称</th>
<th>日期</th>
<th style="width: 40px">状态</th>
<th>打印次数</th>
</tr>
<tr>
<td>1</td>
<td>2019-05-17 16:12</td>
<td><span class="badge bg-yellow">草稿</span></td>
<td>1</td>
</tr>
</table>
</div>
<div class="tab-pane" id="ready-sold">
<table class="table table-bordered">
<tr>
<th>供应商名称</th>
<th>日期</th>
<th style="width: 40px">状态</th>
<th>打印次数</th>
</tr>
<tr>
<td>1</td>
<td>2019-05-17 16:11</td>
<td><span class="badge bg-green">已经盘点</span></td>
<td>1</td>
</tr>
</table>
</div>
<div class="tab-pane" id="ready-outgoing">
<table class="table table-bordered">
<tr>
<th>供应商名称</th>
<th>日期</th>
<th style="width: 40px">状态</th>
<th>打印次数</th>
</tr>
<tr>
<td>1</td>
<td>2019-05-17 16:11</td>
<td><span class="badge bg-default">已经盘点</span></td>
<td>1</td>
</tr>
</table>
</div>
<div class="tab-pane" id="partial-outgoing">
<table class="table table-bordered">
<tr>
<th>供应商名称</th>
<th>日期</th>
<th style="width: 40px">状态</th>
<th>打印次数</th>
</tr>
<tr>
<td>1</td>
<td>2019-05-17 16:11</td>
<td><span class="badge bg-green">已经盘点</span></td>
<td>1</td>
</tr>
</table>
</div>
<div class="tab-pane" id="ready-revoke">
<table class="table table-bordered">
<tr>
<th>供应商名称</th>
<th>日期</th>
<th style="width: 40px">状态</th>
<th>打印次数</th>
</tr>
<tr>
<td>1</td>
<td>2019-05-17 16:11</td>
<td><span class="badge bg-default">已经盘点</span></td>
<td>1</td>
</tr>
</table>
</div>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer clearfix">
<ul class="pagination pagination-sm no-margin pull-right">
<li><a href="#">«</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">»</a></li>
</ul>
</div>
</form>
</div>
<!-- /.box -->
</div>
<div class="col-md-9">
<div class="box">
<div class="box-header">
<h2 class="box-title">采购单 </h2>
<div style="float: right ;margin-right:8px">
<button type="button" class="btn btn-block btn-info">
<扫码></扫码>
</button>
</div>
<div style="float: right ;margin-right:8px">
<button type="button" class="btn btn-info"><a href="/purchase/list" style="color: white">新增采购单</a></button>
</div>
</div>
<hr/>
<!-- /.box-header -->
<div class="box-body">
<span style="font-size: 1.3em">尚欠供应商款:</span>
<!--<span style="font-size: 2.5em;color: red;" th:text="¥+${amount}"></span>-->
<span style="font-size: 1.3em"> 积分:
<strong class="text-danger">
<span></span>
</strong>
</span>
<span style="font-size: 1.3em">手机号 : </span>
<div class="form-group" style="padding-top: 20px">
<label style="color: red;margin-left: 10px;float: left">*</label><label style="float: left">客户:</label>
<select id="supplier" class="form-control" style="width: 200px;float: left;margin-left: 10px;margin-top: -5px">
<option>== 请选择 ==</option>
<option th:each="supplier:${supplier}" th:text="${supplier.name}"></option>
</select>
<label style="color: red;margin-left: 10px;float: left">*</label><label style="float: left">仓库:</label>
<select id="store" class="form-control" style="width: 200px;float: left;margin-left: 10px;margin-top: -5px">
<option>== 请选择 ==</option>
<option th:each="store : ${storeHouse}" th:text="${store.storeName}"></option>
</select>
<label style="margin-left: 100px">日期:</label><textarea style="margin-left: 10px;height:34px" class="calendar-item" id="center"></textarea>
</div>
<div class="form-group" style="padding-left: auto;padding-top: 30px">
<label style="margin-left: 10px;">备注:</label><input id="remark" type="text" style="width: 40%;margin-left: 10px;height:34px">
</div>
<!--发货方式-->
<div class="form-group" style="padding-left: auto;padding-top: 20px">
<b>发货方式: </b>
<span >自提</span>
<!-- 设置发货方式 -->
<div>
<div class="form-inline base-line" style="line-height: 45px;">
<div>
发货方式:
<select class="form-control" style="">
<option value="1">自提</option>
<option value="2">送指定点</option>
<option value="3">送车</option>
<option value="4">发物流</option>
<option value="5">电子面单</option>
</select>
</div>
</div>
<!--送指定点-->
<div class="form-group" style="padding-top: 20px">
<div style="display: inline-block;width:25%;">
<label style="margin-left: 10px;">说明: </label><input class="form-control" style="width: 220px" placeholder="请填写配送说明...">
</div>
<div style="display: inline-block;width:25%;">
<label style="margin-left: 10px;">联系人:</label><input class="form-control" style="width: 120px">
</div>
<div style="display: inline-block;width:25%;">
<label style="margin-left: 10px;">联系电话: </label><input class="form-control" style="width: 120px">
</div>
</div>
</div>
</div>
<div class="col-md-6 col-md-offset-3">
<div class="form-group">
<label>请选择你要采购的商品</label>
<select class="form-control select2" style="width: 100%;" id="goodsOption" >
<option style='display: none'></option>
<option th:each="goods:${good}" th:text="${goods.name}" th:value="${goods.barCode}"></option>
</select>
</div>
</div>
<table id="mainTable" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>商品</th>
<th>货号</th>
<th>条码</th>
<th>颜色</th>
<th>尺码</th>
<th>数量</th>
<th>单价</th>
<th>折扣(%)</th>
<th>折后价</th>
<th>金额</th>
<th>折后金额</th>
</tr>
</thead>
<tbody >
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</section>
<!-- /.content -->
</div>
</div>
<!-- /.content-wrapper -->
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version</b> 2.4.0
</div>
<strong>Copyright © 2014-2016 <a href="https://adminlte.io">Almsaeed Studio</a>.</strong> All rights
reserved.
</footer>
<aside class="control-sidebar control-sidebar-dark">
<!-- Create the tabs -->
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
<li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
<li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<!-- Home tab content -->
<div class="tab-pane" id="control-sidebar-home-tab">
<h3 class="control-sidebar-heading">Recent Activity</h3>
<ul class="control-sidebar-menu">
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-birthday-cake bg-red"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Langdon's Birthday</h4>
<p>Will be 23 on April 24th</p>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-user bg-yellow"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>
<p>New phone +1(800)555-1234</p>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-envelope-o bg-light-blue"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>
<p>nora@example.com</p>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-file-code-o bg-green"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>
<p>Execution time 5 seconds</p>
</div>
</a>
</li>
</ul>
<!-- /.control-sidebar-menu -->
<h3 class="control-sidebar-heading">Tasks Progress</h3>
<ul class="control-sidebar-menu">
<li>
<a href="javascript:void(0)">
<h4 class="control-sidebar-subheading">
Custom Template Design
<span class="label label-danger pull-right">70%</span>
</h4>
<div class="progress progress-xxs">
<div class="progress-bar progress-bar-danger" style="width: 70%"></div>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<h4 class="control-sidebar-subheading">
Update Resume
<span class="label label-success pull-right">95%</span>
</h4>
<div class="progress progress-xxs">
<div class="progress-bar progress-bar-success" style="width: 95%"></div>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<h4 class="control-sidebar-subheading">
Laravel Integration
<span class="label label-warning pull-right">50%</span>
</h4>
<div class="progress progress-xxs">
<div class="progress-bar progress-bar-warning" style="width: 50%"></div>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<h4 class="control-sidebar-subheading">
Back End Framework
<span class="label label-primary pull-right">68%</span>
</h4>
<div class="progress progress-xxs">
<div class="progress-bar progress-bar-primary" style="width: 68%"></div>
</div>
</a>
</li>
</ul>
<!-- /.control-sidebar-menu -->
</div>
<!-- /.tab-pane -->
<!-- Stats tab content -->
<div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
<!-- /.tab-pane -->
<!-- Settings tab content -->
<div class="tab-pane" id="control-sidebar-settings-tab">
<form method="post">
<h3 class="control-sidebar-heading">General Settings</h3>
<div class="form-group">
<label class="control-sidebar-subheading">
Report panel usage
<input type="checkbox" class="pull-right" checked>
</label>
<p>
Some information about this general settings option
</p>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Allow mail redirect
<input type="checkbox" class="pull-right" checked>
</label>
<p>
Other sets of options are available
</p>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Expose author name in posts
<input type="checkbox" class="pull-right" checked>
</label>
<p>
Allow the user to show his name in blog posts
</p>
</div>
<!-- /.form-group -->
<h3 class="control-sidebar-heading">Chat Settings</h3>
<div class="form-group">
<label class="control-sidebar-subheading">
Show me as online
<input type="checkbox" class="pull-right" checked>
</label>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Turn off notifications
<input type="checkbox" class="pull-right">
</label>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Delete chat history
<a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
</label>
</div>
<!-- /.form-group -->
</form>
</div>
<!-- /.tab-pane -->
</div>
</aside>
<div class="control-sidebar-bg"></div>
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel" id="myModal">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="gridSystemModalLabel"></h4>
</div>
<div class="modal-body">
<table id="twoDisTable" class="table table-bordered table-condensed" cellspacing="0" width="100%">
<thead>
<tr id="mTh">
<th></th>
</tr>
</thead>
<tbody id="myBody">
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="twoDisTableSubmit">提交</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
<!-- ./wrapper -->
<!-- jQuery 3 -->
<script src="../../bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Select2 -->
<script src="../../bower_components/select2/dist/js/select2.full.min.js"></script>
<!-- InputMask -->
<script src="../../plugins/input-mask/jquery.inputmask.js"></script>
<script src="../../plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="../../plugins/input-mask/jquery.inputmask.extensions.js"></script>
<!-- date-range-picker -->
<script src="../../bower_components/moment/min/moment.min.js"></script>
<script src="../../bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
<!-- bootstrap datepicker -->
<!-- bootstrap color picker -->
<!-- bootstrap time picker -->
<script src="../../plugins/timepicker/bootstrap-timepicker.min.js"></script>
<!-- SlimScroll -->
<script src="../../bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- iCheck 1.0.1 -->
<script src="../../plugins/iCheck/icheck.min.js"></script>
<!-- FastClick -->
<script src="../../bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>
<!-- DataTables -->
<script src="../../bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="../../bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<!-- FastClick -->
<!-- page script -->
<script src="../../dist/js/datePicker.js"></script>
<script type="text/javascript">
Calendar.create({
classN: 'calendar-item',
callBack: function (bindElem, dateObj) {
bindElem.innerHTML = dateObj.year + '-' + dateObj.month + '-' + dateObj.date;
}
})
//只能输入数字金额,且限定为2位
var precapital;
document.querySelector('.capital').addEventListener('focus', function() {
if (this.value == '0.00') {
this.value = '';
} else {
this.value = this.value.replace(/\.00/, '').replace(/(\.\d)0/,'$1');
}
precapital = this.value;
});
document.querySelector('.capital').addEventListener('keyup', function() {
this.value = this.value.replace(/^[\.]/, '').replace(/[^\d.]/g, '');
if (this.value.split(".").length - 1 > 1) {
this.value = precapital;
}
precapital = this.value;
});
document.querySelector('.capital').addEventListener('blur', function() {
this.value = this.value.replace(/[\.]$/, '');
this.value = this.value.replace(/(.*)\.([\d]{2})(\d*)/g,'$1.$2');
this.value = Number(this.value).toFixed(2);
var logNum = this.value.toString();
if(logNum.match(/\./g) != null){
integerNum = parseInt(logNum).toString().replace(/\d(?=(\d{3})+$)/g,'$&,');
decimalNum = '.' + logNum.replace(/(.*)\.(.*)/g,'$2');
document.querySelector(".logbox").innerHTML = integerNum+decimalNum;
}else{
document.querySelector(".logbox").innerHTML = logNum.replace(/\d(?=(\d{3})+$)/g,'$&,');
}
});
</script>
<script>
//商品对应尺寸
var currentSizes =[];
//商品对应颜色
var currentColors = [];
//二维输入表格
var twoDisTable;
//调拨表格
var mainTable;
//左边表格
var leftTable;
//选中的商品条码
var selectBarCode;
//调拨单表单
var dataForm;
$('.select2').select2();
$(function(){
$("#goodsOption").change(function () {
if(twoDisTable!=null){
//重置
twoDisTable.destroy();
twoDisTable=null;
$("#mTh th").remove();
$("#mTh").append("<th></th>")
$("#myBody tr").remove();
}
var barCode = $(this ).val();
if(!barCode){//判断是否为空{}
alert("商品条码为空");
return false;
}
//显示商品名字
var text = $('#goodsOption option:selected').text();
$("#gridSystemModalLabel").text(text);
$.ajax({
type:"GET",
url:"/requisition_note/getGoodsInfo",
data: {
barCode:barCode
},
success:function (response) {
var data = response.data;
selectBarCode = data.barCode
currentSizes = data.sizes;
currentColors = data.colors;
if(currentSizes.length == 0){
alert("商品没有可用的尺码!");
return false;
}
if(currentColors.length == 0){
alert("商品没有可用的颜色!");
return false;
}
var sizeThTemp = "";
var colorBodyTemp = "";
//构建颜色
$.each(currentColors,function (index,value) {
colorBodyTemp +="<tr><td>"+value.name+"</td>";
for (i = 0 ; i<currentSizes.length ; i++ ){
//使用中间量 使字符串对象可以有特殊符号如""
var temp = "<td><input type= \"number\" style=\"width:100%\" align=\"right\" min='1' name =\"setNumber\"></td>";
colorBodyTemp+=temp;
}
colorBodyTemp+="</tr>";
});
//构建尺码
$.each(currentSizes,function (i,v) {
var temp = "<th class=\"text-center\">"+v.name+"</th>";
sizeThTemp +=temp
});
$("#myBody").append(colorBodyTemp);
$("#mTh").append(sizeThTemp);
//二维输入表格 在Ajax 结束前重置表格
twoDisTable = $('#twoDisTable').DataTable({
searching: false,
bLengthChange: false,
paging:false,
ordering: false
});
//显示二维选择表格
$("#myModal").modal('show');
}
})
return 0;
})
})
//生成调拨单
$(function () {
$("#twoDisTableSubmit").click(function () {
var orderDTO;
var goods = new Array();
var temp = 0;
var data = twoDisTable.$("input").toArray();
for(i = 0 ; i<currentColors.length ; i++){
var color = currentColors[i];
for(j = 0 ; j<currentSizes.length;j++){
var size = currentSizes[j];
if(data[temp].value !=""){
var good = {
sizeId : size.id,
colorId : color.id,
sizeName:size.name,
colorName:color.name,
goodQuantity : data[temp].value
};
goods.push(good);
}
temp++;
}
}
orderDTO ={
openid:"fdasdasfsadfsdaurn",
goodsBarCode:selectBarCode,
orderDetailList:goods
}
if(mainTable!=null){
//重置
mainTable.destroy();
mainTable=null;
}
mainTable = $('#mainTable').DataTable({
'paging' : true,
'lengthChange': false,
'searching' : true,
'ordering' : true,
'info' : true,
'autoWidth' : false,
"scrollY": 200,
"scrollX": true,
ajax:{
"url":"/requisition_note/purchase",
"type":"post",
"contentType" : "application/json",
"data": function () {
return JSON.stringify( orderDTO );
},
"dataType":"json",
"dataSrc":function (result) {
if(result.msg=="success"){
alert("成功生成调拨单在表格中,没有库存的已经发送信息给指定账户进行补货,请确定。" +
"如果表格没有商品说明选择调拨的商品都没有仓库可以调拨。")
$("#myModal").modal('hide');
dataForm = result.data.valueOf();
return result.data;
}else {
alert(result.msg);
window.location.reload();
}
}
},
"columns": [
{ "data": "orderMaster.goodsName" },
{ "data": "orderDetail.goodId" },
{ "data": "orderMaster.goodsBarCode" },
{ "data": "orderDetail.colorName" },
{ "data": "orderDetail.sizeName"},
{ "data": "orderDetail.goodQuantity"},
{ "data": "orderDetail.goodPrice"},
{ "data": "orderDetail.discount"},
{ "data": "orderDetail.goodPrice" * "orderDetail.discount"},
{ "data": "orderDetail.goodPrice" * "orderDetail.goodQuantity"},
{ "data": "orderDetail.goodPrice" * "orderDetail.goodQuantity" * "orderDetail.discount"}
]
});
return 0;
});
})
$("#submitForm").click(function () {
if(dataForm.length != 0){
$.ajax({
url:"/requisition_note/determine",
type:"POST",
contentType :"application/json",
data :JSON.stringify( dataForm ),
dataType:"json",
success:function (result) {
if(result.code==1){
alert("已经申请调拨和进行补货");
window.location.reload();
}else {
alert(result.msg);
}
},
})
}else {
alert("无可以保存的商品单");
}
})
$("#submitDraft").click(function () {
if(dataForm.length != 0){
$.ajax({
url:"/requisition_note/draft",
type:"POST",
contentType :"application/json",
data :JSON.stringify( dataForm ),
dataType:"json",
success:function (result) {
if(result.code==1){
alert("已经存入草稿");
window.location.reload();
}else {
alert(result.msg);
}
},
})
}else {
alert("无可以保存的商品单");
}
})
//点击表格触发触发事件
$('#leftTable tbody').on('click', 'tr', function () {
var table = $('#leftTable').DataTable();
var data = table.row( this ).data();
var orderId = data[0];
alert(orderId);
} );
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。