WXL
2 天以前 f409f83de7f803178715f128f275d77741c3072d
src/views/project/fund/applyDetail/index.vue
@@ -108,6 +108,14 @@
              />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <div style="margin-left: 10px;">
              <dict-tag
                :options="dict.type.sys_DonationStatus"
                :value="form.invoicecount"
              />
            </div>
          </el-col>
          <el-col :span="10">
            <el-form-item label="申请说明" prop="remark">
              <el-input v-model="form.remark" placeholder="申请说明" />
@@ -158,7 +166,7 @@
              >
            </div>
          </el-col>
          <el-col
          <!-- <el-col
            :span="3"
            v-if="
              userprofile.nickName == '陈慕华' &&
@@ -174,7 +182,7 @@
                >计算个税</el-button
              >
            </div>
          </el-col>
          </el-col> -->
        </el-row>
        <el-row>
          <el-table
@@ -806,12 +814,29 @@
            </el-form-item>
          </el-col>
        </el-row>
        <el-row v-if="selectionType == 'account' && accountfrom == '2'">
          <el-col :span="24">
            <el-form-item label="账户名称" prop="username">
              <el-input
                v-model="accountselectform.username"
                placeholder="请输入单位名称,或专家姓名,或其他账号"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row
          v-if="
            selectionType == 'account' &&
              accountfrom == '2' &&
              accountselectform.usertype == 'org'
          "
        >
          <el-col :span="24">
            <el-form-item label="税号" prop="unitTaxNo">
              <el-input
                v-model="accountselectform.unitTaxNo"
                placeholder="请输入税号"
              />
            </el-form-item>
          </el-col>
@@ -1113,16 +1138,22 @@
            >
              <!-- <img :src="pdfimg" /> -->
              <el-image
                ref="imagePreview"
                style="width: 95%; height: 90%"
                @error="handleImageError"
                @load="handleImageLoad"
                :src="pdfimg"
                :preview-src-list="pdfimgsrcList"
                @click="handleImageClick(initialIndex)"
              >
                <!-- <div slot="error" class="image-slot">
              <i class="el-icon-picture-outline"></i>
            </div> -->
                <i class="el-icon-picture-outline"></i>
              </div> -->
              </el-image>
              <custom-image-viewer
                :url-list="pdfimgsrcList"
                :initial-index="currentIndex"
                :visible="viewerVisible"
                @update:visible="viewerVisible = $event"
                @close="handleViewerClose"
              />
            </div>
            <div v-else class="pdfimgmins">{{ hintitle }}</div>
          </div>
@@ -1219,15 +1250,20 @@
              <!-- <img :src="pdfimg" /> -->
              <el-image
                style="width: 95%; height: 90%"
                @error="handleImageError"
                @load="handleImageLoad"
                :src="invoicepdfimg"
                :preview-src-list="invoicepdfimgsrcList"
                @click="invoicehandleImageClick(initialIndex)"
              >
                <!-- <div slot="error" class="image-slot">
              <i class="el-icon-picture-outline"></i>
            </div> -->
                <i class="el-icon-picture-outline"></i>
              </div> -->
              </el-image>
              <custom-image-viewer
                :url-list="invoicepdfimgsrcList"
                :initial-index="invoicecurrentIndex"
                :visible="invoiceviewerVisible"
                @update:visible="invoiceviewerVisible = $event"
                @close="invoicehandleViewerClose"
              />
            </div>
            <div v-else class="pdfimgmins">{{ hintitle }}</div>
          </div>
@@ -1287,6 +1323,8 @@
</template>
<script>
import store from "@/store";
// 'sdaad2123UD2',1  'wsadadwsad',4 'sdadaddad',3 'ssaaddxs',2
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》';
@@ -1361,12 +1399,14 @@
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import { getToken } from "@/utils/auth";
import CustomImageViewer from "@/components/CustomImageViewer"; // 根据你的路径调整
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
    Li_area_select,
    OrgSelecter
    OrgSelecter,
    CustomImageViewer
  },
  name: "fundApply",
