|
@@ -36,31 +36,35 @@
|
|
|
</el-col>
|
|
|
<el-col :span="16" class="item">
|
|
|
<div class="label">备注</div>
|
|
|
- <div class="value">{{ detailData.remark }}</div>
|
|
|
+ <div class="value">
|
|
|
+ <el-input v-model="detailData.remark" :readonly="!edit" placeholder="请输入备注"></el-input>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="item file" style="width: 100%; height: auto">
|
|
|
+ <div class="label">附件</div>
|
|
|
+ <div class="value">
|
|
|
+ <div class="file-list">
|
|
|
+ <div class="file-item" v-for="item in detailData.salesOrderPictures">
|
|
|
+ <el-image
|
|
|
+ v-if="checkFileType(item.fileUrl) == 'image'"
|
|
|
+ class="img"
|
|
|
+ :src="$imageUrl + item.fileUrl"
|
|
|
+ :preview-src-list="[$imageUrl + item.fileUrl]"
|
|
|
+ ></el-image>
|
|
|
+ <div v-else class="box2" @click="openLink(item.fileUrl)">
|
|
|
+ <img src="@/assets/common/word.png" v-if="checkFileType(item.fileUrl) == 'word'" />
|
|
|
+ <img src="@/assets/common/excel.png" v-if="checkFileType(item.fileUrl) == 'excel'" />
|
|
|
+ <img src="@/assets/common/ppt.png" v-if="checkFileType(item.fileUrl) == 'ppt'" />
|
|
|
+ <img src="@/assets/common/pdf.png" v-if="checkFileType(item.fileUrl) == 'pdf'" />
|
|
|
+ <div class="name ellipsis-3">{{ item.fileName }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <div class="main-title">
|
|
|
- <div class="title">附件</div>
|
|
|
- </div>
|
|
|
- <el-row class="img-box">
|
|
|
- <el-col :span="24" class="item">
|
|
|
- <div class="value" style="height: 150px; width: 150px">
|
|
|
- <el-image
|
|
|
- style="height: 120px; widht: 120px"
|
|
|
- v-if="checkFileType(detailData.fileUrl) == 'image'"
|
|
|
- :src="$imageUrl + detailData.fileUrl"
|
|
|
- fit="fill"
|
|
|
- :preview-src-list="srcList"
|
|
|
- />
|
|
|
- <img class="file" src="@/assets/common/word.png" v-if="checkFileType(detailData.fileUrl) == 'word'" />
|
|
|
- <img class="file" src="@/assets/common/excel.png" v-if="checkFileType(detailData.fileUrl) == 'excel'" />
|
|
|
- <img class="file" src="@/assets/common/ppt.png" v-if="checkFileType(detailData.fileUrl) == 'ppt'" />
|
|
|
- <img class="file" src="@/assets/common/pdf.png" v-if="checkFileType(detailData.fileUrl) == 'pdf'" />
|
|
|
- <img v-if="checkFileType(detailData.fileUrl) == 'file'" class="file aaa" src="@/assets/common/zip.jpeg" />
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+
|
|
|
<div class="main-title">
|
|
|
<div class="title">货品信息</div>
|
|
|
</div>
|
|
@@ -243,6 +247,7 @@
|
|
|
<script>
|
|
|
import print from 'vue-print-nb'
|
|
|
import { getDetail, updateNum } from '@/api/supply/sales'
|
|
|
+import { getFileUrl } from '@/api/common'
|
|
|
|
|
|
export default {
|
|
|
name: 'SalesDetail',
|
|
@@ -295,7 +300,14 @@ export default {
|
|
|
this.goBack()
|
|
|
this.$parent.getList()
|
|
|
})
|
|
|
- }, // 检查文件类型
|
|
|
+ },
|
|
|
+ // 打开链接
|
|
|
+ openLink(url) {
|
|
|
+ getFileUrl({ key: url }).then(res => {
|
|
|
+ window.open(res.data)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 检查文件类型
|
|
|
checkFileType(url) {
|
|
|
if (!url) return ''
|
|
|
const fileSuffix = url.substring(url.lastIndexOf('.') + 1)
|
|
@@ -349,4 +361,8 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+.file {
|
|
|
+ width: 64px;
|
|
|
+ height: 64px;
|
|
|
+}
|
|
|
</style>
|