From 97b055718bc931117298f679499ed62b9502b485 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期一, 25 三月 2024 16:49:57 +0800
Subject: [PATCH] Merge branch 'phyzasrs' of http://47.97.1.152:5880/r/zy-asrs into phyzasrs
---
src/main/webapp/static/js/agvLocDetl/locDetl.js | 65 +++++++++++++++++++++++++++++---
1 files changed, 58 insertions(+), 7 deletions(-)
diff --git a/src/main/webapp/static/js/agvLocDetl/locDetl.js b/src/main/webapp/static/js/agvLocDetl/locDetl.js
index ab8a10e..09a7de7 100644
--- a/src/main/webapp/static/js/agvLocDetl/locDetl.js
+++ b/src/main/webapp/static/js/agvLocDetl/locDetl.js
@@ -1,21 +1,22 @@
var pageCurr;
var tableData;
+var admin;
function getCol() {
var cols = [
{field: 'locNo', align: 'center',title: '搴撲綅鍙�'},
- {field: 'matnr', align: 'center',title: '瀛樿揣缂栫爜', sort:true}
- ,{field: 'maktx', align: 'center',title: '瀛樿揣鍚嶇О', sort:true}
+ {field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜', sort:true}
+ ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', sort:true}
,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false}
- ,{field: 'batch', align: 'center',title: '搴忓垪鐮�', width: 300, sort:true, hide: true}
+ ,{field: 'batch', align: 'center',title: '搴忓垪鐮�', width: 300}
,{field: 'anfme', align: 'center',title: '鏁伴噺'}
,{field: 'suppCode', align: 'center',title: '鏂欑鐮�'}
,{field: 'threeCode', align: 'center',title: '閿�鍞鍗曞彿'}
- ,{field: 'dead_time', align: 'center',title: '閿�鍞鍗曡鍙�'}
+ ,{field: 'deadTime', align: 'center',title: '閿�鍞鍗曡鍙�'}
,{field: 'specs', align: 'center',title: '瑙勬牸鍨嬪彿', hide: false}
,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: false}
- ,{field: 'brand', align: 'center',title: '瀛樿揣鍒嗙被缂栫爜', hide: true}
- ,{field: 'color', align: 'center',title: '瀛樿揣鍒嗙被鍚嶇О', hide: true}
+ ,{field: 'brand', align: 'center',title: '鍟嗗搧鍒嗙被缂栫爜', hide: true}
+ ,{field: 'color', align: 'center',title: '鍟嗗搧鍒嗙被鍚嶇О', hide: true}
,{field: 'unit', align: 'center',title: '璁¢噺鍗曚綅', hide: true}
,{field: 'price', align: 'center',title: '杩涢」绋�', hide: true}
,{field: 'units', align: 'center',title: '閿�椤圭◣', hide: true}
@@ -60,12 +61,15 @@
return cols;
}
-layui.use(['table','laydate', 'form'], function(){
+layui.config({
+ base: baseUrl + "/static/layui/lay/modules/"
+}).use(['table','laydate','admin','form'], function(){
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
var layDate = layui.laydate;
var form = layui.form;
+ admin = layui.admin;
// 鏁版嵁娓叉煋
tableIns = table.render({
@@ -497,6 +501,11 @@
});
});
+ // 瀵煎叆閿�鍞崟
+ $("#compareToEss").click(function () {
+ $("#importExcel").trigger("click");
+ });
+
// 鏃堕棿閫夋嫨鍣�
layDate.render({
elem: '#modiTime\\$',
@@ -612,3 +621,45 @@
$("#search").click();
}
});
+function upload(obj){
+ if(!obj.files) {
+ return;
+ }
+ var file = obj.files[0];
+ admin.confirm('纭瀵煎叆 [' + file.name +'] 鏂囦欢鍚楋紵', function (index) {
+ layer.load(1, {shade: [0.1,'#fff']});
+ var url = baseUrl + "/agv/locDetl/compare/auth";
+ var form = new FormData();
+ form.append("file", file);
+ let xhr = new XMLHttpRequest();
+ xhr.open("post", url, true);
+ xhr.setRequestHeader('token', localStorage.getItem('token'));
+ xhr.onload = uploadComplete;
+ xhr.onerror = uploadFailed;
+ xhr.onloadend = function () {
+ layer.closeAll('loading');
+ };
+ // xhr.upload.onprogress = progressFunction;
+ xhr.upload.onloadstart = function(){
+ ot = new Date().getTime();
+ oloaded = 0;
+ };
+ xhr.send(form);
+ }, function(index){
+ });
+}
+function uploadComplete(evt) {
+ let res = JSON.parse(evt.target.responseText);
+ if(res.code === 200) {
+ layer.msg(res.msg, {icon: 1});
+ insTb.reload({page: {curr: 1}});
+ } else {
+ alert(res.msg);
+ // layer.msg(res.msg, {icon: 2});
+ }
+}
+function uploadFailed(evt) {
+ let res = JSON.parse(evt.target.responseText);
+ alert(res.msg);
+ // layer.msg(res.msg, {icon: 2});
+}
--
Gitblit v1.9.1