Browse Source

Merge branch 'master' of https://gogs.superdesk.cn/super_service/superdesk_superservice into master

wuchangfu 2 năm trước cách đây
mục cha
commit
d3b10dbea1

+ 5 - 5
sql/qzy/2022/2022.SQL

@@ -21,13 +21,13 @@ alter table tb_goods_release add COLUMN `roleName` varchar(100) DEFAULT NULL COM
 
 #last
 #工程维修相关配置
-alter table tb_repair_config add COLUMN `isCompleteDesc` int(11) DEFAULT '1' COMMENT '完成描述 1-选填 2-必填 3-不展示';
-alter table tb_repair_config add COLUMN `isCompletePhoto` int(11) DEFAULT '1' COMMENT '完成照片 1-选填 2-必填 3-不展示';
-alter table tb_repair_config add COLUMN `isDeliveryConfirm` int(11) DEFAULT '0' COMMENT '派单确认 0-关闭 1-开启';
+alter table tb_repair_config add COLUMN `is_complete_desc` int(11) DEFAULT '1' COMMENT '完成描述 1-选填 2-必填 3-不展示';
+alter table tb_repair_config add COLUMN `is_complete_photo` int(11) DEFAULT '1' COMMENT '完成照片 1-选填 2-必填 3-不展示';
+alter table tb_repair_config add COLUMN `is_delivery_confirm` int(11) DEFAULT '0' COMMENT '派单确认 0-关闭 1-开启';
 
 alter table tb_repair_bills add COLUMN `confirm_status` int(1) DEFAULT '1' COMMENT '确认状态 1-待确认 2-已确认';
-alter table tb_repair_bills add COLUMN `completeDesc` varchar(400) DEFAULT NULL COMMENT '完成描述';
-alter table tb_repair_bills add COLUMN `completePhotoUrl` varchar(2000) DEFAULT NULL COMMENT '完成照片';
+alter table tb_repair_bills add COLUMN `complete_desc` varchar(400) DEFAULT NULL COMMENT '完成描述';
+alter table tb_repair_bills add COLUMN `complete_photo_url` varchar(2000) DEFAULT NULL COMMENT '完成照片';
 
 
 alter table tb_repair_operate_records add COLUMN `is_confirm` int(1) DEFAULT '0' COMMENT '是否确认派单 0-待确定 1-确认';

+ 1 - 1
src/main/java/com/palmnest/model/repair/RepairConfig.java

