Explorar el Código

结算审核功能开发

liangbowen hace 4 meses
padre
commit
a810839295

+ 65 - 60
src/components/yl-upload-files/index.vue

@@ -1,33 +1,36 @@
-
 <template>
-  <div style="width: 85%;
-    display: flex;
-    justify-content: space-around;
-    flex-wrap: wrap;">
+  <div
+    style="
+      width: 85%;
+      display: flex;
+      justify-content: space-around;
+      flex-wrap: wrap;
+    "
+  >
     <div v-if="fileId" class="pdf-css" v-for="(item, key) in fileId" :key="key">
       <el-tooltip placement="top">
-        <div slot="content">{{item.fileName}}</div>
-      <el-image
-        @click="check(item,key)"
-        :src="
-          accept === '.pdf'
-            ? require('@/assets/PDF.png')
-            : (accept.indexOf('.jpg') !== -1 ||
-                accept.indexOf('.png') !== -1 ||
-                accept.indexOf('.jpeg') !== -1) &&
-              accept.indexOf('.pdf') == -1 &&
-              accept.indexOf('.xlsx') == -1
-            ? require('@/assets/image.png')
-            : require('@/assets/doc.png')
-        "
-        alt
-        :preview-src-list="srcList"
-      ></el-image>
-    </el-tooltip>
-      <i 
+        <div slot="content">{{ item.fileName }}</div>
+        <el-image
+          @click="check(item, key)"
+          :src="
+            accept === '.pdf'
+              ? require('@/assets/PDF.png')
+              : (accept.indexOf('.jpg') !== -1 ||
+                  accept.indexOf('.png') !== -1 ||
+                  accept.indexOf('.jpeg') !== -1) &&
+                accept.indexOf('.pdf') == -1 &&
+                accept.indexOf('.xlsx') == -1
+              ? require('@/assets/image.png')
+              : require('@/assets/doc.png')
+          "
+          alt
+          :preview-src-list="srcList"
+        ></el-image>
+      </el-tooltip>
+      <i
         v-if="!readonly"
         class="el-icon-error fork"
-        @click="deltabpdf(item,key)"
+        @click="deltabpdf(item, key)"
       ></i>
     </div>
     <el-upload
