Files
2026-10-08 18:20:51 +08:00

557 lines
23 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<view>
<top-bar></top-bar>
<common-header></common-header>
<category-bar></category-bar>
<view class="page-main" v-if="info">
<view class="flex justify-between items-center">
<text class="text-gray">加工询价单编号:{{ info.orderNo }}</text>
<text class="text-gray">发布时间:{{ info._add_time_str }}</text>
</view>
<view class="my-25 flex justify-between items-center">
<view class="flex justify-start items-center">
<text class="text-40 font-bold">{{ info.title }}</text>
<view class="ml-20 flex justify-start items-center">
<building-one theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
<view class="text-main ">
<text class="mx-20">{{ info.quoteList.rows.length }}</text>
<text>家已报价</text>
</view>
</view>
</view>
<view class="flex justify-end items-end"
v-if="info.answerEndTime && dayjs(info.answerEndTime).diff(dayjs(), 'second') > 0">
<text>距离加工结束还有:</text>
<view class="border-main countdown text-main">{{
dayjs(info.answerEndTime).diff(dayjs(), 'day')
}}
</view>
<text>天</text>
<view class="border-main countdown text-main">
{{ (dayjs(info.answerEndTime).diff(dayjs(), 'hour')) % 24 }}
</view>
<text>时</text>
</view>
</view>
<view class="my-25 flex justify-between items-center pb-20 border-bottom">
<view class="flex justify-start items-center">
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
<text class="ml-15 text-gray" v-if="info.user">
{{ info.user.accountType === 1 ? info.user.person.personName : info.user.company.companyName }}
</text>
</view>
<el-button type="primary" @click.native="toQuote" :disabled="info.disabled"
v-if="vk.getVuex('$user.userInfo._id') !== info.userId && info.status === 0">{{
info.disabled ? '已超时无法报价' : '我要申请合作'
}}
</el-button>
<el-button type="primary" @click.native="showDialog = true"
v-else-if="vk.getVuex('$user.userInfo._id') === info.userId">查看收到的申请合作
</el-button>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-info-title">
<view class="form-title">
上传的附件
</view>
</view>
</view>
<view class="mt-15 mr-15" v-if="info.files">
<file-type :item="item" v-for="(item, index) in info.files" :key="index" @click.native="openDownload(item)"/>
</view>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-info-title">
<view class="form-title">
加工产品交货地址
</view>
</view>
</view>
<view class="mt-15">{{
info.addressRegion ? `${info.addressRegion.province.name}${info.addressRegion.city.name}${info.addressRegion.area ? info.addressRegion.area.name : ''}` : ``
}}{{
info.addressDetail ? info.addressDetail : ''
}}
</view>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-info-title">
<view class="form-title">
加工商其他要求
</view>
</view>
</view>
<view class="mt-15">{{ info.remark }}</view>
<template v-if="info.multiFiles">
<file-type :item="item" v-for="(item, index) in info.multiFiles" :key="index"
@click.native="openDownload(item)"/>
<!-- <el-image :src="item" v-for="(item, index) in info.multiFiles" :key="index" style="width: 100px; height: 100px" fit="cover"-->
<!-- :preview-src-list="info.multiFiles"/>-->
</template>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-info-title">
<view class="form-title">
主要商品
</view>
</view>
</view>
<view class="mt-15">{{ info.title }}</view>
<view class="mt-15">加工产品简述:{{ info.detail }}</view>
<view class="mt-15">加工量:{{ info.num }}</view>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-info-title">
<view class="form-title">
纳税和税票
</view>
</view>
</view>
<view class="mt-15">是否含税:{{ info.invoice ? '含税' : '不含税' }}</view>
<view class="mt-15">开票时间:{{ WRITE_INVOICE_TIME[info.writeInvoiceTime] }}</view>
<view class="mt-15" v-if="info.invoiceOther">税票要求:{{ info.invoiceOther }}</view>
<template v-else>
<view class="mt-15">纳税人身份:{{ info.taxType ? info.taxType : '无' }}</view>
<view class="mt-15">发票种类:{{ info.invoiceType ? info.invoiceType : '无' }}</view>
<view class="mt-15">税率:{{ info.taxRate ? info.taxRate : '无' }}</view>
</template>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-info-title">
<view class="form-title">
运输要求
</view>
</view>
</view>
<view class="mt-15" v-if="info.transportDocuments && info.transportDocuments.length > 0">
随货资料:{{ info.transportDocuments.join() }}
</view>
<view class="mt-15" v-if="info.otherTransportDocuments">其他要求:{{ info.otherTransportDocuments }}</view>
<view class="mt-15">运输限制要求:{{ info.transportLimit ? '有' : '无' }}</view>
<view class="mt-15" v-if="info.transportLimit && info.otherTransportRequest">
运输限制说明:{{ info.otherTransportRequest }}
</view>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-sheet-title">
<view class="form-title">
交易模式
</view>
</view>
</view>
<view class="mt-15">{{ info.tradeMethod === 0 ? '自主交易' : '金久信公证' }}</view>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-sheet-title">
<view class="form-title">
交易说明
</view>
</view>
</view>
<!-- <view class="mt-15" v-if="info.payMethod === 0">付款方式:{{ PROCESS_PAY_METHOD[info.payMethod] }}{{-->
<!-- info.payMethod === 0 ? `${info.advancePayRate}%货到付全款` : ''-->
<!-- }}{{ info.payMethod === 3 ? `${info.reputationPayDay}天` :-->
<!-- ( info.payMethod === 4 ? `:${info.otherPayMethod}` : '') }}-->
<!-- </view>-->
<view class="mt-15" v-if="info.payMethod === 0">付款方式:预付{{ info.advancePayRate }}%货到付全款</view>
<view class="mt-15" v-if="info.payMethod === 1">付款方式:加工验收合格后付全款</view>
<view class="mt-15" v-if="info.payMethod === 3">付款方式:加工验收合格后{{
info.reputationPayDay
}}天内支付全款
</view>
<view class="mt-15">报价形式:{{ info.offerType === 0 ? '整单报价' : '可分项报价' }}</view>
<view class="mt-15">报价期限:
<text v-if="info.answerStartTime && info.answerEndTime">{{
dayjs(info.answerStartTime).format('YYYY-MM-DD')
}}~{{ dayjs(info.answerEndTime).format('YYYY-MM-DD') }}
</text>
</view>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-sheet-title">
<view class="form-title">
交易保证金要求
</view>
</view>
</view>
<view class="mt-15">{{ info.earnestMoney }}</view>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-sheet-title">
<view class="form-title">
采购商信息
</view>
</view>
</view>
<view class="mt-15" v-if="info.companyName">
公司信息:{{ info.companyName ? info.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : '' }}
</view>
<view class="mt-15" v-if="info.companyMobile">公司联系方式:{{
info.companyMobile ? info.companyMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
}}
</view>
<view class="mt-15" v-if="info.businessName">
授权业务咨询人:{{ info.businessName ? info.businessName.replace(/^(.).*(.)$/, "$1***$2") : '' }}
</view>
<view class="mt-15" v-if="info.businessMobile">业务咨询联系方式:{{
info.businessMobile ? info.businessMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
}}
</view>
</view>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-sheet-title">
<view class="form-title">
签约模式
</view>
</view>
</view>
<view class="mt-15">{{
info.signMethod === 0 ? '线上签约-标准合同' : (info.signMethod !== 1 ? '线上签约-双方协商合同' : '线下签约')
}}
</view>
</view>
<view class="item-wrap" v-if="info.signMethod === 0">
<view class="form-title-wrap">
<view class="goods-info-title">
<view class="form-title">
简易合同备注和其他补充条款
</view>
</view>
</view>
<view class="mt-15">违约责任:</view>
<view class="mt-15">
1.乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
</view>
<view class="mt-15">解决纠纷的方法:</view>
<view class="mt-15">
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工費和获取证据产生费用等其他相关费用。2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
</view>
<view class="mt-15">不可抗力:</view>
<view class="mt-15">
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
</view>
<view class="mt-15">其他:</view>
<view class="mt-15">
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
</view>
<view class="mt-15">采购方补充条款: {{ info.supplementary }}</view>
</view>
<template v-else-if="info.signMethod === 2">
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-sheet-title">
<view class="form-title">
合同附件
</view>
</view>
</view>
</view>
<view v-for="(item, index) in info.contractAttachment" :key="index" class="mr-25 my-25">
<file-type :item="item" @click.native="openDownload(item)"/>
</view>
</template>
<view class="item-wrap">
<view class="form-title-wrap">
<view class="goods-info-title">
<view class="form-title">
已收到的加工申请
</view>
</view>
</view>
<view class="mt-15">
<view class="request-header">
<text class="flex-1">加工商</text>
<text class="flex-1">申请时间</text>
</view>
<view class="quote" v-for="(item, index) in info.quoteList.rows" :key="index">
<text class="flex-1" v-if="info.user">{{
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
}}
</text>
<text class="flex-1">{{ item._add_time_str }}</text>
</view>
</view>
</view>
</view>
<common-footer></common-footer>
<el-dialog :visible.sync="showDialog" width="70%" :show-close="false">
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
<text>收到的加工合作申请</text>
<el-button type="primary" @click.native="showDialog = false">关闭</el-button>
</view>
<view class="mt-15" v-if="info && info.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>
</view>
<view class="quote" v-for="(item, index) in info.quoteList.rows" :key="index">
<text class="flex-1" v-if="info.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">
<view class="flex-1">
<!-- <view class="mt-15 mr-15" v-for="(item, index) in item.files" :key="index">-->
<!-- <template v-if="['doc', 'docx'].includes(item.split('.').pop())">-->
<!-- <file-word theme="outline" class="pointer" size="40" fill="#4a90e2" strokeLinecap="square"-->
<!-- @click.native="openDownload(item)"/>-->
<!-- </template>-->
<!-- <template v-else-if="['xls', 'xlsx'].includes(item.split('.').pop())">-->
<!-- <file-excel theme="outline" class="pointer" size="40" fill="#417505" strokeLinecap="square"-->
<!-- @click.native="openDownload(item)"/>-->
<!-- </template>-->
<!-- <template v-else-if="['pdf'].includes(item.split('.').pop())">-->
<!-- <file-pdf-one theme="outline" class="pointer" size="40" fill="#f5a623"-->
<!-- strokeLinecap="square"-->
<!-- @click.native="openDownload(item)"/>-->
<!-- </template>-->
<!-- <template v-else>-->
<!-- <el-image :src="item" style="width: 100px; height: 100px" fit="cover"-->
<!-- :preview-src-list="[item]"/>-->
<!-- </template>-->
<!-- </view>-->
<file-type :item="file" v-for="(file, fileIndex) in item.files" :key="fileIndex"
@click.native="openDownload(file)"/>
</view>
</view>
<view class="flex-1 flex flex-col justify-start items-start">
<text>采购方补充条款:{{ info.supplementary ? info.supplementary : '无' }}</text>
<text>加工方补充条款:{{ item.supplierExt ? item.supplierExt : '无' }}</text>
</view>
<text class="flex-1">{{ item.remark }}</text>
<text class="flex-1">{{ item._add_time_str }}</text>
<text class="flex-1">
<el-button type="primary" @click.native="createContract(item)" v-if="info.status === 0">选择
</el-button>
</text>
</view>
</view>
</el-dialog>
</view>
</template>
<script>
import {BuildingOne, FileExcel, FilePdfOne, FileWord, IdCard} from '@icon-park/vue'
import dayjs from "dayjs";
import {WRITE_INVOICE_TIME, INVOICE_TYPE, PROCESS_PAY_METHOD} from '@/util'
import FileType from "../../components/file-type/file-type.vue";
export default {
components: {FileType, FileWord, FilePdfOne, FileExcel, BuildingOne, IdCard,},
data() {
return {
WRITE_INVOICE_TIME,
INVOICE_TYPE,
PROCESS_PAY_METHOD,
id: null,
info: null,
showDialog: false
};
},
methods: {
dayjs,
getInfo() {
vk.callFunction({
url: 'client/process/sheet/pub/getInfo',
data: {
id: this.id
}
}).then((res) => {
this.info = res
this.info.disabled = (!this.info.answerEndTime || dayjs(this.info.answerEndTime).isBefore(dayjs()))
})
},
async toQuote() {
const {userInfo, accountNum} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (userInfo.factoryStatus !== 1) return this.$message.error('非加工厂,无法报价,请去个人中心申请加工厂')
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
})
} else if (accountNum === 0) {
this.$confirm('请先到个人中心添加收款账户', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vk.navigateTo({url: '/pages/user/user?menu=account'});
})
} else {
if (userInfo.businessCard.status !== 1) {
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
return
}
if (this.info.earnestMoney && this.info.earnestMoney > 0 && userInfo.paidEnsure < this.info.earnestMoney) {
this.$confirm('保证金不足,是否去充值保证金?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vk.navigateTo({url: '/pages/user/user?menu=grade'});
})
return
}
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
}
},
createContract({totalPrice, uid, _id}) {
vk.callFunction({
url: 'client/contract/kh/add',
title: '请求中...',
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'
})
this.showDialog = false
setTimeout(() => {
if (this.info.signMethod === 0) vk.navigateTo('/pages/contract/index?tab=1')
else {
if (this.info.signMethod === 1) vk.navigateTo('/pages/store/buyer?menuIndex=0')
else vk.navigateTo('/pages/contract/index?tab=0')
}
}, 1500)
})
},
openDownload(url) {
window.open(url)
}
},
onLoad(option) {
if (!option.id) vk.navigateBack()
this.id = option.id
this.getInfo()
}
}
</script>
<style lang="scss" scoped>
@import "@/common/css/app.scss";
.page-main {
width: 1200px;
margin: 20px auto;
background-color: #FFFFFF;
padding: 20px;
border-radius: 5px;
}
.countdown {
padding: 2px 5px;
margin: 0 5px;
}
.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: $--color-primary;
font-size: 18px;
line-height: 18px;
border-left: 4px solid $--color-primary;
}
}
}
.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;
}
}
</style>