财务小工具问题修改

This commit is contained in:
cwchen 2024-07-12 15:57:13 +08:00
parent da2a2accf6
commit e3304e45a1
2 changed files with 135 additions and 4 deletions

View File

@ -187,7 +187,7 @@ public class SupplierReconciliationController {
}
}
total = initialDebt.add(meet).subtract(paid);
dataMap.put("total",total.doubleValue());
dataMap.put("total",total.toString());
dataList.add(dataMap);
});
} catch (Exception e) {

View File

@ -3,6 +3,7 @@ var pers = null;
var layer = null;
var form = null;
var token = localStorage.getItem("token");
let indexNum = 0;
layui.use(['layer', 'laydate', 'form' ], function () {
layer = layui.layer;
form = layui.form;
@ -198,8 +199,9 @@ function getListForOrg(data) {
if(j === 0){
const dataMapList =list[0].dataMapList;
if(dataMapList && dataMapList.length > 0){
indexNum = dataMapList.length;
$.each(dataMapList,function (index,item){
cent += '<tr class="lastBalance-td" style="font-size: 17px;"><td colspan="3">'+item.department+'</td><td colspan="3">'+item.proName+'</td><td colspan="3">'+item.total+'</td></tr>';
cent += '<tr class="lastBalance-td" style="font-size: 17px !important;"><td colspan="3">'+item.department+'</td><td colspan="3">'+item.proName+'</td><td colspan="3">'+item.total+'</td></tr>';
})
}
}
@ -387,8 +389,8 @@ function toExcel(){
ws.E1 = { v: $("#startTimes").val(), t: "d" };
ws.E2 = { v: $("#bqyfk").val(), t: "s" };
ws.E3 = { v: $("#ljsyyfk").val(), t: "s" };
ws.F5 = { v: $("#sqjz").val(), t: "s" };
handleData(ws);
// ws.F8 = { v: $("#sqjz").val(), t: "s" };
ws.H1 = { v: $("#endTimes").val(), t: "d" };
ws.H2 = { v: $("#paid").val(), t: "s" };
@ -516,4 +518,133 @@ function sheet2blob(sheet, sheetName) {
return buf;
}
return blob;
}
function handleData(ws){
let obj = { v: $("#sqjz").val(), t: "s" };
switch (indexNum) {
case 0:
ws.F5 = obj;
break;
case 1:
ws.F6 = obj;
break;
case 2:
ws.F7 = obj;
break;
case 3:
ws.F8 = obj;
break;
case 4:
ws.F9 = obj;
break;
case 5:
ws.F10 = obj;
break;
case 6:
ws.F11 = obj;
break;
case 7:
ws.F12 = obj;
break;
case 8:
ws.F13 = obj;
break;
case 9:
ws.F14 = obj;
break;
case 10:
ws.F15 = obj;
break;
case 11:
ws.F16 = obj;
break;
case 12:
ws.F17 = obj;
break;
case 13:
ws.F18 = obj;
break;
case 14:
ws.F19 = obj;
break;
case 15:
ws.F20 = obj;
break;
case 16:
ws.F21 = obj;
break;
case 17:
ws.F22 = obj;
break;
case 18:
ws.F23 = obj;
break;
case 19:
ws.F24 = obj;
break;
case 20:
ws.F25 = obj;
break;
case 21:
ws.F26 = obj;
break;
case 22:
ws.F27 = obj;
break;
case 23:
ws.F28 = obj;
break;
case 24:
ws.F29 = obj;
break;
case 25:
ws.F30 = obj;
break;
case 26:
ws.F31 = obj;
break;
case 27:
ws.F32 = obj;
break;
case 28:
ws.F33 = obj;
break;
case 29:
ws.F34 = obj;
break;
case 30:
ws.F35 = obj;
break;
case 31:
ws.F36 = obj;
break;
case 32:
ws.F37 = obj;
break;
case 33:
ws.F38 = obj;
break;
case 34:
ws.F39 = obj;
break;
case 35:
ws.F40 = obj;
break;
case 36:
ws.F41 = obj;
break;
case 37:
ws.F42 = obj;
break;
case 38:
ws.F43 = obj;
break;
case 39:
ws.F44 = obj;
break;
case 40:
ws.F45 = obj;
break;
}
}