yin_yu820 2 周之前
父節點
當前提交
e6db694528

+ 2 - 2
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/dzfoprecord/domain/DzfQuestionOpRecord.java

@@ -88,8 +88,8 @@ public class DzfQuestionOpRecord extends BaseEntity {
 	/**
      * 创建人名称
      */
-    @TableField("create_by_name")
-	private String createByNameId;
+
+	private String createByName;
 	/**
      * 创建人手机号码
      */

+ 2 - 2
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/dzfoprecord/mapper/xml/DzfQuestionOpRecordMapper.xml

@@ -21,7 +21,7 @@
 		a.des8 AS "des8",
 		a.des9 AS "des9",
 		a.create_by AS "createBy.id",
-		a.create_by_name AS "createByName.id",
+		a.create_by_name AS "createByName",
 		a.phone_number AS "phoneNumber",
 		a.create_time AS "createTime",
 		a.update_by AS "updateBy.id",
@@ -33,7 +33,7 @@
 
 	<sql id="dzfQuestionOpRecordJoins">
 
-		LEFT JOIN sys_user createByName ON createByName.id = a.create_by_name
+
 	</sql>
 
 

+ 47 - 47
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/dzfoprecord/service/dto/DzfQuestionOpRecordDTO.java

@@ -22,140 +22,140 @@ public class DzfQuestionOpRecordDTO extends BaseDTO {
 
 	private static final long serialVersionUID = 1L;
 
-	        
+
 	/**
      * 关联id
      */
-	@ExcelProperty("关联id") 
+	@ExcelProperty("关联id")
 	private String recordId;
-	        
+
 	/**
      * 关联类型
      */
-	@ExcelProperty("关联类型") 
+	@ExcelProperty("关联类型")
 	private String recordType;
-	        
+
 	/**
      * 操作类型
      */
-	@ExcelProperty("操作类型") 
+	@ExcelProperty("操作类型")
 	private String opType;
-	        
+
 	/**
      * 操作类型名称
      */
-	@ExcelProperty("操作类型名称") 
+	@ExcelProperty("操作类型名称")
 	private String opTypeName;
-	        
+
 	/**
      * 角色ID
      */
-	@ExcelProperty("角色ID") 
+	@ExcelProperty("角色ID")
 	private String roleId;
-	        
+
 	/**
      * 角色名称
      */
-	@ExcelProperty("角色名称") 
+	@ExcelProperty("角色名称")
 	private String roleName;
-	        
+
 	/**
      * 角色等级
      */
-	@ExcelProperty("角色等级") 
+	@ExcelProperty("角色等级")
 	private String roleLevel;
-	        
+
 	/**
      * 备用1
      */
-	@ExcelProperty("备用1") 
+	@ExcelProperty("备用1")
 	private String des1;
-	        
+
 	/**
      * 备用2
      */
-	@ExcelProperty("备用2") 
+	@ExcelProperty("备用2")
 	private String des2;
-	        
+
 	/**
      * 备用3
      */
-	@ExcelProperty("备用3") 
+	@ExcelProperty("备用3")
 	private String des3;
-	        
+
 	/**
      * 备用4
      */
-	@ExcelProperty("备用4") 
+	@ExcelProperty("备用4")
 	private String des4;
-	        
+
 	/**
      * 备用5
      */
-	@ExcelProperty("备用5") 
+	@ExcelProperty("备用5")
 	private String des5;
-	        
+
 	/**
      * 备用6
      */
-	@ExcelProperty("备用6") 
+	@ExcelProperty("备用6")
 	private String des6;
-	        
+
 	/**
      * 备用7
      */
-	@ExcelProperty("备用7") 
+	@ExcelProperty("备用7")
 	private String des7;
-	        
+
 	/**
      * 备用8
      */
-	@ExcelProperty("备用8") 
+	@ExcelProperty("备用8")
 	private String des8;
-	        
+
 	/**
      * 备用9
      */
-	@ExcelProperty("备用9") 
+	@ExcelProperty("备用9")
 	private String des9;
-	        
+
 	/**
      * 创建人名称
      */
-    @ExcelProperty(value = "创建人名称", converter = ExcelUserDTOConverter.class) 
-	private UserDTO createByName;
-	        
+    @ExcelProperty("创建人名称")
+	private String createByName;
+
 	/**
      * 创建人手机号码
      */
-	@ExcelProperty("创建人手机号码") 
+	@ExcelProperty("创建人手机号码")
 	private String phoneNumber;
-	        
+
 	/**
      * 创建时间
      */
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-	@ExcelProperty("创建时间") 
-	private Date createTime;
-	        
+	@ExcelProperty("创建时间")
+	private Date createDate;
+
 	/**
      * 更新时间
      */
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-	@ExcelProperty("更新时间") 
-	private Date updateTime;
-	        
+	@ExcelProperty("更新时间")
+	private Date updateDate;
+
 	/**
      * 备注
      */
-	@ExcelProperty("备注") 
+	@ExcelProperty("备注")
 	private String remarks;
-	        
+
 	/**
      * pre_time
      */
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-	@ExcelProperty("pre_time") 
+	@ExcelProperty("pre_time")
 	private Date preTime;
 
 }

+ 0 - 2
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/dzfoprecord/service/mapstruct/DzfQuestionOpRecordWrapper.java

@@ -23,14 +23,12 @@ public interface DzfQuestionOpRecordWrapper extends EntityWrapper<DzfQuestionOpR
 
     DzfQuestionOpRecordWrapper INSTANCE = Mappers.getMapper(DzfQuestionOpRecordWrapper.class);
      @Mappings({
-            @Mapping(source = "createByName.id", target = "createByNameId"),
             @Mapping(source = "createBy.id", target = "createBy"),
             @Mapping (source = "updateBy.id", target = "updateBy")})
     DzfQuestionOpRecord toEntity(DzfQuestionOpRecordDTO dto);
 
 
     @Mappings({
-            @Mapping(source = "createByNameId", target = "createByName.id"),
             @Mapping (source = "createBy", target = "createBy.id"),
             @Mapping (source = "updateBy", target = "updateBy.id")})
     DzfQuestionOpRecordDTO toDTO(DzfQuestionOpRecord entity);

+ 55 - 0
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/enterpriseinfo/service/EnterpriseInfoService.java

@@ -198,6 +198,61 @@ public class EnterpriseInfoService extends ServiceImpl<EnterpriseInfoMapper, Ent
     public int generateAccount(EnterpriseInfoDTO ef){
         //1:企业联系电话未填写;    2:已经生成过;   3:正常生成;
 
+        //判断是否已经生成过挂钩干部账号
+        if(ef.getDes10()==null||!ef.getDes10().equals("1")){
+            if(ef.getBz6()!=null&&!ef.getBz6().equals("")){
+
+                String pp=ef.getBz6();
+                UserDTO gb=userService.getUserByLoginName(pp);
+                if(gb==null){
+                    //生成用户
+                    UserDTO userDTO2=new UserDTO();
+                    userDTO2.setLoginName(pp);
+                    String password="Dzf@"+pp.substring(pp.length()-4,pp.length());//固定格式
+                    userDTO2.setPassword ( SecurityUtils.encryptPassword ( password ) );
+
+                    userDTO2.setName(ef.getBz5());
+                    userDTO2.setRemarks("");
+                    userDTO2.setMobile(pp);
+
+                    OfficeDTO of=new OfficeDTO();
+                    of.setId("1910166518827778049");//挂钩干部
+                    userDTO2.setCompanyDTO(of);
+                    userDTO2.setOfficeDTO(of);
+
+                    userDTO2.setNo("001");
+                    RoleDTO ro=new RoleDTO();
+                    ro.setId("1910141956174053377");//挂钩干部
+                    List<RoleDTO> ros=new ArrayList<>();
+                    ros.add(ro);
+                    userDTO2.setRoleDTOList(ros);
+                    userDTO2.setLoginFlag("1");
+                    userService.saveOrUpdate ( userDTO2 );
+
+                    //更新企业信息
+                    ef.setDes10("1");
+                    saveOrUpdate(enterpriseInfoWrapper.toEntity (ef));
+
+                }else{
+
+                }
+
+
+                //正常生成
+                //return 3;
+            }else{
+                //企业联系电话未填写
+                //return 1;
+            }
+        }else{
+            //已经生成过
+            //return 2;
+        }
+
+
+
+
+
         //判断是否已经生成过账号
         if(ef.getDes6()==null||!ef.getDes6().equals("1")){
             if(ef.getPhone()!=null&&!ef.getPhone().equals("")){

+ 80 - 4
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/question/controller/DzfQuestionController.java

@@ -5,6 +5,7 @@ package com.jeeplus.question.controller;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.UUID;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import com.google.common.collect.Lists;
@@ -13,6 +14,13 @@ import com.jeeplus.core.excel.ExcelOptions;
 import com.jeeplus.core.excel.annotation.ExportMode;
 import com.jeeplus.core.query.QueryWrapperGenerator;
 import com.jeeplus.aop.logging.annotation.ApiLog;
+import com.jeeplus.dzfoprecord.service.DzfQuestionOpRecordService;
+import com.jeeplus.dzfoprecord.service.dto.DzfQuestionOpRecordDTO;
+import com.jeeplus.dzfoprecord.service.mapstruct.DzfQuestionOpRecordWrapper;
+import com.jeeplus.enterpriseinfo.service.EnterpriseInfoService;
+import com.jeeplus.enterpriseinfo.service.dto.EnterpriseInfoDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.UserUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.http.ResponseEntity;
@@ -39,10 +47,19 @@ public class DzfQuestionController {
 
 	@Autowired
 	private DzfQuestionService dzfQuestionService;
-	
+
 	@Autowired
 	private DzfQuestionWrapper dzfQuestionWrapper;
 
+	@Autowired
+	private EnterpriseInfoService enterpriseInfoService;
+
+	@Autowired
+	private DzfQuestionOpRecordService dzfQuestionOpRecordService;
+
+	@Autowired
+	private DzfQuestionOpRecordWrapper dzfQuestionOpRecordWrapper;
+
 	/**
 	 * 问题诉求列表数据
 	 */
@@ -77,7 +94,66 @@ public class DzfQuestionController {
 	@PostMapping("save")
 	public  ResponseEntity <String> save(@Valid @RequestBody DzfQuestionDTO dzfQuestionDTO) {
 		//新增或编辑表单保存
+		boolean isAdd=false;
+		String type=dzfQuestionDTO.getDes10();
+		dzfQuestionDTO.setDes10("");
+		UserDTO userDTO = UserUtils.getCurrentUserDTO();
+		EnterpriseInfoDTO ei=enterpriseInfoService.findByUserid ( userDTO.getLoginName());
+		if(ei!=null){
+			dzfQuestionDTO.setQyId(ei.getId());
+			dzfQuestionDTO.setQyName(ei.getName());
+			dzfQuestionDTO.setQySd(ei.getDes1());
+			dzfQuestionDTO.setQyFzr(ei.getLxr());
+			dzfQuestionDTO.setPhone(ei.getPhone());
+			dzfQuestionDTO.setOfficer(ei.getBz5());
+			dzfQuestionDTO.setOfficeName(ei.getBz6());
+
+		}
+		if(dzfQuestionDTO.getId()==null||dzfQuestionDTO.getId().equals("")){//新增状态下,赋值id
+			isAdd=true;
+			String uuid = UUID.randomUUID ( ).toString ( );
+			dzfQuestionDTO.setId(uuid);
+			for(int i=0;i<dzfQuestionDTO.getDzfQuestionDetilDTOList().size();i++){
+				String uuid2 = UUID.randomUUID ( ).toString ( );
+				dzfQuestionDTO.getDzfQuestionDetilDTOList().get(i).setId(uuid2);
+			}
+
+		}
+
+		if(type!=null&&type.equals("submit")){//提交状态,其他为暂存
+			dzfQuestionDTO.setStates("1");//新增时提交;
+			//企业提交,将挂钩干部带入到待办人中
+			dzfQuestionDTO.setDes1(ei.getBz6());
+			dzfQuestionDTO.setDes2(ei.getBz5());
+		}else{
+			dzfQuestionDTO.setStates("0");//新增时暂存;
+		}
 		dzfQuestionService.saveOrUpdate (dzfQuestionDTO);
+
+
+		//提交状态,(其他为暂存,不做处理)
+		if(type!=null&&type.equals("submit")){
+			//新增流程记录
+			for(int i=0;i<dzfQuestionDTO.getDzfQuestionDetilDTOList().size();i++){
+				DzfQuestionOpRecordDTO dzfQuestionOpRecordDTO=new DzfQuestionOpRecordDTO();
+				dzfQuestionOpRecordDTO.setRecordId(dzfQuestionDTO.getDzfQuestionDetilDTOList().get(i).getId());
+				dzfQuestionOpRecordDTO.setRecordType("1");
+				dzfQuestionOpRecordDTO.setOpType("1");
+				dzfQuestionOpRecordDTO.setOpTypeName("提交");
+				dzfQuestionOpRecordDTO.setRoleName("企业");
+				dzfQuestionOpRecordDTO.setDes1(ei.getName());//单位名称
+				dzfQuestionOpRecordDTO.setDes2(userDTO.getName());
+
+				//企业第一步提交,将挂钩干部带入到待办人中
+				dzfQuestionOpRecordDTO.setDes3(ei.getBz6());
+				dzfQuestionOpRecordDTO.setDes4(ei.getBz5());
+
+				dzfQuestionOpRecordService.saveOrUpdate (dzfQuestionOpRecordWrapper.toEntity (dzfQuestionOpRecordDTO));
+
+			}
+
+		}
+
         return ResponseEntity.ok ( "保存问题诉求成功" );
 	}
 
@@ -96,7 +172,7 @@ public class DzfQuestionController {
 		}
 		return ResponseEntity.ok( "删除问题诉求成功" );
 	}
-	
+
 	/**
      * 导出问题诉求数据
      *
@@ -112,7 +188,7 @@ public class DzfQuestionController {
         String fileName = options.getFilename ( );
 		QueryWrapper queryWrapper = QueryWrapperGenerator.buildQueryCondition (dzfQuestionDTO, DzfQuestionDTO.class);
         if ( ExportMode.current.equals ( options.getMode ( ) ) ) { // 导出当前页数据
-            
+
         } else if ( ExportMode.selected.equals ( options.getMode ( ) ) ) { // 导出选中数据
             queryWrapper.in ( "a.id", options.getSelectIds () );
         } else { // 导出全部数据
@@ -147,6 +223,6 @@ public class DzfQuestionController {
         String fileName = "问题诉求数据导入模板.xlsx";
         List<DzfQuestionDTO> list = Lists.newArrayList();
         EasyExcelUtils.newInstance ( dzfQuestionService, dzfQuestionWrapper ).exportExcel ( list,  "问题诉求数据", DzfQuestionDTO.class, fileName, null, response );
-    }	
+    }
 
 }

+ 1 - 0
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/question/service/DzfQuestionService.java

@@ -67,6 +67,7 @@ public class DzfQuestionService extends ServiceImpl<DzfQuestionMapper, DzfQuesti
 			if ( CommonConstants.DELETED.equals ( dzfQuestionDetilDTO.getDelFlag()) ){
 				dzfQuestionDetilService.removeById ( dzfQuestionDetilDTO.getId () );
 			}else{
+
 				DzfQuestionDetil dzfQuestionDetil = DzfQuestionDetilWrapper.INSTANCE.toEntity ( dzfQuestionDetilDTO );
 				dzfQuestionDetil.setQidId ( dzfQuestion.getId () );
 				dzfQuestionDetilService.saveOrUpdate ( dzfQuestionDetil );

+ 23 - 0
jp-mobile/api/auth/loginService.js

@@ -317,6 +317,29 @@ export default {
 			}
 		})
 	},
+	
+	getdzfQuestionList: function(params) {
+		return request({
+			url: '/question/dzfQuestion/list',
+			method: 'get',
+			params: params
+		})
+	},
+	
+	getdzfQuestionqueryById: function(params) {
+		return request({
+			url: '/question/dzfQuestion/queryById',
+			method: 'get',
+			params: params
+		})
+	},
 
+	saveQuestion: function(params) {
+		return request({
+			url: '/question/dzfQuestion/save',
+			method: 'post',
+			params: params
+		})
+	},
 
 }

+ 76 - 114
jp-mobile/pages/question/questionAdd.vue

@@ -4,14 +4,6 @@
 			<block slot="backText">返回</block>
 			<block slot="content">问题诉求情况</block>
 		</cu-custom>
-		<!-- <cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '问题诉求情况'">
-			<block slot="backText">返回</block>
-			<block slot="content">问题诉求情况</block>
-		</cu-custom>
-		<cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '问题诉求情况'">
-			<block slot="backText">返回</block>
-			<block slot="content">问题诉求情况</block>
-		</cu-custom> -->
 		
 		<form @submit="formSubmit" class="cu-list menu">
 			
@@ -35,7 +27,7 @@
 					 属地
 				</view>
 				<view class="text22">
-					 {{inputForm.des1}}
+					 {{inputForm.qy_sd}}
 				</view>				
 			</view>
 			
@@ -53,7 +45,7 @@
 					 负责人号码
 				</view>
 				<view class="text22">
-					 11{{inputForm.phone}}
+					 {{inputForm.phone}}
 				</view>				
 			</view>
 			
@@ -87,8 +79,7 @@
 					<view class="titlebb">
 						问题{{index2+1}}
 					</view>
-					<icon v-if="index2!=0" @click="del(index2)" type="cancel" style="padding-right: 15rpx;padding-top: 5rpx;padding-left: 100rpx;"></icon>
-					<!-- <image s style="height: 10rpx;width: 10rpx;"></image> -->
+					<icon v-if="index2!=0&&canedit" @click="del(index2)" type="cancel" style="padding-right: 15rpx;padding-top: 5rpx;padding-left: 100rpx;"></icon>
 				</view>
 				
 				
@@ -96,45 +87,46 @@
 					<view class="title">
 						问题名称
 					</view>
-					<input v-model="item.qName" placeholder="请填写问题名称" :disabled="ischeck"></input>
+					<input v-model="item.qname" placeholder="请填写问题名称" :disabled="!canedit"></input>
 				</view>
 				
 				<view class="cu-form-group margin-top">
 					<view class="title">
 						问题类型
 					</view>					
-					<picker class="title2" @change="bindPickerChange($event, index2)" :value="index" :range="parkList">
-						<view class="input2">{{item.qType||'请选择问题类型'}}</view>
-					</picker>				
+					<picker v-if="canedit" class="title2" @change="bindPickerChange($event, index2)" :value="index" :range="parkList">
+						<view class="input2">{{item.qtype||'请选择问题类型'}}</view>
+					</picker>	
+						
+					<view v-if="!canedit" class="input2">{{item.qtype||'请选择问题类型'}}</view>			
 				</view>								
 				
 				<view class="cu-form-group margin-top" v-if="item.t1!=''">
 					<view class="title">
 						{{item.t1}}
 					</view>
-					<input style="width: 200rpx;" v-model="item.gaps" :placeholder="item.t1s" :disabled="ischeck"></input>{{item.t1d}}
+					<input style="width: 200rpx;" v-model="item.gaps" :placeholder="item.t1s" :disabled="!canedit"></input>{{item.t1d}}
 				</view>
 
 				<view class="cu-form-group margin-top" style="border-bottom: 3px solid #eee;">
 					<view class="title">
 						问题描述
 					</view>
-					<textarea v-model="item.des" placeholder="请填写问题描述" :disabled="ischeck"></textarea>
+					<textarea v-model="item.des" placeholder="请填写问题描述" :disabled="!canedit" ></textarea>
 				</view>
 
 			</view>
 
 			<view  style="width: 400rpx;margin-left: 20rpx;">
-				<button @click="addp" style="height: 30px;" class="cu-btn block bg-blue margin-tb-sm lg">+增加问题</button>
+				<button v-if="canedit" @click="addp" style="height: 30px;" class="cu-btn block bg-blue margin-tb-sm lg">+增加问题</button>
 			</view>
-			
-
-			
+						
 			<view style="height: 40rpx;"></view>
-			<view class="flexC" v-if="!ischeck">
+			<view class="flexC" v-if="canedit">
 				<button @click="save" class="bt1  block  margin-tb-sm lg">暂存</button>
 				<button form-type="submit" class="bt1 cu-btn block bg-blue margin-tb-sm lg">提交</button>
 			</view>
+			<view style="height: 40rpx;"></view>
 		</form>
 	</view>
 </template>
@@ -153,22 +145,11 @@
 				inputForm: {
 					id:'',
 					name: '',
-					industry: '',
+					qy_sd: '',
 					lxr: '',
 					phone: '',
-					
-					bz1: '',
-					bz2: '',
-					bz3: '',
-					bz4: '',
 					bz5: '',
-					bz6: '',
 					
-					des1: '',
-					des2: '',
-					des3: '',
-					des4: '',
-					des6: '',			
 				},
 				t1: '可供产品',
 				t1s: '请填写可供产品',
@@ -185,72 +166,53 @@
 					height: 90
 				},
 				parkList: [ "用工人才", "资金需求", "土地厂房", "订单及配套", "政策兑现", "创新及品牌", "审批手续", "水电气供应", "安全环保消防", "其他(需详细说明)"],
-				questionList:[{qName:"",qType:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""}],
+				questionList:[{qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""}],
 				
 				index:0,
 				ischeck: false,
+				canedit:true,
 			}
 		},
 		created() {
-			//this.getParkList()
 		},
-		mounted() {
-			
+		mounted() {			
 		},
-		async onLoad(query) {
+		async onLoad(query) {					
 			
-			let data2 = await loginService.queryByUserName()
-			console.log(data2.data.name);
-			this.inputForm = this.recover(this.inputForm, data2.data)
-		
-			if (query && query.id) {
-				let {data} = await loginService.queryByIdBuild(query.id)
-				console.log(data)
-				if (data.pic != null) {
-					data.pic = data.pic.split(",")
-					var list = data.pic
-					list.forEach(item => {
-						this.picUrl.push({
-							'url': item,
-							'uuid': item
-						})
-						this.picLists.push({
-							'url': item,
-							'uuid': item
-						})
-					})
-				} else {
-					data.pic = []
+			if(query.ischeck!=undefined&&query.ischeck=='1'){
+				//查看
+				this.ischeck=true;
+				let data2 = await loginService.getdzfQuestionqueryById({id:query.id})
+				
+				this.inputForm.id = data2.data.id;
+				this.inputForm.name = data2.data.qyName;
+				this.inputForm.qy_sd = data2.data.des1;
+				this.inputForm.lxr = data2.data.qyFzr;
+				this.inputForm.phone = data2.data.phone;
+				this.inputForm.bz5 = data2.data.officer;
+				this.questionList=data2.data.dzfQuestionDetilDTOList;
+				
+				//不是暂存时不可以修改
+				if(data2.data.states!='0'){
+					this.canedit=false;
 				}
-				this.inputForm = this.recover(this.inputForm, data)
+
+			}else{
+				//新增
+				let data2 = await loginService.queryByUserName()
+				this.inputForm = this.recover(this.inputForm, data2.data)	
+				this.inputForm.id="";
 			}
+			
 		},
 		methods: {
 			addp(){
-				this.questionList.push({qName:"",qType:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""})
+				this.questionList.push({qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""})
 				
 			},
 			del(index2){
 				this.questionList.splice(index2, 1);
 			},
-			getParkList() {
-				loginService.parkList({
-					current: 1,
-					size: 1000000,
-				}).then(({
-					data
-				}) => {
-					this.parkList = data.records.map((item) => {
-						return {
-							label: item.parkName,
-							value: item.id
-						}
-					})
-					console.log(this.parkList, '=============>')
-				}).catch(e => {
-					console.log(e)
-				})
-			},
 			
 			bindPickerChange: function(e,index2) {
 				if(e.detail.value==0){
@@ -275,7 +237,7 @@
 				}					
 				
 				this.questionList[index2].qTypeindex = e.detail.value;		
-				this.questionList[index2].qType=this.parkList[e.detail.value]
+				this.questionList[index2].qtype=this.parkList[e.detail.value]
 				
 			},
 			
@@ -352,50 +314,50 @@
 				}
 			},
 			save(){
-				
+				this.inputForm.des10="";
+				this.inputForm.dzfQuestionDetilDTOList=this.questionList;
+				this.checkinput();
 			},
-			formSubmit: function(e) {
-				
-				uni.showLoading()
-				this.inputForm.des6 = [];
-				this.picUrl.forEach(item => {
-					this.inputForm.des6.push(item.url)
-				})
-				this.inputForm.des6 = this.inputForm.des6.toString();
-				
-				loginService.productSave(this.inputForm).then(({
-					data
-				}) => {
-					uni.showToast({
-						title: "产品供需发布成功!",
-						icon: "success"
-					});
-					uni.navigateTo({
-						url: '/pages/product/productList?w=1'
-					})
-				}).catch((e) => {
-
-				})
-
-				
+			formSubmit: function(e) {						
+				this.inputForm.des10="submit";
+				this.inputForm.dzfQuestionDetilDTOList=this.questionList;
+				this.checkinput();				
 			},
 			checkinput(){
-				let cou=0;
 				if(this.hasDuplicateQName(this.questionList)){
+					uni.showToast({
+						icon: 'none',
+						title: '问题名称不能重复!'
+					});
+				}else{
 					
+					uni.showLoading()										
+					loginService.saveQuestion(this.inputForm).then(({
+						data
+					}) => {
+						uni.hideLoading();
+						uni.showToast({
+							title: "问题诉求提交成功!",
+							icon: "success"
+						});
+						uni.navigateTo({
+							url: '/pages/question/questionList'
+						})
+					}).catch((e) => {
+						uni.hideLoading();
+					})
+										
 				}
 				
-				
-				//this.questionList:[{qName:"",qType:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""}],
-				
+								
 			},
 			hasDuplicateQName(array) {
 				const seen = new Set();
 				for (const item of array) {
-				  if (seen.has(item.qName)) {
+				  if (seen.has(item.qname)) {
 					return true; // 找到重复的 qName
 				  }
-				  seen.add(item.qName);
+				  seen.add(item.qname);
 				}
 				return false; // 没有重复的 qName
 			}

+ 416 - 454
jp-mobile/pages/question/questionInfo.vue

@@ -1,461 +1,463 @@
 <template>
 	<view>
-		<view class="overlay" v-if="showfx" @click="showwx">
-			<image style="height: 100%;width: 100%;" src="/static/img/zz.png"></image>
-		</view>
+		<cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '问题诉求情况'">
+			<block slot="backText">返回</block>
+			<block slot="content">问题诉求情况</block>
+		</cu-custom>
 		
-		
-		<view :class="['custom-header', { 'is-back': isBack }, bgColor]">
-			<view class="back-container" @click="handleBack">
-			  <view class="back-text">返回</view>
-			</view>
-			<view class="content-container">
-			  <view class="content-text">{{title}}</view>
-			</view>
-		  </view>
-
-			
-		<!-- <swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="3000" :duration="800">
-		  <swiper-item v-for="(item, index) in swiperList" :key="index">
-		    <image :src="item.url" class="swiper-item"></image>
-		  </swiper-item>
-		</swiper> -->
-		
-		<form class="cu-list menu">
+		<form @submit="formSubmit" class="cu-list menu">
 			
 			<view class="titlebg2">
 				<view class="titlet1" ></view>
-				<view class="titlet2" >发布企业</view>								
+				<view class="titlet2" >企业信息</view>								
 			</view>
 			
-			<view class="show1">
-				
-				<view class="textbg">
-					<view class="text1">
-						 企业名称
-					</view>
-					<view class="text2" >
-						 {{inputForm.des5}}
-					</view>				
-				</view>
-				
-				<view class="textbg">
-					<view class="text1">
-						 供需类型
-					</view>
-					<view class="text2" :class="inputForm.des1 === '需' ? 'text33' : 'text44'" >
-						 {{inputForm.des1}}
-					</view>				
-				</view>
-				
-				<view class="textbg">
-					<view class="text1">
-						 发布时间
-					</view>
-					<view class="text2" >
-						 {{inputForm.updateDate}}
-					</view>				
+			
+			<view class="textbg">
+				<view class="text12">
+					 企业名称
 				</view>
+				<view class="text22">
+					 {{inputForm.name}}
+				</view>				
 			</view>
-
-			<view class="titlebg2">
-				<view class="titlet1" ></view>
-				<view class="titlet2" >供需基本信息</view>								
-			</view>
-			
 			
 			<view class="textbg">
 				<view class="text12">
-					 {{t1}}
+					 属地
 				</view>
 				<view class="text22">
-					 {{inputForm.des2}}
+					 {{inputForm.des1}}
 				</view>				
 			</view>
 			
 			<view class="textbg">
 				<view class="text12">
-					 {{t2}}
+					 企业负责人
 				</view>
 				<view class="text22">
-					 {{inputForm.des3}}
+					 {{inputForm.lxr}}
 				</view>				
 			</view>
 			
 			<view class="textbg">
 				<view class="text12">
-					 {{t3}}
+					 负责人号码
 				</view>
-				<view class="text221">
-					 {{inputForm.des4}}
+				<view class="text22">
+					 {{inputForm.phone}}
 				</view>				
 			</view>
 			
 			<view style="height: 30rpx;background-color: white;"></view>
 			
-			<view class="titlebg2" v-if="swiperList.length>0" >
+			<view class="titlebg2" style="margin-top:10rpx ;">
 				<view class="titlet1" ></view>
-				<view class="titlet2" >图文详情</view>								
+				<view class="titlet2" >挂钩干部</view>								
 			</view>
 			
-			<view v-for="(item, index) in swiperList" :key="index" style="width: 100%;">
-				<image :src="item.url"  mode="widthFix" style="width: 100%;" >					
-				</image>
+			<view class="textbg">
+				<view class="text12">
+					 姓名
+				</view>
+				<view class="text22">
+					 {{inputForm.bz5}}
+				</view>				
 			</view>
 			
-
-					
+			<view style="height: 30rpx;background-color: white;"></view>
 			
-			<view style="height: 40rpx;"></view>
+			<view class="titlebg2" style="margin-top:10rpx ;">
+				<view class="titlet1" ></view>
+				<view class="titlet2" >主要问题诉求</view>								
+			</view>
+			
+			
+			<view v-for="(item, index2) in questionList">
+				
+				<view style="display: flex;background-color: #ffffff;justify-content: space-between; align-items: center;">
+					<view class="titlebb">
+						问题{{index2+1}}
+					</view>
+					<!-- <icon v-if="index2!=0" @click="del(index2)" type="cancel" style="padding-right: 15rpx;padding-top: 5rpx;padding-left: 100rpx;"></icon> -->
+				</view>
+				
+				
+				<view class="input1">
+					<view class="title">
+						问题名称
+					</view>
+					<input v-model="item.qname" placeholder="请填写问题名称" disabled="true" ></input>
+				</view>
+				
+				<view class="cu-form-group margin-top">
+					<view class="title">
+						问题类型
+					</view>					
+
+						<view class="input2">{{item.qtype||'请选择问题类型'}}</view>
+								
+				</view>								
+				
+				<view class="cu-form-group margin-top" v-if="item.t1!=''">
+					<view class="title">
+						{{item.t1}}
+					</view>
+					<input style="width: 200rpx;" v-model="item.gaps" :placeholder="item.t1s" disabled="true"></input>{{item.t1d}}
+				</view>
+
+				<view class="cu-form-group margin-top" style="border-bottom: 3px solid #eee;">
+					<view class="title">
+						问题描述
+					</view>
+					<textarea v-model="item.des" placeholder="请填写问题描述" disabled="true" ></textarea>
+				</view>
+				<!-- 挂钩干部 -->
+				<view class="cu-form-group margin-top" v-if="roleIds=='1910141956174053377'" >
+					<view class="title">
+						问题处理
+					</view>
+					<radio-group @change="(e) => radioChange(e, index2)" class="radiog">
+						<label class="uni-list-cell uni-list-cell-pd"  v-for="(item3, index3) in dels" :key="item3">
+							<view>
+								<radio :value="item3" :checked="index3 === item.current" />
+							</view>
+							<view style="padding-left: 15rpx;">{{item3}}</view>
+						</label>
+					</radio-group>
+				</view>
+				<!-- 大走访办公室 -->
+				<view class="cu-form-group margin-top" v-if="roleIds=='1910175386924417025'" >
+					<view class="title">
+						问题处理
+					</view>
+					<radio-group @change="(e) => radioChange(e, index2)" class="radiog">
+						<label class="uni-list-cell uni-list-cell-pd"  v-for="(item3, index3) in dels2" :key="item3">
+							<view>
+								<radio :value="item3" :checked="index3 === item.current" />
+							</view>
+							<view style="padding-left: 15rpx;">{{item3}}</view>
+						</label>
+					</radio-group>
+				</view>
+								
+				<view class="cu-form-group margin-top">
+					<view class="title">
+						预计办结时间
+					</view>					
+					<picker mode="date" class="title2" @change="(e) => onDateChange(e, index2)"  >
+						<view class="input2">{{item.finishdate||'请选择'}}</view>
+					</picker>				
+				</view>	
+				
+				<view class="cu-form-group margin-top" >
+					<view class="title">
+						处理意见
+					</view>
+					<textarea v-model="item.delyj" placeholder="请填写处理意见"  ></textarea>
+				</view>
+				
+	<!--			<view class="cu-form-group2 margin-top" style="border-bottom: 3px solid #eee;">
+					<view class="title">
+						附件:
+					</view>
+					<button @click="addfj" style="height: 30px;width: 240rpx;margin-left: 55rpx;" class="cu-btn block bg-blue margin-tb-sm lg">+上传附件</button>
+				</view>
+ 				<view v-for="(item3, index3) in item.fj">
+					<view style="display: flex;background-color: #ffffff;justify-content: space-between; align-items: center;">
+						<view class="titlebb">
+							{{item3.fjname}}
+						</view>
+						<icon  @click="del(index3)" type="cancel" style="padding-right: 15rpx;padding-top: 5rpx;padding-left: 100rpx;"></icon>
+					</view>
+				</view> -->
+				
+				
+				<view class="cu-form-group margin-top" style="border-bottom: 3px solid #eee;">
+					<uni-file-picker style="margin-bottom: 10px;" limit="3" ref="picFile" v-model="item.fj"
+						fileMediatype="all" mode="grid" title="附件上传" :auto-upload="autoUpload" @select="select"
+						@progress="progress" @success="success" @fail="fail" @delete="deleteFile"
+						:imageStyles="imageStyles" :disabled="ischeck">
+					</uni-file-picker>
+				</view>
+				
+				
 
+			</view>
 
-			<view class="padding-xl" v-if="isadmin&&inputForm.des6=='1'">
-				<button @click="sharezz" class="cu-btn block bg-blue margin-tb-sm lg">分享此企业账号</button>
+			<!-- <view  style="width: 400rpx;margin-left: 20rpx;">
+				<button @click="addp" style="height: 30px;" class="cu-btn block bg-blue margin-tb-sm lg">+增加问题</button>
+			</view> -->
+						
+			<view style="height: 40rpx;"></view>
+			<view class="flexC" >
+				<button @click="save" class="bt1  block  margin-tb-sm lg">暂存</button>
+				<button form-type="submit" class="bt1 cu-btn block bg-blue margin-tb-sm lg">提交</button>
 			</view>
+			<view style="height: 40rpx;"></view>
 		</form>
 	</view>
 </template>
 
 <script>
+	var graceChecker = require("@/common/graceChecker.js");
+	import revenueListService from '@/api/revenue/revenueListService'
 	import loginService from '@/api/auth/loginService.js'
-	import { wxShare } from "@/common/wxutils.js";
+	import * as $auth from "../../common/auth"
 	export default {
 		onShow() {
-			//this.$auth.checkLogin()
+			this.$auth.checkLogin()
 		},
 		data() {
 			return {
-				title: '产品供需详情',
-				isBack: true, // 是否显示返回按钮
-			    backText: '返回', // 返回按钮的文本
-			    bgColor: 'bg-blue', // 背景颜色
-				autoUpload: false,
-				swiperList: [],
+				title: '问题诉求情况',
+				roleIds:'',
 				inputForm: {
-					id: '',
+					id:'',
 					name: '',
 					industry: '',
+					lxr: '',
+					phone: '',
+					
+					bz1: '',
+					bz2: '',
+					bz3: '',
+					bz4: '',
+					bz5: '',
+					bz6: '',
+					
 					des1: '',
 					des2: '',
 					des3: '',
 					des4: '',
-					des5: '',					
-					des6: '',
-					des7: '',
-					des8: '',
-					des9: '',
-					updateDate: '',
+					des6: '',	
+					des10: '',	
 				},
-				t1: '产品名称',
-				t2: '产品产能',
+				t1: '可供产品',
+				t1s: '请填写可供产品',
+				t2: '可供数量',
+				t2s: '请填写可供数量',
 				t3: '详细描述',
-				text1:'',
-				text2:'',
-				parkList: [],
+				t3s: '请填写详细描述',
+								
+				autoUpload: false,
+				picLists: [],
+				picUrl: [],
+				imageStyles: {
+					width: 90,
+					height: 90
+				},
+				parkList: [ "用工人才", "资金需求", "土地厂房", "订单及配套", "政策兑现", "创新及品牌", "审批手续", "水电气供应", "安全环保消防", "其他(需详细说明)"],
+				questionList:[{qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""}],
+				dels:["办结","反馈大走访活动办","正在办理","难以化解","持续跟踪","提请会办"],
+				dels2:["办结","交办"],
+				index:0,
 				ischeck: false,
-				isLogin:"",
-				username:"",
-				isadmin:false,
-				lyIndex: '',
-				showLYList: [],
-				showfx:false,
 			}
 		},
 		created() {
 		},
-		mounted() {
-			
+		mounted() {			
 		},
-		onLoad(query) {
-			this.isLogin=this.$auth.checkisLogin();
-			this.username=this.$auth.getUserInfo();
-			if(this.username!=undefined&&this.username!=''&&this.username!=null&&this.isLogin!=null){
-				if(this.username.loginName=='admin'){
-					this.isadmin=true;
-				}
-			}
-			
-			if (query && query.ischeck) {
-				this.ischeck = true
-			}
-			if (query && query.id && !query.ischeck) {
-				this.title = "修改企业信息";
-			}
-			this.getComById(query)
+		async onLoad(query) {					
 			
+			if(query.ischeck!=undefined&&query.ischeck=='1'){
+				//查看
+				this.ischeck=true;
+				let data2 = await loginService.getdzfQuestionqueryById({id:query.id})
+				
+				this.inputForm.id = data2.data.id;
+				this.inputForm.name = data2.data.qyName;
+				this.inputForm.des1 = data2.data.des1;
+				this.inputForm.lxr = data2.data.qyFzr;
+				this.inputForm.phone = data2.data.phone;
+				this.inputForm.bz5 = data2.data.officer;
+				this.questionList=data2.data.dzfQuestionDetilDTOList;
+				
+				
+				this.roleIds= $auth.getUserInfo().roleIds;
+				console.log(this.roleIds);
+				
 
+			}else{
+				//新增
+				let data2 = await loginService.queryByUserName()
+				this.inputForm = this.recover(this.inputForm, data2.data)	
+				this.inputForm.id="";
+			}
 			
 		},
 		methods: {
-			getParkList(query) {
-				loginService.list({
-					current: 1,
-					size: 1000000,
-				}).then(({
-					data
-				}) => {
-					this.parkList = data.records.map((item) => {
-						return {
-							label: item.buildingName,
-							value: item.id
-						}
-					})
-					this.showLYList = this.parkList.map(item => item.label)
-					if (query && query.id) {
-						loginService.queryByIdPro(query.id).then(({
-							data
-						}) => {
-							this.inputForm = this.recover(this.inputForm, data)
-							this.lyIndex = this.parkList.findIndex(item => item.value == this.inputForm.des1)
-							console.log(this.lyIndex, '=====================>lyIndex')
-						}).catch((e) => {
-						
-						})
-						
-					}
-				}).catch(e => {
-					console.log(e)
-				})
-			},
-			
-			handleBack() {
-			      // 返回逻辑,比如跳转至上一页
-				  this.$router.go(-1);
-			      console.log('返回按钮被点击');
+			onDateChange(e,index2) {
+				this.$set(this.questionList[index2], 'finishdate', e.detail.value);
 			},
-			showwx() {
-			     this.showfx=false;
+			radioChange: function(evt,index2) {				
+				for (let i = 0; i < this.dels.length; i++) {
+					if (this.dels[i] === evt.detail.value) {
+						this.questionList[index2].current = i;
+						break;
+					}
+				}
 			},
-			
-			getComById(query) {
-				loginService.queryByIdPro(query.id).then(({
-					data
-				}) => {
-					//未登录
-					// if(this.isLogin==null){
-					// 	console.log('未登录')
-					// 	//不做处理后台已做处理
-						
-						if(data.des1=='1'){
-							data.des1="供"
-						}else{
-							data.des1="需"
-						}
-						this.setData(data);						
-					// }else{
-					// 	this.setData(data);
-					// }
-					
-				}).catch((e) => {
+			addfj(){
 				
-				})
 			},
-			
-			
-			//账号分享
-			sharezz(){
-				var that=this;
-				setTimeout(function() {
-				  that.showfx=true;
-				  console.log("1"+ this.showfx);
-				}, 500); // 2000毫秒后执行
-				
-				loginService.getloginstr(this.inputForm.phone).then(({
-					data
-				}) => {
-					//未登录
-					if(data.Id=='0'){
-						uni.showModal({
-							title: '您无权限分享账号,请联系管!',
-							showCancel: true,
-							success: (res) => {
-								
-							}
-						});
-												
-					}else{
-						
-						this.weixin(data);
-						
-						// const textArea = document.createElement("textarea");
-						// textArea.value = 'https://miniapp.huidutech.com.cn/yd_qycpfbH5/#/pages/index/index?loginid='+data.Id;
-						// document.body.appendChild(textArea);
-						// textArea.focus();
-						// textArea.select();
-						// try {
-						//   document.execCommand('copy');
-						//   uni.showModal({
-						//   	title: '已将登录链接复制到剪切板,直接打开微信好友粘贴分享!',
-						//   	showCancel: true,
-						//   	success: (res) => {
-						  		
-						//   	}
-						//   });
-						// } catch (err) {
-						//   console.error('Could not copy text', err);
-						//   uni.showModal({
-						//   	title: '当前不支持分享功能!',
-						//   	showCancel: true,
-						//   	success: (res) => {
-						  		
-						//   	}
-						//   });
-						// } finally { 
-						//   document.body.removeChild(textArea); 
-						// }
-					}
-					
-				}).catch((e) => {
-				
-				})
-				
-				
-				
-
-				
-				  
-				
-				
-				
+			addp(){
+				this.questionList.push({qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""})
 				
 			},
+			del(index2){
+				this.questionList.splice(index2, 1);
+			},
 			
-			
-			    async weixin(data) {
+			bindPickerChange: function(e,index2) {
+				if(e.detail.value==0){
+					this.questionList[index2].t1='缺口数';
+					this.questionList[index2].t1s= '请填写缺口数';
+					this.questionList[index2].t1d= '人';
 					
+				}else if(e.detail.value==1){
+					this.questionList[index2].t1='缺口数';
+					this.questionList[index2].t1s= '请填写缺口数';
+					this.questionList[index2].t1d= '万元';
 
-			      try {
-
-			        if ( data) {
-			          //微信加签
-			          var obj = {
-			            appId: data.appid,
-			            nonceStr: data.nonceStr,
-			            signature: data.signature,
-			            timestamp: data.timestamp,
-						Id: data.Id,
-			          }
-			          //分享数据,这段主要是为了在hash模式下分享出去的链接不被浏览器截取,保证完全把链接分享出去(link的链接可以自己拼,无须与当前页面的后缀参数之类的内容完全一致)
-			          let shareData = {
-			            title: '‘都企供需’线上平台',
-			            desc: '点击直接登录',
-			            imgUrl: 'https://miniapp.huidutech.com.cn/yd_qycpfbH5/static/img/titlebg.jpg',
-			            link: 'https://miniapp.huidutech.com.cn/yd_qycpfbH5/#/pages/index/index?loginid='+data.Id + "&t=" + data.timestamp + "&Content=1", // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致																		
-						
-			          };
+				}else if(e.detail.value==2){
+					this.questionList[index2].t1='缺口数';
+					this.questionList[index2].t1s= '请填写缺口数';
+					this.questionList[index2].t1d= '';
 
-			          //引用
-			          wxShare(obj, shareData);
-					  
-			        } else {
-					  uni.showModal({
-					  	title: '获取sdk参数失败!',
-					  	showCancel: true,
-					  	success: (res) => {
-					  		
-					  	}
-					  });
-			        }
-			      } catch (err) {
-			        //
-			      } finally {
-			        //
-			      }
-			    },
-			
-			
-			setData(data){
-				this.inputForm = this.recover(this.inputForm, data)
-				
-				
-				if(this.inputForm.des1=='供'){
-					this.t1='可供产品';
-					this.t2= '可供数量';
 				}else{
-					this.t1='需求名称';
-					this.t2= '需求数量';
-				}
-				
+					this.questionList[index2].t1='';
+					this.questionList[index2].t1s= '';
+					this.questionList[index2].t1d= '';
+				}					
 				
-				let pics=this.inputForm.des6.split(",");
-				console.log(pics)
-				pics.forEach(item => {
-					if(item!=''){
-						this.swiperList.push({
-							'url': "http://47.97.69.114:8089/yd_qycpfbWeb/"+item,
-						})
-					}
-					
-				})
+				this.questionList[index2].qTypeindex = e.detail.value;		
+				this.questionList[index2].qtype=this.parkList[e.detail.value]
 				
-				console.log(this.swiperList)
-
 			},
 			
-			goToCompany(companyName) {
-				  //https://www.qcc.com/web/search?key=
-					
-				  window.open("https://www.qcc.com/web/search?key="+companyName);
-			      //window.location.href = `https://www.qcc.com/company/${encodeURIComponent(companyName)}`;
+			// 获取上传进度
+			progress(e) {
+				console.log('上传进度:', e)
 			},
-			
-			call1(){
-				
-				// uni.navigateTo({
-				// 	url: '/pages/index/AudioToWord'
-				// })
-				
-				// uni.navigateTo({
-				// 	url: '/pages/comList/comList'
-				// })
-				
-				//未登录
-				if(this.isLogin==null){
-					uni.showModal({
-						title: '您还未登录,是否跳转登录页面?',
-						showCancel: true,
+			// 上传成功
+			success(e) {
+				console.log('上传成功')
+			},
+			// 上传失败
+			fail(e) {
+				console.log('上传失败:', e)
+			},
+			deleteFile(e) {
+				this.picUrl.splice(e.index, 1)
+			},
+			// 获取上传状态
+			select(e) {
+				console.log('选择文件:', e)
+				var _this = this
+				var i = 0
+				upload()
+
+				function upload() {
+					if (i >= e.tempFiles.length) {
+						return;
+					}
+					var item = e.tempFiles[i]
+					uni.showLoading({
+						title: "上传中",
+						mask: true
+					});
+					uni.uploadFile({
+						url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
+						filePath: item.url,
+						name: 'file',
+						formData: {
+							'fileName': item.name
+						},
+						header: {
+							'token': _this.$auth.getUserToken()
+						},
 						success: (res) => {
-							if (res.confirm) {
-								
-								uni.reLaunch({
-									url: '/pages/login/login'
+							var data = res.data
+							if (typeof data['error'] != "undefined") {
+								uni.showToast({
+									icon: 'none',
+									title: '上传失败,请联系开发!'
+								});
+								_this.$refs.picFile.clearFiles(_this.picLists.length)
+							} else {
+								_this.picUrl.push({
+									url: data,
+									uuid: item.uuid
 								})
-								
+								i++;
+								upload()
 							}
+						},
+						fail: () => {
+							uni.hideLoading();
+							uni.showToast({
+								icon: 'none',
+								title: '上传失败,请联系开发!'
+							});
+							_this.$refs.picFile.clearFiles(_this.picLists.length)
+						},
+						complete: function() {
+							uni.hideLoading();
 						}
 					});
-				}else{
-					window.location.href = 'tel:'+this.inputForm.phone;
 				}
-								
 			},
-			
-			call2(){
-				//未登录
-				if(this.isLogin==null){
-					uni.showModal({
-						title: '您还未登录,是否跳转登录页面?',
-						showCancel: true,
-						success: (res) => {
-							if (res.confirm) {
-								
-								uni.reLaunch({
-									url: '/pages/login/login'
-								})
-								
-							}
-						}
+			save(){
+				this.inputForm.des10="";
+				this.inputForm.dzfQuestionDetilDTOList=this.questionList;
+				this.checkinput();
+			},
+			formSubmit: function(e) {						
+				this.inputForm.des10="submit";
+				this.inputForm.dzfQuestionDetilDTOList=this.questionList;
+				this.checkinput();				
+			},
+			checkinput(){
+				if(this.hasDuplicateQName(this.questionList)){
+					uni.showToast({
+						icon: 'none',
+						title: '问题名称不能重复!'
 					});
 				}else{
-					window.location.href = 'tel:'+this.inputForm.bz6;
+					
+					uni.showLoading()										
+					loginService.saveQuestion(this.inputForm).then(({
+						data
+					}) => {
+						uni.hideLoading();
+						uni.showToast({
+							title: "问题诉求提交成功!",
+							icon: "success"
+						});
+						uni.navigateTo({
+							url: '/pages/question/questionList'
+						})
+					}).catch((e) => {
+						uni.hideLoading();
+					})
+										
 				}
+				
+								
 			},
+			hasDuplicateQName(array) {
+				const seen = new Set();
+				for (const item of array) {
+				  if (seen.has(item.qname)) {
+					return true; // 找到重复的 qName
+				  }
+				  seen.add(item.qname);
+				}
+				return false; // 没有重复的 qName
+			}
 			
-
-
-
-
-
 			
 		}
 	}
@@ -467,32 +469,43 @@
 	input,textarea{
 		color: #8799a3;
 	}
-	
-	.swiper {
-		width: 750rpx;
-		height: 310rpx;
+	.input1{
+		background-color: #ffffff;
+		padding: 1upx 40upx;
+		display: flex;
+		align-items: center;
+		padding-top: 20upx;
+		border-bottom: 1px solid #eee;
 	}
-	
-	.swiper-item {
-		width: 750rpx;
-		height: 310rpx;
-		background-color: aliceblue;
+	.input1 .title {
+		text-align: justify;
+		padding-right: 30upx;
+		font-size: 30upx;
+		position: relative;
+		height: 60upx;
+		line-height: 60upx;
+		border: ;
 	}
-	.show1{
-		background-color: #2752eb;
-		padding-left: 8rpx;
+	.title2{
+		width: 75%;
+		text-align: left;
+	}
+	.input2 {
+		flex: 1;
+		font-size: 30upx;
+		color: #555;
+		padding-right: 20upx;
+		width: 500rpx;
 	}
+	.uni-input{
+		
+	}
+	
 	.textbg{
 		display: flex;
 		background-color: white;
 		padding-top: 29rpx;
 	}
-	.text1{
-		width: 200rpx;
-		margin-left: 30rpx;
-		color: #333333;
-		font-size: 30rpx;
-	}
 	.text12{
 		width: 200rpx;
 		margin-left: 30rpx;
@@ -506,52 +519,12 @@
 		font-size: 30rpx;
 		padding-bottom: 2rpx;
 	}
-	
-	.text33{
-		flex: 1;
-		color: #FF4500;
-		font-size: 30rpx;
-		padding-bottom: 2rpx;
-	}
-	
-	.text44{
-		flex: 1;
-		color: #2E8B57;
-		font-size: 30rpx;
-		padding-bottom: 2rpx;
-		
-	}
-	
 	.text22{
 		flex: 1;
 		color: #666666;
 		font-size: 29rpx;
 		padding-bottom: 2rpx;
-	}
-	
-	.text221{
-		flex: 1;
-		color: #666666;
-		font-size: 29rpx;
-		padding-right:15rpx ;
-		padding-bottom: 2rpx;
-	}
-	.text3{
-		display: flex;
-		color: #000000;
-	}
-	.phone{
-		display: flex;
-		color: #1E8AD7;
-		padding-left: 5rpx;
-		padding-right: 5rpx;
-		font-size: 30rpx;
-		align-items: center
-	}
-	.phoneimg{
-		margin-left: 10rpx;
-		width: 35rpx;
-		height: 35rpx;
+		align-self: flex-end;
 	}
 	.titlebg2{
 		display: flex;
@@ -572,51 +545,40 @@
 		font-weight: 800;
 		color: #2752eb;
 	}
-	.overlay{
-	  position: fixed; /* 固定定位,覆盖整个页面 */
-	  top: 0;
-	  left: 0;
-	  width: 100%;
-	  height: 100%;
-	  background-color: rgba(255, 255, 255, 0.5); /* 半透明白色背景 */
-	  z-index: 1000; /* 确保遮罩在页面内容之上 */
-	}
-	
 	
-	.custom-header {
-	  display: flex;
-	  align-items: center;
-	  justify-content: center;
-	  padding: 10px;
-	  width: 100%;
+	.titlebb{
+		color: #000000;
+		font-weight: 800;
+		padding-left: 40rpx;
+		background-color: #ffffff;
+		padding-top: 20rpx;
+		
 	}
-	
-	.is-back {
-	  position: relative;
+	.flexC{
+		display: flex;
 	}
-	
-	.back-container {
-	  position: absolute;
-	  left: 10px;
-	  cursor: pointer;
+	.bt1{
+		flex:1;
+		margin: 30rpx;
 	}
-	
-	.back-text {
-	  color: white; /* 返回按钮文本颜色 */
+	.bt2{
+		flex:1;
+		margin: 30rpx;
 	}
 	
-	.content-container {
-	  flex: 1;
-	  text-align: center;
+	.radiog{
+		flex:1;
+		margin: 10rpx;
 	}
-	
-	.content-text {
-	  color: white; /* 标题文本颜色 */
-	  font-weight: bold;
+	.uni-list-cell{
+		display: flex;
+		
 	}
-	
-	/* 背景颜色 */
-	.bg-blue {
-	  background-color: #4285f4; /* 假设这是一个蓝色背景 */
+	.cu-form-group2{
+		background-color: #ffffff;
+		padding: 0.5px 22px;
+		display: flex;
+		align-items: center;
+		min-height: 44px;
 	}
 </style>

+ 35 - 19
jp-mobile/pages/question/questionList.vue

@@ -52,18 +52,18 @@
 						@touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index">
 						
 						
-						<view class="item-box" @click="gotoBuildInfo(item.id)">
+						<view class="item-box" @click="gotoBuildInfo(item.id,item.phone)">
 							<view class="item-title">									
-									企业名称:{{item.des5}}
+									企业名称:{{item.qyName}}
 							</view>
 							<view class="item-title">						
-									提交时间:{{item.des5}}
+									提交时间:{{item.createDate}}
 							</view>
 							<view class="item-title">
-									提交人:{{item.des5}}
+									提交人:{{item.qyFzr}}
 							</view>
 							<view class="item-title">
-									办结时间:{{item.des5}}
+									办结时间:{{item.des5||'----'}}
 							</view>
 			
 						</view>
@@ -71,7 +71,7 @@
 						
 					</view>
 				</mescroll-body>
-				<uni-fab :pattern=" {
+				<uni-fab v-if="canAdd" :pattern=" {
 								color: '#7A7E83',
 								backgroundColor: '#fff',
 								selectedColor: '#007AFF',
@@ -94,6 +94,7 @@
 </template>
 
 <script>
+	import * as $auth from "../../common/auth"
 	import loginService from "@/api/auth/loginService";
 	import uniFab from '@/components/uni-fab/uni-fab.vue';
 	import DoublePicker from '@/components/DoublePicker/DoublePicker.vue'
@@ -109,6 +110,8 @@
 		},
 		data() {
 			return {
+				canAdd:false,
+				userid:"",
 				isLogin:"",
 				pageInfo: {},
 				loginid:"",
@@ -162,17 +165,23 @@
 					this.title="问题诉求";
 					this.searchForm.des10="1";
 				}	
-			}			
+			}
+			
+			//只有企业角色才能发起问题诉求			
+			if($auth.getUserInfo().roleIds=="38a14f1f42ed424eab4cb5d489596b0d"){
+				this.canAdd	=true;
+			}
+					
+						
 		},
 		onShow() {
 			this.isLogin=this.$auth.checkisLogin();
 		},
 		
 		created() {
-			//this.getPageInfo();
-			//this.getParkList()
-			//this.getParkList2()	
-			//this.getParkList3()	
+			
+			this.userid= $auth.getUserInfo().loginName;
+
 		},
 
 
@@ -185,7 +194,7 @@
 			/*获取数据列表 */
 			upCallback(page) {
 				this.loading = true
-				loginService.enterpriseother({
+				loginService.getdzfQuestionList({
 					current: page.num,
 					size: page.size,
 					
@@ -207,20 +216,27 @@
 				})
 			},
 			
-			gotoBuildInfo(id) {
-				uni.navigateTo({
-					url: `/pages/product/productInfo?id=${id}&ischeck=1`
-				})
+			gotoBuildInfo(id,phone) {
+				//此条信息的发起人是当前账号				
+				if(phone==this.userid){
+					
+					uni.navigateTo({
+						url: `/pages/question/questionAdd?id=${id}&ischeck=1`
+					})
 				
-				//window.location.href=`/yd_qycpfbH5/#/pages/comEdit/comEdit?id=${id}&ischeck=1`
+				//此条信息是处理人	
+				}else{
+					uni.navigateTo({
+						url: `/pages/question/questionInfo?id=${id}&ischeck=1`
+					})
+				}
 				
 			},
 			
 			updateCities(newCities) {
 			      this.cities = newCities;
 			},
-			
-			
+						
 			// 搜索
 			doSearch() {