diff --git a/src/main/resources/templates/pages/material/material-out.html b/src/main/resources/templates/pages/material/material-out.html
index 705d78f5..e3f001ca 100644
--- a/src/main/resources/templates/pages/material/material-out.html
+++ b/src/main/resources/templates/pages/material/material-out.html
@@ -416,33 +416,44 @@
}
, btn3: function (index, layero) {
// 按钮【按钮三】的回调
- $.ajax({
- url: "/excel/overwriteExcelByMaterial",
- type: "post",
- data: JSON.stringify({"result": "yes"}),
- dataType: "json",
- contentType: "application/json;charset=utf-8",
- success: function () {
- if (socket !== null) {
- socket.close();
- } else {
- layer.close(index);
+ if (flagForImport) {
+ flagForImport = false;
+ let loading2 = layer.open({
+ type: 3,
+ shade: [0.25, '#000'],
+ icon: 2,
+ speed: 0,
+ shadeClose: true
+ });
+ $.ajax({
+ url: "/excel/overwriteExcelByMaterial",
+ type: "post",
+ data: JSON.stringify({"result": "yes"}),
+ dataType: "json",
+ contentType: "application/json;charset=utf-8",
+ success: function () {
+ if (socket !== null) {
+ socket.close();
+ } else {
+ layer.close(index);
+ }
+ flagForImport = true;
+ layer.alert("数据修改完成", {
+ icon: 0
+ }, function (indexForMsg, layero) {
+ layer.close(indexForMsg);
+ layer.close(loading2);
+ closeShowDataMessage();
+ table.reload('currentTableId', {
+ url: '/material/material',
+ page: {
+ curr: 1
+ },
+ }, 'data');
+ })
}
- layer.alert("数据修改完成", {
- icon: 0
- }, function (indexForMsg, layero) {
- layer.close(indexForMsg);
- layer.close(loading2);
- closeShowDataMessage();
- table.reload('currentTableId', {
- url: '/material/material',
- page: {
- curr: 1
- },
- }, 'data');
- })
- }
- })
+ });
+ }
return false;
}
});
diff --git a/target/classes/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml b/target/classes/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml
index d92da8b1..d8d78c83 100644
--- a/target/classes/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml
+++ b/target/classes/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml
@@ -1154,6 +1154,61 @@
WHERE id = #{id}
+
+
+ UPDATE material
+
+
+ uid = #{uid},
+
+
+ price = #{price},
+
+
+
+
+ updateTime = #{updateTime},
+
+
+
+ unit = #{unit},
+
+
+ texture = #{texture},
+
+
+ shelfLife = #{shelfLife},
+
+
+ producedDate = #{producedDate},
+
+
+ productionPlace = #{productionPlace},
+
+
+ brand = #{brand},
+
+
+ remark = #{remark}
+
+
+
+ WHERE
+ 1 = 1
+
+ and mname = #{mname}
+
+
+ and version = #{version}
+
+
+ and version is null
+
+
+ and `code` = #{mcode}
+
+
+
UPDATE inventory
diff --git a/target/classes/templates/pages/material/material-out.html b/target/classes/templates/pages/material/material-out.html
index d641b3f5..e3f001ca 100644
--- a/target/classes/templates/pages/material/material-out.html
+++ b/target/classes/templates/pages/material/material-out.html
@@ -352,7 +352,7 @@
, shade: 0.8
, id: 'LAY_layuipro' //设定一个id,防止重复弹出
, resize: false
- , btn: ['导入', '取消']
+ , btn: ['导入', '取消', '覆盖']
, btnAlign: 'c'
, moveType: 1 //拖拽模式,0或者1
, content: re
@@ -414,6 +414,48 @@
}
})
}
+ , btn3: function (index, layero) {
+ // 按钮【按钮三】的回调
+ if (flagForImport) {
+ flagForImport = false;
+ let loading2 = layer.open({
+ type: 3,
+ shade: [0.25, '#000'],
+ icon: 2,
+ speed: 0,
+ shadeClose: true
+ });
+ $.ajax({
+ url: "/excel/overwriteExcelByMaterial",
+ type: "post",
+ data: JSON.stringify({"result": "yes"}),
+ dataType: "json",
+ contentType: "application/json;charset=utf-8",
+ success: function () {
+ if (socket !== null) {
+ socket.close();
+ } else {
+ layer.close(index);
+ }
+ flagForImport = true;
+ layer.alert("数据修改完成", {
+ icon: 0
+ }, function (indexForMsg, layero) {
+ layer.close(indexForMsg);
+ layer.close(loading2);
+ closeShowDataMessage();
+ table.reload('currentTableId', {
+ url: '/material/material',
+ page: {
+ curr: 1
+ },
+ }, 'data');
+ })
+ }
+ });
+ }
+ return false;
+ }
});