20261008
This commit is contained in:
+514
-288
@@ -1,261 +1,487 @@
|
||||
<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().diff(dayjs(info.answerEndTime), '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">
|
||||
{{ info.user.accountType === 1 ? info.user.person.personName : info.user.company.companyName }}
|
||||
</text>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="toQuote"
|
||||
v-if="vk.getVuex('$user.userInfo._id') !== info.userId && info.status === 0">我要申请加工
|
||||
</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>
|
||||
|
||||
<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>
|
||||
</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">发票种类:{{ INVOICE_TYPE[info.invoiceType] }}</view>
|
||||
<view class="mt-15">其他要求:{{ info.invoiceOther }}</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.transportDocuments.join() }}</view>
|
||||
<view class="mt-15">其他要求:{{ info.otherTransportDocuments }}</view>
|
||||
<view class="mt-15">运输限制要求:{{ info.transportLimit ? '有' : '无' }}</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">付款方式:{{ PROCESS_PAY_METHOD[info.payMethod] }}</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-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">采购方补充条款: 供货方逾期供货承担采购方一切损失</view>
|
||||
<view class="mt-15"> 供应方补充条款:</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">
|
||||
<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">{{
|
||||
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>
|
||||
<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>
|
||||
<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 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 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>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in info.quoteList.rows" :key="index">
|
||||
<text class="flex-1">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)" v-if="info.status === 0">选择</el-button>
|
||||
</text>
|
||||
</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>
|
||||
</el-dialog>
|
||||
</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, IdCard} from '@icon-park/vue'
|
||||
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: {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
|
||||
})
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
vk.navigateTo('/pages/contract/index')
|
||||
}, 1500)
|
||||
})
|
||||
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()))
|
||||
})
|
||||
},
|
||||
onLoad(option) {
|
||||
if (!option.id) vk.navigateBack()
|
||||
this.id = option.id
|
||||
this.getInfo()
|
||||
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>
|
||||
|
||||
@@ -263,68 +489,68 @@ export default {
|
||||
@import "@/common/css/app.scss";
|
||||
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.countdown {
|
||||
padding: 2px 5px;
|
||||
margin: 0 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin: 24px 0;
|
||||
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;
|
||||
}
|
||||
.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;
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,577 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator=">">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<navigator style="display: inline-block;" url="/pages/index/process/list">找加工</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-main">加工厂列表</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>
|
||||
</el-row>
|
||||
</view>
|
||||
<view class="w-1200 m-a">
|
||||
<common-swiper page="factory"/>
|
||||
</view>
|
||||
<!-- 筛选表单 -->
|
||||
<view class="w-1200 m-a" style="margin-top: 30rpx">
|
||||
<el-form @submit.native.prevent label-width="80px">
|
||||
<el-form-item label="关键词:" class="border-bottom pb-30">
|
||||
<el-input @keyup.enter.native="search(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="search(1)" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectCate({name: -1})" class="pointer mr-25"
|
||||
:class="[(checkCategoryList.includes(-1) || checkCategoryList.length === 0) ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in categoryTreeData" :key="index">
|
||||
<text @click="selectCate(item)" class="pointer mr-25"
|
||||
:class="[checkCategoryList.includes(item.name) ? 'text-main selected-cate' : '']">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="地区" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectProvince(-1)" class="pointer mr-25 flex-grow-0"
|
||||
:class="[checkProvinceList.length === 0 ? 'text-main selected-cate' : '']">全国
|
||||
</text>
|
||||
<view v-for="(item, index) in provinceData" :key="index" class="flex-grow-0 pointer mr-25">
|
||||
<text @click="selectProvince(item.code)"
|
||||
:class="[checkProvinceList.includes(item.code)? 'text-main selected-cate' : '']">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
<div class="flex justify-between items-center w-1200 m-a">
|
||||
<template v-if="ad12.length">
|
||||
<el-carousel :height="`100px`" :style="{width: '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad12" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
<template v-if="ad122.length">
|
||||
<el-carousel :height="`100px`" :style="{width: '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad122" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 商品列表 -->
|
||||
<view class="goods-list">
|
||||
<view v-for="(item, index) in list.rows" :key="index" class="goods">
|
||||
<view class="goods-info" @click="navTo(`/pages/yellowPage/factory?userId=${item.uid}`)">
|
||||
<!-- <el-image src="https://oss.wsdns.cn/20231204/d35332fa6a3b4596b522edf9527ac612.png"-->
|
||||
<!-- class="goods-img"/>-->
|
||||
<view class="info">
|
||||
<view class="field">
|
||||
<view class="desc" style="width: 1000px">
|
||||
<view class="text">加工主体</view>
|
||||
<view class="font-bold" v-if="item.user">{{
|
||||
item.user.accountType === 2 ? item.user.company.companyName : item.user.person.personName
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">所在地区</view>
|
||||
<view>{{ item.addressRegion.province.name }}{{ item.addressRegion.city.name }}</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">成立年限</view>
|
||||
<view>{{ item.year }}年</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">年产值</view>
|
||||
<view>{{ item.yearsIncome }}万元</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">员工人数</view>
|
||||
<view>{{ item.employeeNum }}人</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">流水线数量</view>
|
||||
<view>{{ item.flowNum }}条</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">厂房归属</view>
|
||||
<view>{{ item.blongTo }}</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">厂房面积</view>
|
||||
<view>{{ item.size }}㎡</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">服务信息</view>
|
||||
<view>{{ item.serviceInfo }}</view>
|
||||
</view>
|
||||
<view class="desc" v-if="item.mainSpotCategory && item.mainSpotCategory.length > 0">
|
||||
<view class="text">主营类别</view>
|
||||
<view>{{ item.mainSpotCategory.join() }}</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">主营工艺和业务范围</view>
|
||||
<view>{{ 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 mt-20" plain @click="doShowWechat(index)">添加微信
|
||||
</button>
|
||||
<button type="default" class="btn mt-20" plain @click="navTo(`/pages/yellowPage/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 class="paginatio">
|
||||
<el-pagination @current-change="search" background layout="prev, pager, next" :total="list.total"
|
||||
:page-size="pageSize">
|
||||
</el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
checkCategoryList: [],
|
||||
clickedCateIndex: -1,
|
||||
provinceData: provinces,
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
list: {
|
||||
total: 0,
|
||||
rows: []
|
||||
},
|
||||
showAllProvince: false,
|
||||
type: 0,
|
||||
pageSize: 20,
|
||||
ad12: [],
|
||||
ad122: [],
|
||||
categoryTreeData: [],
|
||||
};
|
||||
},
|
||||
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: {
|
||||
navTo(url) {
|
||||
vk.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
selectCate({name}) {
|
||||
if (name === -1) this.checkCategoryList = []
|
||||
const index = this.checkCategoryList.indexOf(name)
|
||||
if (index === -1) {
|
||||
this.checkCategoryList = [name]
|
||||
} else {
|
||||
this.checkCategoryList = []
|
||||
}
|
||||
console.log(this.checkCategoryList)
|
||||
this.search(1)
|
||||
},
|
||||
selectProvince(code) {
|
||||
if (code === -1) this.checkProvinceList = []
|
||||
else {
|
||||
this.checkProvinceList = [code]
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/my'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
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
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
search(pageIndex) {
|
||||
// const categoryIds = []
|
||||
// this.allChildCate.map(item => {
|
||||
// if (this.checkCategoryList.indexOf(item._id) > -1) categoryIds.push(item.name)
|
||||
// })
|
||||
vk.callFunction({
|
||||
url: 'client/factory/pub/getList',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.keyword,
|
||||
mainSpotCategory: this.checkCategoryList.length ? this.checkCategoryList[0] : null
|
||||
},
|
||||
success: ({data}) => {
|
||||
data.rows.map(item => {
|
||||
item.showWechat = false
|
||||
item.showContract = false
|
||||
return item
|
||||
})
|
||||
this.list = data
|
||||
this.getAd12()
|
||||
this.getAd122()
|
||||
}
|
||||
});
|
||||
},
|
||||
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
|
||||
},
|
||||
async getAd12() {
|
||||
this.ad12 = []
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 12,
|
||||
region: this.checkProvinceList.length > 0 ? this.checkProvinceList[0] : null
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad12 = res.data
|
||||
},
|
||||
async getAd122() {
|
||||
this.ad122 = []
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 122,
|
||||
region: this.checkProvinceList.length > 0 ? this.checkProvinceList[0] : null
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad122 = res.data
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.page-nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.goods-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.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: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.goods-img {
|
||||
width: 200px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 1000px;
|
||||
text-align: left;
|
||||
margin-left: 20px;
|
||||
|
||||
.goods-name {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
line-height: 2.5em;
|
||||
}
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.desc {
|
||||
display: flex;
|
||||
width: 330px;
|
||||
line-height: 2.5em;
|
||||
|
||||
.text {
|
||||
width: 140px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
padding: 0 20px;
|
||||
width: 200px;
|
||||
border-left: 1px solid #f3f3f3;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
position: relative;
|
||||
|
||||
.btn {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: #7ec050 !important;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.wechat {
|
||||
position: absolute;
|
||||
left: -140px;
|
||||
top: 0;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
box-shadow: 0 1px 10px 0 #eee
|
||||
}
|
||||
|
||||
.mobile {
|
||||
position: absolute;
|
||||
left: -110px;
|
||||
top: 10px;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
box-shadow: 0 1px 10px 0 #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
&-title {
|
||||
font-size: 15px;
|
||||
color: #101010;
|
||||
height: 62px;
|
||||
padding-top: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&-stock {
|
||||
font-size: 12px;
|
||||
color: #BD3124;
|
||||
}
|
||||
|
||||
&-address {
|
||||
font-size: 12px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
&-image {
|
||||
width: 200px;
|
||||
height: 70px;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-company {
|
||||
color: #4F4F4F;
|
||||
font-size: 14px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
&-buy {
|
||||
width: 108px;
|
||||
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%;
|
||||
}
|
||||
}
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
+492
-338
@@ -1,388 +1,542 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 筛选表单 -->
|
||||
<view class="filter-outer">
|
||||
<el-form @submit.native.prevent label-width="80px">
|
||||
<el-form-item label="关键词:" class="border-bottom pb-30">
|
||||
<el-input @keyup.enter.native="search(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="search(1)" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="clickedCateIndex = -1" class="pointer mr-25"
|
||||
:class="[clickedCateIndex === -1 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in categoryTreeData" :key="index">
|
||||
<text @click="clickedCateIndex = index" class="pointer mr-25"
|
||||
:class="[clickedCateIndex === index ? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="child-cate flex justify-start items-center flex-wrap">
|
||||
<template v-if="clickedCateIndex === -1">
|
||||
<text class="pointer mr-25" @click="selectCate(item)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in allChildCate" :key="index">{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text class="pointer mr-25" @click="selectCate(item)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in categoryTreeData[clickedCateIndex].children" :key="index">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
<!-- <text @click="showAllTexture = !showAllTexture" class="pointer mr-25" >查看更多-->
|
||||
<!-- </text>-->
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectCompany(-1)" class="pointer mr-25"
|
||||
:class="[checkCompanyList.length === 0 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in companyList" :key="index">
|
||||
<text @click="selectCompany(item._id)" class="pointer mr-25"
|
||||
:class="[checkCompanyList.includes(item._id) ? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10 || showAllCompany">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
<text @click="showAllCompany = !showAllCompany" class="pointer mr-25"
|
||||
v-if="companyList.length > 10">查看更多
|
||||
</text>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="已选择">
|
||||
<view class="tags">
|
||||
<el-tag v-for="(item, index) in checkCategoryArr" :key="index">{{ item.name }}</el-tag>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<el-table :data="list.rows" style="width: 100%">
|
||||
<el-table-column align="center" label="标题">
|
||||
<template v-slot="{ row }">
|
||||
<p class="text-main">{{ row.title }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num" label="加工量"/>
|
||||
<el-table-column align="center" label="采购企业">
|
||||
<template v-slot="{ row }">
|
||||
<p>{{
|
||||
row.user.accountType === 1 ? row.user.person.personName : row.user.company.companyName
|
||||
}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报价情况">
|
||||
<template v-slot="{ row }">
|
||||
<p>{{ `${row.quoteNum}家已报价` }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="_add_time_srt" label="发布时间"/>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="{ row }">
|
||||
<el-button size="mini" type="primary" plain @click.native="toDetail(row._id)">
|
||||
{{ vk.getVuex('$user.userInfo._id') === row.userId ? '查看' : '申请加工' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="mt-20 text-center">
|
||||
<el-pagination @current-change="search" background layout="prev, pager, next"
|
||||
:total="list.total" :page-size="pageSize"/>
|
||||
</div>
|
||||
</view>
|
||||
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
<view class="carousel">
|
||||
<common-swiper page="process"/>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>
|
||||
<el-button @click="toMyQuote" type="primary" round plain>我的报价</el-button>
|
||||
<el-button @click="navTo('/pages/process/factoryList')" type="success" round plain>加工厂列表</el-button>
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 筛选表单 -->
|
||||
<view class="filter-outer">
|
||||
<el-form @submit.native.prevent label-width="80px">
|
||||
<el-form-item label="关键词:" class="border-bottom pb-30">
|
||||
<el-input @keyup.enter.native="search(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="search(1)" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectCate({_id: -1})" class="pointer mr-25"
|
||||
:class="[checkCategoryList.length === 0 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in categoryTreeData" :key="index">
|
||||
<text @click="selectCate(item)" class="pointer mr-25"
|
||||
:class="[checkCategoryList.length && checkCategoryList.includes(item._id) ? 'text-main selected-cate' : '']">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="child-cate flex justify-start items-center flex-wrap">-->
|
||||
<!-- <template v-if="clickedCateIndex === -1">-->
|
||||
<!-- <text class="pointer mr-25" @click="selectCate(item)"-->
|
||||
<!-- :class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"-->
|
||||
<!-- v-for="(item, index) in allChildCate" :key="index">{{ item.name }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-else>-->
|
||||
<!-- <text class="pointer mr-25" @click="selectCate(item)"-->
|
||||
<!-- :class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"-->
|
||||
<!-- v-for="(item, index) in categoryTreeData[clickedCateIndex].children" :key="index">-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </template>-->
|
||||
<!-- <!– <text @click="showAllTexture = !showAllTexture" class="pointer mr-25" >查看更多–>-->
|
||||
<!-- <!– </text>–>-->
|
||||
<!-- </view>-->
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="供应商:" class="border-bottom pb-30">-->
|
||||
<!-- <view class="flex justify-start items-center flex-wrap">-->
|
||||
<!-- <text @click="selectCompany(-1)" class="pointer mr-25"-->
|
||||
<!-- :class="[checkCompanyList.length === 0 ? 'text-main selected-cate' : '']">全部-->
|
||||
<!-- </text>-->
|
||||
<!-- <view v-for="(item, index) in companyList" :key="index">-->
|
||||
<!-- <text @click="selectCompany(item._id)" class="pointer mr-25"-->
|
||||
<!-- :class="[checkCompanyList.includes(item._id) ? 'text-main selected-cate' : '']"-->
|
||||
<!-- v-if="index < 10 || showAllCompany">-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <text @click="showAllCompany = !showAllCompany" class="pointer mr-25"-->
|
||||
<!-- v-if="companyList.length > 10">查看更多-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="地区:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectProvince(-1)" class="pointer mr-25 flex-grow-0"
|
||||
:class="[checkProvinceList.length === 0 ? 'text-main selected-cate' : '']">全国
|
||||
</text>
|
||||
<view v-for="(item, index) in provinceData" :key="index" class="flex-grow-0 pointer mr-25">
|
||||
<text @click="selectProvince(item.code)"
|
||||
:class="[checkProvinceList.includes(item.code)? 'text-main selected-cate' : '']">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
<!-- <text @click="showAllProvince = !showAllProvince" class="pointer mr-25">查看更多-->
|
||||
<!-- </text>-->
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="已选择">
|
||||
<view class="tags">
|
||||
<el-tag v-for="(item, index) in checkCategoryArr" :key="index">{{ item.name }}</el-tag>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
<div class="flex justify-between items-center w-1200 m-a">
|
||||
<template v-if="ad13.length">
|
||||
<el-carousel :height="`100px`" :style="{width: ad14.length ? '50%' : '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad13" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
<template v-if="ad14.length">
|
||||
<el-carousel :height="`100px`" :style="{width: ad13.length ? '50%' : '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad14" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<view class="flex justify-start items-center my-20">
|
||||
<el-button @click="changeStatus(0)" type="primary" :plain="status === 1" round>正在询价</el-button>
|
||||
<el-button @click="changeStatus(1)" type="primary" :plain="status === 0" round>合作成交
|
||||
</el-button>
|
||||
</view>
|
||||
<el-table :data="list.rows" style="width: 100%" :loading="loading">
|
||||
<el-table-column align="center" label="标题">
|
||||
<template v-slot="{ row }">
|
||||
<p class="text-main">{{ row.title }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num" label="加工量" width="80"/>
|
||||
<el-table-column align="center" label="采购企业" width="260">
|
||||
<template v-slot="{ row }">
|
||||
<p v-if="row.user">{{
|
||||
row.user.accountType === 1 ? row.user.person.personName : row.user.company.companyName
|
||||
}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="加工产品交货地址">
|
||||
<template v-slot="{ row }">
|
||||
<p v-if="row.addressRegion && row.addressRegion.province">{{
|
||||
row.addressRegion.province.name
|
||||
}}{{ row.addressRegion.city.name }}{{
|
||||
row.addressRegion.area.name
|
||||
}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报价情况">
|
||||
<template v-slot="{ row }">
|
||||
<p>{{ `${row.quoteNum}家已报价` }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="_add_time_str" label="发布时间"/>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="{ row }">
|
||||
<el-button size="mini" type="primary" plain @click.native="toDetail(row._id)" v-if="status === 0">
|
||||
{{ vk.getVuex('$user.userInfo._id') === row.userId ? '查看' : '申请合作' }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" plain @click.native="toDetail(row._id)" v-if="status === 1">
|
||||
查看详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="mt-20 text-center">
|
||||
<el-pagination @current-change="search" background layout="prev, pager, next"
|
||||
:total="list.total" :page-size="pageSize"/>
|
||||
</div>
|
||||
</view>
|
||||
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
checkProvinceList: [],
|
||||
allChildCate: [],
|
||||
companyList: [],
|
||||
checkCompanyList: [],
|
||||
clickedCateIndex: -1,
|
||||
checkCategoryList: [],
|
||||
checkCategoryNameList: [],
|
||||
showAllCompany: false,
|
||||
keyword: '',
|
||||
queryParam: {},
|
||||
list: {
|
||||
rows: [],
|
||||
total: 0
|
||||
},
|
||||
pageSize: 20
|
||||
};
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
checkProvinceList: [],
|
||||
allChildCate: [],
|
||||
companyList: [],
|
||||
checkCompanyList: [],
|
||||
clickedCateIndex: -1,
|
||||
checkCategoryList: [],
|
||||
checkCategoryNameList: [],
|
||||
showAllCompany: false,
|
||||
keyword: '',
|
||||
queryParam: {},
|
||||
list: {
|
||||
rows: [],
|
||||
total: 0
|
||||
},
|
||||
pageSize: 20,
|
||||
provinceData: provinces,
|
||||
showAllProvince: true,
|
||||
loading: true,
|
||||
status: 0,
|
||||
ad13: [],
|
||||
ad14: [],
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.keyword) this.keyword = options.keyword
|
||||
// this.search(1)
|
||||
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 => {
|
||||
console.log(child)
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
this.search()
|
||||
this.getCompany()
|
||||
},
|
||||
methods: {
|
||||
selectCate({_id, name}) {
|
||||
if (_id === -1) {
|
||||
this.checkCategoryList = []
|
||||
this.checkCategoryNameList = []
|
||||
return this.search(1)
|
||||
}
|
||||
const index = this.checkCategoryList.indexOf(_id)
|
||||
if (index === -1) {
|
||||
this.checkCategoryList = [_id]
|
||||
this.checkCategoryNameList = [name]
|
||||
} else {
|
||||
this.checkCategoryList.splice(index, 1)
|
||||
this.checkCategoryNameList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/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)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
this.search()
|
||||
this.getCompany()
|
||||
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.checkProvinceList = [code]
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
methods: {
|
||||
selectCate({_id, name}) {
|
||||
const index = this.checkCategoryList.indexOf(_id)
|
||||
console.log(_id, name, index)
|
||||
if (index === -1) {
|
||||
this.checkCategoryList.push(_id)
|
||||
this.checkCategoryNameList.push(name)
|
||||
} else {
|
||||
this.checkCategoryList.splice(index, 1)
|
||||
this.checkCategoryNameList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
selectTexture(id) {
|
||||
if (id === -1) this.checkTextureList = []
|
||||
else {
|
||||
const index = this.checkTextureList.indexOf(id)
|
||||
if (index === -1) this.checkTextureList.push(id)
|
||||
else this.checkTextureList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
selectCompany(id) {
|
||||
if (id === -1) this.checkCompanyList = []
|
||||
else {
|
||||
const index = this.checkCompanyList.indexOf(id)
|
||||
if (index === -1) this.checkCompanyList.push(id)
|
||||
else this.checkCompanyList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
getCompany() {
|
||||
vk.callFunction({
|
||||
url: 'client/user/pub/getCompany',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.companyList = data.rows.map(item => {
|
||||
item.name = item.company.companyName
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/my'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
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=business-card'});
|
||||
})
|
||||
} else {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
async toDetail(id) {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
|
||||
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('/pages/user/user?menu=business-card');
|
||||
})
|
||||
} else {
|
||||
vk.navigateTo({
|
||||
url: `/pages/process/detail?id=${id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
search(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.keyword,
|
||||
companyList: this.checkCompanyList,
|
||||
categoryIds: this.checkCategoryList
|
||||
},
|
||||
success: (data) => {
|
||||
this.list = data
|
||||
console.log(this.list)
|
||||
}
|
||||
});
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
success: (res) => {
|
||||
location.href = res.data.url
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryNameList.forEach(name => {
|
||||
arr.push({name})
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
getCompany() {
|
||||
vk.callFunction({
|
||||
url: 'client/user/pub/getCompany',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.companyList = data.rows.map(item => {
|
||||
item.name = item.company.companyName
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/my'
|
||||
})
|
||||
},
|
||||
toMyQuote() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/quote/my'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
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
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
async toDetail(id) {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
|
||||
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('/pages/user/user?menu=fadada');
|
||||
})
|
||||
} else {
|
||||
if (userInfo.businessCard.status !== 1) {
|
||||
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: `/pages/process/detail?id=${id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
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.checkCategoryList.length ? this.checkCategoryList : null,
|
||||
provinceCodes: this.checkProvinceList,
|
||||
status: this.status,
|
||||
},
|
||||
success: (data) => {
|
||||
this.list = data
|
||||
this.loading = false
|
||||
this.getAd13()
|
||||
this.getAd14()
|
||||
}
|
||||
});
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
success: (res) => {
|
||||
location.href = res.data.url
|
||||
}
|
||||
});
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo({url});
|
||||
},
|
||||
changeStatus(status) {
|
||||
this.status = status
|
||||
this.search(1)
|
||||
},
|
||||
async getAd13() {
|
||||
this.ad13 = []
|
||||
// if (this.checkProvinceList.length === 0) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 13,
|
||||
region: this.checkProvinceList.length > 0 ? this.checkProvinceList[0] : null
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad13 = res.data
|
||||
// } else {
|
||||
// const {rows} = await vk.callFunction({
|
||||
// url: 'client/user/pub/getCompany',
|
||||
// data: {
|
||||
// pageIndex: 1,
|
||||
// pageSize: 5,
|
||||
// isCoop: 1,
|
||||
// province: this.checkProvinceList
|
||||
// }
|
||||
// })
|
||||
// rows.forEach(item => {
|
||||
// if (item.businessCard.album && item.businessCard.album.length > 0) {
|
||||
// this.ad13.push({
|
||||
// swiper: Array.isArray(item.businessCard.album) ? item.businessCard.album[0] : item.businessCard.album,
|
||||
// companyId: item._id
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
async getAd14() {
|
||||
this.ad14 = []
|
||||
// if (this.checkProvinceList.length === 0) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 14,
|
||||
region: this.checkProvinceList.length > 0 ? this.checkProvinceList[0] : null
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad14 = res.data
|
||||
// } else {
|
||||
// const {rows} = await vk.callFunction({
|
||||
// url: 'client/user/pub/getCompany',
|
||||
// data: {
|
||||
// pageIndex: 2,
|
||||
// pageSize: 5,
|
||||
// isCoop: 1,
|
||||
// province: this.checkProvinceList
|
||||
// }
|
||||
// })
|
||||
// rows.forEach(item => {
|
||||
// if (item.businessCard.album && item.businessCard.album.length > 0) {
|
||||
// this.ad14.push({
|
||||
// swiper: Array.isArray(item.businessCard.album) ? item.businessCard.album[0] : item.businessCard.album,
|
||||
// companyId: item._id
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryNameList.forEach(name => {
|
||||
arr.push({name})
|
||||
})
|
||||
|
||||
this.provinceData.forEach(item => {
|
||||
if (this.checkProvinceList.includes(item.code)) {
|
||||
arr.push(item)
|
||||
}
|
||||
})
|
||||
|
||||
return arr
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.selected-cate {
|
||||
border-bottom: 2px solid #BD3124;
|
||||
line-height: 40rpx;
|
||||
border-bottom: 2px solid #BD3124;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.child-cate {
|
||||
background-color: #DB8382;
|
||||
color: white;
|
||||
margin-top: 10rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
background-color: #DB8382;
|
||||
color: white;
|
||||
margin-top: 10rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
+298
-244
@@ -1,293 +1,347 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<!-- <el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>-->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加工单列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<!-- <el-carousel height="170px">-->
|
||||
<!-- <el-carousel-item v-for="item in 4" :key="item">-->
|
||||
<!-- <image class="carousel-img"-->
|
||||
<!-- src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"-->
|
||||
<!-- mode="aspectFill"></image>-->
|
||||
<!-- </el-carousel-item>-->
|
||||
<!-- </el-carousel>-->
|
||||
<common-swiper page="process-mine" :height="200"/>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<!-- <el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>-->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加工单列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let {data, success, fail, complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/process/sheet/pub/getList`,
|
||||
data: {
|
||||
...data, ...{
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
}
|
||||
},
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err => {
|
||||
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
customRightBtns: [{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/process/detail?id=' + item._id);
|
||||
}
|
||||
},],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "title",
|
||||
title: "标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "num",
|
||||
title: "加工量",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "收货地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
formatter: (val, row, column, index) => {
|
||||
let str = ""
|
||||
try {
|
||||
str = val.map(item => {
|
||||
const addressStr = item.address.region.province.name + "-" + item.address.region.city.name + "-" + item.address.region.area.name
|
||||
return addressStr
|
||||
}).join("/")
|
||||
} catch (err) {
|
||||
str = ""
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
},
|
||||
// {
|
||||
// key: "user",
|
||||
// title: "采购单位",
|
||||
// type: "text",
|
||||
// width: 280,
|
||||
// formatter: (val, row, column, index) => {
|
||||
// if(val.accountType == 1) {
|
||||
// return val.person.personName
|
||||
// }else {
|
||||
// return val.company.companyName
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// },
|
||||
{
|
||||
key: "_add_time_srt",
|
||||
title: "添加时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let {data, success, fail, complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/process/sheet/pub/getList`,
|
||||
data: {
|
||||
...data, ...{
|
||||
userId: vk.getVuex('$user.userInfo._id'),
|
||||
isUser: true
|
||||
}
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err => {
|
||||
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
})
|
||||
},
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
} else {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/process/detail?id=' + item._id);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
icon: 'el-icon-delete',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
this.$confirm('如果你要删除此条信息,之前其他客户填写的留言将无法查看', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: item._id
|
||||
},
|
||||
}).then(res => {
|
||||
this.$refs.table1.refresh()
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
})
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "orderNo",
|
||||
title: "单号",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "title",
|
||||
title: "标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "num",
|
||||
title: "加工量",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "quoteNum",
|
||||
title: "报价数",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}家已报价`
|
||||
}
|
||||
},
|
||||
// {
|
||||
// key: "productList",
|
||||
// title: "收货地",
|
||||
// type: "text",
|
||||
// minWidth: 200,
|
||||
// formatter: (val, row, column, index) => {
|
||||
// let str = ""
|
||||
// try {
|
||||
// str = val.map(item => {
|
||||
// const addressStr = item.address.region.province.name + "-" + item.address.region.city.name + "-" + item.address.region.area.name
|
||||
// return addressStr
|
||||
// }).join("/")
|
||||
// } catch (err) {
|
||||
// str = ""
|
||||
// }
|
||||
//
|
||||
// return str
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// key: "user",
|
||||
// title: "采购单位",
|
||||
// type: "text",
|
||||
// width: 280,
|
||||
// formatter: (val, row, column, index) => {
|
||||
// if(val.accountType == 1) {
|
||||
// return val.person.personName
|
||||
// }else {
|
||||
// return val.company.companyName
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// },
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
},
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
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
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+63
-33
@@ -15,6 +15,7 @@
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
<quote-remain-num v-if="reloaded" :amount="sheet.quoteAmount" type="process" :id="sheetId"/>
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
@@ -24,9 +25,16 @@
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading"
|
||||
:auto-close="true"
|
||||
label-width="140px"
|
||||
label-width="180px"
|
||||
:show-cancel="false"
|
||||
@success="onFormSuccess"
|
||||
></vk-data-form>
|
||||
:need-alert="false"
|
||||
@fail="onFormFail"
|
||||
>
|
||||
<template v-slot:totalPrice>
|
||||
<el-input v-model="form1.data.totalPrice" placeholder="请输入货款总价" @change="formatNumber"></el-input>
|
||||
</template>
|
||||
</vk-data-form>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
@@ -37,13 +45,17 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
reloaded: false,
|
||||
sheet: null,
|
||||
sheetId: null,
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null
|
||||
sheetId: null,
|
||||
totalPrice: null,
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
@@ -51,14 +63,15 @@ export default {
|
||||
action: "client/process/quote/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "totalPrice", title: "货款总价", type: "number"},
|
||||
{key: "totalPriceStr", title: "人民币大写", type: "text"},
|
||||
{key: "remark", title: "报价单详情", type: "editor"},
|
||||
{key: "totalPrice", title: "加工总价(人民币:元)", type: "html"},
|
||||
{key: "files", title: "附件", type: "file", accept: '.pdf', tips: '仅限PDF格式附件或合同,非协议合同将读取为合同附件,请仔细核查'},
|
||||
{key: "remark", title: "报价单详情", type: "textarea"},
|
||||
{key: "supplierExt", title: "合同补充条款", type: "textarea"},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
text: [
|
||||
{required: true, message: "text不能为空", trigger: "change"},
|
||||
totalPrice: [
|
||||
{required: true, message: "货款总价不能为空", trigger: "change,blur"},
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
@@ -84,7 +97,7 @@ export default {
|
||||
|
||||
this.sheetId = sheetId
|
||||
this.form1.data.sheetId = sheetId
|
||||
// this.getEnquiryDetail()
|
||||
this.getDetail()
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -97,7 +110,26 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
vk.navigateBack()
|
||||
vk.redirectTo({url: `/pages/process/detail?id=${this.sheetId}`})
|
||||
},
|
||||
onFormFail(data) {
|
||||
if (data.data.code === 12) {
|
||||
this.$confirm(data.data.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.redirectTo({url: `/pages/user/user?menu=grade`})
|
||||
})
|
||||
}else {
|
||||
this.$confirm(data.data.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateBack()
|
||||
})
|
||||
}
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
@@ -127,29 +159,27 @@ export default {
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
// getEnquiryDetail() {
|
||||
// vk.callFunction({
|
||||
// url: 'client/progress/sheet/pub/getDetail',
|
||||
// title: '请求中...',
|
||||
// data: {
|
||||
// _id: this.sheetId
|
||||
// },
|
||||
// success: (res) => {
|
||||
//
|
||||
// res.data.productList.forEach(item => {
|
||||
// item.unitPrice = 0
|
||||
// const keys = Object.keys(item.extraAttributes)
|
||||
// keys.forEach(citem => {
|
||||
// item.extraAttributes[citem] = JSON.parse(item.extraAttributes[
|
||||
// citem])
|
||||
// })
|
||||
// })
|
||||
//
|
||||
//
|
||||
// this.sheet = res.data
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
getDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getInfo',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: this.sheetId
|
||||
},
|
||||
success: (res) => {
|
||||
this.sheet = res
|
||||
}
|
||||
});
|
||||
},
|
||||
formatNumber(e){
|
||||
this.form1.data.totalPrice = parseFloat(this.form1.data.totalPrice).toFixed(2)
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.reloaded = false
|
||||
setTimeout(() => {
|
||||
this.reloaded = true
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<!-- <el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>-->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加工单列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let {data, success, fail, complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/process/quote/kh/getList`,
|
||||
data: {
|
||||
...data, ...{
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
}
|
||||
},
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err => {
|
||||
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/process/detail?id=' + item.sheetId);
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "sheet.title",
|
||||
title: "加工标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "sheet.num",
|
||||
title: "加工量",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "totalPrice",
|
||||
title: "金额",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}元`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "remark",
|
||||
title: "备注",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
},
|
||||
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
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
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+791
-705
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user