From e6d092d364c5f11f864b34a7dfe81977e65fb232 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期四, 13 六月 2024 09:02:07 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/order/order.js | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 46 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js index 159fa28..771480f 100644 --- a/src/main/webapp/static/js/order/order.js +++ b/src/main/webapp/static/js/order/order.js @@ -162,7 +162,7 @@ //{field: 'manu', title: '琛屽彿'}, {field: 'threeCode', title: '閿�鍞崟鍙�'}, {field: 'deadTime', title: '鑷敱椤�'}, - //{field: 'itemNum', title: '琛屽敮涓�鏍囪瘑'} + {field: 'processSts$', title: '宸ュ簭'} ]], request: { pageName: 'curr', @@ -195,8 +195,9 @@ type: 1, title: (expTpe ? '淇敼' : '娣诲姞') + '鍗曟嵁', content: $('#editDialog').html(), - area: '1300px', + area: '1600px', success: function (layero, dIndex) { + console.log(expTpe) $(layero).children('.layui-layer-content').css('overflow', 'visible'); var isExpAdd = !expTpe; // 鍥炴樉鏁版嵁 @@ -254,6 +255,13 @@ page: true, height: '350px;', cellMinWidth: 100, + + css: [ // 璁剧疆鍗曞厓鏍兼牱寮� + // 鍙栨秷榛樿鐨勬孩鍑洪殣钘忥紝骞惰缃�傚綋楂樺害 + '.layui-table-cell{height: 50px; line-height: 40px;}', + '.layui-table-cell .layui-colorpicker{width: 38px; height: 38px;}', + '.layui-table-cell select{height: 36px; padding: 0 5px;}' + ].join(''), cols: [[ {type: 'numbers', title: '#'}, {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160}, @@ -263,13 +271,37 @@ {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, {field: 'threeCode', title: '閿�鍞鍗曞彿(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, {field: 'deadTime', title: '閿�鍞鍗曡鍙�(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, + {field: 'processSts', title: '宸ュ簭', templet: function (d) { + console.log(d) + var select = `<select class="layui-select" name="processSts" data-state=${d.processSts} lay-filter="processStsSelect" data-value=${d.processSts} id=${d.id}> + <option value="">閫夋嫨鐘舵��</option> + <option value="1">寰呭姞宸�</option> + <option value="2">宸插姞宸�</option> + <option value="3">鏃犻渶鍔犲伐</option> + </select>`; + return select; + }}, // {field: 'inQty', title: '宸插叆搴撻噺', minWidth: 100, width: 100}, // {field: 'unit', title: '鍗曚綅', width: 80}, {field: 'memo', title: '澶囨敞' , edit: true}, {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} ]], - done: function (res) { + done: function (res,curr, count) { + console.log(res) $(layero).find('.layui-table-view').css('margin', '0'); + $(".layui-table-body").css('overflow','visible'); + $(".layui-table-box").css('overflow','visible'); + $(".layui-table-view").css('overflow','visible'); + + var tableElem = this.elem.next('.layui-table-view'); + count || tableElem.find('.layui-table-header').css('overflow', 'auto'); + layui.each(tableElem.find('select[name="processSts"]'), function (index, item) { + console.log(item) + var elem = $(item); + elem.val(elem.data('state')).parents('div.layui-table-cell').css('overflow', 'visible'); + }); + + form.render();//鍒锋柊琛ㄥ崟 }, size: '' }; @@ -314,6 +346,17 @@ }); } }); + // 宸ュ叿鏉$偣鍑讳簨浠� + form.on('select(processStsSelect)', function (obj) { + console.log(obj) + var id = obj.elem.id + var val = obj.value + for (let item of xxDataList) { + if (item.id == id) { + item.processSts = val + } + } + }); // 鏄庣粏鏁版嵁淇敼 table.on('edit(formSSXMTable)', function (obj) { let index = obj.tr.attr("data-index"); -- Gitblit v1.9.1