Commit 59c9b4d4 authored by 刘学辉's avatar 刘学辉

品质异常单打印格式调整

parent d8df2928
......@@ -234,13 +234,13 @@ function countSum(){
function getDutyPersonGridColumns() {
var columns = [];
columns = [
{display: "工号/供应商编码/客户编码", name: "personNo", width: "180", align: "left", type: "string",
{display: "工号/客户编码", name: "personNo", width: "180", align: "left", type: "string",
editor: { type: 'text'}
},
{display: "姓名/供应商/客户", name: "personName", width: "180", align: "left", type: "string",
{display: "姓名/客户", name: "personName", width: "180", align: "left", type: "string",
editor: {type: 'text'}
},
{display: "部门/供应名称/客户名称", name: "deptName", width: "200", align: "left", type: "string",
{display: "部门/客户名称", name: "deptName", width: "200", align: "left", type: "string",
editor: {type: 'text'}
},
{display: "定责比例(%)", name: "dutyRate", width: "100", align: "left", type: "string",
......
......@@ -208,13 +208,13 @@ function countSum(){
function getDutyPersonGridColumns() {
var columns = [];
columns = [
{display: "工号/供应商编码/客户编码", name: "personNo", width: "180", align: "left", type: "string",
{display: "工号/客户编码", name: "personNo", width: "180", align: "left", type: "string",
editor: { type: 'text'}
},
{display: "姓名/供应商/客户", name: "personName", width: "180", align: "left", type: "string",
{display: "姓名/客户", name: "personName", width: "180", align: "left", type: "string",
editor: {type: 'text'}
},
{display: "部门/供应名称/客户名称", name: "deptName", width: "200", align: "left", type: "string",
{display: "部门/客户名称", name: "deptName", width: "200", align: "left", type: "string",
editor: {type: 'text'}
},
{display: "定责比例(%)", name: "dutyRate", width: "100", align: "left", type: "string",
......
......@@ -16,7 +16,7 @@ function initialize() {
function initItemGrid() {
//工厂
$('#werksName').searchbox({
/*$('#werksName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
return {fieldName: "WERKS"}
......@@ -26,7 +26,7 @@ function initItemGrid() {
$('#werksName').val(data.NAME1);
}
});
$('input[name="payMoney"]').change(function () {
$('input[name="payMoney"]').change(function () {
if (isNaN(Number($('#payMoney').val()))){
Public.errorTip("赔付金额必须输入数字!");
$('#payMoney').val("");
......@@ -34,7 +34,7 @@ function initItemGrid() {
return false;
}
countSum();
})
}) */
//供应商
$('#customerName').searchbox({
type: "system", name: "selectSuppliersDatas",
......@@ -208,15 +208,15 @@ function getGridColumns1() {
var columns1 = [];
columns1 = [
{ display: "采购订单", name: "purchaseNo", width: "160", align: "left", type: "string",
editor: {type: 'text',required:false}
editor: {required: true,type: 'text'}
},
{display: "金额", name: "money", width: "100", align: "left", type: "string"
,editor: {type: "text",mask: '9999999.999'}
,editor: {required: true,type: "text",mask: '9999999.999'}
},
{display: "日期", name: "sendDate", width: "140", align: "left", type: "date"
,editor: {type: "date"}
},
{display: "备注", name: "remark", width: "200", align: "left", type: "string"
{display: "备注", name: "remark", width: "350", align: "left", type: "string"
,editor: {type: 'text',required:false}
}]
return columns1;
......@@ -233,7 +233,7 @@ function getGridColumns2() {
textField: 'paymentTextView',
valueField: 'payment',
// checkbox:true,
required: false,
required: true,
render: function (item) {
return item.paymentTextView;
}
......@@ -241,7 +241,7 @@ function getGridColumns2() {
},
{display: "金额", name: "money", width: "100", align: "left", type: "string"
,editor: {type: "text",mask: '9999999.999'}
,editor: {required: true,type: "text",mask: '9999999.999'}
},
{display: "币别", name: "currencyName", width: "100", align: "left", type: "string"
,editor: {type: "text"}
......@@ -249,7 +249,7 @@ function getGridColumns2() {
{display: "账期", name: "period", width: "140", align: "left", type: "text"
,editor: {type: "text"}
},
{display: "备注", name: "remark", width: "200", align: "left", type: "string"
{display: "备注", name: "remark", width: "350", align: "left", type: "string"
,editor: {type: 'text',required:false}
}
]
......@@ -263,7 +263,7 @@ function getGridColumns3() {
{display: "公司", name: "company", width: "100", align: "left", type: "string",hide:"true"},
{display: "公司名称", name: "companyName", width: "180", align: "left", type: "string",
editor: {
required: false, type: "select",
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -280,7 +280,7 @@ function getGridColumns3() {
{display: "采购组织", name: "purchaseTeam", width: "100", align: "left", type: "string",hide:"true"},
{display: "采购组织名称", name: "purchaseTeamName", width: "160", align: "left", type: "string"
,editor: {
required: false, type: "select",
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -301,7 +301,7 @@ function getGridColumns3() {
{display: "采购组", name: "ekgrp", width: "120", align: "left", type: "string",hide:"true"},
{display: "物料名称", name: "productName", width: "180", align: "left", type: "string"
,editor: {
required: false, type: "select",
required: true, type: "select",
data: {
type: 'system',
name: "sapMaterialSelect",
......@@ -322,7 +322,7 @@ function getGridColumns3() {
}
},
{display: "数量", name: "number", width: "100", align: "left", type: "string"
,editor: {type: "text",mask: '9999999.999'}
,editor: {type: "text",mask: '9999999.999',required: true}
},
{display: "单位", name: "unit", width: "120", align: "left", type: "string",hide:"true"},
{display: "单位名称", name: "unitName", width: "80", align: "left", type: "string"
......@@ -348,13 +348,13 @@ function getGridColumns3() {
// ,editor: {type: "text",mask: '9999999.999'}
// },
{display: "需求日期", name: "needDate", width: "140", align: "left", type: "date"
,editor: {type: "date"}
,editor: {type: "date",required: true}
},
{display: "工厂", name: "werks", width: "140", align: "left", type: "string",hide:"true"},
{display: "工厂编码", name: "werks", width: "140", align: "left", type: "string",hide:"true"},
{display: "收货工厂", name: "werksName", width: "160", align: "left", type: "string",
// editor: {type: "text"}
editor: {
required: false, type: "select",
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -370,7 +370,7 @@ function getGridColumns3() {
},
{display: "收货地点", name: "locationName", width: "160", align: "left", type: "string",
editor: {
required: false, type: "select",
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
......
......@@ -71,7 +71,7 @@
<div class="hg-form-row">
<x:textareaC name="dealResult" required="false" label="处理结果" maxLength="120" labelCol="1" fieldCol="11" rows="2" readonly="true"/>
<x:textareaC name="dealResult" required="false" label="处理结果" maxLength="120" labelCol="1" fieldCol="11" rows="2" readonly="false"/>
</div>
<div class="hg-form-row">
<x:textareaC name="remark" required="false" label="备注" maxLength="120" labelCol="1" fieldCol="11" rows="2"/>
......
......@@ -30,7 +30,7 @@ function initGrid() {
});
}
},
addSupplierHandler: {id: 'supplierException', text: '添加供应商异常单', img: 'fa-building-o', className: 'btn-gray',
addSupplierHandler: {id: 'supplierException', text: '添加供应商异常单', img: 'fa-book', className: 'btn-gray',
click: function () {
UICtrl.addTabItem({
tabid: 'addExceptionReportSupplier',
......@@ -43,19 +43,31 @@ function initGrid() {
gridManager = UICtrl.grid('#maingrid', {
columns: [
{display: "状态", name: "statusTextView", width: "80", align: "left", type: "string"}
, {display: "id", name: "id", width: "140", align: "left", type: "string", hide: true}
, {display: "id", name: "id", width: "100", align: "left", type: "string", hide: true}
, {display: "报告编号", name: "billCode", width: 150, minWidth: 60, type: "string", align: "center"}
, {display: "异常类型", name: "exceptionTypeTextView", width: 100, minWidth: 60, type: "string", align: "center"}
, {display: "单据类型", name: "billType", width: 100, minWidth: 60, type: "string", align: "center",
render: function (item) {
if (item.billType=="supplier"){
return "供应商";
} else if (item.billType=="purchase"){
return "采购";
} else {
return "生产";
}
}
}
, {display: "呈报日期", name: "reportDate", width: 140, minWidth: 60, type: "date", align: "center"}
// , {display: "异常标题", name: "exceptionTitle", width: 200, minWidth: 60, type: "date", align: "center"}
// , {display: "客户编号", name: "customerName", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "客户名称", name: "customerName", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "客户单号", name: "customerOrderNo", width: 180, minWidth: 60, type: "date", align: "center"}
// , {display: "异常陈诉", name: "exceptionState", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "改善措施", name: "dealMethod", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "异常原因", name: "exceptionReason", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "责任人", name: "checkOperatorName", width: 160, minWidth: 60, type: "date", align: "center"}
, {display: "处理结果", name: "dealResult", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "备注", name: "remark", width: 200, minWidth: 60, type: "date", align: "center"}
//, {display: "备注", name: "remark", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "创建日期", name: "fillinDate", width: 150, minWidth: 60, type: "date", align: "center"}
, {display: "创建部门", name: "deptName", width: 120, minWidth: 60, type: "date", align: "center"}
, {display: "创建人", name: "personMemberName", width: 100, minWidth: 60, type: "date", align: "center"}
],
......
......@@ -36,7 +36,7 @@
<p style="margin:5pt; orphans:0; widows:0;width:100pt"><span style="font-family:SimSun; font-weight:bolder ">呈报日期</span></p>
</td>
<td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; vertical-align:top; width:80%;">
<p style="margin:5pt; orphans:0; widows:0"><span style="font-family:SimSun;width:300pt ">${(head.reportDate)!' '}</span></p>
<p style="margin:5pt; orphans:0; widows:0"><span style="font-family:SimSun;width:300pt ">${(head.reportDate?substring(0,9))!' '}</span></p>
</td>
</tr>
</table>
......@@ -63,7 +63,7 @@
<table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt;text-align: center;font-size: 9.5pt;line-height: 10pt;">
<tr style="">
<td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; vertical-align:top; width:50pt">
<p style="margin:5pt; orphans:0; widows:0;width:100pt"><span style="font-family:SimSun; font-weight:bolder ">生产单号</span></p>
<p style="margin:5pt; orphans:0; widows:0;width:100pt"><span style="font-family:SimSun; font-weight:bolder ">生产/采购单号</span></p>
</td>
<td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; vertical-align:top; width:80pt">
<p style="margin:5pt; orphans:0; widows:0"><span style="font-family:SimSun; font-weight:bolder ">产品编码</span></p>
......@@ -135,7 +135,7 @@
</td>
<td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; vertical-align:top; width:50pt">
<p style="margin:5pt; orphans:0; widows:0"><span
style="font-family:SimSun; ">${(list.sendDate)!''}</span>
style="font-family:SimSun; ">${(list.sendDate?substring(0,9))!''}</span>
</p>
</td>
</tr>
......@@ -238,13 +238,13 @@
<table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt;text-align: center;font-size: 9.5pt;line-height: 10pt;">
<tr style="text-align: center;font-size:6.5pt;line-height: 10pt;">
<td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; vertical-align:top; width:80pt">
<p style="margin:5pt; orphans:0; widows:0;width:100pt"><span style="font-family:SimSun; font-weight:bolder ">工号/供应商编码/客户名编码</span></p>
<p style="margin:5pt; orphans:0; widows:0;width:100pt"><span style="font-family:SimSun; font-weight:bolder ">工号/客户编码</span></p>
</td>
<td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; vertical-align:top; width:80pt">
<p style="margin:5pt; orphans:0; widows:0"><span style="font-family:SimSun; font-weight:bolder ">姓名/供应商名称/客户名称</span></p>
<p style="margin:5pt; orphans:0; widows:0"><span style="font-family:SimSun; font-weight:bolder ">姓名/户名称</span></p>
</td>
<td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; vertical-align:top; width:100pt">
<p style="margin:5pt; orphans:0; widows:0"><span style="font-family:SimSun; font-weight:bolder">部门/供应名称/客户名称</span></p>
<p style="margin:5pt; orphans:0; widows:0"><span style="font-family:SimSun; font-weight:bolder">部门/客户名称</span></p>
</td>
<td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; vertical-align:top; width:100pt">
<p style="margin:5pt; orphans:0; widows:0"><span style="font-family:SimSun; font-weight:bolder">定责比例</span></p>
......
This diff is collapsed.
......@@ -134,9 +134,10 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
List<ExceptionReportCash> exceptionReportCashList = this.getBizEntities(ExceptionReportCash.class, "handleCash");
List<ExceptionReportGoods> exceptionReportGoodsList = this.getBizEntities(ExceptionReportGoods.class, "handleGoods");
if (CollectionUtil.isEmpty(exceptionReportPayableList)
&&CollectionUtil.isEmpty(exceptionReportCashList)
&&CollectionUtil.isEmpty(exceptionReportGoodsList)
if (("supplier".equals(exceptionReport.getBillType()))
&&CollectionUtil.isEmpty(exceptionReportPayableList)
&&CollectionUtil.isEmpty(exceptionReportCashList)
&&CollectionUtil.isEmpty(exceptionReportGoodsList)
) {
throw new IllegalArgumentException("处理方式必须填写一项!");
}
......@@ -193,7 +194,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
exceptionReport.setStatusId(status.getId());
List <ExceptionReportGoods> goodslist=exceptionReportGoodsApplication.findByExceptionReportId(exceptionReport.getId());
//供应商异常 商品赔付 创建采购订单
if ("supplier".equals(exceptionReport.getBillType())) {
int u=0;
......@@ -341,7 +342,56 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
String preLastAuditPerson = mapList.get(1).get("handlerName").toString();
data.put("preAuditPerson",preLastAuditPerson);
}
if ("supplier".equals(exceptionReport.getBillType())){
//StringBuffer dealmethod=new StringBuffer("");
List <ExceptionReportPayable> paylist=exceptionReportPayableApplication.findByExceptionReportId(id);
if (CollectionUtil.isNotEmpty(paylist)){
// dealmethod.append("货币结算:(扣除应付款)");
int u=0;
for (ExceptionReportPayable pay:paylist){
Date da=pay.getSendDate();
// String dateStr = DateUtil.getDateFormat("yyyy-MM-dd", pay.getSendDate());
// pay.setSendDate(dateStr);
// paylist.set(u,pay);
u++;
}
data.put("paylist",paylist);
}
/*for (ExceptionReportPayable pay:paylist){
dealmethod.append("采购订单:").append(pay.getPurchaseNo());
dealmethod.append(",金额:").append(pay.getMoney());
dealmethod.append(",日期:").append(pay.getSendDate());
}*/
List <ExceptionReportCash> cashlist=exceptionReportCashApplication.findByExceptionReportId(id);
if (CollectionUtil.isNotEmpty(cashlist)){
//dealmethod.append("货币结算:(现金/转帐)");
int u=0;
for (ExceptionReportCash cash:cashlist){
String payName=DictUtil.getDictionaryDetailText("zwels",cash.getPayment());
cash.setPayment(payName);
cashlist.set(u,cash);
u++;
}
data.put("cashlist",cashlist);
}
List <ExceptionReportGoods> goodslist=exceptionReportGoodsApplication.findByExceptionReportId(id);
if (CollectionUtil.isNotEmpty(goodslist)){
// dealmethod.append("商品赔付:");
data.put("goodslist",goodslist);
}
/*for (ExceptionReportGoods goods:goodslist){
dealmethod.append("公司:").append(goods.getCompanyName());
dealmethod.append(",采购组织:").append(goods.getPurchaseTeamName());
dealmethod.append(",物料名称:").append(goods.getProductName());
dealmethod.append(",数量:").append(goods.getNumber());
dealmethod.append(",单位:").append(goods.getUnitName());
dealmethod.append(",需求日期:").append(goods.getNeedDate());
dealmethod.append(",收货工厂:").append(goods.getWerksName());
dealmethod.append(",收货地点:").append(goods.getLocationName());
}*/
// exceptionReport.setDealMethod(dealmethod.toString());
}
data.put("head",exceptionReport);
data.put("itemList",itemList);
data.put("dutyList",dutyList);
......@@ -355,7 +405,12 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
File fileb = new File("baoshen.png");
data.put("baoshen",fileb);
Template template = freemarkerConfigurer.getConfiguration().getTemplate("exceptionReport.ftl");
Template template = null;
if ("supplier".equals(exceptionReport.getBillType())){
template = freemarkerConfigurer.getConfiguration().getTemplate("exceptionReportSupplier.ftl");
} else {
template = freemarkerConfigurer.getConfiguration().getTemplate("exceptionReport.ftl");
}
byteArrayOutputStream = CommonUtils.createPDF(data,template);
}catch (Exception e) {
......
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