Forráskód Böngészése

feat:修复bug1168,修复三重一大我审核的

coder 1 éve%!(EXTRA string=óta)
szülő
commit
4f04968f8b

+ 64 - 29
src/pages/sanZhongYiDa/projectApply/detail/index.vue

@@ -1,9 +1,12 @@
 <script setup>
 import { closeToast, showLoadingToast, showToast } from 'vant'
+import { userInfo } from "~/store/user";
 
+const { user_id } = userInfo;
 const { currentRoute } = useRouter()
 const route = currentRoute.value
 const xm_id = route.query.xm_id
+const type = route.query.type
 const detailData = ref({})
 const shjl = ref([])
 const fileFinalArr = ref([])
@@ -51,49 +54,50 @@ const auditchecked = ref('')
 const auditDialogShow = ref(false)
 const sh_reason = ref('')
 function clickAudit() {
-  auditchecked.value = ''
-  sh_reason.value = ''
-  auditDialogShow.value = true
+  auditchecked.value = "";
+  sh_reason.value = "";
+  auditDialogShow.value = true;
+
 }
 function beforeCloseDialog(action) {
-  if (action == 'confirm') {
-    if (auditchecked.value == '') {
-      showToast('请选择审核结果')
-      return false
-    }
-    else if ((auditchecked.value === '2') && sh_reason.value == '') {
-      showToast('请填写意见')
-      return false
-    }
-    else {
-      dialogSubmit()
-      return true
+  if (action == "confirm") {
+    if (auditchecked.value == "") {
+      showToast("请选择审核结果");
+      return false;
+    } else if (auditchecked.value === "3" && sh_reason.value == "") {
+      showToast("请填写意见");
+      return false;
+    } else {
+      dialogSubmit();
+      return true;
     }
-  }
-  else {
-    return true
+  } else {
+    return true;
   }
 }
 function dialogSubmit() {
   const transObj = {
-    xm_id,
-    sh_status: auditchecked.value, // 待审核 1通过 2驳回
+    sh_id: xm_id,
+    sh_status: auditchecked.value, //
     sh_reason: sh_reason.value, // 处理意见
-  }
+  };
   showLoadingToast({
-    message: '提交中...',
+    message: "提交中...",
     forbidClick: true,
-  })
+  });
   request({
-    url: '/jdbg/gwgl_gw/check',
+    url: "/jdbg/xmlxsb_xmsq/check",
     data: transObj,
   }).then((res) => {
-    closeToast()
+    closeToast();
     if (res.code == 1) {
-      showToast(res.msg)
-      getData()
+      closeToast()
+      if (res.code == 1) {
+        showToast(res.msg)
+        getData()
+      }
     }
-  })
+  });
 }
 </script>
 
