20261008
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="报价明细" :visible.sync="dialogVisible" width="60%">
|
||||
<el-table :data="list" style="width: 100%">
|
||||
<el-table-column prop="subjectName" label="报价方"/>
|
||||
<el-table-column prop="subjectMobile" label="联系方式"/>
|
||||
<el-table-column prop="totalPrice" label="金额"/>
|
||||
<el-table-column label="附件">
|
||||
<template v-slot="{ row }">
|
||||
<a
|
||||
style="margin-right: 10px"
|
||||
v-for="(item, index) in row.files"
|
||||
:key="index"
|
||||
href="javascript:;"
|
||||
@click="previewFile(item)"
|
||||
>预览: 文件{{ index + 1 }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注"/>
|
||||
<el-table-column prop="_add_time_str" label="报价时间"/>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<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 title="PDF预览" :visible.sync="showPdfPreview" width="80%" append-to-body @closed="revokePdfPreviewUrl">
|
||||
<iframe v-if="pdfPreviewUrl" class="pdf-preview-frame" :src="pdfPreviewUrl"></iframe>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "EnquiryQuoteList",
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
list: [],
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
showPdfPreview: false,
|
||||
pdfPreviewUrl: '',
|
||||
pdfObjectUrl: '',
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.revokePdfPreviewUrl()
|
||||
},
|
||||
methods: {
|
||||
open(sheetId){
|
||||
this.getList(sheetId)
|
||||
},
|
||||
async getList(sheetId){
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'admin/enquiry/quote/kh/getList',
|
||||
data: {
|
||||
sheetId
|
||||
}
|
||||
})
|
||||
this.dialogVisible = true
|
||||
this.list = rows
|
||||
},
|
||||
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)}`
|
||||
},
|
||||
revokePdfPreviewUrl() {
|
||||
if (this.pdfObjectUrl) {
|
||||
URL.revokeObjectURL(this.pdfObjectUrl)
|
||||
this.pdfObjectUrl = ''
|
||||
}
|
||||
this.pdfPreviewUrl = ''
|
||||
},
|
||||
async previewPdfFile(url) {
|
||||
this.revokePdfPreviewUrl()
|
||||
try {
|
||||
const response = await fetch(url)
|
||||
if (!response.ok) throw new Error('PDF加载失败')
|
||||
const blob = await response.blob()
|
||||
this.pdfObjectUrl = URL.createObjectURL(new Blob([blob], {type: 'application/pdf'}))
|
||||
this.pdfPreviewUrl = this.pdfObjectUrl
|
||||
} catch (e) {
|
||||
this.pdfPreviewUrl = `https://mozilla.github.io/pdf.js/web/viewer.html?file=${encodeURIComponent(url)}`
|
||||
}
|
||||
this.showPdfPreview = true
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
this.previewPdfFile(url)
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.pdf-preview-frame {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 75vh;
|
||||
border: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="报价明细" :visible.sync="dialogVisible" width="60%">
|
||||
<el-table :data="list" style="width: 100%">
|
||||
<el-table-column prop="subjectName" label="报价方"/>
|
||||
<el-table-column label="联系方式">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.user.accountType === 2">{{ row.user.company.mobile }}</span>
|
||||
<span v-else>{{ row.user.person.mobile }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalPrice" label="金额"/>
|
||||
<el-table-column label="附件">
|
||||
<template #default="{ row }">
|
||||
<a
|
||||
href="javascript:;"
|
||||
style="margin-right: 10px"
|
||||
v-for="(item, index) in row.files"
|
||||
:key="index"
|
||||
@click="previewFile(item)"
|
||||
>附件:{{ index + 1 }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注"/>
|
||||
<el-table-column prop="_add_time_str" label="报价时间"/>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<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 title="PDF预览" :visible.sync="showPdfPreview" width="80%" append-to-body @closed="revokePdfPreviewUrl">
|
||||
<iframe v-if="pdfPreviewUrl" class="pdf-preview-frame" :src="pdfPreviewUrl"></iframe>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "OldQuoteList",
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
list: [],
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
showPdfPreview: false,
|
||||
pdfPreviewUrl: '',
|
||||
pdfObjectUrl: '',
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.revokePdfPreviewUrl()
|
||||
},
|
||||
methods: {
|
||||
open(sheetId) {
|
||||
this.getList(sheetId)
|
||||
},
|
||||
async getList(sheetId) {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'admin/old/quote/kh/getList',
|
||||
data: {
|
||||
sheetId
|
||||
}
|
||||
})
|
||||
this.dialogVisible = true
|
||||
this.list = rows
|
||||
},
|
||||
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)}`
|
||||
},
|
||||
revokePdfPreviewUrl() {
|
||||
if (this.pdfObjectUrl) {
|
||||
URL.revokeObjectURL(this.pdfObjectUrl)
|
||||
this.pdfObjectUrl = ''
|
||||
}
|
||||
this.pdfPreviewUrl = ''
|
||||
},
|
||||
async previewPdfFile(url) {
|
||||
this.revokePdfPreviewUrl()
|
||||
try {
|
||||
const response = await fetch(url)
|
||||
if (!response.ok) throw new Error('PDF加载失败')
|
||||
const blob = await response.blob()
|
||||
this.pdfObjectUrl = URL.createObjectURL(new Blob([blob], {type: 'application/pdf'}))
|
||||
this.pdfPreviewUrl = this.pdfObjectUrl
|
||||
} catch (e) {
|
||||
this.pdfPreviewUrl = `https://mozilla.github.io/pdf.js/web/viewer.html?file=${encodeURIComponent(url)}`
|
||||
}
|
||||
this.showPdfPreview = true
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
this.previewPdfFile(url)
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.pdf-preview-frame {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 75vh;
|
||||
border: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-descriptions border :column="2">
|
||||
<el-descriptions-item label="商品列表">
|
||||
<div v-for="(item, index) in info.goods" :key="index" style="
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;">
|
||||
<p>商品名称: {{ item.goodsName }}</p>
|
||||
<p v-if="info.type === 0 && formatSku(item.sku)">规格: {{ formatSku(item.sku) }}</p>
|
||||
<p>数量: x{{ item.num }}</p>
|
||||
<p>单价: {{ item.goodsPrice }}元</p>
|
||||
<p v-if="info.type === 0">所属公司: {{ item.company.company.companyName }}</p>
|
||||
<el-divider v-if="index < info.goods.length - 1"/>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户信息">
|
||||
<p>用户名: {{ info.user.nickname }}</p>
|
||||
<p>手机号: {{ info.user.mobile }}</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="买家信息">
|
||||
<p>收件人: {{ info.name }}</p>
|
||||
<p>收件人联系方式: {{ info.phone }}</p>
|
||||
<p>收件地址: {{ info.addressRegion.province.name }}{{
|
||||
info.addressRegion.city.name
|
||||
}}{{ info.addressRegion.area.name }}{{ info.addressDetail }}</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="物流信息">
|
||||
<p>物流公司: {{ info.expressName }}</p>
|
||||
<p>物流单号: {{ info.expressNo }}</p>
|
||||
<p>备注: {{ info.remark }}</p>
|
||||
<el-image v-for="(item, index) in info.expressPhoto" :key="index" :src="item"
|
||||
class="mr-10 mb-10"
|
||||
:preview-src-list="info.expressPhoto" style="width: 100px;height: 100px"/>
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="info.orderStatus >= 5">
|
||||
<el-descriptions-item label="退款信息">
|
||||
<p>退款原因: {{ info.refundReason }}</p>
|
||||
<div>
|
||||
<span>退款附件: </span>
|
||||
<a style="margin-right: 1rem" v-for="(file, fileIndex) in info.refundPhotos" :key="fileIndex" :href="file"
|
||||
target="_blank">预览:文件{{ fileIndex + 1 }}</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
<div style="margin-top: 2rem; text-align: center">
|
||||
<el-button plain @click.native="cancel">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "OrderInfo",
|
||||
props: {
|
||||
info: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
formatSku(sku) {
|
||||
if (!sku) return ''
|
||||
if (typeof sku === 'string') return sku
|
||||
return sku.label || sku.name || sku.title || sku.specName || ''
|
||||
},
|
||||
cancel() {
|
||||
this.$emit('close')
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<el-dialog title="支付明细" :visible.sync="dialogVisible" width="60%">
|
||||
<view v-for="(item, index) in payList" :key="index" class="py-20 border-bottom">
|
||||
<el-descriptions :title="item.type" :column="2" border :labelStyle="{width: '120px'}">
|
||||
<template slot="extra">
|
||||
<div class="flex justify-start items-center">
|
||||
<template v-if="!item.buyerRefuse">
|
||||
<el-button plain type="primary" size="mini" @click="showPay(item)"
|
||||
v-if="item.status === 0 && item.isBuyer && !item.hasPaid">上传支付凭证
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" class="mx-20" @click="confirmPay(item)"
|
||||
v-if="item.hasPaid && item.isSeller && !item.sellerConfirm">
|
||||
确认收款
|
||||
</el-button>
|
||||
<el-button plain type="primary" size="mini" class="mx-20" @click="paidRefuse(item)"
|
||||
v-if="item.isBuyer && item.status === 0 && !item.paidVoucher">
|
||||
驳回
|
||||
</el-button>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<el-descriptions-item label="支付金额">{{ item.amount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="支付凭证">
|
||||
<template v-if="!item.buyerRefuse">
|
||||
<span v-if="item.isSeller && !item.hasPaid">待买方支付</span>
|
||||
<view v-else-if="item.paidVoucher">
|
||||
<el-image :src="item.paidVoucher[0]" style="width: 80px; height: 80px" fit="cover"
|
||||
:preview-src-list="item.paidVoucher"/>
|
||||
</view>
|
||||
<view v-else-if="!item.paidVoucher">
|
||||
<span>未上传凭证</span>
|
||||
</view>
|
||||
</template>
|
||||
<span v-else class="text-main">买家已拒绝: {{ item.refuseReason }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货凭证">
|
||||
<el-image v-for="(photo, photoIndex) in item.expressPhoto" :key="photoIndex" :src="photo"
|
||||
style="width: 80px; height: 80px" fit="cover"
|
||||
:preview-src-list="item.expressPhoto"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<text>{{ item.remark ? item.remark : '无' }}</text>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="买家备注">
|
||||
<text>{{ item.buyerRemark ? item.buyerRemark : '无' }}</text>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="图片">
|
||||
<template v-if="item.photos && item.photos.length > 0">
|
||||
<el-image v-for="(photo, photoIndex) in item.photos" :key="photoIndex" :src="photo"
|
||||
style="width: 80px; height: 80px" fit="cover"
|
||||
:preview-src-list="item.photos"/>
|
||||
</template>
|
||||
<span v-else>无</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<span v-if="!item.hasPaid && !item.buyerRefuse">待上传凭证</span>
|
||||
<span v-if="!item.sellerConfirm && item.hasPaid">待确认收款</span>
|
||||
<span v-if="item.sellerConfirm && item.hasPaid">已完成</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
</view>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "PayList",
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
payList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(payList) {
|
||||
this.payList = payList
|
||||
this.dialogVisible = true
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="报价列表" :visible.sync="dialogVisible" width="60%">
|
||||
<el-table :data="list" style="width: 100%">
|
||||
<el-table-column label="报价方">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.user.accountType === 2">{{ row.user.company.companyName }}</span>
|
||||
<span v-else>{{ row.user.person.personName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系方式">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.user.accountType === 2">{{ row.user.company.mobile }}</span>
|
||||
<span v-else>{{ row.user.person.mobile }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalPrice" label="金额"/>
|
||||
<el-table-column label="附件">
|
||||
<template #default="{ row }">
|
||||
<a
|
||||
href="javascript:;"
|
||||
style="margin-right: 10px"
|
||||
v-for="(item, index) in row.files"
|
||||
:key="index"
|
||||
@click="previewFile(item)"
|
||||
>附件:{{ index + 1 }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="报价单详情"/>
|
||||
<el-table-column prop="supplierExt" label="合同补充条款"/>
|
||||
<el-table-column prop="_add_time_str" label="报价时间"/>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<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 title="PDF预览" :visible.sync="showPdfPreview" width="80%" append-to-body @closed="revokePdfPreviewUrl">
|
||||
<iframe v-if="pdfPreviewUrl" class="pdf-preview-frame" :src="pdfPreviewUrl"></iframe>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ProcessQuoteList",
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
list: [],
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
showPdfPreview: false,
|
||||
pdfPreviewUrl: '',
|
||||
pdfObjectUrl: '',
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.revokePdfPreviewUrl()
|
||||
},
|
||||
methods: {
|
||||
open(sheetId) {
|
||||
this.getList(sheetId)
|
||||
},
|
||||
async getList(sheetId) {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'admin/process/quote/kh/getList',
|
||||
data: {
|
||||
sheetId
|
||||
}
|
||||
})
|
||||
this.dialogVisible = true
|
||||
this.list = rows
|
||||
},
|
||||
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)}`
|
||||
},
|
||||
revokePdfPreviewUrl() {
|
||||
if (this.pdfObjectUrl) {
|
||||
URL.revokeObjectURL(this.pdfObjectUrl)
|
||||
this.pdfObjectUrl = ''
|
||||
}
|
||||
this.pdfPreviewUrl = ''
|
||||
},
|
||||
async previewPdfFile(url) {
|
||||
this.revokePdfPreviewUrl()
|
||||
try {
|
||||
const response = await fetch(url)
|
||||
if (!response.ok) throw new Error('PDF加载失败')
|
||||
const blob = await response.blob()
|
||||
this.pdfObjectUrl = URL.createObjectURL(new Blob([blob], {type: 'application/pdf'}))
|
||||
this.pdfPreviewUrl = this.pdfObjectUrl
|
||||
} catch (e) {
|
||||
this.pdfPreviewUrl = `https://mozilla.github.io/pdf.js/web/viewer.html?file=${encodeURIComponent(url)}`
|
||||
}
|
||||
this.showPdfPreview = true
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
this.previewPdfFile(url)
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.pdf-preview-frame {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 75vh;
|
||||
border: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-descriptions border :column="2" v-if="info">
|
||||
<el-descriptions-item label="服务">
|
||||
<div v-for="(item, index) in goods" :key="index">
|
||||
<p>{{ item.goodsName }}</p>
|
||||
<template v-if="orderInfo.subType === 2 && item.amountItem">
|
||||
<p>项基础收费: {{ item.amountItem.amount }}元</p>
|
||||
<p v-if="item.costNum">清单单品项数: {{ item.costNum }}</p>
|
||||
<p>项数加价: {{ item.amountItem.addAmount }}元</p>
|
||||
<p>建议收费: {{ item.amountItem.amount + (item.costNum * item.amountItem.addAmount) }}元</p>
|
||||
</template>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="考察对象" v-if="info.type === 0">
|
||||
<div v-for="(item, index) in info.contentList" :key="index">
|
||||
<span>类型:{{ item.type }},</span>
|
||||
<span>{{ item.name }}</span>
|
||||
<template v-if="item.type && item.type === '个人'">
|
||||
<span>({{ item.code }})</span>
|
||||
<span>--{{ item.addressRegion.province.name }}{{
|
||||
item.addressRegion.city.name
|
||||
}}{{ item.addressRegion.area.name }}{{ item.address }}</span>
|
||||
</template>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="考察产品" v-else>
|
||||
<p style="margin-bottom: .5rem" v-for="(item, index) in info.contentList" :key="index">{{
|
||||
item.name
|
||||
}}--{{ item.addressRegion.province.name }}{{
|
||||
item.addressRegion.city.name
|
||||
}}{{ item.addressRegion.area.name }}{{ item.address }}</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="文档">
|
||||
<div v-for="(item, index) in info.contentList" :key="index">
|
||||
<template v-if="item.files">
|
||||
<a v-for="(file, fileIndex) in item.files" :key="fileIndex" :href="file"
|
||||
target="_blank">预览:文件{{ fileIndex + 1 }}</a>
|
||||
</template>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接收文件电子邮箱">
|
||||
<span>{{ info.email }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接收文件微信">
|
||||
<span>{{ info.wechat }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接收文件寄件地址">
|
||||
<span v-if="info.receiveAddressRegion.province">{{
|
||||
info.receiveAddressRegion.province.name
|
||||
}}{{ info.receiveAddressRegion.city.name }}{{
|
||||
info.receiveAddressRegion.area.name
|
||||
}}{{ info.receiveAddress }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人">
|
||||
<span>{{ info.requestName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="业务联系人">
|
||||
<span>{{ info.contactName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="业务联系方式">
|
||||
<span>{{ info.contact }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户备注">
|
||||
<span>{{ info.remark ? info.remark : '' }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接单公司" v-if="info.companyId">
|
||||
<span>{{ info.company.company.companyName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="结果文件" v-if="orderInfo && orderInfo.resultFiles">
|
||||
<div v-for="(item, index) in orderInfo.resultFiles" :key="index">
|
||||
<a :href="item"
|
||||
target="_blank">预览:文件{{ index + 1 }}</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发送途径" v-if="orderInfo && orderInfo.sendMethod"><span>{{
|
||||
orderInfo.sendMethod
|
||||
}}</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template v-if="info && !info.companyId && isSet">
|
||||
<p style="margin-top: 2rem">接单公司</p>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<el-select v-model="companyId" placeholder="请选择接单公司" style="width: 100%">
|
||||
<el-option
|
||||
v-for="(item, index) in companyList"
|
||||
:disabled="item._id === info.uid"
|
||||
:key="item.value"
|
||||
:label="item.company.companyName"
|
||||
:value="item._id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button type="primary" @click.native="setCompany" :disabled="!companyId">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "selfProductInfo",
|
||||
props: {
|
||||
orderInfo: null,
|
||||
orderId: null,
|
||||
goods: null,
|
||||
isSet: false,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: null,
|
||||
companyId: null,
|
||||
companyList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getInfo() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'admin/selfProduct/order/sys/getDetail',
|
||||
data: {
|
||||
orderId: this.orderId
|
||||
}
|
||||
})
|
||||
this.info = data
|
||||
},
|
||||
async getCompanyList() {
|
||||
const data = {type: 2, pageSize: 500}
|
||||
if (this.info.type === 0) data.isCompanyQuote = true
|
||||
else if (this.info.type === 1) data.isProductQuote = true
|
||||
else if (this.info.type === 2) data.isCostQuote = true
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'admin/system/user/sys/getList',
|
||||
data
|
||||
})
|
||||
this.companyList = rows.filter(item => item.company && item.company.companyName !== '' && item.company.companyName)
|
||||
},
|
||||
async setCompany() {
|
||||
if (!this.companyId) return this.$message.error('请选择接单公司')
|
||||
await vk.callFunction({
|
||||
url: 'admin/selfProduct/order/sys/setCompany',
|
||||
data: {
|
||||
orderId: this.info.orderId,
|
||||
companyId: this.companyId
|
||||
}
|
||||
})
|
||||
this.close()
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
console.log(this.orderInfo)
|
||||
await this.getInfo()
|
||||
if (this.isSet) await this.getCompanyList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<el-form ref="form" label-width="80px">
|
||||
<template>
|
||||
<el-form-item label="订单号">
|
||||
{{ info.orderNo }}
|
||||
</el-form-item>
|
||||
<el-form-item label="收件人">
|
||||
{{ info.name }}({{ info.phone }})
|
||||
</el-form-item>
|
||||
<el-form-item label="收货地址" v-if="info.address.area">
|
||||
{{ info.address.province.name }} {{ info.address.city.name }} {{ info.address.area.name }} {{
|
||||
info.address.addressDetail
|
||||
}}
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="物流公司" required>
|
||||
<el-input v-model="expressName" placeholder="请输入物流公司"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物流单号" required>
|
||||
<el-input v-model="expressNo" placeholder="请输入物流单号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发货单" required>
|
||||
<vk-data-upload v-model="expressPhoto"></vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="remark" placeholder="请输入备注"/>
|
||||
</el-form-item>
|
||||
<div class="mt-20 flex justify-center items-center text-center">
|
||||
<el-button type="primary" size="small" plain @click.native="cancel">取消</el-button>
|
||||
<el-button type="primary" size="small" @click.native="confirm">确定</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "setExpress",
|
||||
props: {
|
||||
info: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
expressName: null,
|
||||
expressNo: null,
|
||||
remark: null,
|
||||
expressPhoto: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('close')
|
||||
},
|
||||
cancel() {
|
||||
this.expressName = null
|
||||
this.expressNo = null
|
||||
this.remark = null
|
||||
this.expressPhoto = []
|
||||
this.close()
|
||||
},
|
||||
async confirm() {
|
||||
if (!this.expressName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写物流公司'
|
||||
})
|
||||
if (!this.expressNo) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写物流单号'
|
||||
})
|
||||
if (this.expressPhoto.length === 0) return this.$message({
|
||||
type: 'error',
|
||||
message: '请上传发货单'
|
||||
})
|
||||
await vk.callFunction({
|
||||
url: 'admin/order/sys/setExpress',
|
||||
data: {
|
||||
id: this.info._id,
|
||||
expressName: this.expressName,
|
||||
expressNo: this.expressNo,
|
||||
remark: this.remark,
|
||||
expressPhoto: this.expressPhoto
|
||||
}
|
||||
})
|
||||
this.$emit('close')
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '发货成功'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<el-form ref="form" label-width="80px">
|
||||
<template>
|
||||
<el-form-item label="选择服务公司">
|
||||
{{ info.orderNo }}
|
||||
</el-form-item>
|
||||
</template>
|
||||
<div class="mt-20 flex justify-center items-center text-center">
|
||||
<el-button type="primary" size="small" plain @click.native="cancel">取消</el-button>
|
||||
<el-button type="primary" size="small" @click.native="confirm">确定</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "setSelfSupport",
|
||||
props: {
|
||||
info: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sheet: null,
|
||||
expressNo: null,
|
||||
remark: null,
|
||||
expressPhoto: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getInfo() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'admin/selfProduct/order/sys/getDetail',
|
||||
data: {
|
||||
orderId: this.info.orderId
|
||||
}
|
||||
})
|
||||
this.sheet = data
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
},
|
||||
cancel() {
|
||||
this.close()
|
||||
},
|
||||
async confirm() {
|
||||
|
||||
await vk.callFunction({
|
||||
url: 'admin/order/sys/setExpress',
|
||||
data: {
|
||||
id: this.info._id,
|
||||
expressName: this.expressName,
|
||||
expressNo: this.expressNo,
|
||||
remark: this.remark,
|
||||
expressPhoto: this.expressPhoto
|
||||
}
|
||||
})
|
||||
this.$emit('close')
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '发货成功'
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user