yxh
4 天以前 45d4fe24016c03fcccbe7c9798533ca97e2e7aea
src/views/project/tallage/computingBill/index.vue
@@ -148,20 +148,20 @@
              align="center"
              fixed
              label="序号"
              width="120"
              width="60"
            >
            </el-table-column>
            <el-table-column
              prop="donorname"
              align="center"
              fixed
              label="案例捐献者"
              label="捐献案例"
              width="120"
            >
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.donorname"
                  placeholder="案例捐献者"
                  placeholder="捐献者"
                  :disabled="true"
                />
              </template>
@@ -185,7 +185,7 @@
              prop="deptmentname"
              align="center"
              label="所属组别"
              width="280"
              width="200"
            >
              <template slot-scope="scope">
                <el-input
@@ -215,7 +215,7 @@
                </el-date-picker>
              </template>
            </el-table-column>
            <el-table-column prop="pretaxcost" align="center" label="税前金额">
            <el-table-column prop="pretaxcost" align="right" label="税前金额" width="120" header-align="right" class-name="money-column" :formatter="formatMoney">
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.pretaxcost"
@@ -224,7 +224,7 @@
                />
              </template>
            </el-table-column>
            <el-table-column prop="vatCost" align="center" label="增值税">
            <el-table-column prop="vatCost" align="right" label="增值税" width="120" header-align="right" class-name="money-column" :formatter="formatMoney">
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.vatCost"
@@ -233,7 +233,7 @@
                />
              </template>
            </el-table-column>
            <el-table-column prop="cityTaxCost" align="center" label="城建税">
            <el-table-column prop="cityTaxCost" align="right" label="城建税" width="120" header-align="right" class-name="money-column" :formatter="formatMoney">
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.cityTaxCost"
@@ -242,7 +242,7 @@
                />
              </template>
            </el-table-column>
            <el-table-column prop="laborPretaxCost" align="center" label="劳务税前">
            <el-table-column prop="laborPretaxCost" align="right" label="劳务税前" width="120" header-align="right" class-name="money-column" :formatter="formatMoney">
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.laborPretaxCost"
@@ -251,7 +251,7 @@
                />
              </template>
            </el-table-column>
            <el-table-column label="劳务个税" align="center" prop="taxcost">
            <el-table-column label="劳务个税" prop="taxcost" width="120" align="right" header-align="right" class-name="money-column" :formatter="formatMoney">
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.taxcost"
@@ -261,7 +261,7 @@
              </template>
            </el-table-column>
            <el-table-column prop="taxedcost" align="center" label="劳务税后">
            <el-table-column prop="taxedcost" label="劳务税后" width="120" align="right" header-align="right" class-name="money-column" :formatter="formatMoney">
              <template slot-scope="scope">
                <el-input
                  @blur="chargeSum"
@@ -273,7 +273,6 @@
            </el-table-column>
            <el-table-column
              prop="remark"
              width="280"
              align="center"
              label="备注"
            >
@@ -446,42 +445,42 @@
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                <!-- <el-table-column
                  prop="pretaxcost"
                  label="税前金额"
                  show-overflow-tooltip
                >
                 align="right" header-align="right" class-name="money-column" :formatter="formatMoney">
                </el-table-column>
                <el-table-column
                  prop="vatCost"
                  label="增值税"
                  show-overflow-tooltip
                >
                 align="right" header-align="right" class-name="money-column" :formatter="formatMoney">
                </el-table-column>
                <el-table-column
                  prop="cityTaxCost"
                  label="城建税"
                  show-overflow-tooltip
                >
                 align="right" header-align="right" class-name="money-column" :formatter="formatMoney">
                </el-table-column>
                <el-table-column
                  prop="laborPretaxCost"
                  label="劳务税前"
                  show-overflow-tooltip
                >
                 align="right" header-align="right" class-name="money-column" :formatter="formatMoney">
                </el-table-column>
                <el-table-column
                  prop="taxcost"
                  label="劳务个税"
                  show-overflow-tooltip
                >
                 align="right" header-align="right" class-name="money-column" :formatter="formatMoney">
                </el-table-column>
                <el-table-column
                  prop="taxedcost"
                  label="劳务税后"
                  show-overflow-tooltip
                >
                </el-table-column>
                 align="right" header-align="right" class-name="money-column" :formatter="formatMoney">
                </el-table-column> -->
                <el-table-column
                  prop="remark"
                  label="备注"