@@ -70,22 +73,22 @@ export default {
     // 对话框('dialog')还是跳页面('window')打开文件
     openFileType: {
       type: String,
-      default: "dialog"
+      default: "dialog",
     },
     // 上传路径名称,用于文件夹分类,方便查找
     urlName: {
       type: String,
-      default: "spd"
+      default: "spd",
     },
     // 文档类别,.pdf, .jpg等
     accept: {
       type: String,
-      default: ".pdf"
+      default: ".pdf",
     },
     // 最大M数,上传的大小
     maxSize: {
       type: Number,
-      default: 10
+      default: 10,
     },
     // 传递的id值
     // fileId: {
@@ -95,19 +98,19 @@ export default {
     // 文件是否只读
     readonly: {
       type: Boolean,
-      default: false
+      default: false,
     },
-    index:{
+    index: {
       type: Number,
       default: 0,
     },
-    fileId:{
+    fileId: {
       type: Array,
-      default: []
+      default: [],
     },
-    fileStas:{
+    fileStas: {
       type: String,
-      default: ""
+      default: "",
     },
   },
   data() {
@@ -119,18 +122,18 @@ export default {
       srcList: [""],
       type: "",
       discountFiles: [], //上传附件数组
-      btnShow:true,
+      btnShow: true,
     };
   },
   methods: {
     // 上传文件
-    handleChange(file,index) {
+    handleChange(file, index) {
       this.loading = true;
       const max = this.maxSize * 1024 * 1024;
       if (file.size > max) {
         this.$message({
           message: "上传文件大小不能超过" + this.maxSize + "M!",
-          type: "warning"
+          type: "warning",
         });
         this.loading = false;
         return false;
@@ -157,13 +160,13 @@ export default {
         const data = {
           fileName: file.name,
           itemcode: this.urlName,
-          fileContent: fileCode
+          fileContent: fileCode,
         };
         const res = await uploadData(data, this);
         if (res.success == true) {
-          let obj = {id:res.data.id,fileName:res.data.fileName}
-          this.discountFiles.push(obj)
-          this.$emit("getUpload", this.discountFiles,index);
+          let obj = { id: res.data.id, fileName: res.data.fileName };
+          this.discountFiles.push(obj);
+          this.$emit("getUpload", this.discountFiles, index, this.index);
           // this.$emit("getUpload", res.data.id,this.index);
           this.loading = false;
         } else {
@@ -172,12 +175,12 @@ export default {
       };
     },
     // 表单点击预览
-    check(item,index) {
+    check(item, index) {
       this.pdfSrc = "";
       this.srcList = false;
       this.type = "";
       let file = {
-        id: item.id
+        id: item.id,
       };
 
       uploadCheck(file).then((res) => {
@@ -186,8 +189,8 @@ export default {
           this.type = res.data.fileSufx;
           // 打开pdf
           const fileName = res.data.fileName.split(".").slice(-1);
-          if(fileName){
-          // if (res.data.fileSufx === "pdf") {
+          if (fileName) {
+            // if (res.data.fileSufx === "pdf") {
             const b = this.dataURLtoBlob(res.data.fileContent.slice(28));
             if (this.openFileType === "dialog") {
               this.dialogFile = true;
@@ -220,24 +223,26 @@ export default {
       return url;
     },
 
-    deltabpdf(item,index) {
+    deltabpdf(item, index) {
       // this.discountFiles =  this.discountFiles.splice(index, 1);
-      this.discountFiles = this.discountFiles.filter((currentValue, indedx, arr)=> indedx !== index);
+      this.discountFiles = this.discountFiles.filter(
+        (currentValue, indedx, arr) => indedx !== index
+      );
       // this.discountFiles = this.discountFiles.filter(obj => obj.id !== item.id);
-      this.$emit("getUpload", this.discountFiles,index);
+      this.$emit("getUpload", this.discountFiles, index);
     },
   },
-  mounted(){
-    if(this.fileStas=="已录入发票"){
-      this.btnShow = false
-    }else if(this.fileStas=="未付款"){
-      this.btnShow = false
-    }else if(this.fileStas=="已付款"){
-      this.btnShow = false
-    }else{
-      this.btnShow = true
+  mounted() {
+    if (this.fileStas == "已录入发票") {
+      this.btnShow = false;
+    } else if (this.fileStas == "未付款") {
+      this.btnShow = false;
+    } else if (this.fileStas == "已付款") {
+      this.btnShow = false;
+    } else {
+      this.btnShow = true;
     }
-  }
+  },
 };
 </script>
 
@@ -277,4 +282,4 @@ export default {
   height: 90%;
   padding: 25px 25px 0px;
 }
-</style>
+</style>

+ 8 - 1
src/views/page/orderManage-sup/purOrderDelivery/deliveryDetail.vue

@@ -152,7 +152,11 @@
          type="selection"
            width="55">
          </el-table-column>
-          <el-table-column fixed type="index" label="序号" width="60" />
+          <el-table-column fixed  label="序号" width="60">
+                <template slot-scope="scope">
+                 <span>{{scopIndex(scope.$index)}}</span>
+            </template>
+          </el-table-column>
           <el-table-column label="耗材编码" prop="prodCode" />
           <el-table-column label="医保编码" prop="hiCode" />
           <el-table-column label="耗材信息" width="300">
@@ -843,6 +847,9 @@ export default {
     this.getData();
   },
   methods: {
+    scopIndex(index){
+       console.log(index,'3303');
+    },
     lotNumCheck(row, ruleArray) {
       let rule = [];
       let isId = this.multipleSelection.filter((item) => {

+ 1 - 0
src/views/page/orderManage-sup/purOrderDelivery/printView.vue

@@ -116,6 +116,7 @@
       <div class="grap">收货人(签名):</div>
     </div>
     <div class="remarks">备注 :</div>
+    <div style="page-break-after:always"></div>
   </div>
 </template>
 <script>

+ 310 - 206
src/views/page/procurement-settlement/invoiceManage/consumptionDetail.vue

@@ -49,9 +49,8 @@
                 {{ listForm.stas }}
               </div>
             </el-form-item>
-             <el-form-item label=" " prop="">
-              <div class="content">
-              </div>
+            <el-form-item label=" " prop="">
+              <div class="content"></div>
             </el-form-item>
           </div>
         </div>
@@ -59,97 +58,160 @@
     </div>
     <div class="common-card">
       <h3>发票信息</h3>
-      <el-form
-        :model="listForm"
-        ref="listform"
-        label-width="180px"
-        class="grid-form-class"
+      <div
+        style="
+          width: 120px;
+          height: 40px;
+          position: absolute;
+          right: 20px;
+          top: 5px;
+        "
       >
-        <div class="form-body">
-          <div class="flex-css">
-            <el-form-item label="开票名称" prop="invoName" :rules="rules.required">
+        <el-button type="primary" @click="addInvoData()" v-if="isShow"
+          >添加发票信息</el-button
+        >
+      </div>
+      <el-form :model="invoForm" ref="invoForm">
+        <el-table
+          ref="table"
+          v-loading="listLoading"
+          element-loading-text="加载中"
+          :data="invoForm.invoData"
+          class="print-table"
+          border
+        >
+          <template slot="empty">
+            <img src="@/assets/nopage.png" alt />
+            <p>暂无数据</p>
+          </template>
+          <el-table-column type="index" label="序号" border align="center" />
+          <el-table-column label="开票名称" props="invoName" align="center">
+            <template slot-scope="scope">
+              <el-form-item
+                :prop="'invoData.' + scope.$index + '.invoName'"
+                :rules="rules.required"
+              >
                 <el-input
-                v-if="isShow"
-                v-model="listForm.invoName"
-                placeholder="请输入开票名称"
-                maxlength="50"
-              ></el-input>
-              <div class="content" v-else>
-                {{listForm.invoName}}
-              </div>
-            </el-form-item>
-            <el-form-item label="发票号码" prop="invoNo"  :rules="rules.required">
+                  v-model="scope.row.invoName"
+                  placeholder="请输入开票名称"
+                  maxlength="50"
+                  v-if="isShow"
+                ></el-input>
+                <span v-else>{{ scope.row.invoName }}</span>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="发票号码" props="invoNo" align="center">
+            <template slot-scope="scope">
+              <el-form-item
+                :prop="'invoData.' + scope.$index + '.invoNo'"
+                :rules="rules.required"
+              >
                 <el-input
-                v-if="isShow"
-                v-model="listForm.invoNo"
-                placeholder="请输入发票号码"
-                maxlength="50"
-              ></el-input>
-              <div class="content" v-else>
-                {{listForm.invoNo}}
-              </div>
-            </el-form-item>
-            <el-form-item label="开票日期" prop="invoDate"  :rules="rules.dateRequired">
+                  v-model="scope.row.invoNo"
+                  placeholder="请输入发票号码"
+                  maxlength="50"
+                  v-if="isShow"
+                ></el-input>
+                <span v-else>{{ scope.row.invoNo }}</span>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="开票日期" props="invoDate" align="center">
+            <template slot-scope="scope">
+              <el-form-item
+                :prop="'invoData.' + scope.$index + '.invoDate'"
+                :rules="rules.dateRequired"
+              >
                 <el-date-picker
-                v-model="listForm.invoDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                v-if="isShow"
-                placeholder="选择日期">
+                  v-model="scope.row.invoDate"
+                  type="date"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择日期"
+                  v-if="isShow"
+                >
                 </el-date-picker>
-                <div class="content" v-else>
-                {{listForm.invoDate}}
-              </div>
-            </el-form-item>
-          </div>
-          <div class="flex-css">
-            <el-form-item label="开票金额" prop="invoAmt"  :rules="rules.numPot2">
+                <span v-else>{{ formatDate(scope.row.invoDate) }}</span>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="开票金额" props="invoAmt" align="center">
+            <template slot-scope="scope">
+              <el-form-item
+                :prop="'invoData.' + scope.$index + '.invoAmt'"
+                :rules="rules.numPot2"
+              >
                 <el-input
-                v-if="isShow"
-                v-model="listForm.invoAmt"
-                placeholder="请输入开票金额"
-                maxlength="50"
-              ></el-input>
-              <div class="content" v-else>
-                {{listForm.invoAmt}}
-              </div>
-            </el-form-item>
-            <el-form-item label="发票文件"  prop="invoFile" :rules="rules.uploadRequired" >
+                  v-model="scope.row.invoAmt"
+                  placeholder="请输入开票金额"
+                  maxlength="50"
+                  v-if="isShow"
+                ></el-input>
+                <span v-else>{{ scope.row.invoAmt }}</span>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="发票文件" props="invoFile" align="center">
+            <template slot-scope="scope">
+              <el-form-item
+                :prop="'invoData.' + scope.$index + '.invoFile'"
+                :rules="rules.uploadRequired"
+                style="
+                  display: flex;
+                  justify-content: center;
+                  align-items: center;
+                "
+              >
                 <yl-upload
-                v-if="isShow"
-                :fileId="listForm.invoFile"
-              @getUpload="getUpload"
-              urlName="acco"
-            >
-              <template v-slot:dec>只能上传pdf文件</template>
-            </yl-upload>
-            <yl-upload
-                v-else
-              :fileId="listForm.invoFile"
-              :fileStas="listForm.stas"
-              readonly
-            >
-            </yl-upload>
-            </el-form-item>
-             <el-form-item label="核验文件" prop="invoChkFile"  :rules="rules.uploadRequired" >
+                  :fileId="scope.row.invoFile"
+                  @getUpload="getUpload"
+                  urlName="acco"
+                  :index="scope.$index"
+                  :readonly="!isShow"
+                >
+                  <!-- <template v-slot:dec>只能上传pdf文件</template> -->
+                </yl-upload>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="核验文件" props="invoChkFile" align="center">
+            <template slot-scope="scope">
+              <el-form-item
+                :prop="'invoData.' + scope.$index + '.invoChkFile'"
+                :rules="rules.uploadRequired"
+                style="
+                  display: flex;
+                  justify-content: center;
+                  align-items: center;
+                "
+              >
                 <yl-upload
-                v-if="isShow"
-              :fileId="listForm.invoChkFile"
-              @getUpload="getUpload1"
-              urlName="acco"
-            >
-              <template v-slot:dec>只能上传pdf文件</template>
-            </yl-upload>
-            <yl-upload
-                v-else
-              :fileId="listForm.invoChkFile"
-              :fileStas="listForm.stas"
-              readonly
-            >
-            </yl-upload>
-            </el-form-item>
-          </div>
-        </div>
+                  :fileId="scope.row.invoChkFile"
+                  @getUpload="getUpload1"
+                  urlName="acco"
+                  :index="scope.$index"
+                  :readonly="!isShow"
+                >
+                  <!-- <template v-slot:dec>只能上传pdf文件</template> -->
+                </yl-upload>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+            align="center"
+          >
+            <template slot-scope="scope" v-if="isShow">
+              <div>
+                <el-button type="text" @click="deleteInvoData(scope.$index)"
+                  >删除</el-button
+                >
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
       </el-form>
     </div>
     <div class="common-card">
@@ -166,51 +228,49 @@
           show-summary
           :header-cell-style="getRowClass"
           class="print-table"
-          >
+        >
           <template slot="empty">
             <img src="@/assets/nopage.png" alt />
             <p>暂无数据</p>
           </template>
-          <el-table-column
-            :label="tableLabel"
-            align="center"      
-            >
-          <!-- :header-cell-style="{background:'#ccc',borderColor:'#000'}" -->
-          <el-table-column type="index" label="序号" border  align="center"/>
-          <el-table-column label="商品名称" prop="prodName" align="center"/>
-          <el-table-column label="规格" prop="spec" align="center" />
-          <el-table-column label="型号" prop="mol" align="center">
-          </el-table-column>
-          <el-table-column label="数量" prop="cnt" align="center"/>
-          <el-table-column label="单位" prop="unt" align="center"/>
-          <el-table-column label="单价" prop="pric" align="center"/>
-          <el-table-column label="总计" prop="amt" align="center"/>
-          <el-table-column label="类别" prop="mcsType" align="center">
-            <template #default="{ row }">
+          <el-table-column :label="tableLabel" align="center">
+            <!-- :header-cell-style="{background:'#ccc',borderColor:'#000'}" -->
+            <el-table-column type="index" label="序号" border align="center" />
+            <el-table-column label="商品名称" prop="prodName" align="center" />
+            <el-table-column label="规格" prop="spec" align="center" />
+            <el-table-column label="型号" prop="mol" align="center">
+            </el-table-column>
+            <el-table-column label="数量" prop="cnt" align="center" />
+            <el-table-column label="单位" prop="unt" align="center" />
+            <el-table-column label="单价" prop="pric" align="center" />
+            <el-table-column label="总计" prop="amt" align="center" />
+            <el-table-column label="类别" prop="mcsType" align="center">
+              <template #default="{ row }">
                 <span v-if="row.mcsType == '0'">普通耗材</span>
                 <span v-if="row.mcsType == '1'">高值耗材</span>
                 <span v-if="row.mcsType == '2'">试剂</span>
               </template>
-          </el-table-column>
-          <el-table-column label="是否集采" prop="isFas" align="center">
+            </el-table-column>
+            <el-table-column label="是否集采" prop="isFas" align="center">
               <template #default="{ row }">
                 <span v-if="row.isFas == '0'">非集采</span>
                 <span v-if="row.isFas == '1'">集采</span>
               </template>
-          </el-table-column>
-          <el-table-column label="批次" prop="lotNum" align="center">
-          </el-table-column>
-          <!-- <el-table-column label="生产日期" prop="retnCnt" align="center"/> -->
-          <!-- <el-table-column label="有效期" prop="prodEntp" align="center"/> -->
-          <el-table-column label="厂商" prop="prodEntp" align="center"/>
-          </el-table-column>
+            </el-table-column>
+            <el-table-column label="批次" prop="lotNum" align="center">
+            </el-table-column>
+            <el-table-column label="厂商" prop="prodEntp" align="center" />
           </el-table-column>
         </el-table>
-        <p class="price-css">共计 {{total}} 条</p>
+        <p class="price-css">共计 {{ total }} 条</p>
       </div>
     </div>
     <div class="foot-button">
-      <el-button type="primary" @click="handleSubmit" :loading="submitLoad" v-if="isShow"
+      <el-button
+        type="primary"
+        @click="handleSubmit"
+        :loading="submitLoad"
+        v-if="isShow"
         >提交</el-button
       >
       <el-button type="info" @click="handleBack">返 回</el-button>
@@ -221,8 +281,12 @@
 <script>
 import ylStep from "@/components/yl-step";
 import ylPagination from "@/components/yl-pagination";
-import ylUpload from "@/components/yl-upload-files";
-import {selectSetlStmtDetlD,insertSetlInvo} from "@/api/procurement-settlement/index"
+import ylUpload from "@/components/yl-upload";
+import {
+  selectSetlStmtDetlD,
+  insertSetlInvo,
+} from "@/api/procurement-settlement/index";
+import moment from "moment";
 import rules from "@/utils/rules";
 
 export default {
@@ -233,21 +297,24 @@ export default {
   },
   data() {
     return {
-      total:"",
+      total: "",
       rules,
+      invoForm: {
+        invoData: [], //发票数据
+      },
       listForm: {
-        stmtNo:"",
-        branchName:"",
-        isFas:"",
-        amt:"",
-        stmtPrd:"",
-        stas:"",
-        invoFile:"",
-        invoChkFile:"",
-        invoName:"",
-        invoNo:"",
-        invoDate :"",
-        invoAmt:"",
+        stmtNo: "",
+        branchName: "",
+        isFas: "",
+        amt: "",
+        stmtPrd: "",
+        stas: "",
+        invoFile: "",
+        invoChkFile: "",
+        invoName: "",
+        invoNo: "",
+        invoDate: "",
+        invoAmt: "",
       },
       stasOptions: [
         { value: "B", lable: "待录入发票" },
@@ -261,10 +328,10 @@ export default {
       list: [],
       isShow: false,
       sureLoading: false,
-      printLoading: false, 
-      tableLabel:"",
-      submitLoad:false,
-        // 打印
+      printLoading: false,
+      tableLabel: "",
+      submitLoad: false,
+      // 打印
       printObj: {
         id: "printMe",
         popTitle: "", // 打印配置页上方标题
@@ -273,16 +340,15 @@ export default {
         previewTitle: "", // 打印预览的标题(开启预览模式后出现),
         previewPrintBtnLabel: "", // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
         zIndex: "", // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面)
-        beforeEntryIframe () {
-            const cells = document.querySelectorAll('.cell')
-            for (let k7 = 0; k7 < cells.length; k7++) {
-              const cell = cells[k7]
-              // 在这里添加样式只是修改了打印的样式,不会污染原页面的样式
-              // 为了让表格中的内容自动换行,不需要的话可以删掉
-              cell.style.whiteSpace = 'pre-wrap' 
-  
-            }
-          },
+        beforeEntryIframe() {
+          const cells = document.querySelectorAll(".cell");
+          for (let k7 = 0; k7 < cells.length; k7++) {
+            const cell = cells[k7];
+            // 在这里添加样式只是修改了打印的样式,不会污染原页面的样式
+            // 为了让表格中的内容自动换行,不需要的话可以删掉
+            cell.style.whiteSpace = "pre-wrap";
+          }
+        },
         // beforeEntryIframe(copy) {
         //   console.log(copy,"copy")
         //   // copy是ele对象的深度拷贝,修改copy对象不会更改页面中table表格的样式,只会更改打印预览生成的表格的样式
@@ -320,7 +386,8 @@ export default {
     } else {
       this.isShow = false;
     }
-    this.tableLabel=this.$route.query.branchName+"对账明细";
+    this.invoForm.invoData = JSON.parse(this.$route.query.invoFile) || [];
+    this.tableLabel = this.$route.query.branchName + "对账明细";
     this.listForm.stmtNo = this.$route.query.stmtNo;
     this.listForm.branchName = this.$route.query.branchName;
     this.listForm.amt = this.$route.query.amt;
@@ -346,61 +413,85 @@ export default {
     this.getData();
   },
   methods: {
+    formatDate(row) {
+      return moment(row).format("YYYY-MM-DD");
+    },
+    //删除某一行发票
+    deleteInvoData(index) {
+      let newTableData = [...this.invoForm.invoData];
+      newTableData.splice(index, 1);
+      this.invoForm.invoData = newTableData;
+    },
+    //添加发票
+    addInvoData() {
+      let itemTableData = {
+        invoName: "",
+        invoNo: "",
+        invoDate: "",
+        invoAmt: "",
+        invoFile: "",
+        invoChkFile: "",
+      };
+      this.invoForm.invoData = [...this.invoForm.invoData, itemTableData];
+    },
     //设置表格第一行的颜色
     // getRowClass({ row, column, rowIndex, columnIndex }) {
     //     return "background:#e2e1e1;text-align:center";
     // },
     arraySpanMethod() {
-    //table合计行合并单元格
-    setTimeout(() => {
-      if (this.$refs.table.$el) {
-        let current = this.$refs.table.$el
-          .querySelector('.el-table__footer-wrapper')
-          .querySelector('.el-table__footer')
-        let cell = current.rows[0].cells
-        cell[1].colSpan = '13'
-      }
-    }, 50)
+      //table合计行合并单元格
+      setTimeout(() => {
+        if (this.$refs.table.$el) {
+          let current = this.$refs.table.$el
+            .querySelector(".el-table__footer-wrapper")
+            .querySelector(".el-table__footer");
+          let cell = current.rows[0].cells;
+          cell[1].colSpan = "13";
+        }
+      }, 50);
     },
     getSummaries(param) {
-        //table自定义合计行方法summary-method
-   const { columns, data } = param
-    const sums = []
-    columns.forEach((column, index) => {
-      if (index === 0) {
-        sums[index] = '合计';
-        return
-      }
-      if(index===7){
-        const values = data.map(item => Number(item[column.property]))
-        sums[1] = values.reduce((prev, curr) => {
-          return prev + curr
-        }, 0)
-        sums[1]=sums[1].toFixed(2)+"元"
-      }
-
-    })
-    return sums
+      //table自定义合计行方法summary-method
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "合计";
+          return;
+        }
+        if (index === 7) {
+          const values = data.map((item) => Number(item[column.property]));
+          sums[1] = values.reduce((prev, curr) => {
+            return prev + curr;
+          }, 0);
+          sums[1] = sums[1].toFixed(2) + "元";
+        }
+      });
+      return sums;
     },
-    getUpload(id) {
-      // console.log(id,"ididi");
-      this.listForm.invoFile = id;
+    getUpload(id, index) {
+      this.$set(this.invoForm.invoData[index], "invoFile", id);
+      this.invoForm = JSON.parse(JSON.stringify(this.invoForm));
       if (id) {
-        this.$refs.listform.clearValidate("invoFile");
-        // console.log(this.listForm.invoFile,"this.listForm.invoFile")
+        this.$refs.invoForm.clearValidate("invoFile");
       } else {
-        this.$refs.listform.validateField("invoFile");
+        this.$refs.invoForm.validateField("invoFile");
       }
+      this.$nextTick(() => {
+        this.$refs.invoForm.validate();
+      });
     },
-    getUpload1(id) {
-      // console.log(id,"ididi11111");
-      this.listForm.invoChkFile = id;
+    getUpload1(id, index) {
+      this.$set(this.invoForm.invoData[index], "invoChkFile", id);
+      this.invoForm = JSON.parse(JSON.stringify(this.invoForm));
       if (id) {
-        this.$refs.listform.clearValidate("invoChkFile");
-        // console.log(this.listForm.invoChkFile,"this.listForm.invoChkFile")
+        this.$refs.invoForm.clearValidate("invoChkFile");
       } else {
-        this.$refs.listform.validateField("invoChkFile");
+        this.$refs.invoForm.validateField("invoChkFile");
       }
+      this.$nextTick(() => {
+        this.$refs.invoForm.validate();
+      });
     },
     getData() {
       this.listLoading = true;
@@ -416,7 +507,14 @@ export default {
     },
     // 确认
     handleSubmit() {
-        this.$refs["listform"].validate((valid) => {
+      if (this.invoForm.invoData.length <= 0) {
+        this.$message({
+          message: "请添加发票信息",
+          type: "error",
+        });
+        return;
+      }
+      this.$refs["invoForm"].validate((valid) => {
         if (valid) {
           this.$confirm("确认提交", "提示", {
             confirmButtonText: "确定",
@@ -425,8 +523,10 @@ export default {
           })
             .then(() => {
               this.submitLoad = true;
-              this.listForm.stas = "C";
-              insertSetlInvo(this.listForm)
+              this.invoForm.invoData.map((item) => {
+                item.stmtNo = this.$route.query.stmtNo;
+              });
+              insertSetlInvo(this.invoForm.invoData)
                 .then((response) => {
                   this.$message({
                     message: "提交成功",
@@ -435,7 +535,10 @@ export default {
                   this.submitLoad = false;
                   this.$router.push({
                     name: "InvoiceManage",
-                    query:{spdId:this.$route.query.spdId,activeNameTab:this.$route.query.activeNameTab}
+                    query: {
+                      spdId: this.$route.query.spdId,
+                      activeNameTab: this.$route.query.activeNameTab,
+                    },
                   });
                 })
                 .catch(() => {
@@ -451,30 +554,31 @@ export default {
       });
     },
     // 返回
-    handleBack(){
-          this.$router.push({
-          name:"InvoiceManage",
-          query:{spdId:this.$route.query.spdId,activeNameTab:this.$route.query.activeNameTab}
-        })
-    }
+    handleBack() {
+      this.$router.push({
+        name: "InvoiceManage",
+        query: {
+          spdId: this.$route.query.spdId,
+          activeNameTab: this.$route.query.activeNameTab,
+        },
+      });
+    },
   },
 };
 </script>
 
 <style lang="scss" scoped>
 #printMe {
- ::v-deep .print-table {
- border: 1px solid #999;
- td,
- th {
- border-right: 1px solid #999;
-  border-bottom: 1px solid #999;
- }
- }
- ::v-deep .price-css{
+  ::v-deep .print-table {
+    border: 1px solid #999;
+    td,
+    th {
+      border-right: 1px solid #999;
+      border-bottom: 1px solid #999;
+    }
+  }
+  ::v-deep .price-css {
     margin-left: 94%;
- }
+  }
 }
-
-
 </style>

+ 71 - 70
src/views/page/procurement-settlement/invoiceManage/index.vue

@@ -2,7 +2,12 @@
   <!-- 业务对账 -->
   <div style="display: flex">
     <el-card style="width: 18%; margin-right: 18px; border-radius: 6px">
-      <el-tabs v-model="activeNametree" type="card" @tab-click="tabClick" stretch>
+      <el-tabs
+        v-model="activeNametree"
+        type="card"
+        @tab-click="tabClick"
+        stretch
+      >
         <!-- <el-tab-pane label="按分类" name="grp"></el-tab-pane> -->
         <el-tab-pane label="按机构" name="org"></el-tab-pane>
       </el-tabs>
@@ -33,16 +38,15 @@
               <p>暂无数据</p>
             </template>
             <el-table-column fixed type="index" label="序号" width="60" />
-            <el-table-column label="对账单号" prop="stmtNo">
-            </el-table-column>
-            <el-table-column label="客户名称" prop="branchName"  />
-            <el-table-column label="对账类型" prop="isFas" >
+            <el-table-column label="对账单号" prop="stmtNo"> </el-table-column>
+            <el-table-column label="客户名称" prop="branchName" />
+            <el-table-column label="对账类型" prop="isFas">
               <template #default="{ row }">
                 <span v-if="row.isFas == '0'">非集采</span>
                 <span v-if="row.isFas == '1'">集采</span>
               </template>
             </el-table-column>
-            <el-table-column label="对账金额" prop="amt"  />
+            <el-table-column label="对账金额" prop="amt" />
             <el-table-column label="对账周期" prop="stmtPrd" />
             <el-table-column label="状态" prop="stas" fixed="right">
               <template #default="{ row }">
@@ -84,8 +88,7 @@
               <p>暂无数据</p>
             </template>
             <el-table-column fixed type="index" label="序号" width="60" />
-            <el-table-column label="对账单号" prop="stmtNo">
-            </el-table-column>
+            <el-table-column label="对账单号" prop="stmtNo"> </el-table-column>
             <el-table-column label="客户名称" prop="branchName" />
             <el-table-column label="对账类型" prop="isFas">
               <template #default="{ row }">
@@ -94,7 +97,7 @@
               </template>
             </el-table-column>
             <el-table-column label="对账金额" prop="amt" />
-            <el-table-column label="对账周期" prop="stmtPrd"/>
+            <el-table-column label="对账周期" prop="stmtPrd" />
             <el-table-column label="状态" prop="stas" fixed="right">
               <template #default="{ row }">
                 <span v-if="row.stas == 'B'">待录入</span>
@@ -128,10 +131,8 @@
 <script>
 import ylPagination from "@/components/yl-pagination";
 import mcsInfo from "@/views/components/mcs-info.vue";
-import {
-  selectSpdList,
-} from "@/api/consumCataManage-sup/index";
-import {selectSetlStmtD} from "@/api/procurement-settlement/index"
+import { selectSpdList } from "@/api/consumCataManage-sup/index";
+import { selectSetlStmtD } from "@/api/procurement-settlement/index";
 import ylUpload from "@/components/yl-upload";
 export default {
   components: {
@@ -151,12 +152,12 @@ export default {
       listQuery: {
         current: 1,
         size: 10,
-        stas:"B"
+        stas: "B",
       },
       listQueryC: {
         current: 1,
         size: 10,
-        stas:"C"
+        stas: "C",
       },
       listLoading: false,
       list: [],
@@ -165,7 +166,7 @@ export default {
       totalC: 0,
       // tree
       activeNametree: "org",
-      routespdId:"",
+      routespdId: "",
     };
   },
   methods: {
@@ -210,33 +211,31 @@ export default {
     },
     // 点击获取医院药品列表
     handleNodeClick(data) {
-      // console.log(data, "data");
       this.listLoading = true;
       this.spdId = data.spdId;
       this.listQuery.spdId = this.spdId;
       this.listQueryC.spdId = this.spdId;
-      if(this.activeNameTab=="first"){
+      if (this.activeNameTab == "first") {
         selectSetlStmtD(this.listQuery)
-        .then((res) => {
-          this.list = res.data.records;
-          this.total = res.data.total;
-          this.listLoading = false;
-        })
-        .catch((err) => {
-          this.listLoading = false;
-        });
-      }else{
+          .then((res) => {
+            this.list = res.data.records;
+            this.total = res.data.total;
+            this.listLoading = false;
+          })
+          .catch((err) => {
+            this.listLoading = false;
+          });
+      } else {
         selectSetlStmtD(this.listQueryC)
-        .then((res) => {
-          this.listC = res.data.records;
-          this.totalC = res.data.total;
-          this.listLoading = false;
-        })
-        .catch((err) => {
-          this.listLoading = false;
-        });
+          .then((res) => {
+            this.listC = res.data.records;
+            this.totalC = res.data.total;
+            this.listLoading = false;
+          })
+          .catch((err) => {
+            this.listLoading = false;
+          });
       }
-      
     },
     // 获取医院列表
     getData(type) {
@@ -276,12 +275,12 @@ export default {
       // console.log(tab.name, "name");
       if (tab.name == "first") {
         this.getList();
-      } else if(tab.name=="second") {
+      } else if (tab.name == "second") {
         this.getlistCom();
       }
     },
     // 详情
-    handleDetails(row){
+    handleDetails(row) {
       if (this.spdId) {
         this.routespdId = this.spdId;
       } else {
@@ -290,20 +289,20 @@ export default {
       this.$router.push({
         name: "consumptionDetail",
         query: {
-          branchName:row.branchName,
+          branchName: row.branchName,
           stmtNo: row.stmtNo,
           branchName: row.branchName,
           isFas: row.isFas,
           amt: row.amt,
           stmtPrd: row.stmtPrd,
           stas: row.stas,
-          spdId:this.routespdId,
-          activeNameTab:this.activeNameTab,
-          detlCnt:row.detlCnt
+          spdId: this.routespdId,
+          activeNameTab: this.activeNameTab,
+          detlCnt: row.detlCnt,
         },
       });
     },
-    handleDetails1(row){
+    handleDetails1(row) {
       if (this.spdId) {
         this.routespdId = this.spdId;
       } else {
@@ -312,30 +311,29 @@ export default {
       this.$router.push({
         name: "consumptionDetail",
         query: {
-          branchName:row.branchName,
+          branchName: row.branchName,
           stmtNo: row.stmtNo,
           branchName: row.branchName,
           isFas: row.isFas,
           amt: row.amt,
           stmtPrd: row.stmtPrd,
           stas: row.stas,
-          spdId:this.routespdId,
-          detlCnt:row.detlCnt,
-          activeNameTab:this.activeNameTab,
-          invoFile:row.invoFile,
-          invoChkFile:row.invoChkFile,
-          invoName:row.invoName,
-          invoNo:row.invoNo,
-          invoDate :row.invoDate,
-          invoAmt:row.invoAmt,
+          spdId: this.routespdId,
+          detlCnt: row.detlCnt,
+          activeNameTab: this.activeNameTab,
+          invoFile: JSON.stringify(row.invoFile),
+          invoChkFile: row.invoChkFile,
+          invoName: row.invoName,
+          invoNo: row.invoNo,
+          invoDate: row.invoDate,
+          invoAmt: row.invoAmt,
         },
       });
-    },     
-    
+    },
   },
   mounted() {
     this.getData();
-    if (this.$route.query.spdId && this.$route.query.activeNameTab=="first") {
+    if (this.$route.query.spdId && this.$route.query.activeNameTab == "first") {
       // this.listQuery.spdId = this.$route.query.spdId;
       // selectSetlStmtD(this.listQuery)
       //   .then((res) => {
@@ -346,21 +344,24 @@ export default {
       //   .catch((err) => {
       //     this.listLoading = false;
       //   });
-      this.activeNameTab ="first"
+      this.activeNameTab = "first";
       this.getList();
-    }else if(this.$route.query.spdId && this.$route.query.activeNameTab=="second"){
-      this.activeNameTab ="second"
-      this.getlistCom()
-    //   this.listQueryC.spdId = this.$route.query.spdId;
-    //   selectSetlStmtD(this.listQueryC)
-    //     .then((res) => {
-    //       this.listC = res.data.records;
-    //       this.totalC = res.data.total;
-    //       this.listLoading = false;
-    //     })
-    //     .catch((err) => {
-    //       this.listLoading = false;
-    //     });
+    } else if (
+      this.$route.query.spdId &&
+      this.$route.query.activeNameTab == "second"
+    ) {
+      this.activeNameTab = "second";
+      this.getlistCom();
+      //   this.listQueryC.spdId = this.$route.query.spdId;
+      //   selectSetlStmtD(this.listQueryC)
+      //     .then((res) => {
+      //       this.listC = res.data.records;
+      //       this.totalC = res.data.total;
+      //       this.listLoading = false;
+      //     })
+      //     .catch((err) => {
+      //       this.listLoading = false;
+      //     });
     }
   },
 };

+ 75 - 56
src/views/page/procurement-settlement/paymentStatus/consumptionDetails.vue

@@ -22,11 +22,10 @@
               </div>
             </el-form-item>
             <el-form-item label="对账类型" prop="isFas">
-                <div class="content">
-                  {{ listForm.isFas }}
-                </div>
-              </el-form-item>
-            
+              <div class="content">
+                {{ listForm.isFas }}
+              </div>
+            </el-form-item>
           </div>
           <div class="flex-css">
             <el-form-item label="对账周期" prop="stmtPrd">
@@ -50,48 +49,60 @@
     </div>
     <div class="common-card">
       <h3>发票信息</h3>
-      <el-form
-        :model="listForm"
-        ref="listform"
-        label-width="180px"
-        class="grid-form-class"
-      >
-        <div class="form-body">
-          <div class="flex-css">
-            <el-form-item label="开票名称" prop="invoName">
-              <div class="content">
-                {{ listForm.invoName }}
-              </div>
-            </el-form-item>
-            <el-form-item label="发票号码" prop="invoNo" >
-              <div class="content">
-                {{ listForm.invoNo }}
-              </div>
-            </el-form-item>
-            <el-form-item label="开票日期" prop="invoDate">
-              <div class="content">
-                {{ listForm.invoDate }}
-              </div>
-            </el-form-item>
-          </div>
-          <div class="flex-css">
-            <el-form-item label="开票金额" prop="invoAmt">
-              <div class="content">
-                {{ listForm.invoAmt }}
-              </div>
-            </el-form-item>
-            <el-form-item label="发票文件" prop="invoFile" >
-              <yl-upload :fileId="listForm.invoFile" :fileStas="listForm.stas" readonly> </yl-upload>
-            </el-form-item>
-            <el-form-item
-              label="核验文件"
-              prop="invoChkFile"
-            >
-              <yl-upload :fileId="listForm.invoChkFile" :fileStas="listForm.stas" readonly> </yl-upload>
-            </el-form-item>
-          </div>
-        </div>
-      </el-form>
+       <el-table
+          ref="table"
+          element-loading-text="加载中"
+          :data="invoData"
+          class="print-table"
+          border
+        >
+          <template slot="empty">
+            <img src="@/assets/nopage.png" alt />
+            <p>暂无数据</p>
+          </template>
+          <el-table-column type="index" label="序号" border align="center" />
+          <el-table-column label="开票名称" props="invoName" align="center">
+            <template slot-scope="scope">
+                <span >{{ scope.row.invoName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="发票号码" props="invoNo" align="center">
+            <template slot-scope="scope">
+                <span >{{ scope.row.invoNo }}</span>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="开票日期" props="invoDate" align="center">
+            <template slot-scope="scope">
+               <span >{{ formatDate(scope.row.invoDate) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="开票金额" props="invoAmt" align="center">
+            <template slot-scope="scope">
+                 <span >{{ scope.row.invoAmt }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="发票文件" props="invoFile" align="center">
+            <template slot-scope="scope">
+                   <yl-upload
+                  :fileId="scope.row.invoFile"
+                  urlName="acco"
+                  readonly
+                >
+                </yl-upload>
+            </template>
+          </el-table-column>
+          <el-table-column label="核验文件" props="invoChkFile" align="center">
+            <template slot-scope="scope">
+                 <yl-upload
+                  :fileId="scope.row.invoChkFile"
+                  urlName="acco"
+                  readonly
+                >
+                </yl-upload>
+            </template>
+          </el-table-column>
+        </el-table>
     </div>
     <div class="common-card">
       <h3>付款信息</h3>
@@ -114,11 +125,10 @@
               </div>
             </el-form-item>
             <el-form-item label="账号" prop="accNo">
-                <div class="content">
-                  {{ listForm.accNo }}
-                </div>
-              </el-form-item>
-            
+              <div class="content">
+                {{ listForm.accNo }}
+              </div>
+            </el-form-item>
           </div>
           <div class="flex-css">
             <el-form-item label="付款日期" prop="payDate">
@@ -132,7 +142,12 @@
               </div>
             </el-form-item>
             <el-form-item label="附件" prop="payFile">
-              <yl-upload :fileId="listForm.payFile" :fileStas="listForm.stas" readonly> </yl-upload>
+              <yl-upload
+                :fileId="listForm.payFile"
+                :fileStas="listForm.stas"
+                readonly
+              >
+              </yl-upload>
             </el-form-item>
           </div>
         </div>
@@ -146,9 +161,9 @@
 
 <script>
 import ylStep from "@/components/yl-step";
-import ylUpload from "@/components/yl-upload-files";
+import ylUpload from "@/components/yl-upload";
 import { selectSetlStmtDetlD } from "@/api/procurement-settlement/index";
-
+import moment from "moment";
 export default {
   components: {
     ylStep,
@@ -156,6 +171,7 @@ export default {
   },
   data() {
     return {
+      invoData: [],
       listForm: {
         stmtNo: "",
         branchName: "",
@@ -184,10 +200,10 @@ export default {
         { value: "0", lable: "非集采" },
         { value: "1", lable: "集采" },
       ],
-
     };
   },
   created() {
+    this.invoData = JSON.parse(this.$route.query.invoFile) || [];
     this.listForm.stmtNo = this.$route.query.stmtNo;
     this.listForm.branchName = this.$route.query.branchName;
     this.listForm.amt = this.$route.query.amt;
@@ -220,6 +236,9 @@ export default {
     this.getData();
   },
   methods: {
+    formatDate(row) {
+      return moment(row).format("YYYY-MM-DD");
+    },
     //设置表格第一行的颜色
     // getRowClass({ row, column, rowIndex, columnIndex }) {
     //     return "background:#e2e1e1;text-align:center";

+ 68 - 66
src/views/page/procurement-settlement/paymentStatus/index.vue

@@ -2,7 +2,12 @@
   <!-- 业务对账 -->
   <div style="display: flex">
     <el-card style="width: 18%; margin-right: 18px; border-radius: 6px">
-      <el-tabs v-model="activeNametree" type="card" @tab-click="tabClick" stretch>
+      <el-tabs
+        v-model="activeNametree"
+        type="card"
+        @tab-click="tabClick"
+        stretch
+      >
         <!-- <el-tab-pane label="按分类" name="grp"></el-tab-pane> -->
         <el-tab-pane label="按机构" name="org"></el-tab-pane>
       </el-tabs>
@@ -33,16 +38,15 @@
               <p>暂无数据</p>
             </template>
             <el-table-column fixed type="index" label="序号" width="60" />
-            <el-table-column label="对账单号" prop="stmtNo">
-            </el-table-column>
-            <el-table-column label="客户名称" prop="branchName"  />
-            <el-table-column label="对账类型" prop="isFas" >
+            <el-table-column label="对账单号" prop="stmtNo"> </el-table-column>
+            <el-table-column label="客户名称" prop="branchName" />
+            <el-table-column label="对账类型" prop="isFas">
               <template #default="{ row }">
                 <span v-if="row.isFas == '0'">非集采</span>
                 <span v-if="row.isFas == '1'">集采</span>
               </template>
             </el-table-column>
-            <el-table-column label="对账金额" prop="amt"  />
+            <el-table-column label="对账金额" prop="amt" />
             <el-table-column label="对账周期" prop="stmtPrd" />
             <el-table-column label="状态" prop="stas" fixed="right">
               <template #default="{ row }">
@@ -84,8 +88,7 @@
               <p>暂无数据</p>
             </template>
             <el-table-column fixed type="index" label="序号" width="60" />
-            <el-table-column label="对账单号" prop="stmtNo">
-            </el-table-column>
+            <el-table-column label="对账单号" prop="stmtNo"> </el-table-column>
             <el-table-column label="客户名称" prop="branchName" />
             <el-table-column label="对账类型" prop="isFas">
               <template #default="{ row }">
@@ -94,7 +97,7 @@
               </template>
             </el-table-column>
             <el-table-column label="对账金额" prop="amt" />
-            <el-table-column label="对账周期" prop="stmtPrd"/>
+            <el-table-column label="对账周期" prop="stmtPrd" />
             <el-table-column label="状态" prop="stas" fixed="right">
               <template #default="{ row }">
                 <span v-if="row.stas == 'C'">未付款</span>
@@ -128,16 +131,14 @@
 <script>
 import ylPagination from "@/components/yl-pagination";
 import mcsInfo from "@/views/components/mcs-info.vue";
-import {
-  selectSpdList,
-} from "@/api/consumCataManage-sup/index";
-import {selectSetlStmtD} from "@/api/procurement-settlement/index"
+import { selectSpdList } from "@/api/consumCataManage-sup/index";
+import { selectSetlStmtD } from "@/api/procurement-settlement/index";
 import ylUpload from "@/components/yl-upload";
 export default {
   components: {
     ylPagination,
     ylUpload,
-    mcsInfo,
+    mcsInfo
   },
   data() {
     return {
@@ -146,17 +147,17 @@ export default {
       data: [],
       defaultProps: {
         children: "children",
-        label: "spdName",
+        label: "spdName"
       },
       listQuery: {
         current: 1,
         size: 10,
-        stas:"C"
+        stas: "C"
       },
       listQueryC: {
         current: 1,
         size: 10,
-        stas:"Y"
+        stas: "Y"
       },
       listLoading: false,
       list: [],
@@ -165,7 +166,7 @@ export default {
       totalC: 0,
       // tree
       activeNametree: "org",
-      routespdId:"",
+      routespdId: ""
     };
   },
   methods: {
@@ -185,12 +186,12 @@ export default {
       // this.spdId = this.$route.query.spdId;
       this.listQuery.spdId = this.spdId;
       selectSetlStmtD(this.listQuery)
-        .then((res) => {
+        .then(res => {
           this.list = res.data.records;
           this.total = res.data.total;
           this.listLoading = false;
         })
-        .catch((err) => {
+        .catch(err => {
           this.listLoading = false;
         });
     },
@@ -199,12 +200,12 @@ export default {
       // this.spdId = this.$route.query.spdId;
       this.listQueryC.spdId = this.spdId;
       selectSetlStmtD(this.listQueryC)
-        .then((res) => {
+        .then(res => {
           this.listC = res.data.records;
           this.total = res.data.total;
           this.listLoading = false;
         })
-        .catch((err) => {
+        .catch(err => {
           this.listLoading = false;
         });
     },
@@ -215,41 +216,40 @@ export default {
       this.spdId = data.spdId;
       this.listQuery.spdId = this.spdId;
       this.listQueryC.spdId = this.spdId;
-      if(this.activeNameTab=="first"){
+      if (this.activeNameTab == "first") {
         selectSetlStmtD(this.listQuery)
-        .then((res) => {
-          this.list = res.data.records;
-          this.total = res.data.total;
-          this.listLoading = false;
-        })
-        .catch((err) => {
-          this.listLoading = false;
-        });
-      }else{
+          .then(res => {
+            this.list = res.data.records;
+            this.total = res.data.total;
+            this.listLoading = false;
+          })
+          .catch(err => {
+            this.listLoading = false;
+          });
+      } else {
         selectSetlStmtD(this.listQueryC)
-        .then((res) => {
-          this.listC = res.data.records;
-          this.totalC = res.data.total;
-          this.listLoading = false;
-        })
-        .catch((err) => {
-          this.listLoading = false;
-        });
+          .then(res => {
+            this.listC = res.data.records;
+            this.totalC = res.data.total;
+            this.listLoading = false;
+          })
+          .catch(err => {
+            this.listLoading = false;
+          });
       }
-      
     },
     // 获取医院列表
     getData(type) {
       this.data = [];
       this.listLoading = true;
       selectSpdList()
-        .then((res) => {
+        .then(res => {
           this.listQuery.spdId = res.data[0].spdId;
           this.data = res.data;
           console.log(this.data, "dadad");
           this.listLoading = false;
         })
-        .catch((err) => {
+        .catch(err => {
           this.listLoading = false;
         });
     },
@@ -263,7 +263,7 @@ export default {
     // 多选后选过的禁用
     selected(row, index) {
       if (
-        this.list.some((el) => {
+        this.list.some(el => {
           return el.hiCode === row.hiCode;
         })
       ) {
@@ -276,11 +276,11 @@ export default {
       console.log(tab.name, "name");
       if (tab.name == "first") {
         this.getList();
-      } else if(tab.name=="second") {
+      } else if (tab.name == "second") {
         this.getlistCom();
       }
     },
-    handleDetails(row){
+    handleDetails(row) {
       if (this.spdId) {
         this.routespdId = this.spdId;
       } else {
@@ -289,43 +289,45 @@ export default {
       this.$router.push({
         name: "consumptionDetails",
         query: {
-          branchName:row.branchName,
+          branchName: row.branchName,
           stmtNo: row.stmtNo,
           branchName: row.branchName,
           isFas: row.isFas,
           amt: row.amt,
           stmtPrd: row.stmtPrd,
           stas: row.stas,
-          spdId:this.routespdId,
-          detlCnt:row.detlCnt,
-          activeNameTab:this.activeNameTab,
-          invoFile:row.invoFile,
-          invoChkFile:row.invoChkFile,
-          invoName:row.invoName,
-          invoNo:row.invoNo,
-          invoDate :row.invoDate,
-          invoAmt:row.invoAmt,
+          spdId: this.routespdId,
+          detlCnt: row.detlCnt,
+          activeNameTab: this.activeNameTab,
+          invoFile: JSON.stringify(row.invoFile),
+          invoChkFile: row.invoChkFile,
+          invoName: row.invoName,
+          invoNo: row.invoNo,
+          invoDate: row.invoDate,
+          invoAmt: row.invoAmt,
           splerName: row.splerName,
           accName: row.accName,
           accNo: row.accNo,
           payDate: row.payDate,
           payAmt: row.payAmt,
-          payFile: row.payFile,
-        },
+          payFile: row.payFile
+        }
       });
-    },     
-    
+    }
   },
   mounted() {
     this.getData();
-    if (this.$route.query.spdId && this.$route.query.activeNameTab=="first") {
-      this.activeNameTab ="first"
+    if (this.$route.query.spdId && this.$route.query.activeNameTab == "first") {
+      this.activeNameTab = "first";
       this.getList();
-    }else if(this.$route.query.spdId && this.$route.query.activeNameTab=="second"){
-      this.activeNameTab ="second"
-      this.getlistCom()
+    } else if (
+      this.$route.query.spdId &&
+      this.$route.query.activeNameTab == "second"
+    ) {
+      this.activeNameTab = "second";
+      this.getlistCom();
     }
-  },
+  }
 };
 </script>