From c10d6eed67a1b4a91e52ff2fc41524962018a842 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期五, 08 九月 2023 16:59:54 +0800
Subject: [PATCH] #订单上架优化
---
src/main/webapp/static/js/nodeLoc/nodeLoc.js | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/main/webapp/static/js/nodeLoc/nodeLoc.js b/src/main/webapp/static/js/nodeLoc/nodeLoc.js
index d144f92..d3d77af 100644
--- a/src/main/webapp/static/js/nodeLoc/nodeLoc.js
+++ b/src/main/webapp/static/js/nodeLoc/nodeLoc.js
@@ -8,6 +8,7 @@
];
cols.push.apply(cols, matCols);
cols.push(
+
{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
)
return cols;
@@ -62,6 +63,7 @@
{field: 'parentName', align: 'center',title: '搴撳尯', hide: false},
{field: 'createBy$', align: 'center',title: '鍒涘缓浜�', hide: false},
{field: 'createTime$', align: 'center',title: '鍒涘缓鏃堕棿', hide: false},
+ {field: 'status', align: 'center',title: '搴撲綅鍐荤粨', templet: '#stockFreezeTpl'},
{field: 'type$', align: 'center',title: '绫诲瀷', templet: '#tagTpl', hide: false}
]],
request: {
@@ -83,6 +85,7 @@
if (res.code === 403) {
top.location.href = baseUrl+"/";
}
+ tableData = table.cache.mat;
pageCurr=curr;
limit();
form.on('checkbox(tableCheckbox)', function (data) {
@@ -381,6 +384,20 @@
elem: '#updateTime\\$',
type: 'datetime'
});
+ //搴撲綅鍐荤粨
+ form.on('switch(stockFreezeSwitch)', function (obj) {
+ let index = obj.othis.parents('tr').attr("data-index");
+ console.log(index);
+ let data = tableData[index];
+ data[this.stockFreeze] = obj.elem.checked?1:0;
+ http.post(baseUrl + "/node/updateStatus", {
+ name: data.name,
+ status: data[this.stockFreeze]
+ }, function (res) {
+ layer.msg(res.msg, {icon: 1});
+ tableIns.reload();
+ });
+ })
});
--
Gitblit v1.9.1