From 68defbe491894e01c4402922de33c39633fca091 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 29 Mar 2022 14:25:54 +0800
Subject: [PATCH] 系统名称
---
zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html | 92 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 78 insertions(+), 14 deletions(-)
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
index 4dcba3f..ae18480 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
@@ -84,11 +84,11 @@
class="form-control datetimepicker" id="orderEndTime">
</div>
- <input type="hidden" value="" name="orderStatus" id="orderStatus"/>
+ <input type="hidden" value="2" name="orderStatus" id="orderStatus"/>
<div class="form-group mr-20">
- <button type="button" class="btn btn-my btn-sm active" id="btn0" value="">全部</button>
+ <button type="button" class="btn btn-my btn-sm" id="btn0" value="">全部</button>
<button type="button" class="btn btn-my btn-sm" id="btn1" value="1">待付款</button>
- <button type="button" class="btn btn-my btn-sm" id="btn2" value="2">待配送</button>
+ <button type="button" class="btn btn-my btn-sm active" id="btn2" value="2">待配送</button>
<button type="button" class="btn btn-my btn-sm" id="btn3" value="3">待收货</button>
<button type="button" class="btn btn-my btn-sm" id="btn4" value="4">待评价</button>
<button type="button" class="btn btn-my btn-sm" id="btn5" value="5">已评价</button>
@@ -106,6 +106,11 @@
class="btn btn-info"
matrix:btn="order-exportExcel">
<i class="fa fa-search "></i> 导出EXCEL
+ </button>
+ <button onclick="importLogisticsInfo()" type="button"
+ class="btn btn-info"
+ matrix:btn="order-exportExcel">
+ <i class="fa fa-search "></i> 导入快递单
</button>
<button type="reset" class="btn btn-info ">
<i class="fa fa-refresh "></i> 重置
@@ -125,19 +130,17 @@
<th data-checkbox="true"></th>
<th data-formatter="MGrid.indexfn" data-align="center" data-width="30px">序号</th>
<th data-align="center" data-width="195px" data-field="id" data-formatter="buidOperate">操作</th>
- <th data-field="userName">客户姓名</th>
- <th data-field="userTel">客户电话</th>
- <th data-field="storeName">店铺名称</th>
- <th data-field="orderStatus" data-formatter="buildOrderStatus">订单状态</th>
- <th data-field="orderTime" data-formatter="MGrid.getTime">下单时间</th>
+ <th data-field="userName">客户</th>
<th data-field="details" data-formatter="buildDetails">购买商品</th>
- <!--<th data-field="purchaseQuantity">购买件数</th>-->
+ <th data-field="deliveryInfo.receiveAddress" data-formatter="buildLogistics">收货信息</th>
+ <th data-field="orderStatus" data-formatter="buildOrderStatus">订单状态</th>
+ <th data-field="deliveryInfo.waybillNo" data-formatter="buildDelivery">物流信息</th>
+ <th data-field="orderTime" data-formatter="MGrid.getTime">下单时间</th>
<th data-field="orderMoney">订单金额</th>
<th data-field="discountAmount">优惠总金额</th>
- <th data-field="shippingMethod" data-formatter="buildShippingMethod" >配送方式</th>
- <!--<th data-field="orderType" data-formatter="orderTypeFormatter">订单类型</th>-->
<th data-field="orderNo">订单编号</th>
- <!--<th data-field="applyStatus" data-formatter="applyStatusFormatter">是否已提现</th>-->
+ <th data-field="shippingMethod" data-formatter="buildShippingMethod" >配送方式</th>
+ <th data-field="storeName">店铺名称</th>
</tr>
</thead>
</table>
@@ -169,6 +172,15 @@
$(".btn-my").removeClass("active");
$(this).addClass("active");
});
+
+ function importLogisticsInfo() {
+ layer.open({
+ type: 2,
+ title: "导入快递单",
+ area: [MUI.SIZE_L, '400px'],
+ content : [ basePath+'/admin/redirect/shop/logisticsImport-form']
+ });
+ }
@@ -209,6 +221,17 @@
details = details +value[i].shopProduct.title+ "("+value[i].shopSku.name+ ")*"+value[i].count+";";
}
return details;
+ }
+
+ // 发货信息
+ function buildLogistics(value, row, index) {
+ return (row.userName==null?"":row.userName)+" <br/>"+ (row.userTel==null?"":row.userTel) +" <br/>"+value ;
+ }
+ // 物流信息
+ function buildDelivery(value, row, index) {
+ return (row.deliveryInfo.logisticsCompanyCode==null?"":"快递编码:"+row.deliveryInfo.logisticsCompanyCode)
+ +" <br/>"+ (row.deliveryInfo.logisticsCompany==null?"":"快递名称:"+row.deliveryInfo.logisticsCompany)
+ +" <br/>"+(value==null?"":"快递单号:"+value) ;
}
@@ -255,11 +278,16 @@
+ '操作 <span class="caret"></span>' + '</button>'
+ '<ul class="dropdown-menu" role="menu">'
+ btns[0].replace('VALUE', value)
+ if (row.deliveryInfo.waybillNo != null && typeof row.deliveryInfo.waybillNo != 'undefined' && row.deliveryInfo.waybillNo != '') {
+ html += btns[3].replace('orderId',row.id).replace('waybillNo',row.deliveryInfo.waybillNo);
+ }
if (row.orderStatus == 2) {
- html += btns[1].replace('VALUE', value)
+ html += btns[1].replace('VALUE', value);
+ html += btns[4].replace('orderId',row.id);
}
if (row.orderStatus == 3) {
- html += btns[2].replace('VALUE', value)
+ html += btns[2].replace('VALUE', value);
+ html += btns[4].replace('orderId',row.id);
}
html += '</ul>' + '</div>';
return html;
@@ -276,6 +304,40 @@
content: [basePath + '/admin/shopOrder/editForm?id=' + id]
})
)
+ }
+
+ /**
+ * 查看物流信息
+ * @param id
+ */
+ function showLogisticsInfo(orderId,waybillNo){
+ if(waybillNo == '' || waybillNo == null){
+ layer.msg("订单还未发货,暂无物流信息", {
+ icon : 2,
+ time : 2000
+ });
+ return false;
+ }
+ layer.open({
+ type : 2,
+ title : "查看物流信息",
+ area : [ MUI.SIZE_L, '500px' ],
+ maxmin : true,
+ content : [ basePath+'/admin/redirect/shop/shopLogisticsInfo-list?orderId=' + orderId]
+ });
+ }
+ /**
+ * 编辑物流信息
+ * @param id
+ */
+ function editDeliveryInfo(orderId){
+ layer.open({
+ type : 2,
+ title : "编辑物流信息",
+ area : [ MUI.SIZE_L, '500px' ],
+ maxmin : true,
+ content : [ basePath + '/admin/shopDeliveryInfo/editDeliveryInfoForm?orderId=' + orderId]
+ });
}
//修改订单为发货
@@ -352,6 +414,8 @@
btns[0] = '<li><a href="javascript:void(0)" onClick="openEdit(\'VALUE\')" title="编辑">编辑</a></li>'
btns[1] = '<li><a href="javascript:void(0)" onClick="openSendPackage(\'VALUE\')" title="开始发货">开始发货</a></li>'
btns[2] = '<li><a href="javascript:void(0)" onClick="openSendPackageOver(\'VALUE\')" title="配送完成">配送完成</a></li>'
+btns[3] = '<li><a href="javascript:void(0)" onclick="showLogisticsInfo(\'orderId\',\'waybillNo\')" title="查看物流">查看物流</a></li>'
+btns[4] = '<li><a href="javascript:void(0)" onclick="editDeliveryInfo(\'orderId\')" title="编辑快递">编辑快递</a></li>'
</script>
--
Gitblit v1.9.1