Files
echart/inc/plansetup.php
simonandClaude Opus 4.7 eedead0d41 feat: 全面代码更新 - ECharts 5.4.2 重构、新增量化分析模块、前端库升级
- 升级 ECharts 到 5.4.2,重构 lib/ 目录结构
- 新增 DataTables 2.x 和 FixedColumns 插件
- 新增 quant/ 宏观研究报告模块
- 重构图表页面:stock_trend、hkholdbycode 等采用 JS fetch API.doorcome.cn 模式
- 新增 CLAUDE.md 补充页面文档和新数据流说明
- 更新 inc/config.php TuShare API 配置
- 更新新闻联播分析模块 news/ 和相关研究报告 research/
- 新增 api_document/ 参考文档
- 清理 .gitignore,排除 uploads/xls/.mcp.json/ source maps 等非代码文件
- 所有 PHP 文件通过 php -l 语法检查

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 18:01:55 +08:00

111 lines
4.0 KiB
PHP

<?php
ob_start();
include_once "../include/config.inc.php"; //Include config file;
$db = new ora();
$title="计划设置";
include_once "head.php"; //include head file
echo $hr;
$t = 1; //initial type to 1;
if($_REQUEST['doSubmit']) bom_op($_REQUEST['t']); //operate when submit
if($_REQUEST['bomid'] and !$_REQUEST['doSubmit']) {
$bom = bom_data_by_id();
$_REQUEST["bom"] = $bom['BOMNAME'];
$_REQUEST["bomid"] = $bom['BOMID'];
$_REQUEST["bomnote"] = $bom['FNOTE'];
$_REQUEST["flowid"] = $bom['FLOWID'];
$_REQUEST["ver"] = $bom['VER'];
$t = 0;
}
?>
<link rel="stylesheet" href="../lib/layui/css/layui.min.css">
<div id="mainContent">
<h2><?php echo $title; ?></h2>
<form name="formhead" id="formhead" method="post" enctype="multipart/form-data" >
<div class="layui-inline">
<input type="file" id="file" name="file" class="layui-btn">
</div>
<div class="layui-inline">
<button type="button" class="layui-btn" id="btnUpload">
<i class="layui-icon">&#xe67c;</i>EXCEL上传验证
</button>
</div>
</form>
<form name="form2" id="form2" method="post" >
<div class="stay_center" id="fblock" style="display: none">
<div style="margin-top:10px;" id="ftext" class="layui-col-md12"></div>
<input type="hidden" name="fpath" id="fpath" value="">
<div class="layui-inline">
<input type="button" id="btnExcel" value="处理上传文件" class="layui-btn">
</div>
</div>
</form>
<script type="text/javascript">
$(function () {
$("#btnUpload").click(function () {
console.log("Upload button clicked!");
var formData = new FormData($('#formhead')[0]);
$.ajax({
type: 'post',
url: "http://192.168.10.21/cimv2/cim/bom/upload.php", //上传文件的请求路径必须是绝对路劲
data: formData,
cache: false,
processData: false,
contentType: false,
}).success(function (data) {
afterUpload(data);
}).error(function () {
alert("上传失败");
});
});
});
function afterUpload(data){
var arr = $.parseJSON(data);
if(arr['status']!=1) {
alert(arr.msg);
return false;
}
$("#file").val(''); //set input(file) to null
$("#fblock").css("display","block");
$("#ftext").html("文件上传成功!点击下面按钮开始执行<br />"+arr['fpath']+"<br />");
$("#fpath").val(arr['fpath']);
}
$(function () {
$("#btnExcel").click(function () {
console.log("Process excel button clicked!");
$("#btnExcel").attr("disabled",true);
console.log("Button disabled!");
var formData = new FormData($('#form2')[0]);
$.ajax({
type: 'post',
url: "http://192.168.10.21/cimv2/cim/bom/excel.php", //上传文件的请求路径必须是绝对路劲
data: formData,
cache: false,
processData: false,
contentType: false,
}).success(function (data) {
excelProcess(data);
$("#btnExcel").attr("disabled",false);
console.log("Button enabled!");
console.log("Done everything!");
}).error(function () {
alert("处理失败");
});
});
});
function excelProcess(data){
console.log("Excel data upload successful!");
console.log(data);
var arr = $.parseJSON(data);
var htmlmsg;
for(i = 0;i < arr.msg.length;i++) htmlmsg += arr['msg'][i];
console.log("htmlmsg proceed!");
$("#ftext").html(htmlmsg);
}
</script>
</div>
<?php
include_once "foot.php";
?>