1、新增旧货市场

2、新增用户等级
This commit is contained in:
2023-12-10 14:53:07 +08:00
parent a45d185c64
commit 17b2d8f117
112 changed files with 10793 additions and 6360 deletions
+86 -19
View File
@@ -114,9 +114,44 @@
<!-- 商品列表 -->
<view class="sheet-list">
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
:customRightBtns="table1.customRightBtns" :query-form-param="queryParam"
:pagination="true"></vk-data-table>
<el-table :data="list.rows" style="width: 100%">
<el-table-column align="center" label="品名/材质">
<template v-slot="{ row }">
<p class="text-main">{{ row.productList.map(item => `${item.goodsName}(${item.materialQuality})`).join("/") }}</p>
</template>
</el-table-column>
<el-table-column align="center" label="采购量">
<template v-slot="{ row }">
<p class="text-main">
{{ row.productList.map(item => item.procureNumber + item.procureUnit).join("/") }}</p>
</template>
</el-table-column>
<el-table-column prop="fullAddress" 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_str" label="发布时间"/>
<el-table-column align="center" label="操作">
<template v-slot="{ row }">
<el-button size="mini" type="primary" plain
@click.native="vk.navigateTo('/pages/enquiry/detail?id=' + row._id)">详情
</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>
@@ -147,6 +182,11 @@ export default {
checkCompanyList: [],
attributes: [],
keyword: '',
list: {
rows: [],
total: 0
},
pageSize: 20,
queryParam: {},
// 表格相关开始 -----------------------------------------------------------
table1: {
@@ -252,7 +292,7 @@ export default {
}
},
{
key: "_add_time",
key: "_add_time_srt",
title: "发布时间",
type: "time",
},
@@ -285,6 +325,7 @@ export default {
});
this.getAttributes()
this.getCompany()
this.search()
},
methods: {
selectCate(id) {
@@ -344,21 +385,47 @@ export default {
},
search(pageIndex) {
const categoryIds = []
this.checkCategoryList.forEach(item => {
// console.log(item)
// item.forEach(sitem => {
// categoryIds.push(sitem._id)
// })
categoryIds.push(item)
})
this.queryParam.formData = {
keyword: this.keyword,
companyList: this.checkCompanyList,
categoryIds
}
this.$refs.table1.search()
search(pageIndex = 1) {
vk.callFunction({
url: 'client/enquiry/sheet/pub/getList',
data: {
pageIndex,
pageSize: this.pageSize,
keyword: this.keyword,
companyList: this.checkCompanyList,
categoryIds: this.checkCategoryList
},
success: (data) => {
this.list = data
this.list.rows.forEach((val, index) => {
let fullAddress = ''
if (val.productList !== undefined && val.productList.length > 0 && val.productList[0].addressRegion !== undefined && val.productList[0].addressRegion.length > 0) {
let provinceIndex = 0, cityIndex = 0, areaIndex = 0
this.provinceData.forEach((item, index) => {
if (val.productList[0].addressRegion !== undefined && parseInt(val.productList[0].addressRegion[0]) === parseInt(item.code)) {
provinceIndex = index
fullAddress = item.name
}
})
this.cityData[provinceIndex].forEach((item, index) => {
if (val.productList[0].addressRegion !== undefined && parseInt(val.productList[0].addressRegion[1]) === parseInt(item.code)) {
cityIndex = index
fullAddress += item.name
}
})
this.areaData[provinceIndex][cityIndex].forEach((item, index) => {
if (val.productList[0].addressRegion !== undefined && parseInt(val.productList[0].addressRegion[2]) === parseInt(item.code)) {
areaIndex = index
fullAddress += item.name
}
})
fullAddress += val.productList[0].addressDetail
}
this.list.rows[index].fullAddress = fullAddress
})
}
});
},
getAttributes() {
vk.callFunction({