Bladeren bron

no message

ly 1 jaar geleden
bovenliggende
commit
8533e000ab
1 gewijzigde bestanden met toevoegingen van 33 en 46 verwijderingen
  1. 33 46
      src/views/business/production/IndividualIncomeTaxIs/FormDialog.vue

+ 33 - 46
src/views/business/production/IndividualIncomeTaxIs/FormDialog.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 添加或修改菜单对话框 -->
-  <el-dialog title="个税信息" v-model="visible" width="800px" append-to-body draggable @close="close"
+  <el-dialog title="个税信息111" v-model="visible" width="800px" append-to-body draggable @close="close"
     :close-on-click-modal="false">
     <div v-loading="loading">
       <div style="padding: 8px 24px 16px 24px">
@@ -53,37 +53,6 @@
                   </div>
                   <div v-else>
                   </div>
-                  <!-- <el-upload
-
-                      v-if="!isView"
-                      action="#"
-                      :http-request="upload"
-                      :with-credentials="true"
-                      list-type="picture-card"
-                      :show-file-list="false"
-                      multiple
-                    >
-                      <img
-                        v-if="
-                          emptyForm.evidenceFile != null &&
-                          emptyForm.evidenceFile !== ''
-                        "
-                        style="height: 148px; width: 148px"
-                        :src="`${baseUrl}/${emptyForm.evidenceFile}`"
-                        class="avatar"
-                      />
-                      <i v-else class="el-icon-plus avatar-uploader-icon" />
-                    </el-upload> -->
-                  <!-- <img
-                      v-else-if="
-                        emptyForm.evidenceFile != null &&
-                        emptyForm.evidenceFile !== ''
-                      "
-                      style="height: 148px; width: 148px"
-                      :src="`${baseUrl}/${emptyForm.evidenceFile}`"
-                      class="avatar"
-                      @click="openEvidience('evidenceFile')"
-                    /> -->
                 </el-form-item>
                 <!-- 删除按钮 -->
 
@@ -125,14 +94,14 @@
             style="float: right; margin-left: 12px; margin-right: 12px" @click="close">
             取消
           </el-button>
-      
-            <el-button type="primary" size="small" icon="Finished"  v-if="!isView || emptyForm.status !== 3"
-              v-hasPermi="['business:individualIncomeTaxDetail:saveDetail']" style="float: right" @click="handleSave">
-              保存
-            </el-button>
+
+          <el-button type="primary" size="small" icon="Finished" v-if="!isView || emptyForm.status !== 3"
+            v-hasPermi="['business:individualIncomeTaxDetail:saveDetail']" style="float: right" @click="handleSave">
+            保存
+          </el-button>
           <el-button v-hasPermi="['business:individualIncomeTaxDetail:deductionTurnBack']" icon="back" type="warning"
-            size="small" style="float: right;" :disabled="(emptyForm == null || emptyForm.status !== 3)  "
-            @click="turnBack(emptyForm)">
+            size="small" style="float: right;" 
+            :disabled="(emptyForm == null || emptyForm.status !== 3)  " @click="turnBack(emptyForm)">
             退回
           </el-button>
         </div>
@@ -239,7 +208,6 @@
     tenantId.value = mainRow.tenantId;
     mainInfo.value = mainRow;
     monthInfo.value = monthItem;
-    console.log("id", id);
     currentMonth.value = proxy.moment().subtract(1, "month").format("YYYY-MM-01")
     if (id == 0) {
       isAdd.value = true;
@@ -247,12 +215,14 @@
       loadData(id);
     } else if (id == null || mainRow.detail.status == 3) {
       isView.value = true;
+      currentMonth.value = monthInfo.value.year + monthInfo.value.month
       console.log("查看");
       getInfoId(id);
     } else {
       console.log("修改");
       isView.value = false;
       isAdd.value = false;
+      currentMonth.value = monthInfo.value.year + monthInfo.value.month
       getInfoId(id);
     }
     getDetail(queryParams.value).then((response) => {
@@ -263,12 +233,29 @@
   }
 
   function getInfoId(id) {
-    console.log("id", mainInfo.value);
     getInfo(mainInfo.value.id, monthInfo.value.year, monthInfo.value.month).then((response) => {
-      console.log("response", response);
       mainInfo.value.detail = response.data;
       reportFiles.value = response.data.reportFiles;
       emptyForm.value = response.data;
+      /// 待删除
+      const nowDate = ref(
+        proxy.moment().subtract(1, "month").format("YYYY-MM-01")
+      );
+      let nowyear = proxy.moment(nowDate.value).format("YYYY");
+      let nowmonth = proxy.moment(nowDate.value).format("MM");
+      const year = monthInfo.value.year;
+      const month = monthInfo.value.month;
+      if (nowyear + nowmonth == year + month) {
+        if (emptyForm.value.status === 3) {
+          isView.value = true
+        } else {
+          isView.value = false
+        }
+        stopUseBack.value = false
+      } else {
+        stopUseBack.value = true
+      }
+      ///
       loadData(id);
     });
   }
@@ -318,10 +305,10 @@
     const month = proxy.moment(currentMonth.value).format("MM");
 
     if (nowyear + nowmonth == year + month) {
-      if(emptyForm.value.status === 3 ){
-        isView.value =true
-      }else{
-        isView.value =false
+      if (emptyForm.value.status === 3) {
+        isView.value = true
+      } else {
+        isView.value = false
       }
       stopUseBack.value = false
     } else {