feat: SRM排程承诺导入(不触发断线重算)+ ParseExcelDate 兼容日期格式
This commit is contained in:
1 parent
5b3f1eb9d7
commit
de4516ab5d
2 files changed
+179
No files matched your search
@@ -110,6 +110,8 @@ tbody tr:hover{background:#f0f6ff}
|
||||
<button class="btn btn-blue" onclick="downloadBatchArrivalTpl()">📄 到货计划模板</button>
|
||||
<button class="btn btn-outline" onclick="document.getElementById('batchArrivalFile').click()">📥 导入到货计划</button>
|
||||
<input type="file" id="batchArrivalFile" accept=".xls,.xlsx" style="display:none" onchange="importBatchArrivalExcel(this)">
|
||||
<button class="btn btn-green" onclick="document.getElementById('srmFile').click()">📥 导入SRM排程</button>
|
||||
<input type="file" id="srmFile" accept=".xlsx,.xls" style="display:none" onchange="importSRMSchedule(this)">
|
||||
<span style="font-size:13px;color:#666;margin-left:8px" id="totalCount"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -553,6 +555,26 @@ function importBatchArrivalExcel(input){
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
// 列表页:导入 SRM 供应商排程承诺(不触发断线重算,仅作参考展示)
|
||||
function importSRMSchedule(input){
|
||||
var file=input.files[0];if(!file)return;
|
||||
if(file.size>10*1024*1024){toast('文件不能超过10MB','error');input.value='';return}
|
||||
var reader=new FileReader();
|
||||
reader.onload=function(e){
|
||||
var b64=e.target.result.split(',')[1];
|
||||
api(getApiUrl()+'ImportSRMSchedule','POST',{FileBase64:b64},function(res){
|
||||
if(res.success){
|
||||
toast(res.message||'导入成功','success');
|
||||
loadList(curPage);
|
||||
}else{
|
||||
toast(res.message||'导入失败','error');
|
||||
}
|
||||
input.value='';
|
||||
});
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
function saveAllArrival(){
|
||||
var saved=0,err=0;
|
||||
var list=arrivals.map(function(a){return a});
|
||||
|
||||
Reference in new issue
Block a user