|  |  | 
 |  |  |         cellMinWidth: 50, | 
 |  |  |         cols: [[ | 
 |  |  |             {type: 'numbers', fixed: 'left'} | 
 |  |  |             ,{field: 'node_name', align: 'center',title: '货位'} | 
 |  |  |             ,{field: 'locNo$', align: 'center',title: '库位'} | 
 |  |  |             ,{field: 'matnr', align: 'center',title: '商品编号'} | 
 |  |  |             ,{field: 'maktx', align: 'center',title: '商品名称'} | 
 |  |  |             ,{field: 'progress', align: 'center',title: '使用情况', templet: '#progressTpl', width: 350} | 
 |  |  |             ,{field: 'status', align: 'center',title: '警报', templet: '#statusTpl', width: 100} | 
 |  |  |             ,{field: 'safe_qua', align: 'center',title: '安全库存量', style: 'font-weight: bold'} | 
 |  |  |             ,{field: 'safeQua', align: 'center',title: '安全库存量', style: 'font-weight: bold'} | 
 |  |  |             ,{field: 'amount', align: 'center',title: '当前库存量', style: 'font-weight: bold; color: #2d8cf0'} | 
 |  |  |             ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} | 
 |  |  |         ]], | 
 |  |  | 
 |  |  |             case 'del': | 
 |  |  |                 var params = []; | 
 |  |  |                 params.push({ | 
 |  |  |                     nodeId: data.node_id, | 
 |  |  |                     nodeName: data.node_name, | 
 |  |  |                     id: data.id, | 
 |  |  |                     locNo: data.locNo, | 
 |  |  |                     matnr: data.matnr | 
 |  |  |                 }) | 
 |  |  |                 doDel(params); | 
 |  |  | 
 |  |  |                 form.val('detail', mData); | 
 |  |  |                 // 表单提交事件 | 
 |  |  |                 form.on('submit(editSubmit)', function (data) { | 
 |  |  |                     data.field.nodeId = insNodeXmSel.getValue()[0] ? insNodeXmSel.getValue()[0].id : null; | 
 |  |  |                     data.field.locNo = locNoXmSelect.getValue()[0] ? locNoXmSelect.getValue()[0].name : null; | 
 |  |  |                     data.field.matId = matXmSelect.getValue()[0] ? matXmSelect.getValue()[0].value : null; | 
 |  |  |                     var loadIndex = layer.load(2); | 
 |  |  |                     $.ajax({ | 
 |  |  | 
 |  |  |                     }) | 
 |  |  |                     return false; | 
 |  |  |                 }); | 
 |  |  |                 // 渲染仓库下拉树 | 
 |  |  |                 var insNodeXmSel; | 
 |  |  |                 $.ajax({ | 
 |  |  |                     url: baseUrl + "/node/tree/auth", | 
 |  |  |                     headers: {'token': localStorage.getItem('token')}, | 
 |  |  |                     method: 'POST', | 
 |  |  |                     async: false, | 
 |  |  |                     success: function (res) { | 
 |  |  |                         if (res.code === 200) { | 
 |  |  |                             insNodeXmSel = xmSelect.render({ | 
 |  |  |                                 el: '#nodeSel', | 
 |  |  |                                 autoRow: true, | 
 |  |  |                                 radio: true,  // 单选 | 
 |  |  |                                 filterable: true, | 
 |  |  |                                 height: '300px', | 
 |  |  |                                 tree: { | 
 |  |  |                                     show: true, | 
 |  |  |                                     showFolderIcon: true, | 
 |  |  |                                     showLine: true, | 
 |  |  |                                     indent: 20, | 
 |  |  |                                     strict: false,  // 父节点也能选中,重要 | 
 |  |  |                                     clickExpand: true, | 
 |  |  |                                     clickCheck: false, | 
 |  |  |                                     expandedKeys: true | 
 |  |  |                                 }, | 
 |  |  |                                 prop: { | 
 |  |  |                                     name: 'title', | 
 |  |  |                                     value: 'id', | 
 |  |  |                                 }, | 
 |  |  |                                 toolbar: { | 
 |  |  |                                     show: true, | 
 |  |  |                                     list: ['ALL', 'REVERSE', 'CLEAR'] | 
 |  |  |                                 }, | 
 |  |  |                                 data: function(){ | 
 |  |  |                                     return res.data | 
 |  |  |                 // 渲染商品选择 | 
 |  |  |                 var locNoXmSelect = xmSelect.render({ | 
 |  |  |                     el: '#locNo', | 
 |  |  |                     radio: true, | 
 |  |  |                     autoRow: true, | 
 |  |  |                     toolbar: { show: true }, | 
 |  |  |                     filterable: true, | 
 |  |  |                     remoteSearch: true, | 
 |  |  |                     remoteMethod: function(val, cb, show){ | 
 |  |  |                         //这里如果val为空, 则不触发搜索 | 
 |  |  |                         // if(!val){ | 
 |  |  |                         //     return cb([]); | 
 |  |  |                         // } | 
 |  |  |                         $.ajax({ | 
 |  |  |                             url: baseUrl+"/locMast/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}); | 
 |  |  |                                 } | 
 |  |  |                             }) | 
 |  |  |                         } else { | 
 |  |  |                             layer.msg(res.msg, {icon: 2}); | 
 |  |  |                         } | 
 |  |  |                             } | 
 |  |  |                         }); | 
 |  |  |                     } | 
 |  |  |                 }) | 
 |  |  |                 // 渲染商品选择 |