|
@@ -234,7 +234,38 @@
|
|
|
prop="fileUrl"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-image
|
|
|
+ ref="img"
|
|
|
+ :src="imageURL + item.url"
|
|
|
+ :preview-src-list="previewImages"
|
|
|
+ v-if="checkFileType(scope.row.fileUrl) == 'image'"
|
|
|
+ style="width: 120px; height: 120px"
|
|
|
+ fit="cover"
|
|
|
+ ></el-image>
|
|
|
+ <img
|
|
|
+ class="file"
|
|
|
+ src="@/assets/common/word.png"
|
|
|
+ v-if="checkFileType(scope.row.fileUrl) == 'word'"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ class="file"
|
|
|
+ src="@/assets/common/excel.png"
|
|
|
+ v-if="checkFileType(scope.row.fileUrl) == 'excel'"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ class="file"
|
|
|
+ src="@/assets/common/ppt.png"
|
|
|
+ v-if="checkFileType(scope.row.fileUrl) == 'ppt'"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ class="file"
|
|
|
+ src="@/assets/common/pdf.png"
|
|
|
+ v-if="checkFileType(scope.row.fileUrl) == 'pdf'"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="下载文件名称"
|
|
@@ -248,8 +279,11 @@
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
- <template slot-scope="">
|
|
|
- <el-button type="text" class="textColor" slot="reference"
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ class="textColor"
|
|
|
+ @click="downLoadFn(scope.row.fileUrl)"
|
|
|
>下载</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -276,7 +310,7 @@
|
|
|
</div>
|
|
|
<h3>审批</h3>
|
|
|
<el-divider></el-divider>
|
|
|
- <div class="diy-table-1">
|
|
|
+ <div v-if="detailList.examineStatus == 'WAIT'" class="diy-table-1">
|
|
|
<el-row :gutter="0">
|
|
|
<el-col :xs="12" :sm="12" :lg="12" class="item">
|
|
|
<div class="label">验收人</div>
|
|
@@ -313,9 +347,61 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ detailList.examineStatus == 'OK' || detailList.examineStatus == 'FAIL'
|
|
|
+ "
|
|
|
+ class="diy-table-1"
|
|
|
+ >
|
|
|
+ <el-row :gutter="0">
|
|
|
+ <el-col :xs="12" :sm="12" :lg="12" class="item">
|
|
|
+ <div class="label">验收人</div>
|
|
|
+ <div class="value">{{ detailList.checkBy }}</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="12" :sm="12" :lg="12" class="item">
|
|
|
+ <div class="label">验收日期</div>
|
|
|
+ <div class="value">
|
|
|
+ <el-date-picker
|
|
|
+ prefix-icon="''"
|
|
|
+ class="selectStyle"
|
|
|
+ v-model="detailList.checkDate"
|
|
|
+ type="datetime"
|
|
|
+ placeholder=""
|
|
|
+ default-time="00:00:00"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="12" :sm="24" :lg="24" class="item">
|
|
|
+ <div class="label">是否退押</div>
|
|
|
+ <div class="value">
|
|
|
+ <el-radio-group v-model="detailList.isRefundDeposit">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="12" :sm="24" :lg="24" class="item">
|
|
|
+ <div class="label">验收说明</div>
|
|
|
+ <div class="value">
|
|
|
+ <el-input
|
|
|
+ v-model="detailList.checkNote"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
<br />
|
|
|
<!-- 按钮 -->
|
|
|
- <div class="btn-group clearfix">
|
|
|
+ <!-- detailList.examineStatus != 'OK' || detailList.examineStatus != 'FAIL' -->
|
|
|
+ <div
|
|
|
+ class="btn-group clearfix"
|
|
|
+ v-if="
|
|
|
+ detailList.examineStatus == 'SAVE' || detailList.examineStatus == 'WAIT'
|
|
|
+ "
|
|
|
+ >
|
|
|
<div class="fl">
|
|
|
<el-button type="primary" size="small" @click="adoptFn"
|
|
|
>审批通过</el-button
|
|
@@ -329,6 +415,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import IMAGEUPLOAD from "@/components/Common/image-upload.vue";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import {
|
|
|
getDepositManageDetail,
|
|
@@ -341,11 +428,13 @@ export default {
|
|
|
required: true,
|
|
|
},
|
|
|
},
|
|
|
+ components: { IMAGEUPLOAD },
|
|
|
computed: {
|
|
|
...mapGetters(["name"]),
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ imageURL: this.$imageUrl,
|
|
|
listLoading: false, // 列表加载loading
|
|
|
dataList: [], // 列表数据
|
|
|
detailList: {},
|
|
@@ -356,10 +445,36 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ console.log(this.$imageUrl, 8888);
|
|
|
this.checkBy = this.name;
|
|
|
this.getData({ id: this.detailId });
|
|
|
},
|
|
|
methods: {
|
|
|
+ //下载
|
|
|
+ downLoadFn(v) {
|
|
|
+ window.open(this.imageURL + v);
|
|
|
+ },
|
|
|
+ // 检查文件类型
|
|
|
+ checkFileType(url) {
|
|
|
+ if (!url) return "";
|
|
|
+ const fileSuffix = url.substring(url.lastIndexOf(".") + 1);
|
|
|
+
|
|
|
+ if (["jpg", "jpeg", "png"].includes(fileSuffix)) {
|
|
|
+ return "image";
|
|
|
+ } else if (["doc", "docx", "dot", "wps", "wpt"].includes(fileSuffix)) {
|
|
|
+ return "word";
|
|
|
+ } else if (["xls", "xlsx", "xlt", "et", "ett"].includes(fileSuffix)) {
|
|
|
+ return "excel";
|
|
|
+ } else if (
|
|
|
+ ["ppt", "pptx", "dps", "dpt", "pot", "pps"].includes(fileSuffix)
|
|
|
+ ) {
|
|
|
+ return "ppt";
|
|
|
+ } else if (["pdf"].includes(fileSuffix)) {
|
|
|
+ return "pdf";
|
|
|
+ } else {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ },
|
|
|
//审批驳回
|
|
|
async rejectFn() {
|
|
|
let data = {
|
|
@@ -371,6 +486,8 @@ export default {
|
|
|
examineResult: 0,
|
|
|
};
|
|
|
await getDepositManageExamine(data);
|
|
|
+ this.$message.success("审批驳回");
|
|
|
+ this.$parent.showSurrender = true;
|
|
|
},
|
|
|
//审批通过
|
|
|
async adoptFn() {
|
|
@@ -383,6 +500,8 @@ export default {
|
|
|
examineResult: 1,
|
|
|
};
|
|
|
await getDepositManageExamine(data);
|
|
|
+ this.$message.success("审批驳回");
|
|
|
+ this.$parent.showSurrender = false;
|
|
|
},
|
|
|
async getData(data) {
|
|
|
const res = await getDepositManageDetail(data);
|