| | |
| | | |
| | | netWeight = netWeight.toFixed(0); |
| | | recordWeight = recordWeight.toFixed(0); |
| | | settleWeight = recordWeight.toFixed(0); |
| | | settleWeight = settleWeight.toFixed(0); |
| | | |
| | | form.val("form-data", { |
| | | netWeight: netWeight, |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 弹出提醒框 |
| | | * @param msg 提醒信息 |
| | | * @param data 数据信息,可能为空 |
| | | */ |
| | | function notify(msg, data) { |
| | | if (data) { |
| | | //赋值 |
| | | $("#resultMsg").text(msg); |
| | | $("#resultUserName").text(data.userName); |
| | | $("#resultPlateNum").text(data.plateNum); |
| | | if ("IN" == data.type) { |
| | | $("#resultType").text("入库-" + INOUT_PROGRESS_MSG(data.progress)); |
| | | } else { |
| | | $("#resultType").text("出库-" + INOUT_PROGRESS_MSG(data.progress)); |
| | | } |
| | | $("#resultIntelCard").text(data.intelCard); |
| | | |
| | | layer.open({ |
| | | type: 1, |
| | | offset: ['150px', '200px'], |
| | | area: '450px;', |
| | | shade: 0.8, |
| | | id: 'dialog_notify_info', |
| | | btn: ['确定'], |
| | | content: $('#dialog-from-notify'), |
| | | yes: function (index) { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } else { |
| | | layer.alert(msg, {offset: ['300px', '300px']}); |
| | | // ---------------------------通知单-开始 -------------------// |
| | | // 弹出往来单位下拉框 |
| | | function showNotice() { |
| | | var titleCustomer = "送货单位"; |
| | | var url = "../../basic/inout/list-notice-in"; |
| | | if ("OUT" == type) { |
| | | titleCustomer = "收货单位"; |
| | | url = "../../basic/inout/list-notice-out" |
| | | } |
| | | var index = layer.load(); |
| | | var param = { |
| | | type: type |
| | | }; |
| | | |
| | | console.log(url); |
| | | |
| | | table.render({ |
| | | elem: '#tableNotice', |
| | | url: url, |
| | | page: false, |
| | | even: true, |
| | | method: 'POST', |
| | | contentType: "application/json;charset=UTF-8", |
| | | cols: [[{ |
| | | field: 'name', |
| | | title: '通知单名称', |
| | | width: '15%' |
| | | }, { |
| | | field: 'customerName', |
| | | title: titleCustomer |
| | | }, { |
| | | field: 'foodVarietyName', |
| | | title: '粮食品种', |
| | | width: '10%' |
| | | }, { |
| | | field: 'year', |
| | | title: '年份', |
| | | width: '8%' |
| | | }, { |
| | | field: 'depotName', |
| | | title: "所涉仓库" |
| | | }, { |
| | | field: 'contractName', |
| | | title: '所属合同' |
| | | }]], |
| | | where: param, |
| | | parseData: function (res) { |
| | | if ("0000" == res.code) { |
| | | return { |
| | | "code": "0", |
| | | "msg": res.msg, |
| | | "data": res.data |
| | | } |
| | | } else { |
| | | return { |
| | | "code": "1", |
| | | "msg": res.msg |
| | | } |
| | | } |
| | | }, |
| | | done: function (res) { |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | //双击显示选中数据 |
| | | table.on('rowDouble(tableNotice)', function (obj) { |
| | | var data = obj.data; |
| | | form.val("form-data", { |
| | | customerName: data.customerName, |
| | | noticeId: data.id |
| | | }); |
| | | layer.closeAll(); |
| | | }); |
| | | // 弹出对话框 |
| | | layer.open({ |
| | | type: 1, |
| | | offset: ['100px', '250px'], |
| | | title: "通知单列表(双击选中)", |
| | | area: ['900px', '600px'], |
| | | shade: 0, |
| | | content: $('#listNotice'), |
| | | btn: 0, |
| | | btn: ['取消'], |
| | | yes: function () { |
| | | layer.closeAll(); |
| | | }, |
| | | closeBtn: 0 |
| | | }); |
| | | } |
| | | |
| | | |
| | | // ---------------------------粮食产地 -开始 -------------------// |
| | | // 弹出往来单位下拉框 |
| | | // ---------------------------粮食产地-开始 -------------------// |
| | | function showFoodLocation() { |
| | | var index = layer.load(); |
| | | // 渲染往来单位列表 |
| | | table.render({ |
| | | elem: '#tableFoodLoaction', |
| | | url: '../../basic/common/page-food-location', |
| | | url: '../../basic/common/page-dicArea', |
| | | page: false, |
| | | // limit : limit, |
| | | // skin : "nob", |
| | | // size : 'sm', |
| | | toolbar: '#toolbarFoodLocaton', |
| | | even: true, |
| | | method: 'POST', |
| | |
| | | // 赋值 |
| | | form.val("form-data", { |
| | | foodLocation: data.name, |
| | | foodLocationId: data.code |
| | | }); |
| | | // 关闭 |
| | | layer.closeAll(); |
| | |
| | | function flushFoodLocation() { |
| | | var key = $("#key2").val(); |
| | | table.reload('tableFoodLoaction', { |
| | | url: "../../basic/common/page-food-location", |
| | | url: "../../basic/common/page-dicArea", |
| | | where: { |
| | | key: key |
| | | }, |