@@ -1382,6 +1422,7 @@
    //"sys_finsubject",
    //"sys_financeitemtype",
    //"sys_expensetype",
    'sys_DonationStatus',
    "sys_recordstatus",
    "sys_professionaltitle"
  ],
@@ -1513,6 +1554,7 @@
        username: [
          { required: true, message: "请输入账户名称", trigger: "blur" }
        ],
        unitTaxNo: [{ required: true, message: "请输入税号", trigger: "blur" }],
        idcardno: [
          { required: true, message: "请输入身份账号", trigger: "blur" }
        ],
@@ -1656,6 +1698,11 @@
      pdftitle: "",
      pdfimg: "",
      pdfimgsrcList: [],
      currentIndex: 0, // 初始索引
      invoicecurrentIndex: 0, // 初始索引
      initialIndex: 0, // 初始索引
      viewerVisible: false, // 控制预览组件显示
      invoiceviewerVisible: false, // 控制预览组件显示
      pdfVisible: false,
      previewpdf: false,
      hintitle: "请上传文件后查看",
@@ -1823,9 +1870,12 @@
        this.businessType == "2" ||
        this.businessType == "3"
      ) {
        console.log(this.curCase,'this.curCase');
        this.form.infoid = this.curCase.id;
        this.form.donorname = this.curCase.name;
        this.form.donorno = this.curCase.donorno;
        this.form.invoicecount = this.curCase.recordstate;
      }
      //初始化明细
@@ -2237,7 +2287,7 @@
          sessionStorage.setItem("apiform", JSON.stringify(this.form));
          addorupdateFund(this.form)
            .then(response => {
              if (response.code === 200) {
              if (response.code == 200) {
                if (this.form.id) {
                  this.$modal.msgSuccess("申请单修改成功!");
                  this.$router.go(-1);
@@ -2316,10 +2366,12 @@
      getUserProfile().then(res => {
        this.userprofile = res.data;
        this.standardlevel = res.data.standardlevel;
        if (
          this.userprofile.userName == "admin" ||
          this.userprofile.userName == "001" ||
          this.userprofile.userName == "047"
          this.userprofile.userName == "053" ||
          this.userprofile.userName == "047" ||
          store.getters.rolesor[0].roleSort == "13"
        ) {
          this.ismanager = true;
        } else {
@@ -2807,11 +2859,21 @@
                };
                this.$modal.loading("正在提交审核,请稍候!");
                checkfund(checkFundObj).then(res => {
                  //关闭窗口
                  this.$modal.closeLoading();
                  this.$modal.msgSuccess("审核完成!");
                  this.$store.dispatch("tagsView/delView", this.$route);
                  this.$router.go(-1);
                  if (res.code == 200) {
                    //关闭窗口
                    this.$modal.closeLoading();
                    this.$modal.msgSuccess("审核完成!");
                    this.$store.dispatch("tagsView/delView", this.$route);
                    this.$router.go(-1);
                  } else {
                    this.$modal.closeLoading();
                    if (res.msg) {
                      this.$modal.msgError("操作失误");
                    } else {
                      this.$modal.msgError(res.msg);
                    }
                  }
                });
              }
              this.Getnetworkheader();
@@ -3153,6 +3215,20 @@
      // 图片加载成功时执行的操作
      console.log("Image loaded successfully");
    },
    handleImageClick(index) {
      this.currentIndex = index;
      this.viewerVisible = true;
    },
    invoicehandleImageClick(index) {
      this.invoicecurrentIndex = index;
      this.invoiceviewerVisible = true;
    },
    handleViewerClose() {
      this.viewerVisible = false;
    },
    invoicehandleViewerClose() {
      this.invoiceviewerVisible = false;
    },
    handleUploadError() {},
    remove(file, fileList) {
      const rbDetails = [...this.rbDetails];