567 lines
20 KiB
Vue
567 lines
20 KiB
Vue
<template> <!-- 加工单详情 -->
|
||
<view class="wrap">
|
||
<!-- 吸顶 -->
|
||
<u-sticky offset-top="0" customNavHeight="0">
|
||
<!-- 顶部 -->
|
||
<uititle title="加工详情"></uititle>
|
||
</u-sticky>
|
||
<!-- 内容 -->
|
||
<view class="layout layout-detail" v-if="info">
|
||
<view class="company flex m-top-20">
|
||
<!-- <view class="logo">-->
|
||
<!-- <image v-if="info.user && info.user.businessCard" class="full" :src="info.user.businessCard.logo"-->
|
||
<!-- mode=""></image>-->
|
||
<!-- <image v-else class="full" src="/static/no-logo.jpg" mode=""></image>-->
|
||
<!-- </view>-->
|
||
<view class="info flex-1 p-left-20">
|
||
<view class="name flex justify-start align-center">
|
||
<view class="name-text">{{ info.user.company.companyName }}</view>
|
||
<!-- 认证图标 -->
|
||
<!-- <view class="name-icon m-left-20">-->
|
||
<!-- <image class="full" src="/static/img/idente.png" mode=""></image>-->
|
||
<!-- </view>-->
|
||
</view>
|
||
<!-- <view class="zhu">-->
|
||
<!-- 主营业务:{{-->
|
||
<!-- (info.user.company.mainSpotCategory && info.user.company.mainSpotCategory.length > 0) ? info.user.company.mainSpotCategory.join() : ''-->
|
||
<!-- }}-->
|
||
<!-- </view>-->
|
||
<view class="zhu">
|
||
加工询价单编号:{{ info.orderNo }}
|
||
</view>
|
||
<view class="zhu">
|
||
{{ info._add_time_str }} 发布
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- <view class="card-title m-top-30">现货详情</view> -->
|
||
<view class="detail m-top-20">
|
||
<view class="detail-title">{{ info.title }}</view>
|
||
</view>
|
||
<view class="card-title m-top-30">上传的附件</view>
|
||
<view class="m-top-20" v-if="info && info.files">
|
||
<file-type v-for="(item, index) in info.files" :key="index" :item="item"/>
|
||
</view>
|
||
|
||
<template v-if="info.addressRegion">
|
||
<view class="card-title m-top-30">加工产品交货地址</view>
|
||
<view class="detail-text">
|
||
{{
|
||
info.addressRegion ? `${info.addressRegion.province.name}${info.addressRegion.city.name}${info.addressRegion.area ? info.addressRegion.area.name : ''}` : ``
|
||
}}{{
|
||
info.addressDetail ? info.addressDetail : ''
|
||
}}
|
||
</view>
|
||
</template>
|
||
|
||
<template v-if="info.remark">
|
||
<view class="card-title m-top-30">加工商其他要求</view>
|
||
<view class="detail-text">
|
||
{{ info.remark }}
|
||
</view>
|
||
<file-type :item="item" v-for="(item, index) in info.multiFiles" :key="index"
|
||
@click.native="openDownload(item)"/>
|
||
</template>
|
||
|
||
<view class="card-title m-top-30">主要商品</view>
|
||
<view class="detail-text">{{ info.title }}</view>
|
||
<view class="detail-text">加工产品简述:{{ info.detail }}</view>
|
||
<view class="detail-text">加工量:{{ info.num }}</view>
|
||
|
||
|
||
<view class="card-title m-top-30">合同条款</view>
|
||
<view class="detail-text">是否含税:{{ info.invoice ? '含税' : '不含税' }}</view>
|
||
<template v-if="info.invoice">
|
||
<view class="detail-text">开票时间:{{ WRITE_INVOICE_TIME()[info.writeInvoiceTime] }}</view>
|
||
<view class="detail-text" v-if="info.invoiceOther">税票要求:{{ info.invoiceOther }}</view>
|
||
<template v-else>
|
||
<view class="detail-text">纳税人身份:{{ info.taxType ? info.taxType : '无' }}</view>
|
||
<view class="detail-text">发票种类:{{ info.invoiceType ? info.invoiceType : '无' }}</view>
|
||
<view class="detail-text">税率:{{ info.taxRate ? info.taxRate : '无' }}</view>
|
||
</template>
|
||
</template>
|
||
<view class="card-title m-top-30">运输要求</view>
|
||
<view class="detail-text" v-if="info.transportDocuments && info.transportDocuments.length > 0">
|
||
随货资料:{{ info.transportDocuments.join() }}
|
||
</view>
|
||
<view class="detail-text" v-if="info.otherTransportDocuments">其他要求:{{
|
||
info.otherTransportDocuments
|
||
}}
|
||
</view>
|
||
<view class="detail-text">运输限制:{{ info.transportLimit ? '有' : '无' }}</view>
|
||
<view class="detail-text" v-if="info.transportLimit && info.otherTransportRequest">
|
||
运输限制说明:{{ info.otherTransportRequest }}
|
||
</view>
|
||
|
||
<view class="card-title m-top-30">交易模式</view>
|
||
<view class="detail-text">{{ info.tradeMethod === 0 ? '自主交易' : '金久信公证' }}</view>
|
||
|
||
<view class="card-title m-top-30">交易说明</view>
|
||
<view class="detail-text">付款方式:{{ PROCESS_PAY_METHOD()[info.payMethod] }}{{
|
||
info.payMethod === 0 ? `${info.advancePayRate}%货到付全款` : ''
|
||
}}{{
|
||
info.payMethod === 3 ? `${info.reputationPayDay}天` :
|
||
(info.payMethod === 4 ? `:${info.otherPayMethod}` : '')
|
||
}}
|
||
</view>
|
||
<view class="detail-text">报价形式:{{ info.offerType === 0 ? '整单报价' : '可分项报价' }}</view>
|
||
<view class="detail-text">报价期限:
|
||
<text v-if="info.answerStartTime && info.answerEndTime">{{
|
||
dayjs(info.answerStartTime).format('YYYY-MM-DD')
|
||
}}~{{ dayjs(info.answerEndTime).format('YYYY-MM-DD') }}
|
||
</text>
|
||
</view>
|
||
|
||
<view class="card-title m-top-30">交易保证金要求</view>
|
||
<view class="detail-text">{{ info.earnestMoney ? info.earnestMoney : '无' }}</view>
|
||
<view class="card-title m-top-30">采购商信息</view>
|
||
<view class="detail-text">
|
||
<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="card-title m-top-30">签约模式</view>
|
||
<view class="detail-text">
|
||
<view>{{
|
||
info.signMethod === 0 ? '线上签约-标准合同' : (info.signMethod !== 1 ? '线上签约-双方协商合同' : '线下签约')
|
||
}}
|
||
</view>
|
||
</view>
|
||
<view class="text-25" v-if="info.signMethod === 0">
|
||
<view class="card-title m-top-30">合同条款</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>
|
||
<view class="card-title m-top-30">已收到的加工申请</view>
|
||
<view class="table-box m-top-30">
|
||
<view class="thead">
|
||
<view class="tr">
|
||
<view class="th">加工商</view>
|
||
<view class="th">申请时间</view>
|
||
</view>
|
||
</view>
|
||
<view class="tbody">
|
||
<view class="tr" v-for="(item, index) in info.quoteList.rows" :key="index">
|
||
<view class="td" v-if="info.user">{{
|
||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||
}}
|
||
</view>
|
||
<view class="td">{{ item._add_time_str }}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 底部 -->
|
||
<view class="fiexd-bottom flex justify-between align-center bg-white" v-if="info">
|
||
<u-icon name="integral" color="#A92924" size="26"></u-icon>
|
||
<view class="text red flex-1 m-left-20" v-if="info">{{ info.quoteNum }}家已经申请合作</view>
|
||
<view class="apply-btn" @click="toQuote" v-if="userInfo._id !== info.userId && info.status === 0">{{
|
||
info.disabled ? '已超时无法报价' : '申请合作'
|
||
}}
|
||
</view>
|
||
<view class="apply-btn" @click="isPopup = true" v-else-if="userInfo._id === info.userId">收到的报价</view>
|
||
</view>
|
||
<!-- 弹出窗 -->
|
||
<u-popup :show="isPopup" mode="center" @close="isPopup = false" @open="open" :customStyle="{width: '95%'}">
|
||
<view class="popup-box" v-if="info">
|
||
<view class="popup-title flex justify-between align-center">
|
||
<view class="title">收到的合作申请列表</view>
|
||
<view class="close" @click="isPopup = false">关闭</view>
|
||
</view>
|
||
<view v-for="(item, index) in info.quoteList.rows" :key="index" class="border-bottom py-20 ">
|
||
<view class="flex justify-start items-center">
|
||
<text class="mr-10">加工商:</text>
|
||
<text v-if="item.user">{{
|
||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||
}}
|
||
</text>
|
||
</view>
|
||
<view class="flex justify-start items-center">
|
||
<text class="mr-10">报价:</text>
|
||
<text>{{ item.totalPrice }}元</text>
|
||
</view>
|
||
<view class="flex justify-start items-center">
|
||
<text class="mr-10">附件:</text>
|
||
<template v-if="item.files.length">
|
||
<file-type :item="file" v-for="(file, fileIndex) in item.files" :key="fileIndex"
|
||
@click.native="openDownload(file)"/>
|
||
</template>
|
||
<text v-else>无</text>
|
||
</view>
|
||
<view class="flex justify-start items-center">
|
||
<text class="mr-10">报价详情:</text>
|
||
<text>{{ item.remark ? item.remark : '无' }}</text>
|
||
</view>
|
||
<view class="flex justify-start items-center">
|
||
<text class="mr-10">申请时间:</text>
|
||
<text>{{ item._add_time_str }}</text>
|
||
</view>
|
||
<view class="flex justify-start items-center mt-25">
|
||
<u-button
|
||
size="mini"
|
||
type="error"
|
||
text="选择"
|
||
style="width: 40rpx;"
|
||
@click.native="createContract(item)" v-if="info.status === 0"
|
||
></u-button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</u-popup>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import uiheader from '@/components/index/header'
|
||
import uititle from '@/components/common/title'
|
||
import dayjs from "dayjs";
|
||
import {INVOICE_TYPE, PROCESS_PAY_METHOD, WRITE_INVOICE_TIME} from "../../util";
|
||
import FileType from "@/components/file-type/file-type.vue";
|
||
|
||
export default {
|
||
components: {
|
||
FileType,
|
||
uiheader,
|
||
uititle,
|
||
},
|
||
data() {
|
||
return {
|
||
isPopup: false,
|
||
id: null,
|
||
info: null,
|
||
userInfo: null,
|
||
};
|
||
},
|
||
methods: {
|
||
PROCESS_PAY_METHOD() {
|
||
return PROCESS_PAY_METHOD
|
||
},
|
||
INVOICE_TYPE() {
|
||
return INVOICE_TYPE
|
||
},
|
||
WRITE_INVOICE_TIME() {
|
||
return WRITE_INVOICE_TIME
|
||
},
|
||
dayjs,
|
||
applyLink() {
|
||
uni.$u.route('/pages/work/apply', {
|
||
id: 0,
|
||
});
|
||
},
|
||
getInfo() {
|
||
vk.callFunction({
|
||
url: 'client/process/sheet/pub/getInfo',
|
||
data: {
|
||
id: this.id
|
||
}
|
||
}).then((res) => {
|
||
if (!this.info || !this.info.userId) {
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: '该加工单已下架',
|
||
showCancel: false,
|
||
confirmText: '返回',
|
||
success: res => {
|
||
uni.navigateBack()
|
||
}
|
||
})
|
||
}
|
||
this.info = res
|
||
this.info.disabled = (!this.info.answerEndTime || dayjs(this.info.answerEndTime).isBefore(dayjs()))
|
||
})
|
||
},
|
||
async toQuote() {
|
||
if (this.info.disabled) return
|
||
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)) {
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: '您尚未认证, 是否前往认证?',
|
||
success: res => {
|
||
if (res.confirm) {
|
||
uni.setStorageSync('user_tab', 0)
|
||
uni.switchTab({url: '/pages/user/user'})
|
||
}
|
||
}
|
||
})
|
||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: '请完善名片信息',
|
||
success: res => {
|
||
if (res.confirm) {
|
||
uni.setStorageSync('user_tab', 1)
|
||
uni.switchTab({url: '/pages/user/user'})
|
||
}
|
||
}
|
||
})
|
||
} else if (accountNum === 0) {
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: '请先到个人中心添加收款账户',
|
||
success: res => {
|
||
if (res.confirm) {
|
||
uni.setStorageSync('user_tab', 7)
|
||
uni.switchTab({url: '/pages/user/user'})
|
||
}
|
||
}
|
||
})
|
||
} else {
|
||
if (userInfo.businessCard.status !== 1) {
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: '您的名片信息未审核,请耐心等待',
|
||
})
|
||
return
|
||
}
|
||
vk.navigateTo(`/pages/work/apply?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.getStorageSync('uni_id_user_info')._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/public/contract')
|
||
else {
|
||
if (this.info.signMethod === 1) vk.navigateTo('/pages/user/buyer?menuIndex=0')
|
||
else vk.navigateTo('/pages/public/contract?tab=1')
|
||
}
|
||
}, 1500)
|
||
})
|
||
},
|
||
openDownload(url) {
|
||
window.location.href = url
|
||
}
|
||
},
|
||
onLoad({id}) {
|
||
this.id = id
|
||
this.userInfo = vk.getStorageSync('uni_id_user_info')
|
||
this.getInfo()
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
page {
|
||
padding-bottom: 150rpx;
|
||
background: #ffffff;
|
||
}
|
||
|
||
.card-title {
|
||
position: relative;
|
||
padding-left: 20rpx;
|
||
font-size: 28rpx;
|
||
font-weight: 600;
|
||
line-height: 48rpx;
|
||
color: #A92924;
|
||
|
||
&:before {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 50%;
|
||
z-index: 9;
|
||
margin-top: -14rpx;
|
||
content: '';
|
||
width: 6rpx;
|
||
height: 28rpx;
|
||
background: #A92924;
|
||
}
|
||
|
||
.more {
|
||
font-size: 24rpx;
|
||
font-weight: normal;
|
||
color: #999999;
|
||
}
|
||
}
|
||
|
||
.layout-detail {
|
||
padding: 20rpx 30rpx;
|
||
}
|
||
|
||
.company {
|
||
padding-bottom: 40rpx;
|
||
border-bottom: 1px solid #f2f2f2;
|
||
|
||
.logo {
|
||
width: 120rpx;
|
||
height: 120rpx;
|
||
}
|
||
|
||
.name-text {
|
||
//max-width: 380rpx;
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
line-height: 40rpx;
|
||
color: #333333;
|
||
}
|
||
|
||
.name-icon {
|
||
width: 80rpx;
|
||
height: 32rpx;
|
||
}
|
||
|
||
.zhu {
|
||
margin-top: 10rpx;
|
||
font-size: 24rpx;
|
||
line-height: 32rpx;
|
||
color: #999999;
|
||
}
|
||
}
|
||
|
||
.detail-title {
|
||
font-size: 26rpx;
|
||
font-weight: 600;
|
||
line-height: 40rpx;
|
||
color: #101010;
|
||
}
|
||
|
||
.detail-text {
|
||
padding: 15rpx 0;
|
||
font-size: 26rpx;
|
||
line-height: 40rpx;
|
||
color: #333333;
|
||
}
|
||
|
||
.fiexd-bottom {
|
||
position: fixed;
|
||
left: 0;
|
||
bottom: 0;
|
||
z-index: 99;
|
||
width: 100%;
|
||
height: 130rpx;
|
||
padding: 0 30rpx;
|
||
box-sizing: border-box;
|
||
border-top: 1px solid #f2f2f2;
|
||
|
||
.text {
|
||
font-size: 26rpx;
|
||
line-height: 40rpx;
|
||
}
|
||
|
||
.apply-btn {
|
||
width: 220rpx;
|
||
height: 70rpx;
|
||
font-size: 26rpx;
|
||
line-height: 70rpx;
|
||
text-align: center;
|
||
color: #ffffff;
|
||
background: #A92924;
|
||
}
|
||
}
|
||
|
||
.table-box {
|
||
font-size: 24rpx;
|
||
line-height: 28rpx;
|
||
text-align: center;
|
||
}
|
||
|
||
.tr {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
}
|
||
|
||
.th {
|
||
color: #666 !important;
|
||
background: #FFF8F2;
|
||
}
|
||
|
||
.th, .td {
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
width: 50%;
|
||
height: 76rpx;
|
||
color: #999;
|
||
overflow: hidden;
|
||
box-sizing: border-box;
|
||
border-left: 1px solid #f2f2f2;
|
||
border-right: 1px solid #f2f2f2;
|
||
border-bottom: 1px solid #f2f2f2;
|
||
}
|
||
|
||
.td {
|
||
border-right: 1px solid #f2f2f2;
|
||
border-bottom: 1px solid #f2f2f2;
|
||
background: #ffffff;
|
||
}
|
||
|
||
.td-3 {
|
||
width: 33.33%;
|
||
}
|
||
|
||
.popup-box {
|
||
padding: 20rpx 20rpx;
|
||
}
|
||
|
||
.popup-title {
|
||
padding: 18rpx 0;
|
||
border-bottom: 1px solid #A92924;
|
||
|
||
.title {
|
||
font-size: 24rpx;
|
||
line-height: 40rpx;
|
||
color: #A92924;
|
||
}
|
||
|
||
.close {
|
||
width: 80rpx;
|
||
height: 40rpx;
|
||
font-size: 22rpx;
|
||
line-height: 40rpx;
|
||
text-align: center;
|
||
color: #ffffff;
|
||
background: #A92924;
|
||
}
|
||
}
|
||
</style>
|