Browse Source

7.29 18:24合并

Tartarus 2 năm trước cách đây
mục cha
commit
351ccfee8f

+ 8 - 0
src/api/auditlog.js

xqd
@@ -6,4 +6,12 @@ export function getAuditLogSearch(data) {
     method: 'post',
     data
   })
+}
+
+export function getAuditLogAttachmentsSearch(data) {
+  return request({
+    url: '/api/AuditLog/attachments',
+    method: 'post',
+    data
+  })
 }

+ 2 - 2
src/layout/components/Sidebar/index.vue

xqd
@@ -1,10 +1,10 @@
 <template>
   <div :class="{'has-logo':showLogo}">
-    <div class="flex4 boxtitle">
+    <!-- <div class="flex4 boxtitle">
       <el-image :src="logo" style="width: 100px; height: 78px;" fit=" fill"></el-image>
       <span style="color: #1F242A ;">55</span>
             <span style="color: #BEBDBB;">2456165645625454151</span>
-    </div>
+    </div> -->
 
 
     <el-scrollbar wrap-class="scrollbar-wrapper">

+ 626 - 572
src/views/contracts/detail.vue

xqd xqd
@@ -1,156 +1,271 @@
 <template>
-	<div>
-		<el-card class="box-card">
-			<el-col :xs="24" :sm="24" :md="10" :lg="10" :xl="12">
-				<div class="grid-content bg-purple">
-					<span style="font-weight: 600">合同基础信息</span>
-					<div class="titlein">
-						<span class="titlename">合同名称</span>
-						<span class="meatatitle">{{ contract.name }}</span>
-					</div>
-					<div class="titlein">
-						<span class="titlename">合同编号</span>
-						<span class="meatatitle">{{ contract.contractNo }}</span>
-					</div>
-					<div class="titlein">
-						<span class="titlename">合同附件</span>
-						<div style="display: flex">
-							<div class="imgbox">
-								<el-image v-for="(item) in picList" :key="item.id" style="width: 100px; height: 100px"
-									:src="item" />
-								<img v-for="(item) in picList" :key="item.id" style="width: 100px; height: 100px"
-									:src="item" />
-							</div>
-						</div>
-					</div>
-					<div class="titlein">
-						<span class="titlename">发票附件</span>
-						<div style="display: flex">
-							<div class="imgbox">
-								<el-image v-for="(item) in invoicePicList" :key="item.id"
-									style="width: 100px; height: 100px" :src="item" />
-
-							</div>
-						</div>
-					</div>
-				</div>
-			</el-col>
-			<el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="12">
-				<div class="jas">
-					<div class="titlein jas">
-						<span class="titlename">贸易合同</span>
-						<div style="display: flex">
-							<div class="imgbox">
-								<el-image v-for="(item) in tradePicList" :key="item.id"
-									style="width: 100px; height: 100px" :src="item" />
-
-							</div>
-						</div>
-					</div>
-					<div class="yusa jas">
-						<div class="boxas">
-							<span style="color: #fff">合同状态:</span>
-							<span style="color: #d05c39">{{
+  <div>
+    <el-card class="box-card">
+      <el-col :xs="24" :sm="24" :md="10" :lg="10" :xl="12">
+        <div class="grid-content bg-purple">
+          <span style="font-weight: 600">合同基础信息</span>
+          <div class="titlein">
+            <span class="titlename">合同名称</span>
+            <span class="meatatitle">{{ contract.name }}</span>
+          </div>
+          <div class="titlein">
+            <span class="titlename">合同编号</span>
+            <span class="meatatitle">{{ contract.contractNo }}</span>
+          </div>
+          <div class="titlein">
+            <span class="titlename">合同附件</span>
+            <div style="display: flex">
+              <div class="imgbox">
+                <template v-for="(item, index) in picList">
+                  <el-image
+                    v-if="isPDF(item)"
+                    :key="index"
+                    style="width: 100px; height: 100px"
+                    :src="item"
+                    :preview-src-list="picList"
+                  />
+                  <a v-else :key="index" :href="item" target="_blank">
+                    <img style="width: 100px; height: 100px" :src="pdf">
+                  </a>
+                </template>
+                <!-- <el-image
+                  v-for="(item) in picList"
+                  :key="item.id"
+                  style="width: 100px; height: 100px"
+                  :src="item"
+                />
+                <img
+                  v-for="(item) in picList"
+                  :key="item.id"
+                  style="width: 100px; height: 100px"
+                  :src="item"
+                /> -->
+              </div>
+            </div>
+          </div>
+          <div class="titlein">
+            <span class="titlename">发票附件</span>
+            <div style="display: flex">
+              <div class="imgbox">
+                <template v-for="(item, index) in invoicePicList">
+                  <el-image
+                    v-if="isPDF(item)"
+                    :key="index"
+                    style="width: 100px; height: 100px"
+                    :src="item"
+                    :preview-src-list="invoicePicList"
+                  />
+                  <a v-else :key="index" :href="item" target="_blank">
+                    <img style="width: 100px; height: 100px" :src="pdf">
+                  </a>
+                </template>
+                <!-- <el-image
+                  v-for="(item) in invoicePicList"
+                  :key="item.id"
+                  style="width: 100px; height: 100px"
+                  :src="item"
+                /> -->
+              </div>
+            </div>
+          </div>
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="12">
+        <div class="jas">
+          <div class="titlein jas">
+            <span class="titlename">贸易合同</span>
+            <div style="display: flex">
+              <div class="imgbox">
+                <template v-for="(item, index) in tradePicList">
+                  <el-image
+                    v-if="isPDF(item)"
+                    :key="index"
+                    style="width: 100px; height: 100px"
+                    :src="item"
+                    :preview-src-list="tradePicList"
+                  />
+                  <a v-else :key="index" :href="item" target="_blank">
+                    <img style="width: 100px; height: 100px" :src="pdf">
+                  </a>
+                </template>
+                <!-- <el-image
+                  v-for="(item) in tradePicList"
+                  :key="item.id"
+                  style="width: 100px; height: 100px"
+                  :src="item"
+                /> -->
+              </div>
+            </div>
+          </div>
+          <div class="yusa jas">
+            <div class="boxas">
+              <span style="color: #fff">合同状态:</span>
+              <span style="color: #d05c39">{{
                 contract.contractStatusText
               }}</span>
-						</div>
-						<span class="aoiisp">审核结果:
-							<p style="color: #d8ab5a">{{ contract.statusText }}</p>
-						</span>
-					</div>
-
-					<!-- 审核反馈和审核截图框  -->
-					<div class="yusa">
-						<el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="10" class="jas">
-							<el-form ref="form" :model="feed" label-width="0px">
-								<span class="sah">审核反馈:</span>
-								<el-form-item label="">
-									<el-input v-model="feed.feedback" type="textarea" />
-								</el-form-item>
-							</el-form>
-						</el-col>
-						<el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="14" class="jas">
-							<span class="sah">审核截图:</span>
-							<div style="display: flex; justify-content: flex-end">
-								<div class="imgbox">
-									<el-upload action="https://ht.9026.com/api/File" list-type="picture-card"
-										:on-success="handleFeedbackPicList">
-										<!-- <img v-if="feed.feedbackPicList" :src="feed.feedbackPicList" class="avatar"> -->
-										<i class="el-icon-plus" />
-									</el-upload>
-									<el-dialog :visible.sync="dialogVisible">
-										<img width="100%" :src="feed.feedbackPicList">
-									</el-dialog>
-								</div>
-							</div>
-						</el-col>
-					</div>
-					<div slot="" class="clearfix">
-						<el-button type="primary" style="float: right; margin-left: 10px">导出
-						</el-button>
-						<el-button v-if="contract.contractStatus === 0" type="danger" style="float: right"
-							@click="deletedContract">删除</el-button>
-
-						<el-button v-if="contract.contractStatus === 1" type="primary" style="float: right"
-							@click="recoverContract">恢复
-						</el-button>
-						<el-button v-if="role === 1" type="warning" style="float: right" @click="failed">审核失败
-						</el-button>
-						<el-button v-if="role === 1" type="success" style="float: right" @click="success">审核成功
-						</el-button>
-					</div>
-				</div>
-			</el-col>
-		</el-card>
-
-		<el-card class="box-card">
-			<el-table v-loading="listLoading" :data="temporaryList" element-loading-text="Loading" border fit
-				highlight-current-row @select="handleSelectionChange" @select-all="handleAll">
-				<el-table-column align="center" label="" width="55" type="selection" />
-				<el-table-column label="汇票名称" align="center" prop="name" />
-				<el-table-column label="汇票编号" align="center" prop="draftNo" />
-				<el-table-column label="承兑人" align="center" prop="acceptorName" />
-				<el-table-column label="金额" align="center">
-					<template slot-scope="scope">
-						{{ scope.row.money }}
-					</template>
-				</el-table-column>
-				<el-table-column label="服务费" align="center">
-					<template slot-scope="scope">
-						{{ scope.row.serviceMoney }}
-					</template>
-				</el-table-column>
-				<el-table-column label="汇票状态" align="center" prop="draftStatusText" />
-				<el-table-column label="审核状态" align="center">
-					<template slot-scope="scope">
-						{{ scope.row.statusText }}
-					</template>
-				</el-table-column>
-				<el-table-column align="center" prop="created_at" label="操作" width="250">
-					<template slot-scope="scope">
-						<el-tag type="primary" style="cursor: pointer; margin-right: 15px"
-							@click="tapDetail(scope.row.id)">查看详情</el-tag>
-						<el-tag v-if="scope.row.draftStatus == 1" type="success"
-							style="margin-right: 15px; cursor: pointer" @click="recover(scope.row.id)">恢复</el-tag>
-						<el-tag v-if="scope.row.draftStatus == 0" type="danger"
-							style="margin-right: 15px; cursor: pointer" @click="deleted(scope.row.id)">删除</el-tag>
-					</template>
-				</el-table-column>
-			</el-table>
-
-			<div class="pagesip">
-				<el-button v-if="role === 2" type="primary" @click="addNewBill">
-					新增汇票</el-button>
-				<el-button v-if="role === 1" type="success" style="float: right" @click="contractDraftSuccess">审核成功
-				</el-button>
-				<el-button v-if="role === 1" type="warning" style="float: right" @click="contractDraftFailed">审核失败
-				</el-button>
-				<el-button type="success" style="float: right" @click="recoverContractDraft">恢复
-				</el-button>
-				<el-button type="danger" style="float: right" @click="deletedContractDraft">删除</el-button>
-				<el-button type="primary" style="float: right; margin-left: 10px" @click="ExportsContractDraft">导出
-				</el-button>
-				<el-button type="primary" size="small" style="
+            </div>
+            <span
+              class="aoiisp"
+            >审核结果:
+              <p style="color: #d8ab5a">{{ contract.statusText }}</p></span>
+          </div>
+
+          <!-- 审核反馈和审核截图框  -->
+          <div class="yusa">
+            <el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="10" class="jas">
+              <el-form ref="form" :model="feed" label-width="0px">
+                <span class="sah">审核反馈:</span>
+                <el-form-item label="">
+                  <el-input v-model="feed.feedback" type="textarea" />
+                </el-form-item>
+              </el-form>
+            </el-col>
+            <el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="14" class="jas">
+              <span class="sah">审核截图:</span>
+              <div style="display: flex; justify-content: flex-end">
+                <div class="imgbox">
+                  <el-upload
+                    action="https://ht.9026.com/api/File"
+                    list-type="picture-card"
+                    :on-success="handleFeedbackPicList"
+                  >
+                    <!-- <img v-if="feed.feedbackPicList" :src="feed.feedbackPicList" class="avatar"> -->
+                    <i class="el-icon-plus" />
+                  </el-upload>
+                  <el-dialog :visible.sync="dialogVisible">
+                    <img width="100%" :src="feed.feedbackPicList">
+                  </el-dialog>
+                </div>
+              </div>
+            </el-col>
+          </div>
+          <div slot="" class="clearfix">
+            <el-button
+              type="primary"
+              style="float: right; margin-left: 10px"
+            >导出
+            </el-button>
+            <el-button
+              v-if="contract.contractStatus === 0"
+              type="danger"
+              style="float: right"
+              @click="deletedContract"
+            >删除</el-button>
+
+            <el-button
+              v-if="contract.contractStatus === 1"
+              type="primary"
+              style="float: right"
+              @click="recoverContract"
+            >恢复
+            </el-button>
+            <el-button
+              v-if="role === 1"
+              type="warning"
+              style="float: right"
+              @click="failed"
+            >审核失败
+            </el-button>
+            <el-button
+              v-if="role === 1"
+              type="success"
+              style="float: right"
+              @click="success"
+            >审核成功
+            </el-button>
+          </div>
+        </div>
+      </el-col>
+    </el-card>
+
+    <el-card class="box-card">
+      <el-table
+        v-loading="listLoading"
+        :data="temporaryList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        @select="handleSelectionChange"
+        @select-all="handleAll"
+      >
+        <el-table-column align="center" label="" width="55" type="selection" />
+        <el-table-column label="汇票名称" align="center" prop="name" />
+        <el-table-column label="汇票编号" align="center" prop="draftNo" />
+        <el-table-column label="承兑人" align="center" prop="acceptorName" />
+        <el-table-column label="金额" align="center">
+          <template slot-scope="scope">
+            {{ scope.row.money }}
+          </template>
+        </el-table-column>
+        <el-table-column label="服务费" align="center">
+          <template slot-scope="scope">
+            {{ scope.row.serviceMoney }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="汇票状态"
+          align="center"
+          prop="draftStatusText"
+        />
+        <el-table-column label="审核状态" align="center">
+          <template slot-scope="scope">
+            {{ scope.row.statusText }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="created_at"
+          label="操作"
+          width="250"
+        >
+          <template slot-scope="scope">
+            <el-tag
+              type="primary"
+              style="cursor: pointer; margin-right: 15px"
+              @click="tapDetail(scope.row.id)"
+            >查看详情</el-tag>
+            <el-tag
+              v-if="scope.row.draftStatus == 1"
+              type="success"
+              style="margin-right: 15px; cursor: pointer"
+              @click="recover(scope.row.id)"
+            >恢复</el-tag>
+            <el-tag
+              v-if="scope.row.draftStatus == 0"
+              type="danger"
+              style="margin-right: 15px; cursor: pointer"
+              @click="deleted(scope.row.id)"
+            >删除</el-tag>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagesip">
+        <el-button v-if="role === 2" type="primary" @click="addNewBill">
+          新增汇票</el-button>
+        <el-button
+          type="success"
+          style="float: right"
+          @click="recoverContractDraft"
+        >恢复
+        </el-button>
+        <el-button
+          type="danger"
+          style="float: right"
+          @click="deletedContractDraft"
+        >删除</el-button>
+        <el-button
+          type="primary"
+          style="float: right; margin-left: 10px"
+          @click="ExportsContractDraft"
+        >导出
+        </el-button>
+        <el-button
+          type="primary"
+          size="small"
+          style="
+>>>>>>> a56d1a10ff24406d6daa6c5c7166613d38fb8261
             background-color: #d8ab5a;
             border-color: #d8ab5a;
             margin: 0 20px;
@@ -172,430 +287,369 @@
 </template>
 
 <script>
-	import {
-		dataConversionUtil
-	} from '../../utils/Excel.js'
-	import logo from '@/assets/pdf.png'
-	export default {
-		data() {
-			return {
-				dialogVisible: false,
-				role: '',
-				srcList: [],
-				temporaryList: [],
-				list: [],
-				listLoading: false,
-				contract: {},
-				currentPage: 1,
-				multipleSelection: [],
-				pagesize: 11,
-				form: '',
-				invoicePicList: [],
-				picList: [],
-				tradePicList: [],
-				feedbackPicListArray: [],
-				pdf: logo,
-				/* 审核反馈和审核截图的数据 */
-				feed: {
-					id: '',
-					feedback: '',
-					feedbackPicList: [],
-					approveStatus: ''
-				}
-			}
-		},
 
-		mounted() {
+import { dataConversionUtil } from '../../utils/Excel.js'
+import logo from '@/assets/pdf.png'
+export default {
+  data() {
+    return {
+      dialogVisible: false,
+      role: '',
+      srcList: [],
+      temporaryList: [],
+      list: [],
+      listLoading: false,
+      contract: {},
+      currentPage: 1,
+      multipleSelection: [],
+      pagesize: 11,
+      form: '',
+      invoicePicList: [],
+      picList: [],
+      tradePicList: [],
+      feedbackPicListArray: [],
+      pdf: logo,
+      /* 审核反馈和审核截图的数据 */
+      feed: {
+        id: '',
+        feedback: '',
+        feedbackPicList: [],
+        approveStatus: ''
+      }
+    }
+  },
+
+  mounted() {
+    this.role = this.$store.state.user.userInfo.type
+    this.checked = this.$store.state.user.checked
+    this.getData()
+  },
+  methods: {
+    getData() {
+      const id = this.$route.query.id
+      this.$request({
+        url: '/api/Contract/' + id,
+        method: 'get'
+      }).then((res) => {
+        this.contract = res.data
+        this.invoicePicList = this.contract.invoicePicList
+        this.picList = this.contract.picList
+        this.list = res.data.contractDraft.result
+        this.feed.feedbackPicList = this.contract.feedbackPics
+        this.tradePicList = this.contract.tradePicList
+        this.feed.id = this.$route.query.id
+        this.feed.feedback = this.contract.feedback
+        this.getPageData()
+      })
+    },
+    isPDF(url) {
+      const fileType = ['pdf']
+      const index = url.lastIndexOf('.')
+      const type = url.substr(index + 1)
+      return fileType.indexOf(type) === -1
+    },
+    addNewBill() {
+      const id = this.$route.query.id
+      this.$router.push({
+        name: 'addnewbill',
+        query: {
+          id: id
+        }
+      })
+    },
+    tapDetail(id) {
+      this.$router.push({
+        name: 'billDetail',
+        query: {
+          id: id
+        }
+      })
+    },
+    handleAll(data) {
+      this.multipleSelection = data
+      console.log(this.multipleSelection)
+    },
+    handleSelectionChange(data) {
+      this.multipleSelection = data
+      console.log(this.multipleSelection)
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      this.getPageData()
+    },
+    jumpFirstPage() {
+      this.$refs.pagination.handleCurrentChange(1)
+      this.$emit('handleCurrentChange', 1)
+    },
+    jumpLastPage() {
+      const font = this.$refs.pagination
+      const cpage = Math.ceil(font.total / font.pageSize)
+      font.handleCurrentChange(cpage)
+    },
+    getPageData() {
+      const start = (this.currentPage - 1) * this.pagesize
+      const end = start + this.pagesize
+      this.srcList = this.list.slice(start, end)
+      this.temporaryList = this.srcList
+    },
+
+    /* 导出 */
+    ExportsContractDraft() {
+      if (this.multipleSelection === '') {
+        this.$message({
+          type: 'warning',
+          message: '请选择数据!'
+        })
+      } else {
+        var tableHeader = [
+          [
+            '序号',
+            '汇票名称',
+            '汇票编号',
+            '承兑人',
+            '金额',
+            '服务费',
+            '汇票状态',
+            '审核状态'
+          ]
+        ]
+        var dataList = []
+        this.multipleSelection.forEach((item, index) => {
+          dataList.push([
+            index + 1,
+            item.name,
+            item.draftNo,
+            item.acceptorName,
+            item.money,
+            item.serviceMoney,
+            item.draftStatusText,
+            item.statusText
+          ])
+        })
+        dataConversionUtil.dataToExcel('汇票列表', tableHeader, dataList)
+        this.$message.success('导出成功!')
+      }
+    },
+
+    /* 反馈图片图片上传成功 */
+
+    handleFeedbackPicList(res) {
+      // 解构
+      const { file } = res.data
+      this.feedbackPicListArray.push(file)
+      this.feed.feedbackPicList = this.feedbackPicListArray
+    },
+
+    /* 审核成功发送请求  */
+    success() {
+      /* 反馈图片赋值 */
+      this.feed.feedbackPicList = this.picList
+      /* 合同id赋值 */
+      this.feed.id = this.$route.query.id
+      /* 反馈内容赋值 */
+      this.feed.approveStatus = 1
+      this.$request({
+        url: '/api/Contract/approveContract',
+        method: 'post',
+        data: this.feed
+      }).then((res) => {
+        if (res.code === 200) {
+          this.$message({
+            type: 'success',
+            message: res.msg
+          })
+          this.getData()
+        } else {
+          this.$message({
+            type: 'error',
+            message: '提交失败'
+          })
+          this.getData()
+        }
+      })
+    },
+
+    /* 审核失败发送请求  */
+    failed() {
+      /* 反馈图片赋值 */
+      this.feed.feedbackPicList = this.picList
+      /* 合同id赋值 */
+      this.feed.id = this.$route.query.id
+      this.feed.approveStatus = 2
+      this.$request({
+        url: '/api/Contract/approveContract',
+        method: 'post',
+        data: this.feed
+      }).then((res) => {
+        if (res.code === 200) {
+          this.$message({
+            type: 'success',
+            message: res.msg
+          })
+          this.getData()
+        } else {
+          this.$message({
+            type: 'error',
+            message: '提交失败'
+          })
+          this.getData()
+        }
+      })
+    },
+    recoverContract() {
+      const id = this.$route.query.id
+      this.$request({
+        url: '/api/Contract/manage',
+        method: 'post',
+        data: {
+          ids: [id],
+          operateType: 2
+        }
+      }).then((res) => {
+        if (res.code === 200) {
+          this.$message({
+            type: 'success',
+            message: res.msg
+          })
+          this.getData()
+        } else {
+          this.$message({
+            type: 'error',
+            message: '提交失败'
+          })
+          this.getData()
+        }
+      })
+    },
+    deletedContract() {
+      const id = this.$route.query.id
+      this.$request({
+        url: '/api/Contract/manage',
+        method: 'post',
+        data: {
+          ids: [id],
+          operateType: 1
+        }
+      }).then((res) => {
+        if (res.code === 200) {
+          this.$message({
+            type: 'success',
+            message: res.msg
+          })
+          this.getData()
+        } else {
+          this.$message({
+            type: 'error',
+            message: '提交失败'
+          })
+          this.getData()
+        }
+      })
+    },
+    recoverContractDraft() {
+      const ids = Array.from(this.multipleSelection, ({ id }) => id)
+      this.$request({
+        url: '/api/Contract/contractDraft/manager',
+        method: 'post',
+        data: {
+          ids: ids,
+          operateType: 2
+        }
+      }).then((res) => {
+        if (res.code === 200) {
+          this.$message({
+            type: 'success',
+            message: res.msg
+          })
+          this.getData()
+        } else {
+          this.$message({
+            type: 'error',
+            message: '提交失败'
+          })
+          this.getData()
+        }
+      })
+    },
+    deletedContractDraft() {
+      const ids = Array.from(this.multipleSelection, ({ id }) => id)
+      this.$request({
+        url: '/api/Contract/contractDraft/manager',
+        method: 'post',
+        data: {
+          ids: ids,
+          operateType: 1
+        }
+      }).then((res) => {
+        if (res.code === 200) {
+          this.$message({
+            type: 'success',
+            message: res.msg
+          })
+          this.getData()
+        } else {
+          this.$message({
+            type: 'error',
+            message: '提交失败'
+          })
+          this.getData()
+        }
+      })
+    },
+    recover(id) {
+      this.$request({
+        url: '/api/Contract/contractDraft/manager',
+        method: 'post',
+        data: {
+          ids: [id],
+          operateType: 2
+        }
+      }).then((res) => {
+        if (res.code === 200) {
+          this.$message({
+            type: 'success',
+            message: res.msg
+          })
+          this.getData()
+        } else {
+          this.$message({
+            type: 'error',
+            message: '提交失败'
+          })
+          this.getData()
+        }
+      })
+    },
+    deleted(id) {
+      this.$request({
+        url: '/api/Contract/contractDraft/manager',
+        method: 'post',
+        data: {
+          ids: [id],
+          operateType: 1
+        }
+      }).then((res) => {
+        if (res.code === 200) {
+          this.$message({
+            type: 'success',
+            message: res.msg
+          })
+          this.getData()
+        } else {
+          this.$message({
+            type: 'error',
+            message: '提交失败'
+          })
+          this.getData()
+        }
+      })
+    },
+    back() {
+      this.$router.go(-1)
+    }
+  }
+}
 
-			this.role = this.$store.state.user.userInfo.type;
-			this.checked = this.$store.state.user.checked;
-			this.getData();
-
-		},
-		methods: {
-			getData() {
-				const id = this.$route.query.id
-				this.$request({
-					url: '/api/Contract/' + id,
-					method: 'get'
-				}).then((res) => {
-					this.contract = res.data;
-					this.invoicePicList = this.contract.invoicePicList;
-					this.picList = this.contract.picList;
-					this.list = res.data.contractDraft.result;
-					this.feed.feedbackPicList = this.contract.feedbackPics;
-					this.tradePicList = this.contract.tradePicList;
-					this.feed.id = this.$route.query.id;
-					this.feed.feedback = this.contract.feedback;
-					this.getPageData();
-				});
-
-			},
-			addNewBill() {
-				const id = this.$route.query.id
-				this.$router.push({
-					name: 'addnewbill',
-					query: {
-						id: id
-					}
-				})
-			},
-			tapDetail(id) {
-				this.$router.push({
-					name: 'billDetail',
-					query: {
-						id: id
-					}
-				})
-			},
-			handleAll(data) {
-				this.multipleSelection = data
-				console.log(this.multipleSelection)
-			},
-			handleSelectionChange(data) {
-				this.multipleSelection = data
-				console.log(this.multipleSelection)
-			},
-			handleCurrentChange(val) {
-				this.currentPage = val
-				this.getPageData()
-			},
-			jumpFirstPage() {
-				this.$refs.pagination.handleCurrentChange(1)
-				this.$emit('handleCurrentChange', 1)
-			},
-			jumpLastPage() {
-				const font = this.$refs.pagination
-				const cpage = Math.ceil(font.total / font.pageSize)
-				font.handleCurrentChange(cpage)
-			},
-			getPageData() {
-				const start = (this.currentPage - 1) * this.pagesize
-				const end = start + this.pagesize
-				this.srcList = this.list.slice(start, end)
-				this.temporaryList = this.srcList
-			},
-
-
-			/* 导出 */
-			ExportsContractDraft() {
-				if (this.multipleSelection === '') {
-					this.$message({
-						type: 'warning',
-						message: '请选择数据!'
-					})
-				} else {
-					var tableHeader = [
-						[
-							'序号',
-							'汇票名称',
-							'汇票编号',
-							'承兑人',
-							'金额',
-							'服务费',
-							'汇票状态',
-							'审核状态'
-						]
-					]
-					var dataList = []
-					this.multipleSelection.forEach((item, index) => {
-						dataList.push([
-							index + 1,
-							item.name,
-							item.draftNo,
-							item.acceptorName,
-							item.money,
-							item.serviceMoney,
-							item.draftStatusText,
-							item.statusText
-						])
-					})
-					dataConversionUtil.dataToExcel('汇票列表', tableHeader, dataList)
-					this.$message.success('导出成功!')
-				}
-			},
-
-			/* 反馈图片图片上传成功 */
-
-			handleFeedbackPicList(res) {
-				//解构
-				const {
-					file
-				} = res.data;
-				this.feedbackPicListArray.push(file)
-				this.feed.feedbackPicList = this.feedbackPicListArray;
-
-			},
-
-			/* 审核成功发送请求  */
-			success() {
-				/* 反馈图片赋值 */
-				this.feed.feedbackPicList = this.picList
-				/* 合同id赋值 */
-				this.feed.id = this.$route.query.id
-				/* 反馈内容赋值 */
-				this.feed.approveStatus = 1
-				this.$request({
-					url: '/api/Contract/approveContract',
-					method: 'post',
-					data: this.feed
-				}).then((res) => {
-					if (res.code === 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'error',
-							message: '提交失败'
-						})
-						this.getData()
-					}
-				})
-			},
-
-			/* 审核失败发送请求  */
-			failed() {
-				/* 反馈图片赋值 */
-				this.feed.feedbackPicList = this.picList
-				/* 合同id赋值 */
-				this.feed.id = this.$route.query.id
-				this.feed.approveStatus = 2
-				this.$request({
-					url: '/api/Contract/approveContract',
-					method: 'post',
-					data: this.feed
-				}).then((res) => {
-					if (res.code === 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'error',
-							message: '提交失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			recoverContract() {
-				const id = this.$route.query.id
-				this.$request({
-					url: '/api/Contract/manage',
-					method: 'post',
-					data: {
-						ids: [id],
-						operateType: 2
-					}
-				}).then((res) => {
-					if (res.code === 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'error',
-							message: '提交失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			deletedContract() {
-				const id = this.$route.query.id
-				this.$request({
-					url: '/api/Contract/manage',
-					method: 'post',
-					data: {
-						ids: [id],
-						operateType: 1
-					}
-				}).then((res) => {
-					if (res.code === 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'error',
-							message: '提交失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			recoverContractDraft() {
-				const ids = Array.from(this.multipleSelection, ({
-					id
-				}) => id)
-				this.$request({
-					url: '/api/Contract/contractDraft/manager',
-					method: 'post',
-					data: {
-						ids: ids,
-						operateType: 2
-					}
-				}).then((res) => {
-					if (res.code === 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'error',
-							message: '提交失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			deletedContractDraft() {
-				const ids = Array.from(this.multipleSelection, ({
-					id
-				}) => id)
-				this.$request({
-					url: '/api/Contract/contractDraft/manager',
-					method: 'post',
-					data: {
-						ids: ids,
-						operateType: 1
-					}
-				}).then((res) => {
-					if (res.code === 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'error',
-							message: '提交失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			recover(id) {
-				this.$request({
-					url: '/api/Contract/contractDraft/manager',
-					method: 'post',
-					data: {
-						ids: [id],
-						operateType: 2
-					}
-				}).then((res) => {
-					if (res.code === 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'error',
-							message: '提交失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			deleted(id) {
-				this.$request({
-					url: '/api/Contract/contractDraft/manager',
-					method: 'post',
-					data: {
-						ids: [id],
-						operateType: 1
-					}
-				}).then((res) => {
-					if (res.code === 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'error',
-							message: '提交失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			back() {
-				this.$router.go(-1)
-			},
-			// 批量审核汇票成功
-			contractDraftSuccess(){
-				const ids = Array.from(this.multipleSelection, ({
-					id
-				}) => id)
-				this.$request({
-					url:'/api/Contract/contractDraft/manager',
-					method:'post',
-					data:{
-						ids:ids,
-						operateType:3
-					}
-				}).then((res)=>{
-					if (res.code === 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'error',
-							message: '提交失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			// 批量审核汇票失败
-			contractDraftFailed(){
-				const ids = Array.from(this.multipleSelection, ({
-					id
-				}) => id)
-				this.$request({
-					url:'/api/Contract/contractDraft/manager',
-					method:'post',
-					data:{
-						ids:ids,
-						operateType:4
-					}
-				}).then((res)=>{
-					if (res.code === 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'error',
-							message: '提交失败'
-						})
-						this.getData()
-					}
-				})
-			}
-		}
-	}
 </script>
 
 <style lang="scss">

+ 149 - 94
src/views/contracts/new_file.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -49,7 +49,8 @@
         <span style="color: #d05c39">*支持上传pdf、jpg/jpeg、png格式</span>
       </div>
       <div>
-        <el-upload
+        <Upload v-model="form.invoicePics" />
+        <!-- <el-upload
           action="https://ht.9026.com/api/File"
           list-type="picture-card"
           :on-success="handleinvoicePics"
@@ -58,7 +59,7 @@
         </el-upload>
         <el-dialog :visible.sync="dialogVisible">
           <img width="100%" :src="form.invoicePics">
-        </el-dialog>
+        </el-dialog> -->
       </div>
       <!-- 贸易附件图片 -->
       <div class="titlesa">
@@ -66,7 +67,8 @@
         <span style="color: #d05c39">*支持上传pdf、jpg/jpeg、png格式</span>
       </div>
       <div>
-        <el-upload
+        <Upload v-model="form.tradePics" />
+        <!-- <el-upload
           action="https://ht.9026.com/api/File"
           list-type="picture-card"
           :on-success="handletradePics"
@@ -75,7 +77,7 @@
         </el-upload>
         <el-dialog :visible.sync="dialogVisible">
           <img width="100%" :src="form.tradePics">
-        </el-dialog>
+        </el-dialog> -->
       </div>
     </el-card>
 
@@ -84,12 +86,15 @@
       v-for="(item, index) in form.contractDrafts"
       :key="item.id"
       class="form"
-      style="margin: 20px;border: 1px solid #c0c0c0;padding: 10px;border-radius: 10px;"
+      style="
+        margin: 20px;
+        border: 1px solid #c0c0c0;
+        padding: 10px;
+        border-radius: 10px;
+      "
     >
-
       <!-- 汇票名称 -->
       <el-form ref="form" :model="item" label-width="90px">
-
         <el-form-item label="汇票名称">
           <el-input
             v-model="item.name"
@@ -106,7 +111,6 @@
             placeholder="选择日期"
             value-format="yyyy-MM-dd"
             @change="inputMoney(index, 4)"
-            @input="inputMoney(index)"
           />
         </el-form-item>
         <!-- 出票日期 -->
@@ -116,7 +120,6 @@
             type="date"
             placeholder="选择日期"
             class="ipwidth"
-            @change="change(index, 2)"
           />
         </el-form-item>
         <!-- 承兑日期 -->
@@ -128,7 +131,6 @@
             default-value
             value-format="yyyy-MM-dd"
             @change="inputMoney(index, 1)"
-            @input="inputMoney(index)"
           />
         </el-form-item>
         <!-- 到期日期 -->
@@ -137,7 +139,6 @@
             v-model="item.expireDate"
             type="date"
             placeholder="选择日期"
-            @change="change(index, 3)"
           />
         </el-form-item>
       </el-form>
@@ -170,6 +171,7 @@
             class="ipwidth"
             placeholder="计算得出服务费"
             style="width: 220px"
+            @input="inputMoney(index)"
           />
         </el-form-item>
         <!-- 最高贷款额度 -->
@@ -179,23 +181,28 @@
             class="ipwidth"
             placeholder="计算得出最高贷款额度"
             style="width: 220px"
+            @input="inputMoney(index)"
           />
         </el-form-item>
 
-
         <el-form-item label="利息">
           <el-input
             v-model="item.interest"
             class="ipwidth"
             placeholder="计算得出利息"
             style="width: 220px"
+            @input="inputMoney(index)"
           />
         </el-form-item>
       </el-form>
       <!-- 出票人 -->
       <el-form ref="form" :model="form" label-width="90px">
         <el-form-item label="出票人">
-          <el-select v-model="form.drawersName" filterable placeholder="请选择出票人">
+          <el-select
+            v-model="form.drawersName"
+            filterable
+            placeholder="请选择出票人"
+          >
             <el-option
               label="新增出票人"
               value=""
@@ -207,22 +214,24 @@
               :key="item.id"
               :label="item"
               :value="item"
-			   @click.native="getdrawersId(index,item)"
+              @click.native="getdrawersId(index, item)"
             />
           </el-select>
         </el-form-item>
         <!-- 承兑人 -->
         <el-form-item label="承兑人">
-          <el-select v-model="form.acceptorName" filterable placeholder="请选择承兑人">
+          <el-select
+            v-model="form.acceptorName"
+            filterable
+            placeholder="请选择承兑人"
+          >
             <el-option
               v-for="val in acceptorName"
               :key="val"
               :label="val"
-
               :value="val"
               @click.native="getRate(index)"
             />
-
           </el-select>
         </el-form-item>
 
@@ -434,10 +443,57 @@ export default {
   },
   methods: {
     inputMoney(index) {
-      const { money, serviceRate, interestRate, expectDiscountDate, issueDate } = this.form.contractDrafts[index]
-      this.form.contractDrafts[index].loanLimit = maxLoanAmount(money, serviceRate, interestRate, expectDiscountDate, issueDate)
+      this.getloanLimt(index)
+      this.getSerMoney(index)
+      this.getInterMoney(index)
+    },
+    /* 计算最高贷款额度 */
+    getloanLimt(index) {
+      const {
+        money,
+        serviceRate,
+        interestRate,
+        expectDiscountDate,
+        issueDate
+      } = this.form.contractDrafts[index]
+      this.form.contractDrafts[index].loanLimit = maxLoanAmount(
+        money,
+        serviceRate,
+        interestRate,
+        expectDiscountDate,
+        issueDate
+      )
+    },
+    // /* 计算服务费 */
+    getSerMoney(index) {
+      const {
+        loanLimit,
+        serviceRate,
+        expectDiscountDate,
+        issueDate
+      } = this.form.contractDrafts[index]
+      this.form.contractDrafts[index].serviceMoney = serviceCharge(
+        loanLimit,
+        serviceRate,
+        expectDiscountDate,
+        issueDate
+      )
+    },
+    /* 利息*/
+    getInterMoney(index) {
+      const {
+        loanLimit,
+        interestRate,
+        expectDiscountDate,
+        issueDate
+      } = this.form.contractDrafts[index]
+      this.form.contractDrafts[index].interest = interest(
+        loanLimit,
+        interestRate,
+        expectDiscountDate,
+        issueDate
+      )
     },
-    /* 确实上传按钮 */
     onSubmit() {
       this.$request({
         url: '/api/Contract',
@@ -522,18 +578,18 @@ export default {
       const list = this.acceptorList.filter(
         (item) => item.name === this.form.acceptorName
       )
-		console.log(list)
-	  this.form.contractDrafts[index].acceptorId=list[index].id
+      console.log(list)
+      this.form.contractDrafts[index].acceptorId = list[index].id
       this.form.contractDrafts[index].interestRate = list[index].interest
       this.form.contractDrafts[index].serviceRate = list[index].serviceRate
     },
-	// 获取出票人id
-	getdrawersId(index,name){
-		const drawers=this.drawersList.filter((item)=>item.name===name)
-		console.log(drawers)
-		this.form.contractDrafts[index].drawersId=drawers[index].id
-		console.log(drawers[index].id)
-	},
+    // 获取出票人id
+    getdrawersId(index, name) {
+      const drawers = this.drawersList.filter((item) => item.name === name)
+      console.log(drawers)
+      this.form.contractDrafts[index].drawersId = drawers[index].id
+      console.log(drawers[index].id)
+    },
     addDrawer() {
       this.$router.push({
         path: '/form/addTicketdrawer'
@@ -559,7 +615,6 @@ export default {
         expireDate: '',
         limitTime: ''
       })
-	  
     },
     // 删除汇票
     deletedraft(index) {
@@ -572,71 +627,71 @@ export default {
     },
 
     /* 计算时间段 */
-    change(e, number) {},
+    change(e, number) {}
 
-    /* 获取金额 */
-    getMoney(index) {
-      this.getloanLimt(index)
-      this.getSerMoney(index)
-      this.getInterMoney(index)
-    },
-    /* 计算最高贷款额度 */
-    getloanLimt(i) {
-      if (
-        this.form.contractDrafts[i].money &&
-        this.form.contractDrafts[i].serviceRate &&
-        this.form.contractDrafts[i].interestRate
-      ) {
-        this.form.contractDrafts[i].loanLimit = (
-          ((this.form.contractDrafts[i].money /
-            (this.form.contractDrafts[i].serviceRate +
-              this.form.contractDrafts[i].interestRate)) *
-            this.form.contractDrafts[i].limitTime) /
-            360 +
-          1
-        ).toFixed(2)
-      }
-    },
-    /* 计算服务费 */
-    getSerMoney(i) {
-      if (
-        this.form.contractDrafts[i].money &&
-        this.form.contractDrafts[i].serviceRate &&
-        this.form.contractDrafts[i].interestRate
-      ) {
-        this.form.contractDrafts[i].serviceMoney = (
-          ((((this.form.contractDrafts[i].money /
-            (this.form.contractDrafts[i].serviceRate +
-              this.form.contractDrafts[i].interestRate)) *
-            this.form.contractDrafts[i].limitTime) /
-            360 +
-            1) *
-            this.form.contractDrafts[i].serviceRate *
-            this.form.contractDrafts[i].limitTime) /
-          360
-        ).toFixed(2)
-      }
-    },
-    /* 利息*/
-    getInterMoney(i) {
-      if (
-        this.form.contractDrafts[i].money &&
-        this.form.contractDrafts[i].serviceRate &&
-        this.form.contractDrafts[i].interestRate
-      ) {
-        this.form.contractDrafts[i].interest = (
-          ((((this.form.contractDrafts[i].money /
-            (this.form.contractDrafts[i].serviceRate +
-              this.form.contractDrafts[i].interestRate)) *
-            this.form.contractDrafts[i].limitTime) /
-            360 +
-            1) *
-            this.form.contractDrafts[i].interestRate *
-            this.form.contractDrafts[i].limitTime) /
-          360
-        ).toFixed(2)
-      }
-    }
+    // /* 获取金额 */
+    // getMoney(index) {
+    //   this.getloanLimt(index)
+    //   this.getSerMoney(index)
+    //   this.getInterMoney(index)
+    // }
+    // /* 计算最高贷款额度 */
+    // getloanLimt(i) {
+    //   if (
+    //     this.form.contractDrafts[i].money &&
+    //     this.form.contractDrafts[i].serviceRate &&
+    //     this.form.contractDrafts[i].interestRate
+    //   ) {
+    //     this.form.contractDrafts[i].loanLimit = (
+    //       ((this.form.contractDrafts[i].money /
+    //         (this.form.contractDrafts[i].serviceRate +
+    //           this.form.contractDrafts[i].interestRate)) *
+    //         this.form.contractDrafts[i].limitTime) /
+    //         360 +
+    //       1
+    //     ).toFixed(2)
+    //   }
+    // },
+    // /* 计算服务费 */
+    // getSerMoney(i) {
+    //   if (
+    //     this.form.contractDrafts[i].money &&
+    //     this.form.contractDrafts[i].serviceRate &&
+    //     this.form.contractDrafts[i].interestRate
+    //   ) {
+    //     this.form.contractDrafts[i].serviceMoney = (
+    //       ((((this.form.contractDrafts[i].money /
+    //         (this.form.contractDrafts[i].serviceRate +
+    //           this.form.contractDrafts[i].interestRate)) *
+    //         this.form.contractDrafts[i].limitTime) /
+    //         360 +
+    //         1) *
+    //         this.form.contractDrafts[i].serviceRate *
+    //         this.form.contractDrafts[i].limitTime) /
+    //       360
+    //     ).toFixed(2)
+    //   }
+    // },
+    // /* 利息*/
+    // getInterMoney(i) {
+    //   if (
+    //     this.form.contractDrafts[i].money &&
+    //     this.form.contractDrafts[i].serviceRate &&
+    //     this.form.contractDrafts[i].interestRate
+    //   ) {
+    //     this.form.contractDrafts[i].interest = (
+    //       ((((this.form.contractDrafts[i].money /
+    //         (this.form.contractDrafts[i].serviceRate +
+    //           this.form.contractDrafts[i].interestRate)) *
+    //         this.form.contractDrafts[i].limitTime) /
+    //         360 +
+    //         1) *
+    //         this.form.contractDrafts[i].interestRate *
+    //         this.form.contractDrafts[i].limitTime) /
+    //       360
+    //     ).toFixed(2)
+    //   }
+    // }
   }
 }
 </script>

+ 3 - 1
src/views/databackup/index.vue

xqd xqd
@@ -205,6 +205,7 @@ export default {
     };
   },
 
+  
   mounted() {
     this.getAllList();
   },
@@ -237,12 +238,13 @@ export default {
 	
 
 	 // 日期审核状态查询
-    startEndTime() {
+    startEndTime(val) {
       this.formData.startTime = this.value2[0];
       this.formData.endTime = this.value2[1];
       this.currentPage = 1;
       this.searchForm = { ...this.formData };
       this.getAllList(this.searchForm);
+      
     },
 
     /* 分页功能,改变当前页 */

+ 323 - 189
src/views/sucuirtyaudit/annexList.vue

xqd xqd
@@ -1,177 +1,310 @@
 <template>
-	<div class="app-container">
-		<el-row type="flex" justify="space-between" style="margin-bottom:20px">
-			<div class="grid-content bg-purple">
-				<div class="grid-content bg-purple" style="margin-left: 30px;">
-					<el-input placeholder="请输入查询内容" v-model="input4" style="width: 80%;">
-						<i slot="prefix" class="el-input__icon el-icon-search"></i>
-					</el-input>
-				</div>
-			</div>
-			<div class="grid-content bg-purple">
-				<el-dropdown @command="handleCommand">
-					<div class="pulldown">
-						<span class="el-dropdown-link" v-if="!status">
-							操作人员
-						</span>
-						<span class="el-dropdown-link" v-if="status">
-							{{status}}
-						</span>
-						<i class="el-icon-arrow-down el-icon--right"></i>
-					</div>
-					<el-dropdown-menu slot="dropdown">
-						<el-dropdown-item command="供应商">供应商</el-dropdown-item>
-						<el-dropdown-item command="业务管理员">业务管理员</el-dropdown-item>
-					</el-dropdown-menu>
-				</el-dropdown>
-			</div>
+  <div class="app-container">
+    <el-row type="flex" justify="space-between" style="margin-bottom: 20px">
+      <div class="grid-content bg-purple">
+        <div class="grid-content bg-purple" style="margin-left: 30px">
+          <el-input
+            placeholder="请输入查询内容"
+            v-model="formData.content"
+            @change="Search"
+            style="width: 80%"
+          >
+            <i slot="prefix" class="el-input__icon el-icon-search"></i>
+          </el-input>
+        </div>
+      </div>
+      <div class="grid-content bg-purple">
+         <el-input
+          placeholder="操作人员查询"
+          v-model="formData.operateUser"
+          @change="SearchOperateUser"
+          style="width: 100%"
+        >
+          <i slot="prefix" class="el-input__icon el-icon-search"></i>
+        </el-input>
+      </div>
 
+      <div class="grid-content bg-purple">
+        <div class="block">
+          <el-date-picker
+            v-model="value2"
+            type="daterange"
+            align="right"
+            unlink-panels
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            value-format="yyyy-MM-dd"
+            :picker-options="pickerOptions"
+            @change="startEndTime"
+          >
+          </el-date-picker>
+        </div>
+      </div>
 
-			<div class="grid-content bg-purple">
-				<div class="block">
-					<el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
-						start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
-					</el-date-picker>
-				</div>
+      <div
+        class="grid-content bg-purple"
+        style="display: flex; justify-content: flex-end"
+      >
+        <el-button type="primary" @click="toindex">操作日志</el-button>
+        <el-button type="primary" disabled>附件列表</el-button>
+        <el-button type="primary">批量下载</el-button>
+      </div>
+    </el-row>
+    <el-table
+      v-loading="listLoading"
+      :data="temporaryList"
+      element-loading-text="Loading"
+      border
+      fit
+      highlight-current-row
+      @select="handleSelectionChange"
+      @select-all="handleAll"
+    >
+      <el-table-column align="center" label="" width="55" type="selection">
+      </el-table-column>
+      <el-table-column align="center" label="合同名称" width="200" prop="name">
+      </el-table-column>
 
-			</div>
-
-			<div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
-				<el-button type="primary" @click="toindex">操作日志</el-button>
-				<el-button type="primary" disabled>附件列表</el-button>
-				<el-button type="primary" @click="Exports">批量下载</el-button>
-			</div>
-
-		</el-row>
-		<el-table v-loading="listLoading" :data="temporaryList" element-loading-text="Loading" border fit
-			highlight-current-row @select="handleSelectionChange" @select-all="handleAll">
-			<el-table-column align="center" label="" width="55" type="selection">
-
-			</el-table-column>
-			<el-table-column align="center" label="合同名称" width="200" prop="name">
+      <el-table-column
+        label="供应商"
+        align="center"
+        width="340"
+        prop="supplierName"
+      >
+      </el-table-column>
+      <el-table-column label="日期" width="200" align="center">
+        <template slot-scope="scope">
+          <i class="el-icon-time" />
+          <span>{{ scope.row.createdAt }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        label="合同附件"
+        width="800"
+        prop="attachments"
+      >
+        <template slot-scope="scope">
+          <img
+            width="100"
+            height="100"
+            v-for="item in scope.row.attachments"
+            :key="item.id"
+            :src="item"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="created_at"
+        label="操作"
+        width="250"
+      >
+        <template slot-scope="scope">
+          <el-tag type="primary" style="cursor: pointer; margin-right: 15px"
+            >查看详情</el-tag
+          >
+          <el-tag
+            type="primary"
+            style="cursor: pointer; margin-right: 15px"
+            @click="download(scope.row.id)"
+          >
+            下载</el-tag
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="pagesip">
+      <el-button
+        type="primary"
+        size="small"
+        style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
+        @click="jumpFirstPage"
+        >首页
+      </el-button>
+      <el-pagination
+        ref="pagination"
+        background
+        layout="total,prev, pager, next"
+        :total="total"
+        :page-size="pagesize"
+        :current-page="currentPage"
+        prev-text="上一页"
+        next-text="下一页"
+        @current-change="handleCurrentChange"
+      />
+      <el-button
+        type="primary"
+        size="small"
+        style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
+        @click="jumpLastPage"
+        >尾页
+      </el-button>
+    </div>
+  </div>
+</template>
+>>>>>>> a56d1a10ff24406d6daa6c5c7166613d38fb8261
 
-			</el-table-column>
+<script>
+import { getAuditLogAttachmentsSearch } from "@/api/auditlog";
+export default {
+  filters: {
+    statusFilter(status) {
+      const statusMap = {
+        published: "success",
+        draft: "gray",
+        deleted: "danger",
+      };
+      return statusMap[status];
+    },
+  },
+  data() {
+    return {
+      // 表单数据
+      formData: {
+        startTime: "",
+        endTime: "",
+        name: "",
+        operateUser: "", //操作人员
+        content: "", //查询内容
+      },
+      /* 当前页数 */
+      currentPage: 1,
+      /* 每页显示个数 */
+      pagesize: 10,
+      /* 总条数 */
+      total: 20,
+      temporaryList: [],
+      srcList: [],
+      list: [],
+      listLoading: false,
+      status: "",
+      hpstatus: "",
+      input4: "",
+      checked: false,
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
+      },
+      value1: "",
+      value2: "",
+    };
+  },
+  mounted() {
+   this.getAllList();
+  },
+  methods: {
+	/* 获取列表数据 */
+    getAllList(searchForm = {}) {
+      const params = {
+        pageIndex: this.currentPage,
+        pageSize: this.pagesize,
+      };
+      getAuditLogAttachmentsSearch({ ...params, ...searchForm }).then((res) => {
+        const { data } = res;
+        console.log(data);
+        this.temporaryList = data.result;
+        this.srcList = data.result;
+        this.total = res.data.total;
+      });
+	},
 
-			<el-table-column label="供应商" align="center" width="340" prop="supplierName">
+    handleCommand(command) {
+      this.status = command;
+    },
+    handlehpCommand(command) {
+      this.hpstatus = command;
+    },
 
-			</el-table-column>
-			<el-table-column label="日期" width="200" align="center">
-				<template slot-scope="scope">
-					<i class="el-icon-time" />
-					<span>{{ scope.row.createdAt }}</span>
-				</template>
+	/* 请输入查询内容 */
+    Search() {
+      this.currentPage = 1;
+      this.searchForm = { ...this.formData };
+      this.getAllList(this.searchForm);
+    },
+    /* 操作人员查询*/
+    SearchOperateUser() {
+      console.log("我是操作人员");
+      this.currentPage = 1;
+      this.searchForm = {
+        ...this.formData,
+      };
+      this.getAllList(this.searchForm);
+    },
 
-			</el-table-column>
-			<el-table-column align="center" label="合同附件" width="800" prop="attachments">
-				<template slot-scope="scope">
-					<img width='100' height="100" v-for="item in scope.row.attachments" :src="item">
-				</template>
-			</el-table-column>
-			<el-table-column align="center" prop="created_at" label="操作" width="250">
-				<template slot-scope="scope">
-					<el-tag type="primary" style="cursor: pointer;margin-right: 15px;" @click="todetail(scope.row.id)">查看详情</el-tag>
-					<el-tag type="primary" style="cursor: pointer;margin-right: 15px;" @click="download(scope.row.id)">
-						下载</el-tag>
-				</template>
-			</el-table-column>
-		</el-table>
-		<div class="pagesip">
-			<el-button type="primary" size="small"
-				style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页
-			</el-button>
-			<el-pagination background @current-change="handleCurrentChange" layout="prev, pager, next"
-				:total="list.length" :page-size="11" prev-text="上一页" next-text="下一页" :hide-on-single-page="false"
-				ref="pagination">
-			</el-pagination>
-			<el-button type="primary" size="small"
-				style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页
-			</el-button>
-		</div>
-	</div>
-</template>
+    // 日期审核状态查询
+    startEndTime() {
+      this.formData.startTime = this.value2[0];
+      this.formData.endTime = this.value2[1];
+      this.currentPage = 1;
+      this.searchForm = { ...this.formData };
+      this.getAllList(this.searchForm);
+    },
 
-<script>
-	import {
-		getList
-	} from '@/api/table'
+    /* 分页功能,改变当前页 */
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getAllList(this.searchForm);
+    },
 
-	export default {
-		filters: {
-			statusFilter(status) {
-				const statusMap = {
-					published: 'success',
-					draft: 'gray',
-					deleted: 'danger'
-				}
-				return statusMap[status]
-			}
-		},
-		data() {
-			return {
-				temporaryList: [],
-				srcList: [],
-				list: [],
-				multipleSelection:[],
-				listLoading: false,
-				status: '',
-				currentPage: 1,
-				pagesize: 11,
-				hpstatus: '',
-				input4: '',
-				checked: false,
-				pickerOptions: {
-					shortcuts: [{
-						text: '最近一周',
-						onClick(picker) {
-							const end = new Date();
-							const start = new Date();
-							start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-							picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近一个月',
-						onClick(picker) {
-							const end = new Date();
-							const start = new Date();
-							start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-							picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近三个月',
-						onClick(picker) {
-							const end = new Date();
-							const start = new Date();
-							start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-							picker.$emit('pick', [start, end]);
-						}
-					}]
-				},
-				value1: '',
-				value2: ''
-			}
-		},
-		created() {},
-		mounted() {
-			this.$request({
-				url: '/api/AuditLog/attachments',
-				method: 'post',
-				data: {
-					pageIndex: 1,
-					pageSize: 100
-				}
-			}).then((res) => {
-				this.list = res.data.result
-				console.log(res)
-				this.getPageData();
-			})
-		},
-		methods: {
-			handleCommand(command) {
-				this.status = command
+    /* 分页功能去首页 */
+    jumpFirstPage() {
+      this.$refs.pagination.handleCurrentChange(1);
+      this.$emit("handleCurrentChange", 1);
+    },
+    /* 分页功能:去尾页 */
+    jumpLastPage() {
+      let font = this.$refs.pagination;
+      let cpage = Math.ceil(font.total / font.pageSize);
+      font.handleCurrentChange(cpage);
+    },
 
-			},
-			handlehpCommand(command) {
-				this.hpstatus = command
+    handleSelectionChange(data) {
+      this.multipleSelection = data;
+      console.log(this.multipleSelection);
+    },
+    handleAll(data) {
+      this.multipleSelection = data;
+      console.log(this.multipleSelection);
+    },
+    todetail() {
+      this.$router.push({
+        path: "/detail",
+      });
+    },
+    toindex() {
+      this.$router.push({
+        path: "/sucuirtyaudit/index",
+      });
+    },
 
 			},
 			handleSelectionChange(data) {
@@ -271,35 +404,36 @@
 				})
 			}
 		}
-	}
+	
+
 </script>
 <style lang="scss">
-	.pulldown {
-		width: 185px;
-		height: 40px;
-		border: 1px solid #E8E8E8;
-		border-radius: 10px;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		justify-content: space-between;
-		padding: 0 20px;
-		color: #999999;
-	}
+.pulldown {
+  width: 185px;
+  height: 40px;
+  border: 1px solid #e8e8e8;
+  border-radius: 10px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 20px;
+  color: #999999;
+}
 
-	.pagesip {
-		width: 100%;
-		margin: 20px auto;
-		display: flex;
-		// align-items: center;
-		justify-content: flex-end;
-	}
+.pagesip {
+  width: 100%;
+  margin: 20px auto;
+  display: flex;
+  // align-items: center;
+  justify-content: flex-end;
+}
 
-	.el-pagination.is-background .el-pager li:not(.disabled).active {
-		background-color: #D8AB5A;
-	}
+.el-pagination.is-background .el-pager li:not(.disabled).active {
+  background-color: #d8ab5a;
+}
 
-	.el-col {
-		margin-bottom: 20px;
-	}
+.el-col {
+  margin-bottom: 20px;
+}
 </style>

+ 2 - 2
src/views/sucuirtyaudit/index.vue

xqd
@@ -28,13 +28,13 @@
         <div class="block">
           <el-date-picker
             v-model="value2"
-            type="datetimerange"
+            type="daterange"
             align="right"
             unlink-panels
             range-separator="至"
             start-placeholder="开始日期"
             end-placeholder="结束日期"
-            value-format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd "
             :picker-options="pickerOptions"
             @change="startEndTime"
           >