Browse Source

购物车

xiaoqiao 9 months ago
parent
commit
908541acbf

+ 37 - 1
src/main/java/com/bowintek/practice/controller/ApplyFormController.java

@@ -3,12 +3,15 @@ package com.bowintek.practice.controller;
 import com.alibaba.fastjson.JSONObject;
 import com.bowintek.practice.filter.exception.BaseResponse;
 import com.bowintek.practice.filter.exception.RespGenerstor;
+import com.bowintek.practice.model.CfApplyFormReviewer;
 import com.bowintek.practice.model.CfApplyFormWellFile;
 import com.bowintek.practice.services.service.AccountService;
 import com.bowintek.practice.services.service.ApplyFormService;
+import com.github.pagehelper.PageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.HashMap;
 import java.util.List;
 
 @RestController
@@ -19,13 +22,46 @@ public class ApplyFormController {
     @Autowired
     private ApplyFormService applyFormService;
 
+    @GetMapping("getApplyFormList")
+    public BaseResponse<PageInfo<HashMap<String, Object>>> getApplyFormList(@RequestParam("page") int page, @RequestParam("rows") int rows,
+                                                                            @RequestParam(required = false) String beginDate,
+                                                                            @RequestParam(required = false) String endDate) {
+        return RespGenerstor.success(applyFormService.selectApplyFormList(page, rows, accountService.getLoginUserID(), null, null, beginDate, endDate));
+    }
+
+    @GetMapping("getReviewerFormList")
+    public BaseResponse<PageInfo<HashMap<String, Object>>> getReviewerFormList(@RequestParam("page") int page, @RequestParam("rows") int rows,
+                                                                               @RequestParam(required = false) String applyUserName,
+                                                                               @RequestParam(required = false) String beginDate,
+                                                                               @RequestParam(required = false) String endDate) {
+        return RespGenerstor.success(applyFormService.selectApplyFormList(page, rows, null, applyUserName, accountService.getLoginUserID(), beginDate, endDate));
+    }
+
+    @GetMapping("getApplyFormFileList")
+    public BaseResponse<List<HashMap<String, Object>>> getApplyFormFileList(@RequestParam(required = false) String applyId) {
+        return RespGenerstor.success(applyFormService.selectApplyFormFileList(applyId,null,null));
+    }
+
     @ResponseBody
     @PostMapping("/submit")
     public BaseResponse submit(@RequestBody JSONObject reqMap) {
         int count = 0;
         try {
+            String reason = reqMap.getString("reason");
             List<CfApplyFormWellFile> docList = reqMap.getJSONArray("docList").toJavaList(CfApplyFormWellFile.class);
-            count = applyFormService.submit(docList, accountService.getLoginUserID(), accountService.getUserByUserID(accountService.getLoginUserID()).name);
+            count = applyFormService.submit(reason, docList, accountService.getLoginUserID(), accountService.getUserByUserID(accountService.getLoginUserID()).name);
+        } catch (Exception e) {
+            return RespGenerstor.fail("-1", "程序异常:" + e.getMessage());
+        }
+        return RespGenerstor.success(count);
+    }
+
+    @ResponseBody
+    @PostMapping("/approve")
+    public BaseResponse approve(@RequestBody CfApplyFormReviewer reviewer) {
+        int count = 0;
+        try {
+            count = applyFormService.approve(reviewer, accountService.getLoginUserID());
         } catch (Exception e) {
             return RespGenerstor.fail("-1", "程序异常:" + e.getMessage());
         }

+ 38 - 6
src/main/java/com/bowintek/practice/controller/WellInfoController.java

@@ -10,6 +10,7 @@ import com.bowintek.practice.filter.exception.BaseResponse;
 import com.bowintek.practice.filter.exception.RespGenerstor;
 import com.bowintek.practice.model.WlUserExpendSetting;
 import com.bowintek.practice.services.service.AccountService;
+import com.bowintek.practice.services.service.ApplyFormService;
 import com.bowintek.practice.services.service.OrganizationService;
 import com.bowintek.practice.services.service.WellInfoService;
 import com.bowintek.practice.util.RemoteHelper;
@@ -47,6 +48,8 @@ public class WellInfoController {
     @Autowired
     private AccountService accountService;
     @Autowired
+    private ApplyFormService applyFormService;
+    @Autowired
     private RemoteHelper remoteHelper;
     @Autowired
     private AppConfig appConfig;
@@ -74,11 +77,13 @@ public class WellInfoController {
     public BaseResponse getOrganizationTree() {
         return RespGenerstor.success(organizationService.getListTree("HBlQAIBGob"));
     }
+
     @GetMapping("/getWellBaseInfo")
     public BaseResponse getWellBaseInfo(String well_id) {
         HashMap<String, Object> wellInfo = wellInfoService.getWellInfo(well_id);
         return RespGenerstor.success(wellInfo);
     }
+
     @GetMapping("/getWellInfo")
     public BaseResponse getWellInfo(String well_id) {
 
@@ -92,6 +97,16 @@ public class WellInfoController {
         HashMap<String, Object> lastHistoryAssignment = wellInfoService.getLastHistoryAssignment(well_id);
         List<HashMap<String, Object>> dataIndexList = wellInfoService.selectDataIndexList(well_id);
 
+        List<HashMap<String, Object>> userApplyFileList = applyFormService.selectApplyFormFileList(null, null, accountService.getLoginUserID());
+        dataIndexList.forEach(data -> {
+            boolean isApply = userApplyFileList.stream().filter(uf -> uf.get("well_common_name").toString().equals(data.get("well_common_name").toString())
+                    && uf.get("file_name").toString().equals(data.get("file_name").toString())).count() > 0;
+            data.put("isApply", isApply);
+
+            boolean isDown = userApplyFileList.stream().filter(uf -> Integer.parseInt(uf.get("status").toString()) == 2 && uf.get("well_common_name").toString().equals(data.get("well_common_name").toString())
+                    && uf.get("file_name").toString().equals(data.get("file_name").toString())).count() > 0;
+            data.put("isDown", isDown);
+        });
         HashMap<String, Object> result = new HashMap<>();
         result.put("dataModel", wellInfo);
         result.put("boreholeInterList", boreholeInterList);//业务解释列表
@@ -106,19 +121,21 @@ public class WellInfoController {
         result.put("dataIndexList", dataIndexList);
         return RespGenerstor.success(result);
     }
+
     @ResponseBody
     @GetMapping("/getTestHistoryList")
     public BaseResponse<PageInfo<HashMap<String, Object>>> getTestHistoryList(@RequestParam("page") int page, @RequestParam("rows") int rows,
-                                                                             String well_id) throws Exception {
+                                                                              String well_id) throws Exception {
 
         PageInfo<HashMap<String, Object>> result = wellInfoService.selectTestHistoryList(page, rows, well_id);
 
         return RespGenerstor.success(result);
     }
+
     @ResponseBody
     @GetMapping("/getAnalyticalAssaysList")
     public BaseResponse<PageInfo<HashMap<String, Object>>> getAnalyticalAssaysList(@RequestParam("page") int page, @RequestParam("rows") int rows,
-                                                                              String well_id) throws Exception {
+                                                                                   String well_id) throws Exception {
 
         PageInfo<HashMap<String, Object>> result = wellInfoService.selectAnalyticalAssaysList(page, rows, well_id);
 
@@ -146,6 +163,16 @@ public class WellInfoController {
     @GetMapping("/getWellDocumentList")
     public BaseResponse getWellDocumentList(String wellId) {
         List<HashMap<String, Object>> dataIndexList = wellInfoService.selectDataIndexList(wellId);
+        List<HashMap<String, Object>> userApplyFileList = applyFormService.selectApplyFormFileList(null, null, accountService.getLoginUserID());
+        dataIndexList.forEach(data -> {
+            boolean isApply = userApplyFileList.stream().filter(uf -> uf.get("well_common_name").toString().equals(data.get("well_common_name").toString())
+                    && uf.get("file_name").toString().equals(data.get("file_name").toString())).count() > 0;
+            data.put("isApply", isApply);
+
+            boolean isDown = userApplyFileList.stream().filter(uf -> Integer.parseInt(uf.get("status").toString()) == 2 && uf.get("well_common_name").toString().equals(data.get("well_common_name").toString())
+                    && uf.get("file_name").toString().equals(data.get("file_name").toString())).count() > 0;
+            data.put("isDown", isDown);
+        });
         return RespGenerstor.success(dataIndexList);
     }
 
@@ -158,6 +185,7 @@ public class WellInfoController {
     public BaseResponse getWellPurposeTree() {
         return RespGenerstor.success(wellInfoService.getWellPurposeTree());
     }
+
     @GetMapping("/getWellTypeTree")
     public BaseResponse getWellTypeTree() {
         return RespGenerstor.success(wellInfoService.getWellTypeTree());
@@ -199,15 +227,16 @@ public class WellInfoController {
             os.close();
         }
     }
+
     private byte[] doc2Docx(byte[] bytes) {
         long old = System.currentTimeMillis();
         ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
         try {
-            com.aspose.words.License aposeLic = new  com.aspose.words.License();
+            com.aspose.words.License aposeLic = new com.aspose.words.License();
             InputStream license = ClassLoader.getSystemClassLoader().getResourceAsStream("license.xml");
             aposeLic.setLicense(license);
 
-            com.aspose.words.Document  wb = new  com.aspose.words.Document(new ByteArrayInputStream(bytes));
+            com.aspose.words.Document wb = new com.aspose.words.Document(new ByteArrayInputStream(bytes));
 
             wb.save(outputStream, SaveFormat.DOCX);
             bytes = outputStream.toByteArray();
@@ -222,11 +251,13 @@ public class WellInfoController {
                     outputStream.close();
                 } catch (Exception e) {
                     e.printStackTrace();
-                } ;
+                }
+                ;
             }
         }
         return bytes;
     }
+
     private byte[] xls2pdf(byte[] bytes) {
         long old = System.currentTimeMillis();
         ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
@@ -254,7 +285,8 @@ public class WellInfoController {
                     outputStream.close();
                 } catch (Exception e) {
                     e.printStackTrace();
-                } ;
+                }
+                ;
             }
         }
         return bytes;

+ 14 - 0
src/main/java/com/bowintek/practice/mapper/cquery/ApplyFormCQuery.java

@@ -0,0 +1,14 @@
+package com.bowintek.practice.mapper.cquery;
+
+import org.apache.ibatis.annotations.Param;
+
+import java.util.HashMap;
+import java.util.List;
+
+public interface ApplyFormCQuery {
+
+    List<HashMap<String,Object>> selectApplyFormList(@Param("applyUserId") String applyUserId, @Param("applyUserName") String applyUserName,@Param("reviewerUserId") String reviewerUserId,
+                                      @Param("beginDate") String beginDate, @Param("endDate") String endDate);
+
+    List<HashMap<String,Object>> selectApplyFormFileList( String applyId, Integer status,String applyUserId);
+}

+ 44 - 6
src/main/java/com/bowintek/practice/services/impl/ApplyFormServiceImpl.java

@@ -3,24 +3,32 @@ package com.bowintek.practice.services.impl;
 import com.bowintek.practice.mapper.CfApplyFormMapper;
 import com.bowintek.practice.mapper.CfApplyFormReviewerMapper;
 import com.bowintek.practice.mapper.CfApplyFormWellFileMapper;
+import com.bowintek.practice.mapper.cquery.ApplyFormCQuery;
 import com.bowintek.practice.model.CfApplyForm;
 import com.bowintek.practice.model.CfApplyFormReviewer;
+import com.bowintek.practice.model.CfApplyFormReviewerExample;
 import com.bowintek.practice.model.CfApplyFormWellFile;
 import com.bowintek.practice.services.service.ApplyFormService;
 import com.bowintek.practice.services.service.system.RoleService;
+import com.bowintek.practice.vo.system.AnnouncementModel;
 import com.bowintek.practice.vo.user.UserInfoModel;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 import java.util.UUID;
 
 @Component
 public class ApplyFormServiceImpl implements ApplyFormService {
 
+    @Autowired
+    private ApplyFormCQuery applyFormCQuery;
     @Autowired
     private CfApplyFormMapper applyFormMapper;
     @Autowired
@@ -30,32 +38,62 @@ public class ApplyFormServiceImpl implements ApplyFormService {
     @Autowired
     private RoleService roleService;
 
+    @Override
+    public PageInfo<HashMap<String, Object>> selectApplyFormList(int page, int rows, String userID, String applyUserName, String reviewerUserId, String beginDate, String endDate) {
+        PageHelper.startPage(page, rows);
+
+        List<HashMap<String, Object>> dataList = applyFormCQuery.selectApplyFormList(userID, applyUserName, reviewerUserId, beginDate, endDate);
+
+        PageInfo<HashMap<String, Object>> result = new PageInfo(dataList);
+        return result;
+    }
+
     @Override
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
-    public int submit( List<CfApplyFormWellFile> docList,String userId,String userName){
-        CfApplyForm applyForm=new CfApplyForm();
+    public int submit(String reason, List<CfApplyFormWellFile> docList, String userId, String userName) {
+        CfApplyForm applyForm = new CfApplyForm();
         applyForm.setApplyId(UUID.randomUUID().toString());
         applyForm.setApplyDate(new Date());
         applyForm.setStatus(1);
         applyForm.setApplyUserId(userId);
         applyForm.setApplyUserName(userName);
+        applyForm.setReason(reason);
         applyFormMapper.insert(applyForm);
 
-        docList.forEach(file->{
+        docList.forEach(file -> {
             file.setWellFileId(UUID.randomUUID().toString());
             file.setApplyId(applyForm.getApplyId());
             wellFileMapper.insert(file);
         });
 
         List<UserInfoModel> roleUserList = roleService.selectRoleUserByRolename(new String[]{"文件管理员"});
-        roleUserList.forEach(user->{
-            CfApplyFormReviewer reviewer=new CfApplyFormReviewer();
+        roleUserList.forEach(user -> {
+            CfApplyFormReviewer reviewer = new CfApplyFormReviewer();
             reviewer.setReviewerId(UUID.randomUUID().toString());
             reviewer.setApplyId(applyForm.getApplyId());
             reviewer.setReviewerUserId(user.userId);
             reviewer.setReviewerUserName(user.userName);
             reviewerMapper.insert(reviewer);
         });
-        return  1;
+        return 1;
+    }
+
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
+    public int approve(CfApplyFormReviewer reviewer, String userId) {
+        CfApplyFormReviewerExample example = new CfApplyFormReviewerExample();
+        example.or().andApplyIdEqualTo(reviewer.getApplyId()).andReviewerUserIdEqualTo(userId);
+        reviewerMapper.updateByExampleSelective(reviewer, example);
+
+        CfApplyForm applyForm = new CfApplyForm();
+        applyForm.setApplyId(reviewer.getApplyId());
+        applyForm.setStatus(reviewer.getReviewerAction() == 1 ? 2 : 3);
+        applyFormMapper.updateByPrimaryKeySelective(applyForm);
+        return 1;
+    }
+    @Override
+    public List<HashMap<String, Object>> selectApplyFormFileList( String applyId,Integer status,String applyUserId) {
+        List<HashMap<String, Object>> dataList = applyFormCQuery.selectApplyFormFileList(applyId,status,applyUserId);
+        return dataList;
     }
 }

+ 3 - 2
src/main/java/com/bowintek/practice/services/impl/system/RoleServiceImpl.java

@@ -151,8 +151,9 @@ public class RoleServiceImpl implements RoleService {
     public Integer saveRoleUser(String roleID, List<String> userIdList) {
         Integer result = 0;
 
-        deleteRoleUser(roleID, userIdList);
-
+        if(userIdList.size()>0) {
+            deleteRoleUser(roleID, userIdList);
+        }
         result += (userIdList.size() > 0 ? roleCQuery.batchInsertRoleUser(userIdList, roleID) : 0);
         return result;
 

+ 8 - 1
src/main/java/com/bowintek/practice/services/service/ApplyFormService.java

@@ -1,9 +1,16 @@
 package com.bowintek.practice.services.service;
 
+import com.bowintek.practice.model.CfApplyFormReviewer;
 import com.bowintek.practice.model.CfApplyFormWellFile;
+import com.github.pagehelper.PageInfo;
 
+import java.util.HashMap;
 import java.util.List;
 
 public interface ApplyFormService {
-    int submit(List<CfApplyFormWellFile> docList, String userId, String userName);
+    PageInfo<HashMap<String, Object>> selectApplyFormList(int page, int rows, String userID,String applyUserName,
+                                                          String reviewerUserId, String beginDate, String endDate);
+    int submit(String reason,List<CfApplyFormWellFile> docList, String userId, String userName);
+    int approve(CfApplyFormReviewer reviewer, String userId);
+    List<HashMap<String, Object>> selectApplyFormFileList( String applyId,Integer status,String applyUserId);
 }

+ 42 - 0
src/main/resources/mapping/cquery/ApplyFormCQuery.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.bowintek.practice.mapper.cquery.ApplyFormCQuery">
+
+    <select id="selectApplyFormList" resultType="java.util.HashMap">
+        select caf.*,dic.Name as statusName from cf_apply_form caf
+        inner join sys_dictionary_item dic on caf.status=dic.Value and dic.DictionaryCode='applyFormStatus'
+        where 1=1
+        <if test="applyUserId!='' and applyUserId!=null">
+           and applyUserId=#{applyUserId}
+        </if>
+        <if test="applyUserName!='' and applyUserName!=null">
+            and  applyUserName=#{applyUserName}
+        </if>
+        <if test="reviewerUserId!='' and reviewerUserId!=null">
+            and #{reviewerUserId} in (select reviewerUserId from cf_apply_form_reviewer  cfr where caf.applyId=cfr.applyId)
+        </if>
+        <if test="beginDate!='' and beginDate!=null">
+            and applyDate <![CDATA[ >= ]]> STR_TO_DATE(#{beginDate},'%Y-%m-%d')
+        </if>
+        <if test="endDate!='' and endDate!=null">
+            and applyDate  <![CDATA[ < ]]> DATE_ADD(STR_TO_DATE(#{endDate},'%Y-%m-%d'),interval  1 day)
+        </if>
+        order by applyDate desc
+    </select>
+
+    <select id="selectApplyFormFileList" resultType="java.util.HashMap">
+        select wf.*,caf.status from cf_apply_form_well_file wf
+        inner join cf_apply_form caf on wf.applyId = caf.applyId
+        where 1=1
+        <if test="applyId!='' and applyId!=null">
+            and wf.applyId=#{applyId}
+        </if>
+        <if test="status!='' and status!=null">
+            and caf.status=#{status}
+        </if>
+        <if test="applyUserId!='' and applyUserId!=null">
+            and caf.applyUserId=#{applyUserId}
+        </if>
+        order by wf.well_common_name
+    </select>
+</mapper>

+ 1 - 1
src/main/resources/mapping/cquery/RoleCQuery.xml

@@ -105,7 +105,7 @@
         select u.userId,u.name,u.loginId,u.userId as 'key'
         from sys_user u
          left join sys_user_sys_role ur on u.userId = ur.userId and ur.roleID=#{roleID}
-        where 1=1 and u.UserTypeID = #{userType} and ur.roleID is null
+        where 1=1  and ur.roleID is null
     </select>
     <select id="selectRoleUserByRolename" resultType="com.bowintek.practice.vo.user.UserInfoModel">
         select u.userId,u.name,u.loginId

BIN
target/classes/com/bowintek/practice/services/impl/system/RoleServiceImpl.class


+ 1 - 1
target/classes/mapping/cquery/RoleCQuery.xml

@@ -105,7 +105,7 @@
         select u.userId,u.name,u.loginId,u.userId as 'key'
         from sys_user u
          left join sys_user_sys_role ur on u.userId = ur.userId and ur.roleID=#{roleID}
-        where 1=1 and u.UserTypeID = #{userType} and ur.roleID is null
+        where 1=1  and ur.roleID is null
     </select>
     <select id="selectRoleUserByRolename" resultType="com.bowintek.practice.vo.user.UserInfoModel">
         select u.userId,u.name,u.loginId

+ 30 - 42
vue/src/layout/header/index.vue

@@ -1,44 +1,27 @@
 <template>
-  <Layout.Header :style="headerStyle" class="layout-header">
-    <Space :size="30">
-      <img style="height: 52px;" src="~@/assets/images/logo-login.png" alt=""/>
-      <span style="font-size: 30px;margin-left:-10px;">华北油田智能检索</span>
-    </Space>
-    <Space :size="20">
-      <!--      <Search />-->
-      <Tooltip title="修改密码" placement="bottom" v-if="isDev">
-        <LockOutlined @click="updatePassword()"/>
-        <UpdatePassword ref="updatePasswordRef"></UpdatePassword>
-      </Tooltip>
-      <FullScreen/>
-      <Tooltip title="退出系统" placement="bottom" v-if="isDev">
-        <PoweroffOutlined @click.prevent="doLogout"/>
-      </Tooltip>
-      <LocalePicker/>
-
-      <!--
-      <Dropdown placement="bottomRight">
-        <Avatar :src="userInfo.headImg" :alt="userInfo.name">{{ userInfo.name }}</Avatar>
-        <template #overlay>
-          <Menu>
-            <Menu.Item @click="$router.push({ name: 'account-about' })">
-              {{ $t('routes.account.about') }}
-            </Menu.Item>
-            <Menu.Item @click="$router.push({ name: 'account-settings' })">
-              {{ $t('routes.account.settings') }}
-            </Menu.Item>
-            <Menu.Divider />
-            <Menu.Item>
-              <div @click.prevent="doLogout">
-                <poweroff-outlined /> {{ $t('layout.header.dropdownItemLoginOut') }}
-              </div>
-            </Menu.Item>
-          </Menu>
-        </template>
-      </Dropdown> -->
-      <!--      <ProjectSetting />-->
-    </Space>
-  </Layout.Header>
+  <div>
+    <Layout.Header :style="headerStyle" class="layout-header">
+      <Space :size="30">
+        <img style="height: 52px;" src="~@/assets/images/logo-login.png" alt=""/>
+        <span style="font-size: 30px;margin-left:-10px;">华北油田智能检索</span>
+      </Space>
+      <Space :size="20">
+        <!--      <Search />-->
+        <shopping-cart-outlined @click="onShowCart" title="购物车"
+                                :style="{fontSize: '25px', color: 'red',display:'contents'}"/>
+        <Tooltip title="修改密码" placement="bottom" v-if="isDev">
+          <LockOutlined @click="updatePassword()"/>
+          <UpdatePassword ref="updatePasswordRef"></UpdatePassword>
+        </Tooltip>
+        <FullScreen/>
+        <Tooltip title="退出系统" placement="bottom" v-if="isDev">
+          <PoweroffOutlined @click.prevent="doLogout"/>
+        </Tooltip>
+        <LocalePicker/>
+      </Space>
+    </Layout.Header>
+    <ShoppingcartModal ref="shoppingCartModalRef"></ShoppingcartModal>
+  </div>
 </template>
 
 <script lang="tsx" setup>
@@ -66,8 +49,9 @@ import {useKeepAliveStore} from '@/store/modules/keepAlive';
 /*import {useLockscreenStore} from '@/store/modules/lockscreen';*/
 import {LOGIN_NAME} from '@/router/constant';
 import {useThemeStore} from '@/store/modules/projectConfig';
-import UpdatePassword from'@/views/system/users/updatePassword.vue';
+import UpdatePassword from '@/views/system/users/updatePassword.vue';
 import {getConfig} from "@/utils/config";
+import ShoppingcartModal from '@/views/wellinfo/shoppingcart.vue';
 
 defineProps({
   collapsed: {
@@ -96,6 +80,7 @@ const headerStyle = computed<CSSProperties>(() => {
 });
 
 const updatePasswordRef = ref();
+const shoppingCartModalRef = ref();
 
 const isDev = ref(false);
 
@@ -125,9 +110,12 @@ const doLogout = () => {
 };
 
 const updatePassword = () => {
-  updatePasswordRef.value.show(userInfo.value.userId,userInfo.value.userName,userInfo.value.loginId);
+  updatePasswordRef.value.show(userInfo.value.userId, userInfo.value.userName, userInfo.value.loginId);
 };
 
+const onShowCart = () => {
+  shoppingCartModalRef.value.show();
+}
 onMounted(() => {
   getConfig().then((res: any) => {
     isDev.value = res.isDev;

+ 2 - 0
vue/src/router/asyncModules/sale.ts

@@ -14,4 +14,6 @@ export default {
   'views/esindexlist': () => import( '@/views/esindex/index.vue'),
   'views/esindexedit': () => import( '@/views/esindex/edit.vue'),
   'views/esindexdetail': () => import( '@/views/esindex/detail.vue'),
+  'views/reviewerList': () => import( '@/views/applyform/reviewer.vue'),
+  'views/applyList': () => import( '@/views/applyform/apply.vue'),
 }

+ 200 - 0
vue/src/views/applyform/apply.vue

@@ -0,0 +1,200 @@
+<template>
+  <div class="card-search">
+    <a-form
+      ref="formRef"
+      name="advanced_search"
+      class="ant-advanced-search-form"
+      :model="formState"
+      @finish="onFinish"
+    >
+      <a-row :gutter="24">
+        <a-col :span="6">
+          <a-form-item
+            name="studentCode"
+            label="申请人"
+            :label-col="{span:6}">
+            <a-input v-model:value="formState.applyUserName" style="width: 200px"></a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="申请时间区间" :label-col="{span:8}" name="name">
+            <a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']" @change="onRangeChange"/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6" style="text-align: left">
+          <a-button type="primary" html-type="submit" @click="onFinish">查询</a-button>
+          <a-button style="margin: 0 8px" @click="() => {formRef.resetFields();loadData()}">重置</a-button>
+        </a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="24" style="text-align: right">
+        </a-col>
+      </a-row>
+    </a-form>
+    <div class="search-result-list">
+      <a-table :columns="columns" :data-source="data" :pagination="pagination"
+               :loading="loading"
+               :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+               @change="handleTableChange" :row-key="record=>record.applyId"
+               bordered>
+        <template #bodyCell="{ column,record }">
+          <template v-if="column.key === 'operation'">
+            <a-button type="link" size="small" @click="showFile(record.applyId)">查看文件
+            </a-button>
+          </template>
+        </template>
+      </a-table>
+    </div>
+    <a-modal style="width:700px;"  :footer="null" v-model:visible="visible" title="查看文件">
+      <div style="overflow: auto;height: 500px;">
+        <a-list item-layout="horizontal" :data-source="docList">
+          <template #renderItem="{ item,index }">
+            <a-list-item>
+              <template #actions>
+                <filePreview :fileName="item.file_name" :filePath="item.storage_path"></filePreview>
+                <a-button type="link" @click="downFile(item)" v-if="item.status==2" danger>下载</a-button>
+              </template>
+              <a-list-item-meta
+                :description="item.file_business_type">
+                <template #title>
+                  {{ item.file_name }}
+                </template>
+                <template #avatar>
+                  <img src="~@/assets/images/file.png"/>
+                </template>
+              </a-list-item-meta>
+              <div>{{item.well_common_name}}</div>
+            </a-list-item>
+          </template>
+        </a-list>
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script lang="ts">
+import {reactive, ref, defineComponent, computed} from 'vue';
+import type {FormInstance} from 'ant-design-vue';
+import type {TableColumnsType, TableProps} from 'ant-design-vue';
+import {get} from '@/api/common';
+import dayjs from "dayjs";
+import {DownOutlined, UpOutlined} from "@ant-design/icons-vue";
+import {getPaginationTotalTitle} from "@/utils/common";
+import filePreview from '@/components/basic/file-preview/index.vue'
+import {download} from "@/utils/downloadFile";
+
+export default defineComponent({
+  name: 'applyformList',
+  components: {DownOutlined, UpOutlined, filePreview},
+  setup() {
+
+    const expand = ref(false);
+    const formRef = ref<FormInstance>();
+    const selectedRowKeys = ref([]);
+    const visible = ref(false);
+    const docList = ref([]);
+
+    const formState = reactive({
+      page: 1, rows: 10, endDate: '',
+      beginDate: '',
+      applyUserName: '', total: 0,
+    });
+
+    const columns: TableColumnsType = [
+      {
+        title: '序号',
+        width: 80,
+        dataIndex: 'index',
+        key: 'index',
+        align: "center",
+        customRender: ({index}) => {
+          return `${index + 1}`;
+        }
+      },
+      {title: '申请人', dataIndex: 'applyUserName', width: 100, key: '1',},
+      {
+        title: '申请时间',
+        dataIndex: 'applyDate',
+        width: 200,
+        align: "center",
+        key: 'applyDate',
+        customRender: ({record}) => dayjs(record.startTime).format('YYYY-MM-DD')
+      },
+      {title: '申请原因', dataIndex: 'reason', key: '1', align: "center"},
+      {title: '状态', dataIndex: 'statusName', key: '1', align: "center"},
+      {
+        title: '操作', key: 'operation', width: 60, align: "center"
+      },
+    ];
+    const onRangeChange = (dateString) => {
+      formState.beginDate = dateString ? dateString[0].format("YYYY-MM-DD") : '';
+      formState.endDate = dateString ? dateString[1].format("YYYY-MM-DD") : '';
+      loadData();
+    };
+    const data = ref([]);
+    const pagination = computed(() => ({
+      total: formState.total,
+      current: formState.page,
+      pageSize: formState.rows,
+      showSizeChanger: true,
+      showTotal: total => getPaginationTotalTitle(total)
+    }));
+    const loading = ref(false);
+
+    const handleTableChange: TableProps['onChange'] = (
+      pag: { pageSize: number; current: number },
+    ) => {
+      formState.page = pag.current;
+      formState.rows = pag.pageSize;
+      loadData();
+    };
+
+    const onFinish = () => {
+      loadData();
+    }
+
+    const loadData = async function () {
+      loading.value = true;
+      const result: any = await get('applyForm/getApplyFormList', formState);
+
+      data.value = result.list;
+      formState.total = result.total;
+      loading.value = false;
+    }
+
+    const dicModalClosed = (d) => {
+      if (d) {
+        loadData();
+      }
+    }
+    const showFile = async (applyId) => {
+      visible.value = true;
+      const result: any = await get('applyForm/getApplyFormFileList', {applyId: applyId});
+      docList.value = result;
+    };
+
+    const onSelectChange = (keys: any) => {
+      selectedRowKeys.value = keys;
+    };
+    const downFile = (record: any) => {
+      download(record.storage_path, record.file_name);
+    };
+    return {
+      formRef,
+      expand,
+      data,
+      loadData, loading, selectedRowKeys,
+      onSelectChange, onRangeChange,
+      formState,
+      columns, visible,
+      pagination, docList,
+      showFile, dicModalClosed,
+      handleTableChange,
+      onFinish, downFile
+    };
+  },
+  created() {
+    this.loadData();
+  }
+});
+</script>

+ 88 - 0
vue/src/views/applyform/approve.vue

@@ -0,0 +1,88 @@
+<template>
+  <a-modal
+    :title="'文件下载审批'"
+    :width="500"
+    :visible="visible"
+    :ok-text="'提交'"
+    :cancel-text="'取消'"
+    @cancel="close()"
+    @ok="submitForm()"
+    :closable="true"
+    wrapClassName="ant-modal-cust-warp">
+    <a-form autocomplete="off" ref="formRef" :model="dataModel">
+      <a-divider orientation="left">审批处理方式</a-divider>
+      <a-form-item name="reviewerAction" :rules="[{ required: true, message: '请选择处理方式' }]">
+        <a-radio-group :options="actionOptions" v-model:value="dataModel.reviewerAction"></a-radio-group>
+      </a-form-item>
+      <a-divider orientation="left">审批理由</a-divider>
+      <a-form-item name="comments"
+                   :rules="[{ required: true, message: '请填写审批理由' }]">
+        <a-textarea :auto-size="{ minRows: 4, maxRows: 6 }" v-model:value="dataModel.comments" placeholder=""/>
+      </a-form-item>
+    </a-form>
+  </a-modal>
+</template>
+<script lang="ts">
+import {defineComponent, ref} from "vue";
+import {Modal, type FormInstance, type RadioGroupProps} from "ant-design-vue";
+import {ACTION_OK} from "@/api/system/approve";
+import {save} from "@/api/common";
+
+export default defineComponent({
+  name: 'approve',
+  emits: [
+    "update:options", "close", "ok"
+  ],
+  props: {
+    loadData: {
+      type: Function,
+      default: null
+    }
+  },
+  setup(props) {
+    const formRef = ref<FormInstance>();
+    const actionOptions = ref<Required<RadioGroupProps['options']>>([{label: '通过', value: 1}, {
+      label: '驳回',
+      value: 3
+    }]);
+    const visible = ref(false);
+
+    const dataModel = ref({comments: '', applyId: '', reviewerAction: ACTION_OK})
+
+    const submitForm = () => {
+      formRef.value?.validate().then(() => {
+        save('applyForm/approve', dataModel.value).then(data => {
+          if (data) {
+            Modal.info({
+              title: '提示',
+              content: '提交成功',
+              onOk() {
+                close();
+              }
+            });
+          }
+        });
+      });
+    };
+    const close = () => {
+      formRef.value?.clearValidate();
+      visible.value = false;
+      dataModel.value.comments = "";
+      dataModel.value.reviewerAction = ACTION_OK;
+      props.loadData();
+    };
+    const show = (key) => {
+      dataModel.value.applyId = key;
+      visible.value = true;
+    };
+
+    return {
+      close,formRef,
+      submitForm,
+      actionOptions,
+      dataModel, visible, show,
+    };
+  },
+})
+</script>
+

+ 211 - 0
vue/src/views/applyform/reviewer.vue

@@ -0,0 +1,211 @@
+<template>
+  <div class="card-search">
+    <a-form
+      ref="formRef"
+      name="advanced_search"
+      class="ant-advanced-search-form"
+      :model="formState"
+      @finish="onFinish"
+    >
+      <a-row :gutter="24">
+        <a-col :span="6">
+          <a-form-item
+            name="applyUserName"
+            label="申请人"
+            :label-col="{span:6}">
+            <a-input v-model:value="formState.applyUserName" style="width: 200px"></a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="开始结束区间" :label-col="{span:8}" name="name">
+            <a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']" @change="onRangeChange"/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6" style="text-align: left">
+          <a-button type="primary" html-type="submit" @click="onFinish">查询</a-button>
+          <a-button style="margin: 0 8px" @click="() => {formRef.resetFields();loadData()}">重置</a-button>
+        </a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="24" style="text-align: right">
+        </a-col>
+      </a-row>
+    </a-form>
+    <div class="search-result-list">
+      <a-table :columns="columns" :data-source="data" :pagination="pagination"
+               :loading="loading"
+               :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+               @change="handleTableChange" :row-key="record=>record.applyId"
+               bordered>
+        <template #bodyCell="{ column,record }">
+          <template v-if="column.key === 'operation'">
+            <a-button type="link" size="small" @click="approve(record)" v-if="record.status==1">处理
+            </a-button>
+          </template>
+          <template v-if="column.key === 'files'">
+            <a-button type="link" size="small" @click="showFile(record.applyId)">查看
+            </a-button>
+          </template>
+        </template>
+      </a-table>
+    </div>
+    <a-modal style="width:700px;"  :footer="null" v-model:visible="visible" title="查看文件">
+      <div style="overflow: auto;height: 500px;">
+        <a-list item-layout="horizontal" :data-source="docList">
+          <template #renderItem="{ item,index }">
+            <a-list-item>
+              <template #actions>
+                <filePreview :fileName="item.file_name" :filePath="item.storage_path"></filePreview>
+                <a-button type="link" @click="downFile(item)" danger>下载</a-button>
+              </template>
+              <a-list-item-meta
+                :description="item.file_business_type">
+                <template #title>
+                  {{ item.file_name }}
+                </template>
+                <template #avatar>
+                  <img src="~@/assets/images/file.png"/>
+                </template>
+              </a-list-item-meta>
+              <div>{{item.well_common_name}}</div>
+            </a-list-item>
+          </template>
+        </a-list>
+      </div>
+    </a-modal>
+    <approveModal ref="modalRef" :loadData="loadData"></approveModal>
+  </div>
+</template>
+
+<script lang="ts">
+import {reactive, ref, defineComponent, computed} from 'vue';
+import type {FormInstance} from 'ant-design-vue';
+import type {TableColumnsType, TableProps} from 'ant-design-vue';
+import {get} from '@/api/common';
+import dayjs from "dayjs";
+import approveModal from './approve.vue';
+import {DownOutlined, UpOutlined} from "@ant-design/icons-vue";
+import {getPaginationTotalTitle} from "@/utils/common";
+import {download} from "@/utils/downloadFile";
+import filePreview from '@/components/basic/file-preview/index.vue'
+
+export default defineComponent({
+  name: 'reviewerList',
+  components: {DownOutlined, UpOutlined, approveModal,filePreview},
+  setup() {
+
+    const expand = ref(false);
+    const formRef = ref<FormInstance>();
+    const selectedRowKeys = ref([]);
+    const modalRef = ref();
+    const visible = ref(false);
+    const docList = ref([]);
+
+    const formState = reactive({
+      page: 1, rows: 10, endDate: '',
+      beginDate: '',
+      applyUserName: '', total: 0,
+    });
+
+    const columns: TableColumnsType = [
+      {
+        title: '序号',
+        width: 80,
+        dataIndex: 'index',
+        key: 'index',
+        align: "center",
+        customRender: ({index}) => {
+          return `${index + 1}`;
+        }
+      },
+      {title: '申请人', dataIndex: 'applyUserName', width: 100, key: '1',},
+      {
+        title: '申请时间',
+        dataIndex: 'applyDate',
+        width: 200,
+        align: "center",
+        key: 'applyDate',
+        customRender: ({record}) => dayjs(record.startTime).format('YYYY-MM-DD')
+      },
+      {title: '申请原因', dataIndex: 'reason', key: '1', align: "center"},
+      {title: '状态', dataIndex: 'statusName', key: '1', align: "center"},
+      {title: '申请文件', key: 'files', width: 80, align: "center"},
+      {
+        title: '操作', key: 'operation', width: 60, align: "center"
+      },
+    ];
+    const onRangeChange = (dateString) => {
+      formState.beginDate = dateString ? dateString[0].format("YYYY-MM-DD") : '';
+      formState.endDate = dateString ? dateString[1].format("YYYY-MM-DD") : '';
+      loadData();
+    };
+    const data = ref([]);
+    const pagination = computed(() => ({
+      total: formState.total,
+      current: formState.page,
+      pageSize: formState.rows,
+      showSizeChanger: true,
+      showTotal: total => getPaginationTotalTitle(total)
+    }));
+    const loading = ref(false);
+
+    const handleTableChange: TableProps['onChange'] = (
+      pag: { pageSize: number; current: number },
+    ) => {
+      formState.page = pag.current;
+      formState.rows = pag.pageSize;
+      loadData();
+    };
+
+    const onFinish = () => {
+      loadData();
+    }
+
+    const loadData = async function () {
+      loading.value = true;
+      const result: any = await get('applyForm/getReviewerFormList', formState);
+
+      data.value = result.list;
+      formState.total = result.total;
+      loading.value = false;
+    }
+
+    const dicModalClosed = (d) => {
+      if (d) {
+        loadData();
+      }
+    }
+    const approve = (record) => {
+      modalRef.value.show(record.applyId);
+    };
+
+    const onSelectChange = (keys: any) => {
+      selectedRowKeys.value = keys;
+    };
+    const showFile = async (applyId) => {
+      visible.value = true;
+      const result: any = await get('applyForm/getApplyFormFileList', {applyId: applyId});
+      docList.value = result;
+    };
+    const downFile = (record: any) => {
+      download(record.storage_path, record.file_name);
+    };
+    return {
+      formRef,
+      expand,
+      data,
+      loadData, loading, selectedRowKeys,
+      onSelectChange, onRangeChange,
+      formState,
+      columns,
+      pagination, modalRef,
+      approve, dicModalClosed,docList,visible,
+      handleTableChange,showFile,downFile,
+      onFinish,
+    };
+  },
+  created() {
+    this.loadData();
+  }
+});
+</script>

+ 3 - 3
vue/src/views/system/role/roleUser.vue

@@ -185,7 +185,7 @@ export default defineComponent({
             .map((record) => record.userId);
           onItemSelectAll(treeSelectedKeys, selected);
         },
-        onSelect(record: any, selected: boolean) { 
+        onSelect(record: any, selected: boolean) {
           onItemSelect(record.userId, selected);
         },
         selectedRowKeys: selectedKeys,
@@ -203,9 +203,9 @@ export default defineComponent({
       formState.selectedRowKeys = selectedRowKeys;
     };
 
-    const show = (roleID, userType) => {
+    const show = (roleID) => {
       searchParamsState.roleID = roleID;
-      userTypeID.value = userType;
+      userTypeID.value = 0;
       formState.selectedRowKeys = [];
       formState.total = 0;
 

+ 34 - 6
vue/src/views/wellinfo/detail.vue

@@ -197,8 +197,9 @@
                   <a-list-item v-if="(item.file_name.indexOf(fileOptions.docKey)>-1||fileOptions.docKey=='')
                   &&(fileOptions.selectBusinessType.length==0||fileOptions.selectBusinessType.includes(item.file_business_type))">
                     <template #actions>
-                      <filePreview :fileName="item.file_name" :filePath="item.storage_path"></filePreview>
-                      <a-button type="link" @click="downFile(item)" functioncode="T010501" danger>下载</a-button>
+                      <PlusOutlined v-if="!item.isApply" @click="onAddCart(item)" title="加入购物车" :style="{fontSize: '16px', color: '#08c'}"/>
+                       <a-button type="link" @click="downFile(item)"  v-if="item.isDown" danger>下载</a-button>
+                       <filePreview :fileName="item.file_name" :filePath="item.storage_path"></filePreview>
                     </template>
                     <a-list-item-meta
                       :description="item.file_business_type">
@@ -351,6 +352,7 @@ import filePreview from '@/components/basic/file-preview/index.vue'
 import {download} from "@/utils/downloadFile";
 import {getPaginationTotalTitle} from "@/utils/common";
 import type {TableProps} from "ant-design-vue";
+import {message} from "ant-design-vue";
 
 export default defineComponent({
   name: 'wellinfoDetail',
@@ -483,7 +485,7 @@ export default defineComponent({
         wellData.historyAssignmentList = data.historyAssignmentList;
         wellData.historyAssignmentSummary = data.historyAssignmentSummary;
         wellData.lastHistoryAssignment = data.lastHistoryAssignment ?? {};
-        wellData.dataIndexList = data.dataIndexList;
+        wellData.dataIndexList = checkApplyFile(data.dataIndexList);
         wellData.historyAssignmentCount = wellData.historyAssignmentSummary.reduce((total, it: any) => total + it.testing_num, 0);
         wellData.mapDatas = [{
           well_id: wellData.dataModel.well_id,
@@ -502,7 +504,23 @@ export default defineComponent({
         }
       })
     }
-
+    function checkApplyFile(dataIndexList:any[]){
+      let applyFileList = getStoreFiles();
+      dataIndexList.forEach(it => {
+        if (!it.isApply) {
+          it.isApply = applyFileList.filter(file => file.well_common_name == it.well_common_name && file.file_name == it.file_name).length > 0;
+        }
+      })
+      return dataIndexList;
+    }
+    function getStoreFiles(){
+      let applyFileList = new Array();
+      let storeList = localStorage.getItem("applyFileList");
+      if (storeList != null) {
+        applyFileList = JSON.parse(storeList);
+      }
+      return applyFileList;
+    }
     function rowSpan(list: any[]) {
       for (let i = 0; i < list.length; i++) {
         list[i].rowSpan = getRowSpan(list[i].item_code, i + 1, list);
@@ -528,7 +546,17 @@ export default defineComponent({
     const downFile = (record: any) => {
       download(record.storage_path, record.file_name);
     };
-
+    const onAddCart = (file) => {
+      let applyFileList = new Array();
+      let storeList = localStorage.getItem("applyFileList");
+      if (storeList != null) {
+        applyFileList = JSON.parse(storeList);
+      }
+      applyFileList.push({well_common_name: file.well_common_name, file_name: file.file_name,storage_path:file.storage_path});
+      localStorage.setItem("applyFileList", JSON.stringify(applyFileList));
+      file.isApply = true;
+      message.info('成功加入购物车');
+    }
     const onClose = () => {
       tabsViewStore.closeCurrentTab(route);
       router.back();
@@ -537,7 +565,7 @@ export default defineComponent({
     return {
       ...toRefs(wellData),
       loadData, cardSettings,
-      onClose, ...columns,analyticalAssaysPage,handleAnalyticalAssaysChange,
+      onClose, ...columns,analyticalAssaysPage,handleAnalyticalAssaysChange,onAddCart,
       dayjs, wellId, fileOptions, downFile, onBusTypeChange, handleTestHistoryChange, testHistoryPage,
       handleResizeColumn: (w, col) => {
         col.width = w;

+ 26 - 20
vue/src/views/wellinfo/index.vue

@@ -168,7 +168,6 @@
                   卡片
                 </a-radio-button>
               </a-radio-group>
-              <shopping-cart-outlined  @click="onShowCart" title="购物车" :style="{fontSize: '30px', color: '#08c',display:'contents'}"/>
             </a-col>
           </a-row>
         </a-form>
@@ -329,9 +328,10 @@
             <a-list-item v-if="(item.file_name.indexOf(fileOptions.docKey)>-1||fileOptions.docKey=='')
                   &&(fileOptions.selectBusinessType.length==0||fileOptions.selectBusinessType.includes(item.file_business_type))">
               <template #actions>
-                <PlusOutlined v-if="!item.isApply" @click="onAddCart(item)" title="加入购物车" :style="{fontSize: '16px', color: '#08c'}"/>
+                <PlusOutlined v-if="!item.isApply" @click="onAddCart(item)" title="加入购物车"
+                              :style="{fontSize: '16px', color: '#08c'}"/>
+                <a-button type="link" @click="downFile(item)" v-if="item.isDown" danger>下载</a-button>
                 <filePreview :fileName="item.file_name" :filePath="item.storage_path"></filePreview>
-                <a-button type="link" @click="downFile(item)" functioncode="T010501" danger>下载</a-button>
               </template>
               <a-list-item-meta
                 :description="item.file_business_type">
@@ -347,10 +347,6 @@
         </a-list>
       </div>
     </a-modal>
-    <ShoppingcartModal ref="shoppingCartModalRef"></ShoppingcartModal>
-    <div class="apply-cart" @click="onShowCart">
-      <shopping-cart-outlined   title="购物车" :style="{fontSize: '35px', color: '#08c'}"/>
-    </div>
   </div>
 </template>
 
@@ -369,11 +365,10 @@ import {download} from "@/utils/downloadFile";
 import {columns, filterColumns, formState, getTdColor} from './table';
 import filePreview from '@/components/basic/file-preview/index.vue';
 import {numberToCurrencyNo} from "@/utils/common";
-import ShoppingcartModal from './shoppingcart.vue';
 
 export default defineComponent({
   name: 'wellinfoindex',
-  components: {ChartCell, ChartMap, filePreview,ShoppingcartModal},
+  components: {ChartCell, ChartMap, filePreview},
   setup() {
 
     const route = useRoute();
@@ -405,7 +400,6 @@ export default defineComponent({
       selectBusinessType: [] as any[]
     })
     const wellPurposeTree = ref([]);
-    const shoppingCartModalRef=ref();
 
     get('wellInfo/getWellPurposeTree', {}).then(data => {
       wellPurposeTree.value = data;
@@ -738,7 +732,13 @@ export default defineComponent({
     }
 
     const showDoc = (id) => {
-      get('wellInfo/getWellDocumentList', {wellId: id}).then(data => {
+      get('wellInfo/getWellDocumentList', {wellId: id}).then((data: any[]) => {
+        let applyFileList = getStoreFiles();
+        data.forEach(it => {
+          if (!it.isApply) {
+            it.isApply = applyFileList.filter(file => file.well_common_name == it.well_common_name && file.file_name == it.file_name).length > 0;
+          }
+        })
         docList.value = data;
         isShowDoc.value = true;
         fileOptions.businessType = docList.value.map(x => x.file_business_type);
@@ -747,19 +747,25 @@ export default defineComponent({
     };
 
     const onAddCart = (file) => {
+      let applyFileList = getStoreFiles();
+      applyFileList.push({
+        well_common_name: file.well_common_name,
+        file_name: file.file_name,
+        storage_path: file.storage_path
+      });
+      localStorage.setItem("applyFileList", JSON.stringify(applyFileList));
+      file.isApply = true;
+      message.info('成功加入购物车');
+    }
+    const getStoreFiles = () => {
       let applyFileList = new Array();
       let storeList = localStorage.getItem("applyFileList");
       if (storeList != null) {
         applyFileList = JSON.parse(storeList);
       }
-      applyFileList.push({well_common_name: file.well_common_name, file_name: file.file_name,storage_path:file.storage_path});
-      localStorage.setItem("applyFileList", JSON.stringify(applyFileList));
-      file.isApply = true;
-      message.info('成功加入购物车');
-    }
-    const onShowCart=()=>{
-      shoppingCartModalRef.value.show();
+      return applyFileList;
     }
+
     const labelCol = {style: {width: '100px'}};
 
     return {
@@ -814,8 +820,6 @@ export default defineComponent({
       wellTypeTree,
       numberToCurrencyNo,
       onAddCart,
-      shoppingCartModalRef,
-      onShowCart,
       handleResizeColumn: (w, col) => {
         col.width = w;
       }
@@ -840,6 +844,7 @@ export default defineComponent({
   overflow: hidden;
   position: relative;
 }
+
 .apply-cart {
   position: fixed;
   right: 10px;
@@ -848,6 +853,7 @@ export default defineComponent({
   z-index: 99;
   cursor: pointer;
 }
+
 .query-index-tree {
   min-width: 260px;
   max-width: 360px;

+ 4 - 3
vue/src/views/wellinfo/shoppingcart.vue

@@ -29,12 +29,13 @@
                   </div>
                 </template>
               </a-list-item-meta>
+              <div>{{item.well_common_name}}</div>
             </a-list-item>
           </template>
         </a-list>
       </div>
     </Modal>
-    <a-modal
+    <Modal
       v-model:visible="visible2"
       title="提交申请"
       ok-text="确认"
@@ -42,7 +43,7 @@
       @ok="handleOk"
       @cancel="visible2=false" >
       <a-textarea v-model:value="reason" placeholder="申请原因" :auto-size="{ minRows: 4, maxRows: 6 }" allow-clear/>
-    </a-modal>
+    </Modal>
   </div>
 </template>
 
@@ -82,7 +83,7 @@ defineExpose({show});
 
 const handleOk = () => {
   let checkedList = docList.value.filter(doc => doc.checked);
-  postData('/applyForm/submit', {docList: checkedList}).then(result => {
+  postData('/applyForm/submit', {reason:reason.value,docList: checkedList}).then(result => {
     if (result) {
       message.info("成功提交申请。");
       docList.value = docList.value.filter(doc => !doc.checked);