移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

459 line
15 KiB

  1. <template>
  2. <div class="app-container">
  3. <div class="header_main">
  4. 分配案件
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. </div>
  7. <div style="height: 58px;"></div>
  8. <div class="main_box">
  9. <van-cell>
  10. <template #title>
  11. <van-icon name="../../../static/images/lawEnforcement/icon/icon_zxfa.png" size="20"></van-icon>
  12. <span class="custom-title">登记<i class="bgBlue"></i></span>
  13. </template>
  14. </van-cell>
  15. <van-cell title="案件来源" :border="false" v-model="form.caseSource" />
  16. <van-cell title="关联方案" :border="false" v-model="form.scheme" />
  17. <van-cell title="案件属地" :border="false" v-model="form.deptId" />
  18. <van-cell title="执行主体" :border="false" v-model="form.belongTeam" />
  19. <van-cell title="案件名称" :border="false" v-model="form.caseName" />
  20. <van-cell title="登记日期" :border="false" v-model="form.registerDate" />
  21. <van-cell title="执法类别" :border="false" v-model="form.enforceCategory" />
  22. <van-cell title="案件简述" :border="false" v-model="form.caseDescribe" />
  23. </div>
  24. <div class="main_box" style="margin-top: 10px;">
  25. <van-collapse v-model="activeNames">
  26. <van-collapse-item name="1">
  27. <template #title>
  28. <van-icon name="../../../static/images/lawEnforcement/icon/icon_dsr.png" size="20"></van-icon>
  29. <span class="custom-title">当事人<i class="bgBlue"></i></span>
  30. </template>
  31. <van-cell title="当事人类型" :border="false" v-model="form.type" />
  32. <template v-if="form.type=='个人/个体工商户'">
  33. <van-cell title="当事人姓名" :border="false" v-model="form.name" />
  34. <van-cell title="性别" :border="false" v-model="form.sex" />
  35. <van-cell title="身份证号" :border="false" v-model="form.cardNum" />
  36. <van-cell title="出生日期" :border="false" v-model="form.birthday" />
  37. <van-cell title="民族" :border="false" v-model="form.nation" />
  38. <van-cell title="工作单位及职务" :border="false" v-model="form.companyPosition" />
  39. <van-cell title="字号名称" :border="false" v-model="form.zihao" />
  40. </template>
  41. <template v-if="form.type=='企业'">
  42. <van-cell title="企业名称" :border="false" v-model="form.companyName" />
  43. <van-cell title="法人/负责人" :border="false" v-model="form.legalName" />
  44. </template>
  45. <van-cell title="联系电话" :border="false" v-model="form.phone" />
  46. <van-cell title="联系地址" :border="false" v-model="form.address" />
  47. <van-cell title="统一社会信用代码" :border="false" v-model="form.uniformCode" />
  48. </van-collapse-item>
  49. </van-collapse>
  50. </div>
  51. <div class="main_box" style="margin-top: 10px;">
  52. <van-collapse v-model="activeNames1">
  53. <van-collapse-item name="1">
  54. <template #title>
  55. <van-icon name="../../../static/images/lawEnforcement/icon/icon_ajwd.png" size="20"></van-icon>
  56. <span class="custom-title">附件<i class="bgBlue"></i></span>
  57. </template>
  58. <div class="cf">
  59. <van-uploader v-model="form.attachementList" :show-upload="false" :deletable="false" />
  60. <van-empty v-if="form.attachement == null " description="暂无文件" />
  61. </div>
  62. </van-collapse-item>
  63. </van-collapse>
  64. </div>
  65. <div class="main_box" style="margin-top: 10px;">
  66. <van-collapse v-model="activeNames2">
  67. <van-collapse-item name="1">
  68. <template #title>
  69. <van-icon name="../../../static/images/lawEnforcement/icon/icon_zxry.png" size="20"></van-icon>
  70. <span class="custom-title">执法人员<i class="bgBlue"></i></span>
  71. </template>
  72. <div class="peopleList">
  73. <van-row class="peoplett">
  74. <van-col :span="4">序号</van-col>
  75. <van-col :span="6">执行人员</van-col>
  76. <van-col :span="10">执法证号</van-col>
  77. <van-col :span="4">带队人</van-col>
  78. </van-row>
  79. <van-row v-for="(item,index) in tEnforceCaseHandlerList" :key="index" >
  80. <van-col :span="4">{{index+1}}</van-col>
  81. <van-col :span="6">{{item.enforcerName}}</van-col>
  82. <van-col :span="10">{{item.enforcerNum}}</van-col>
  83. <van-col :span="4">
  84. <div class="icon_box">
  85. <van-checkbox v-model="item.enforcerLeader" shape="square" @change="checkBoxChange(item.enforcerLeader,index)"></van-checkbox>
  86. <van-icon name="../../../static/images/lawEnforcement/icon/icon_delete.png" size="20" @click="removePeople(index)"></van-icon>
  87. </div>
  88. </van-col>
  89. </van-row>
  90. <img src="../../../../static/images/lawEnforcement/new/addPeop_btn.png" style="margin: 0 auto;" @click="$router.push({name:'lawEnforcementCaseLawEnforcer'})">
  91. </div>
  92. </van-collapse-item>
  93. </van-collapse>
  94. </div>
  95. <p class="submitButton" @click="submitForm()">保存</p>
  96. </div>
  97. </template>
  98. <script>
  99. import { getCase , getDeptName , getSurveyByCaseId , updateSurvey , addSurvey , schemeList } from "@/api/lawEnforcement/index";
  100. import Cookies from "js-cookie";
  101. export default {
  102. name: "programmeDetail",
  103. data() {
  104. return {
  105. showBankType:false,
  106. showPayeeType:false,
  107. showPicker:false,
  108. form:{},
  109. bankType:'',
  110. payeeType:'',
  111. value:'',
  112. bankTypeOptions:[],
  113. payeeTypeOptions:[],
  114. tEnforceSchemeHandlerList:[],
  115. minDate: new Date(2020, 0, 1),
  116. maxDate: new Date(2025, 10, 1),
  117. currentDate: new Date(2021, 0, 17),
  118. activeNames: ['1'],
  119. activeNames1: ['1'],
  120. activeNames2: ['1'],
  121. caseSourceOptions:[],
  122. belongTeamOptions:[],
  123. // 查询参数
  124. queryParams: {
  125. // 分页
  126. pageNum: 1,
  127. pageSize: 10,
  128. // 查询排序
  129. orderByColumn: "id",
  130. isAsc: "desc",
  131. name: null, // 搜索参数-执行人姓名或证件号
  132. belongTeam: null, // 搜索参数-所在中队
  133. },
  134. tEnforceCaseHandlerList:[],
  135. radio:'',
  136. submitType:'',
  137. surveyId:'',
  138. sexOptions:[],
  139. nationOptions:[],
  140. };
  141. },
  142. created() {
  143. this.getDicts("case_source").then(response => {
  144. this.caseSourceOptions = response.data;
  145. });
  146. this.getDicts("team_category").then(response => {
  147. this.belongTeamOptions = response.data;
  148. });
  149. this.getDicts("enforce_body_type").then(response => {
  150. this.typeOptions = response.data;
  151. });
  152. this.getDicts("sex").then(response => {
  153. this.sexOptions = response.data;
  154. });
  155. this.getDicts("nationality").then(response => {
  156. this.nationOptions = response.data;
  157. });
  158. this.getDetail();
  159. },
  160. beforeRouteEnter (to, from, next) {
  161. /*
  162. to:获取你要跳转的路由信息
  163. from: 获取你从哪个路由来的信息
  164. next: (放行函数)
  165. // 第一种写法
  166. next(); // 直接放行
  167. // 第二种
  168. next('/url') //放行到指定的路由
  169. */
  170. next(vm => {
  171. if (from.path === '/lawEnforcement/caseAllocation'){
  172. location.reload()
  173. }
  174. })
  175. },
  176. methods: {
  177. getDetail(){
  178. getCase(this.$route.query.id).then((response) => {
  179. response.data.caseSource = response.data.caseSource == '' ? '' : this.selectDictLabel(this.caseSourceOptions, response.data.caseSource);
  180. response.data.belongTeam = response.data.belongTeam == '' ? '' : this.selectDictLabel(this.belongTeamOptions, response.data.belongTeam);
  181. response.data.type = response.data.type == '' ? '' : this.selectDictLabel(this.typeOptions, response.data.type);
  182. response.data.sex = response.data.sex == '' ? '' : this.selectDictLabel(this.sexOptions, response.data.sex);
  183. response.data.nation = response.data.nation == '' ? '' : this.selectDictLabel(this.nationOptions, response.data.nation);
  184. console.log(this.selectDictLabel(this.nationOptions, response.data.nation))
  185. if(response.data.schemeId){
  186. var schemeQueryParam = {
  187. applyStatus: "1"
  188. };
  189. schemeList(schemeQueryParam).then((responseScheme) => {
  190. response.data.scheme = responseScheme.rows.filter(function (e) { return e.id == response.data.schemeId; })[0].schemeName;
  191. });
  192. }
  193. getDeptName(response.data.deptId).then(res => {
  194. response.data.deptId = res.data.deptName
  195. });
  196. if (response.data.attachement){
  197. response.data.attachementList = [];
  198. var attachement = response.data.attachement.split( "," );
  199. attachement.forEach(responseAttach=>{
  200. response.data.attachementList.push({
  201. url:'/api' + responseAttach,
  202. isImage: true
  203. });
  204. })
  205. // process.env.VUE_APP_BASE_ROUTING_URL + process.env.VUE_APP_BASE_API
  206. }
  207. var that = this ;
  208. setTimeout(function () {
  209. that.form = response.data;
  210. },2000)
  211. });
  212. getSurveyByCaseId(this.$route.query.id).then((response) => {
  213. if(response.data != undefined){
  214. this.tEnforceCaseHandlerList = response.data.tEnforceCaseHandlerList;
  215. this.surveyId = response.data.id;
  216. this.submitType = 'update';
  217. }else{
  218. this.submitType = 'add';
  219. }
  220. });
  221. },
  222. removePeople(index){
  223. this.tEnforceCaseHandlerList.splice(index,1)
  224. },
  225. submitForm(){
  226. let surveyForm = {};
  227. surveyForm.tEnforceCaseHandlerList = this.tEnforceCaseHandlerList;
  228. surveyForm.caseId = this.$route.query.id;
  229. surveyForm.id = this.surveyId;
  230. if(this.submitType == 'update'){
  231. updateSurvey(surveyForm).then(response => {
  232. this.$notify({ type: 'success', message: '保存成功' });
  233. setTimeout(function(){
  234. history.back(-1);
  235. },2000)
  236. });
  237. }else if (this.submitType == 'add'){
  238. addSurvey(surveyForm).then(response => {
  239. this.$notify({ type: 'success', message: '保存成功' });
  240. setTimeout(function(){
  241. history.back(-1);
  242. },2000)
  243. });
  244. }
  245. },
  246. checkBoxChange(val,index){
  247. console.log(val)
  248. console.log(index)
  249. this.tEnforceCaseHandlerList[index].enforcerLeader = val ? 'Y' : ''
  250. },
  251. afterReadEvidenceForm(file){
  252. let params1 = new FormData();
  253. params1.append("file", file.file);
  254. commonUpload(params1).then((r1) => {
  255. // this.tEnforceSamplingGoodsList[index].attachement.push(r1.fileName);
  256. this.form.attachement.push(r1.fileName)
  257. })
  258. },
  259. deleteFileEvidenceForm(file,detail) {
  260. this.form.attachement.splice(detail.index,1);
  261. this.form.attachementList.splice(detail.index,1);
  262. },
  263. },
  264. watch: {
  265. $route (to, from ) {
  266. // 监听路由变化, 实现类似 小程序的 onShow 事件
  267. if (to.path === '/lawEnforcement/caseDistribution') {
  268. console.log('aaaa')
  269. // do anything you want
  270. if (Cookies.get('enforcer')){
  271. getSurveyByCaseId(this.$route.query.id).then((response) => {
  272. if(response.data != undefined){
  273. this.tEnforceCaseHandlerList = response.data.tEnforceCaseHandlerList;
  274. JSON.parse(Cookies.get('enforcer')).map((res,index)=>{
  275. let array1 = response.data.tEnforceCaseHandlerList.filter(function (e) { return e.enforcerName == res.enforcerName; });
  276. if ( array1.length < 1 ){
  277. this.tEnforceCaseHandlerList.push(res)
  278. }
  279. })
  280. }else {
  281. JSON.parse(Cookies.get('enforcer')).map((res,index)=>{
  282. let array1 = this.tEnforceCaseHandlerList.filter(function (e) { return e.enforcerName == res.enforcerName; });
  283. if ( array1.length < 1 ){
  284. this.tEnforceCaseHandlerList.push(res)
  285. }
  286. })
  287. }
  288. });
  289. }
  290. }
  291. }
  292. },
  293. }
  294. </script>
  295. <style scoped lang="scss">
  296. .app-container {
  297. padding: 2% 0;
  298. }
  299. /deep/ .van-collapse-item__content{
  300. padding: 0;
  301. }
  302. /deep/ .van-checkbox{
  303. justify-content: center;
  304. }
  305. .icon_box{
  306. display: flex;
  307. justify-content: space-around;
  308. }
  309. .cf{
  310. padding: 0 3%;
  311. margin-top: 20PX;
  312. margin-bottom: 20PX;
  313. .van-row{
  314. background: #F0F3F5;
  315. .van-col{
  316. padding: 5PX 0;
  317. font-size: 12PX!important;
  318. text-align: center;
  319. p{
  320. color: #1D6FE9;
  321. }
  322. }
  323. &:first-child{
  324. background: transparent;
  325. }
  326. }
  327. }
  328. .header_main{
  329. height: 116px;
  330. background: url('../../../../static/images/lawEnforcement/new/list_head.png') no-repeat;
  331. background-size: 100% 100%;
  332. position: fixed;
  333. top: 0;
  334. left: 0;
  335. width: 100%;
  336. font-size: 36px;
  337. line-height: 116px;
  338. text-align: center;
  339. color: #fff;
  340. z-index: 999;
  341. .return_btn{
  342. width: 24px;
  343. height: 43.2px;
  344. background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  345. background-size: 20px 36px;
  346. position: absolute;
  347. left: 38px;
  348. top: 36px;
  349. }
  350. .add_btn{
  351. width: 56.4px;
  352. height: 40.8px;
  353. background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  354. background-size: 47px 34px;
  355. position: absolute;
  356. right: 38px;
  357. top: 36px;
  358. }
  359. }
  360. /deep/ .van-radio--horizontal{
  361. margin-left: 0.32rem;
  362. margin-right: 0;
  363. }
  364. .peopleList{
  365. padding: 3%;
  366. text-align: center;
  367. .van-row{
  368. margin-bottom: 10PX;
  369. background: rgba(196,218,249,0.3);
  370. border-radius: 5PX;
  371. .van-col{
  372. text-align: center;
  373. font-size: 14PX;
  374. color: #333333;
  375. padding: 5PX 0;
  376. }
  377. }
  378. .peoplett{
  379. background: none;
  380. .van-col{
  381. padding: 0;
  382. color: #1D6FE9;
  383. }
  384. }
  385. }
  386. .main_title{
  387. font-size: 0.4rem;
  388. color: #1D6FE9;
  389. margin: 0.2rem 6%;
  390. margin-top: 0;
  391. position: relative;
  392. }
  393. .main_box{
  394. width: 96%;
  395. margin: 0 auto;
  396. border-radius: 10PX;
  397. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  398. overflow: hidden;
  399. background-color: #FFF;
  400. .van-icon{
  401. vertical-align: middle;
  402. }
  403. .custom-title{
  404. font-size: 17PX;
  405. color: #333333;
  406. vertical-align: middle;
  407. line-height: 1;
  408. position: relative;
  409. }
  410. .tap{
  411. color: #1D6FE9;
  412. }
  413. .bgBlue{
  414. display: block;
  415. position: absolute;
  416. width: 17PX;
  417. height: 17PX;
  418. border-radius: 50%;
  419. background-color: rgba(29,111,233,0.26);
  420. top: -2PX;
  421. right: -8PX;
  422. }
  423. }
  424. .submitButton{
  425. width: 45%;
  426. margin: 0 auto;
  427. background-image: linear-gradient(to right, #2E79E9 , #77A6EF);
  428. text-align: center;
  429. color: #ffffff;
  430. height: 70px;
  431. line-height: 70px;
  432. border-radius: 8PX;
  433. margin-top: 25PX;
  434. }
  435. .addFamily{
  436. position: absolute;
  437. top: -2px;
  438. right: 0;
  439. border-radius: 50%;
  440. }
  441. </style>