diff --git a/js/car_application_audit/car_audit_detail.js b/js/car_application_audit/car_audit_detail.js index f30f99e..7bb087e 100644 --- a/js/car_application_audit/car_audit_detail.js +++ b/js/car_application_audit/car_audit_detail.js @@ -56,87 +56,176 @@ function setParams(obj) { form = layui.form; layer = layui.layer; table = layui.table; - getNeedPlanDetails(); - initTable(); + getBalanceDataDetails(); + // initTable(); }); } // 详情 -function getNeedPlanDetails() { - let params = { - encryptedData: JSON.stringify({ - 'id': objParam.id - }) - }; - let url = dataUrl + 'backstage/carNeedPlan/getNeedPlanDetails'; - ajaxRequest(url, "POST", params, true, function () { +function getBalanceDataDetails() { + let encryptedData = {id: objParam.id}; + let url = dataUrl + 'backstage/carBalance/getBalanceDataDetails?encryptedData=' + encodeURIComponent(JSON.stringify(encryptedData)); + ajaxRequest(url, "GET", null, true, function () { }, function (result) { if (result.code === 200) { setPlanBasicTableInfo(result.data); - setOperRecordInfo(result.data.recordList, result.data); - setCheckStatus(result.data); + setOperRecordInfo(result.data.aulditList, result.data); + // setCheckStatus(result.data); + + // 计划明细回显 + planDetail(result.data.planList) + // 用车明细回显 + carDetail(result.data.detailsList) } }, function (xhr, status, error) { errorFn(xhr, status, error) }, null); } -// 基本信息 -function setPlanBasicTableInfo(obj) { - $('#proName').html(obj.proName); - $('#projectPart').html(obj.projectPart); - $('#projectContent').html(obj.projectContent); - $('#needTime').html(obj.needTime); - $('#remark').html(obj.remark); - - $('#carLength').html(obj.carLength); - $('#carWidth').html(obj.carWidth); - $('#carHeight').html(obj.carHeight); - $('#carWeight').html(obj.carWeight); - $('#carStart').html(obj.carStart); - $('#carEnd').html(obj.carEnd); - - setRoutePoint(obj.routePoint); - - // 附件文档 - setFileTable(obj.fileList); +function planDetail(list) { + $('#plan-detail-table tr:not(:first)').remove(); + if (list.length > 0) { + let html = ''; + $.each(list, function (index, item) { + html += '' + + '' + (index + 1) + '' + + '' + item.proName + '' + + '' + item.code + '' + + '' + item.supName + '' + + '' + item.carNum + '' + + '' + item.money + '' + + '' + item.ygMoney + '' + + ''; + }); + $('#plan-detail-table').append(html); + } } -function setRoutePoint(data) { - // 清空之前的表格 - $('#routePoint').empty(); - let html = ''; - html += ""; - if (data != null && data !== "") { - // 分割数据并过滤掉空值 - let result = data.split("routePoint;").filter(item => item.trim() !== ""); - if (result && result.length > 0) { - // 动态生成表头 - html += ""; - for (let i = 0; i < Math.min(result.length, 4); i++) { - html += ""; - } - html += ""; - // 动态生成表格内容,每行最多 4 列 - let rowCount = Math.ceil(result.length / 4); // 计算需要多少行 - for (let row = 0; row < rowCount; row++) { - html += ""; - for (let col = 0; col < 4; col++) { - let index = row * 4 + col; - if (index < result.length) { - html += ""; - } else { - html += ""; // 如果没有数据,填充空白单元格 - } - } - html += ""; +function carDetail(list) { + // 派车明细 + let carList = list.filter(item => { + return item.type === '车辆'; + }) + let dcList = list.filter(item => { + return item.type === '吊车'; + }) + setDispatchCarTable(carList); + setDispatchCarTable2(dcList); + + // 派车明细-车辆 + function setDispatchCarTable(list) { + $('#dispatch-car-table tr:not(:first)').remove(); + if (list.length > 0) { + let html = ''; + if (list && list.length > 0) { + $.each(list, function (index, item) { + let imgNum = 0; + imgNum += item.carImage.filter(item => { + return item.type !== '6' + }).length; + imgNum += item.driverUserImage.filter(item => { + return item.type !== '6' + }).length; + imgNum += item.fileList.length; + + const actualGls = item.exeGls; // 实际公里数初始=预估公里数 + + html += "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + + "" + + "" + + "" + + "" + + "" + + ""; + }) + } else { + html = ''; } + $('#dispatch-car-table').removeAttr('style').append(html); + } else { + $('#dispatch-car-table').css('display', 'none'); } } - html += "
途经点
" + result[index] + "
" + item.type + "" + item.name + "" + item.model + "" + item.carNum + "" + (item.ton + '吨') + "" + item.goodsName + "" + item.startAddress + "" + item.endAddress + "" + actualGls + "" + item.glsPrice + " ¥ " + (item.glsMoney ? item.glsMoney : 0) + "" + imgNum + "查看附件>>" + item.planCode + "
暂无数据
"; - // 将生成的 HTML 插入到页面中 - $('#routePoint').append(html); + + // 派车明细-吊车 + function setDispatchCarTable2(list) { + $('#dispatch-car-table2 tr:not(:first)').remove(); + if (list.length > 0) { + let html = ''; + if (list && list.length > 0) { + $.each(list, function (index, item) { + let imgNum = 0; + imgNum += item.driverUserImage.filter(item => { + return item.type === '2' || item.type === '3' + }).length; + imgNum += item.operaImage.filter(item => { + return item.type === '2' || item.type === '3' || item.type === '6' + }).length; + imgNum += item.fileList.length; + + const actualPlanDay = item.exeDay || 0; + const actualDcMoney = item.money; + + html += '' + + '' + item.type + '' + + '' + item.name + '' + + '' + item.model + '' + + '' + item.carNum + '' + + '' + item.useAddress + '' + + '' + item.exeDay + '' + + + '' + setZlPrice(item) + '' + + ' ¥ ' + item.dcMoney + '' + + '' + actualDcMoney + '' + + + "" + imgNum + "查看附件>>" + + "" + item.planCode + "" + + ''; + }) + } else { + html = '暂无数据'; + } + $('#dispatch-car-table2').removeAttr('style').append(html); + + // 设置租赁单价 + function setZlPrice(item) { + let html = ''; + if (item.dcUnit === '元/月/台') { + html += '

' + item.monthPrice + '(' + item.dcUnit + ')' + '

'; + } else { + html += '

' + item.dayPrice + '(' + item.dcUnit + ')' + '

'; + } + if (item.isOutSet === 1) { + html += '

' + (item.jcMoney ? item.jcMoney : 0) + '(进出场费)

' + } + return html; + } + } else { + $('#dispatch-car-table2').css('display', 'none'); + } + } +} + +// 基本信息 +function setPlanBasicTableInfo(dataObj) { + $('#supId').html(dataObj.supId); + $('#supName').html(dataObj.supName); + $('#fkTime').html(dataObj.fkTime); + $('#money').html(dataObj.money); + $('#remark').html(dataObj.remark); + $('#planListNum').html(dataObj.planList.length) + // 附件文档 + setFileTable(dataObj.fileList); } // 附件文档赋值 @@ -421,43 +510,46 @@ function setOperRecordInfo(list, obj) { let imgUrl = '../../../images/user_head_icon.png'; let imgUrl2 = '../../../images/time_icon.png'; $.each(list, function (index, item) { - const creator = (item.nikeName ? item.nikeName : item.userName); + const creator = item.userName; // 1. 容错处理(统一处理空值、类型转换) - const remark = setNullValue(item.auditRemark); // 已有空值处理,保留 + const remark = setNullValue(item.auditReason); // 已有空值处理,保留 const auditType = item.auditType + ''; // 确保为字符串(匹配原条件的字符串判断) const auditStatus = item.auditStatus + ''; // 确保为字符串 - const times = setNullValue(item.times) || '0'; // 时间间隔容错(避免拼接 undefined) + const times = setNullValue(item.auditTime) || '0'; // 时间间隔容错(避免拼接 undefined) -// 2. 部门映射表(替代多 if-else,清晰直观) + // 2. 部门映射表(替代多 if-else,清晰直观) const deptMap = { - '0': '项目部', + '0': '分包商', '1': '项目部', - '-1': '项目部', - '2': '分公司', - '3': '项管中心', - '4': '智联装备云控公司', - '5': '供应商' + '2': '防线部门', + '3': '分公司', + '4': '经营部', + '5': '总公司' }; const dept = deptMap[auditType] || '未知部门'; // 默认值容错 -// 3. 操作流程规则(按「优先级+条件组合」定义,避免逻辑冲突) + // 3. 操作流程规则(按「优先级+条件组合」定义,避免逻辑冲突) const operRules = [ // 规则:[条件函数, 操作文案],按优先级排序(先匹配先执行) - [() => index === 0 && auditType === '1', '发起申请'], - [() => index !== 0 && auditType === '1', '提交派车申请'], - [() => index !== 0 && auditType === '9' && auditStatus === '9', `驳回-给发起人${creator},共间隔:${times} 原因备注:${remark}`], - [() => index !== 0 && auditType === '2' && auditStatus === '1', `审核确认通过,共间隔:${times} 原因备注:${remark}`], - [() => index !== 0 && auditType === '2' && auditStatus === '2', `完结-审核确认通过,共耗时:${times} 原因备注:${remark}`], - [() => auditType === '2' && auditStatus === '2', `审核确认通过,共间隔:${times} 原因备注:${remark}`], // 原逻辑:无 index 限制 - [() => auditType === '2' && auditStatus === '3', `驳回-给发起人${creator},共间隔:${times} 原因备注:${remark}`], - [() => auditType === '3' && auditStatus === '2', `审核确认通过,共间隔:${times} 原因备注:${remark}`], - [() => auditType === '3' && auditStatus === '3', `驳回-给发起人${creator},共间隔:${times} 原因备注:${remark}`], - [() => auditType === '4' && auditStatus === '2', `完结-审核确认通过,共耗时:${times} 原因备注:${remark}`], - [() => auditType === '4' && auditStatus === '3', `驳回-给发起人${creator},共间隔:${times} 原因备注:${remark}`], - [() => auditType === '5' && auditStatus === '2', `派车情况-${remark},共耗时:${times}`] + [() => index === 0 && auditType == '0', '发起申请'], + + [() => auditType === '1' && auditStatus == '1', `审核确认通过,时间:${times} 原因备注:${remark}`], // 原逻辑:无 index 限制 + [() => auditType === '1' && auditStatus == '2', `驳回-给发起人${creator},共间隔:${times} 原因备注:${remark}`], + + [() => auditType === '2' && auditStatus == '1', `审核确认通过,时间:${times} 原因备注:${remark}`], + [() => auditType === '2' && auditStatus == '2', `驳回-给发起人${creator},共间隔:${times} 原因备注:${remark}`], + + [() => auditType === '3' && auditStatus == '1', `完结-审核确认通过,时间:${times} 原因备注:${remark}`], + [() => auditType === '3' && auditStatus == '2', `驳回-给发起人${creator},共间隔:${times} 原因备注:${remark}`], + + [() => auditType === '4' && auditStatus == '1', `完结-审核确认通过,时间:${times} 原因备注:${remark}`], + [() => auditType === '4' && auditStatus == '2', `驳回-给发起人${creator},共间隔:${times} 原因备注:${remark}`], + + [() => auditType === '5' && auditStatus == '1', `完结-审核确认通过,时间:${times} 原因备注:${remark}`], + [() => auditType === '5' && auditStatus == '2', `驳回-给发起人${creator},共间隔:${times} 原因备注:${remark}`], ]; -// 匹配操作文案(默认值容错) + // 匹配操作文案(默认值容错) let operData = '未知操作'; for (const [condition, text] of operRules) { if (condition()) { @@ -476,7 +568,7 @@ function setOperRecordInfo(list, obj) { '' + '
' + '
' + - '' + (item.nikeName ? item.nikeName : item.userName) + '(' + item.phone + ')' + dept + '' + + '' + (item.auditReason ? item.auditReason : item.auditUser) + '' + dept + '' + '
' + '
' + '' + operData + '' + @@ -577,9 +669,31 @@ function withdrawData(data) { }) } +// 查看附件 +function viewFileDetail(obj, type) { + let title = '行驶证/挂靠协议驾驶证/身份证/导航图' + if (type === 1) { + title = '行驶证/挂靠协议驾驶证/身份证/导航图' + } else if (type === 2) { + title = '操作证/身份证/导航图' + } + obj.type = type; + openIframeByParamObj("viewFileDetail", title, '../../car_demand_plan/child/view_file_detail.html', "92%", "95%", obj); +} + +// 需求计划详情 +function viewPlanDetail(obj) { + obj.id = obj.planId; + obj.code = obj.planCode; + let content = '../car_demand_plan/child/apply_plan_detail.html'; + if (obj.code.indexOf('spec-') > -1) { + content = '../car_demand_plan/child/emerg_internal_car_detail.html'; + } + openIframeByParamObj2("viewPlanDetail", "车辆需求计划", content, "92%", "95%", obj); +} + // 需求计划申请审核 function check() { - objParam.checkType = '2'; // 需求计划申请审核 objParam.token = token; openIframeByParamObj("check", "审核", "./car_audit_form.html", "40%", "50%", objParam, 1); } diff --git a/js/car_application_audit/car_audit_form.js b/js/car_application_audit/car_audit_form.js index 8708921..3780faf 100644 --- a/js/car_application_audit/car_audit_form.js +++ b/js/car_application_audit/car_audit_form.js @@ -13,13 +13,13 @@ function setParams(params) { submitApply(data); }); form.on('radio(auditStatus)', function (data) { - if (data.value === '2') { // 通过 - $('#remark').removeAttr('lay-verify'); - $('#remark').val("申请通过"); // textarea 设置内容用 val() + if (data.value === '1') { // 通过 + $('#auditReason').removeAttr('lay-verify'); + $('#auditReason').val("申请通过"); // textarea 设置内容用 val() $('#auditRemarksLabel').removeClass('required'); - } else if (data.value === '3') { // 不通过 - $('#remark').attr('lay-verify', 'required'); - $('#remark').val("申请驳回"); // textarea 设置内容用 val() + } else if (data.value === '2') { // 不通过 + $('#auditReason').attr('lay-verify', 'required'); + $('#auditReason').val("申请驳回"); // textarea 设置内容用 val() $('#auditRemarksLabel').addClass('required'); } }); @@ -38,25 +38,13 @@ function submitApply(data) { shade: 0.01, time: '0' }); - - let url = ''; - if (objParam.checkType === '1') { // 派车录入审核 - url = dataUrl + 'backstage/dispatchCar/dispatchAudit'; - // 出库单ID、合同ID - data.field.id = idParam; - data.field.contractId = objParam.contractId; - data.field.outId = objParam.outId; - data.field.planId = objParam.planId; - data.field.supId = objParam.supId; - data.field.status = data.field.status === '2' ? '1' : '2'; - } else if (objParam.checkType === '2') { // 需求计划审核 - url = dataUrl + 'backstage/carPlanAudit/auditInfo'; - data.field.id = idParam; - } + let url = dataUrl + 'backstage/carBalance/sltAudit'; + data.field.id = idParam; + data.field.auditStatus = data.field.status; let params = { encryptedData: JSON.stringify(data.field) }; - ajaxRequest(url, "POST", params, true, function () { + ajaxRequest(url, "GET", params, true, function () { $('.save').addClass("layui-btn-disabled").attr("disabled", true); $('.cancel').addClass("layui-btn-disabled").attr("disabled", true); }, function (result) { @@ -64,18 +52,28 @@ function submitApply(data) { $('.save').removeClass("layui-btn-disabled").attr("disabled", false); $('.cancel').removeClass("layui-btn-disabled").attr("disabled", false); if (result.code === 200) { - top.layer.msg(result.msg, {icon: 1}); - if (objParam.token) { - // 如果没有 token,直接关闭整个窗口 - window.parent.open('', '_self'); - window.parent.close(); - return; - } else { - closePage(1); + // top.layer.msg(result.data, {icon: 1}); + // if (objParam.token) { + // // 如果没有 token,直接关闭整个窗口 + // window.parent.open('', '_self'); + // window.parent.close(); + // return; + // } else { + // closePage(1); + // } + + const topParent = window.top; + // 2. 调用最外层父页面的刷新表格函数 + if (topParent.queryTable) { + topParent.queryTable(1); // 执行最外层的刷新 } + // 3. 关闭所有layui弹窗(包括所有iframe层) + topParent.layer.closeAll(); + // 4. 提示成功 + topParent.layer.msg(result.data, {icon: 1}); } else { - layer.msg(result.msg, {icon: 2}); + layer.msg(result.data, {icon: 2}); } }, function (xhr, status, error) { layer.close(loadingMsg); // 关闭提示层 @@ -89,14 +87,5 @@ function submitApply(data) { // 关闭页面 function closePage(type) { let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引 - - - if (type == 1) { - if (objParam.checkType === '1') { // 派车录入审核 - window.parent.reloadAuditData(); - } else if (objParam.checkType === '2') { // 需求计划审核 - window.parent.closePage(); - } - } parent.layer.close(index); // 再执行关闭 } diff --git a/js/car_application_audit/car_audit_list.js b/js/car_application_audit/car_audit_list.js index c20968a..6f8d7ac 100644 --- a/js/car_application_audit/car_audit_list.js +++ b/js/car_application_audit/car_audit_list.js @@ -102,6 +102,30 @@ function initTable() { align: "center", sort:true, }, + { + field: "carName", + width: '14%', + title: "车辆类型", + unresize: true, + align: "center", + sort:true, + templet: function (d) { + var type = d.type; + if (type == 1) { + return '车辆'; + } else if (type == 2) { + return '吊车'; + } + }, + }, + { + field: "planNum", + width: '10%', + title: "车辆数量", + unresize: true, + align: "center", + sort:true, + }, { field: "ygMoney", width: '14%', @@ -127,7 +151,7 @@ function initTable() { sort:true, align: "center", templet: function (d) { - return getCheckStatus(d.status); + return getCheckStatus(d.auditType ,d.status); }, }, { @@ -173,20 +197,22 @@ function initTable() { unresize: true, templet: function (d) { let html = ""; - let content = getCheckStatus(d.status); - if(!(content.indexOf('驳回') > -1)){ + let status = d.status; + if(status == -1){ html += "提交
|
" } - - if(!(content.indexOf('驳回') > -1)){ + if(status == -1 || status == 2){ html += "修改
|
" - } - + html += "
|
删除"; + } html += "详情"; - - if (!(content.indexOf('驳回') > -1 || content.indexOf('已撤回') > -1 || content.indexOf('通过') > -1)) { + if ( status == 1 ) { html += "
|
审核"; } + + if(status == 0){ + html += "
|
审核记录"; + } return html; }, }, @@ -213,28 +239,30 @@ function exportExcel() { } //审核状态 -function getCheckStatus(status) { - if(status === 0){ +function getCheckStatus(auditType,status) { + + if(status == 0){ return "全部通过"; } - /*var company = ""; - if (statusType === 1) { - return "审核通过"; - } else if (statusType === 2) { - company = "分公司"; - } else if (statusType === 3) { - company = "项目管理中心"; - } else if (statusType === 4) { - company = "机具公司"; - }*/ - if (status === 1) { - return "待审核"; - } else if (status === 2) { + let name = '分包商'; + if(auditType == 1){ + name = "项目部" + }else if(auditType == 2){ + name = "防线部门" + }else if(auditType == 3){ + name = "分公司" + }else if(auditType == 4){ + name = "经营部" + }else if(auditType == 5){ + name = "总公司" + } + if (status == 1) { + return ""+ name+"待审核"; + } else if (status == 2) { return "审核驳回"; - } else if (status === -3) { + } else if (status == -1) { return "待提交"; } - return "待提交"; } // 详情 @@ -248,35 +276,68 @@ function checkDetail(obj) { openIframeByParamObj("car_check_detail", "审核", "./child/car_audit_detail.html", "92%", "95%", obj,1); } + +function checkAuditDetail(obj) { + // obj.checkType = 2; + openIframeByParamObj("car_check_detail", "审核", "./child/car_audit_detail.html", "92%", "95%", obj,1); +} + + //提交 function checkSubmit(obj) { layer.confirm("确定提交此条数据吗?", { 'title': '操作提示', move: false }, function () { let loadingMsg = layer.msg('数据提交中,请稍候...', { icon: 16, scrollbar: false, time: 0 }); - let url = dataUrl + "backstage/carType/deleteType" - let obj = { 'id': id } + let url = dataUrl + "backstage/carBalance/sltSubmitAudit" + let data = { 'id': obj.id } let params = { - encryptedData: JSON.stringify(obj) + encryptedData: JSON.stringify(data) } - ajaxRequest(url, "POST", params, true, function () { + ajaxRequest(url, "GET", params, true, function () { }, function (result) { layer.close(loadingMsg); // 关闭提示层 if (result.code === 200) { - layer.msg(result.msg, { icon: 1 }) - if (type === 1) { - fitTypeTree.partialRefreshDel($div); // 删除节点 - } else if (type === 2) { - dtreeData = getDTreeData(); - dtree.reload("fitTypeTree", { - data: dtreeData - }); - } + layer.msg(result.data, { icon: 1 }) queryTable(1); } else { - layer.msg(result.msg, { icon: 2 }) + layer.msg(result.data, { icon: 2 }) } }, function (xhr) { layer.close(loadingMsg); // 关闭提示层 - error(xhr) + }); + }) +} + +// 删除 +function checkDelete(obj) { + layer.confirm("确定删除此条数据吗?", { 'title': '操作提示', move: false }, function () { + let loadingMsg = layer.msg('数据提交中,请稍候...', { icon: 16, scrollbar: false, time: 0 }); + let url = dataUrl + "backstage/carBalance/delBalanceData" + let postData = { 'id': obj.id }; + + $.ajax({ + url: url, + headers: { + "authorization": sessionStorage.getItem("gz-token"), + }, + type: "POST", + contentType: "application/json;charset=utf-8", // 指定Body为JSON格式 + data: JSON.stringify(postData), // 直接传JSON字符串,不加密 + dataType: "json", + success: function (result) { + layer.close(loadingMsg); + if (result.code === 200) { // 假设后端返回code=200代表成功 + layer.msg('删除成功!', { icon: 1 }); + queryTable(1); // 刷新表格 + layer.closeAll(); // 关闭所有弹窗 + } else { + layer.msg('删除失败:' + (result.msg || '未知错误'), { icon: 2 }); + } + }, + error: function (xhr, status, error) { + layer.close(loadingMsg); + layer.msg('删除失败,服务异常!', { icon: 2 }); + console.error('删除请求错误:', error); // 调试用 + } }); }) } diff --git a/js/car_application_audit/car_audit_update.js b/js/car_application_audit/car_audit_update.js index 5cb316f..c1c79d3 100644 --- a/js/car_application_audit/car_audit_update.js +++ b/js/car_application_audit/car_audit_update.js @@ -74,6 +74,7 @@ function getBalanceDataDetails() { //基本信息回显 let dataObj = result.data; + $('#supId').val(dataObj.supId); $('#supName').val(dataObj.supName); $('#fkTime').val(util.toDateString(dataObj.fkTime, 'yyyy-MM-dd')); $('#money').val(dataObj.money); @@ -409,7 +410,7 @@ function submitApply(data) { let obj = { id: item.id || '', planId: item.planId || item.id, - supId: objParam.supId, + supId: item.supId, money: item.money, type: item.type || '1', proId: item.proId || '', @@ -434,7 +435,7 @@ function submitApply(data) { exeGls: carActual?.exeGls || item.exeGls || '', inMoney: carActual?.inMoney || craneActual?.inMoney || '', exeDay: craneActual?.exeDay || item.exeDay || '', - outDetailId: item.id || '', + outDetailId: item.outDetailId || '', modelId: item.modelId || '', ton: item.ton || 0 }; @@ -697,12 +698,12 @@ function getEditedActualValues() { // 修复列索引:实际公里数输入框在td:eq(9),预估公里数在td:eq(8) const actualGls = $tr.find('.actual-gls').val().trim() || $tr.find('td:eq(8)').text().trim() || '0.00'; - const actualMoney = $tr.find('.actual-money').val()?.trim() || '0.00'; + // const actualMoney = $tr.find('.actual-money').val()?.trim() || '0.00'; actualValues.carActualList.push({ outDetailId: itemId, exeGls: formatToTwoDecimals(actualGls), - inMoney: formatToTwoDecimals(actualMoney) + inMoney: 0 }); }); diff --git a/js/car_settlement/child/payment_form.js b/js/car_settlement/child/payment_form.js index f2845e7..f2408df 100644 --- a/js/car_settlement/child/payment_form.js +++ b/js/car_settlement/child/payment_form.js @@ -131,7 +131,7 @@ function submitApply(data) { }; planList.push(obj); }) - + const actualValues = getEditedActualValues(); $.each(allDataList, function (index, item) { @@ -146,7 +146,7 @@ function submitApply(data) { money: item.cost, outId: item.outId, exeGls: carActual?.exeGls || '', - inMoney: carActual?.inMoney || craneActual?.inMoney || '', + inMoney: carActual?.inMoney || craneActual?.inMoney || '', exeDay: craneActual?.exeDay || '', outDetailId:item.id, modelId:item.modelId, @@ -156,9 +156,9 @@ function submitApply(data) { }) data.field.planList = planList; data.field.detailsList = detailsList; - - + + let formData = new FormData(); //遍历最终文件集合 for (let i = 0; i < fileList.length; i++) { @@ -166,7 +166,7 @@ function submitApply(data) { } formData.append('params', JSON.stringify(data.field)); console.log(jjDataArr); - + console.log(data.field); let loadingMsg = layer.msg('正在提交保存,请稍等...', { icon: 16, shade: 0.01, time: '0' }); let url = dataUrl + 'backstage/carBalance/addBalanceData'; @@ -263,10 +263,10 @@ function getPayCarDetails(id) { imgNum += item.carImage.filter(item => { return item.type !== '6' }).length; imgNum += item.driverUserImage.filter(item => { return item.type !== '6' }).length; imgNum += item.fileList.length; - + const actualGls = formatToTwoDecimals(item.gls) || 0.00; // 实际公里数初始=预估公里数 // const actualMoney = formatToTwoDecimals(0); // 实际金额初始=预估金额 - + html += "" + "" + item.type + "" + "" + item.name + "" + @@ -277,16 +277,16 @@ function getPayCarDetails(id) { "" + item.startAddress + "" + "" + item.endAddress + "" + "" + item.gls + "" + - - "" + - + "" + item.glsPrice + "" + " ¥ " + (item.glsMoney ? item.glsMoney : 0) + "" + - - // "" + - + "" + imgNum + "查看附件>>" + "" + item.planCode + "" + ""; @@ -311,10 +311,10 @@ function getPayCarDetails(id) { imgNum += item.driverUserImage.filter(item => { return item.type === '2' || item.type === '3' }).length; imgNum += item.operaImage.filter(item => { return item.type === '2' || item.type === '3' || item.type === '6' }).length; imgNum += item.fileList.length; - + const actualPlanDay = item.planDay|| 0; const actualDcMoney = formatToTwoDecimals(0); - + html += '' + '' + item.type + '' + '' + item.name + '' + @@ -326,10 +326,10 @@ function getPayCarDetails(id) { "' style='width: 100%; padding: 2px; border: 1px solid #ddd;' data-id='" + item.id + "'>" + '' + setZlPrice(item) + '' + ' ¥ ' + item.dcMoney + '' + - - "" + - + "" + imgNum + "查看附件>>" + "" + item.planCode + "" + ''; @@ -403,7 +403,7 @@ function getEditedActualValues() { actualValues.carActualList.push({ outDetailId: itemId, exeGls: actualGls, - inMoney: actualMoney + inMoney: 0 }); }); @@ -464,4 +464,4 @@ function closePage(type) { } parent.layer.close(index); // 再执行关闭 -} \ No newline at end of file +} diff --git a/page/car_application_audit/child/car_audit_detail.html b/page/car_application_audit/child/car_audit_detail.html index 29a5c2b..5ad8a83 100644 --- a/page/car_application_audit/child/car_audit_detail.html +++ b/page/car_application_audit/child/car_audit_detail.html @@ -30,6 +30,7 @@
+

基本信息

@@ -37,38 +38,24 @@
- - - - + + + + - - - - + + + + - + - - - - - - - - - - - - -
项目名称项目部分工程内容需用日期供应商选择需求计划数付款日期本次付款金额
计划说明备注
预计运输物品重量(吨)运输起点运输终点
-
@@ -89,13 +76,34 @@
+ +
+ +

计划明细

+
+ + +
+ + + + + + + + + + +
序号工程名称需求计划编号供应商名称用车数量金额预估金额
+
+
-

申请明细

+

用车明细

-
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -133,7 +178,7 @@

操作记录

- +
diff --git a/page/car_application_audit/child/car_audit_form.html b/page/car_application_audit/child/car_audit_form.html index a25fb88..32b2027 100644 --- a/page/car_application_audit/child/car_audit_form.html +++ b/page/car_application_audit/child/car_audit_form.html @@ -16,14 +16,14 @@
- - + +
-
@@ -42,4 +42,4 @@ - \ No newline at end of file + diff --git a/page/car_application_audit/child/car_audit_update.html b/page/car_application_audit/child/car_audit_update.html index e8de76c..31c6fb5 100644 --- a/page/car_application_audit/child/car_audit_update.html +++ b/page/car_application_audit/child/car_audit_update.html @@ -17,6 +17,7 @@
+