scorpio 2 年之前
父節點
當前提交
7e2c13747a
共有 3 個文件被更改,包括 31 次插入29 次删除
  1. 1 1
      src/views/contract/component/info.vue
  2. 25 25
      src/views/contract/component/info2.vue
  3. 5 3
      src/views/contract/index.vue

+ 1 - 1
src/views/contract/component/info.vue

@@ -20,7 +20,7 @@
       >
         <div class="full-width flex flex-center flex-justify-between">
           <el-form-item label="合同名称" class="flex-child-average">
-            <el-input v-model="form.title" />
+            <el-input v-model="form.fileFolder.title" />
           </el-form-item>
           <el-form-item label="合同类别" class="flex-child-average">
             <div class="full-width">

+ 25 - 25
src/views/contract/component/info2.vue

@@ -5,29 +5,29 @@
     </div>
     <div class="ml-20 mr-20 mt-20">
       <avue-crud
-          :option="option"
-          :data="data"
-          ref="crud"
-          v-model="form"
-          :before-open="beforeOpen"
-          @row-del="rowDel"
-          @row-save="handleRowSave"
-          @on-load="onLoad"
+        :option="option"
+        :data="data"
+        ref="crud"
+        v-model="form"
+        :before-open="beforeOpen"
+        @row-del="rowDel"
+        @row-save="handleRowSave"
+        @on-load="onLoad"
       >
         <template #fileIds-form="{ row, type }">
           <div v-if="type === 'view'">
             <div
-                v-for="i in form.accountInformationFileList"
-                :key="i.id"
-                class="pointer"
-                @click="previewFile(i)"
+              v-for="i in form.accountInformationFileList"
+              :key="i.id"
+              class="pointer"
+              @click="previewFile(i)"
             >
               {{ i.title }}
               <el-button text type="primary" plain>查看</el-button>
             </div>
           </div>
           <div v-else>
-            <uploads :max="9" @success="uploadSucc" :auto="true"/>
+            <uploads :max="9" @success="uploadSucc" :auto="true" />
             <div>
               <div v-for="item in fileList" :key="item.id">
                 {{ item.originalFileName }}
@@ -38,9 +38,9 @@
       </avue-crud>
     </div>
     <el-image-viewer
-        v-if="showImage"
-        :url-list="preList"
-        @close="showImage = false"
+      v-if="showImage"
+      :url-list="preList"
+      @close="showImage = false"
     />
   </div>
 </template>
@@ -51,7 +51,7 @@ import api from '@/api/index.js'
 
 export default {
   name: 'info',
-  components: {uploads},
+  components: { uploads },
   data() {
     return {
       id: '',
@@ -197,7 +197,7 @@ export default {
   },
   methods: {
     onLoad() {
-      this.$api.contract.ledgerList({contractId: this.id}).then(res => {
+      this.$api.contract.ledgerList({ contractId: this.id }).then(res => {
         if (res.code === 200) {
           this.data = res.data
         }
@@ -216,7 +216,7 @@ export default {
       if (api.offices.includes(item.suffix)) {
         const routeData = this.$router.resolve({
           path: '/home/file_detail',
-          query: {id: item.fileId}
+          query: { id: item.fileId }
         })
         window.open(routeData.href, '_blank')
       } else {
@@ -227,12 +227,12 @@ export default {
     },
     handleRowSave(row, done, loading) {
       loading()
-      const data = Object.assign(row, {contractId: this.id})
+      const data = Object.assign(row, { contractId: this.id })
       this.$confirm(
-          '请检查并确认所填写内容是否正确,系统将会根据填写内容,计算合同付款等相关数据!',
-          {
-            type: 'warning'
-          }
+        '请检查并确认所填写内容是否正确,系统将会根据填写内容,计算合同付款等相关数据!',
+        {
+          type: 'warning'
+        }
       ).then(res => {
         if (res === 'confirm') {
           this.$api.contract.ledgerAdd(data).then(res => {
@@ -249,7 +249,7 @@ export default {
         type: 'warning'
       }).then(res => {
         if (res === 'confirm') {
-          this.$api.contract.remove({ids: row.id}).then(res => {
+          this.$api.contract.remove({ ids: row.id }).then(res => {
             if (res.code === 200) {
               this.$message.success(res.msg)
               this.onLoad()

+ 5 - 3
src/views/contract/index.vue

@@ -49,9 +49,10 @@
       v-model="form"
       :before-open="beforeOpen"
       @row-del="rowDel"
-      @row-save="rowSave"
-      @row-update="rowUpdate"
     >
+      <template #title="{ row }">
+        <div>{{ row.fileFolder.title }}</div>
+      </template>
     </avue-crud>
   </el-card>
 </template>
@@ -88,7 +89,8 @@ export default {
         column: [
           {
             label: '合同名称',
-            prop: 'title'
+            prop: 'title',
+            slot: true
           },
           {
             label: '合同编号',