Commit 9b5b24db by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents 92afc429 93968561
......@@ -268,7 +268,7 @@ public class ServiceHGCW010 extends ServiceBase {
}
catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成收款单失败");
LogUtils.setMsg(inInfo, e, "生成销售开票失败");
}
return inInfo;
}
......
......@@ -786,7 +786,7 @@ public class HGCWTools {
List<HGCW011> results = DaoBase.getInstance().query(HGCW011.QUERY,new HashMap<String,Object>(){
{put("settlementNumbers",settlementNumber);}
});
AssertUtils.isEmpty(results, "找不到对应的销售开票记录!");
//AssertUtils.isEmpty(results, "找不到对应的销售开票记录!");
BigDecimal totalAmount = new BigDecimal("0");
for (HGCW011 hgcw011: results) {
totalAmount = totalAmount.add(hgcw011.getTotalContractPriceIncluding());
......
......@@ -12,6 +12,8 @@ import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock;
......@@ -24,6 +26,8 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* @author:songx
......@@ -123,7 +127,13 @@ public class ServiceHGKC001 extends ServiceBase {
* @param dbCg004Map
*/
private void saveData(List<HGKC001> fCg004s, Map<String, HGKC001> dbCg004Map) {
List<String> whCodeList = fCg004s.stream().map(HGKC001::getWhCode).collect(Collectors.toList());
Map<String, HGPZ007> whMap = HGPZTools.HgPz007.map(whCodeList);
for (HGKC001 fCg004 : fCg004s) {
HGPZ007 wh = whMap.get(fCg004.getWhCode());
if(Objects.nonNull(wh)){
fCg004.setWhName(wh.getWhName());
}
DaoUtils.update(HGKC001.UPDATE_WH_CODE, fCg004);
}
}
......
......@@ -38,6 +38,7 @@ $(function () {
loadComplete: function (grid) {
// 确认
$("#CONFIRM").on("click", confirm);
// change事件
grid.dataSource.bind("change", function (e) {
supCodeChange(e);
......@@ -59,8 +60,7 @@ $(function () {
// 查询
$("#QUERY").on("click", query);
// 选择收货
$("#SELECT_RECEIVE").on("click", selectReceive);
$("#BTN_SUBMIT").on("click",batchUpdateSubmitStatus);
downKeyUp();
});
......@@ -229,3 +229,25 @@ function updateSubmitStatus(id) {
});
}
/**
* 保存
*/
let batchUpdateSubmitStatus = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
for (let i = 0; i < rows.length; i++) {
if (rows[i]['submitStatus'] != 0) {
message("勾选的第" + (i + 1) + "行提交状态不是未提交");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC001", "updateSubmitStatus", true);
}
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment