This commit is contained in:
2026-10-08 18:34:09 +08:00
commit 2933904f4c
905 changed files with 112129 additions and 0 deletions
+295
View File
@@ -0,0 +1,295 @@
<template>
<view class="wrap">
<!-- 吸顶 -->
<u-sticky offset-top="0" customNavHeight="0">
<!-- 顶部 -->
<uititle title="报价单"></uititle>
</u-sticky>
<quote-remain-num v-if="reloaded && sheet" :amount="sheet.quoteAmount" type="enquiry" :id="enquiryId"/>
<view class="layout layout-title m-top-20">填写报价信息</view>
<view class="layout layout-publish m-top-20 bg-white">
<view class="card-title m-top-30">报价信息</view>
<view class="group flex align-center m-top-30">
<view class="lb need m-right-20 w-25p">货款总价:</view>
<view class="vl flex-1">
<u--input
@blur="formatter"
placeholder="请输入货款总价"
border="surround"
v-model="formData.totalPrice"
suffixIcon="元"
suffixIconStyle="font-size: 24rpx;color: #909399"
></u--input>
</view>
</view>
<view class="group flex items-start m-top-30">
<view class="lb m-right-20 w-25p mt-20">报价单详情:</view>
<view class="vl flex-1">
<u-textarea
placeholder="请输入报价单详情"
border="surround"
v-model="formData.remark"
suffixIconStyle="font-size: 24rpx;color: #909399"
></u-textarea>
</view>
</view>
<view class="group flex items-start m-top-30" v-if="sheet.payMethod !== 1">
<view class="lb m-right-20 w-25p mt-20">供应商合同补充条款:</view>
<view class="vl flex-1">
<u-textarea
placeholder="如:完全符合采购标准或描述差异部分或其他说明。"
border="surround"
v-model="formData.supplierExt"
suffixIconStyle="font-size: 24rpx;color: #909399"
></u-textarea>
</view>
</view>
<view class="card-title m-top-30 need">附件信息</view>
<view class="group m-top-20">
<!-- <view class="lb m-right-20">附件内容:</view>-->
<!-- <view class="flex justify-between align-center m-top-20">-->
<!-- <view class="lbx flex-1">上传自有报价单图片或文档,支持jpg/png/word/excel。</view>-->
<!-- <view class="download">报价单样板下载</view>-->
<!-- </view>-->
<view class="m-top-30">
<u-upload
:fileList="formData.files"
@afterRead="afterRead"
@delete="deletePic"
accept="file"
:maxCount="10"
multiple
:previewImage="false"
>
<view class="w-100p">
<view>
<u-button size="mini" type="primary">点击上传</u-button>
</view>
<view class="mt-10 flex justify-between items-center w-100p" @click="delFiles(index)"
v-for="(item, index) in fileNameList" :key="index">
<text>{{ item }}</text>
<u-icon name="trash"/>
</view>
</view>
</u-upload>
</view>
</view>
</view>
<u-button class="public-btn m-top-30" text="提交报价" @click="submit"></u-button>
</view>
</template>
<script>
import uititle from '@/components/common/title'
import dayjs from "dayjs";
import QuoteRemainNum from "@/components/quote-remain-num/quote-remain-num.vue";
import md5 from "js-md5";
export default {
components: {
QuoteRemainNum,
uititle,
},
data() {
return {
enquiryId: null,
sheet: null,
formData: {
totalPrice: '',
files: [],
remark: '',
supplierExt: '',
},
reloaded: false,
fileNameList: []
};
},
methods: {
handTag(val) {
val.checked = !val.checked
},
afterRead({file}) {
for (let i = 0; i < file.length; i++) {
const item = file[i]
if (item.type !== 'application/pdf') {
uni.showToast({
title: '请上传PDF文件',
icon: 'none'
})
return
}
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + '.pdf',
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this.formData.files.push(res.fileList[0].tempFileURL)
this.fileNameList.push(item.name)
})
}
})
}
},
deletePic({index}) {
this.formData.files.splice(index, 1)
},
async submit() {
if (!this.formData.totalPrice) return this.$message.error('请填写金额')
if (!this.formData.files.length) return this.$message.error('请上传附件')
// if (this.formData.files.length > 0) this.formData.files = this.formData.files.map(item => item.url)
vk.callFunction({
url: 'client/enquiry/quote/kh/addQuote',
title: '请求中...',
data: {
sheetId: this.enquiryId,
...this.formData
},
success: (data) => {
this.$message({
message: "报价成功",
type: 'success'
})
uni.navigateBack()
}
});
},
/**
* 获取询价单详情
*/
getEnquiryDetail() {
vk.callFunction({
url: 'client/enquiry/sheet/pub/getDetail',
title: '请求中...',
data: {
_id: this.enquiryId
},
success: (res) => {
this.sheet = res.data
}
});
},
delFiles(index){
this.formData.files.splice(index, 1)
this.fileNameList.splice(index, 1)
},
formatter(val){
this.formData.totalPrice = parseFloat(val).toFixed(2)
},
},
onLoad({enquiryId}) {
this.enquiryId = enquiryId
this.getEnquiryDetail()
},
onShow() {
this.reloaded = false
setTimeout(() => {
this.reloaded = true
}, 500)
}
}
</script>
<style lang="scss">
.layout-title {
padding: 20rpx 30rpx;
font-size: 28rpx;
font-weight: 600;
line-height: 44rpx;
color: #A92924;
}
.card-title {
position: relative;
padding-left: 20rpx;
font-size: 26rpx;
font-weight: 600;
line-height: 48rpx;
color: #A92924;
&:before {
position: absolute;
left: 0;
top: 50%;
z-index: 9;
margin-top: -14rpx;
content: '';
width: 4rpx;
height: 28rpx;
background: #A92924;
}
}
.public-btn {
width: 80%;
margin-top: 60rpx;
color: #ffffff;
background: #A92924;
}
.layout-publish {
margin: 20rpx 30rpx;
padding: 50rpx 30rpx;
border-radius: 18rpx;
}
.tag-title {
font-size: 26rpx;
line-height: 40rpx;
color: #000000;
.limit {
font-size: 24rpx;
color: #999999;
}
}
.tag-box {
padding: 20rpx 0;
.item {
padding: 6rpx 10rpx;
font-size: 24rpx;
line-height: 32rpx;
color: #555555;
}
.active {
color: #A92924;
}
}
.lb, .fix {
position: relative;
font-size: 26rpx;
line-height: 40rpx;
color: #666666;
}
.lbx {
font-size: 24rpx;
color: #999999;
}
.download {
padding: 8rpx 20rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #A92924;
border: 1px solid #A92924;
}
.need::before {
position: absolute;
left: -16rpx;
top: 50%;
z-index: 9;
margin-top: -12rpx;
content: '*';
color: #A92924;
font-size: 32rpx;
line-height: 1;
}
</style>
+195
View File
@@ -0,0 +1,195 @@
<template>
<view class="wrap">
<!-- 吸顶 -->
<u-sticky offset-top="0" customNavHeight="0">
<!-- 顶部 -->
<uititle title="报价单"></uititle>
</u-sticky>
<view class="layout layout-goods">
<view class="goods-title">商品1:螺纹钢</view>
<view class="goods-box m-top-20 clear">
<!-- 百分比,hundred-100%,half-50%,third-33.33%,fourth-25%,fifth-20% -->
<view class="goods-item half flex flex-wrap fl">
<view class="lb">直径D mm:</view>
<view class="vl flex-1">12mm</view>
</view>
<view class="goods-item half flex flex-wrap fl">
<view class="lb">执行标准:</view>
<view class="vl flex-1">GB/T1499.2</view>
</view>
<view class="goods-item half flex flex-wrap fl">
<view class="lb">单件长度:</view>
<view class="vl flex-1">6000定尺 mm</view>
</view>
<view class="goods-item half flex flex-wrap fl">
<view class="lb">材质:</view>
<view class="vl flex-1">HRB355</view>
</view>
<view class="goods-item half flex flex-wrap fl">
<view class="lb">计价形式:</view>
<view class="vl flex-1">过磅</view>
</view>
<view class="goods-item half flex flex-wrap fl">
<view class="lb">采购数量:</view>
<view class="vl flex-1">100吨</view>
</view>
<view class="goods-item half flex flex-wrap fl">
<view class="lb">交货时限: </view>
<view class="vl flex-1">2024-05-11</view>
</view>
<view class="goods-item hundred flex flex-wrap fl">
<view class="lb">交货服务:</view>
<view class="vl flex-1">供货方送至交货地点</view>
</view>
<view class="goods-item hundred flex flex-wrap fl">
<view class="lb">交货地点:</view>
<view class="vl flex-1">广西壮族自治区-贵港市-覃塘区-大圩</view>
</view>
</view>
<view class="flex justify-between align-center m-top-20">
<view class="group flex align-center" style="width: 48%;">
<view class="lb m-right-20">报价单价:</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
border="surround"
v-model="value"
suffixIcon="元"
suffixIconStyle="font-size: 26rpx;color: #909399"
@change="change"
></u--input>
</view>
</view>
<view class="group flex align-center" style="width: 48%;">
<view class="lb m-right-20">小计金额:</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
border="surround"
v-model="value"
suffixIcon="元"
suffixIconStyle="font-size: 26rpx;color: #909399"
@change="change"
></u--input>
</view>
</view>
</view>
</view>
<view class="layout layout-publish bg-white">
<view class="group flex align-center">
<view class="lb need strong m-right-20">货款总价:</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
border="surround"
v-model="value"
suffixIcon="元"
suffixIconStyle="font-size: 26rpx;color: #909399"
@change="change"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb need strong m-right-20">人民币大写:</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
border="surround"
v-model="value"
suffixIcon="元"
suffixIconStyle="font-size: 26rpx;color: #909399"
@change="change"
></u--input>
</view>
</view>
<u--text text="温馨提示:贷款总价由各个商品报价加起来" size="24rpx" color="#777" margin="30rpx 0"></u--text>
</view>
<u-button class="public-btn m-top-30" text="提交报价"></u-button>
</view>
</template>
<script>
import uititle from '@/components/common/title'
export default {
components: {
uititle,
},
data() {
return {
// 输入框自定义样式
inputStyle: {
borderRadius: 0,
},
value: '', // 模拟值
};
},
methods: {
handTag(val) {
val.checked = !val.checked
},
},
onLoad() {
}
}
</script>
<style lang="scss">
page {
background: #ffffff;
}
.goods-title {
font-size: 28rpx;
font-weight: 600;
line-height: 40rpx;
color: #101010;
}
.layout-goods {
margin: 20rpx 30rpx;
padding: 30rpx 0;
font-size: 28rpx;
line-height: 32rpx;
color: #626262;
border-bottom: 1px solid #f2f2f2;
.goods-item {
padding: 18rpx 0;
}
}
.public-btn {
width: 80%;
margin-top: 60rpx;
color: #ffffff;
background: #A92924;
}
.layout-publish {
margin: 20rpx 30rpx;
padding: 50rpx 30rpx;
border-radius: 18rpx;
}
.group .lb {
position: relative;
font-size: 28rpx;
line-height: 40rpx;
color: #A92924;
}
.group .strong {
width: 160rpx;
font-weight: 600;
color: #101010;
}
.lbx {
font-size: 24rpx;
color: #999999;
}
.need::before {
position: absolute;
left: -16rpx;
top: 50%;
z-index: 9;
margin-top: -12rpx;
content: '*';
color: #A92924;
font-size: 32rpx;
line-height: 1;
}
</style>
+526
View File
@@ -0,0 +1,526 @@
<template>
<view class="border-bottom pt-20">
<el-form ref="form" :model="form1" label-width="80px" :rules="form1.props.rules">
<view class="flex flex-wrap justify-start items-start">
<view class="w-25p">
<el-form-item label="商品名称">
<el-select v-model="form1.data.goodsId" placeholder="请选择商品" @change="selectGoods">
<el-option
v-for="(item, index) in goodsList"
:key="index"
:label="item.name"
:value="item._id">
</el-option>
</el-select>
</el-form-item>
</view>
<view class="w-25p" v-for="(item, index) in goodsAttributes" :key="index">
<template v-if="goodsAttributes && goodsAttributes.length > 0">
<el-form-item :label="item.label" v-if="item.label">
<el-select v-model="form1.data.model[index].value" placeholder="请选择">
<el-option
v-for="(value, valueIndex) in item.values" :key="valueIndex" :label="value"
:value="value">
</el-option>
</el-select>
</el-form-item>
</template>
</view>
</view>
<el-row :gutter="10">
<el-col :span="10">
<el-form-item label="单件长度">
<el-input placeholder="请输入内容" v-model="form1.data.singleLength" class="input-with-select"
type="number">
<template slot="append">米</template>
<!-- <el-select v-model="form1.data.singleLengthUnit" slot="append" placeholder="请选择">-->
<!-- <template v-if=" attributes.find(attr => attr.label === '单件长度')">-->
<!-- <el-option-->
<!-- v-for="(item, index) in attributes.find(attr => attr.label === '单件长度').options"-->
<!-- :key="index"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </template>-->
<!-- </el-select>-->
</el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="尺寸">-->
<!-- <el-select v-model="form1.data.materialQuality" placeholder="请选择">-->
<!-- <template v-if=" attributes.find(attr => attr.label === '尺寸')">-->
<!-- <el-option-->
<!-- v-for="(item, index) in attributes.find(attr => attr.label === '尺寸').options"-->
<!-- :key="index"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </template>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item label="交货服务">
<el-select v-model="form1.data.deliverService" placeholder="请选择">
<template v-if=" attributes.find(attr => attr.label === '交货服务')">
<el-option
v-for="(item, index) in attributes.find(attr => attr.label === '交货服务').options"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</template>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="采购数量">
<el-input v-model="form1.data.procureNumber" class="input-with-select" type="number">
<el-select v-model="form1.data.procureUnit" slot="append" placeholder="请选择">
<template v-if=" attributes.find(attr => attr.label === '单位')">
<el-option
v-for="(item, index) in attributes.find(attr => attr.label === '单位').options"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</template>
</el-select>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="计价形式">
<el-select v-model="form1.data.pricingForm" placeholder="请选择">
<template v-if="attributes.find(attr => attr.label === '计价形式')">
<el-option
v-for="(item, index) in attributes.find(attr => attr.label === '计价形式').options"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</template>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</view>
</template>
<script>
import provinces from "@/util/address/provinces.json";
import citys from "@/util/address/citys.json";
import areas from "@/util/address/areas.json";
export default {
props: {
value: {
type: Object,
default: () => {
return {}
}
},
baseAttributes: {
type: Array,
default: () => {
return []
}
},
productIndex: {
type: Number,
default: 0
}
},
data() {
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now();
},
},
provinceData: provinces,
cityData: citys,
areaData: areas,
provinceIndex: null,
cityIndex: null,
areaIndex: null,
title: '商品',
attributesLoaded: false,
goodsList: [],
attributes: [],
goodsAttributes: [],
address: ['', '', ''],
form: {
addressDetail: ''
},
// 表单相关开始-----------------------------------------------------------
form1: {
// 表单请求数据,此处可以设置默认值
data: {
goodsId: null,
model: [],
otherData: null,
materialQuality: null,
singleLength: null,
singleLengthUnit: null,
deliverService: null,
standard: null,
pricingForm: null,
deliveryTime: null,
len: null,
extraAttributes: {},
attributes: {},
addressRegion: [],
addressDetail: null
},
// 表单属性
props: {
// 表单请求地址
action: "client/enquiry/kh/add",
// 表单字段显示规则
columns: [
{key: "", title: "商品1", type: "bar-title", component: 'custom-form-section'},
{
key: "name",
title: "模板",
type: "remote-select",
action: "client/enquiry/template/pub/getList",
showAll: true,
actionData: {
pageSize: 1000
},
props: {
list: "rows",
value: "name",
label: "name"
},
watch: (res) => {
const {
option
} = res
console.log(option);
if (option.extraAttributes) {
let groupIndex = -1
option.extraAttributes.forEach((item, index) => {
if (index % 4 == 0) {
this.form1.props.columns[2].columns.push({
key: "",
title: "",
type: "group",
justify: "start",
showLabel: false,
columns: []
})
groupIndex++
}
this.form1.props.columns[2].columns[0].columns.push({
key: index,
title: item.label,
type: "select",
allowCreate: true,
filterable: true,
data: item.values.map(citem => {
return {
value: JSON.stringify({keyName: item.lable, keyValue: citem}),
label: citem
}
})
})
})
} else {
this.form1.props.columns[2].columns = []
}
}
},
{
key: "extraAttributes",
title: "额外属性",
type: "object",
justify: "start",
showLabel: false,
columns: [],
},
{
key: "",
title: "",
type: "group",
justify: "start",
showLabel: false,
columns: [
{
key: "brand",
title: "品牌厂家",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '品牌厂家')
if (row) {
return row.options
}
return [];
}
},
{
key: "materialQuality",
title: "材质",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '材质')
if (row) {
return row.options
}
return [];
}
},
{
key: "singleLength",
title: "单件长度",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '单件长度')
if (row) {
return row.options
}
return [];
}
},
{
key: "productStandard",
title: "产品标准",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '产品标准')
if (row) {
return row.options
}
return [];
}
},
],
},
{
key: "",
title: "",
type: "group",
justify: "start",
showLabel: false,
columns: [
{
key: "pricingForm",
title: "计价形式",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '计价形式')
if (row) {
return row.options
}
return [];
}
},
{
key: "processStandard",
title: "加工标准",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '加工标准')
if (row) {
return row.options
}
return [];
}
},
{
key: "deliveryService",
title: "交货服务",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '交货服务')
if (row) {
return row.options
}
return [];
}
},
{key: "deliveryTime", title: "交货时限", type: "date",},
],
},
{
key: "", title: "", type: 'group', showLabel: false, justify: "start", columns:
[
{key: "procureNumber", title: "采购数量", type: "number",},
{
key: "procureUnit",
title: "单位",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '单位')
if (row) {
return row.options
}
return [];
}
},
{key: "addressRegion", title: "交货地点", type: "address",},
{key: "addressDetail", title: "详细地址", type: "textarea",},
]
},
],
// 表单验证规则
rules: {
goodsId: [
{required: true, message: '商品不能为空', trigger: ["change", "blur"]}
],
addressRegion: [
{required: true, message: '交货地点不能为空', trigger: ["change", "blur"]}
],
procureNumber: [
{required: true, message: '采购数量不能为空', trigger: ["change", "blur"]},
{min: 1, type: 'number', message: '采购数量不能小于1', trigger: ["change", "blur"]}
],
procureUnit: [
{required: true, message: '采购数量不能为空', trigger: ["change", "blur"]},
],
},
// add 代表添加 update 代表修改
formType: "add",
// 表单是否在请求中
loading: false,
// 是否显示表单1 的弹窗
show: false,
beforeAction: (formData) => {
return false
}
}
},
// 表单相关结束-----------------------------------------------------------
}
},
created() {
this.form1.props.columns[0].title = '商品' + (this.productIndex + 1)
vk.callFunction({
url: 'client/enquiry/attributes/pub/getList',
title: '请求中...',
data: {},
success: (data) => {
this.attributes = data.rows
this.attributesLoaded = true
}
});
this.getGoodsList()
},
methods: {
getGoodsList() {
vk.callFunction({
url: 'client/enquiry/template/pub/getList',
pageSize: 500,
title: '请求中',
success: ({rows}) => {
this.goodsList = rows
}
})
},
selectGoods(val) {
this.form1.data.model = []
this.goodsList.forEach(({_id, name, extraAttributes}) => {
if (_id === val) {
this.form1.data.goodsName = name
this.goodsAttributes = extraAttributes
this.goodsAttributes.forEach(attr => {
if (attr.label) this.form1.data.model.push({
label: attr.label,
value: null
})
})
}
})
},
selectProvince(index) {
this.form1.data.addressRegion[0] = this.provinceData[index].code
},
selectCity(index) {
this.form1.data.addressRegion[1] = this.cityData[this.provinceIndex][index].code
},
selectArea(index) {
this.form1.data.addressRegion[2] = this.areaData[this.provinceIndex][this.cityIndex][index].code
},
},
watch: {
"form1.data": {
immediate: true,
handler(val) {
this.$emit('input', val)
console.log("this.$emit('input', val.data)");
}
},
value: {
immediate: true,
handler(val) {
this.form1.data = val
console.log("this.form1.data = val", val);
}
}
}
}
</script>
<style scoped lang="scss">
.product-title {
margin: 10px;
text-align: center;
font-size: 14px;
}
</style>
<style>
/deep/ .input-with-select .el-input-group__append {
background-color: #fff !important;
width: 130px !important;
}
</style>
+817
View File
@@ -0,0 +1,817 @@
<template> <!-- 询价单详情 -->
<view class="wrap">
<!-- 吸顶 -->
<u-sticky offset-top="0" customNavHeight="0">
<!-- 顶部 -->
<uititle title="询价详情"></uititle>
</u-sticky>
<!-- 内容 -->
<view class="layout layout-detail">
<view class="company flex m-top-20">
<!-- <view class="logo">-->
<!-- <image v-if="sheet.user && sheet.user.businessCard" class="full" :src="sheet.user.businessCard.logo"-->
<!-- mode=""></image>-->
<!-- <image v-else class="full" src="/static/no-logo.jpg" mode=""></image>-->
<!-- </view>-->
<view class="info flex-1 p-left-20 w-100p">
<view class="name-text w-100p">{{
sheet.user.accountType === 1 ? sheet.user.person.personName.replace(/^(.).*$/, "$1**") : sheet.user.company.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6")
}}
</view>
<!-- <view class="name flex justify-start align-center">-->
<!-- 认证图标 -->
<!-- <view class="name-icon m-left-20">-->
<!-- <image class="full" src="/static/img/idente.png" mode=""></image>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="zhu">-->
<!-- 主营业务:-->
<!-- 主营业务:{{-->
<!-- (sheet.user.company.mainSpotCategory && sheet.user.company.mainSpotCategory.length > 0) ? sheet.user.company.mainSpotCategory.join() : ''-->
<!-- }}-->
<!-- </view>-->
<view class="zhu">
{{ sheet._add_time_str }} 发布
</view>
</view>
</view>
<!-- 批量上传-判断使用 -->
<template>
<view class="detail m-top-20">
<view class="detail-title">{{ sheet.title }}</view>
</view>
</template>
<view class="flex justify-start items-end text-25 mt-20"
v-if="sheet.answerEndTime && dayjs(sheet.answerEndTime).diff(dayjs(), 'second') > 0">
<text>距离报价结束还有:</text>
<view class="border-main countdown text-main">{{
dayjs(sheet.answerEndTime).diff(dayjs(), 'day')
}}
</view>
<text>天</text>
<view class="border-main countdown text-main">
{{ (dayjs(sheet.answerEndTime).diff(dayjs(), 'hour')) % 24 }}
</view>
<text>时</text>
</view>
<!-- 手动上传-判断使用 -->
<template>
<view class="card-title m-top-30">主要商品</view>
<view class="goods-box m-top-20 clear" v-if="sheet.fillType === 1">
{{
batchProductNames
}}
</view>
<view class="goods-box m-top-20 flex justify-start items-start flex-col" v-else>
<view v-for="(item, index) in sheet.productList" :key="index">
<text class="font-bold clear">{{ item.goodsName }}:</text>
<view class="goods-item half flex flex-wrap fl" v-for="(model, modelIndex) in item.model">
<view class="lb">{{ model.label }}:</view>
<view class="vl flex-1">{{ model.value }}</view>
</view>
<!-- <view class="goods-item half flex flex-wrap fl">-->
<!-- <view class="lb">单件长度:</view>-->
<!-- <view class="vl flex-1">{{-->
<!-- item.singleLength ? item.singleLength : ''-->
<!-- }}{{ item.singleLengthUnit ? item.singleLengthUnit : '' }}-->
<!-- </view>-->
<!-- </view>-->
<view class="goods-item half flex flex-wrap fl">
<view class="lb">交货服务:</view>
<view class="vl flex-1">{{
item.deliverService ? item.deliverService : ''
}}
</view>
</view>
<view class="goods-item half flex flex-wrap fl">
<view class="lb">采购数量:</view>
<view class="vl flex-1">{{
item.procureNumber ? item.procureNumber : ''
}}{{ item.procureUnit ? item.procureUnit : '' }}
</view>
</view>
<view class="goods-item half flex flex-wrap fl">
<view class="lb">计价形式:</view>
<view class="vl flex-1">{{
item.pricingForm ? item.pricingForm : ''
}}
</view>
</view>
<view class="goods-item half flex flex-wrap fl">
<view class="lb">交货时限:</view>
<view class="vl flex-1">{{ sheet.deliveryTime ? sheet.deliveryTime : '' }}</view>
</view>
<view class="goods-item half flex flex-wrap fl">
<view class="lb">交货地点:</view>
<view class="vl flex-1">{{ sheet.fullAddress }}</view>
</view>
</view>
</view>
</template>
<view class="card-title m-top-30">上传的附件</view>
<view class="m-top-20" v-if="sheet.files">
<file-type :item="item" v-for="(item, index) in sheet.files" :key="index"/>
</view>
<view class="m-top-20" v-if="sheet.multiFiles">
<file-type :item="item" v-for="(item, index) in sheet.multiFiles" :key="index"/>
</view>
<view class="card-title m-top-30" v-if="sheet.remark">采购商其他要求</view>
<view class="detail-text">
{{ sheet.remark }}
</view>
<view class="card-title m-top-30">合同条款</view>
<view class="detail-text">是否含税:{{ sheet.invoice ? '含税' : '不含税' }}</view>
<template v-if="sheet.invoice">
<view class="detail-text">开票时间:{{ WRITE_INVOICE_TIME[sheet.writeInvoiceTime] }}</view>
<!-- <view class="detail-text">发票种类:{{ INVOICE_TYPE[sheet.invoiceType] }}</view>-->
<!-- <view class="detail-text" v-if="sheet.invoiceOther">其他要求:{{ sheet.invoiceOther }}</view>-->
<view class="detail-text" v-if="sheet.invoiceOther">税票要求:{{ sheet.invoiceOther }}</view>
<template v-else>
<view class="detail-text">纳税人身份:{{ sheet.taxType ? sheet.taxType : '无' }}</view>
<view class="detail-text">发票种类:{{ sheet.invoiceType ? sheet.invoiceType : '无' }}</view>
<view class="detail-text">税率:{{ sheet.taxRate ? sheet.taxRate : '无' }}</view>
</template>
</template>
<view class="card-title m-top-30">运输要求</view>
<view class="detail-text" v-if="sheet.transportDocuments && sheet.transportDocuments.length > 0">
随货资料:{{ sheet.transportDocuments.join() }}
</view>
<view class="detail-text" v-if="sheet.otherTransportDocuments">其他资料:{{
sheet.otherTransportDocuments
}}
</view>
<view class="detail-text">运输限制:{{ sheet.transportLimit ? '有' : '无' }}</view>
<view class="detail-text" v-if="sheet.transportLimit && sheet.otherTransportRequest">
运输限制说明:{{ sheet.otherTransportRequest }}
</view>
<view class="card-title m-top-30">交易模式</view>
<view class="detail-text">交易模式:{{ sheet.tradeMethod === 0 ? '自主交易' : '金久信公证' }}</view>
<view class="card-title m-top-30">交易说明</view>
<view class="detail-text">付款方式:{{ PROCESS_PAY_METHOD[sheet.payMethod] }}{{
sheet.payMethod === 0 ? `${sheet.advancePayRate}%货到付全款` : ''
}}{{
sheet.payMethod === 3 ? `${sheet.reputationPayDay}天` :
(sheet.payMethod === 4 ? `:${sheet.otherPayMethod}` : '')
}}
</view>
<view class="detail-text">报价形式:{{ sheet.offerType === 0 ? '整单报价' : '可分项报价' }}</view>
<view class="detail-text" v-if="sheet.answerStartTime && sheet.answerEndTime">报价期限:{{
dayjs(sheet.answerStartTime).format('YYYY-MM-DD')
}}~{{ dayjs(sheet.answerEndTime).format('YYYY-MM-DD') }}
</view>
<view class="card-title m-top-30">采购商信息</view>
<view class="detail-text">项目名称:{{ sheet.projectName ? sheet.projectName : '' }}</view>
<view class="detail-text">项目地址:{{ sheet.fullAddress }}</view>
<template v-if="(sheet.isMine || sheet.hasQuote || userInfo.userLevel > 0) && dayjs(sheet.answerEndTime).isBefore(dayjs())">
<view class="detail-text" v-if="sheet.companyName">采购商信息:{{
sheet.companyName ? sheet.companyName : ''
}}
</view>
<view class="detail-text" v-if="sheet.companyMobile">采购商联系方式:{{
sheet.companyMobile ? sheet.companyMobile : ''
}}
</view>
<view class="detail-text">授权业务咨询人:{{
sheet.businessName ? sheet.businessName : ''
}}
</view>
<view class="detail-text">业务咨询联系方式:{{
sheet.businessMobile ? sheet.businessMobile : ''
}}
</view>
</template>
<template v-else>
<view class="detail-text" v-if="sheet.companyName">采购商信息:{{
sheet.companyName ? sheet.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : ''
}}
</view>
<view class="detail-text" v-if="sheet.companyMobile">采购商联系方式:{{
sheet.companyMobile ? sheet.companyMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
}}
</view>
<view class="detail-text">授权业务咨询人:{{
sheet.businessName ? sheet.businessName.replace(/^(.).*(.)$/, "$1***$2") : ''
}}
</view>
<view class="detail-text">业务咨询联系方式:{{
sheet.businessMobile ? sheet.businessMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
}}
</view>
</template>
<view class="card-title m-top-30">平台交易保证金要求</view>
<view class="detail-text">{{ sheet.earnestMoney ? sheet.earnestMoney : '无' }}</view>
<view class="card-title m-top-30">签约模式</view>
<view class="detail-text">
<view>{{
sheet.signMethod === 0 ? '线上签约-标准合同' : (sheet.signMethod !== 1 ? '线上签约-双方协商合同' : '线下签约')
}}
</view>
</view>
<view class="item-wrap" v-if="sheet.signMethod === 0">
<view class="card-title m-top-30">合同条款</view>
<view class="mt-15">违约责任:</view>
<view class="mt-15">
1.乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
</view>
<view class="mt-15">解决纠纷的方法:</view>
<view class="mt-15">
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工費和获取证据产生费用等其他相关费用。2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
</view>
<view class="mt-15">不可抗力:</view>
<view class="mt-15">
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
</view>
<view class="mt-15">其他:</view>
<view class="mt-15">
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
</view>
<view class="mt-15">采购方补充条款: {{ sheet.supplementary }}</view>
<!-- <view class="mt-15">供应方补充条款:</view>-->
</view>
<template v-else-if="sheet.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 sheet.contractAttachment" :key="index" class="mr-25 my-25">
<file-type :item="item" @click.native="openDownload(item)"/>
</view>
</template>
<!-- <view class="card-title m-top-30">已收到的加工申请</view>-->
<!-- <view class="table-box m-top-30">-->
<!-- <view class="thead">-->
<!-- <view class="tr">-->
<!-- <view class="th">申请人</view>-->
<!-- <view class="th">申请时间</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="tbody">-->
<!-- <view class="tr" v-for="(item, index) in sheet.quoteList" :key="index">-->
<!-- <view class="td">{{ item.subjectName }}</view>-->
<!-- <view class="td">{{ item._add_time_str }}</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
</view>
<!-- 底部 -->
<view class="fiexd-bottom flex justify-between align-center bg-white">
<u-icon name="integral" color="#A92924" size="26"></u-icon>
<view class="text red flex-1 m-left-20">{{ sheet.quoteNum }}家已经报价</view>
<view class="apply-btn" v-if="userInfo._id !== sheet.userId && sheet.status === 0" @click="toQuote">{{
sheet.disabled ? '已超时无法报价' : '我要报价'
}}
</view>
<view class="apply-btn" v-else-if="userInfo._id === sheet.userId" @click="showEnquiryModal">收到的报价
</view>
</view>
<!-- 弹出窗-报价次数 -->
<u-popup :show="isPrice" mode="center" @close="isPrice = false">
<view class="popup-box" style="padding: 50rpx 30rpx;width: 600rpx;">
<view class="residue text-center">
今日剩余报价
<text class="red">3</text>
次
</view>
<u-button class="custom-style" text="继续报价" @click="isPopup = true,isPrice = false"></u-button>
<view class="increase text-center">
*升级会员可以增加每日报价次数,
<text class="red">去升级</text>
</view>
</view>
</u-popup>
<!-- 模态框-报价类型-->
<!-- 弹出窗-报价列表 -->
<u-popup :show="isPopup" mode="center" @close="isPopup = false">
<view class="popup-box">
<view class="popup-title flex justify-between align-center">
<view class="title">收到的报价列表</view>
<view class="close" @click="isPopup = false">关闭</view>
</view>
<view class="table-box m-top-30">
<view class="thead">
<view class="tr">
<view class="th w-25p">供应商</view>
<view class="th w-25p">联系方式</view>
<view class="th w-25p">报价</view>
<view class="th w-25p">操作</view>
</view>
</view>
<view class="tbody">
<view class="tr" v-for="(item, index) in sheet.quoteList" :key="index">
<view class="td w-25p">{{ item.subjectName }}</view>
<view class="td w-25p">
<text>{{ item.subjectMobile }}</text>
</view>
<view class="td w-25p">{{ item.totalPrice }}元</view>
<view class="td w-25p">
<u-button
size="mini"
type="error"
plain="true"
text="选择"
style="width: 40rpx;"
@click="confirm(item)"
></u-button>
</view>
</view>
</view>
</view>
</view>
</u-popup>
<u-modal
:show="isEnquiryTip"
title="重点提示"
confirmText="同意悉知"
cancelText="取消"
confirmColor="#A92924"
showCancelButton
@confirm="confirmEnquiryModal"
@cancel="isEnquiryTip = false"
>
<view class="enquiry-tip-content">
<view v-for="(item, index) in enquiryTipList" :key="index" class="enquiry-tip-item">
{{ item }}
</view>
</view>
</u-modal>
<enquiry-modal ref="enquiryModal"/>
</view>
</template>
<script>
import uiheader from '@/components/index/header'
import uititle from '@/components/common/title'
import {INVOICE_TYPE, PROCESS_PAY_METHOD, WRITE_INVOICE_TIME} from "@/util";
import dayjs from "dayjs";
import FileType from "@/components/file-type/file-type.vue";
import EnquiryModal from "@/pages/user/components/enquiryModal.vue";
export default {
components: {
EnquiryModal,
FileType,
uiheader,
uititle,
},
data() {
return {
fileList3: [
{url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',},
{url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',},
{url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',},
],
isPopup: false,
isPrice: false,
isModal: false,
isEnquiryTip: false,
enquiryTipList: [
'1、请您谨慎点击"选择",选择供应商后,系统将自动关闭您此条询价信息,无法返回,只能再次发布询价信息;',
'2、点击"选择"前,您可通过供应商联系方式,仔细商讨:商品明细、数量、单价、执行标准、交货方式、交货期、验收方式、合同条款等细节关键题确认,各种交易细节无误后要求供应商进行最终报价;',
'3、您承诺对此次交易的内容用途已经完全了解并知悉经过严格仔细审核后实施,此次交易为合法经营,如违反相关法律规定,您将承担全部责任,与平台无关。您确认以上描述无误后请点击"选择"。'
],
parseText: '<p>露从今夜白,月是故乡明</p>',
WRITE_INVOICE_TIME,
INVOICE_TYPE,
PROCESS_PAY_METHOD,
hasQuote: false,
productList: [],
sheet: {
user: {},
productList: [],
transportDocuments: [],
otherCate: null
},
userInfo: null
};
},
computed: {
batchProductNames() {
if (this.sheet.otherCate) return this.sheet.otherCate
return this.sheet.productList.map(item => item.goodsName + `${item.materialQuality ? `(${item.materialQuality})` : ''}`).join(',')
}
},
methods: {
dayjs,
applyLink() {
uni.$u.route('/pages/price/apply', {
id: 0,
});
},
showEnquiryModal() {
this.isEnquiryTip = true
},
confirmEnquiryModal() {
this.isEnquiryTip = false
this.$refs.enquiryModal.open(this.sheet)
},
handConfirmModal() {
this.isPopup = false
this.isModal = false
uni.$u.route('/pages/price/apply1', {
id: 0,
});
},
handCancelModal() {
this.isPopup = false
this.isModal = false
uni.$u.route('/pages/price/apply2', {
id: 0,
});
},
async toQuote() {
if (this.sheet.disabled) return
const {userInfo, accountNum} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
uni.showModal({
title: '提示',
content: '您尚未认证, 是否前往认证?',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 0)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
uni.showModal({
title: '提示',
content: '请完善名片信息',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 1)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else if (accountNum === 0) {
uni.showModal({
title: '提示',
content: '请先到个人中心添加收款账户',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 7)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else {
if (userInfo.businessCard.status !== 1) {
uni.showModal({
title: '提示',
content: '您的名片信息未审核,请耐心等待',
})
return
}
if (this.sheet.tradeMethod === 1) {
const rate = this.sheet.notaryServiceRate || 0.1
uni.showModal({
title: '重要提示',
content: `提示着您成功签约交易,平台将收取总交易金额 x${rate}%服务费,如您存在利用系统漏洞恶意逃避支付服务费的情况,平台有将您的失信行为进行公布,情况严重的平台予以劝退。\n并有权依法追回平台服务费。您承诺此次交易为合法经营,如违反相关法律法规您将承担全部任与平台无关。您已经完全理解解并知悉,您不同意请点击'取消',取消报价,您同意以上夠定请点击'同意并知悉'。`,
confirmText: '同意并知悉',
cancelText: '取消',
success: ({confirm}) => {
if (confirm) {
vk.navigateTo({url: '/pages/price/apply1?enquiryId=' + this.enquiryId});
}
}
})
return
}
vk.navigateTo({url: '/pages/price/apply1?enquiryId=' + this.enquiryId});
}
},
/**
* 获取询价单详情
*/
getEnquiryDetail() {
vk.callFunction({
url: 'client/enquiry/sheet/pub/getDetail',
title: '请求中...',
data: {
_id: this.enquiryId
},
success: (res) => {
this.sheet = res.data
this.sheet.disabled = (!this.sheet.answerEndTime || dayjs(this.sheet.answerEndTime).isBefore(dayjs()))
this.sheet.fullAddress = ''
if (this.sheet.deliveryTime) this.sheet.deliveryTime = dayjs(this.sheet.deliveryTime).format('YYYY-MM-DD HH:mm:ss')
this.sheet.fullAddress = (this.sheet.addressRegion && this.sheet.addressRegion.province) ? `${this.sheet.addressRegion.province.name}${this.sheet.addressRegion.city.name}${this.sheet.addressRegion.area.name}` : ''
if (this.sheet.addressRegion.addressDetail) this.list.rows[index].fullAddress += this.sheet.addressRegion.addressDetail
}
});
},
confirm(item) {
this.isPopup = false
if (this.sheet.tradeMethod === 1 && (!this.sheet.user || this.sheet.user.isNotaryBusiness !== 1)) {
uni.showModal({
title: '温馨提示',
content: '请您先至个人中心-卖家中心-金久信公正银联资料,完成银联资料收集,并联系金久信客服开通功能。才能进行金久信公正交易',
showCancel: false,
confirmText: '确定'
})
return
}
if (this.sheet.tradeMethod === 1) {
const rate = this.sheet.notaryServiceRate || 0.1
uni.showModal({
title: '温馨提示',
content: `提示若您成功签约交易,平台将收取总交易金额 x${rate}%服务费,如您存在利用系统漏洞恶意逃避支付服务费的情况。\n平台有将您的失信行为进行公布,情况严重的平台予以劝退。\n并有权依法追回平台服务费。您承诺此次交易为合法经营,如违反相关法律法规您将承担全部任与平台无关。您己经完全理解并知悉,您不同意请点击“取消”,取消报价,您同意以上约定请点击“同意并知悉”。`,
confirmText: '同意并知悉',
cancelText: '取消',
success: ({confirm}) => {
if (confirm) this.doConfirm(item)
}
})
return
}
this.doConfirm(item)
},
doConfirm(item) {
vk.callFunction({
url: 'client/enquiry/quote/kh/confirmQuote',
title: '请求中...',
data: {
quoteId: item._id,
},
success: (data) => {
this.showDialog = false
if (this.sheet.signMethod === 0) vk.navigateTo('/pages/public/contract')
else {
if (this.sheet.signMethod === 1) vk.navigateTo('/pages/user/buyer')
else vk.navigateTo('/pages/public/contract')
}
this.$message({
type: 'success',
message: '报价确认成功'
})
}
});
},
},
onLoad({id}) {
this.enquiryId = id
this.userInfo = vk.getStorageSync('uni_id_user_info')
this.getEnquiryDetail()
}
}
</script>
<style lang="scss">
page {
padding-bottom: 150rpx;
background: #ffffff;
}
.card-title {
position: relative;
padding-left: 20rpx;
font-size: 28rpx;
font-weight: 600;
line-height: 48rpx;
color: #A92924;
&:before {
position: absolute;
left: 0;
top: 50%;
z-index: 9;
margin-top: -14rpx;
content: '';
width: 6rpx;
height: 28rpx;
background: #A92924;
}
.more {
font-size: 24rpx;
font-weight: normal;
color: #999999;
}
}
.layout-detail {
padding: 20rpx 30rpx;
}
.company {
padding-bottom: 40rpx;
border-bottom: 1px solid #f2f2f2;
.logo {
width: 120rpx;
height: 120rpx;
}
.name-text {
//max-width: 380rpx;
font-size: 30rpx;
font-weight: 600;
line-height: 40rpx;
color: #333333;
}
.name-icon {
width: 80rpx;
height: 32rpx;
}
.zhu {
margin-top: 10rpx;
font-size: 24rpx;
line-height: 32rpx;
color: #999999;
}
}
.detail-title {
font-size: 26rpx;
font-weight: 600;
line-height: 40rpx;
color: #101010;
}
.detail-text {
padding: 15rpx 0;
font-size: 26rpx;
line-height: 40rpx;
color: #333333;
}
.fiexd-bottom {
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
width: 100%;
height: 130rpx;
padding: 0 30rpx;
box-sizing: border-box;
border-top: 1px solid #f2f2f2;
.text {
font-size: 26rpx;
line-height: 40rpx;
}
.apply-btn {
width: 220rpx;
height: 70rpx;
font-size: 26rpx;
line-height: 70rpx;
text-align: center;
color: #ffffff;
background: #A92924;
}
}
.table-box {
font-size: 24rpx;
line-height: 28rpx;
text-align: center;
}
.tr {
display: flex;
justify-content: space-between;
align-items: center;
}
.th {
color: #666 !important;
background: #FFF8F2;
}
.th, .td {
display: flex;
justify-content: center;
align-items: center;
width: 50%;
height: 76rpx;
color: #999;
overflow: hidden;
box-sizing: border-box;
border-left: 1px solid #f2f2f2;
border-right: 1px solid #f2f2f2;
border-bottom: 1px solid #f2f2f2;
}
.td {
border-right: 1px solid #f2f2f2;
border-bottom: 1px solid #f2f2f2;
background: #ffffff;
}
.td-3 {
width: 33.33%;
}
.popup-box {
padding: 20rpx 20rpx;
width: 700rpx;
.residue {
font-size: 28rpx;
line-height: 40rpx;
color: #333333;
}
.increase {
font-size: 24rpx;
line-height: 40rpx;
color: #727272;
}
.custom-style {
margin: 40rpx auto;
width: 200rpx;
color: #ffffff;
background: #A92924;
}
}
.popup-title {
padding: 18rpx 0;
border-bottom: 1px solid #A92924;
.title {
font-size: 24rpx;
line-height: 40rpx;
color: #A92924;
}
.close {
width: 80rpx;
height: 40rpx;
font-size: 22rpx;
line-height: 40rpx;
text-align: center;
color: #ffffff;
background: #A92924;
}
}
.goods-item {
padding: 18rpx 0;
font-size: 24rpx;
line-height: 32rpx;
color: #626262;
}
.item-wrap {
margin: 24px 0;
font-size: 25rpx;
.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: #A92924;
font-size: 18px;
line-height: 18px;
border-left: 4px solid #A92924;
}
}
}
.countdown {
padding: 2px 5px;
margin: 0 5px;
}
.enquiry-tip-content {
text-align: left;
}
.enquiry-tip-item {
padding-bottom: 12rpx;
font-size: 26rpx;
line-height: 40rpx;
color: #333333;
}
</style>
+205
View File
@@ -0,0 +1,205 @@
<template>
<view class="wrap">
<u-sticky offset-top="0" customNavHeight="0">
<uititle title="我发布的询价"></uititle>
</u-sticky>
<view class="issue" @click="toRelease">
<u-icon name="plus" color="#fff" size="24"></u-icon>
</view>
<view class="layout-goods">
<view class="goods-box p-top-10" v-if="list.length">
<view class="item bg-white" v-for="(item, index) in list"
:key="index">
<view @click="detailLink(item._id)" class="askfor">查看详情</view>
<view @click="detailLink(item._id)" class="text-25 text-gray text-single">单号{{ item.enquiryNo }}</view>
<view @click="detailLink(item._id)" class="title text-single">{{ item.title }}</view>
<view @click="detailLink(item._id)" class="text m-top-10">
<text class="red">采购量:{{
item.productList.map(i => (i.procureNumber ? i.procureNumber : '') + (i.procureUnit ? i.procureUnit : '')).join("/")
}}
</text>
<text class="red">{{ item.quoteNum }}家已报价</text>
</view>
<text @click="detailLink(item._id)" class="text-25 text-gray">{{
`${item.addressRegion.province.name}${item.addressRegion.city.name}${item.addressRegion.area.name} ${item.addressDetail}`
}}
</text>
<text @click="detailLink(item._id)" class="text-25 text-gray" v-if="item.remark">备注:{{ item.remark }}</text>
<view @click="detailLink(item._id)" class="date">{{ item._add_time_str }} 发布</view>
<view>
<u-button type="primary" plain size="mini" @click="del(item._id)">删除</u-button>
</view>
</view>
</view>
<u-empty v-else text="您未发布询价单"></u-empty>
</view>
</view>
</template>
<script>
import uititle from '@/components/common/title'
export default {
name: "my",
components: {uititle},
data() {
return {
list: [],
userInfo: null
}
},
methods: {
detailLink(id) {
vk.navigateTo(`/pages/price/detail?id=${id}`);
},
async getList() {
const {rows} = await vk.callFunction({
url: 'client/enquiry/sheet/kh/getList'
})
this.list = rows
},
async toRelease() {
const {userInfo, accountNum} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
uni.showModal({
title: '提示',
content: '您尚未认证, 是否前往认证?',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 0)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
uni.showModal({
title: '提示',
content: '请完善名片信息',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 1)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else if (accountNum === 0) {
uni.showModal({
title: '提示',
content: '请先到个人中心添加收款账户',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 7)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else {
vk.navigateTo({
url: '/pages/price/publish'
})
}
},
del(_id) {
uni.showModal({
title: '提示',
content: '如果你要删除此条信息,之前其他客户填写的留言将无法查看',
success: res => {
if (res.confirm) {
vk.callFunction({
url: 'client/enquiry/sheet/kh/delete',
title: '请求中...',
data: {
_id
},
}).then(res => {
this.getList()
})
}
}
})
}
},
onShow() {
this.userInfo = vk.getStorageSync('uni_id_user_info')
this.getList()
}
}
</script>
<style lang="scss" scoped>
.layout-goods {
// width: 690rpx;
padding: 10rpx 30rpx;
.item {
position: relative;
margin-top: 30rpx;
padding: 10rpx 20rpx 20rpx;
border-radius: 12rpx;
.title {
width: 90%;
font-size: 30rpx;
font-weight: 600;
line-height: 48rpx;
color: #101010;
}
.link, .askfor {
position: absolute;
right: 20rpx;
top: 16rpx;
z-index: 9;
font-size: 24rpx;
line-height: 36rpx;
color: #A92924;
padding: 4rpx 8rpx;
}
.link {
border: 1px solid #A92924;
}
.text {
font-size: 24rpx;
line-height: 36rpx;
color: #999999;
}
.red {
margin-right: 20rpx;
color: #A92924;
}
.date {
font-size: 24rpx;
line-height: 36rpx;
color: #9a9a9a;
}
.company {
height: 40rpx;
.icon {
width: 40rpx;
height: 40rpx;
}
.text {
//width: 300rpx;
height: 40rpx;
font-size: 26rpx;
line-height: 40rpx;
color: #4f4f4f;
}
}
}
.item:nth-child(1) {
margin-top: 0 !important;
}
}
</style>
+175
View File
@@ -0,0 +1,175 @@
<template>
<view class="wrap">
<u-sticky offset-top="0" customNavHeight="0">
<uititle title="我的报价"></uititle>
</u-sticky>
<view class="issue" @click="toRelease">
<u-icon name="plus" color="#fff" size="24"></u-icon>
</view>
<view class="layout-goods">
<view class="goods-box p-top-10" v-if="list.length">
<view class="item bg-white" @click="detailLink(item.sheetId)" v-for="(item, index) in list"
:key="index">
<view class="askfor">查看详情</view>
<view class="title text-single">{{ item.sheet.title }}</view>
<view class="text m-top-10">
<text class="red">金额:{{ parseInt(item.totalPrice) }}元</text>
</view>
<view class="red text-25 font-bold">{{ item.status === 0 ? '待选商' : '已被选商' }}</view>
<view class="text-25 text-gray" v-if="item.remark">备注:{{ item.remark }}</view>
<view class="date">{{ item._add_time_str }} 发布</view>
</view>
</view>
<u-empty v-else text="您未报价"></u-empty>
</view>
</view>
</template>
<script>
import uititle from '@/components/common/title'
export default {
name: "my",
components: {uititle},
data() {
return {
list: [],
userInfo: null
}
},
methods: {
detailLink(sheetId) {
vk.navigateTo(`/pages/price/detail?id=${sheetId}`);
},
async getList() {
const {rows} = await vk.callFunction({
url: 'client/enquiry/quote/kh/getList'
})
this.list = rows
},
async toRelease() {
const {userInfo, accountNum} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
uni.showModal({
title: '提示',
content: '您尚未认证, 是否前往认证?',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 0)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
uni.showModal({
title: '提示',
content: '请完善名片信息',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 1)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else if (accountNum === 0) {
uni.showModal({
title: '提示',
content: '请先到个人中心添加收款账户',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 7)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else {
vk.navigateTo({
url: '/pages/price/publish'
})
}
},
},
onShow() {
this.userInfo = vk.getStorageSync('uni_id_user_info')
this.getList()
}
}
</script>
<style lang="scss" scoped>
.layout-goods {
// width: 690rpx;
padding: 10rpx 30rpx;
.item {
position: relative;
margin-top: 10rpx;
padding: 10rpx 20rpx 20rpx;
border-radius: 12rpx;
.title {
width: 90%;
font-size: 30rpx;
font-weight: 600;
line-height: 48rpx;
color: #101010;
}
.link, .askfor {
position: absolute;
right: 20rpx;
top: 16rpx;
z-index: 9;
font-size: 24rpx;
line-height: 36rpx;
color: #A92924;
padding: 4rpx 8rpx;
}
.link {
border: 1px solid #A92924;
}
.text {
font-size: 24rpx;
line-height: 36rpx;
color: #999999;
}
.red {
margin-right: 20rpx;
color: #A92924;
}
.date {
font-size: 24rpx;
line-height: 36rpx;
color: #9a9a9a;
}
.company {
height: 40rpx;
.icon {
width: 40rpx;
height: 40rpx;
}
.text {
//width: 300rpx;
height: 40rpx;
font-size: 26rpx;
line-height: 40rpx;
color: #4f4f4f;
}
}
}
.item:nth-child(1) {
margin-top: 0 !important;
}
}
</style>
+476
View File
@@ -0,0 +1,476 @@
<template> <!-- 找加工 -->
<view class="wrap">
<!-- 吸顶 -->
<u-sticky offset-top="0" customNavHeight="0">
<!-- 顶部 -->
<uiheader title="找供应"></uiheader>
<!-- 搜索栏 -->
<cmsearch :k="keyword" @search="afterSearch"></cmsearch>
<!-- 轮播图-传值:list="数组" -->
<cmswiper page="enquiry" height="320rpx"></cmswiper>
<!-- 选择器 -->
<view class="bg-white p-20 flex justify-center items-center">
<view class="flex-1 mx-20">
<u-button type="primary" shape="circle" size="mini" @click="toRelease">发布询价单</u-button>
</view>
<view class="flex-1 mx-20">
<u-button type="primary" shape="circle" size="mini" plain @click="toMyEnquiry">我发布的询价单</u-button>
</view>
<view class="flex-1 mx-20">
<u-button type="primary" shape="circle" size="mini" plain @click="toMyQuote">我的报价</u-button>
</view>
</view>
<view class="layout-pick flex flex-col justify-start items-start bg-white">
<view class="flex justify-start items-center">
<view class="ip down" @click="isPick = true">产品分类筛选:{{ pickValue }}</view>
</view>
<view class="flex justify-between items-center w-100p mt-15">
<view class="ip down" style="" @click="isPickStatus = true">询价状态:{{ status }}</view>
<view class="ip down" style="" @click="showAddress">城市:{{ locationValue }}</view>
</view>
</view>
</u-sticky>
<!-- 数据列表 -->
<view class="layout layout-work">
<uiswiper :ad="11" :category-name="cateId ? (pickValue === '其他' ? '' : pickValue) : ''"
:category-names="cateId && pickValue !== '其他' ? [pickValue] : []" :region="region"
padding="10rpx 0"></uiswiper>
<uiswiper :ad="112" :category-name="cateId ? (pickValue === '其他' ? '' : pickValue) : ''"
:category-names="cateId && pickValue !== '其他' ? [pickValue] : []" :region="region"
padding="10rpx 0"></uiswiper>
<view class="table-box">
<view class="thead" style="height: 50rpx">
<view class="tr">
<view style="height: 50rpx" class="w-25p flex justify-center items-center">品名、材质</view>
<view style="height: 50rpx" class="w-20p flex justify-center items-center">采购量</view>
<!-- <view class="th">收货地</view>-->
<view style="height: 50rpx" class="w-25p flex justify-center items-center">采购企业</view>
<view style="height: 50rpx" class="w-15p flex justify-center items-center">报价情况</view>
<view style="height: 50rpx" class="w-15p flex justify-center items-center">操作</view>
</view>
</view>
<view class="tbody">
<view class="tr" v-for="(item, index) in list.rows" :key="index">
<view class="w-25p td-n" @click="detailLink(item._id)">
<text class="u-line-2">
{{
item.productList.map(p => `${p.goodsName}${p.materialQuality ?
`(${p.materialQuality})` : ''}`).join("/")
}}
</text>
</view>
<view class="w-20p td-n">
<text>{{
item.productList.map(p => (p.procureNumber ? p.procureNumber : '') + (p.procureUnit ? p.procureUnit : '')).join("/")
}}
</text>
</view>
<!-- <view class="td">{{ item.fullAddress }}</view>-->
<view class="w-25p td-n">
<text v-if="item.user">
{{
item.user.accountType === 1 ? item.user.person.personName.replace(/^(.).*(.)$/, "$1*$2") : item.user.company.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6")
}}
</text>
</view>
<view class="w-15p td-n">{{ item.quoteNum }}家</view>
<view class="w-15p td-n">
<u-button
class="minibtn"
size="mini"
type="error"
plain
text="详情"
@click="detailLink(item._id)"
></u-button>
</view>
</view>
</view>
</view>
</view>
<!-- 暂无数据 -->
<u-empty mode="list" text="暂无更多内容~" v-if="list.rows.length === 0"></u-empty>
<!-- <cmempty></cmempty> -->
<!-- <view v-if="showMore" class="more-btns">-->
<!-- <view class="item" @click="toMyQuote">-->
<!-- <u-icon name="order" color="#A92924" size="24"></u-icon>-->
<!-- </view>-->
<!-- <view class="item" @click="toMyEnquiry">-->
<!-- <u-icon name="account" color="#A92924" size="24"></u-icon>-->
<!-- </view>-->
<!-- <view class="item" @click="toRelease">-->
<!-- <u-icon name="plus" color="#A92924" size="24"></u-icon>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="issue" @click="showMore = !showMore">-->
<!-- <u-icon :name="showMore ? 'close' : 'plus'" color="#fff" size="24"></u-icon>-->
<!-- </view>-->
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
<u-picker v-if="isPick" :show="isPick" :columns="[allProductList]"
key-name="name" @confirm="handConfirmPick" @cancel="isPick = false">
<template #more>
<text @click="otherCateFilter" class="mr-15">其他分类</text>
<text @click="resetCate">重置</text>
</template>
</u-picker>
<u-picker v-if="isPickStatus" :show="isPickStatus"
:columns="[[{name: '正在询价', value: 'notPick'}, {name: '合作成交', value: 'picked'}, ]]"
key-name="name" @confirm="handConfirmStatusPick" @cancel="isPickStatus = false">
</u-picker>
<collapse></collapse>
</view>
</template>
<script>
import uiheader from '@/components/index/header'
import cmsearch from '@/components/common/search'
import cmempty from '@/components/common/empty'
import cmswiper from '@/components/common/swiper'
import {FactoryBuilding} from "@icon-park/vue";
import AddressSelect from "@/components/AddressSelect.vue";
import Collapse from "@/components/index/collapse.vue";
import uiswiper from "@/components/index/swiper.vue";
export default {
components: {
uiswiper,
Collapse,
AddressSelect,
FactoryBuilding,
uiheader,
cmsearch,
cmempty,
cmswiper,
},
data() {
return {
allChildCate: [],
categoryTreeData: [],
checkCategoryList: [],
allProductList: [],
list: {
rows: [],
total: 0
},
pageSize: 500,
keyword: '',
area: null,
showMore: false,
locationValue: '全国',
region: {
province: {
code: null,
name: null,
},
city: {
code: null,
name: null,
},
area: {
code: null,
name: null,
}
},
pickValue: '全部',
isPick: false,
cateId: null,
cateIndex: [0, 0],
status: '正在询价',
statusVal: 'notPick',
isPickStatus: false,
};
},
methods: {
handleChangeCate({indexs}) {
this.cateIndex = indexs
},
handConfirmPick({value}) {
this.pickValue = value[0].name
this.cateId = value[0]._id
this.isPick = false
this.search(1)
},
handConfirmStatusPick({value}) {
this.status = value[0].name
this.statusVal = value[0].value
this.isPickStatus = false
this.search(1)
},
resetCate() {
this.cateIndex = [0, 0]
this.pickValue = '全部'
this.cateId = null
this.isPick = false
this.search(1)
},
showAddress() {
this.$refs.AddressSelect.open(this.region, 3, true);
},
regionConfirm({province, city, area}) {
this.region = {province, city, area}
this.locationValue = !province.code ? '全国' : `${province.name}${city.name}${area.name}`
this.search(1)
},
detailLink(id) {
vk.navigateTo(`/pages/price/detail?id=${id}`);
},
toMyEnquiry() {
vk.navigateTo({
url: '/pages/price/my'
})
},
toMyQuote() {
vk.navigateTo({
url: '/pages/price/myQuote'
})
},
async toRelease() {
const {userInfo, accountNum} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
uni.showModal({
title: '提示',
content: '您尚未认证, 是否前往认证?',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 0)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
uni.showModal({
title: '提示',
content: '请完善名片信息',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 1)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else if (accountNum === 0) {
uni.showModal({
title: '提示',
content: '请先到个人中心添加收款账户',
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 7)
uni.switchTab({url: '/pages/user/user'})
}
}
})
} else {
if (userInfo.businessCard.status !== 1) {
uni.showModal({
title: '提示',
content: '您的名片信息未审核,请耐心等待',
})
return
}
vk.navigateTo({
url: '/pages/price/publish'
})
}
},
selectArea(e) {
this.area = e[2]
this.search(1)
},
afterSearch(keyword) {
this.keyword = keyword
this.search()
},
otherCateFilter() {
this.pickValue = '其他'
this.cateId = -1
this.isPick = false
this.search(1)
},
search(pageIndex = 1) {
// const cateList = []
// this.allChildCate.forEach(item => {
// if (this.checkCategoryList.includes(item._id)) cateList.push(item.name)
// })
vk.callFunction({
url: 'client/enquiry/sheet/pub/getList',
title: '请求中...',
data: {
pageIndex,
pageSize: this.pageSize,
keyword: this.keyword,
// companyList: this.checkCompanyList,
// categoryIds: this.checkCategoryList
cateList: this.cateId ? [this.pickValue === '其他' ? 0 : this.pickValue] : null,
// material: this.checkTextureList,
area: this.region.area ? this.region.area.code : null,
status: this.statusVal
},
success: (data) => {
this.list = data
this.list.rows.forEach((val, index) => {
this.list.rows[index].fullAddress = (val.addressRegion && val.addressRegion.province) ? `${val.addressRegion.province.name}${val.addressRegion.city.name}${val.addressRegion.area.name}` : ''
if (val.addressDetail) this.list.rows[index].fullAddress += val.addressDetail
})
}
});
},
async getCate() {
const {rows} = await vk.callFunction({
url: 'client/spot/category/pub/getTree',
title: '请求中...',
});
this.allProductList = []
rows.map(item => {
item.children.forEach(child => {
this.allProductList.push({
...child,
parentName: item.name
})
})
item.idList = []
return item
})
}
},
onLoad(option) {
if (option.keyword) this.keyword = option.keyword
// vk.callFunction({
// url: 'client/enquiry/template/pub/getList',
// title: '请求中...',
// data: {},
// success: (data) => {
// this.categoryTreeData = data.rows
// this.allChildCate = []
// this.categoryTreeData.forEach(item => {
// item.children.forEach(child => {
// this.allChildCate.push(child)
// })
// })
// }
// });
this.getCate()
this.search()
}
}
</script>
<style lang="scss">
.minibtn {
width: 60rpx;
font-size: 20rpx;
color: #A92924 !important;
border-color: #A92924;
}
.layout-pick {
// width: 690rpx;
//height: 68rpx;
padding: 0 30rpx;
font-size: 24rpx;
line-height: 40rpx;
color: #4F4F4F;
.ip {
position: relative;
//max-width: 33.333%;
height: 40rpx;
padding-right: 30rpx;
overflow: hidden;
box-sizing: border-box;
}
.down::after {
position: absolute;
right: 0rpx;
top: 50%;
z-index: 9;
content: '';
margin-top: -6rpx;
width: 0;
height: 0;
border-left: 10rpx solid transparent;
border-right: 10rpx solid transparent;
border-top: 12rpx solid #999999;
}
}
.layout-work {
margin: 20rpx 10rpx;
}
.tr {
display: flex;
justify-content: space-between;
align-items: center;
}
.table-box {
font-size: 24rpx;
line-height: 28rpx;
text-align: center;
}
.th, .td {
display: flex;
justify-content: center;
align-items: center;
width: 20%;
height: 76rpx;
color: #000;
overflow: hidden;
box-sizing: border-box;
&:nth-child(2) {
width: 15%;
}
&:nth-child(4) {
width: 15%;
}
&:nth-child(5) {
width: 30%;
}
}
.td-n {
border-right: 1px solid #f2f2f2;
border-bottom: 1px solid #f2f2f2;
background: #ffffff;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
&:first-child {
color: #A92924;
}
&:last-child {
border-right: none;
}
}
.more-btns {
position: fixed;
right: 30rpx;
bottom: 220rpx;
z-index: 99;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 90rpx;
border-radius: 999rpx;
background: white;
border: 1px solid #A92924;
.item {
margin: 20rpx 0;
}
}
</style>
File diff suppressed because it is too large Load Diff