From acad71339e2a131f6ef72c9be912b9e70dd00af0 Mon Sep 17 00:00:00 2001 From: mrzhssss <pro6@qq.com> Date: 星期四, 24 三月 2022 15:17:16 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/quality/quality.js | 58 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 43 insertions(+), 15 deletions(-) diff --git a/src/main/webapp/static/js/quality/quality.js b/src/main/webapp/static/js/quality/quality.js index c5e961f..33657d5 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,15 @@ 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: '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} ]], @@ -132,6 +133,7 @@ // 鐩戝惉琛屽伐鍏蜂簨浠� table.on('tool(quality)', function(obj){ var data = obj.data; + billNO=data; switch (obj.event) { case 'edit': showEditModel(data); @@ -150,7 +152,7 @@ layer.open({ type: 1, title: false, - area: '2000px', + area: '1000px', offset: [offset.top + 'px', (offset.left - 530 + $a.outerWidth()) + 'px'], shade: .01, shadeClose: true, @@ -162,13 +164,13 @@ 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'}, @@ -177,7 +179,7 @@ {field: 'maktx', title: '浜у搧鍚嶇О', align: 'center'}, // {field: 'maktx', title: '浜у搧鍚嶇О', align: 'center'}, {field: 'prodDate$', title: '鐢熶骇鏃ユ湡', align: 'center'}, - {field: 'quaStatus', title: '妫�楠岀姸鎬�', align: 'center'}, + {field: 'quaStatus$', title: '妫�楠岀姸鎬�', align: 'center'}, {field: 'rejectQty', title: '涓嶅悎鏍兼暟閲�', align: 'center'}, {field: 'rejectReason', title: '涓嶅悎鏍煎師鍥�', align: 'center'}, @@ -216,7 +218,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); @@ -236,6 +238,7 @@ }else { layer.msg(res.msg, {icon: 2}); } + location.reload(); } }) return false; @@ -290,8 +293,9 @@ // 鏃堕棿閫夋嫨鍣� function layDateRender() { layDate.render({ - elem: '#modiTime\\$', - type: 'datetime' + elem: '#updateTime\\$', + type: 'datetime', + value: new Date() }); layDate.render({ elem: '#appeTime\\$', @@ -321,7 +325,6 @@ // 鎻愬彇浜у搧 var locDetlLayerIdx; function getLocDetl() { - locDetlLayerIdx = layer.open({ type: 2, title: '璐ㄦ鏄庣粏', @@ -332,4 +335,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