From d17c089f1d7ff3be848b05161917346e7f664a1d Mon Sep 17 00:00:00 2001
From: mrzhssss <pro6@qq.com>
Date: 星期二, 26 四月 2022 15:17:53 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/quality/quality.js | 73 ++++++++++++++++++++++++++----------
1 files changed, 52 insertions(+), 21 deletions(-)
diff --git a/src/main/webapp/static/js/quality/quality.js b/src/main/webapp/static/js/quality/quality.js
index c5e961f..c8bef69 100644
--- a/src/main/webapp/static/js/quality/quality.js
+++ b/src/main/webapp/static/js/quality/quality.js
@@ -1,4 +1,5 @@
var pageCurr;
+var billNO;
layui.config({
base: baseUrl + "/static/layui/lay/modules/"
}).use(['table','laydate', 'form', 'admin'], function(){
@@ -21,15 +22,16 @@
cellMinWidth: 50,
cols: [[
{type: 'checkbox'}
- ,{field: 'id', align: 'center',title: 'ID'}
+ //,{field: 'id', align: 'center',title: 'ID'}
,{field: 'billNo', align: 'center',title: '妫�楠岀紪鍙�'}
- ,{align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 140, width: 140}
- ,{field: 'auditStatus$', align: 'center',title: '瀹℃牳鐘舵��', width: 100}
+ ,{field: 'uuid', align: 'center',title: '鍏ュ簱鍗曞彿'}
+ ,{field: 'auditStatus$', align: 'center',title: '瀹℃牳鐘舵��'}
,{field: 'memo', align: 'center',title: '澶囨敞', hide:true}
- ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', width: 100}
- ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', width: 200}
- ,{field: 'appeUser$', align: 'center',title: '鍒涘缓鑰�', hide:true}
- ,{field: 'appeTime$', align: 'center',title: '娣诲姞鏃堕棿', hide:true}
+ ,{align: 'center', title: '鏄庣粏', toolbar: '#tbLook'}
+ ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳'}
+ ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
+ ,{field: 'createBy$', align: 'center',title: '鍒涘缓鑰�', hide:true}
+ ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿', hide:true}
,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
]],
@@ -77,6 +79,7 @@
switch(obj.event) {
case 'addData':
showEditModel();
+ initOrderNo1();
break;
case 'deleteData':
if (checkStatus.length === 0) {
@@ -132,6 +135,7 @@
// 鐩戝惉琛屽伐鍏蜂簨浠�
table.on('tool(quality)', function(obj){
var data = obj.data;
+ billNO=data;
switch (obj.event) {
case 'edit':
showEditModel(data);
@@ -150,7 +154,7 @@
layer.open({
type: 1,
title: false,
- area: '2000px',
+ area: '1200px',
offset: [offset.top + 'px', (offset.left - 530 + $a.outerWidth()) + 'px'],
shade: .01,
shadeClose: true,
@@ -162,23 +166,23 @@
headers: {token: localStorage.getItem('token')},
url: baseUrl+'/qualityDetl/list/auth',
where: {
- quality_id: data.id
+ bill_no: data.billNo
},
limit: 5,
page: true,
cellMinWidth: 100,
cols: [[
- {type: 'numbers'},
+ // {type: 'numbers'},
// {field: 'billNo', title: '妫�楠岀紪鍙�', align: 'center'},
- {field: 'seqNo', title: '鍗曟嵁琛屽彿', align: 'center'},
- {field: 'orderNo', title: '鍏ュ簱鍗曞彿', align: 'center'},
- {field: 'anfme', title: '寰呭叆搴撴暟閲�', align: 'center'},
- {field: 'matnr', title: '浜у搧ID', align: 'center'},
- {field: 'maktx', title: '浜у搧鍚嶇О', align: 'center'},
+ {field: 'seqNo', title: '琛屽彿', align: 'center', width:60},
+ {field: 'orderNo', title: '鍏ュ簱鍗曞彿', align: 'center', width:175},
+ {field: 'anfme', title: '寰呭叆鏁伴噺', align: 'center', width:90},
+ {field: 'matnr', title: '浜у搧缂栫爜', align: 'center', width:175},
+ {field: 'maktx', title: '浜у搧鍚嶇О', align: 'center', width:175},
// {field: 'maktx', title: '浜у搧鍚嶇О', align: 'center'},
{field: 'prodDate$', title: '鐢熶骇鏃ユ湡', align: 'center'},
- {field: 'quaStatus', title: '妫�楠岀姸鎬�', align: 'center'},
- {field: 'rejectQty', title: '涓嶅悎鏍兼暟閲�', align: 'center'},
+ {field: 'quaStatus$', title: '妫�楠岀姸鎬�', align: 'center', width:90},
+ {field: 'rejectQty', title: '涓嶅悎鏍兼暟閲�', align: 'center', width:100},
{field: 'rejectReason', title: '涓嶅悎鏍煎師鍥�', align: 'center'},
]],
@@ -216,7 +220,7 @@
title: (mData ? '淇敼' : '娣诲姞') + '璁㈠崟鐘舵��',
content: $('#editDialog').html(),
success: function (layero, dIndex) {
- layDateRender();
+ layDateRender(mData);
form.val('detail', mData);
form.on('submit(editSubmit)', function (data) {
var loadIndex = layer.load(2);
@@ -231,11 +235,13 @@
layer.close(dIndex);
layer.msg(res.msg, {icon: 1});
tableReload();
+ location.reload();
} else if (res.code === 403){
top.location.href = baseUrl+"/";
}else {
layer.msg(res.msg, {icon: 2});
}
+ // location.reload();
}
})
return false;
@@ -290,8 +296,9 @@
// 鏃堕棿閫夋嫨鍣�
function layDateRender() {
layDate.render({
- elem: '#modiTime\\$',
- type: 'datetime'
+ elem: '#updateTime\\$',
+ type: 'datetime',
+ value: new Date()
});
layDate.render({
elem: '#appeTime\\$',
@@ -321,7 +328,6 @@
// 鎻愬彇浜у搧
var locDetlLayerIdx;
function getLocDetl() {
-
locDetlLayerIdx = layer.open({
type: 2,
title: '璐ㄦ鏄庣粏',
@@ -332,4 +338,29 @@
success: function(layero, index){
}
});
+}
+
+function getbillData(){
+ return billNO;
+}
+
+function initOrderNo1() {
+ $.ajax({
+ url: baseUrl+"/quality/orderNo/init1",
+ headers: {'token': localStorage.getItem('token')},
+ async: false,
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ $('#billNo').val(res.data)
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ notice.error({
+ title: '娑堟伅閫氱煡',
+ message: res.msg
+ });
+ }
+ }
+ });
}
\ No newline at end of file
--
Gitblit v1.9.1