| | |
| | | private Long orderId; |
| | | |
| | | /** |
| | | * 单据编号 |
| | | */ |
| | | @ApiModelProperty(value= "单据编号") |
| | | @TableField("order_no") |
| | | private Long orderNo; |
| | | |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | |
| | | mapper-locations: classpath:mapper/*.xml |
| | | # global-config: |
| | | # field-strategy: 0 |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | logging: |
| | | path: /stock/out/@pom.build.finalName@/logs |
| | |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.OrderDetl"> |
| | | <id column="id" property="id" /> |
| | | <result column="order_id" property="orderId" /> |
| | | <result column="order_no" property="orderNo" /> |
| | | <result column="anfme" property="anfme" /> |
| | | <result column="qty" property="qty" /> |
| | | <result column="matnr" property="matnr" /> |
| | |
| | | var pageCurr; |
| | | var tableData; |
| | | var insTb2; |
| | | const sensorType = 5; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).extend({ |
| | |
| | | var treeTable = layui.treeTable; |
| | | var xmSelect = layui.xmSelect; |
| | | |
| | | // 设备类型数据 |
| | | var modelTb = treeTable.render({ |
| | | elem: '#nothing', |
| | | url: baseUrl+'/sensorModel/list/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | tree: { |
| | | iconIndex: 2, // 折叠图标显示在第几列 |
| | | isPidData: true, // 是否是id、pid形式数据 |
| | | idName: 'id', // id字段名称 |
| | | pidName: 'parentId' // pid字段名称 |
| | | }, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{type: 'numbers'} |
| | | ,{field: 'name', align: 'left',title: '名称', minWidth: 150} |
| | | ]], |
| | | done: function (data) { |
| | | modelTb.expandAll(); |
| | | } |
| | | }); |
| | | |
| | | insTb2 = table.render({ |
| | | elem: '#sensorTable', |
| | | elem: '#orderDetlTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/sensor/list/auth?sensor_type='+sensorType, |
| | | url: baseUrl+'/orderDetl/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#sensorToolbar', |
| | | toolbar: '#orderDetToolbar', |
| | | height: 'full-100', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', align: 'center',title: 'ID'} |
| | | ,{field: 'hostId$', align: 'center',title: '所属项目', templet: '#hostTpl', width: 130} |
| | | // ,{field: 'sensorType$', align: 'center',title: '设备类型'} |
| | | ,{field: 'uuid', align: 'center',title: '设备编码', width: 160} |
| | | ,{field: 'location', align: 'center',title: '地理位置', width: 180, style: 'font-size: 13px', hide: false} |
| | | ,{field: 'sensorModel$', align: 'center',title: '设备型号', width: 130, hide: false} |
| | | // ,{field: 'ccid', align: 'center',title: 'CCID'} |
| | | ,{field: 'sim', align: 'center',title: 'sim卡号',hide: true} |
| | | // ,{field: 'name', align: 'center',title: '设备名'} |
| | | // ,{field: 'topic', align: 'center',title: '主题'} |
| | | // ,{field: 'ip', align: 'center',title: 'ip'} |
| | | // ,{field: 'port', align: 'center',title: '端口'} |
| | | // ,{field: 'data', align: 'center',title: '报文'} |
| | | // ,{field: 'lon', align: 'center',title: '经度'} |
| | | // ,{field: 'lat', align: 'center',title: '纬度'} |
| | | ,{field: 'signal', align: 'center',title: '信号值'} |
| | | ,{field: 'battery', align: 'center',title: '电量',hide: true} |
| | | // ,{field: 'charge$', align: 'center',title: '充电状态'} |
| | | // ,{field: 'tiltX', align: 'center',title: 'x轴倾斜'} |
| | | // ,{field: 'tiltY', align: 'center',title: 'y轴倾斜'} |
| | | // ,{field: 'tiltZ', align: 'center',title: 'z轴倾斜'} |
| | | // ,{field: 'tilt$', align: 'center',title: '倾斜状态'} |
| | | ,{field: 'tempe', align: 'center',title: '温度', hide: true} |
| | | ,{ |
| | | field: 'online', title: '网络', templet: function (d) { |
| | | var strs = [ |
| | | '<span class="text-success">在线</span>', |
| | | '<span class="text-danger">离线</span>' |
| | | ]; |
| | | return strs[d.online?0:1]; |
| | | }, align: 'center', sort: true |
| | | } |
| | | ,{ |
| | | field: 'error', title: '状态', templet: function (d) { |
| | | var strs = [ |
| | | '<span class="layui-badge layui-badge-red">异常</span>', |
| | | '<span class="layui-badge layui-badge-green">正常</span>' |
| | | ]; |
| | | return strs[d.error?0:1]; |
| | | }, align: 'center', sort: false, minWidth: 70, hide: false |
| | | } |
| | | // ,{field: 'worn$', align: 'center',title: '破损状态'} |
| | | // ,{field: 'overflow$', align: 'center',title: '定点水位'} |
| | | // ,{field: 'nsAngle', align: 'center',title: '南北角度'} |
| | | // ,{field: 'waterGage', align: 'center',title: '管道水压'} |
| | | // ,{field: 'harmGas', align: 'center',title: '有害气体'} |
| | | // ,{field: 'lnGas', align: 'center',title: '可燃气体'} |
| | | // ,{field: 'hsGas', align: 'center',title: '硫化氢气体'} |
| | | // ,{field: 'reserve0', align: 'center',title: '预留0'} |
| | | // ,{field: 'reserve1', align: 'center',title: '预留1'} |
| | | // ,{field: 'status$', align: 'center',title: '状态', templet: '#statusTpl', width: 120, unresize: true} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间', minWidth: 170} |
| | | // ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'addr', align: 'center',title: '详细地址', hide: true} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ,{type: 'number', title: '#'} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'matnr', align: 'center',title: '商品编码'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称'} |
| | | ,{field: 'name', align: 'center',title: '名称'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '型号'} |
| | | ,{field: 'batch', align: 'center',title: '批号'} |
| | | ,{field: 'unit', align: 'center',title: '单位'} |
| | | ,{field: 'barcode', align: 'center',title: '商品条码'} |
| | | ,{field: 'supplier', align: 'center',title: '供应商'} |
| | | ,{field: 'unitPrice', align: 'center',title: '单价'} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数'} |
| | | ,{field: 'count', align: 'center',title: '数量'} |
| | | ,{field: 'weight', align: 'center',title: '重量'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 160} |
| | | ]], |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.sensorTable; |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | |
| | | cols: [[ |
| | | // {type: 'number', title: '#'}, |
| | | {field: 'orderTime', title: '日期'}, |
| | | {field: 'orderNo', title: '编号', align: 'center'} |
| | | {field: 'orderNo', title: '单据编号', align: 'center'} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | console.log(res) |
| | |
| | | table.on('row(originTable)', function (obj) { |
| | | selObj = obj; |
| | | obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click'); |
| | | insTb2.reload({where: {host_id: obj.data.id}, page: {curr: 1}}); |
| | | insTb2.reload({where: {order_id: obj.data.id}, page: {curr: 1}}); |
| | | }); |
| | | |
| | | /* 显示表单弹窗 */ |
| | |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <table id="sensorTable" lay-filter="sensorTable"></table> |
| | | <table id="orderDetlTable" lay-filter="orderDetlTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | |
| | | <!-- 头工具栏 --> |
| | | <script type="text/html" id="sensorToolbar"> |
| | | <script type="text/html" id="orderDetToolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm layui-btn-normal" id="btn-add" lay-event="add"><i class="layui-icon"></i>新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="del"><i class="layui-icon"></i>删除</button> |