From 5ea75676b5decb2994d77d92553ad5151277dfc7 Mon Sep 17 00:00:00 2001
From: admin <841110950@qq.com>
Date: 星期六, 28 八月 2021 08:27:24 +0800
Subject: [PATCH] 1.0.3
---
src/main/webapp/static/js/pakStore/locCheckOut.js | 2
src/main/webapp/static/js/ioComplete/ioComplete.js | 1
src/main/webapp/static/js/pakStore/stockAdjust.js | 35 +
src/main/webapp/static/js/waitMatinLog/waitMatinLog.js | 20
src/main/webapp/views/basCrnStatus/basCrnStatus.html | 2
src/main/resources/mapper/WaitMatinMapper.xml | 34 -
src/main/webapp/static/js/basCrnStatus/basCrnStatus.js | 2
src/main/webapp/static/js/ioCompleteLog/ioCompleteLog.js | 12
src/main/webapp/static/js/waitMatoutLog/waitMatoutLog.js | 22
src/main/java/com/zy/asrs/controller/StatisController.java | 1
src/main/webapp/views/waitMatinLog/waitMatinLog.html | 2
src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java | 14
src/main/webapp/static/js/waitMatout/waitMatout.js | 1
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 4
src/main/webapp/views/waitMatchkLog/waitMatchkLog.html | 2
src/main/webapp/views/waitMatoutLog/waitMatoutLog.html | 2
src/main/webapp/static/js/waitMatin/waitMatin.js | 524 +++++++++++-----------------
src/main/webapp/views/waitMatin/waitMatin.html | 380 ++++++++++++++++++++-
18 files changed, 653 insertions(+), 407 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/StatisController.java b/src/main/java/com/zy/asrs/controller/StatisController.java
index 80b6f6d..da91ee3 100644
--- a/src/main/java/com/zy/asrs/controller/StatisController.java
+++ b/src/main/java/com/zy/asrs/controller/StatisController.java
@@ -42,7 +42,6 @@
@RequestParam(defaultValue = "14")Integer limit,
// @RequestParam(required = false)String condition,
@RequestParam Map<String, Object> param) {
- System.out.println(param);
Page<LocDetl> stockStatis = locDetlService.getStockStatis(toPage(curr, limit, param, LocDetl.class));
for (LocDetl locDetl : stockStatis.getRecords()) {
MatCode mat = matCodeService.selectOne(new EntityWrapper<MatCode>().eq("mat_no",locDetl.getMatNo()).eq("str8",locDetl.getColor()));
diff --git a/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java b/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
index e16161d..4692ff7 100644
--- a/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
@@ -7,12 +7,26 @@
*/
public class LocDetlAdjustParam {
+ //鎵樼洏鍙�
+ private String zpallet;
+
+
// 搴撲綅鍙�
private String locNo;
// 璋冩暣搴撳瓨鏄庣粏闆嗗悎
private List<LocDetlAdjust> list;
+
+
+ public String getZpallet() {
+ return zpallet;
+ }
+
+ public void setZpallet(String zpallet) {
+ this.zpallet = zpallet;
+ }
+
public static class LocDetlAdjust {
// 浜у搧鍙�
diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index fec6f1e..4f3c4fe 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -545,10 +545,13 @@
@Override
@Transactional
public void adjustLocDetl(LocDetlAdjustParam param, Long userId) {
+ //鏍规嵁搴撲綅鍙锋壘瀵诲簱浣�
LocMast locMast = locMastService.selectById(param.getLocNo());
+ //鍒ゆ柇
if (Cools.isEmpty(locMast)) {
throw new CoolException("搴撲綅涓嶅瓨鍦�");
}
+
for (LocDetlAdjustParam.LocDetlAdjust adjust : param.getList()) {
if (Cools.isEmpty(adjust.getMatNo())) {
throw new CoolException(BaseRes.PARAM);
@@ -571,6 +574,7 @@
locDetl.setModiTime(new Date());
locDetl.setAppeUser(userId);
locDetl.setAppeTime(new Date());
+ locDetl.setZpallet(param.getZpallet());//鎵樼洏鍙�
if (!locDetlService.insert(locDetl)) {
throw new CoolException("淇濆瓨搴撳瓨鏄庣粏澶辫触");
}
diff --git a/src/main/resources/mapper/WaitMatinMapper.xml b/src/main/resources/mapper/WaitMatinMapper.xml
index 8a699db..02eafe9 100644
--- a/src/main/resources/mapper/WaitMatinMapper.xml
+++ b/src/main/resources/mapper/WaitMatinMapper.xml
@@ -28,11 +28,11 @@
</resultMap>
<sql id="condition">
- <if test="bill_no!=null and bill_no!='' ">
- and bill_no like '%' + #{bill_no} + '%'
+ <if test="loc_no!=null and loc_no!='' ">
+ and a.loc_no like '%' + #{loc_no} + '%'
</if>
- <if test="bill_type!=null and bill_type!='' ">
- and bill_type like '%' + #{bill_type} + '%'
+ <if test="mat_no!=null and mat_no!='' ">
+ and a.mat_no like '%' + #{mat_no} + '%'
</if>
<if test="mat_name!=null and mat_name!='' ">
and a.mat_name like '%' + #{mat_name} + '%'
@@ -44,35 +44,27 @@
and a.unit like '%' + #{unit} + '%'
</if>
<if test="startTime!=null and endTime!=null">
- and appe_time between #{startTime} and #{endTime}
+ and a.modi_time between #{startTime} and #{endTime}
</if>
</sql>
<select id="getHeadPage" resultMap="BaseResultMap">
select * from
(
- select *,
- ROW_NUMBER() over (order by appe_time) as row
- from (
- select distinct bill_no, bill_type, appe_time
- from ints_wait_matin
- where 1=1
- <include refid="condition"></include>
- ) r
+ select distinct bill_no, bill_type, appe_time,
+ ROW_NUMBER() over (order by appe_time) as row
+ from ints_wait_matin
+ <include refid="condition"></include>
) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
</select>
<select id="getHeadPageCount" parameterType="java.util.Map" resultType="java.lang.Integer">
select count(1) from
(
- select *,
- ROW_NUMBER() over (order by appe_time) as row
- from (
- select distinct bill_no, bill_type, appe_time
- from ints_wait_matin
- where 1=1
- <include refid="condition"></include>
- ) r
+ select distinct bill_no, bill_type, appe_time,
+ ROW_NUMBER() over (order by appe_time) as row
+ from ints_wait_matin
+ <include refid="condition"></include>
) t
</select>
diff --git a/src/main/webapp/static/js/basCrnStatus/basCrnStatus.js b/src/main/webapp/static/js/basCrnStatus/basCrnStatus.js
index efb0c3f..8b43183 100644
--- a/src/main/webapp/static/js/basCrnStatus/basCrnStatus.js
+++ b/src/main/webapp/static/js/basCrnStatus/basCrnStatus.js
@@ -26,7 +26,6 @@
,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
// ,{field: 'appeUser$', align: 'center',title: '鍒涘缓鑰�',event: 'appeUser', style: 'text-decoration: underline;cursor:pointer'}
// ,{field: 'appeTime$', align: 'center',title: '娣诲姞鏃堕棿'}
-
,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
]],
request: {
@@ -390,6 +389,7 @@
});
function tableReload(child) {
+
var searchData = {};
$.each($('#search-box [name]').serializeArray(), function() {
searchData[this.name] = this.value;
diff --git a/src/main/webapp/static/js/ioComplete/ioComplete.js b/src/main/webapp/static/js/ioComplete/ioComplete.js
index 5600e4c..b40f4f2 100644
--- a/src/main/webapp/static/js/ioComplete/ioComplete.js
+++ b/src/main/webapp/static/js/ioComplete/ioComplete.js
@@ -377,7 +377,6 @@
success: function (res) {
if (res.code === 200){
parent.layer.closeAll();
- parent.$(".layui-laypage-btn")[0].click();
$("#data-detail :input").each(function () {
$(this).val("");
});
diff --git a/src/main/webapp/static/js/ioCompleteLog/ioCompleteLog.js b/src/main/webapp/static/js/ioCompleteLog/ioCompleteLog.js
index 9d380b9..4d67906 100644
--- a/src/main/webapp/static/js/ioCompleteLog/ioCompleteLog.js
+++ b/src/main/webapp/static/js/ioCompleteLog/ioCompleteLog.js
@@ -23,18 +23,18 @@
,{field: 'id', align: 'center',title: 'ID'}
,{field: 'billNo', align: 'center',title: '鍗曟嵁缂栧彿'}
,{field: 'seqNo', align: 'center',title: '搴忓彿'}
- ,{field: 'taskType$', align: 'center',title: '浠诲姟绫诲瀷'}
+ ,{field: 'taskType$', align: 'center',title: '浠诲姟绫诲瀷',hide:true}
,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�',event: 'locNo', style: 'cursor:pointer'}
,{field: 'zpallet', align: 'center',title: '鎵樼洏鍙�'}
,{field: 'matNo', align: 'center',title: '鐗╂枡缂栫爜'}
,{field: 'matName', align: 'center',title: '鐗╂枡鍚嶇О'}
,{field: 'qty', align: 'center',title: '鏁伴噺'}
,{field: 'updStatus$', align: 'center',title: '瀹屾垚鐘舵��'}
- ,{field: 'errorMemo', align: 'center',title: '寮傚父淇℃伅'}
- ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',event: 'modiUser', style: 'cursor:pointer'}
- ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
- ,{field: 'appeUser$', align: 'center',title: '寤烘。浜哄憳',event: 'appeUser', style: 'cursor:pointer'}
- ,{field: 'appeTime$', align: 'center',title: '寤烘。鏃堕棿'}
+ ,{field: 'errorMemo', align: 'center',title: '寮傚父淇℃伅',hide:true}
+ ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',event:'modiUser', style: 'cursor:pointer',hide:true}
+ ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿',hide:true}
+ ,{field: 'appeUser$', align: 'center',title: '寤烘。浜哄憳',event:'appeUser', style: 'cursor:pointer',hide:true}
+ ,{field: 'appeTime$', align: 'center',title: '寤烘。鏃堕棿',hide:true}
,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
]],
diff --git a/src/main/webapp/static/js/pakStore/locCheckOut.js b/src/main/webapp/static/js/pakStore/locCheckOut.js
index 4c34784..f6797c8 100644
--- a/src/main/webapp/static/js/pakStore/locCheckOut.js
+++ b/src/main/webapp/static/js/pakStore/locCheckOut.js
@@ -142,7 +142,7 @@
})
}
})
-``
+
// 鎻愬彇浜у搧
var locDetlLayerIdx;
function getLocDetl() {
diff --git a/src/main/webapp/static/js/pakStore/stockAdjust.js b/src/main/webapp/static/js/pakStore/stockAdjust.js
index 8a429d3..5249314 100644
--- a/src/main/webapp/static/js/pakStore/stockAdjust.js
+++ b/src/main/webapp/static/js/pakStore/stockAdjust.js
@@ -5,7 +5,7 @@
function getCol() {
var cols = [
{fixed: 'left', field: 'count', title: '瀹為檯鏁伴噺', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}
- ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+ // ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
];
arrRemove(detlCols, "field", "anfme")
cols.push.apply(cols, detlCols);
@@ -35,7 +35,7 @@
// 椤甸潰淇敼
table.on('edit(chooseData)', function (obj) {
- updateMatCodeData(obj.data.matnr, Number(obj.value));
+ updateMatCodeData(obj.data.matNo, Number(obj.value));
});
// 鐩戝惉澶村伐鍏锋爮浜嬩欢
@@ -52,6 +52,7 @@
return;
}
for (var i=0;i<matCodeData.length;i++){
+
if (isNaN(matCodeData[i].count)) {
layer.msg("璇疯緭鍏ユ暟瀛�");
return;
@@ -67,7 +68,8 @@
headers: {'token': localStorage.getItem('token')},
data: JSON.stringify({
locNo: currLocNo,
- list: matCodeData
+ list: matCodeData,
+ zpallet:zpa
}),
contentType:'application/json;charset=UTF-8',
method: 'POST',
@@ -90,11 +92,12 @@
// 鐩戝惉琛屽伐鍏蜂簨浠�
table.on('tool(chooseData)', function(obj){
+
var data = obj.data;
switch (obj.event) {
case 'remove':
for (var i = matCodeData.length - 1; i >= 0; i--) {
- if (matCodeData[i].matnr === data.matnr) {
+ if (matCodeData[i].matNo === data.matNo) {
matCodeData.splice(i, 1);
}
}
@@ -174,13 +177,13 @@
}
}
- function updateMatCodeData(matnr, count) {
+ function updateMatCodeData(matNo, count) {
if (isNaN(count)) {
layer.msg("璇疯緭鍏ユ暟瀛�");
} else {
if (count >= 0) {
for (var i=0;i<matCodeData.length;i++){
- if (matCodeData[i]["matnr"] === matnr){
+ if (matCodeData[i]["matNo"] === matNo){
matCodeData[i]["count"] = count;
}
}
@@ -221,29 +224,33 @@
el.css("border-color", "#b8b8b8");
}, 1000);
}
-
+var zpa=0
// 娣诲姞琛ㄦ牸鏁版嵁
function addTableData(data) {
let applyData = [];
for (var i=0;i<data.length;i++){
let pass = false;
for (var j=0;j<matCodeData.length;j++){
- if (data[i].matNo === matCodeData[j].matnr) {
+ zpa=matCodeData[0].zpallet
+ if (data[i].matNo === matCodeData[j].matNo) {
pass = true;
break;
}
}
+
if (!pass) {
applyData.push({
count: initCountVal,
anfme: initAnfmeVal,
removeBtn: true,
- matnr: data[i].matNo,
- maktx: data[i].matName,
- lgnum: data[i].str2,
- color: data[i].str3,
- bname: data[i].str4,
- altme: data[i].str1,
+ matNo: data[i].matNo,
+ matName: data[i].matName,
+ specs: data[i].specs,
+ color: data[i].color,
+ size: data[i].size,
+ unit: data[i].unit,
+ zpallet:zpa,
+ qty:0
})
}
}
diff --git a/src/main/webapp/static/js/waitMatin/waitMatin.js b/src/main/webapp/static/js/waitMatin/waitMatin.js
index b195694..8f831a1 100644
--- a/src/main/webapp/static/js/waitMatin/waitMatin.js
+++ b/src/main/webapp/static/js/waitMatin/waitMatin.js
@@ -1,29 +1,48 @@
+var pageCurr;
layui.config({
base: baseUrl + "/static/layui/lay/modules/"
-}).use(['layer', 'form', 'table', 'util', 'admin', 'xmSelect', 'laydate'], function () {
+}).use(['table','laydate', 'form', 'admin'], function(){
+ var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
- var form = layui.form;
- var table = layui.table;
- var util = layui.util;
- var admin = layui.admin;
- var xmSelect = layui.xmSelect;
var layDate = layui.laydate;
+ var form = layui.form;
+ var admin = layui.admin;
- // 娓叉煋琛ㄦ牸
- var insTb = table.render({
+ // 鏁版嵁娓叉煋
+ tableIns = table.render({
elem: '#waitMatin',
- url: baseUrl+'/waitMatin/head/page/auth',
headers: {token: localStorage.getItem('token')},
+ url: baseUrl+'/waitMatin/list/auth',
page: true,
- cellMinWidth: 100,
+ limit: 16,
+ limits: [16, 30, 50, 100, 200, 500],
+ toolbar: '#toolbar',
+ cellMinWidth: 50,
cols: [[
- {type: 'numbers'},
- {field: 'billNo', title: '鍗曟嵁缂栧彿', sort: true},
- {field: 'billType$', align: 'center', title: '绫诲瀷', minWidth: 140, width: 140},
- {align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 140, width: 140},
- {field: 'appeTime$', title: '鍒涘缓鏃堕棿', minWidth: 180, width: 180},
- {align: 'center', title: '鎿嶄綔', toolbar: '#operate', minWidth: 130, width: 130}
+ {type: 'checkbox'}
+ ,{field: 'billNo', align: 'center',title: '鍗曟嵁缂栧彿'}
+ ,{field: 'seqNo', align: 'center',title: '搴忓彿'}
+ ,{field: 'billType$', align: 'center',title: '鍗曟嵁绫诲瀷'}
+ ,{field: 'matNo', align: 'center',title: '鐗╂枡缂栫爜'}
+ ,{field: 'matName', align: 'center',title: '鐗╂枡鍚嶇О'}
+ ,{field: 'qty', align: 'center',title: '鏁伴噺'}
+ ,{field: 'specs', align: 'center',title: '瑙勬牸'}
+ ,{field: 'unit', align: 'center',title: '鍗曚綅'}
+ ,{field: 'size', align: 'center',title: '灏哄', hide: true}
+ ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
+ ,{field: 'weight', align: 'center',title: '鍗曢噸', hide: true}
+ ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
+ ,{field: 'inQty', align: 'center',title: '宸插叆搴撻噺'}
+ ,{field: 'linkErp$', align: 'center',title: 'ERP杩炵嚎'}
+ ,{field: 'ioStatus$', align: 'center',title: '瀹屾垚鐘舵��'}
+ ,{field: 'ioTime$', align: 'center',title: '瀹屾垚鏃堕棿', hide: true}
+ ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',event: 'modiUser', style: 'cursor:pointer', hide: true}
+ ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide: true}
+ ,{field: 'appeUser$', align: 'center',title: '寤烘。浜哄憳',event: 'appeUser', style: 'cursor:pointer', hide: true}
+ ,{field: 'appeTime$', align: 'center',title: '寤烘。鏃堕棿', hide: true}
+
+ ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
]],
request: {
pageName: 'curr',
@@ -40,337 +59,160 @@
response: {
statusCode: 200
},
- done: function (res, curr, count) {
+ done: function(res, curr, count) {
if (res.code === 403) {
top.location.href = baseUrl+"/";
}
+ pageCurr=curr;
+ limit();
}
});
- // 鎼滅储
- form.on('submit(eCourseTbSearch)', function (data) {
- insTb.reload({where: data.field, page: {curr: 1}});
+ // 鐩戝惉鎺掑簭浜嬩欢
+ table.on('sort(waitMatin)', function (obj) {
+ var searchData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ searchData[this.name] = this.value;
+ });
+ searchData['orderByField'] = obj.field;
+ searchData['orderByType'] = obj.type;
+ tableIns.reload({
+ where: searchData,
+ page: {curr: 1}
+ });
});
- // 娣诲姞
- $("#eCourseAddBtn").click(function () {
- showEditModel();
- });
-
- // 宸ュ叿鏉$偣鍑讳簨浠�
- table.on('tool(waitMatin)', function (obj) {
- var data = obj.data;
- var layEvent = obj.event;
- if (layEvent === 'edit') {
- showEditModel(data);
- } else if (layEvent === 'del') {
- doDel(data.billNo);
- } else if (layEvent === 'look') {
- var $a = $(obj.tr).find('a[lay-event="look"]');
- var offset = $a.offset();
- var top = offset.top;
- var left = offset.left;
- layer.open({
- type: 1,
- title: false,
- area: '630px',
- offset: [top + 'px', (left - 530 + $a.outerWidth()) + 'px'],
- shade: .01,
- shadeClose: true,
- fixed: false,
- content: '<table id="lookSSXMTable" lay-filter="lookSSXMTable"></table>',
- success: function (layero) {
- table.render({
- elem: '#lookSSXMTable',
- headers: {token: localStorage.getItem('token')},
- url: baseUrl+'/waitMatin/list/auth',
- where: {
- bill_no: data.billNo
- },
- page: true,
- cellMinWidth: 100,
- cols: [[
- {type: 'numbers'},
- {field: 'matNo', title: '鐗╂枡缂栫爜'},
- {field: 'matName', title: '鐗╂枡鍚嶇О', width: 160},
- {field: 'qty', title: '鏁伴噺'},
- {
- field: 'createTime$', title: '鍒涘缓鏃堕棿', sort: true, templet: function (d) {
- return util.toDateString(d.createTime);
- }, width: 180
- }
- ]],
- request: {
- pageName: 'curr',
- pageSize: 'limit'
- },
- parseData: function (res) {
- return {
- 'code': res.code,
- 'msg': res.msg,
- 'count': res.data.total,
- 'data': res.data.records
- }
- },
- response: {
- statusCode: 200
- },
- done: function () {
- $(layero).find('.layui-table-view').css('margin', '0');
- },
- size: ''
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(waitMatin)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id).data;
+ switch(obj.event) {
+ case 'addData':
+ showEditModel();
+ break;
+ case 'deleteData':
+ if (checkStatus.length === 0) {
+ layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
+ return;
+ }
+ var ids = checkStatus.map(function (d) {
+ return d.seqNo;
+ });
+ del(ids);
+ break;
+ case 'exportData':
+ layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
+ var titles=[];
+ var fields=[];
+ obj.config.cols[0].map(function (col) {
+ if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
+ titles.push(col.title);
+ fields.push(col.field);
+ }
});
- }
- });
+ var exportData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ exportData[this.name] = this.value;
+ });
+ var param = {
+ 'waitMatin': exportData,
+ 'fields': fields
+ };
+ $.ajax({
+ url: baseUrl+"/waitMatin/export/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: JSON.stringify(param),
+ dataType:'json',
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ success: function (res) {
+ layer.closeAll();
+ if (res.code === 200) {
+ table.exportFile(titles,res.data,'xls');
+ } else if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2})
+ }
+ }
+ });
+ });
+ break;
}
});
- // 鏄剧ず琛ㄥ崟寮圭獥
- function showEditModel(expTpe) {
+ // 鐩戝惉琛屽伐鍏蜂簨浠�
+ table.on('tool(waitMatin)', function(obj){
+ var data = obj.data;
+ switch (obj.event) {
+ case 'edit':
+ showEditModel(data);
+ break;
+ case "del":
+ var ids = [data.seqNo];
+ del(ids);
+ break;
+ }
+ });
+
+ /* 寮圭獥 - 鏂板銆佷慨鏀� */
+ function showEditModel(mData) {
admin.open({
type: 1,
- title: (expTpe ? '淇敼' : '娣诲姞') + '鍗曟嵁',
+ area: '600px',
+ title: (mData ? '淇敼' : '娣诲姞') + '璁㈠崟鐘舵��',
content: $('#editDialog').html(),
- area: '700px',
success: function (layero, dIndex) {
- $(layero).children('.layui-layer-content').css('overflow', 'visible');
- var url = expTpe ? '../../json/ok.json' : '../../json/ok.json';
- var isExpAdd = !expTpe;
- // 鍥炴樉鏁版嵁
- form.val('editForm', expTpe);
- // 琛ㄥ崟鎻愪氦浜嬩欢
- form.on('submit(waitMatinEditSubmit)', function (data) {
- // 缁勮鏁版嵁
- if (xxDataList.length <= 0) {
- layer.tips('璇锋坊鍔犲崟鎹槑缁�', '#matAddBtnComment', {tips: [1, '#ff4c4c']});
- return false;
- }
- var param = [];
- var nList = admin.util.deepClone(xxDataList);
- for (var xi = 0; xi < nList.length; xi++) {
- if (nList[xi].qty > 0) {
- param.push({
- billNo: data.field.billNo,
- billType: data.field.billType,
- matNo: nList[xi].matNo,
- matName: nList[xi].matName,
- qty: nList[xi].qty,
- })
- }
- }
- if (param.length === 0) {
- layer.msg('鍗曟嵁鏄庣粏鏁伴噺涓嶅悎娉�', {icon: 2});
- return false;
- }
- if (isExpAdd) {
- layer.load(2);
- $.ajax({
- url: baseUrl+"/waitMatin/add/auth",
- headers: {'token': localStorage.getItem('token')},
- data: JSON.stringify(param),
- contentType:'application/json;charset=UTF-8',
- method: 'POST',
- success: function (res) {
- layer.closeAll('loading');
- if (res.code === 200){
- layer.close(dIndex);
- insTb.reload({page: {curr: 1}});
- layer.msg(res.msg, {icon: 1});
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
- }else {
- layer.msg(res.msg, {icon: 2});
- }
+ layDateRender();
+ form.val('detail', mData);
+ form.on('submit(editSubmit)', function (data) {
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/waitMatin/"+(mData?'update':'add')+"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: data.field,
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.close(dIndex);
+ layer.msg(res.msg, {icon: 1});
+ tableReload();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg, {icon: 2});
}
- })
- }
+ }
+ })
return false;
});
- // 鏄庣粏琛ㄦ牸
- var xxDataList = [];
- var tbOptions = {
- elem: '#formSSXMTable',
- data: xxDataList,
- page: true,
- height: '350px;',
- cellMinWidth: 100,
- cols: [[
- {type: 'numbers'},
- {field: 'matNo', title: '鐗╂枡缂栫爜'},
- {field: 'matName', title: '鐗╂枡鍚嶇О', width: 160},
- {field: 'qty', title: '淇敼鏁伴噺', style: 'color: blue;font-weight: bold', edit: true, minWidth: 100, width: 100},
- {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80}
- ]],
- done: function () {
- $(layero).find('.layui-table-view').css('margin', '0');
- },
- size: ''
- };
- if (!isExpAdd) {
- tbOptions.data = undefined;
- tbOptions.url = '../../json/e-course-tb2.json?experimentTypeId=' + expTpe.experimentTypeId;
- }
- var insTbSSXM = table.render(tbOptions);
- // 宸ュ叿鏉$偣鍑讳簨浠�
- table.on('tool(formSSXMTable)', function (obj) {
- var data = obj.data;
- var layEvent = obj.event;
- if (layEvent === 'edit') {
- showEditModel2(data);
- } else if (layEvent === 'del') {
- layer.confirm('纭畾瑕佸垹闄ゅ悧锛�', {
- shade: .1,
- skin: 'layui-layer-admin'
- }, function (i) {
- layer.close(i);
- for (var j = 0; j < xxDataList.length; j++) {
- if (xxDataList[j].matNo === data.matNo) {
- xxDataList.splice(j, 1);
- }
- }
- insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
- });
- }
- });
- // 鏁伴噺淇敼
- table.on('edit(formSSXMTable)', function (obj) {
- let count = Number(obj.value);
- if (isNaN(count)) {
- layer.msg("璇疯緭鍏ユ暟瀛�");
- } else {
- if (count > 0) {
- for (var i=0;i<xxDataList.length;i++){
- if (xxDataList[i]["matNo"] === obj.data.matNo){
- xxDataList[i]["qty"] = count;
- break;
- }
- }
- } else {
- layer.msg("鏁伴噺蹇呴』澶т簬闆�");
- }
- }
- insTbSSXM.reload({data: xxDataList});
- });
- //
- $('#matAddBtnComment').click(function () {
- showEditModel2();
- });
-
- // 鏄剧ず娣诲姞鏄庣粏琛ㄥ崟寮圭獥
- function showEditModel2(exp) {
- admin.open({
- type: 1,
- offset: '150px',
- area: '480px',
- title: (exp ? '淇敼' : '娣诲姞') + '鏄庣粏',
- content: $('#matEditDialog').html(),
- success: function (layero, dIndex) {
- $(layero).children('.layui-layer-content').css('overflow', 'visible');
- var url = exp ? '../../json/ok.json' : '../../json/ok.json';
- // 鍥炴樉鏁版嵁
- form.val('matEditForm', exp);
- // 琛ㄥ崟鎻愪氦浜嬩欢
- form.on('submit(matEditSubmit)', function (data) {
- var existMats = [];
- xxDataList.forEach(function(elem) {
- existMats.push(elem.matNo);
- });
- var selectList = matXmSelect.getValue();
- for (var i = 0; i<selectList.length; i++) {
- var item = selectList[i];
- if (existMats.indexOf(item.value) === -1) {
- // 鏌ヨ鐗╂枡璇︽儏
- $.ajax({
- url: baseUrl+"/matCode/"+item.value+"/auth",
- headers: {'token': localStorage.getItem('token')},
- method: 'GET',
- async: false,
- success: function (res) {
- if (res.code === 200){
- var mat = res.data;
- xxDataList.push({
- matNo: mat.matNo,
- matName: mat.matName,
- qty: 0.0
- });
- insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
- }else {
- layer.msg(res.msg, {icon: 2})
- }
- }
- })
- }
- }
- layer.close(dIndex);
- return false;
- });
- // 娓叉煋鐗╂枡閫夋嫨
- var matXmSelect = xmSelect.render({
- el: '#mat',
- style: {
- width: '340px',
- },
- autoRow: true,
- toolbar: { show: true },
- filterable: true,
- remoteSearch: true,
- remoteMethod: function(val, cb, show){
- $.ajax({
- url: baseUrl+"/mat/all/get/kv",
- headers: {'token': localStorage.getItem('token')},
- data: {
- condition: val
- },
- method: 'POST',
- success: function (res) {
- if (res.code === 200){
- cb(res.data)
- } else {
- cb([]);
- layer.msg(res.msg, {icon: 2});
- }
- }
- });
- }
- })
- // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
- $(layero).children('.layui-layer-content').css('overflow', 'visible');
- layui.form.render('select');
- }
- });
- }
-
+ $(layero).children('.layui-layer-content').css('overflow', 'visible');
+ layui.form.render('select');
}
});
}
- // 鍒犻櫎鍗曟嵁
- function doDel(billNo) {
- layer.confirm('纭畾瑕佸垹闄ゅ悧锛�', {
- shade: .1,
- skin: 'layui-layer-admin'
+ /* 鍒犻櫎 */
+ function del(ids) {
+ layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', {
+ skin: 'layui-layer-admin',
+ shade: .1
}, function (i) {
layer.close(i);
- layer.load(2);
-
+ var loadIndex = layer.load(2);
$.ajax({
url: baseUrl+"/waitMatin/delete/auth",
headers: {'token': localStorage.getItem('token')},
- data: {
- billNo: billNo
- },
- // contentType:'application/json;charset=UTF-8',
+ data: {ids: ids},
method: 'POST',
success: function (res) {
- layer.closeAll('loading');
+ layer.close(loadIndex);
if (res.code === 200){
- insTb.reload({page: {curr: 1}});
layer.msg(res.msg, {icon: 1});
+ tableReload();
} else if (res.code === 403){
top.location.href = baseUrl+"/";
- }else {
+ } else {
layer.msg(res.msg, {icon: 2});
}
}
@@ -378,9 +220,55 @@
});
}
- layDate.render({
- elem: '.layui-laydate-range'
- ,type: 'datetime'
- ,range: true
+ // 鎼滅储
+ form.on('submit(search)', function (data) {
+ pageCurr = 1;
+ tableReload(false);
});
-});
\ No newline at end of file
+
+ // 閲嶇疆
+ form.on('submit(reset)', function (data) {
+ pageCurr = 1;
+ clearFormVal($('#search-box'));
+ tableReload(false);
+ });
+
+ // 鏃堕棿閫夋嫨鍣�
+ function layDateRender() {
+ layDate.render({
+ elem: '#ioTime\\$',
+ type: 'datetime'
+ });
+ layDate.render({
+ elem: '#modiTime\\$',
+ type: 'datetime'
+ });
+ layDate.render({
+ elem: '#appeTime\\$',
+ type: 'datetime'
+ });
+ layDate.render({
+ elem: '.layui-laydate-range'
+ ,type: 'datetime'
+ ,range: true
+ });
+ }
+ layDateRender();
+
+});
+
+// 鍏抽棴鍔ㄤ綔
+$(document).on('click','#data-detail-close', function () {
+ parent.layer.closeAll();
+});
+
+function tableReload(child) {
+ var searchData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ searchData[this.name] = this.value;
+ });
+ tableIns.reload({
+ where: searchData,
+ page: {curr: pageCurr}
+ });
+}
diff --git a/src/main/webapp/static/js/waitMatinLog/waitMatinLog.js b/src/main/webapp/static/js/waitMatinLog/waitMatinLog.js
index e802a58..5e0817d 100644
--- a/src/main/webapp/static/js/waitMatinLog/waitMatinLog.js
+++ b/src/main/webapp/static/js/waitMatinLog/waitMatinLog.js
@@ -30,16 +30,16 @@
,{field: 'unit', align: 'center',title: '鍗曚綅'}
,{field: 'size', align: 'center',title: '灏哄'}
,{field: 'color', align: 'center',title: '棰滆壊'}
- ,{field: 'weight', align: 'center',title: '鍗曢噸'}
- ,{field: 'memo', align: 'center',title: '澶囨敞'}
- ,{field: 'inQty', align: 'center',title: '宸插叆搴撻噺'}
- ,{field: 'linkErp$', align: 'center',title: 'ERP杩炵嚎'}
- ,{field: 'ioStatus$', align: 'center',title: '瀹屾垚鐘舵��'}
- ,{field: 'ioTime$', align: 'center',title: '瀹屾垚鏃堕棿'}
- ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',event: 'modiUser', style: 'cursor:pointer'}
- ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
- ,{field: 'appeUser$', align: 'center',title: '寤烘。浜哄憳',event: 'appeUser', style: 'cursor:pointer'}
- ,{field: 'appeTime$', align: 'center',title: '寤烘。鏃堕棿'}
+ ,{field: 'weight', align: 'center',title: '鍗曢噸',hide:true}
+ ,{field: 'memo', align: 'center',title: '澶囨敞',hide:true}
+ ,{field: 'inQty', align: 'center',title: '宸插叆搴撻噺',hide:true}
+ ,{field: 'linkErp$', align: 'center',title: 'ERP杩炵嚎',hide:true}
+ ,{field: 'ioStatus$', align: 'center',title: '瀹屾垚鐘舵��',hide:true}
+ ,{field: 'ioTime$', align: 'center',title: '瀹屾垚鏃堕棿',hide:true}
+ ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',event: 'modiUser', style: 'cursor:pointer',hide:true}
+ ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿',hide:true}
+ ,{field: 'appeUser$', align: 'center',title: '寤烘。浜哄憳',event: 'appeUser', style: 'cursor:pointer',hide:true}
+ ,{field: 'appeTime$', align: 'center',title: '寤烘。鏃堕棿',hide:true}
,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
]],
diff --git a/src/main/webapp/static/js/waitMatout/waitMatout.js b/src/main/webapp/static/js/waitMatout/waitMatout.js
index 75d07ef..2cfa8d7 100644
--- a/src/main/webapp/static/js/waitMatout/waitMatout.js
+++ b/src/main/webapp/static/js/waitMatout/waitMatout.js
@@ -41,7 +41,6 @@
,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide: true}
,{field: 'appeUser$', align: 'center',title: '寤烘。浜哄憳',event: 'appeUser', style: 'cursor:pointer', hide: true}
,{field: 'appeTime$', align: 'center',title: '寤烘。鏃堕棿', hide: true}
-
,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
]],
request: {
diff --git a/src/main/webapp/static/js/waitMatoutLog/waitMatoutLog.js b/src/main/webapp/static/js/waitMatoutLog/waitMatoutLog.js
index 18501ea..1322500 100644
--- a/src/main/webapp/static/js/waitMatoutLog/waitMatoutLog.js
+++ b/src/main/webapp/static/js/waitMatoutLog/waitMatoutLog.js
@@ -26,20 +26,20 @@
,{field: 'matNo', align: 'center',title: '鐗╂枡缂栫爜'}
,{field: 'matName', align: 'center',title: '鐗╂枡鍚嶇О'}
,{field: 'qty', align: 'center',title: '鏁伴噺'}
- ,{field: 'specs', align: 'center',title: '瑙勬牸'}
- ,{field: 'unit', align: 'center',title: '鍗曚綅'}
+ ,{field: 'specs', align: 'center',title: '瑙勬牸',hide:true}
+ ,{field: 'unit', align: 'center',title: '鍗曚綅',hide:true}
,{field: 'size', align: 'center',title: '灏哄'}
,{field: 'color', align: 'center',title: '棰滆壊'}
- ,{field: 'weight', align: 'center',title: '鍗曢噸'}
- ,{field: 'memo', align: 'center',title: '澶囨敞'}
+ ,{field: 'weight', align: 'center',title: '鍗曢噸',hide:true}
+ ,{field: 'memo', align: 'center',title: '澶囨敞',hide:true}
,{field: 'outQty', align: 'center',title: '宸插嚭搴撻噺'}
- ,{field: 'linkErp$', align: 'center',title: 'ERP杩炵嚎'}
- ,{field: 'ioStatus$', align: 'center',title: '瀹屾垚鐘舵��'}
- ,{field: 'ioTime$', align: 'center',title: '瀹屾垚鏃堕棿'}
- ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',event: 'modiUser', style: 'cursor:pointer'}
- ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
- ,{field: 'appeUser$', align: 'center',title: '寤烘。浜哄憳',event: 'appeUser', style: 'cursor:pointer'}
- ,{field: 'appeTime$', align: 'center',title: '寤烘。鏃堕棿'}
+ ,{field: 'linkErp$', align: 'center',title: 'ERP杩炵嚎',hide:true}
+ ,{field: 'ioStatus$', align: 'center',title: '瀹屾垚鐘舵��',hide:true}
+ ,{field: 'ioTime$', align: 'center',title: '瀹屾垚鏃堕棿',hide:true}
+ ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',event: 'modiUser', style: 'cursor:pointer',hide:true}
+ ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿',hide:true}
+ ,{field: 'appeUser$', align: 'center',title: '寤烘。浜哄憳',event: 'appeUser', style: 'cursor:pointer',hide:true}
+ ,{field: 'appeTime$', align: 'center',title: '寤烘。鏃堕棿',hide:true}
,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
]],
diff --git a/src/main/webapp/views/basCrnStatus/basCrnStatus.html b/src/main/webapp/views/basCrnStatus/basCrnStatus.html
index f005518..fbe9715 100644
--- a/src/main/webapp/views/basCrnStatus/basCrnStatus.html
+++ b/src/main/webapp/views/basCrnStatus/basCrnStatus.html
@@ -20,6 +20,8 @@
</div>
</div>
+
+
<!-- 寰呮坊鍔� -->
<div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block">
<button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button>
diff --git a/src/main/webapp/views/waitMatchkLog/waitMatchkLog.html b/src/main/webapp/views/waitMatchkLog/waitMatchkLog.html
index 26889e1..f8875e1 100644
--- a/src/main/webapp/views/waitMatchkLog/waitMatchkLog.html
+++ b/src/main/webapp/views/waitMatchkLog/waitMatchkLog.html
@@ -16,7 +16,7 @@
<div id="search-box" class="layui-form layui-card-header">
<div class="layui-inline">
<div class="layui-input-inline">
- <input class="layui-input" type="text" name="id" placeholder="缂栧彿" autocomplete="off">
+ <input class="layui-input" type="text" name="bill_no" placeholder="缂栧彿" autocomplete="off">
</div>
</div>
<div class="layui-inline">
diff --git a/src/main/webapp/views/waitMatin/waitMatin.html b/src/main/webapp/views/waitMatin/waitMatin.html
index 3183123..1c4b9c7 100644
--- a/src/main/webapp/views/waitMatin/waitMatin.html
+++ b/src/main/webapp/views/waitMatin/waitMatin.html
@@ -25,25 +25,9 @@
<div class="layui-form toolbar">
<div class="layui-form-item">
<div class="layui-inline">
+ <label class="layui-form-label w-auto">鍗曟嵁缂栧彿锛�</label>
<div class="layui-input-inline mr0">
- <input name="bill_no" class="layui-input" type="text" placeholder="杈撳叆鍗曟嵁缂栧彿"/>
- </div>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline mr0">
- <select name="bill_type" placeholder="璇烽�夋嫨鍗曟嵁绫诲瀷">
- <option value="" style="display: none"></option>
- <option value="1">閲囪喘鍏ュ簱</option>
- <option value="2">鐢熶骇鍏ュ簱</option>
- <option value="3">璋冩嫧鍏ュ簱</option>
- <option value="4">閿�鍞��鍥炲叆搴�</option>
- <option value="5">鍏朵粬鍏ュ簱</option>
- </select>
- </div>
- </div>
- <div class="layui-inline" style="width: 300px">
- <div class="layui-input-inline">
- <input class="layui-input layui-laydate-range" name="appe_time" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px">
+ <input name="experimentTypeName" class="layui-input" type="text" placeholder="杈撳叆鍗曟嵁缂栧彿"/>
</div>
</div>
<div class="layui-inline">
@@ -138,7 +122,365 @@
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/waitMatin/waitMatin.js" charset="utf-8"></script>
+<!--<script type="text/javascript" src="../../static/js/waitMatin/waitMatin.js" charset="utf-8"></script>-->
+<script>
+ var pageCurr;
+ layui.config({
+ base: baseUrl + "/static/layui/lay/modules/"
+ }).use(['layer', 'form', 'table', 'util', 'admin', 'xmSelect'], function () {
+ var $ = layui.jquery;
+ var layer = layui.layer;
+ var form = layui.form;
+ var table = layui.table;
+ var util = layui.util;
+ var admin = layui.admin;
+ var xmSelect = layui.xmSelect;
+
+ // 娓叉煋琛ㄦ牸
+ var insTb = table.render({
+ elem: '#waitMatin',
+ url: baseUrl+'/waitMatin/head/page/auth',
+ headers: {token: localStorage.getItem('token')},
+ page: true,
+ cellMinWidth: 100,
+ cols: [[
+ {type: 'numbers'},
+ {field: 'billNo', title: '鍗曟嵁缂栧彿', sort: true},
+ {field: 'billType$', align: 'center', title: '绫诲瀷', minWidth: 140, width: 140},
+ // {align: 'center', title: '鏄熸湡', templet: '#eCourseTbWeek', minWidth: 350, width: 350},
+ {align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 140, width: 140},
+ {
+ field: 'appeTime$', title: '鍒涘缓鏃堕棿', sort: true, templet: function (d) {
+ return util.toDateString(d.createTime);
+ }, width: 180
+ },
+ {align: 'center', title: '鎿嶄綔', toolbar: '#operate', minWidth: 130, width: 130}
+ ]],
+ request: {
+ pageName: 'curr',
+ pageSize: 'limit'
+ },
+ parseData: function (res) {
+ return {
+ 'code': res.code,
+ 'msg': res.msg,
+ 'count': res.data.total,
+ 'data': res.data.records
+ }
+ },
+ response: {
+ statusCode: 200
+ },
+ done: function (res) {
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ pageCurr=curr;
+ }
+ });
+
+ // 鎼滅储
+ form.on('submit(eCourseTbSearch)', function (data) {
+ insTb.reload({where: data.field, page: {curr: 1}});
+ });
+
+ // 娣诲姞
+ $("#eCourseAddBtn").click(function () {
+ showEditModel();
+ });
+
+ // 宸ュ叿鏉$偣鍑讳簨浠�
+ table.on('tool(waitMatin)', function (obj) {
+ var data = obj.data;
+ var layEvent = obj.event;
+ if (layEvent === 'edit') {
+ showEditModel(data);
+ } else if (layEvent === 'del') {
+ doDel(data.experimentTypeId);
+ } else if (layEvent === 'look') {
+ var $a = $(obj.tr).find('a[lay-event="look"]');
+ var offset = $a.offset();
+ var top = offset.top;
+ var left = offset.left;
+ layer.open({
+ type: 1,
+ title: false,
+ area: '630px',
+ offset: [top + 'px', (left - 530 + $a.outerWidth()) + 'px'],
+ shade: .01,
+ shadeClose: true,
+ fixed: false,
+ content: '<table id="lookSSXMTable" lay-filter="lookSSXMTable"></table>',
+ success: function (layero) {
+ table.render({
+ elem: '#lookSSXMTable',
+ headers: {token: localStorage.getItem('token')},
+ url: baseUrl+'/waitMatin/list/auth',
+ where: {
+ bill_no: data.billNo
+ },
+ page: true,
+ cellMinWidth: 100,
+ cols: [[
+ {type: 'numbers'},
+ {field: 'matNo', title: '鐗╂枡缂栫爜'},
+ {field: 'matName', title: '鐗╂枡鍚嶇О', width: 160},
+ {field: 'qty', title: '鏁伴噺'},
+ {
+ field: 'createTime$', title: '鍒涘缓鏃堕棿', sort: true, templet: function (d) {
+ return util.toDateString(d.createTime);
+ }, width: 180
+ }
+ ]],
+ request: {
+ pageName: 'curr',
+ pageSize: 'limit'
+ },
+ parseData: function (res) {
+ return {
+ 'code': res.code,
+ 'msg': res.msg,
+ 'count': res.data.total,
+ 'data': res.data.records
+ }
+ },
+ response: {
+ statusCode: 200
+ },
+ done: function () {
+ $(layero).find('.layui-table-view').css('margin', '0');
+ },
+ size: ''
+ });
+ }
+ });
+ }
+ });
+
+ // 鏄剧ず琛ㄥ崟寮圭獥
+ function showEditModel(expTpe) {
+ console.log(expTpe)
+ admin.open({
+ type: 1,
+ title: (expTpe ? '淇敼' : '娣诲姞') + '鍗曟嵁',
+ content: $('#editDialog').html(),
+ area: '700px',
+ success: function (layero, dIndex) {
+ $(layero).children('.layui-layer-content').css('overflow', 'visible');
+ var url = expTpe ? '../../json/ok.json' : '../../json/ok.json';
+ var isExpAdd = !expTpe;
+ // 鍥炴樉鏁版嵁
+ form.val('editForm', expTpe);
+ // 琛ㄥ崟鎻愪氦浜嬩欢
+ form.on('submit(waitMatinEditSubmit)', function (data) {
+ if (isExpAdd) {
+ if (xxDataList.length <= 0) {
+ layer.tips('璇锋坊鍔犲崟鎹槑缁�', '#matAddBtnComment', {tips: [1, '#ff4c4c']});
+ return false;
+ }
+ var nList = admin.util.deepClone(xxDataList);
+ for (var xi = 0; xi < nList.length; xi++) {
+ nList[xi].experimentId = undefined;
+ }
+ data.field.expListJson = JSON.stringify(nList);
+ }
+ layer.load(2);
+ $.get(url, data.field, function (res) {
+ layer.closeAll('loading');
+ if (res.code === 200) {
+ layer.close(dIndex);
+ insTb.reload({page: {curr: 1}});
+ layer.msg(res.msg, {icon: 1});
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }, 'json');
+ return false;
+ });
+ // 鏄庣粏琛ㄦ牸
+ var xxDataList = [];
+ var tbOptions = {
+ elem: '#formSSXMTable',
+ data: xxDataList,
+ page: true,
+ height: '350px;',
+ cellMinWidth: 100,
+ cols: [[
+ {type: 'numbers'},
+ {field: 'matNo', title: '鐗╂枡缂栫爜'},
+ {field: 'matName', title: '鐗╂枡鍚嶇О', width: 160},
+ {field: 'qty', title: '淇敼鏁伴噺', style: 'color: blue;font-weight: bold', edit: true, minWidth: 100, width: 100},
+ {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80}
+ ]],
+ done: function () {
+ $(layero).find('.layui-table-view').css('margin', '0');
+ },
+ size: ''
+ };
+ if (!isExpAdd) {
+ tbOptions.data = undefined;
+ tbOptions.url = '../../json/e-course-tb2.json?experimentTypeId=' + expTpe.experimentTypeId;
+ }
+ var insTbSSXM = table.render(tbOptions);
+ // 宸ュ叿鏉$偣鍑讳簨浠�
+ table.on('tool(formSSXMTable)', function (obj) {
+ var data = obj.data;
+ var layEvent = obj.event;
+ if (layEvent === 'edit') {
+ showEditModel2(data);
+ } else if (layEvent === 'del') {
+ layer.confirm('纭畾瑕佸垹闄ゅ悧锛�', {
+ shade: .1,
+ skin: 'layui-layer-admin'
+ }, function (i) {
+ layer.close(i);
+ for (var j = 0; j < xxDataList.length; j++) {
+ if (xxDataList[j].matNo === data.matNo) {
+ xxDataList.splice(j, 1);
+ }
+ }
+ insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
+ });
+ }
+ });
+ // 鏁伴噺淇敼
+ table.on('edit(formSSXMTable)', function (obj) {
+ let count = Number(obj.value);
+ if (isNaN(count)) {
+ layer.msg("璇疯緭鍏ユ暟瀛�");
+ } else {
+ if (count > 0) {
+ for (var i=0;i<xxDataList.length;i++){
+ if (xxDataList[i]["matNo"] === obj.data.matNo){
+ xxDataList[i]["qty"] = count;
+ break;
+ }
+ }
+ } else {
+ layer.msg("鏁伴噺蹇呴』澶т簬闆�");
+ }
+ }
+ insTbSSXM.reload({data: xxDataList});
+ });
+ //
+ $('#matAddBtnComment').click(function () {
+ showEditModel2();
+ });
+
+ // 鏄剧ず娣诲姞鏄庣粏琛ㄥ崟寮圭獥
+ function showEditModel2(exp) {
+ admin.open({
+ type: 1,
+ offset: '150px',
+ area: '480px',
+ title: (exp ? '淇敼' : '娣诲姞') + '鏄庣粏',
+ content: $('#matEditDialog').html(),
+ success: function (layero, dIndex) {
+ $(layero).children('.layui-layer-content').css('overflow', 'visible');
+ var url = exp ? '../../json/ok.json' : '../../json/ok.json';
+ // 鍥炴樉鏁版嵁
+ form.val('matEditForm', exp);
+ // 琛ㄥ崟鎻愪氦浜嬩欢
+ form.on('submit(matEditSubmit)', function (data) {
+ var existMats = [];
+ xxDataList.forEach(function(elem) {
+ existMats.push(elem.matNo);
+ });
+ var selectList = matXmSelect.getValue();
+ for (var i = 0; i<selectList.length; i++) {
+ var item = selectList[i];
+ if (existMats.indexOf(item.value) === -1) {
+ // 鏌ヨ鐗╂枡璇︽儏
+ $.ajax({
+ url: baseUrl+"/matCode/"+item.value+"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ async: false,
+ success: function (res) {
+ if (res.code === 200){
+ var mat = res.data;
+ xxDataList.push({
+ matNo: mat.matNo,
+ matName: mat.matName,
+ qty: 0.0
+ });
+ insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg, {icon: 2})
+ }
+ }
+ })
+ }
+ }
+ layer.close(dIndex);
+ return false;
+ });
+ // 娓叉煋鐗╂枡閫夋嫨
+ var matXmSelect = xmSelect.render({
+ el: '#mat',
+ style: {
+ width: '340px',
+ },
+ autoRow: true,
+ toolbar: { show: true },
+ filterable: true,
+ remoteSearch: true,
+ remoteMethod: function(val, cb, show){
+ $.ajax({
+ url: baseUrl+"/mat/all/get/kv",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ condition: val
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ cb(res.data)
+ } else {
+ cb([]);
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ });
+ }
+ })
+ // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
+ $(layero).children('.layui-layer-content').css('overflow', 'visible');
+ layui.form.render('select');
+ }
+ });
+ }
+
+ }
+ });
+ }
+
+ // 鍒犻櫎
+ function doDel(experimentTypeId) {
+ layer.confirm('纭畾瑕佸垹闄ゅ悧锛�', {
+ shade: .1,
+ skin: 'layui-layer-admin'
+ }, function (i) {
+ layer.close(i);
+ layer.load(2);
+ $.post('../../json/ok.json', {
+ experimentTypeId: experimentTypeId
+ }, function (res) {
+ layer.closeAll('loading');
+ if (res.code === 200) {
+ layer.msg(res.msg, {icon: 1});
+ insTb.reload({page: {curr: 1}});
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }, 'json');
+ });
+ }
+
+ });
+</script>
</body>
</html>
diff --git a/src/main/webapp/views/waitMatinLog/waitMatinLog.html b/src/main/webapp/views/waitMatinLog/waitMatinLog.html
index 86a8673..d4fe5be 100644
--- a/src/main/webapp/views/waitMatinLog/waitMatinLog.html
+++ b/src/main/webapp/views/waitMatinLog/waitMatinLog.html
@@ -16,7 +16,7 @@
<div id="search-box" class="layui-form layui-card-header">
<div class="layui-inline">
<div class="layui-input-inline">
- <input class="layui-input" type="text" name="id" placeholder="缂栧彿" autocomplete="off">
+ <input class="layui-input" type="text" name="bill_no" placeholder="缂栧彿" autocomplete="off">
</div>
</div>
<div class="layui-inline">
diff --git a/src/main/webapp/views/waitMatoutLog/waitMatoutLog.html b/src/main/webapp/views/waitMatoutLog/waitMatoutLog.html
index f13a805..61b0f75 100644
--- a/src/main/webapp/views/waitMatoutLog/waitMatoutLog.html
+++ b/src/main/webapp/views/waitMatoutLog/waitMatoutLog.html
@@ -16,7 +16,7 @@
<div id="search-box" class="layui-form layui-card-header">
<div class="layui-inline">
<div class="layui-input-inline">
- <input class="layui-input" type="text" name="id" placeholder="缂栧彿" autocomplete="off">
+ <input class="layui-input" type="text" name="bill_no" placeholder="缂栧彿" autocomplete="off">
</div>
</div>
<div class="layui-inline">
--
Gitblit v1.9.1