| | |
| | | // var data_doDel = Mock.mock('/transport/yscompany/del.htm', {code: 0, errmsg: 'errmsg'}) |
| | | // var data_doSave = Mock.mock('/transport/yscompany/save.htm', {code: 0, errmsg: 'errmsg'}) |
| | | //test data end |
| | | |
| | | /* |
| | | * 配车成功 ---- 需要添加随行人员 ---- 是否立即添加 随行人员 ----- 确定 --- 跳转到添加页面(绑定车辆、业务单、人员关系) ---车辆任务页面也可以添加或修改(绑定车辆、业务单、人员关系) |
| | | */ |
| | | var SORT = [ |
| | | {key: '批次号', value: 'tdmx_fdcph', visible: ko.observable(true)}, |
| | | {key: '规格型号', value: 'tdmx_ggxh', visible: ko.observable(true)}, |
| | |
| | | modal: $('#modal'), |
| | | clearSortBtn: $('#clearSortBtn'), |
| | | ssortBtn:$('#searchSortBtn'), |
| | | sxBtn:$('#sxBtn') |
| | | sxBtn:$('#sxBtn'), |
| | | personModal:$("#personModal"), |
| | | addPerson: $("#addPerson") |
| | | } |
| | | |
| | | var Obj = { |
| | |
| | | vm.o(ko.mapping.fromJS(Obj)); |
| | | I.tempVehicleModal.modal('show'); |
| | | }); |
| | | // I.addPerson.click(function (e) { |
| | | // e.preventDefault(); |
| | | // // vm.o(ko.mapping.fromJS(Obj)); |
| | | // // I.personModal.modal('show'); |
| | | // var item = {businessNo:'XS202203060079',vehicleId: '沪EJ3876'} |
| | | // addPersonTab(item); |
| | | // }); |
| | | I.tempVehicleModal.on('hidden.bs.modal', function (e) { |
| | | clearError(); |
| | | }); |
| | |
| | | // } |
| | | // }); |
| | | // }); |
| | | // 配车 |
| | | updateNum(); |
| | | var item = {businessNo: data.item.businessNo, vehicleId: vehicle.vehicleId} |
| | | confirmAddCarPersonTab(item); |
| | | getVehicleList(); |
| | | return; |
| | | } |
| | |
| | | "json" |
| | | ); |
| | | } |
| | | function confirmAddCarPersonTab(item) { |
| | | swal({ |
| | | title: "是否需要添加随车人员?", text: "如果不添加或需要修改,请到车辆任务详情处操作。", type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#1c84c6", |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | closeOnConfirm: true, |
| | | closeOnCancel: true, |
| | | }, function (isConfirm) { |
| | | if (isConfirm) { |
| | | addPersonTab(item) |
| | | } |
| | | }); |
| | | } |
| | | function addPersonTab(item){ |
| | | var businessNo = item.businessNo |
| | | var vehicleId = item.vehicleId |
| | | parent.closableTab.addTab({ |
| | | 'id': "carPersons-" + businessNo + "-" + vehicleId, |
| | | 'name': '添加随行人员', |
| | | 'url': '/basic/carPersons.jsf?businessNo=' + businessNo + '&vehicleId=' + vehicleId, |
| | | 'closable': true |
| | | }); |
| | | } |
| | | |
| | | function doUnbind() { |
| | | if (!!I.AjaxdoUnbind) { |