From e44bb1a95ca5e383dff5f3daa8812b49096e079b Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期六, 19 六月 2021 15:57:43 +0800
Subject: [PATCH] 销售订单列优化
---
src/main/webapp/static/js/locNormal/locNormal.js | 69 ++++++++++++++++++++++++++--------
1 files changed, 52 insertions(+), 17 deletions(-)
diff --git a/src/main/webapp/static/js/locNormal/locNormal.js b/src/main/webapp/static/js/locNormal/locNormal.js
index 607bb86..b018ea7 100644
--- a/src/main/webapp/static/js/locNormal/locNormal.js
+++ b/src/main/webapp/static/js/locNormal/locNormal.js
@@ -9,7 +9,7 @@
)
cols.push.apply(cols, locNormalCols);
cols.push(
- {field: 'warehouse', align: 'center', title: '搴撳尯'}
+ {field: 'warehouse$', align: 'center', title: '搴撳尯'}
, {field: 'state', align: 'center', title: '鍑哄叆搴撶姸鎬�', templet: '#locNormalState'}
, {field: 'modiUser$', align: 'center', title: '淇敼浜哄憳', hide: true}
, {field: 'modiTime$', align: 'center', title: '淇敼鏃堕棿', hide: true}
@@ -21,7 +21,7 @@
// 鑾峰彇浠撳簱涓嬫媺
$.ajax({
- url: baseUrl+"/locArea/queryAll/auth",
+ url: baseUrl + "/locArea/queryAll/auth",
headers: {'token': localStorage.getItem('token')},
// data: top.reObject(data),
method: 'POST',
@@ -31,6 +31,29 @@
}
},
});
+
+// 搴撳尯涓嬫媺
+// 鑾峰彇浠撳簱涓嬫媺
+$.ajax({
+ url: baseUrl + "/locArea/queryAll/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ var html = "";
+ if (res.data && res.data.length > 0) {
+ html += res.data.map(function (item) {
+ return "<Option value=" + item.uuid + ">" + item.name + "</Option>";
+ });
+ }
+ $('#putSiteSelect').append(html);
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+})
layui.use(['table', 'laydate', 'form', 'upload'], function () {
var table = layui.table;
@@ -119,8 +142,8 @@
var records = res.data.records;
records.map(function (item) {
locArea.map(function (d) {
- if (d.id == item.warehouse) {
- item.warehouse = d.name;
+ if (d.uuid == item.warehouse) {
+ item.warehouse$ = d.name;
}
})
});
@@ -200,14 +223,26 @@
matnr: matnr,
anfme: count,
id: id,
+ warehouse: obj.data.warehouse,
+ supplier: obj.data.supplier,
+ mnemonic: obj.data.mnemonic,
}
- $.ajax({
- url: baseUrl + "/locNormal/update/auth",
- headers: {'token': localStorage.getItem('token')},
- data: top.reObject(param),
- method: 'POST',
- success: function (res) {
- },
+ layer.confirm("纭畾淇敼" + obj.data.maktx + "鐨勬暟閲忓悧", {
+ btn: ['纭畾', '鍙栨秷']
+ }, function () {
+ // 鎸夐挳1鐨勪簨浠�
+ $.ajax({
+ url: baseUrl + "/locNormal/update/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: top.reObject(param),
+ method: 'POST',
+ success: function (res) {
+ layer.msg("")
+ },
+ });
+ }, function () {
+ // 鎸夐挳2鐨勪簨浠�
+ tableIns.reload();
});
});
@@ -233,9 +268,9 @@
}
switch (obj.event) {
case 'outLocNormal':
- layer.confirm('纭畾瑕佸嚭搴揫'+data.matnr+']鍚楋紵', {
+ layer.confirm('纭畾瑕佸嚭搴揫' + data.matnr + ']鍚楋紵', {
btn: ['纭畾', '鍙栨秷'] //鍙互鏃犻檺涓寜閽�
- }, function(index, layero){
+ }, function (index, layero) {
//纭畾鍥炶皟-鍑哄簱
$.ajax({
url: baseUrl + "/locNormal/outLoc/auth",
@@ -248,15 +283,15 @@
layer.msg("鍑哄簱鎴愬姛");
},
});
- }, function(index){
+ }, function (index) {
//鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
});
break;
case 'removeLocNormal':
// 绉婚櫎
- layer.confirm('纭畾瑕佺Щ闄'+data.matnr+']鍚楋紵', {
+ layer.confirm('纭畾瑕佺Щ闄' + data.matnr + ']鍚楋紵', {
btn: ['纭畾', '鍙栨秷'] //鍙互鏃犻檺涓寜閽�
- }, function(index, layero){
+ }, function (index, layero) {
//纭畾鍥炶皟-绉婚櫎
$.ajax({
url: baseUrl + "/locNormal/removeLoc/auth",
@@ -269,7 +304,7 @@
layer.msg("绉婚櫎鎴愬姛");
},
});
- }, function(index){
+ }, function (index) {
//鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
});
break;
--
Gitblit v1.9.1