提交 3cbcb56a 编写于 作者: doc_wei's avatar doc_wei

删除销售订单统筹的代码

上级 56a4aabb
// 销售订单统筹
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'laydate'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
laydate = layui.laydate;
var beanTemplate = $("#beanTemplate").html();
showGrid({
id: "showForm",
url: flowableBasePath + "erpcommon001",
params: {rowId: parent.rowId},
pagination: false,
template: beanTemplate,
ajaxSendAfter:function (json) {
// 销售订单状态
$("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType));
laydate.render({elem: '#lateDesignTime', type: 'datetime', min: json.bean.operTime, trigger: 'click'});
laydate.render({elem: '#latePurchaseTime', type: 'datetime', min: json.bean.operTime, trigger: 'click'});
laydate.render({elem: '#lateProduceTime', type: 'datetime', min: json.bean.operTime, trigger: 'click'});
laydate.render({elem: '#lateQualityTime', type: 'datetime',min: json.bean.operTime, trigger: 'click'});
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function(data) {
if(winui.verifyForm(data.elem)) {
var params = {
rowId: parent.rowId,
lateDesignTime: $("#lateDesignTime").val(),
latePurchaseTime: $("#latePurchaseTime").val(),
lateProduceTime: $("#lateProduceTime").val(),
lateQualityTime: $("#lateQualityTime").val()
};
AjaxPostUtil.request({url: flowableBasePath + "erpordersaleoverplan002", params: params, type: 'json', callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
});
\ No newline at end of file
var rowId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
laydate = layui.laydate,
table = layui.table;
laydate.render({elem: '#operTime', range: '~'});
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'erpordersaleoverplan001',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'defaultNumber', title: '单据编号', align: 'left', width: 200, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.defaultNumber + '</a>';
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120},
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
{ field: 'createTime', title: '单据录入日期', align: 'center', width: 140 },
{ field: 'status', title: '统筹状态', align: 'center', width: 80, templet: function (d) {
if(d.state == '1'){
return "<span class='state-down'>未统筹</span>";
} else if (d.state == '2'){
return "<span class='state-up'>已统筹</span>";
} else {
return "参数错误";
}
}},
{ field: 'overPlanName', title: '统筹人', align: 'left', width: 130},
{ field: 'overPlanTime', title: '统筹日期', align: 'center', width: 140 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'overPlan') { //统筹
overPlan(data);
} else if (layEvent === 'details') { //详情
details(data);
}
});
// 详情
function details(data) {
rowId = data.orderId;
_openNewWindows({
url: "../../tpl/salesOrder/salesOrderDetails.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "salesOrderDetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 统筹
function overPlan(data) {
rowId = data.orderId;
_openNewWindows({
url: "../../tpl/salesOrderOverPlan/salesOrderOverPlan.html",
title: '统筹',
pageId: "salesOrderOverPlan",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
$("body").on("click", "#reloadTable", function() {
loadTable();
});
// 搜索表单
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
refreshTable();
}
return false;
});
// 刷新
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
// 搜索
function refreshTable(){
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()})
}
function getTableParams() {
// 单据的开始时间、结束时间
var startTime = "", endTime = "";
if(isNull($("#operTime").val())) {//一定要记得,当createTime为空时
startTime = "";
endTime = "";
}else {
startTime = $("#operTime").val().split('~')[0].trim() + ' 00:00:00';
endTime = $("#operTime").val().split('~')[1].trim() + ' 23:59:59';
}
return {
defaultNumber: $("#defaultNumber").val(),
state: $("#state").val(),
startTime: startTime,
endTime: endTime
};
}
exports('salesOrderOverPlanList', {});
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="detail-title">
{{companyName}} - 销售订单统筹
</span><hr>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户</label>
<div class="layui-input-block ver-center">
{{supplierName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">单据日期</label>
<div class="layui-input-block ver-center">
{{operTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">单据编号</label>
<div class="layui-input-block ver-center">
{{defaultNumber}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">状态</label>
<div class="layui-input-block ver-center" id="statusName">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">操作人</label>
<div class="layui-input-block ver-center">
{{operPersonName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">录入日期</label>
<div class="layui-input-block ver-center">
{{createTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">是否需要统筹</label>
<div class="layui-input-block ver-center">
{{needOverPlan}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">结算账户</label>
<div class="layui-input-block ver-center">
{{accountName}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">收款类型</label>
<div class="layui-input-block ver-center">
{{payType}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">金额合计</label>
<div class="layui-input-block ver-center">
{{totalPrice}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">价税合计</label>
<div class="layui-input-block ver-center">
{{taxLastMoneyPrice}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">备注</label>
<div class="layui-input-block ver-center">
{{remark}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">优惠率%</label>
<div class="layui-input-block ver-center">
{{discount}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">优惠金额</label>
<div class="layui-input-block ver-center">
{{discountMoney}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">优惠后金额</label>
<div class="layui-input-block ver-center">
{{discountLastMoney}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">收款金额</label>
<div class="layui-input-block ver-center">
{{changeAmount}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">本次欠款</label>
<div class="layui-input-block ver-center">
{{arrears}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">销售人员</label>
<div class="layui-input-block ver-center">
{{salesMan}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">其他费用</label>
<div class="layui-input-block">
<table class="layui-table">
<thead>
<tr>
<th style="width: 120px;">支出项目</th>
<th id="otherPriceTotal" style="width: 120px;">费用合计{{otherMoney}}</th>
</tr>
</thead>
<tbody id="otherPriceTable" class="insurance-table">
{{#each otherMoneyList}}
<tr>
<td>{{name}}</td>
<td>{{otherPrice}}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">审批信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">审批意见</label>
<div class="layui-input-block ver-center">
{{statusContent}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">完成信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">单据完成日期</label>
<div class="layui-input-block ver-center">
{{realComplateTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">统筹信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">设计部最迟完成时间<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="lateDesignTime" name="lateDesignTime" win-verify="required" placeholder="请选择日期" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">采购最迟到货时间<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="latePurchaseTime" name="latePurchaseTime" win-verify="required" placeholder="请选择日期" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">生产最迟完成时间<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="lateProduceTime" name="lateProduceTime" win-verify="required" placeholder="请选择日期" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">质检最迟完成时间<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="lateQualityTime" name="lateQualityTime" win-verify="required" placeholder="请选择日期" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formAddBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/salesOrderOverPlan/'}).use('salesOrderOverPlan');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">单据编号</label>
<div class="layui-input-inline">
<input type="text" id="defaultNumber" name="defaultNumber" placeholder="请输入单据编号" class="layui-input" />
</div>
<label class="layui-form-label">单据日期</label>
<div class="layui-input-inline">
<input type="text" id="operTime" name="operTime" placeholder="请选择单据日期" class="layui-input" />
</div>
<label class="layui-form-label">统筹状态</label>
<div class="layui-input-inline">
<select id="state">
<option value="">全部</option>
<option value="1">未统筹</option>
<option value="2">已统筹</option>
</select>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(d.state == 1 && auth('1616851016286')) { }}
<a class="layui-btn layui-btn-xs" lay-event="overPlan">统筹</a>
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/salesOrderOverPlan/'}).use('salesOrderOverPlanList');
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册