Commit 3a4d405d authored by 谢希宇's avatar 谢希宇

Submit by Strive

Date 2021/03/24
Project End
parent efba531b
...@@ -377,7 +377,7 @@ ...@@ -377,7 +377,7 @@
"aTargets": [3], "aTargets": [3],
"mData": "userName", "mData": "userName",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (c) { if (c.userName) {
return c.userName.slice(0, 1) + '*' + c.userName.slice(2, c.userName.length); return c.userName.slice(0, 1) + '*' + c.userName.slice(2, c.userName.length);
} else { } else {
return null; return null;
......
...@@ -33,7 +33,7 @@ public class ConsultSheetVO { ...@@ -33,7 +33,7 @@ public class ConsultSheetVO {
private String phone; private String phone;
/* 疾病史 */ /* 疾病史 */
@ExportConfig(value = "三期用户", width = 100, showLevel = 1) @ExportConfig(value = "患者类型", width = 100, showLevel = 1)
private String isThree; private String isThree;
// /* 病情描述 */ // /* 病情描述 */
......
...@@ -348,7 +348,7 @@ public class ConsultSheetController { ...@@ -348,7 +348,7 @@ public class ConsultSheetController {
consultSheetVO.setSex(consultSheetObj.getSex() == 1 ? "男" : "女"); consultSheetVO.setSex(consultSheetObj.getSex() == 1 ? "男" : "女");
consultSheetVO.setPhone( tpl.append(consultSheetObj.getPhone()).replace(3,7, "****").toString()); consultSheetVO.setPhone( tpl.append(consultSheetObj.getPhone()).replace(3,7, "****").toString());
tpl.setLength(0); tpl.setLength(0);
consultSheetVO.setIsThree(StringUtils.equals(consultSheetVO.getIsThree(), "0")? "三期患者":(StringUtils.equals(consultSheetVO.getIsThree(), "1") ? "四期患者":"")); consultSheetVO.setIsThree(StringUtils.equals(consultSheetObj.getIsThree(), "0")? "三期患者":(StringUtils.equals(consultSheetObj.getIsThree(), "1") ? "四期患者":""));
consultSheetVO.setStatus("0".equals(consultSheetObj.getStatus()) ? "未审核" : "1".equals(consultSheetObj.getStatus()) ? "已通过" : "已拒绝"); consultSheetVO.setStatus("0".equals(consultSheetObj.getStatus()) ? "未审核" : "1".equals(consultSheetObj.getStatus()) ? "已通过" : "已拒绝");
consultSheetVO.setPharmaName(consultSheetObj.getPharmaName()); consultSheetVO.setPharmaName(consultSheetObj.getPharmaName());
consultSheetVO.setCustomerName(consultSheetObj.getCustomerName()); consultSheetVO.setCustomerName(consultSheetObj.getCustomerName());
......
...@@ -93,21 +93,21 @@ ...@@ -93,21 +93,21 @@
> >
</div> </div>
<div class="form-group form-md-line-input col-md-12"> <!-- <div class="form-group form-md-line-input col-md-12">-->
<label>抬头类型</label> <!-- <label>抬头类型</label>-->
<input type="text" required class="form-control pull-right" readonly <!-- <input type="text" required class="form-control pull-right" readonly-->
value="$!{data.status}" maxlength="500" required <!-- value="$!{data.status}" maxlength="500" required-->
name="status" placeholder="抬头类型" <!-- name="status" placeholder="抬头类型"-->
> <!-- >-->
</div> <!-- </div>-->
<div class="form-group form-md-line-input col-md-12"> <!-- <div class="form-group form-md-line-input col-md-12">-->
<label>发票内容</label> <!-- <label>发票内容</label>-->
<input type="text" required class="form-control pull-right" readonly <!-- <input type="text" required class="form-control pull-right" readonly-->
value="$!{data.invoiceContent}" maxlength="500" required <!-- value="$!{data.invoiceContent}" maxlength="500" required-->
name="invoiceContent" placeholder="发票内容" <!-- name="invoiceContent" placeholder="发票内容"-->
> <!-- >-->
</div> <!-- </div>-->
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>发票类型</label> <label>发票类型</label>
...@@ -133,13 +133,13 @@ ...@@ -133,13 +133,13 @@
> >
</div> </div>
<div class="form-group form-md-line-input col-md-12"> <!-- <div class="form-group form-md-line-input col-md-12">-->
<label>开票人</label> <!-- <label>开票人</label>-->
<input type="text" required class="form-control pull-right" readonly <!-- <input type="text" required class="form-control pull-right" readonly-->
value="$!{data.clerkId}" maxlength="500" required <!-- value="$!{data.clerkId}" maxlength="500" required-->
name="clerkId" placeholder="开票人" <!-- name="clerkId" placeholder="开票人"-->
> <!-- >-->
</div> <!-- </div>-->
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>openId</label> <label>openId</label>
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
<th>订单编码</th> <th>订单编码</th>
<th>抬头类型</th> <th>抬头类型</th>
<th>来源</th> <th>来源</th>
<th>开票人</th> <!-- <th>开票人</th>-->
<th>别名</th> <th>别名</th>
<th>操作人</th> <th>操作人</th>
<th>推送邮箱</th> <th>推送邮箱</th>
...@@ -233,9 +233,9 @@ ...@@ -233,9 +233,9 @@
{ {
"mData":"invoiceForm" "mData":"invoiceForm"
}, },
{ // {
"mData":"clerkId" // "mData":"clerkId"
}, // },
{ {
"mData":"aliasName" "mData":"aliasName"
}, },
...@@ -359,14 +359,14 @@ ...@@ -359,14 +359,14 @@
// }, // },
{ {
"aTargets": [8], "aTargets": [7],
"mData": "createTime", "mData": "createTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return formatDates(a, "yyyy-MM-dd HH:mm:ss"); return formatDates(a, "yyyy-MM-dd HH:mm:ss");
} }
}, },
{ {
"aTargets": [9], "aTargets": [8],
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
var html = '#if($shiro.hasPermission("qy:invoice:edit"))'; var html = '#if($shiro.hasPermission("qy:invoice:edit"))';
......
...@@ -33,9 +33,9 @@ public class Invoice implements Serializable { ...@@ -33,9 +33,9 @@ public class Invoice implements Serializable {
/** 来源(0:移动端 1:后台) */ /** 来源(0:移动端 1:后台) */
@ExportConfig(value = "来源", width = 100, showLevel = 1) @ExportConfig(value = "来源", width = 100, showLevel = 1)
private String invoiceForm; private String invoiceForm;
/** 开票人id(移动端传opendId,后台传userid) */ /** 开票人(移动端传opendId,后台传userid) */
@ExportConfig(value = "开票人", width = 100, showLevel = 1) @ExportConfig(value = "开票人", width = 100, showLevel = 1)
private String clerkId; private String operator;
/** 订单ID */ /** 订单ID */
@ExportConfig(value = "订单编码", width = 100, showLevel = 1) @ExportConfig(value = "订单编码", width = 100, showLevel = 1)
private String orderId; private String orderId;
...@@ -58,7 +58,6 @@ public class Invoice implements Serializable { ...@@ -58,7 +58,6 @@ public class Invoice implements Serializable {
/** /**
* 状态( 0:个人 1:企业 ) * 状态( 0:个人 1:企业 )
*/ */
@ExportConfig(value = "抬头类型")
private String status; private String status;
/** 创建时间 */ /** 创建时间 */
private Date createTime; private Date createTime;
...@@ -77,7 +76,7 @@ public class Invoice implements Serializable { ...@@ -77,7 +76,7 @@ public class Invoice implements Serializable {
/** /**
* 操作者 * 操作者
*/ */
private String operator; private String clerkId;
//发票代码 //发票代码
private String invoiceCode; private String invoiceCode;
......
...@@ -15,37 +15,40 @@ public class InvoiceDto { ...@@ -15,37 +15,40 @@ public class InvoiceDto {
private String id; private String id;
/** /**
* 抬头类型(0:个人 1:企业) * 发票类型
*/ */
private String type; private String invoiceType;
/** /**
* 发票税号 * 发票内容
*/ */
private String unitTaxNumber; private String invoiceContent;
/** /**
* 发票抬头 * 抬头类型(0:个人 1:企业)
*/ */
private String invoiceTitle; private String type;
/** /**
* 发票内容 * 发票抬头
*/ */
private String invoiceContent; private String invoiceTitle;
/** /**
* 开票人ID * 发票税号
*/ */
private String openId; private String unitTaxNumber;
/** /**
* 邮箱 * 邮箱
*/ */
private String email; private String email;
private String appId; /**
* 开票人ID
*/
private String openId;
private String appId;
} }
...@@ -65,7 +65,7 @@ public class InvoiceController { ...@@ -65,7 +65,7 @@ public class InvoiceController {
if (!StringUtils.isEmpty(id)) { if (!StringUtils.isEmpty(id)) {
Invoice invoice = invoiceService.fetchById(id); Invoice invoice = invoiceService.fetchById(id);
if (!StringUtils.isEmpty(invoice.getInvoiceType())){ if (!StringUtils.isEmpty(invoice.getInvoiceType())){
invoice.setInvoiceType(invoice.getInvoiceType().equals("1") ? "蓝票" : "红票"); invoice.setInvoiceType(invoice.getInvoiceType().equals("1") ? "企业" : "个人");
} }
if (!StringUtils.isEmpty(invoice.getInvoiceForm())){ if (!StringUtils.isEmpty(invoice.getInvoiceForm())){
invoice.setInvoiceForm(invoice.getInvoiceForm().equals("0") ? "移动端" : "后台"); invoice.setInvoiceForm(invoice.getInvoiceForm().equals("0") ? "移动端" : "后台");
...@@ -73,9 +73,9 @@ public class InvoiceController { ...@@ -73,9 +73,9 @@ public class InvoiceController {
if (!StringUtils.isEmpty(invoice.getPushMode())){ if (!StringUtils.isEmpty(invoice.getPushMode())){
invoice.setPushMode(invoice.getPushMode().equals("0") ? "邮箱" : ""); invoice.setPushMode(invoice.getPushMode().equals("0") ? "邮箱" : "");
} }
if (!StringUtils.isEmpty(invoice.getStatus())){ // if (!StringUtils.isEmpty(invoice.getStatus())){
invoice.setStatus(invoice.getStatus().equals("0") ? "个人" : "企业"); // invoice.setStatus(invoice.getStatus().equals("0") ? "个人" : "企业");
} // }
if (invoice.getCreateTime() != null){ if (invoice.getCreateTime() != null){
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
invoice.setDescription(format.format(invoice.getCreateTime())); invoice.setDescription(format.format(invoice.getCreateTime()));
...@@ -128,7 +128,6 @@ public class InvoiceController { ...@@ -128,7 +128,6 @@ public class InvoiceController {
conds.like("t.order_id", invoice.getOrderId()); conds.like("t.order_id", invoice.getOrderId());
} }
Sort sort = new Sort("t.create_time", OrderType.DESC); Sort sort = new Sort("t.create_time", OrderType.DESC);
List<Invoice> list = invoiceService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength); List<Invoice> list = invoiceService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength);
...@@ -169,10 +168,10 @@ public class InvoiceController { ...@@ -169,10 +168,10 @@ public class InvoiceController {
List<Invoice> list = invoiceService.fetchSearchByPage(conds, sort, 0, 0); List<Invoice> list = invoiceService.fetchSearchByPage(conds, sort, 0, 0);
if (list.size() > 0){ if (list.size() > 0){
for (Invoice invoiceObj : list) { for (Invoice invoiceObj : list) {
invoiceObj.setInvoiceType(StringUtils.isEmpty(invoiceObj.getInvoiceType()) ? "" : invoiceObj.getInvoiceType().equals("1") ? "正票":"红票" ); invoiceObj.setInvoiceType(StringUtils.isEmpty(invoiceObj.getInvoiceType()) ? "" : invoiceObj.getInvoiceType().equals("1") ? "企业":"个人" );
invoiceObj.setInvoiceForm(StringUtils.isEmpty(invoiceObj.getInvoiceForm()) ? "" : invoiceObj.getInvoiceForm().equals("0") ? "移动端" : "后台"); invoiceObj.setInvoiceForm(StringUtils.isEmpty(invoiceObj.getInvoiceForm()) ? "" : invoiceObj.getInvoiceForm().equals("0") ? "移动端" : "后台");
invoiceObj.setPushMode(StringUtils.isEmpty(invoiceObj.getPushMode()) ? "" : "邮箱"); invoiceObj.setPushMode(StringUtils.isEmpty(invoiceObj.getPushMode()) ? "" : "邮箱");
invoiceObj.setStatus(StringUtils.isEmpty(invoiceObj.getStatus()) ? "" : invoiceObj.getStatus().equals("0") ? "个人" :"企业"); //invoiceObj.setStatus(StringUtils.isEmpty(invoiceObj.getStatus()) ? "" : invoiceObj.getStatus().equals("0") ? "个人" :"企业");
} }
} }
ExcelKit.$Export(Invoice.class, response).toExcel(list, "开票信息信息"); ExcelKit.$Export(Invoice.class, response).toExcel(list, "开票信息信息");
......
...@@ -268,6 +268,7 @@ ...@@ -268,6 +268,7 @@
var pageType = '${pageType}'; var pageType = '${pageType}';
var areaList = []; var areaList = [];
var batchNoList = []; var batchNoList = [];
var orderSplitBatchDtoLists = '${orderSplitBatchDtos}';
let status = `$!{data.status}`; let status = `$!{data.status}`;
if (status != null && status != '') { if (status != null && status != '') {
...@@ -368,7 +369,6 @@ ...@@ -368,7 +369,6 @@
function delGoodsFun() { function delGoodsFun() {
$('.list-group').on('click', '.delGoods', function() { $('.list-group').on('click', '.delGoods', function() {
console.log("删除");
let productCode = $(this).parent().find('input[name="productCode"]').val(); let productCode = $(this).parent().find('input[name="productCode"]').val();
let numbers = $(this).parent().find('input[name="sendNum"]').val(); let numbers = $(this).parent().find('input[name="sendNum"]').val();
let scanGoods = $('textarea[name="scanGoodsCode"]').text(); let scanGoods = $('textarea[name="scanGoodsCode"]').text();
...@@ -442,11 +442,14 @@ ...@@ -442,11 +442,14 @@
delGoodsFun(); delGoodsFun();
list(); list();
initBatchNo();
splitOrders();
if (pageType == 'true') { if (pageType == 'true') {
initSplitHtml();
} else {
orderSplit(); orderSplit();
} }
initBatchNo();
splitOrders();
}); });
...@@ -484,7 +487,7 @@ ...@@ -484,7 +487,7 @@
if (pageType == 'true') { if (pageType == 'true') {
HtmlAmount = `<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="${count}"></input>`; HtmlAmount = `<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="${count}"></input>`;
} else { } else {
HtmlAmount = `<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="0"></input>`; HtmlAmount = `<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="${count}"></input>`;
} }
//var HtmlBatchNo = `<input name="batchNo" class="form-control" type="text" style="width: 300px; margin-right: 50px;"></input>`; //var HtmlBatchNo = `<input name="batchNo" class="form-control" type="text" style="width: 300px; margin-right: 50px;"></input>`;
...@@ -509,15 +512,6 @@ ...@@ -509,15 +512,6 @@
</li>`; </li>`;
$("#group").append(html); $("#group").append(html);
toTal();
}
function toTal() {
var count = 0
$('.group [name="htmlAmount"]').each(function(index, item){
count += +item.value
})
$("#orderAmount").val(count.toFixed(2));
} }
/** /**
...@@ -726,6 +720,30 @@ ...@@ -726,6 +720,30 @@
}); });
} }
/**
* 初始化详情拆分页面
*/
function initSplitHtml() {
let list = JSON.parse(orderSplitBatchDtoLists);
let htmlStr = "";
for (let i=0; i<list.length; i++) {
let objs = list[i];
htmlStr += `<li name="form-translate" class="list-group-item split-translate" style="display:flex;">
<input type="hidden" name="idDetail" value="${objs.id}">
<input type="hidden" name="productId" value="${objs.drugsId}">
<input name="productName" class="form-control" style="width: 160px; margin-right: 50px" type="text"
readOnly="readonly" value="${objs.drugsName}">
<input name="productCode" class="form-control" style="width: 200px; margin-right: 50px"
type="text" readOnly="readonly" value="${objs.orderCode}">
<input name="splitNum" class="form-control splitNum" type="text"
style="width: 100px; margin-right: 50px;" readOnly="readonly" value="${objs.drugsNum}">
<input name="batchNo" class="form-control pull-right" readOnly="readonly" value="${objs.drugsBatchNo}"
style="width: 150px; margin-right: 30px;" /></li>`;
}
$('#splitTable').append(htmlStr);
}
var recdTypeAdd = function () { var recdTypeAdd = function () {
var initForm = function () { var initForm = function () {
var initFormCtrl = function () { var initFormCtrl = function () {
......
...@@ -406,10 +406,10 @@ ...@@ -406,10 +406,10 @@
function clickAdd(id, productId, count, price, amount) { function clickAdd(id, productId, count, price, amount) {
var options = goodsList.map(function (item) { var options = goodsList.map(function (item) {
if (productId && productId != null && item.id === productId) { if (productId != null && item.id == productId) {
return `<option selected value="${item.id}" data-price="${item.price}">${item.productName}</option>` return `<option selected value="${item.id}" data-price="${item.price}">${item.productName}</option>`;
} else { } else {
return `<option value="${item.id}" data-price="${item.price}">${item.productName}</option>` return `<option value="${item.id}" data-price="${item.price}">${item.productName}</option>`;
} }
}).join(''); }).join('');
...@@ -417,40 +417,31 @@ ...@@ -417,40 +417,31 @@
if (id && id != null) { if (id && id != null) {
idHtml += `<input type="hidden" id="idDetail" name="idDetail" value="` + id + `">`; idHtml += `<input type="hidden" id="idDetail" name="idDetail" value="` + id + `">`;
} else { } else {
idHtml += `<input type="hidden" id="idDetail" name="idDetail" value="">` idHtml += `<input type="hidden" id="idDetail" name="idDetail" value="">`;
} }
var listHtml = ""; var listHtml = "";
if (count && count != null) { if (count && count != null) {
listHtml += `<input name="listHtml" class="form-control" type='number' style="width: 180px;margin-right: 50px; margin-left: 50px;" #if($!{isView} == 'true') readonly="readonly" #end oninput="if(value>100)value=100;if(value.length>2)value=value.slice(0,2);if(value<=0)value=1" onchange="updateCount(this)" value=${count} ></input>`; listHtml += `<input name="listHtml" class="form-control" type='number' style="width: 180px;margin-right: 50px; margin-left: 50px;" #if($!{isView} == 'true')
readonly="readonly" #end oninput="if(value>100)value=100;if(value.length>2)value=value.slice(0,2);if(value<=0)value=1" onchange="updateCount(this)" value=${count}></input>`;
} else { } else {
listHtml += `<input name="listHtml" class="form-control" type='number' style="width: 180px ;margin-right: 50px; margin-left: 50px;" oninput="if(value>100)value=100;if(value.length>2)value=value.slice(0,2);if(value<=0)value=1" onchange="updateCount(this)" value="1"></input>`; listHtml += `<input name="listHtml" class="form-control" type='number' style="width: 180px ;margin-right: 50px; margin-left: 50px;" oninput="if(value>100)value=100;if(value.length>2)value=value.slice(0,2);if(value<=0)value=1" onchange="updateCount(this)" value="1" />`;
} }
let bool = `$!{isThree}`;
var HtmlPrice = ""; var HtmlPrice = "";
if (price != null) { if (price != null) {
HtmlPrice += `<input name="htmlPrice" class="form-control" data-price="` + price + `" style="width: 180px ;margin-right: 50px" type='text' `; HtmlPrice += `<input name="htmlPrice" class="form-control" data-price="` + Number(price).toFixed(2) + `" style="width:180px;margin-right:50px" type='text' onchange="updatePrice(this)"
if (bool == "1" || isView == "true") { readonly="readonly" value="` + Number(price).toFixed(2) + `" />`;
HtmlPrice += `readonly="readonly"`;
}
let priceTmp = parseInt(price).toFixed(2);
HtmlPrice += ` onchange="updatePrice(this)" value="` + priceTmp + `"></input>`;
} else { } else {
let priceTmp = parseInt(goodsList[0].price).toFixed(2); HtmlPrice += `<input name="htmlPrice" class="form-control" data-price="` + Number(goodsList[0].price).toFixed(2) + `"
HtmlPrice += `<input name="htmlPrice" class="form-control" data-price="` + priceTmp + `" style="width: 180px ;margin-right: 50px" type="text" `; style="width: 180px;margin-right: 50px" type="text" readonly="readonly" onchange="updatePrice(this)" value="` + Number(goodsList[0].price).toFixed(2) + `" />`;
if (bool == "1" || isView == "true") {
HtmlPrice += `readonly="readonly"`;
}
HtmlPrice += ` onchange="updatePrice(this)" value="` + priceTmp + `"></input>`;
} }
var HtmlAmount = ""; var HtmlAmount = "";
if (amount != null) { if (amount != null) {
HtmlAmount += `<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="` + parseInt(amount).toFixed(2) + `" ></input>`; HtmlAmount += `<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="` + Number(amount).toFixed(2) + `" ></input>`;
} else { } else {
var amountTmp = parseInt(goodsList[0].price).toFixed(2); HtmlAmount += `<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px;margin-right: 50px" type="number" readonly="readonly" value="` + Number(goodsList[0].price).toFixed(2) + `"></input>`
HtmlAmount += `<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px;margin-right: 50px" type="number" readonly="readonly" value="` + amountTmp + `"></input>`
} }
let htmlDel = ""; let htmlDel = "";
...@@ -470,7 +461,6 @@ ...@@ -470,7 +461,6 @@
${htmlDel} ${htmlDel}
</li>`; </li>`;
$("#group").append(html); $("#group").append(html);
initSelect2(); initSelect2();
toTal(); toTal();
...@@ -526,6 +516,9 @@ ...@@ -526,6 +516,9 @@
} }
/**
* 需求清单确认提交
*/
function save() { function save() {
var arr = [] var arr = []
var obj = {} var obj = {}
...@@ -663,6 +656,9 @@ ...@@ -663,6 +656,9 @@
} }
} }
/**
* 付款二维码
*/
let qrcodeUrl = `$!{data.payUrl}`; let qrcodeUrl = `$!{data.payUrl}`;
if (qrcodeUrl != null && qrcodeUrl != '') { if (qrcodeUrl != null && qrcodeUrl != '') {
var qrcode = new QRCode("qrcodeDiv", var qrcode = new QRCode("qrcodeDiv",
......
...@@ -238,17 +238,6 @@ ...@@ -238,17 +238,6 @@
readonly="readonly"> readonly="readonly">
</div> </div>
</div> </div>
<!-- <div class="col-xs-2">-->
<!-- <div class="input-group date">-->
<!-- <div class="input-group-addon">-->
<!-- <i class="fa fa-calendar"></i>-->
<!-- </div>-->
<!-- <input type="text"-->
<!-- class="form-control pull-right datepicker"-->
<!-- name="orderEndTime" placeholder="订单结束时间"-->
<!-- readonly="readonly">-->
<!-- </div>-->
<!-- </div>-->
<div class="col-xs-4"> <div class="col-xs-4">
<button type="button" class="search btn btn-primary">搜索</button> <button type="button" class="search btn btn-primary">搜索</button>
...@@ -530,8 +519,8 @@ ...@@ -530,8 +519,8 @@
"aTargets": [5], "aTargets": [5],
"mData": "orderAmount", "mData": "orderAmount",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a != null && Number.isInteger(a)) { if (a != null) {
return parseInt(a).toFixed(2); return Number(a).toFixed(2);
} else { } else {
return a; return a;
} }
...@@ -543,7 +532,7 @@ ...@@ -543,7 +532,7 @@
"mData": "totalAmount", "mData": "totalAmount",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a != null) { if (a != null) {
return parseInt(a/100).toFixed(2); return Number(a/100).toFixed(2);
} }
return ''; return '';
} }
......
...@@ -446,13 +446,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -446,13 +446,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
order.setCreateTimeStr(format.format(order.getCreateTime())); order.setCreateTimeStr(format.format(order.getCreateTime()));
//抬头类型为企业设置发票税号 String str = invoiceUtil.startInvoice(order, invoiceDto.getEmail(), invoiceDto.getType(), invoiceDto.getUnitTaxNumber(), invoiceDto.getInvoiceTitle());
String unitTax = null;
if (invoiceDto.getType().equals("1")) {
unitTax = invoiceDto.getUnitTaxNumber();
}
String str = invoiceUtil.startInvoice(order, order.getNickName(), invoiceDto.getEmail(), invoiceDto.getType(), "0", unitTax, invoiceDto.getInvoiceTitle());
JSONObject json = JSON.parseObject(str); JSONObject json = JSON.parseObject(str);
if (StringUtils.isNotBlank(json.getString("code")) && json.getString("code").equals("E0000")) { if (StringUtils.isNotBlank(json.getString("code")) && json.getString("code").equals("E0000")) {
//开票成功 添加一条开票记录 //开票成功 添加一条开票记录
...@@ -468,9 +462,9 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -468,9 +462,9 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
invoice.setNumber(codingruleUtils.getNumber(mpAccountsEntity.getId(), Invoice.class.getName())); invoice.setNumber(codingruleUtils.getNumber(mpAccountsEntity.getId(), Invoice.class.getName()));
invoice.setInvoiceTitle(invoiceDto.getInvoiceTitle()); invoice.setInvoiceTitle(invoiceDto.getInvoiceTitle());
invoice.setInvoiceContent(invoiceDto.getInvoiceContent()); invoice.setInvoiceContent(invoiceDto.getInvoiceContent());
invoice.setInvoiceType("1"); invoice.setInvoiceType(invoiceDto.getType());
invoice.setInvoiceForm("0"); invoice.setInvoiceForm("0");
invoice.setClerkId(order.getMemberName()); invoice.setClerkId(order.getOpenid());
invoice.setOrderId(order.getNumber()); invoice.setOrderId(order.getNumber());
invoice.setPushMode("0"); invoice.setPushMode("0");
invoice.setEmail(invoiceDto.getEmail()); invoice.setEmail(invoiceDto.getEmail());
...@@ -495,6 +489,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -495,6 +489,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
e.printStackTrace(); e.printStackTrace();
jsonObject.put("errorNo", "1"); jsonObject.put("errorNo", "1");
jsonObject.put("errorMsg", "程序异常"); jsonObject.put("errorMsg", "程序异常");
return jsonObject;
} }
return jsonObject; return jsonObject;
} }
......
...@@ -187,6 +187,13 @@ public class OrderController { ...@@ -187,6 +187,13 @@ public class OrderController {
String jsonArray = JSON.toJSONString(fromVO, DOUBLE_JSON_FILTER, SerializerFeature.WriteMapNullValue); String jsonArray = JSON.toJSONString(fromVO, DOUBLE_JSON_FILTER, SerializerFeature.WriteMapNullValue);
model.addAttribute("data", jsonObject); model.addAttribute("data", jsonObject);
model.addAttribute("list", jsonArray); model.addAttribute("list", jsonArray);
Conds conds = new Conds();
conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.order_id", id);
List<OrderSplitBatchDto> orderSplitBatchDtos = orderDetailsService.fetchSearchByBatchDrug(conds, null, 0, 0);
String OrderSplitBatchArr = JSON.toJSONString(orderSplitBatchDtos, DOUBLE_JSON_FILTER, SerializerFeature.WriteMapNullValue);
model.addAttribute("orderSplitBatchDtos", OrderSplitBatchArr);
} }
model.addAttribute("pageType", StringUtils.equals(pageType, "View") ? true : false); model.addAttribute("pageType", StringUtils.equals(pageType, "View") ? true : false);
return "order/orderSendOut"; return "order/orderSendOut";
...@@ -349,7 +356,7 @@ public class OrderController { ...@@ -349,7 +356,7 @@ public class OrderController {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
order.setCreateTimeStr(format.format(order.getCreateTime())); order.setCreateTimeStr(format.format(order.getCreateTime()));
String str = invoiceUtil.startInvoice(order, String.valueOf(userid), email, "0", "1", null, null); String str = invoiceUtil.startInvoice(order, email, "0", null, null);
JSONObject json = JSON.parseObject(str); JSONObject json = JSON.parseObject(str);
if (StringUtils.isNotBlank(json.getString("code")) && json.getString("code").equals("E0000")) { if (StringUtils.isNotBlank(json.getString("code")) && json.getString("code").equals("E0000")) {
//开票成功 添加一条开票记录 //开票成功 添加一条开票记录
...@@ -358,19 +365,19 @@ public class OrderController { ...@@ -358,19 +365,19 @@ public class OrderController {
Invoice invoice = new Invoice(); Invoice invoice = new Invoice();
//发票抬头 //发票抬头
invoice.setNumber(codingruleUtils.getNumber(accountsId, Invoice.class.getName())); invoice.setNumber(codingruleUtils.getNumber(accountsId, Invoice.class.getName()));
invoice.setInvoiceTitle(order.getNickName()); invoice.setInvoiceTitle("个人");
invoice.setInvoiceContent("商品费用"); invoice.setInvoiceContent("商品费用");
invoice.setInvoiceType("1"); invoice.setInvoiceType("0");
invoice.setInvoiceForm("1"); invoice.setInvoiceForm("1");
invoice.setClerkId(SystemConfig.p.getProperty("CLERK")); invoice.setClerkId(String.valueOf(UserUtils.getUser().getUsername()));
invoice.setOrderId(order.getNickName()); invoice.setOrderId(String.valueOf(order.getNumber()));
invoice.setPushMode("0"); invoice.setPushMode("0");
invoice.setEmail(email); invoice.setEmail(email);
invoice.setInvoiceSerialNum(invoiceSerialNum); invoice.setInvoiceSerialNum(invoiceSerialNum);
invoice.setAccountsId(accountsId); invoice.setAccountsId(accountsId);
invoice.setOpenId(order.getOpenid()); invoice.setOpenId(order.getOpenid());
String userName = userService.fetchAuthById(userid).getWxUserName(); String userName = userService.fetchAuthById(userid).getWxUserName();
invoice.setOperator(StringUtils.isEmpty(userName) ? "" : userName); invoice.setOperator(StringUtils.isEmpty(userName) ? "admin" : userName);
invoiceService.save(invoice); invoiceService.save(invoice);
//更新是否开票状态 //更新是否开票状态
......
...@@ -100,8 +100,8 @@ ...@@ -100,8 +100,8 @@
<div id="printContent" style="display:none;"> <div id="printContent" style="display:none;">
<div class="invoice"> <div class="invoice">
<div class="header"> <div class="header">
<div class="describe">诺康大药房咨询平台</div> <div style="font-size: 16px; margin-left: 48px;">诺康大药房咨询平台</div>
<!-- <div class="describe">***一切为了百姓***</div>--> <div class="describe">&nbsp;&nbsp;&nbsp;</div>
<div class="orderNumber">订单号 <span>$!{printData.orderCode}</span></div> <div class="orderNumber">订单号 <span>$!{printData.orderCode}</span></div>
<div class="deliverydate">发货日期 <span>$!date.format('yyyy-MM-dd HH:mm:ss', $!printData.printDate)</span></div> <div class="deliverydate">发货日期 <span>$!date.format('yyyy-MM-dd HH:mm:ss', $!printData.printDate)</span></div>
<div class="splitline"></div> <div class="splitline"></div>
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
} }
var retrieveData = function (sSource, aoData, fnCallback) { var retrieveData = function (sSource, aoData, fnCallback) {
$("#seachTableForm input").each(function () { $("#seachTableForm input,select ").each(function () {
var params = { var params = {
name: $(this).attr("name"), name: $(this).attr("name"),
value: $(this).val() value: $(this).val()
......
...@@ -88,8 +88,10 @@ public class Waybill implements Serializable { ...@@ -88,8 +88,10 @@ public class Waybill implements Serializable {
/* 删除标识 */ /* 删除标识 */
private boolean delFlag; private boolean delFlag;
/* 状态 */ /* 状态 */
@ExportConfig(value = "打印状态", width = 100, showLevel = 1)
private String status; private String status;
/* 创建时间 */ /* 创建时间 */
@ExportConfig(value = "物流创建时间", width = 120, showLevel = 1, dateFormat = "yyyy-MM-dd HH:mm")
private Date createTime; private Date createTime;
/* 更新时间 */ /* 更新时间 */
private Date updateTime; private Date updateTime;
......
...@@ -231,7 +231,11 @@ public class WaybillController { ...@@ -231,7 +231,11 @@ public class WaybillController {
str.replace(3, 7, "****"); str.replace(3, 7, "****");
item.setMobile(str.toString()); item.setMobile(str.toString());
} }
if (StringUtils.equals(item.getStatus(), "0")) {
item.setStatus("未打印");
} else if (StringUtils.equals(item.getStatus(), "1")) {
item.setStatus("已打印");
}
}); });
ExcelKit.$Export(Waybill.class, response).toExcel(list, "顺丰物流单信息"); ExcelKit.$Export(Waybill.class, response).toExcel(list, "顺丰物流单信息");
} }
......
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