@@ -217,7 +221,18 @@ function dialogSubmit() {
                 状态:
               </td>
               <td>
-                <div :style="{ color: item.sh_status == 3 ? 'red' : '' }">
+                <div v-if="type === 'myAuditFor' && user_id === item.sh_user_id">
+                  <van-button v-if="detailData.xm_status_option_k == '1' ||
+                    detailData.xm_status_option_k == '2' || detailData.xm_status_option_k === '3'
+                    " class="rightButton" type="primary" @click.stop="clickAudit()">
+                    审核
+                  </van-button>
+                  <van-button v-if="detailData.xm_status_option_k > '3' && detailData.xm_status_option_k <= '5'"
+                    color="#BDBDBD" class="rightButton">
+                    已审核
+                  </van-button>
+                </div>
+                <div v-else :style="{ color: item.sh_status == 3 ? 'red' : '' }">
                   {{ item.sh_status == 1 ? "未处理" : (item.sh_status == 2 ? '通过' : '不通过') }}
                 </div>
               </td>
@@ -236,6 +251,26 @@ function dialogSubmit() {
         </table>
       </div>
     </div>
+    <van-dialog v-model:show="auditDialogShow" title="审核" confirm-button-text="提交" show-cancel-button
+      :before-close="beforeCloseDialog">
+      <div class="dialogDiv">
+        <van-radio-group v-model="auditchecked">
+          <van-cell-group inset>
+            <van-cell title="通过" clickable @click="auditchecked = '2'">
+              <template #right-icon>
+                <van-radio name="2" />
+              </template>
+            </van-cell>
+            <van-cell title="不通过" clickable @click="auditchecked = '3'">
+              <template #right-icon>
+                <van-radio name="3" />
+              </template>
+            </van-cell>
+          </van-cell-group>
+        </van-radio-group>
+        <van-field v-if="auditchecked === '3'" v-model="sh_reason" rows="3" autosize type="textarea" placeholder="填写意见" />
+      </div>
+    </van-dialog>
   </div>
 </template>
 

+ 21 - 8
src/pages/sanZhongYiDa/projectApply/myAuditFor/index.vue

@@ -3,7 +3,7 @@ import { closeToast, showLoadingToast, showToast } from "vant";
 
 const router = useRouter();
 function cellClick(xm_id) {
-  router.push({ path: "/sanZhongYiDa/projectApply/detail", query: { xm_id } });
+  router.push({ path: "/sanZhongYiDa/projectApply/detail", query: { xm_id, type: 'myAuditFor' } });
 }
 
 const listMyAuditFor = ref([]);
@@ -46,10 +46,23 @@ const sh_reason = ref("");
 const operaItem = ref({});
 
 function clickAudit(item) {
-  operaItem.value = item;
-  auditchecked.value = "";
-  sh_reason.value = "";
-  auditDialogShow.value = true;
+  let shjlListArr = item.shjl_list;
+  if (shjlListArr.length != 0) {
+    let firstPStatus = shjlListArr[0].sh_status
+    if (firstPStatus == '2') {//审核过
+      showToast("您已经审批过了");
+    } else {
+      operaItem.value = item;
+      auditchecked.value = "";
+      sh_reason.value = "";
+      auditDialogShow.value = true;
+    }
+  } else {//没有人审核
+    operaItem.value = item;
+    auditchecked.value = "";
+    sh_reason.value = "";
+    auditDialogShow.value = true;
+  }
 }
 function beforeCloseDialog(action) {
   if (action == "confirm") {
@@ -104,13 +117,13 @@ function dialogSubmit() {
       @click="cellClick(item.xm_id)">
       <template #value>
         <van-button v-if="item.xm_status_option_k == '1' ||
-          item.xm_status_option_k == '2'
+          item.xm_status_option_k == '2' || item.xm_status_option_k === '3'
           " class="rightButton" type="primary" @click.stop="clickAudit(item)">
           审核
         </van-button>
-        <van-button v-if="item.xm_status_option_k === '3'" color="#BDBDBD" class="rightButton">
+        <!-- <van-button v-if="" color="#BDBDBD" class="rightButton">
           审核中
-        </van-button>
+        </van-button> -->
         <van-button v-if="item.xm_status_option_k > '3' && item.xm_status_option_k <= '5'" color="#BDBDBD"
           class="rightButton">
           已审核

+ 6 - 19
src/pages/sanZhongYiDa/projectApply/myAudited/index.vue

@@ -19,6 +19,7 @@ function onLoadMyApplyFor() {
       page: pageMyApplyFor,
       limit: 20,
       xm_status: 5,
+      xm_is_wc: 2,
       ...param,
     },
   }).then((res) => {
@@ -41,28 +42,14 @@ function reGetList() {
 </script>
 
 <template>
-  <van-search
-    v-model="param.keyword"
-    :clearable="false"
-    show-action
-    placeholder="请输入搜索关键词"
-    @search="onClickSearch"
-  >
+  <van-search v-model="param.keyword" :clearable="false" show-action placeholder="请输入搜索关键词" @search="onClickSearch">
     <template #action>
       <div @click="onClickSearch">搜索</div>
     </template>
   </van-search>
-  <van-list
-    v-model:loading="loadingMyApplyFor"
-    :finished="finishedMyApplyFor"
-    finished-text="没有更多了"
-    @load="onLoadMyApplyFor"
-  >
-    <van-cell
-      v-for="(item, index) in listMyApplyFor"
-      :key="item"
-      :title="`${index + 1}.\u00A0\u00A0${item.xm_name}`"
-      @click="cellClick(item.xm_id)"
-    />
+  <van-list v-model:loading="loadingMyApplyFor" :finished="finishedMyApplyFor" finished-text="没有更多了"
+    @load="onLoadMyApplyFor">
+    <van-cell v-for="(item, index) in listMyApplyFor" :key="item" :title="`${index + 1}.\u00A0\u00A0${item.xm_name}`"
+      @click="cellClick(item.xm_id)" />
   </van-list>
 </template>