20261008
This commit is contained in:
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<!-- 吸顶 -->
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<!-- 标题 -->
|
||||
<uititle title="申请加工"></uititle>
|
||||
</u-sticky>
|
||||
<view class="layout layout-title m-top-20">填写合作信息</view>
|
||||
<quote-remain-num v-if="reloaded && sheet" :amount="sheet.quoteAmount" type="process" :id="sheetId"/>
|
||||
<view class="layout layout-publish m-top-20 bg-white">
|
||||
<view class="card-title m-top-30">报价信息</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need m-right-20">加工费总价:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
border="surround"
|
||||
v-model="formData.totalPrice"
|
||||
suffixIcon="元"
|
||||
suffixIconStyle="font-size: 24rpx;color: #909399"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="group flex align-center m-top-30">-->
|
||||
<!-- <view class="lb need m-right-20">人民币大写:</view>-->
|
||||
<!-- <view class="vl flex-1">-->
|
||||
<!-- <u--input-->
|
||||
<!-- placeholder="请输入内容"-->
|
||||
<!-- border="surround"-->
|
||||
<!-- v-model="value"-->
|
||||
<!-- @change="change"-->
|
||||
<!-- ></u--input>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view class="group flex items-start m-top-30">
|
||||
<view class="lb m-right-20 w-25p mt-20">报价单详情:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-textarea
|
||||
placeholder="请输入报价单详情"
|
||||
border="surround"
|
||||
v-model="formData.remark"
|
||||
suffixIconStyle="font-size: 24rpx;color: #909399"
|
||||
></u-textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-title m-top-30">附件信息</view>
|
||||
<view class="group m-top-20">
|
||||
<view class="lb need m-right-20">附件内容:</view>
|
||||
<view class="flex justify-between align-center m-top-20">
|
||||
<!-- <view class="lbx flex-1">上传自有申请单图片或文档,支持jpg/png/word/excel。</view>-->
|
||||
<!-- <view class="download">申请单样板下载</view>-->
|
||||
</view>
|
||||
<view class="m-top-30">
|
||||
<u-upload
|
||||
accept="file"
|
||||
:fileList="files"
|
||||
@afterRead="afterRead"
|
||||
@delete="deletePic"
|
||||
multiple
|
||||
:maxCount="10"
|
||||
></u-upload>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-button class="public-btn m-top-30" text="提交申请" @click="submit"></u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from '@/components/common/title'
|
||||
import dayjs from "dayjs";
|
||||
import md5 from "js-md5";
|
||||
export default {
|
||||
components: {
|
||||
uititle,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sheet: null,
|
||||
fileList1: [],
|
||||
sheetId: null,
|
||||
formData: {
|
||||
totalPrice: '',
|
||||
files: [],
|
||||
remark: '',
|
||||
},
|
||||
reloaded: false,
|
||||
files: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handTag(val) {
|
||||
val.checked = !val.checked
|
||||
},
|
||||
afterRead({file}) {
|
||||
file.forEach(item => {
|
||||
const suffix = item.name.split('.').pop()
|
||||
uniCloud.uploadFile({
|
||||
filePath: item.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this.formData.files.push(res.fileList[0].tempFileURL)
|
||||
this.files.push({
|
||||
url: res.fileList[0].tempFileURL,
|
||||
name: item.name
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
deletePic({index}) {
|
||||
this.formData.files.splice(index, 1)
|
||||
},
|
||||
async submit() {
|
||||
|
||||
const data = await vk.userCenter.getCurrentUserInfo();
|
||||
const {userInfo} = data
|
||||
if (userInfo.quoteTimes > 3) {
|
||||
|
||||
}
|
||||
vk.callFunction({
|
||||
url: 'client/process/quote/kh/addQuote',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
sheetId: this.sheetId,
|
||||
...this.formData
|
||||
},
|
||||
success: (data) => {
|
||||
this.$message({
|
||||
message: "报价成功",
|
||||
type: 'success'
|
||||
})
|
||||
vk.navigateBack()
|
||||
}
|
||||
});
|
||||
},
|
||||
getDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getInfo',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: this.sheetId
|
||||
},
|
||||
success: (res) => {
|
||||
this.sheet = res
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
onLoad({sheetId}) {
|
||||
this.sheetId = sheetId
|
||||
this.getDetail()
|
||||
},
|
||||
onShow() {
|
||||
this.reloaded = false
|
||||
setTimeout(() => {
|
||||
this.reloaded = true
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-title {
|
||||
padding: 20rpx 30rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 44rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
.card-title {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #A92924;
|
||||
&:before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -14rpx;
|
||||
content: '';
|
||||
width: 4rpx;
|
||||
height: 28rpx;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
.public-btn {
|
||||
width: 80%;
|
||||
margin-top: 60rpx;
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
.layout-publish {
|
||||
margin: 20rpx 30rpx;
|
||||
padding: 50rpx 30rpx;
|
||||
border-radius: 18rpx;
|
||||
}
|
||||
.tag-title {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #000000;
|
||||
.limit {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.tag-box {
|
||||
padding: 20rpx 0;
|
||||
.item {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #555555;
|
||||
}
|
||||
.active {
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
.lb,.fix {
|
||||
position: relative;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.lbx {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.download {
|
||||
padding: 8rpx 20rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
.need::before {
|
||||
position: absolute;
|
||||
left: -16rpx;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -12rpx;
|
||||
content: '*';
|
||||
color: #A92924;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,566 @@
|
||||
<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>
|
||||
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<uititle title="加工厂信息"></uititle>
|
||||
</u-sticky>
|
||||
<view class="m-a w-1200 bg-white p-20 rounded">
|
||||
<el-divider>
|
||||
<span class="text-50 text-main font-bold">工厂信息</span>
|
||||
</el-divider>
|
||||
<el-descriptions border :column="1">
|
||||
<el-descriptions-item label="成立年限">
|
||||
<p>{{ info.year }}年</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年产值">
|
||||
<p>{{ info.yearsIncome }}万元</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="员工人数">
|
||||
<p>{{ info.employeeNum }}人</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="流水线数量">
|
||||
<p>{{ info.flowNum }}条</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="厂房归属">
|
||||
<p>{{ info.blongTo }}</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="厂房面积">
|
||||
<p>{{ info.size }}平方米</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所在地">
|
||||
<p>{{ info.addressRegion.province.name }}{{ info.addressRegion.city.name }}</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主营工艺和业务范围">
|
||||
<p>{{ info.mainProcess }}</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="服务信息">
|
||||
<p>{{ info.serviceInfo }}</p>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template v-if="info.video">
|
||||
<el-divider>
|
||||
<span class="text-50 text-main font-bold">视频</span>
|
||||
</el-divider>
|
||||
<video :src="info.video" style="width: 100%" controls></video>
|
||||
</template>
|
||||
<el-divider>
|
||||
<span class="text-50 text-main font-bold">设备信息</span>
|
||||
</el-divider>
|
||||
|
||||
<view v-for="(item, index) in info.deviceList" :key="index"
|
||||
class="fle flex-col justify-start items-start border-bottom">
|
||||
<view class="flex justify-center">
|
||||
<p class="mb-10 flex-1">设备名称:{{ item.name }}</p>
|
||||
<p class="mb-10 flex-1">设备数量:{{ item.num }}台</p>
|
||||
</view>
|
||||
<view class="flex justify-center">
|
||||
<p class="mb-10 flex-1">设备来源:{{ item.source }}</p>
|
||||
<p class="mb-10 flex-1">设备类型:{{ item.type }}</p>
|
||||
</view>
|
||||
<p class="mb-10">品牌:{{ item.brand }}</p>
|
||||
<p class="mb-10">型号:{{ item.model }}</p>
|
||||
<p class="mb-10">投产年限:{{ item.year }}年</p>
|
||||
<p class="mb-10">特点描述:{{ item.desc }}</p>
|
||||
</view>
|
||||
|
||||
<el-divider>
|
||||
<span class="text-50 text-main font-bold">工厂实景</span>
|
||||
</el-divider>
|
||||
<div class="flex justify-start items-start">
|
||||
<el-image v-for="(item, index) in info.album" :key="index" :src="item" class="mr-25 mb-25"
|
||||
style="width: 200px; height: 200px;" fit="cover" :preview-src-list="info.album"/>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from "@/components/common/title.vue";
|
||||
|
||||
export default {
|
||||
name: "factory",
|
||||
components: {uititle},
|
||||
data() {
|
||||
return {
|
||||
info: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getInfo(userId) {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/factory/pub/getInfo',
|
||||
data: {
|
||||
userId
|
||||
}
|
||||
})
|
||||
if (!data) {
|
||||
this.$message.error('获取工厂信息失败')
|
||||
setTimeout(() => {
|
||||
vk.navigationBack()
|
||||
}, 1000)
|
||||
} else {
|
||||
this.info = data
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.userId) {
|
||||
this.getInfo(options.userId)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,515 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<uititle title="加工厂列表"></uititle>
|
||||
</u-sticky>
|
||||
<!-- 商品列表 -->
|
||||
<cmswiper page="factory" height="320rpx"></cmswiper>
|
||||
<cmsearch :k="keyword" @search="afterSearch" :show-back="false"></cmsearch>
|
||||
<view class="layout-pick flex justify-between align-center bg-white text-25" >
|
||||
<view class="flex justify-start items-center">
|
||||
<view class="flex-1 ip down" @click="isPick = true">分类: {{ pickValue ? pickValue : '全部分类' }}</view>
|
||||
</view>
|
||||
<view class="ip down" @click="showAddress" style="width: 300rpx">省份:{{ locationValue }}</view>
|
||||
</view>
|
||||
<view class="goods-list">
|
||||
<uiswiper :ad="12" :category-name="cateId ? pickValue : ''"
|
||||
:category-names="cateId ? [pickValue] : []" :region="region" padding="10rpx 0"></uiswiper>
|
||||
<uiswiper :ad="122" :category-name="cateId ? pickValue : ''"
|
||||
:category-names="cateId ? [pickValue] : []" :region="region" padding="10rpx 0"></uiswiper>
|
||||
<view v-for="(item, index) in list.rows" :key="index" class="goods">
|
||||
<view class="goods-info">
|
||||
<!-- <el-image src="https://oss.wsdns.cn/20231204/d35332fa6a3b4596b522edf9527ac612.png"-->
|
||||
<!-- class="goods-img"/>-->
|
||||
<view class="info" @click="$jump(`/pages/work/factory?userId=${item.uid}`)">
|
||||
<view class="field w-100p">
|
||||
<view class="desc">
|
||||
<view class="text">企 业</view>
|
||||
<view v-if="item.user">
|
||||
{{ item.user.accountType === 2 ? item.user.company.companyName : item.user.person.personName }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc"></view>
|
||||
<view class="desc">
|
||||
<view class="text">所在地区</view>
|
||||
<view>{{ item.addressRegion.province.name }}{{ item.addressRegion.city.name }}</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-center w-100p">
|
||||
<view class="desc flex-1">
|
||||
<view class="text">成立年限</view>
|
||||
<view>{{ item.year }}年</view>
|
||||
</view>
|
||||
<view class="desc flex-1">
|
||||
<view class="text">年产值</view>
|
||||
<view>{{ item.yearsIncome }}万元</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-center w-100p">
|
||||
<view class="desc flex-1">
|
||||
<view class="text">员工人数</view>
|
||||
<view>{{ item.employeeNum }}人</view>
|
||||
</view>
|
||||
<view class="desc flex-1">
|
||||
<view class="text">流水线数量</view>
|
||||
<view>{{ item.flowNum }}条</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-center w-100p">
|
||||
<view class="desc flex-1">
|
||||
<view class="text">厂房归属</view>
|
||||
<view>{{ item.blongTo }}</view>
|
||||
</view>
|
||||
<view class="desc flex-1">
|
||||
<view class="text">厂房面积</view>
|
||||
<view>{{ item.size }}㎡</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">服务信息</view>
|
||||
<view>{{ item.serviceInfo }}</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text mr-15" style="width: 240rpx">主营工艺和业务范围</view>
|
||||
<view class="flex-1">{{ item.mainProcess }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buttons">
|
||||
<button type="default" class="btn" plain @click="doShowContract(index)">查看电话
|
||||
</button>
|
||||
<button type="default" class="btn green" plain @click="doShowWechat(index)">添加微信
|
||||
</button>
|
||||
<button type="default" class="btn" plain @click="$jump(`/pages/work/factory?userId=${item.uid}`)">查看详情
|
||||
</button>
|
||||
<view class="wechat"
|
||||
v-if="item.user && parseInt(item.user.accountType) === 2 && item.user.businessCard && item.user.businessCard.companyWechat && item.showWechat">
|
||||
<el-image :src="item.user.businessCard.companyWechat" style="width: 100%; height: 100%"/>
|
||||
</view>
|
||||
<view class="wechat"
|
||||
v-if="item.user && parseInt(item.user.accountType) === 1 && item.user.businessCard && item.user.businessCard.personalWechat && item.showWechat">
|
||||
<el-image :src="item.user.businessCard.personalWechat" style="width: 100%; height: 100%"/>
|
||||
</view>
|
||||
<view class="mobile" v-if="item.user && item.showContract && item.user.businessCard">
|
||||
<i class="el-icon-phone"></i>
|
||||
<text class="ml-20">{{
|
||||
(item.user.businessCard && item.user.businessCard.companyMobile) ? item.user.businessCard.companyMobile : '暂无电话'
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
|
||||
<u-picker v-if="isPick" :show="isPick" :columns="[categoryTreeData]"
|
||||
key-name="name" @confirm="handConfirmPick" @cancel="isPick = false">
|
||||
<template #more>
|
||||
<text @click="resetCate">重置</text>
|
||||
</template>
|
||||
</u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from "@/components/common/title.vue";
|
||||
import cmswiper from "@/components/common/swiper.vue";
|
||||
import uiswiper from "@/components/index/swiper.vue";
|
||||
import cmsearch from "@/components/common/search.vue";
|
||||
import AddressSelect from "@/components/AddressSelect.vue";
|
||||
|
||||
export default {
|
||||
components: {AddressSelect, cmsearch, uiswiper, cmswiper, uititle},
|
||||
data() {
|
||||
return {
|
||||
checkCategoryList: [],
|
||||
clickedCateIndex: -1,
|
||||
checkProvinceList: [],
|
||||
categoryTreeData: [],
|
||||
allChildCate: [],
|
||||
keyword: '',
|
||||
list: {
|
||||
total: 0,
|
||||
rows: []
|
||||
},
|
||||
showAllProvince: false,
|
||||
type: 0,
|
||||
pageSize: 500,
|
||||
pickValue: '全部',
|
||||
isPick: false,
|
||||
locationValue: '全国',
|
||||
region: {
|
||||
province: {
|
||||
code: null,
|
||||
name: null,
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.type) this.type = option.type
|
||||
vk.callFunction({
|
||||
url: 'client/process/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
this.allChildCate = []
|
||||
this.categoryTreeData.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
this.search(1)
|
||||
},
|
||||
methods: {
|
||||
showAddress() {
|
||||
this.$refs.AddressSelect.open(this.region, 1, true);
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
afterSearch(keyword) {
|
||||
this.keyword = keyword
|
||||
this.search()
|
||||
},
|
||||
selectCate(id) {
|
||||
const index = this.checkCategoryList.indexOf(id)
|
||||
if (index === -1) this.checkCategoryList.push(id)
|
||||
else this.checkCategoryList.splice(index, 1)
|
||||
this.search(1)
|
||||
},
|
||||
selectProvince(code) {
|
||||
if (code === -1) this.checkProvinceList = []
|
||||
else {
|
||||
const index = this.checkProvinceList.indexOf(code)
|
||||
if (index === -1) this.checkProvinceList.push(code)
|
||||
else this.checkProvinceList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/my'
|
||||
})
|
||||
},
|
||||
|
||||
search(pageIndex) {
|
||||
// const categoryIds = []
|
||||
// this.allChildCate.map(item => {
|
||||
// if (this.checkCategoryList.indexOf(item._id) > -1) categoryIds.push(item.name)
|
||||
// })
|
||||
console.log(this.region)
|
||||
vk.callFunction({
|
||||
url: 'client/factory/pub/getList',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.keyword,
|
||||
mainSpotCategory: this.cateId ? this.pickValue : null,
|
||||
province: this.region ? this.region.province.code : null
|
||||
},
|
||||
success: ({data}) => {
|
||||
data.rows.map(item => {
|
||||
item.showWechat = false
|
||||
item.showContract = false
|
||||
return item
|
||||
})
|
||||
this.list = data
|
||||
console.log(this.list)
|
||||
}
|
||||
});
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
success: (res) => {
|
||||
location.href = res.data.url
|
||||
}
|
||||
});
|
||||
},
|
||||
doShowWechat(index) {
|
||||
if (parseInt(this.list.rows[index].user.accountType) === 2 && !this.list.rows[index].user.businessCard.companyWechat)
|
||||
return vk.toast('用户暂未上传')
|
||||
else if (parseInt(this.list.rows[index].user.accountType) === 1 && !this.list.rows[index].user.businessCard.personalWechat)
|
||||
return vk.toast('用户暂未上传')
|
||||
this.list.rows[index].showContract = false
|
||||
this.list.rows[index].showWechat = !this.list.rows[index].showWechat
|
||||
},
|
||||
doShowContract(index) {
|
||||
this.list.rows[index].showWechat = false
|
||||
this.list.rows[index].showContract = !this.list.rows[index].showContract
|
||||
},
|
||||
handConfirmPick({value}) {
|
||||
console.log(value)
|
||||
this.pickValue = value[0].name
|
||||
this.cateId = value[0]._id
|
||||
this.isPick = false
|
||||
this.search(1)
|
||||
},
|
||||
resetCate() {
|
||||
this.cateIndex = [0, 0]
|
||||
this.pickValue = '全部'
|
||||
this.cateId = null
|
||||
this.region = null
|
||||
this.isPick = false
|
||||
this.search(1)
|
||||
},
|
||||
regionConfirm({province}) {
|
||||
this.region = {province}
|
||||
this.locationValue = `${province.name}`
|
||||
this.search(1)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
//width: 1200px;
|
||||
margin: 20rpx auto;
|
||||
}
|
||||
|
||||
.page-nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
//width: 1200px;
|
||||
margin: 20rpx auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.goods-list {
|
||||
//width: 1200px;
|
||||
//margin: 20rpx auto;
|
||||
//display: flex;
|
||||
//flex-direction: column;
|
||||
//justify-content: space-between;
|
||||
//flex-wrap: wrap;
|
||||
padding: 30rpx;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.goods {
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.05);
|
||||
text-align: center;
|
||||
//width: 1200px;
|
||||
margin: 10px auto;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
|
||||
.goods-info {
|
||||
display: flex;
|
||||
|
||||
.goods-img {
|
||||
width: 200rpx;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 700rpx;
|
||||
text-align: left;
|
||||
margin-left: 20rpx;
|
||||
|
||||
.goods-name {
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
line-height: 2.5em;
|
||||
}
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
|
||||
.desc {
|
||||
display: flex;
|
||||
//width: 700rpx;
|
||||
line-height: 45rpx;
|
||||
|
||||
.text {
|
||||
width: 140rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
position: relative;
|
||||
|
||||
.btn {
|
||||
font-size: 25rpx;
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: #7ec050 !important;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.wechat {
|
||||
position: absolute;
|
||||
left: 260rpx;
|
||||
top: -200rpx;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
box-shadow: 0 1px 10px 0 #eee
|
||||
}
|
||||
|
||||
.mobile {
|
||||
position: absolute;
|
||||
left: 10rpx;
|
||||
top: -80rpx;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
box-shadow: 0 1px 10px 0 #999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
&-title {
|
||||
font-size: 15px;
|
||||
color: #101010;
|
||||
height: 62px;
|
||||
padding-top: 20rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&-stock {
|
||||
font-size: 12px;
|
||||
color: #BD3124;
|
||||
}
|
||||
|
||||
&-address {
|
||||
font-size: 12px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
&-image {
|
||||
width: 200rpx;
|
||||
height: 70px;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-company {
|
||||
color: #4F4F4F;
|
||||
font-size: 14px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
&-buy {
|
||||
width: 108rpx;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
color: rgba(169, 41, 36, 1);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
font-family: Roboto;
|
||||
border: 1px solid rgba(169, 41, 36, 1);
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.goods-image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.selected-cate {
|
||||
border-bottom: 2px solid #BD3124;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.child-cate {
|
||||
background-color: #DB8382;
|
||||
color: white;
|
||||
margin-top: 10rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.layout-pick {
|
||||
// width: 690rpx;
|
||||
height: 68rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #4F4F4F;
|
||||
|
||||
.ip {
|
||||
position: relative;
|
||||
//width: ;
|
||||
//max-width: 33.333%;
|
||||
width: 300rpx;
|
||||
height: 40rpx;
|
||||
padding-right: 30rpx;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.down::after {
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
content: '';
|
||||
margin-top: -6rpx;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 10rpx solid transparent;
|
||||
border-right: 10rpx solid transparent;
|
||||
border-top: 12rpx solid #999999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<uititle title="我发布的加工"></uititle>
|
||||
</u-sticky>
|
||||
<view class="issue" @click="toRelease">
|
||||
<u-icon name="plus" color="#fff" size="24"></u-icon>
|
||||
</view>
|
||||
<view class="layout-goods">
|
||||
<view class="goods-box p-top-10" v-if="list.length">
|
||||
<view class="item bg-white" v-for="(item, index) in list"
|
||||
:key="index">
|
||||
<view @click="detailLink(item._id)" class="askfor">查看详情</view>
|
||||
<view @click="detailLink(item._id)" class="text-25 text-gray text-single">单号{{ item.orderNo }}</view>
|
||||
<view @click="detailLink(item._id)" class="title text-single">{{ item.title }}</view>
|
||||
<view @click="detailLink(item._id)" class="text m-top-10">
|
||||
<text class="red">加工量:{{ parseInt(item.num) }}</text>
|
||||
<text class="red">{{ item.quoteNum }}家已报价</text>
|
||||
</view>
|
||||
<text @click="detailLink(item._id)" class="text-25 text-gray" v-if="item.remark">备注:{{ item.remark }}</text>
|
||||
<view @click="detailLink(item._id)" class="date">{{ item._add_time_str }} 发布</view>
|
||||
<view>
|
||||
<u-button type="primary" plain size="mini" @click="del(item._id)">删除</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-else text="您未发布加工单"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from '@/components/common/title'
|
||||
|
||||
export default {
|
||||
name: "my",
|
||||
components: {uititle},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
userInfo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
detailLink(id) {
|
||||
vk.navigateTo(`/pages/work/detail?id=${id}`);
|
||||
},
|
||||
async getList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
userId: this.userInfo._id,
|
||||
isUser: true
|
||||
}
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
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 {
|
||||
vk.navigateTo({
|
||||
url: '/pages/work/publish'
|
||||
})
|
||||
}
|
||||
},
|
||||
del(_id) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '如果你要删除此条信息,之前其他客户填写的留言将无法查看',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id
|
||||
},
|
||||
}).then(res => {
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.userInfo = vk.getStorageSync('uni_id_user_info')
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.layout-goods {
|
||||
// width: 690rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
margin-top: 30rpx;
|
||||
padding: 10rpx 20rpx 20rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.title {
|
||||
width: 90%;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
.link, .askfor {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 16rpx;
|
||||
z-index: 9;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
padding: 4rpx 8rpx;
|
||||
}
|
||||
|
||||
.link {
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.red {
|
||||
margin-right: 20rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.company {
|
||||
height: 40rpx;
|
||||
|
||||
.icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
//width: 300rpx;
|
||||
height: 40rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #4f4f4f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item:nth-child(1) {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<uititle title="我的报价"></uititle>
|
||||
</u-sticky>
|
||||
<view class="issue" @click="toRelease">
|
||||
<u-icon name="plus" color="#fff" size="24"></u-icon>
|
||||
</view>
|
||||
<view class="layout-goods">
|
||||
<view class="goods-box p-top-10" v-if="list.length">
|
||||
<view class="item bg-white" @click="detailLink(item.sheetId)" v-for="(item, index) in list"
|
||||
:key="index">
|
||||
<view class="askfor">查看详情</view>
|
||||
<view class="title text-single">{{ item.sheet.title }}</view>
|
||||
<view class="text m-top-10">
|
||||
<text class="red">加工量:{{ parseInt(item.sheet.num) }}</text>
|
||||
<text class="red">金额:{{ parseInt(item.totalPrice) }}元</text>
|
||||
</view>
|
||||
<text class="text-25 text-gray" v-if="item.remark">备注:{{ item.remark }}</text>
|
||||
<view class="date">{{ item._add_time_str }} 发布</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-else text="您未报价"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from '@/components/common/title'
|
||||
|
||||
export default {
|
||||
name: "my",
|
||||
components: {uititle},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
userInfo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
detailLink(sheetId) {
|
||||
vk.navigateTo(`/pages/work/detail?id=${sheetId}`);
|
||||
},
|
||||
async getList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/process/quote/kh/getList'
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
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 {
|
||||
vk.navigateTo({
|
||||
url: '/pages/work/publish'
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.userInfo = vk.getStorageSync('uni_id_user_info')
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.layout-goods {
|
||||
// width: 690rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
margin-top: 10rpx;
|
||||
padding: 10rpx 20rpx 20rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.title {
|
||||
width: 90%;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
.link, .askfor {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 16rpx;
|
||||
z-index: 9;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
padding: 4rpx 8rpx;
|
||||
}
|
||||
|
||||
.link {
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.red {
|
||||
margin-right: 20rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.company {
|
||||
height: 40rpx;
|
||||
|
||||
.icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
//width: 300rpx;
|
||||
height: 40rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #4f4f4f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item:nth-child(1) {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,439 @@
|
||||
<template> <!-- 找加工 -->
|
||||
<view class="wrap">
|
||||
<!-- 吸顶 -->
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<!-- 顶部 -->
|
||||
<uiheader title="找加工"></uiheader>
|
||||
<!-- 搜索栏 -->
|
||||
<cmsearch :k="keyword" @search="afterSearch" :show-back="false"></cmsearch>
|
||||
<!-- 轮播图-传值:list="数组" -->
|
||||
<cmswiper page="process" height="320rpx"></cmswiper>
|
||||
<!-- 选择器 -->
|
||||
<view class="bg-white p-20 flex justify-center items-center">
|
||||
<view class="flex-1 mx-20">
|
||||
<u-button type="primary" shape="circle" size="small" @click="toRelease">发布加工</u-button>
|
||||
</view>
|
||||
<view class="flex-1 mx-20">
|
||||
<u-button type="primary" shape="circle" size="small" plain @click="toMyEnquiry">我发布的</u-button>
|
||||
</view>
|
||||
<view class="flex-1 mx-20">
|
||||
<u-button type="primary" shape="circle" size="small" plain @click="toMyQuote">我的报价</u-button>
|
||||
</view>
|
||||
<view class="flex-1 mx-20">
|
||||
<u-button type="success" shape="circle" size="small" plain @click="$jump('/pages/work/factoryList')">
|
||||
加工厂列表
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="layout-pick flex flex-col justify-start items-start bg-white text-25">
|
||||
<view class="flex justify-start items-center">
|
||||
<view class="flex-1 ip down" @click="isPick = true">分类: {{ pickValue ? pickValue : '全部分类' }}</view>
|
||||
</view>
|
||||
<view class="flex justify-between items-center mt-15 w-100p">
|
||||
<view class="ip down" @click="isPickStatus = true">询价状态: {{ status }}</view>
|
||||
<view class="ip down" @click="showAddress">地区:{{ locationValue }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<!-- 数据列表 -->
|
||||
<view class="layout layout-work">
|
||||
<uiswiper :ad="13" :category-id="cateId" :category-ids="cateId ? [cateId] : []" :region="region"
|
||||
padding="10rpx 0"></uiswiper>
|
||||
<uiswiper :ad="14" :category-id="cateId" :category-ids="cateId ? [cateId] : []" :region="region"
|
||||
padding="10rpx 0"></uiswiper>
|
||||
<view class="table-box">
|
||||
<view class="thead">
|
||||
<view class="tr">
|
||||
<view class="flex justify-center items-center font-bold" style="width: 41%; height: 50rpx">标题</view>
|
||||
<view class="flex justify-center items-center w-15p font-bold" style="height: 50rpx">加工量</view>
|
||||
<view class="flex justify-center items-center font-bold" style="width: 32%; height: 50rpx">收货地</view>
|
||||
<view class="flex justify-center items-center w-12p font-bold" style="height: 50rpx">操作</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tbody mt-10">
|
||||
<view class="flex justify-center items-center" v-for="(item, index) in list.rows" :key="index">
|
||||
<view class="td-n flex justify-center items-center" @click="toDetail(item._id)" style="width: 41%;">
|
||||
<text class="u-line-2 flex justify-center items-center">{{ item.title }}</text>
|
||||
</view>
|
||||
<view class="td-n w-15p flex justify-center items-center">{{ item.num }}</view>
|
||||
<view class="td-n flex justify-center items-center" style="width: 32%">
|
||||
<text class="u-line-2 flex justify-center items-center">{{
|
||||
(item.addressRegion && item.addressRegion.province && item.addressRegion.city && item.addressRegion.area) ?
|
||||
`${item.addressRegion.province.name}${item.addressRegion.city.name}${item.addressRegion.area.name}` : ''
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="td-n w-12p flex justify-center items-center">
|
||||
<u-button
|
||||
class="minibtn"
|
||||
size="mini"
|
||||
type="error"
|
||||
plain
|
||||
text="查看"
|
||||
@click="toDetail(item._id)"
|
||||
></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 暂无数据 -->
|
||||
<u-empty mode="list" text="暂无更多内容~" v-if="list.rows.length === 0"></u-empty>
|
||||
<!-- <cmempty></cmempty> -->
|
||||
<!-- 圆形按钮 -->
|
||||
<!-- <view v-if="showMore" class="more-btns">-->
|
||||
<!-- <view class="item" @click="$jump('/pages/work/factoryList')">-->
|
||||
<!-- <factory-building theme="outline" size="24" fill="#a92924"/>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="item" @click="toMyQuote">-->
|
||||
<!-- <u-icon name="order" color="#A92924" size="24"></u-icon>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="item" @click="toMyEnquiry">-->
|
||||
<!-- <u-icon name="account" color="#A92924" size="24"></u-icon>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="item" @click="toRelease">-->
|
||||
<!-- <u-icon name="plus" color="#A92924" size="24"></u-icon>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="issue" @click="showMore = !showMore">-->
|
||||
<!-- <u-icon :name="showMore ? 'close' : 'plus'" color="#fff" size="24"></u-icon>-->
|
||||
<!-- </view>-->
|
||||
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
|
||||
<u-picker v-if="isPick" :show="isPick" :columns="[categoryTreeData]"
|
||||
key-name="name" @confirm="handConfirmPick" @cancel="isPick = false">
|
||||
<template #more>
|
||||
<text @click="resetCate">重置</text>
|
||||
</template>
|
||||
</u-picker>
|
||||
<collapse></collapse>
|
||||
<u-picker v-if="isPickStatus" :show="isPickStatus"
|
||||
:columns="[[{name: '正在询价', value: 0}, {name: '合作成交', value: 1}, ]]"
|
||||
key-name="name" @confirm="handConfirmStatusPick" @cancel="isPickStatus = false">
|
||||
</u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uiheader from '@/components/index/header'
|
||||
import cmsearch from '@/components/common/search'
|
||||
import cmempty from '@/components/common/empty'
|
||||
import cmswiper from '@/components/common/swiper'
|
||||
import {FactoryBuilding} from '@icon-park/vue'
|
||||
import AddressSelect from "@/components/AddressSelect.vue";
|
||||
import Collapse from "@/components/index/collapse.vue";
|
||||
import uiswiper from "@/components/index/swiper.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uiswiper,
|
||||
Collapse,
|
||||
AddressSelect,
|
||||
uiheader,
|
||||
cmsearch,
|
||||
cmempty,
|
||||
cmswiper,
|
||||
FactoryBuilding,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allChildCate: [],
|
||||
categoryTreeData: [],
|
||||
pageSize: 500,
|
||||
keyword: '',
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
list: {
|
||||
rows: []
|
||||
},
|
||||
showMore: false,
|
||||
locationValue: '全国',
|
||||
region: {
|
||||
province: {
|
||||
code: null,
|
||||
name: null,
|
||||
}
|
||||
},
|
||||
pickValue: '全部',
|
||||
isPick: false,
|
||||
cateId: null,
|
||||
cateIndex: [0, 0],
|
||||
status: '正在询价',
|
||||
statusVal: 0,
|
||||
isPickStatus: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleChangeCate({indexs}) {
|
||||
this.cateIndex = indexs
|
||||
},
|
||||
handConfirmPick({value}) {
|
||||
this.pickValue = value[0].name
|
||||
this.cateId = value[0]._id
|
||||
this.isPick = false
|
||||
this.search(1)
|
||||
},
|
||||
handConfirmStatusPick({value}) {
|
||||
this.status = value[0].name
|
||||
this.statusVal = value[0].value
|
||||
this.isPickStatus = false
|
||||
this.search(1)
|
||||
},
|
||||
resetCate() {
|
||||
this.cateIndex = [0, 0]
|
||||
this.pickValue = '全部'
|
||||
this.cateId = null
|
||||
this.isPick = false
|
||||
this.search(1)
|
||||
},
|
||||
getCateList() {
|
||||
vk.callFunction({
|
||||
url: 'client/process/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
this.allChildCate = []
|
||||
this.categoryTreeData.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
showAddress() {
|
||||
this.$refs.AddressSelect.open(this.region, 1, true);
|
||||
},
|
||||
regionConfirm({province}) {
|
||||
this.region = {province}
|
||||
this.locationValue = `${province.name}`
|
||||
this.search(1)
|
||||
},
|
||||
afterSearch(keyword) {
|
||||
this.keyword = keyword
|
||||
this.search()
|
||||
},
|
||||
search(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.keyword,
|
||||
// companyList: this.checkCompanyList,
|
||||
categoryIds: this.cateId ? [this.cateId] : null,
|
||||
provinceCodes: this.region.province.code ? [this.region.province.code] : null,
|
||||
status: this.statusVal
|
||||
},
|
||||
success: (data) => {
|
||||
this.list = data
|
||||
this.loading = false
|
||||
}
|
||||
});
|
||||
},
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/work/my'
|
||||
})
|
||||
},
|
||||
toMyQuote() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/work/myQuote'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
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({
|
||||
url: '/pages/work/publish'
|
||||
})
|
||||
}
|
||||
},
|
||||
async toDetail(id) {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
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 {
|
||||
vk.navigateTo(`/pages/work/detail?id=${id}`)
|
||||
}
|
||||
},
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.keyword) this.keyword = option.keyword
|
||||
this.getCateList()
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.u-button--small {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.minibtn {
|
||||
width: 60rpx;
|
||||
font-size: 20rpx;
|
||||
color: #A92924 !important;
|
||||
border-color: #A92924;
|
||||
}
|
||||
|
||||
.layout-pick {
|
||||
// width: 690rpx;
|
||||
//height: 68rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #4F4F4F;
|
||||
|
||||
.ip {
|
||||
position: relative;
|
||||
//width: 150rpx;
|
||||
//max-width: 33.333%;
|
||||
height: 40rpx;
|
||||
padding-right: 30rpx;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.down::after {
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
content: '';
|
||||
margin-top: -6rpx;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 10rpx solid transparent;
|
||||
border-right: 10rpx solid transparent;
|
||||
border-top: 12rpx solid #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.layout-work {
|
||||
margin: 20rpx 10rpx;
|
||||
}
|
||||
|
||||
.tr {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.table-box {
|
||||
font-size: 24rpx;
|
||||
line-height: 28rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.th, .td {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 20%;
|
||||
height: 76rpx;
|
||||
color: #000;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.td-n {
|
||||
border-right: 1px solid #f2f2f2;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
background: #ffffff;
|
||||
height: 60rpx;
|
||||
|
||||
&:first-child {
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
}
|
||||
|
||||
.more-btns {
|
||||
position: fixed;
|
||||
right: 30rpx;
|
||||
bottom: 220rpx;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 90rpx;
|
||||
border-radius: 999rpx;
|
||||
background: white;
|
||||
border: 1px solid #A92924;
|
||||
|
||||
.item {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user