20261008
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
询价单管理
|
||||
</view>
|
||||
</view>
|
||||
<text class="text-gray text-25 pointer">查看全部 <i class="el-icon-arrow-right"></i></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-center items-center">
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.noQuote }}</text>
|
||||
<text>待报价</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.notPick }}</text>
|
||||
<text>待选商</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.picked }}</text>
|
||||
<text>已选商</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.closed }}</text>
|
||||
<text>已关闭</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "enquiryData",
|
||||
data() {
|
||||
return {
|
||||
enquiry: {
|
||||
noQuote: 0,
|
||||
notPick: 0,
|
||||
picked: 0,
|
||||
closed: 0
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.item-wrap {
|
||||
margin: 24px 0;
|
||||
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: #A92924;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid #A92924;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -11,21 +11,36 @@
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">供应商</text>
|
||||
<text class="flex-1">报价时间</text>
|
||||
<text class="flex-1">联系方式</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">详情</text>
|
||||
<text class="flex-1">供应商合同补充条款</text>
|
||||
<text class="flex-1">报价时间</text>
|
||||
<text class="flex-1">附件</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList" :key="index">
|
||||
<text class="flex-1">{{ item.subjectName }}</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">{{ item.subjectMobile }}</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item.remark ? item.remark : '无' }}</text>
|
||||
<text class="flex-1">{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" v-if="status === 0" @click.native="confirm(item)">选择</el-button>
|
||||
<template v-if="item.files && item.files.length > 0">
|
||||
<file-type v-for="(file, fileIndex) in item.files" :key="fileIndex" :item="file"
|
||||
@click.native="previewFile(file)"/>
|
||||
</template>
|
||||
<text v-else>无</text>
|
||||
</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" v-if="item.status === 0" @click.native="confirm(item)">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -33,8 +48,11 @@
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "enquiryModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
@@ -42,13 +60,16 @@ export default {
|
||||
areaData: areas,
|
||||
id: null,
|
||||
dialogVisible: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
quoteList: [],
|
||||
status: 0
|
||||
info: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(status, quoteList) {
|
||||
this.quoteList = quoteList
|
||||
open(info) {
|
||||
this.info = info
|
||||
this.quoteList = info.quoteList
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
@@ -72,8 +93,52 @@ export default {
|
||||
type: 'success',
|
||||
message: '报价确认成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (this.info.signMethod === 0) vk.navigateTo('/pages/contract/index?tab=1')
|
||||
else {
|
||||
if (this.info.signMethod === 1) vk.navigateTo('/pages/store/buyer')
|
||||
else vk.navigateTo('/pages/contract/index?tab=0')
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
});
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,4 +173,11 @@ export default {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的报价列表</text>
|
||||
<el-button type="primary" @click.native="dialogVisible = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15" v-if="quoteList">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">报价方</text>
|
||||
<text class="flex-1">报价时间</text>
|
||||
<text class="flex-1">联系方式</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">详情</text>
|
||||
<text class="flex-1">补充协议</text>
|
||||
<text class="flex-1">附件</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList" :key="index">
|
||||
<text class="flex-1">{{ item.subjectName }}</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">{{ item.user.mobile }}</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item.remark }}</text>
|
||||
<text class="flex-1">{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||||
<view class="flex-1">
|
||||
<view class="flex-1">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in item.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item._id)" v-if="status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
<vk-data-dialog
|
||||
v-model="showInfo"
|
||||
title="申请详情"
|
||||
width="600px"
|
||||
top="14vh"
|
||||
center
|
||||
:close-on-click-modal="true"
|
||||
>
|
||||
<vk-data-detail-table
|
||||
:data="info"
|
||||
:columns="infoColumns"
|
||||
size="medium"
|
||||
label-width="150px"
|
||||
></vk-data-detail-table>
|
||||
<template v-slot:footer>
|
||||
<el-button @click="showInfo = false">关闭</el-button>
|
||||
</template>
|
||||
</vk-data-dialog>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import {FileExcel, FilePdfOne, FileWord} from "@icon-park/vue";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "oldModal",
|
||||
components: {FileType, FilePdfOne, FileExcel, FileWord},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
status: 0,
|
||||
infoColumns: [
|
||||
{key: "company.companyName", title: "申请人", type: "text"},
|
||||
{key: "company.mobile", title: "联系方式", type: "text"},
|
||||
{key: "manager.personName", title: "代理人", type: "text"},
|
||||
{key: "manager.mobile", title: "代理人联系方式", type: "text"},
|
||||
],
|
||||
info: null,
|
||||
showInfo: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
signMethod: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(id, status, quoteList, signMethod) {
|
||||
this.id = id
|
||||
this.status = status
|
||||
this.quoteList = quoteList
|
||||
this.signMethod = signMethod
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
async createContract(quoteId) {
|
||||
await vk.callFunction({
|
||||
url: 'client/old/kh/confirmQuote',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
quoteId,
|
||||
}
|
||||
});
|
||||
this.dialogVisible = false
|
||||
this.$message({
|
||||
message: "选择成功",
|
||||
type: 'success'
|
||||
})
|
||||
if (this.signMethod === 0) vk.navigateTo('/pages/contract/index?tab=1')
|
||||
else {
|
||||
if (this.signMethod === 1) vk.navigateTo('/pages/store/store?menuIndex=2')
|
||||
else vk.navigateTo('/pages/contract/index?tab=0&tradeMethod=0')
|
||||
}
|
||||
},
|
||||
getOldInfo() {
|
||||
vk.callFunction({
|
||||
url: 'client/old/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: this.id,
|
||||
}
|
||||
}).then(res => {
|
||||
this.info = res.data
|
||||
})
|
||||
},
|
||||
doShowInfo(info) {
|
||||
this.info = info
|
||||
this.showInfo = true
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -1,120 +1,189 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工申请</text>
|
||||
<el-button type="primary" @click.native="dialogVisible = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15" >
|
||||
<view class="request-header">
|
||||
<text class="flex-1">加工商</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList.rows" :key="index">
|
||||
<text class="flex-1">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)" v-if="status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工申请</text>
|
||||
<el-button type="primary" @click.native="dialogVisible = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">申请人</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">补充条款</text>
|
||||
<text class="flex-1">附件</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList.rows" :key="index">
|
||||
<text class="flex-1" v-if="item.user">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<view class="flex-1 flex flex-col justify-start items-start">
|
||||
<text>加工方补充条款:{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||||
</view>
|
||||
<!-- <text class="flex-1">{{ item.remark }}</text>-->
|
||||
<text class="flex-1">
|
||||
<file-type v-for="(file, fileIndex) in item.files" :key="fileIndex" :item="file"
|
||||
@click.native="previewFile(file)"/>
|
||||
</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)" v-if="item.status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "processModal",
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(status, quoteList) {
|
||||
console.log(status, quoteList)
|
||||
this.quoteList = quoteList
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
vk.navigateTo('/pages/contract/index')
|
||||
}, 1500)
|
||||
})
|
||||
}
|
||||
name: "processModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
info: null,
|
||||
dialogVisible: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
quoteList: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
this.id = info._id
|
||||
this.quoteList = info.quoteList
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.dialogVisible = false
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (this.info.signMethod === 0) vk.navigateTo('/pages/contract/index?tab=1')
|
||||
else {
|
||||
if (this.info.signMethod === 1) vk.navigateTo('/pages/store/buyer')
|
||||
else vk.navigateTo('/pages/contract/index?tab=0')
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="自营询价详情"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
|
||||
<el-descriptions border size="small" :column="2">
|
||||
<el-descriptions-item label="询价区域">
|
||||
<span>{{ info.province.name }}{{ info.city.name }} </span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<span>{{ info.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<span>{{ info.phone }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户名称">
|
||||
<span>{{ info.company }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="询价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
<template v-if="info.quoteList && info.status === 1">
|
||||
<el-descriptions-item label="报价列表">
|
||||
<div class="py-20 border-bottom" v-for="(item, index) in info.quoteList" :key="index">
|
||||
<p>公司:{{ item.user.company.companyName }}</p>
|
||||
<template v-if="item.amount">
|
||||
<p>报价:¥{{ item.amount }}</p>
|
||||
<span v-if="item.remark">备注:{{ item.remark }}</span>
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in item.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</template>
|
||||
<p v-else>未报价</p>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-if="info.quoteList && info.status === 2">
|
||||
<el-descriptions-item label="报价公司">
|
||||
<div class="py-20 border-bottom" v-for="(item, index) in info.quoteList.filter(q => q.status === 1)"
|
||||
:key="index">
|
||||
<p>{{ item.user.company.companyName }}</p>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-if="info.quote">
|
||||
<el-descriptions-item label="报价">
|
||||
<span>¥{{ info.quote.amount }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<span>{{ info.quote.remark }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.quote.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "selfSupportModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
info: null,
|
||||
dialogVisible: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
quoteList: [],
|
||||
status: 0,
|
||||
quote: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="自营询价详情"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
|
||||
<el-descriptions border size="small" :column="2">
|
||||
<el-descriptions-item label="询价区域">
|
||||
<span>{{ info.sheet.province.name }}{{ info.sheet.city.name }} </span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<span>{{ info.sheet.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<span>{{ info.sheet.phone }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户名称">
|
||||
<span>{{ info.sheet.company }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="询价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报价">
|
||||
<span>¥{{ info.amount }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<span>{{ info.remark }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "selfSupportQuoteModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
info: null,
|
||||
dialogVisible: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
quoteList: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
console.log(this.info)
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -12,23 +12,23 @@
|
||||
</view>
|
||||
<view class="mt-15" v-if="cooperateList">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">申请人</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">公司名称</text>
|
||||
<text class="flex-1">联系人</text>
|
||||
<text class="flex-1">联系方式</text>
|
||||
<text class="flex-1">操作</text>
|
||||
<text class="flex-1">备注</text>
|
||||
<text class="flex-1">附件</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in cooperateList" :key="index">
|
||||
<text class="flex-1">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.user.company.companyName }}</text>
|
||||
<text class="flex-1">{{ item.name }}</text>
|
||||
<text class="flex-1"> {{ item.mobile }}</text>
|
||||
<text class="flex-1">{{ item.remark }}</text>
|
||||
<view class="flex-1">
|
||||
<file-type v-for="(file, fileIndex) in item.files" :key="fileIndex" :item="file"
|
||||
@click.native="previewFile(file)"/>
|
||||
</view>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
{{ item.user.accountType === 1 ? item.user.person.mobile : item.user.company.mobile }}
|
||||
</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="doShowInfo(item)">查看申请详情</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
@@ -50,6 +50,9 @@
|
||||
<el-button @click="showInfo = false">关闭</el-button>
|
||||
</template>
|
||||
</vk-data-dialog>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -57,9 +60,11 @@
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "spotModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
@@ -77,6 +82,8 @@ export default {
|
||||
],
|
||||
info: null,
|
||||
showInfo: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -118,6 +125,40 @@ export default {
|
||||
doShowInfo(info) {
|
||||
this.info = info
|
||||
this.showInfo = true
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -152,4 +193,11 @@ export default {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user