@@ -23,7 +23,7 @@ public class RepairConfig implements Serializable {
 	private Long    id;
 	private Integer org_id;
 	private Integer max_bills;
-	private Integer repair_type;
+	private Integer repair_type; //1-抢单模式 2-派单模式
 	private Byte    ispersons;
 	private Byte    ispay;
 	private Date    create_time;

+ 10 - 1
src/main/java/com/palmnest/service/repair/impl/RepairBillServiceImpl.java

@@ -750,7 +750,16 @@ public class RepairBillServiceImpl implements RepairBillService {
 		dto.setInProgressTotal(inProgressTotal);//进行中
 		dto.setPendingTotal(pendingTotal);//挂单中
 		dto.setManageTotal(manageTotal);//管理
-		dto.setWaitCompleteTotal(inProgressTotal + pendingTotal);//待完成= 进行中(转单中和进行中)+挂单中 "当前登录账号的" 待完成维修工单,进行中、挂单中、转单中的工单数量
+		//待完成= 进行中(转单中和进行中)+挂单中 "当前登录账号的" 待完成维修工单,进行中、挂单中、转单中的工单数量
+
+		//1-抢单模式 2-派单模式
+		Integer waitCompleteTotal = inProgressTotal + pendingTotal; //默认派单模式
+		RepairConfig s_con = repairConfigManager.getByOrgId(orgId);
+		if(s_con.getRepair_type().equals(1)){
+			waitCompleteTotal =  waitCompleteTotal+isSingleTotal; //进行中+可抢单;
+		}
+		dto.setWaitCompleteTotal(waitCompleteTotal);
+
 		return dto;
 	}
 

+ 30 - 24
src/main/java/com/palmnest/webapp/controller/api/ApiRepairBillController.java

@@ -830,7 +830,7 @@ public class ApiRepairBillController extends BaseFormController {
      */
     @RequestMapping(value = "/completeBill")
     @ResponseBody
-    public AppResultDto completeBill(@RequestParam("id") Long id,MultipartHttpServletRequest request) {
+    public AppResultDto completeBill(@RequestParam("id") Long id,HttpServletRequest request) {
 
 
         String userName = baseRedisService.get(request.getHeader("token"));
@@ -854,31 +854,37 @@ public class ApiRepairBillController extends BaseFormController {
             //完成订单增加两个字段
             bill.setCompleteDesc(completeDesc);
 
-            String           completePhotoUrl     = "";
-            Iterator<String> fileNames  = request.getFileNames();
-            while (fileNames.hasNext()) {
-                MultipartFile multipartFile = request.getFile(fileNames.next());
-
-                //获得文件原始名称
-                InputStream stream   = null;
-                String      fileExt  = null;
-                String      fileName = "";
-                if (multipartFile != null) {
-                    stream = multipartFile.getInputStream();
-                    fileName = multipartFile.getOriginalFilename();
-                    fileName = new String(fileName.getBytes(), "utf-8");
-                    fileExt = StringUtils.isNotEmpty(fileName) ? fileName
-                            .substring(fileName.lastIndexOf("."))
-                            : StringUtils.EMPTY;
+            if (request instanceof MultipartHttpServletRequest){
+
+                MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) request;
+
+                String           completePhotoUrl     = "";
+                Iterator<String> fileNames  = multiRequest.getFileNames();
+                while (fileNames.hasNext()) {
+                    MultipartFile multipartFile = multiRequest.getFile(fileNames.next());
+
+                    //获得文件原始名称
+                    InputStream stream   = null;
+                    String      fileExt  = null;
+                    String      fileName = "";
+                    if (multipartFile != null) {
+                        stream = multipartFile.getInputStream();
+                        fileName = multipartFile.getOriginalFilename();
+                        fileName = new String(fileName.getBytes(), "utf-8");
+                        fileExt = StringUtils.isNotEmpty(fileName) ? fileName
+                                .substring(fileName.lastIndexOf("."))
+                                : StringUtils.EMPTY;
+                    }
+
+                    FileUploadUtils fileUploadUtils = new FileUploadUtils();
+                    fileUploadUtils.init();
+                    String url = fileUploadUtils.uploadFile(stream, fileExt);
+                    completePhotoUrl += ";" + fileUploadUtils.fullVisitPath(url);
+                }
+                if (completePhotoUrl.length() > 1) {
+                    bill.setCompletePhotoUrl(completePhotoUrl.substring(1));
                 }
 
-                FileUploadUtils fileUploadUtils = new FileUploadUtils();
-                fileUploadUtils.init();
-                String url = fileUploadUtils.uploadFile(stream, fileExt);
-                completePhotoUrl += ";" + fileUploadUtils.fullVisitPath(url);
-            }
-            if (completePhotoUrl.length() > 1) {
-                bill.setCompletePhotoUrl(completePhotoUrl.substring(1));
             }
 
 

+ 103 - 101
src/main/webapp/WEB-INF/pages/admin/engineeringRepair/repairDetail.jsp

@@ -13,7 +13,7 @@
   <!-- Theme style -->
   <link href="<c:url value='/styles/AdminLTE.css'/>" rel="stylesheet" type="text/css"/>
   <link href="<c:url value='/styles/engineeringRepair/repairDetail.css?20220513.1'/>" rel="stylesheet" type="text/css"/>
-  <link href="<c:url value='/styles/engineeringRepair/addFome.css?2019-11-112'/>" rel="stylesheet" type="text/css"/>
+  <link href="<c:url value='/styles/engineeringRepair/addFome.css?2022-05-19'/>" rel="stylesheet" type="text/css"/>
   <link href="<c:url value='/styles/engineeringRepair/generatingCode.css?1111112'/>" rel="stylesheet" type="text/css"/>
   <script type="text/javascript" src="<c:url value='/scripts/lib/jquery-1.8.2.min.js'/>"></script>
   <script type="text/javascript" src="<c:url value='/scripts/lib/layui/layui.js'/>"></script>
@@ -148,119 +148,121 @@
       <h2>功能配置</h2>
       <span class="close-btn"></span>
     </div>
-    <div class="form_alert">
-      <form class="layui-form" action="" lay-filter="exampleConfig">
-        <div class="layui-inline">
-          <label class="layui-form-label txt_brown fs16 txt_orange">项目:</label>
-          <div class="layui-input-inline">
-            <c:if test="${fn:length(orgs) > 1}">
-              <input class="default-select" name="organizationId" id="organizationId" org__id="${orgs[0].id}"
-                     autocomplete="off" value="${orgs[0].name}"/>
-              <span class="select_wrap  _hide"></span>
-            </c:if>
-            <c:if test="${fn:length(orgs) == 1}">
-              <input type='hidden' class="default-select single-orgid" name="organizationId" id="organizationId"
-                     org__id="${orgs[0].id}" autocomplete="off" value="${obj.id }" org__id='${obj.id }'/>
-              <input disabled name="organizationId" value="${orgs[0].name}" class="single-orgid default-select">
-            </c:if>
+    <div class="content-box">
+      <div class="form_alert">
+        <form class="layui-form" action="" lay-filter="exampleConfig">
+          <div class="layui-inline">
+            <label class="layui-form-label txt_brown fs16 txt_orange">项目:</label>
+            <div class="layui-input-inline">
+              <c:if test="${fn:length(orgs) > 1}">
+                <input class="default-select" name="organizationId" id="organizationId" org__id="${orgs[0].id}"
+                       autocomplete="off" value="${orgs[0].name}"/>
+                <span class="select_wrap  _hide"></span>
+              </c:if>
+              <c:if test="${fn:length(orgs) == 1}">
+                <input type='hidden' class="default-select single-orgid" name="organizationId" id="organizationId"
+                       org__id="${orgs[0].id}" autocomplete="off" value="${obj.id }" org__id='${obj.id }'/>
+                <input disabled name="organizationId" value="${orgs[0].name}" class="single-orgid default-select">
+              </c:if>
+            </div>
           </div>
-        </div>
-        <div class="layui-form-item">
-          <label class="layui-form-label">最大工单数:</label>
-          <input type=button value="一" onClick="javascript:if(this.form.amount.value>1) this.form.amount.value--;"
-                 class="inputNum-jian">
-          <input type=text name=amount value=3 class="inputNum" placeholder="请输入数字" id="amontNum"
-          >
-          <input type=button value="+" onClick="javascript:this.form.amount.value++;" class="inputNum-jia">
-          <div class="content-item-1">工程人员的进行中的订单不能超过该数量</div>
-        </div>
-        <div class="layui-form-item">
-          <label class="layui-form-label">模式:</label>
-          <div class="layui-input-block" id="cardType">
-            <input type="radio" name="mode-type" value="1" checked="" title="抢单模式">
-            <input type="radio" name="mode-type" value="0" title="派单模式">
+          <div class="layui-form-item">
+            <label class="layui-form-label">最大工单数:</label>
+            <input type=button value="一" onClick="javascript:if(this.form.amount.value>1) this.form.amount.value--;"
+                   class="inputNum-jian">
+            <input type=text name=amount value=3 class="inputNum" placeholder="请输入数字" id="amontNum"
+            >
+            <input type=button value="+" onClick="javascript:this.form.amount.value++;" class="inputNum-jia">
+            <div class="content-item-1">工程人员的进行中的订单不能超过该数量</div>
           </div>
-          <div class="content-item-1">抢单模式:工程人员可以自由抢单</div>
-          <div class="content-item-1">派单模式:维修单只能派单,无抢单功能,管理有派单、挂单权限</div>
-        </div>
-        <div class="layui-form-item onePersonType">
-          <label class="layui-form-label">一单多人:</label>
-          <div class="layui-input-block">
-            <input type="checkbox" name="openPersion" title="开启" id="TypePersion">
+          <div class="layui-form-item">
+            <label class="layui-form-label">模式:</label>
+            <div class="layui-input-block" id="cardType">
+              <input type="radio" name="mode-type" value="1" checked="" title="抢单模式">
+              <input type="radio" name="mode-type" value="0" title="派单模式">
+            </div>
+            <div class="content-item-1">抢单模式:工程人员可以自由抢单</div>
+            <div class="content-item-1">派单模式:维修单只能派单,无抢单功能,管理有派单、挂单权限</div>
           </div>
-          <div class="content-item-1">开启后一个维修单可以派给最多三人,三人均可完成维修单,维修人无转单、挂单权限,同时只有管理权限才能派单(转单)、挂单。</div>
+          <div class="layui-form-item onePersonType">
+            <label class="layui-form-label">一单多人:</label>
+            <div class="layui-input-block">
+              <input type="checkbox" name="openPersion" title="开启" id="TypePersion">
+            </div>
+            <div class="content-item-1">开启后一个维修单可以派给最多三人,三人均可完成维修单,维修人无转单、挂单权限,同时只有管理权限才能派单(转单)、挂单。</div>
 
-        </div>
-        <div class="layui-form-item">
-          <label class="layui-form-label">收款功能:</label>
-          <div class="layui-input-block" id="checkoutType">
-            <input type="radio" name="collention_type" value="1" title="开启">
-            <input type="radio" name="collention_type" value="0" title="关闭" checked="">
           </div>
-          <div class="content-item-1">可以开启或关闭工程人员凭收款码收款的功能</div>
-        </div>
-        <div class="layui-form-item">
-          <label class="layui-form-label">报修输入项:</label>
-          <div class="layui-input-block">
-            <input type="checkbox" name="addressFlow" title="楼栋楼层" id="checkFloor">
+          <div class="layui-form-item">
+            <label class="layui-form-label">收款功能:</label>
+            <div class="layui-input-block" id="checkoutType">
+              <input type="radio" name="collention_type" value="1" title="开启">
+              <input type="radio" name="collention_type" value="0" title="关闭" checked="">
+            </div>
+            <div class="content-item-1">可以开启或关闭工程人员凭收款码收款的功能</div>
           </div>
-        </div>
-        <div class="layui-form-item">
-          <label class="layui-form-label">支持报事:</label>
-          <div class="layui-input-block">
-            <input type="checkbox" name="upportRepair" title="开启" id="supportRepairReport">
+          <div class="layui-form-item">
+            <label class="layui-form-label">报修输入项:</label>
+            <div class="layui-input-block">
+              <input type="checkbox" name="addressFlow" title="楼栋楼层" id="checkFloor">
+            </div>
           </div>
-          <div class="content-item-1">勾选后微信端隐藏维修字段</div>
-        </div>
-        <div class="layui-form-item">
-          <label class="layui-form-label">完成信息:</label>
-          <div class="table-box">
-            <div class="table-cell cell-line-bottom cell-bg-color">
-              <div class="cell-title cell-line-right">
-                字段名称
-              </div>
-              <div class="cell-title">
-                类型
-              </div>
+          <div class="layui-form-item">
+            <label class="layui-form-label">支持报事:</label>
+            <div class="layui-input-block">
+              <input type="checkbox" name="upportRepair" title="开启" id="supportRepairReport">
             </div>
-            <div class="table-cell cell-line-bottom">
-              <div class="cell-content cell-line-right">
-                完成描述
-              </div>
-              <div class="cell-content">
-                <select id="describeField">
-                  <option value="1">选填</option>
-                  <option value="2">必填</option>
-                  <option value="3">不展示</option>
-                </select>
+            <div class="content-item-1">勾选后微信端隐藏维修字段</div>
+          </div>
+          <div class="layui-form-item">
+            <label class="layui-form-label">完成信息:</label>
+            <div class="table-box">
+              <div class="table-cell cell-line-bottom cell-bg-color">
+                <div class="cell-title cell-line-right">
+                  字段名称
+                </div>
+                <div class="cell-title">
+                  类型
+                </div>
               </div>
-            </div>
-            <div class="table-cell">
-              <div class="cell-content cell-line-right">
-                完成照片
+              <div class="table-cell cell-line-bottom">
+                <div class="cell-content cell-line-right">
+                  完成描述
+                </div>
+                <div class="cell-content">
+                  <select id="describeField">
+                    <option value="1">选填</option>
+                    <option value="2">必填</option>
+                    <option value="3">不展示</option>
+                  </select>
+                </div>
               </div>
-              <div class="cell-content">
-                <select id="photoField">
-                  <option value="1">选填</option>
-                  <option value="2">必填</option>
-                  <option value="3">不展示</option>
-                </select>
+              <div class="table-cell">
+                <div class="cell-content cell-line-right">
+                  完成照片
+                </div>
+                <div class="cell-content">
+                  <select id="photoField">
+                    <option value="1">选填</option>
+                    <option value="2">必填</option>
+                    <option value="3">不展示</option>
+                  </select>
+                </div>
               </div>
             </div>
           </div>
-        </div>
-        <div class="layui-form-item">
-          <label class="layui-form-label">派单确认:</label>
-          <div class="layui-input-block">
-            <input type="checkbox" name="sendReport" title="开启" id="SendConfirm">
+          <div class="layui-form-item">
+            <label class="layui-form-label">派单确认:</label>
+            <div class="layui-input-block">
+              <input type="checkbox" name="sendReport" title="开启" id="SendConfirm">
+            </div>
+            <div class="content-item-1">开启后手机APP会弹出确认弹窗</div>
           </div>
-          <div class="content-item-1">开启后手机APP会弹出确认弹窗</div>
-        </div>
-      </form>
-    </div>
-    <div class="changeBtn">
-      <button class="bt_blue_big_b_slot fs16 dialogSaveBtn">保存</button>
-      <button class="bt_blue_big_b fs16 ml30 dialogCancelBtn">取消</button>
+        </form>
+      </div>
+      <div class="changeBtn">
+        <button class="bt_blue_big_b_slot fs16 dialogSaveBtn">保存</button>
+        <button class="bt_blue_big_b fs16 ml30 dialogCancelBtn">取消</button>
+      </div>
     </div>
   </div>
 </div>
@@ -270,6 +272,6 @@
   {{d.LAY_TABLE_INDEX+1}}
 </script>
 <script type="text/javascript"
-        src="<c:url value='/scripts/admin/engineeringRepair/repairDetail.js?v=20220513.3'/>"></script>
+        src="<c:url value='/scripts/admin/engineeringRepair/repairDetail.js?v=20220519.1'/>"></script>
 </body>
 </html>

+ 2 - 0
src/main/webapp/scripts/admin/engineeringRepair/repairDetail.js

@@ -1245,6 +1245,8 @@ $(function () {
                   return '待确认'
                 } else if (data.confirmStatus == 2) {
                   return '已确认'
+                } else {
+                  return ''
                 }
               }
             }, {

+ 23 - 30
src/main/webapp/styles/engineeringRepair/addFome.css

@@ -72,7 +72,7 @@ html,body{
 }
 .layui-tab-card>.listMenu>li{
 	border-right: 2px solid #f2f2f2;
-	border-top: 2px solid transparent; 
+	border-top: 2px solid transparent;
 	float: left;
 	height: 48px;
 	width: 148px;
@@ -86,7 +86,7 @@ html,body{
 }
 .layui-tab-card>.listMenu>li.layui-this{
 	border-right-color: transparent;
-	border-top: 2px solid #158DF6; 
+	border-top: 2px solid #158DF6;
 }
 .layui-tab-card>.listMenu>li.layui-this>a{
 	color: #158DF6;
@@ -221,7 +221,7 @@ html,body{
 /* 瀵懓鍤锟� */
 .alert{
 	width: 100%;
-	
+
 	height: 100%;
 	background: rgba(0, 0, 0, 0.5);
 	position: fixed;
@@ -230,27 +230,14 @@ html,body{
 	display: none;
 }
 .alert .alert_con{
+	margin-top: 10%;
 	width: 700px;
-	height: auto;
-	min-height: 44%;
+	height: 70%;
+	margin-left: calc(50% - 350px);
+	min-height: 300px;
 	border-radius: 8px;
-	overflow-y:auto;
-	-ms-transform: translate(50%,50%);
-	-webkit-transform: translate(58%,20%);
-	-o-transform: translate(50%,50%);
-	-moz-transform: translate(50%,50%);
 	background: #fff;
-	margin-left: -10%; 
-}
-@media screen and (max-width: 1450px) {
-	.alert .alert_con{
-		margin-left: -25%; 
-	}
-}
-@media screen and (max-width: 1080px) {
-	.alert .alert_con{
-		margin-left: -40%; 
-	}
+	padding-bottom: 15px;
 }
 .inputNum{
     padding: 0 10px;
@@ -276,7 +263,7 @@ html,body{
   border-radius: 5.33px 0px 0px 5.33px;
 }
 .disableHandle{
-	
+
 }
 .inputNum-jia{
 	width:37px;
@@ -324,6 +311,12 @@ position: relative;
 	margin-top: 0px;
 	margin-left: 20px;
 }
+
+.alert .content-box {
+	height: calc(100% - 45px);
+	overflow-y: auto;
+}
+
 .alert .form_alert{
 	margin-top: 20px;
 	margin-bottom: 20px;
@@ -604,7 +597,7 @@ position: relative;
 	-ms-transform: translate(-50%,-50%); 	/* IE 9 */
 	-moz-transform: translate(-50%,-50%); 	/* Firefox */
 	-webkit-transform: translate(-50%,-50%); /* Safari 閿熸枻鎷� Chrome */
-	-o-transform: translate(-50%,-50%); 	
+	-o-transform: translate(-50%,-50%);
 }
 .dialog-wp .title-wp{
 	padding: 0 10px 0 17px;
@@ -673,7 +666,7 @@ position: relative;
   background: #F3F3F3;
 }
 .checkbox-wp .checkbox-inner{
-  border-radius: 2px; 
+  border-radius: 2px;
 }
 .radio-wp .radio-all:checked+.radio-inner:after, .radio-wp .radio-item:checked+.radio-inner:after,
 .checkbox-wp .check-all:checked+.checkbox-inner:after, .checkbox-wp .check-item:checked+.checkbox-inner:after{
@@ -731,16 +724,16 @@ position: relative;
 	-o-transform: translate(50%,50%);
 	-moz-transform: translate(50%,50%);
 	background: #fff;
-	margin-left: -10%; 
+	margin-left: -10%;
 }
 @media screen and (max-width: 1450px) {
 	.alert3 .alert_con{
-		margin-left: -20%; 
+		margin-left: -20%;
 	}
 }
 @media screen and (max-width: 1080px) {
 	.alert3 .alert_con{
-		margin-left: -10%; 
+		margin-left: -10%;
 	}
 }
 .alert3 .alert_con>h2{
@@ -824,7 +817,7 @@ position: relative;
 .delete_Project{
 	margin-left:20px;
 	color:red;
-	
+
 }
 .delete_editProject{
 	margin-left:20px;
@@ -978,7 +971,7 @@ body{
   padding: 0 14px 0 35px;
   height: 40px;
   line-height: 40px;
-  background: #fff url(../images/admin/export_blue_icon.png) no-repeat 14px 10px;
+  background: #fff url(../../images/admin/export_blue_icon.png) no-repeat 14px 10px;
   color: #158DF6;
   text-align: left;
   font-size: 16px;
@@ -1079,4 +1072,4 @@ body{
 }
 .export-or-download-con {
   width: 284px;
-}
+}