@@ -561,7 +560,7 @@
              </el-upload>
              <el-table
                :data="fileListto"
                @row-click="downFile"
                @row-click="previewInline" @row-dblclick="downFile"
                style="width: 100%"
                height="400"
              >
@@ -691,6 +690,8 @@
      pdfVisible: false,
      maxTaxId: "",
      pdfimgsrcList: [],
      // 2026-11-30:票据弹窗预览令牌(防止切换行时旧请求回写)
      previewToken: 0,
      Savereminder: false, //提醒保存弹框
      Reminderquantity: 0, //提醒数量
      totalquantity: 0, //总数量
@@ -1268,11 +1269,24 @@
      return sums;
    },
    // 文件------------------------
    /** 2026-11-23:按文件名从列表中精确删除一项,避免用预览列表(blob)整表覆盖附件字段 */
    spliceByName(list, name) {
      if (!list || !name) {
        return;
      }
      const idx = list.findIndex(item => item && item.name === name);
      if (idx > -1) {
        list.splice(idx, 1);
      }
    },
    remove(file, fileList) {
      const donorchargeorgans = [...this.donorchargeorgans];
      this.fileListto.splice(this.fileListto.indexOf(file), 1);
      donorchargeorgans[this.atpresent].annexFilesList = this.fileListto;
      this.spliceByName(this.fileListto, file && file.name);
      this.spliceByName(
        donorchargeorgans[this.atpresent].annexFilesList,
        file && file.name
      );
    },
    uploadSccess(response, file, fileList) {
@@ -1315,18 +1329,31 @@
    },
    // 点击票据
    /**
     * 2026-11-30:清空票据弹窗预览状态(含 embeddedFile / invoiceEmbeddedFile),
     * 避免再次打开弹窗时仍显示上一次选择的票据图片。
     */
    resetPreviewState() {
      this.fileListto = [];
      this.invoicefileListto = [];
      this.pdfimg = "";
      this.invoicepdfimg = "";
      this.pdfimgsrcList = [];
      this.invoicepdfimgsrcList = [];
      this.embeddedFile = null;
      this.invoiceEmbeddedFile = null;
      this.pdftitle = "";
      this.previewToken = (this.previewToken || 0) + 1;
    },
    Filepopup(index, row) {
      const config = {
        headers: { Authorization: "Bearer " + this.ICDtoken }
      };
      this.tableDatatop = [];
      this.fileListto = [];
      this.invoicefileListto = [];
      this.pdfimg = "";
      this.invoicepdfimg = [];
      this.pdfimgsrcList = [];
      this.invoicepdfimgsrcList = [];
      this.resetPreviewState();
      const previewToken = ++this.previewToken;
      this.tableDatatop.push(row);
      this.atpresent = index;
      this.pdfVisible = true;
@@ -1351,6 +1378,10 @@
        );
        Promise.all(fetchPromises).then(fileListto => {
          // 2026-11-30:切换行后丢弃过期结果
          if (previewToken !== this.previewToken) {
            return;
          }
          this.fileListto = fileListto.filter(item => item !== null);
          this.pdfimg = this.fileListto[0].url;
          console.log(this.pdfimg, "pdfimg");
@@ -1374,6 +1405,26 @@
    },
    // 点击已上传文件:在附件弹窗右侧内嵌预览
    /**
     * 2026-11-30:单击列表项 → 在本页预览(右侧 preview-pane)。
     * 双击才打开独立的预览页面(downFile → $previewFile)。
     */
    previewInline(row) {
      if (!row) {
        return;
      }
      const url = row.previewUrl || row.url;
      if (!url) {
        return;
      }
      const file = {
        name: row.name || "",
        url,
        type: /\.pdf$/i.test(row.name || "") ? "pdf" : "image"
      };
      this.embeddedFile = file;
    },
    downFile(item) {
      if (this.operationType == "detail") {
        const list = (this.fileListto || []).map(f => ({