add: 6月薪需求
This commit is contained in:
@@ -341,6 +341,19 @@ public class WmsToErpServiceImpl implements WmsToErpService {
|
||||
String DR = jo2.getString("dr");
|
||||
String contract_no = jo2.getString("vsourcecode");
|
||||
String honor_time = jo2.getString("honor_time");
|
||||
// 采购组织
|
||||
String purchase_organize = jo2.getString("pk_org");
|
||||
// 使用部门id
|
||||
String use_dept_id = jo2.getString("dept_sy_id");
|
||||
// 使用部门名称
|
||||
String user_dept_name = jo2.getString("dept_sy_name");
|
||||
// 公司版本
|
||||
String company_version = jo2.getString("pk_org_v");
|
||||
// 库房id
|
||||
String house_id = jo2.getString("house_id");
|
||||
// 库房名称
|
||||
String house_name = jo2.getString("house_name");
|
||||
|
||||
|
||||
//插入采购订单表和采购订单处理表
|
||||
JSONObject jo = new JSONObject();
|
||||
@@ -372,6 +385,12 @@ public class WmsToErpServiceImpl implements WmsToErpService {
|
||||
jo.put("input_optid", "");
|
||||
jo.put("input_optname", "");
|
||||
jo.put("input_time", DateUtil.now());
|
||||
jo.put("purchase_organize", purchase_organize);
|
||||
jo.put("use_dept", use_dept_id);
|
||||
jo.put("company_version", company_version);
|
||||
jo.put("storehouse", house_id);
|
||||
jo.put("user_dept_name", user_dept_name);
|
||||
jo.put("house_name", house_name);
|
||||
try {
|
||||
purchase_wql.insert(jo);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
输入.vbillcode TYPEAS s_string
|
||||
输入.cmaterialvid TYPEAS s_string
|
||||
输入.bill_code TYPEAS s_string
|
||||
输入.pk_org_v TYPEAS s_string
|
||||
输入.return_code TYPEAS s_string
|
||||
输入.no_ids TYPEAS f_string
|
||||
输入.material_code TYPEAS s_string
|
||||
@@ -229,6 +230,10 @@
|
||||
pp.NAME like 输入.supp_name
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pk_org_v <> ""
|
||||
pp.PK_ORG_V = 输入.pk_org_v
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.iszero = "true"
|
||||
pp.QTY_ZT = '0'
|
||||
ENDOPTION
|
||||
|
||||
@@ -351,6 +351,9 @@ public class HandNewMaterialServiceImpl implements HandNewMaterialService {
|
||||
case "7":
|
||||
bill_type = "000601";
|
||||
break;
|
||||
case "8":
|
||||
bill_type = "000203";
|
||||
break;
|
||||
}
|
||||
JSONObject jo_now = WQL.getWO("QPADST_IN_SERVICE").addParam("flag", "11").addParam("storagevehicle_code", storagevehicle_code).process().uniqueResult(0);
|
||||
if(jo_now!=null){
|
||||
|
||||
@@ -12,4 +12,6 @@ public class ReceivemstQueryDto {
|
||||
private String supp_code;
|
||||
private String pcsn;
|
||||
private String[] status;
|
||||
private String purchase_organize;
|
||||
private String use_dept_id;
|
||||
}
|
||||
|
||||
@@ -366,6 +366,7 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
||||
map.put("begin_time", MapUtil.getStr(whereJson, "begin_time"));
|
||||
map.put("end_time", MapUtil.getStr(whereJson, "end_time"));
|
||||
map.put("iszero", MapUtil.getStr(whereJson, "iszero"));
|
||||
map.put("pk_org_v", MapUtil.getStr(whereJson, "pk_org_v"));
|
||||
|
||||
if (!ObjectUtil.isEmpty(material_code)) {
|
||||
//处理转义字符
|
||||
|
||||
@@ -70,6 +70,8 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
String supp_code = dto.getSupp_code();
|
||||
String pcsn = dto.getPcsn();
|
||||
String[] statusArr = dto.getStatus();
|
||||
String purchase_organize = dto.getPurchase_organize();
|
||||
String use_dept_id = dto.getUse_dept_id();
|
||||
String status = "('";
|
||||
if (ObjectUtil.isNotEmpty(statusArr)) {
|
||||
for (int i = 0; i < statusArr.length; i++) {
|
||||
@@ -92,6 +94,8 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
map.put("vbillcode", vbillcode);
|
||||
map.put("receive_code", receive_code);
|
||||
map.put("supp_code", supp_code);
|
||||
map.put("purchase_organize", purchase_organize);
|
||||
map.put("use_dept_id", use_dept_id);
|
||||
if (ObjectUtil.isNotEmpty(statusArr)) map.put("status", status);
|
||||
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%");
|
||||
if (ObjectUtil.isNotEmpty(material_code)) map.put("material_code", "%"+material_code+"%");
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
输入.status TYPEAS f_string
|
||||
输入.dept_id TYPEAS s_string
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.purchase_organize TYPEAS s_string
|
||||
输入.use_dept_id TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -119,6 +121,14 @@
|
||||
OPTION 输入.status <> ""
|
||||
dtl.status in 输入.status
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.purchase_organize <> ""
|
||||
proc.purchase_organize = 输入.purchase_organize
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.use_dept_id <> ""
|
||||
proc.use_dept_id = 输入.use_dept_id
|
||||
ENDOPTION
|
||||
group by dtl.receive_code
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
|
||||
@@ -95,6 +95,21 @@ public class FormulaServiceImpl implements FormulaService {
|
||||
map.put("material_id", "%" + material_id + "%");
|
||||
}
|
||||
JSONObject json = WQL.getWO("QPF_FORMULA01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "Formula.create_time desc");
|
||||
JSONArray ja = json.getJSONArray("content");
|
||||
|
||||
for (int i = 0; i < ja.size(); i++) {
|
||||
JSONObject jsonIvt = ja.getJSONObject(i);
|
||||
|
||||
JSONObject jo2 = WQL.getWO("Qivt_query_02").addParam("flag", "2")
|
||||
.addParam("pcsn", jsonIvt.getString("pcsn"))
|
||||
.process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jo2)) {
|
||||
jsonIvt.put("purchase_organize", jo2.getString("purchase_organize"));
|
||||
jsonIvt.put("user_dept_name", jo2.getString("user_dept_name"));
|
||||
}
|
||||
}
|
||||
|
||||
json.put("content",ja);
|
||||
return json;
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
输入.source_name TYPEAS s_string
|
||||
输入.hide TYPEAS s_string
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.pk_org_v TYPEAS s_string
|
||||
输入.mater_ids TYPEAS f_string
|
||||
|
||||
|
||||
@@ -154,6 +155,7 @@
|
||||
PURCHASE.NAME,
|
||||
PURCHASE.NORIGTAXPRICE,
|
||||
PURCHASE.NORIGTAXMNY,
|
||||
PURCHASE.PK_ORG_V,
|
||||
sum(PURCHASE.QTY_ZT)*PURCHASE.NORIGTAXPRICE as notmny
|
||||
FROM
|
||||
PURCHASE_CONTRACT_VIEW PURCHASE
|
||||
@@ -169,10 +171,13 @@
|
||||
OPTION 输入.source_name <> ""
|
||||
PURCHASE.NAME = 输入.source_name
|
||||
ENDOPTION
|
||||
OPTION 输入.pk_org_v <> ""
|
||||
PURCHASE.PK_ORG_V = 输入.pk_org_v
|
||||
ENDOPTION
|
||||
OPTION 输入.hide <> ""
|
||||
1=1 HAVING sum( PURCHASE.QTY_ZT ) > 0
|
||||
ENDOPTION
|
||||
GROUP BY PURCHASE.ITEM_ID,PURCHASE.VBILLCODE, PURCHASE.ITEM_CODE, PURCHASE.ITEM_NAME,PURCHASE.NAME,PURCHASE.NORIGTAXPRICE,PURCHASE.NORIGTAXMNY
|
||||
GROUP BY PURCHASE.ITEM_ID,PURCHASE.VBILLCODE, PURCHASE.ITEM_CODE, PURCHASE.ITEM_NAME,PURCHASE.NAME,PURCHASE.NORIGTAXPRICE,PURCHASE.NORIGTAXMNY,PURCHASE.PK_ORG_V
|
||||
ORDER BY PURCHASE.ITEM_CODE, PURCHASE.VBILLCODE
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
|
||||
@@ -33,6 +33,11 @@
|
||||
"code": "000202",
|
||||
"name": "软废料采购入库",
|
||||
"materType":"08"
|
||||
},
|
||||
{
|
||||
"code": "000203",
|
||||
"name": "软废型材入库",
|
||||
"materType":"08"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -302,7 +302,27 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
map.put("flag", "2");
|
||||
map.put("iostorinv_id", row.getString("iostorinv_id"));
|
||||
JSONArray dtl_rows = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParamMap(map).process().getResultJSONArray(0);
|
||||
xml_Str = this.makeCGRKXml(row, dtl_rows);
|
||||
// 根据物料批次获取到货通知单的采购订单采购组织
|
||||
JSONObject dtl = dtl_rows.getJSONObject(0);
|
||||
JSONObject house_jo = WQL.getWO("QST_IVT_QUERY")
|
||||
.addParam("flag", "1")
|
||||
.addParam("pcsn", dtl.getString("pcsn"))
|
||||
.addParam("material_id", dtl.getString("material_id"))
|
||||
.process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(house_jo)) {
|
||||
if (ObjectUtil.isNotEmpty(house_jo.getString("purchase_organize"))) {
|
||||
if ("0001A110000000002IE6".equals(house_jo.getString("purchase_organize"))) {
|
||||
// 其他入库
|
||||
xml_Str = this.makeQTRKXml(row, dtl_rows);
|
||||
} else {
|
||||
xml_Str = this.makeCGRKXml(row, dtl_rows);
|
||||
}
|
||||
} else {
|
||||
xml_Str = this.makeCGRKXml(row, dtl_rows);
|
||||
}
|
||||
} else {
|
||||
xml_Str = this.makeCGRKXml(row, dtl_rows);
|
||||
}
|
||||
}
|
||||
if (row.getString("source_bill_type").equals("000101") || row.getString("source_bill_type").equals("000202")) {
|
||||
//入库负单,调用采购入库单接口
|
||||
@@ -311,7 +331,37 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
map.put("flag", "2");
|
||||
map.put("iostorinv_id", row.getString("iostorinv_id"));
|
||||
JSONArray dtl_rows = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParamMap(map).process().getResultJSONArray(0);
|
||||
xml_Str = this.makeCGRKXml(row, dtl_rows);
|
||||
// 根据物料批次获取到货通知单的采购订单采购组织
|
||||
JSONObject dtl = dtl_rows.getJSONObject(0);
|
||||
JSONObject house_jo = WQL.getWO("QST_IVT_QUERY")
|
||||
.addParam("flag", "1")
|
||||
.addParam("pcsn", dtl.getString("pcsn"))
|
||||
.addParam("material_id", dtl.getString("material_id"))
|
||||
.process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(house_jo)) {
|
||||
if (ObjectUtil.isNotEmpty(house_jo.getString("purchase_organize"))) {
|
||||
if ("0001A110000000002IE6".equals(house_jo.getString("purchase_organize"))) {
|
||||
// 其他入库
|
||||
xml_Str = this.makeQTRKXml(row, dtl_rows);
|
||||
} else {
|
||||
xml_Str = this.makeCGRKXml(row, dtl_rows);
|
||||
}
|
||||
} else {
|
||||
xml_Str = this.makeCGRKXml(row, dtl_rows);
|
||||
}
|
||||
} else {
|
||||
xml_Str = this.makeCGRKXml(row, dtl_rows);
|
||||
}
|
||||
}
|
||||
// 软废型材入库
|
||||
if (row.getString("bill_type").equals("000203")) {
|
||||
//通过入库单对象组织数据
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "2");
|
||||
map.put("iostorinv_id", row.getString("iostorinv_id"));
|
||||
JSONArray dtl_rows = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParamMap(map).process().getResultJSONArray(0);
|
||||
// 根据物料批次获取到货通知单的采购订单采购组织
|
||||
xml_Str = this.makeQTRKXml(row, dtl_rows);
|
||||
}
|
||||
if (row.getString("bill_type").equals("000102") || row.getString("bill_type").equals("000201")
|
||||
|| row.getString("bill_type").equals("000301") || row.getString("bill_type").equals("000302")
|
||||
@@ -346,7 +396,6 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
map.put("flag", "4");
|
||||
map.put("iostorinv_id", row.getString("iostorinv_id"));
|
||||
JSONArray dtl_rows = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParamMap(map).process().getResultJSONArray(0);
|
||||
|
||||
xml_Str = this.makeCLCKXml(dtl_rows,"('"+row.getString("iostorinv_id")+"')");
|
||||
}
|
||||
if (row.getString("source_bill_type").equals("010101") || row.getString("source_bill_type").equals("010301")
|
||||
@@ -1300,6 +1349,12 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
return XmlUtil.toStr(doc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 材料出库
|
||||
* @param rows
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public String makeCLCKXml(JSONArray rows,String ids) {
|
||||
if (rows.size() == 0) {
|
||||
throw new BadRequestException("数据有误!");
|
||||
@@ -1387,6 +1442,10 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
boolean is_hjq = materialbaseService.isAlongMaterType(MaterOptTypeEnum.HJQ.getCode(), rows.getJSONObject(0).getString("material_id"), null);
|
||||
boolean is_qxc = materialbaseService.isAlongMaterType(MaterOptTypeEnum.QXC.getCode(), rows.getJSONObject(0).getString("material_id"), null);
|
||||
boolean is_bcp = materialbaseService.isAlongMaterType(MaterOptTypeEnum.BCP.getCode(), rows.getJSONObject(0).getString("material_id"), null);
|
||||
// 原辅料
|
||||
boolean is_yl_and_fl = materialbaseService.isAlongMaterType(MaterOptTypeEnum.YL_AND_FL.getCode(), rows.getJSONObject(0).getString("material_id"), null);
|
||||
// 原辅料
|
||||
boolean is_rf = materialbaseService.isAlongMaterType(MaterOptTypeEnum.RF.getCode(), rows.getJSONObject(0).getString("material_id"), null);
|
||||
|
||||
//查询库房ID
|
||||
String material_type_id = "";
|
||||
@@ -1408,6 +1467,36 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
JSONObject house_jo = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "3").addParam("material_type_id", material_type_id).process().uniqueResult(0);
|
||||
erp_storage_id = house_jo.getString("erp_storage_id");
|
||||
|
||||
JSONObject jsonDtl = rows.getJSONObject(0);
|
||||
// 判断是否是原辅料
|
||||
if (is_yl_and_fl) {
|
||||
// 根据物料批次查询到货通知单获取采购订单判断采购组织是否是苏州
|
||||
JSONObject jsonProc = WQL.getWO("QST_IVT_QUERY")
|
||||
.addParam("flag", "1")
|
||||
.addParam("pcsn", jsonDtl.getString("pcsn"))
|
||||
.addParam("material_id", jsonDtl.getString("material_id"))
|
||||
.process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonProc)) {
|
||||
// 判断采购组织是否是苏州
|
||||
if ("0001A110000000002IE6".equals(jsonProc.getString("purchase_organize"))) {
|
||||
erp_storage_id = ObjectUtil.isNotEmpty(jsonProc.getString("house_id")) ? jsonProc.getString("house_id") : erp_storage_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 判断是否是软废
|
||||
if (is_rf) {
|
||||
// 根据物料批次获取入库单类型:若为“软废型材入库”,则库房为“型材委托加工软废库”
|
||||
JSONObject jsonInIos = WQL.getWO("QST_IVT_QUERY")
|
||||
.addParam("flag", "2")
|
||||
.addParam("pcsn", jsonDtl.getString("pcsn"))
|
||||
.addParam("material_id", jsonDtl.getString("material_id"))
|
||||
.process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonInIos)) {
|
||||
erp_storage_id = jsonInIos.getString("bill_type").equals("000203") ? "1002A110000000530UHS" : erp_storage_id;
|
||||
}
|
||||
}
|
||||
|
||||
// 库房
|
||||
Element cwarehouseid = doc.createElement("cwarehouseid");
|
||||
cwarehouseid.setTextContent(erp_storage_id);
|
||||
billhead.appendChild(cwarehouseid);
|
||||
@@ -1873,4 +1962,463 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
log.info(XmlUtil.toStr(doc));
|
||||
return XmlUtil.toStr(doc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 其他入库
|
||||
* @param jsonObject
|
||||
* @param rows
|
||||
* @return
|
||||
*/
|
||||
public String makeQTRKXml(JSONObject jsonObject, JSONArray rows) {
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject row = rows.getJSONObject(i);
|
||||
//原辅料入库校验品质类型,软废不用
|
||||
if (jsonObject.getString("bill_type").equals("000101")) {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "2");
|
||||
map.put("material_id", row.getString("material_id"));
|
||||
map.put("pcsn", row.getString("pcsn"));
|
||||
JSONObject ql_dtl = WQL.getWO("QPADST_IN_SERVICE").addParamMap(map).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(ql_dtl) || !ql_dtl.getString("result").equals("01")) {
|
||||
throw new BadRequestException("物料:" + row.getString("material_name") + "未检测或检测不合格!");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rows.size() == 0) {
|
||||
throw new BadRequestException("数据有误!");
|
||||
}
|
||||
|
||||
Document doc = XmlUtil.createXml();
|
||||
doc.setXmlStandalone(true);
|
||||
Element ufinterface = doc.createElement("ufinterface");
|
||||
ufinterface.setAttribute("account", "01");
|
||||
ufinterface.setAttribute("billtype", "4A");
|
||||
ufinterface.setAttribute("filename", "");
|
||||
ufinterface.setAttribute("groupcode", "");
|
||||
ufinterface.setAttribute("isexchange", "Y");
|
||||
ufinterface.setAttribute("replace", "Y");
|
||||
ufinterface.setAttribute("roottag", "");
|
||||
ufinterface.setAttribute("sender", "sender");
|
||||
|
||||
Element bill = doc.createElement("bill");
|
||||
bill.setAttribute("id", "");
|
||||
|
||||
Element billhead = doc.createElement("billhead");
|
||||
|
||||
//billhead下的元素
|
||||
Element cgeneralhid = doc.createElement("cgeneralhid");
|
||||
billhead.appendChild(cgeneralhid);
|
||||
|
||||
// 集团
|
||||
Element pk_group = doc.createElement("pk_group");
|
||||
pk_group.setTextContent("0001A110000000000FJ5");
|
||||
billhead.appendChild(pk_group);
|
||||
|
||||
// 公司最新版本
|
||||
Element corpoid = doc.createElement("corpoid");
|
||||
corpoid.setTextContent("0001A110000000002IE5");
|
||||
billhead.appendChild(corpoid);
|
||||
|
||||
// 单据号
|
||||
Element vbillcode = doc.createElement("vbillcode");
|
||||
vbillcode.setTextContent(rows.getJSONObject(0).getString("vbillcode"));
|
||||
billhead.appendChild(vbillcode);
|
||||
|
||||
// 单据日期
|
||||
Element dbilldate = doc.createElement("dbilldate");
|
||||
dbilldate.setTextContent(rows.getJSONObject(0).getString("biz_date"));
|
||||
billhead.appendChild(dbilldate);
|
||||
|
||||
// 库存组织最新版本
|
||||
Element pk_org = doc.createElement("pk_org");
|
||||
pk_org.setTextContent("0001A110000000002IE6");
|
||||
billhead.appendChild(pk_org);
|
||||
|
||||
// 库存组织
|
||||
Element pk_org_v = doc.createElement("pk_org_v");
|
||||
pk_org_v.setTextContent("0001A110000000002IE6");
|
||||
billhead.appendChild(pk_org_v);
|
||||
|
||||
// 出库库存组织
|
||||
Element cothercalbodyoid = doc.createElement("cothercalbodyoid");
|
||||
cothercalbodyoid.setTextContent("0001A110000000002IE6");
|
||||
billhead.appendChild(cothercalbodyoid);
|
||||
|
||||
// 出库库存组织版本
|
||||
Element cothercalbodyvid = doc.createElement("cothercalbodyvid");
|
||||
cothercalbodyvid.setTextContent("0001A110000000002IE6");
|
||||
billhead.appendChild(cothercalbodyvid);
|
||||
|
||||
String erp_storage_id = "";
|
||||
// 根据物料批次查询到货通知单 以及 采购订单
|
||||
JSONObject dtl = rows.getJSONObject(0);
|
||||
JSONObject house_jo = WQL.getWO("QST_IVT_QUERY")
|
||||
.addParam("flag", "1")
|
||||
.addParam("pcsn", dtl.getString("pcsn"))
|
||||
.addParam("material_id", dtl.getString("material_id"))
|
||||
.process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(house_jo)) {
|
||||
if (ObjectUtil.isNotEmpty(house_jo.getString("house_id"))) {
|
||||
erp_storage_id = house_jo.getString("house_id");
|
||||
} else {
|
||||
throw new BadRequestException("物料【"+dtl.getString("material_id")+"】,批次【"+dtl.getString("pcsn")+"】的通知单对应的采购订单库位为空!");
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException("找不到物料为【"+dtl.getString("material_id")+"】,批次为【"+dtl.getString("pcsn")+"】的到货通知单对应的采购订单!");
|
||||
}
|
||||
|
||||
// 出库仓库
|
||||
Element cotherwhid = doc.createElement("cotherwhid");
|
||||
cotherwhid.setTextContent(erp_storage_id);
|
||||
billhead.appendChild(cotherwhid);
|
||||
|
||||
// 仓库
|
||||
Element cwarehouseid = doc.createElement("cwarehouseid");
|
||||
cwarehouseid.setTextContent(erp_storage_id);
|
||||
billhead.appendChild(cwarehouseid);
|
||||
|
||||
// 出入库类型编码
|
||||
Element vtrantypecode = doc.createElement("vtrantypecode");
|
||||
vtrantypecode.setTextContent("45-01");
|
||||
billhead.appendChild(vtrantypecode);
|
||||
|
||||
// 出库库存组织
|
||||
Element cothercalbodyoid2 = doc.createElement("cothercalbodyoid");
|
||||
cothercalbodyoid2.setTextContent("0001A110000000002IE6");
|
||||
billhead.appendChild(cothercalbodyoid2);
|
||||
|
||||
// 出库库存组织版本
|
||||
Element cothercalbodyvid2 = doc.createElement("cothercalbodyvid");
|
||||
cothercalbodyvid2.setTextContent("0001A110000000002IE6");
|
||||
billhead.appendChild(cothercalbodyvid2);
|
||||
|
||||
// 出库仓库
|
||||
Element cotherwhid2 = doc.createElement("cotherwhid");
|
||||
cotherwhid2.setTextContent(erp_storage_id);
|
||||
billhead.appendChild(cotherwhid2);
|
||||
|
||||
// 库管员 -- 非必填
|
||||
Element cwhsmanagerid = doc.createElement("cwhsmanagerid");
|
||||
cwhsmanagerid.setTextContent("");
|
||||
billhead.appendChild(cwhsmanagerid);
|
||||
|
||||
// 部门OID
|
||||
Element cdptid = doc.createElement("cdptid");
|
||||
cdptid.setTextContent(dtl.getString("pk_dept"));
|
||||
billhead.appendChild(cdptid);
|
||||
|
||||
// 部门VID
|
||||
Element cdptvid = doc.createElement("cdptvid");
|
||||
cdptvid.setTextContent(dtl.getString("pk_dept_v"));
|
||||
billhead.appendChild(cdptvid);
|
||||
|
||||
// 业务员 -- 非必填
|
||||
Element cbizid = doc.createElement("cbizid");
|
||||
cbizid.setTextContent(dtl.getString("cemployeeid"));
|
||||
billhead.appendChild(cbizid);
|
||||
|
||||
// 客户
|
||||
Element ccustomerid = doc.createElement("ccustomerid");
|
||||
billhead.appendChild(ccustomerid);
|
||||
|
||||
// 计量器具
|
||||
Element pk_measware = doc.createElement("pk_measware");
|
||||
billhead.appendChild(pk_measware);
|
||||
|
||||
// 备注
|
||||
Element vnote = doc.createElement("vnote");
|
||||
vnote.setTextContent("诺力正式-导入cs");
|
||||
billhead.appendChild(vnote);
|
||||
|
||||
// 单据状态
|
||||
Element fbillflag = doc.createElement("fbillflag");
|
||||
fbillflag.setTextContent("2");
|
||||
billhead.appendChild(fbillflag);
|
||||
|
||||
// 总数量 --- 非必填
|
||||
Element ntotalnum = doc.createElement("ntotalnum");
|
||||
ntotalnum.setTextContent("0");
|
||||
billhead.appendChild(ntotalnum);
|
||||
|
||||
// 总重量 --- 非必填
|
||||
Element ntotalweight = doc.createElement("ntotalweight");
|
||||
ntotalweight.setTextContent("0");
|
||||
billhead.appendChild(ntotalweight);
|
||||
|
||||
// 总体积
|
||||
Element ntotalvolume = doc.createElement("ntotalvolume");
|
||||
billhead.appendChild(ntotalvolume);
|
||||
|
||||
// 总件数
|
||||
Element ntotalpiece = doc.createElement("ntotalpiece");
|
||||
billhead.appendChild(ntotalpiece);
|
||||
|
||||
// 创建人
|
||||
Element creator = doc.createElement("creator");
|
||||
creator.setTextContent(dtl.getString("create_user_id"));
|
||||
billhead.appendChild(creator);
|
||||
|
||||
// 制单人
|
||||
Element billmaker = doc.createElement("billmaker");
|
||||
billmaker.setTextContent(dtl.getString("create_user_id"));
|
||||
billhead.appendChild(billmaker);
|
||||
|
||||
// 制单时间
|
||||
Element creationtime = doc.createElement("creationtime");
|
||||
creationtime.setTextContent(dtl.getString("input_time"));
|
||||
billhead.appendChild(creationtime);
|
||||
|
||||
// 签字人
|
||||
Element approver = doc.createElement("approver");
|
||||
billhead.appendChild(approver);
|
||||
|
||||
// 签时间
|
||||
Element taudittime = doc.createElement("taudittime");
|
||||
billhead.appendChild(taudittime);
|
||||
|
||||
// 最后修改人
|
||||
Element modifier = doc.createElement("modifier");
|
||||
billhead.appendChild(modifier);
|
||||
|
||||
// 最后修改时间
|
||||
Element modifiedtime = doc.createElement("modifiedtime");
|
||||
billhead.appendChild(modifiedtime);
|
||||
|
||||
// 出入库类型
|
||||
Element ctrantypeid = doc.createElement("ctrantypeid");
|
||||
ctrantypeid.setTextContent("0001A1100000000020CK");
|
||||
billhead.appendChild(ctrantypeid);
|
||||
|
||||
// 明细
|
||||
Element cgeneralbid = doc.createElement("cgeneralbid");
|
||||
billhead.appendChild(cgeneralbid);
|
||||
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject jo = rows.getJSONObject(i);
|
||||
//item下面的元素
|
||||
Element item = doc.createElement("item");
|
||||
cgeneralbid.appendChild(item);
|
||||
|
||||
// 行号
|
||||
Element crowno = doc.createElement("crowno");
|
||||
crowno.setTextContent(i+1+"");
|
||||
item.appendChild(crowno);
|
||||
|
||||
// 集团
|
||||
Element pk_group2 = doc.createElement("pk_group");
|
||||
pk_group2.setTextContent("0001A110000000000FJ5");
|
||||
item.appendChild(pk_group2);
|
||||
|
||||
// 公司最新版本
|
||||
Element corpoid2 = doc.createElement("corpoid");
|
||||
corpoid2.setTextContent("0001A110000000002IE5");
|
||||
item.appendChild(corpoid2);
|
||||
|
||||
// 公司
|
||||
Element corpvid = doc.createElement("corpvid");
|
||||
corpvid.setTextContent("0001A110000000002IE5");
|
||||
item.appendChild(corpvid);
|
||||
|
||||
// 库存状态
|
||||
Element cstateid = doc.createElement("cstateid");
|
||||
item.appendChild(cstateid);
|
||||
|
||||
// 物料编码
|
||||
Element cmaterialoid = doc.createElement("cmaterialoid");
|
||||
cmaterialoid.setTextContent(jo.getString("item_id"));
|
||||
item.appendChild(cmaterialoid);
|
||||
|
||||
// 物料版本
|
||||
Element cmaterialvid = doc.createElement("cmaterialvid");
|
||||
cmaterialvid.setTextContent(jo.getString("item_id"));
|
||||
item.appendChild(cmaterialvid);
|
||||
|
||||
// 主单位
|
||||
Element cunitid = doc.createElement("cunitid");
|
||||
cunitid.setTextContent(jo.getString("m_unit_id"));
|
||||
item.appendChild(cunitid);
|
||||
|
||||
// 单位
|
||||
Element castunitid = doc.createElement("castunitid");
|
||||
castunitid.setTextContent(jo.getString("f_unit_id"));
|
||||
item.appendChild(castunitid);
|
||||
|
||||
// 换算率
|
||||
Element vchangerate = doc.createElement("vchangerate");
|
||||
vchangerate.setTextContent(jo.getString("vchangerate"));
|
||||
item.appendChild(vchangerate);
|
||||
|
||||
// 批次号
|
||||
Element vbatchcode = doc.createElement("vbatchcode");
|
||||
vbatchcode.setTextContent(jo.getString("pcsn"));
|
||||
item.appendChild(vbatchcode);
|
||||
|
||||
// 应收主数量 -- 非必填
|
||||
Element nshouldnum = doc.createElement("nshouldnum");
|
||||
nshouldnum.setTextContent("");
|
||||
item.appendChild(nshouldnum);
|
||||
|
||||
// 应收数量 -- 非必填
|
||||
Element nshouldassistnum = doc.createElement("nshouldassistnum");
|
||||
nshouldassistnum.setTextContent("");
|
||||
item.appendChild(nshouldassistnum);
|
||||
|
||||
// 实收主数量
|
||||
double real_qty2 = jo.getDouble("real_qty");
|
||||
String real_str = NumberUtil.round(real_qty2,2).doubleValue()+"";
|
||||
Element nnum = doc.createElement("nnum");
|
||||
nnum.setTextContent(real_str);
|
||||
item.appendChild(nnum);
|
||||
|
||||
// 实收数量
|
||||
Element nassistnum = doc.createElement("nassistnum");
|
||||
nassistnum.setTextContent(real_str);
|
||||
item.appendChild(nassistnum);
|
||||
|
||||
// 单价
|
||||
Element ncostprice = doc.createElement("ncostprice");
|
||||
item.appendChild(ncostprice);
|
||||
|
||||
// 金额
|
||||
Element ncostmny = doc.createElement("ncostmny");
|
||||
item.appendChild(ncostmny);
|
||||
|
||||
// 计划单价
|
||||
Element nplannedprice = doc.createElement("nplannedprice");
|
||||
item.appendChild(nplannedprice);
|
||||
|
||||
// 计划金额
|
||||
Element nplannedmny = doc.createElement("nplannedmny");
|
||||
item.appendChild(nplannedmny);
|
||||
|
||||
// 入库日期
|
||||
Element dbizdate = doc.createElement("dbizdate");
|
||||
dbizdate.setTextContent(jo.getString("biz_date"));
|
||||
item.appendChild(dbizdate);
|
||||
|
||||
// 货位 -- 非必填
|
||||
Element clocationid = doc.createElement("clocationid");
|
||||
clocationid.setTextContent("");
|
||||
item.appendChild(clocationid);
|
||||
|
||||
// 来源单据头ID -- 非必填
|
||||
Element csourcebillhid = doc.createElement("csourcebillhid");
|
||||
csourcebillhid.setTextContent(jo.getString("purchase_id"));
|
||||
item.appendChild(csourcebillhid);
|
||||
|
||||
// 来源单据体ID -- 非必填
|
||||
Element csourcebillbid = doc.createElement("csourcebillbid");
|
||||
csourcebillbid.setTextContent(jo.getString("purchase_id_b"));
|
||||
item.appendChild(csourcebillbid);
|
||||
|
||||
// 来源单据类型 -- 非必填
|
||||
Element csourcetype = doc.createElement("csourcetype");
|
||||
csourcetype.setTextContent("21");
|
||||
item.appendChild(csourcetype);
|
||||
|
||||
// 来源单据交易类型 -- 非必填
|
||||
Element csourcetranstype = doc.createElement("csourcetranstype");
|
||||
csourcetranstype.setTextContent("1002A110000000064D5L");
|
||||
item.appendChild(csourcetranstype);
|
||||
|
||||
// 来源单据号 -- 非必填
|
||||
Element vsourcebillcode = doc.createElement("vsourcebillcode");
|
||||
vsourcebillcode.setTextContent(jo.getString("vbillcode"));
|
||||
item.appendChild(vsourcebillcode);
|
||||
|
||||
// 来源单据行号 -- 非必填
|
||||
Element vsourcerowno = doc.createElement("vsourcerowno");
|
||||
vsourcerowno.setTextContent(jo.getString("crowno"));
|
||||
item.appendChild(vsourcerowno);
|
||||
|
||||
// 源头单据类型 -- 非必填
|
||||
Element cfirsttype = doc.createElement("cfirsttype");
|
||||
cfirsttype.setTextContent("21");
|
||||
item.appendChild(cfirsttype);
|
||||
|
||||
// 源头单据交易类型 -- 非必填
|
||||
Element cfirsttranstype = doc.createElement("cfirsttranstype");
|
||||
cfirsttranstype.setTextContent("1002A110000000064D5L");
|
||||
item.appendChild(cfirsttranstype);
|
||||
|
||||
// 源头单据交易类型 -- 非必填
|
||||
Element cfirstbillhid = doc.createElement("cfirstbillhid");
|
||||
cfirstbillhid.setTextContent(jo.getString("purchase_id"));
|
||||
item.appendChild(cfirstbillhid);
|
||||
|
||||
// 源头单据号 -- 非必填
|
||||
Element vfirstbillcode = doc.createElement("vfirstbillcode");
|
||||
vfirstbillcode.setTextContent(jo.getString("vbillcode"));
|
||||
item.appendChild(vfirstbillcode);
|
||||
|
||||
// 源头单据行号 -- 非必填
|
||||
Element vfirstrowno = doc.createElement("vfirstrowno");
|
||||
vfirstrowno.setTextContent(jo.getString("crowno"));
|
||||
item.appendChild(vfirstrowno);
|
||||
|
||||
// 源头单据体ID -- 非必填
|
||||
Element cfirstbillbid = doc.createElement("cfirstbillbid");
|
||||
cfirstbillbid.setTextContent(jo.getString("purchase_id_b"));
|
||||
item.appendChild(cfirstbillbid);
|
||||
|
||||
// 供应商 -- 非必填
|
||||
Element cvendorid = doc.createElement("cvendorid");
|
||||
item.appendChild(cvendorid);
|
||||
|
||||
// 行备注 -- 非必填
|
||||
Element vnotebody = doc.createElement("vnotebody");
|
||||
vnotebody.setTextContent("诺力正式-"+jo.getString("label"));
|
||||
item.appendChild(vnotebody);
|
||||
|
||||
// 出入库类型
|
||||
Element cbodytranstypecode = doc.createElement("cbodytranstypecode");
|
||||
cbodytranstypecode.setTextContent("45-01");
|
||||
item.appendChild(cbodytranstypecode);
|
||||
|
||||
// 库存组织最新版本
|
||||
Element pk_org2 = doc.createElement("pk_org");
|
||||
pk_org2.setTextContent("0001A110000000002IE6");
|
||||
item.appendChild(pk_org2);
|
||||
|
||||
// 库存组织
|
||||
Element pk_org_v2 = doc.createElement("pk_org_v");
|
||||
pk_org_v2.setTextContent("0001A110000000002IE6");
|
||||
item.appendChild(pk_org_v2);
|
||||
|
||||
// 库存仓库
|
||||
Element cbodywarehouseid = doc.createElement("cbodywarehouseid");
|
||||
cbodywarehouseid.setTextContent(erp_storage_id);
|
||||
item.appendChild(cbodywarehouseid);
|
||||
|
||||
// 件数 -- 非必填
|
||||
Element npiece = doc.createElement("npiece");
|
||||
npiece.setTextContent("1");
|
||||
item.appendChild(npiece);
|
||||
|
||||
// 批次主键
|
||||
JSONObject batch_jo = new JSONObject();
|
||||
batch_jo.put("item_id", jo.getString("item_id"));
|
||||
batch_jo.put("pcsn", jo.getString("pcsn"));
|
||||
try {
|
||||
String batch_id = this.getBatchId(batch_jo);
|
||||
if (StrUtil.isNotEmpty(batch_id)) {
|
||||
Element pk_batchcode = doc.createElement("pk_batchcode");
|
||||
pk_batchcode.setTextContent(batch_id);
|
||||
item.appendChild(pk_batchcode);
|
||||
} else {
|
||||
Element pk_batchcode = doc.createElement("pk_batchcode");
|
||||
pk_batchcode.setTextContent("");
|
||||
item.appendChild(pk_batchcode);
|
||||
}
|
||||
} catch (SQLException throwables) {
|
||||
throwables.printStackTrace();
|
||||
}
|
||||
}
|
||||
bill.appendChild(billhead);
|
||||
ufinterface.appendChild(bill);
|
||||
doc.appendChild(ufinterface);
|
||||
String xml_Str = XmlUtil.toStr(doc);
|
||||
log.info(xml_Str);
|
||||
return xml_Str;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,9 @@
|
||||
userper.ext_id AS make_ext_id,
|
||||
userper.extuser_id AS create_user_id,
|
||||
mb.measrate AS vchangerate,
|
||||
dict.label
|
||||
dict.label,
|
||||
mst.biz_date,
|
||||
mst.input_time
|
||||
FROM
|
||||
st_ivt_iostorinvdtl dtl
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dtl.iostorinv_id
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
[交易说明]
|
||||
交易名: 出入库回传查询
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.material_id TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
QUERY
|
||||
SELECT
|
||||
p.purchase_organize,
|
||||
p.company_version,
|
||||
p.house_id
|
||||
FROM
|
||||
pcs_rc_receivedtl d
|
||||
INNER JOIN pcs_if_purchaseorderproc p ON d.source_billdtl_id = p.id
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.pcsn <> ""
|
||||
d.pcsn = 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.material_id <> ""
|
||||
d.material_id = 输入.material_id
|
||||
ENDOPTION
|
||||
order by p.create_date DESC
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
m.bill_type
|
||||
FROM
|
||||
st_ivt_iostorinvdtl d
|
||||
INNER JOIN st_ivt_iostorinv m ON m.iostorinv_id = d.iostorinv_id
|
||||
WHERE
|
||||
m.io_type = '0'
|
||||
|
||||
OPTION 输入.pcsn <> ""
|
||||
d.pcsn = 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.material_id <> ""
|
||||
d.material_id = 输入.material_id
|
||||
ENDOPTION
|
||||
|
||||
order by m.input_time DESC
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
@@ -87,6 +87,19 @@ public class IvtQueryServiceImpl implements IvtQueryService {
|
||||
}
|
||||
ja.add(jo_now);
|
||||
}
|
||||
|
||||
for (int i = 0; i < ja.size(); i++) {
|
||||
JSONObject jsonIvt = ja.getJSONObject(i);
|
||||
|
||||
JSONObject jo2 = WQL.getWO("Qivt_query_02").addParam("flag", "2")
|
||||
.addParam("pcsn", jsonIvt.getString("pcsn"))
|
||||
.process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jo2)) {
|
||||
jsonIvt.put("purchase_organize", jo2.getString("purchase_organize"));
|
||||
jsonIvt.put("user_dept_name", jo2.getString("user_dept_name"));
|
||||
}
|
||||
}
|
||||
|
||||
map.put("flag", "01");
|
||||
JSONArray jo2 = WQL.getWO("Qivt_query_01").addParamMap(map).process().getResultJSONArray(1);
|
||||
|
||||
|
||||
@@ -664,6 +664,7 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
||||
WQLObject mater_wql = WQLObject.getWQLObject("md_me_materialbase");
|
||||
String material_id = map.get("material_id");
|
||||
String sourceName = map.get("source_name");
|
||||
String pk_org_v = map.get("pk_org_v");
|
||||
String hide = map.get("hide");
|
||||
if ("false".equals(hide)){
|
||||
hide= "";
|
||||
@@ -691,6 +692,7 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
||||
.addParam("source_name", sourceName)
|
||||
.addParam("hide", hide)
|
||||
.addParam("mater_ids", allmaterialId)
|
||||
.addParam("pk_org_v", pk_org_v)
|
||||
.process().getResultJSONArray(0);
|
||||
return ja;
|
||||
}
|
||||
|
||||
@@ -72,3 +72,24 @@
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
dtl.pcsn,
|
||||
proc.purchase_organize,
|
||||
proc.use_dept_id,
|
||||
proc.company_version,
|
||||
proc.house_id,
|
||||
proc.user_dept_name,
|
||||
proc.house_name
|
||||
FROM
|
||||
pcs_rc_receivedtl dtl
|
||||
INNER JOIN pcs_if_purchaseorderproc proc ON dtl.source_billdtl_id = proc.id
|
||||
WHERE 1=1
|
||||
OPTION 输入.pcsn <> ""
|
||||
dtl.pcsn = 输入.pcsn
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -124,6 +124,8 @@
|
||||
<el-table-column prop="contract_no" label="合同编码" />
|
||||
<el-table-column prop="price" label="无税单价" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="price_tax" label="含税单价" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="purchase_organize" label="采购组织" width="160" />
|
||||
<el-table-column prop="user_dept_name" label="使用部门" width="160" />
|
||||
<el-table-column prop="input_optname" label="导入人" />
|
||||
<el-table-column prop="update_optname" label="更新人" />
|
||||
<el-table-column prop="input_time" label="导入时间" width="150px" />
|
||||
|
||||
@@ -74,6 +74,38 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购组织">
|
||||
<el-select
|
||||
v-model="query.purchase_organize"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
size="mini"
|
||||
placeholder="采购组织"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.purchase_organize"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用部门">
|
||||
<el-select
|
||||
v-model="query.use_dept_id"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
size="mini"
|
||||
placeholder="使用部门"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.use_dept"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料批次">
|
||||
<label slot="label">批 次:</label>
|
||||
|
||||
@@ -245,6 +277,7 @@ import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'Receivemst',
|
||||
dicts: ['purchase_organize', 'use_dept'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, AddShowDialog },
|
||||
mixins: [presenter(), header(), crud(), form()],
|
||||
cruds() {
|
||||
|
||||
@@ -138,6 +138,8 @@
|
||||
<el-table-column prop="end_name" min-width="80" label="结束人"/>
|
||||
<el-table-column prop="add_time" min-width="140" label="补料时间"/>
|
||||
<el-table-column prop="add_name" min-width="80" label="补料人"/>
|
||||
<el-table-column prop="purchase_organize" label="采购组织" minwidth="140" />
|
||||
<el-table-column prop="user_dept_name" label="使用部门" minwidth="140" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
|
||||
@@ -455,7 +455,14 @@ export default {
|
||||
this.nowrow = row
|
||||
},
|
||||
async insertdtl() {
|
||||
this.form.tableData.push({ quality_scode: '02', ivt_qty: 0, mol_qty: 0, is_active: '1', ivt_level: '01', edit: false, is_add: true })
|
||||
this.form.tableData.push({
|
||||
struct_id: this.form.struct_id,
|
||||
struct_code: this.form.struct_code,
|
||||
struct_name: this.form.struct_name,
|
||||
sect_id: this.form.sect_id,
|
||||
quality_scode: '02',
|
||||
ivt_qty: 0, mol_qty: 0,
|
||||
is_active: '1', ivt_level: '01', edit: false, is_add: true })
|
||||
this.form.dtl_num = this.form.tableData.length
|
||||
},
|
||||
typeChange(val) {
|
||||
|
||||
@@ -191,6 +191,8 @@
|
||||
<el-table-column prop="warehousing_qty" label="待入数" :formatter="formatQty" min-width="100" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" min-width="100" />
|
||||
<el-table-column prop="instorage_time" label="入库时间" minwidth="140" />
|
||||
<el-table-column prop="purchase_organize" label="采购组织" minwidth="140" />
|
||||
<el-table-column prop="user_dept_name" label="使用部门" minwidth="140" />
|
||||
<el-table-column v-permission="['admin','stockrecord_id:edit','stockrecord_id:del']" fixed="right" label="操作" width="70px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="doDelete(scope.row)" />
|
||||
|
||||
@@ -75,6 +75,22 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购组织">
|
||||
<el-select
|
||||
v-model="query.pk_org_v"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="采购组织"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in CGList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同未到货重量">
|
||||
<div>
|
||||
<el-radio-group v-model="query.iszero" @change="crud.toQuery">
|
||||
@@ -120,6 +136,7 @@
|
||||
<el-table-column prop="subscribedate" label="签订时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="contract_no" label="合同编码" width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="proc_status" label="处理状态" width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="pk_org_v" label="采购组织" width="120px" show-overflow-tooltip :formatter="formatCG" />
|
||||
<el-table-column prop="supp_name" label="供应商" min-width="220" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip />
|
||||
@@ -211,6 +228,10 @@ export default {
|
||||
{ 'name': '在途', 'code': '在途' },
|
||||
{ 'name': '完成', 'code': '完成' }
|
||||
],
|
||||
CGList: [
|
||||
{ 'value': '0001A11000000001MYHJ', 'label': '武汉公司' },
|
||||
{ 'value': '0001A110000000002IE5', 'label': '苏州公司' }
|
||||
],
|
||||
openParam: null,
|
||||
receiveDialog: false,
|
||||
remarkDaing: false
|
||||
@@ -247,6 +268,15 @@ export default {
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
},
|
||||
formatCG(row, column) {
|
||||
if (row.pk_org_v === '0001A110000000002IE5') {
|
||||
return '苏州公司'
|
||||
} else if (row.pk_org_v === '0001A11000000001MYHJ') {
|
||||
return '武汉公司'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,21 @@
|
||||
:label="item.material_name"
|
||||
:value="item.material_id"
|
||||
/>
|
||||
</el-select>
|
||||
采购组织:<el-select
|
||||
v-model="queryrow.pk_org_v"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择采购组织"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in CGList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
供应商:<el-select
|
||||
v-model="queryrow.source_name"
|
||||
@@ -82,6 +97,7 @@
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="receive_code" label="合同号" min-width="100" />
|
||||
<el-table-column prop="pk_org_v" label="采购组织" min-width="100" :formatter="formatCG" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" />
|
||||
<el-table-column prop="sumqty" label="合同重量" min-width="100" :formatter="crud.formatNum2" />
|
||||
@@ -120,8 +136,12 @@ export default {
|
||||
tableDtl: [],
|
||||
cxjList: [],
|
||||
XLList: [],
|
||||
CGList: [
|
||||
{ 'value': '0001A11000000001MYHJ', 'label': '武汉公司' },
|
||||
{ 'value': '0001A110000000002IE5', 'label': '苏州公司' }
|
||||
],
|
||||
fullscreenLoading: false,
|
||||
queryrow: { material_id: '', source_name: '', hide: true },
|
||||
queryrow: { material_id: '', source_name: '', hide: true, pk_org_v: '' },
|
||||
sortable: null,
|
||||
Depts: [],
|
||||
rows: []
|
||||
@@ -284,6 +304,15 @@ export default {
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
formatCG(row, column) {
|
||||
if (row.pk_org_v === '0001A110000000002IE5') {
|
||||
return '苏州公司'
|
||||
} else if (row.pk_org_v === '0001A11000000001MYHJ') {
|
||||
return '武汉公司'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user