Commit 79916d91 by 宋祥

Merge branch 'dev-sx' of http://git.pseer.com/platform/hp-smart into dev

parents 316ce184 7d596068
...@@ -291,6 +291,29 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -291,6 +291,29 @@ public class ServiceHPSC003 extends ServiceBase {
} }
/** /**
* 生成二维码
*
* @param inInfo
* @return
*/
public EiInfo generateQrcode(EiInfo inInfo) {
try {
String planInfoNo = inInfo.getString(HPSC003.FIELD_PLAN_INFO_NO);
// 已经生成过,不在重复生产
HPSC003 dbSc003 = HPSCTools.HpSc003.getByNo(planInfoNo);
AssertUtils.isNotEmpty(dbSc003.getQrcodeDocId(), "该计划已存在二维码,请勿重复生成");
// 生成新的二维码
HPSCTools.HpSc003.createQrCode(planInfoNo);
// 刷新页面数据
inInfo = this.query(inInfo);
inInfo.setMsg("生成二维码成功");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成二维码失败");
}
return inInfo;
}
/**
* 扫码显示计划明细 * 扫码显示计划明细
* *
* @param inInfo * @param inInfo
......
...@@ -20,8 +20,8 @@ $(function () { ...@@ -20,8 +20,8 @@ $(function () {
} }
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ + 'onclick="check(' + item.id + ',1, \'' + item.planInfoNo + '\',\''
'onclick="check(' + item.id + ',1, \'' + item.planInfoNo + '\',\'' + item.factoryCode + '\')" >提交</a>'; + item.factoryCode + '\')" >提交</a>';
} }
/*else { /*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' + template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
...@@ -42,12 +42,16 @@ $(function () { ...@@ -42,12 +42,16 @@ $(function () {
}, { }, {
field: "qrcodeDocId", field: "qrcodeDocId",
template: function (item) { template: function (item) {
if (isBlank(item.qrcodeDocId)) { let auditStatus = item.status;
return ""; if (!isBlank(item.qrcodeDocId)) {
} else {
return '<img src="' + downloadHref(item.qrcodeDocId) + '" width="20px" height="20px"' return '<img src="' + downloadHref(item.qrcodeDocId) + '" width="20px" height="20px"'
+ ' onclick="imgClick(\'' + item.qrcodeDocId + '\')" />'; + ' onclick="imgClick(\'' + item.qrcodeDocId + '\')" />';
} }
if (auditStatus != 0) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="generateQrcode(\'' + item.planInfoNo + '\')" >生成</a>';
}
return "";
} }
}], }],
/** /**
...@@ -422,6 +426,21 @@ function saveDetail(btn) { ...@@ -422,6 +426,21 @@ function saveDetail(btn) {
} }
/** /**
* 生成二维码
*
* @param planInfoNo
*/
let generateQrcode = function (planInfoNo) {
let inInfo = __eiInfo;
inInfo.set("planInfoNo", planInfoNo);
JSUtils.submitGridsData("result", "HPSC003", "generateQrcode",
true, function (res) {
message(res.msg);
}, inInfo
);
}
/**
* 图片放大 * 图片放大
*/ */
let imgClick = function (docId) { let imgClick = function (docId) {
......
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