修複bug
1、RegionAction 添加地區時,條件書寫錯誤
if(region.getId()==null || region.getId().equals("")){
}
2、對頁面功能進行修改
<input type="text" name="minweight" class="easyui-numberbox" />
$("[name='minweight']").val(1); // 頁面不會顯示預設值,點擊輸入框後才會顯示
解決: 重新對元素進行easyui 渲染,設定預設值
<input type="text" name="minweight" id="minweight" class="easyui-numberbox" />
$("#minweight").numberbox('setValue','1');
項目第五天
三個重要模組: 基礎設定、取派 、中轉 (面試可以用)
其它模組: 路由(車輛、飛機、船 線路 )、財務
一、完成基礎設定 (定區管理)
原業務: 管理定區/調度排班
將附近小區合并為一個配送地區(定區) ------- 為配送地區設定管理員(某配送公司負責人)----- 根據每名取派員的收派時間,安排多名取派員對該地區進行配送
建立定區,為定區關聯分區 (分區只能屬於一個定區、一對多) ,為其制定負責的取派員 。 該功能會和取派模組業務受理有關係,使用定區關聯客戶
*** 業務受理 ,客戶將派送業務提交給宅急送公司,宅急送公司上門收貨 ,當錄入需求後,根據客戶地址 ,關聯定區和取派員
1、 添加定區 (關聯分區 )
將新代碼中 decidedzone.jsp 頁面替換原有頁面
第一步: 查詢取派員,進行下拉選擇
<input class="easyui-combobox" name="region.id"
data-options="valueField:'id',textField:'staffInfo',url:'${pageContext.request.contextPath}/staff_findall.action'" />
第二步: 在視窗定區時,關聯未分配的分區
<table id="subareaGrid" class="easyui-datagrid" border="false" style="width:300px;height:300px" data-options="url:'${pageContext.request.contextPath}/subarea_findnoassociation.action',fitColumns:true,singleSelect:false">
<thead>
<tr>
<th data-options="field:'id',width:30,checkbox:true">編號</th>
<th data-options="field:'addresskey',width:150">關鍵字</th>
<th data-options="field:'position',width:200,align:'right'">位置</th>
</tr>
</thead>
</table>
2、 定區列表查詢
分頁查詢,無條件
// 定區資料表格
$('#grid').datagrid( {
iconCls : 'icon-forward',
fit : true,
border : true,
rownumbers : true,
striped : true,
pageList: [30,50,100],
pagination : true,
toolbar : toolbar,
url : "${pageContext.request.contextPath}/decidedzone_list.action",
idField : 'id',
columns : columns,
onDblClickRow : doDblClickRow
});
Action 代碼 ---- Service 代碼 ---- domain配置立即載入 @LazyToOne
3、 對定區關聯客戶
作業: 使用webservice重CRM中擷取客戶資料
暫時解決方案: 在系統中建立客戶表
一個定區中包含很多個客戶(一對多)
4、 雙擊定區,查詢關聯分區和客戶
如果設定 singleselect 只需要 資料表格選中一行
雙擊定區的某一行資料 ---- 雙擊事件
$('#grid').datagrid( {
singleSelect : true,
onDblClickRow : doDblClickRow
});
雙擊資料表格 調用 doDblClickRow
可以將函數定義在資料表格內部
$('#grid').datagrid( {
singleSelect : true,
onDblClickRow : function(rowindex,rowdata) {
}
});
資料表格載入有兩種方式
第一種
HTML中只要table
<table id="association_subarea" ></table>
列資料和表格中資料來自js
$('#association_subarea').datagrid( {
columns : [[
{列一},
{列二}
]],
url : 資料來源
});
第二種
<table id="subareaGrid" class="easyui-datagrid" border="false" style="width:300px;height:300px" data-options="url:'${pageContext.request.contextPath}/subarea_findnoassociation.action'">
<thead>
<tr>
<th data-options="field:'subareaids',width:30,checkbox:true">編號</th>
<th data-options="field:'addresskey',width:150">關鍵字</th>
<th data-options="field:'position',width:200,align:'right'">位置</th>
</tr>
</thead>
</table>
雙擊定區資料某行,在js代碼中獲得該行對應 decidedzoneid , 將定區編號,分別調用分區Action 和 客戶Action 完成查詢
** SubareaAction 的 findhasassociation
** CustomerAction 的 findhasassociation
如果 查詢表格式資料時,需要向伺服器傳遞參數,如果有中文 請使用 method和queryParams 屬性,沒有中文 使用?拼接參數
====================================================================================
二、取派業務 分析
受理
受理環節,是宅急送業務的開始,作為服務前端,客戶通過電話、網路等多種方式進行委託,業務受理員通過與客戶交流,擷取客戶的服務需求和具體委託資訊,將服務指令輸入我司服務系統。
調度
在自動下單的時候,由於取件地址無法匹配取件人員,就轉入人工調度。
手動匹配地址,下單到相應的取件人員
業務通知單 noticebill : 客戶通過網路方式 或者 電話方式,向我司客戶人員,申請宅急送 送貨業務,客服人員都需要記錄客戶申請, 產生業務通知單 。
業務通知單進入系統,自動產生工單 workbill ,工單會通知 取派人員進行取貨
工作單 workordermanage : 工作單是一些運貨資訊,比之前工單更加詳細
新代碼匯入:
將page中qupai檔案夾 複製 WEB-INF/page 下
將menu.json 替換原菜單資訊
三、 取派 ---- 業務受理
編寫實體類 NoticeBill 和 WorkBill
1、 通過業務受理,輸入手機號,離焦ajax 根據手機號查詢 客戶資訊, 預設顯示
2、 當手機號能夠找到客戶 ,客戶有一些與定區關聯 , 關聯到取派員
當手機號找不到客戶,或者客戶未與定區管理 , 如何找取派員 。。。
先用地址去匹配分區,通過分區找定區,通過定區找取派員 , 如果還是找不到或者找到多個分區 (轉入人工調度)
**** 使用對象導航 查詢