新增金久信学堂

This commit is contained in:
2023-11-30 22:46:10 +08:00
parent 4c0e457f0f
commit f9f20e77ca
7 changed files with 125 additions and 68 deletions
+38 -24
View File
@@ -17,12 +17,12 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item label="规格型号"> <el-form-item label="规格型号">
<el-select v-model="form1.data.model" placeholder="请选择"> <el-select v-model="form1.data.model" placeholder="请选择">
<template v-if=" attributes.find(attr => attr.label === '规格型号')"> <template v-if=" goodsAttributes.find(attr => attr.label === '规格型号')">
<el-option <el-option
v-for="(item, index) in attributes.find(attr => attr.label === '规格型号').options" v-for="(item, index) in goodsAttributes.find(attr => attr.label === '规格型号').values"
:key="index" :key="index"
:label="item.label" :label="item"
:value="item.value"> :value="item">
</el-option> </el-option>
</template> </template>
</el-select> </el-select>
@@ -31,12 +31,12 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item label="其他数据"> <el-form-item label="其他数据">
<el-select v-model="form1.data.otherData" placeholder="请选择"> <el-select v-model="form1.data.otherData" placeholder="请选择">
<template v-if=" attributes.find(attr => attr.label === '其他数据')"> <template v-if=" goodsAttributes.find(attr => attr.label === '其他数据')">
<el-option <el-option
v-for="(item, index) in attributes.find(attr => attr.label === '其他数据').options" v-for="(item, index) in goodsAttributes.find(attr => attr.label === '其他数据').values"
:key="index" :key="index"
:label="item.label" :label="item"
:value="item.value"> :value="item">
</el-option> </el-option>
</template> </template>
</el-select> </el-select>
@@ -47,7 +47,7 @@
<el-select v-model="form1.data.standard" placeholder="请选择"> <el-select v-model="form1.data.standard" placeholder="请选择">
<template v-if="form1.data.goodsId"> <template v-if="form1.data.goodsId">
<el-option <el-option
v-for="(item, index) in goodsList.find(goods => goods._id === form1.data.goodsId).attributes.filter(attr => attr.label === '执行标准')[0].values" v-for="(item, index) in goodsAttributes.find(attr => attr.label === '执行标准').values"
:key="index" :key="index"
:label="item" :label="item"
:value="item"> :value="item">
@@ -106,7 +106,7 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="采购数量"> <el-form-item label="采购数量">
<el-input v-model="form1.data.procureNumber"> <el-input v-model="form1.data.procureNumber" class="input-with-select">
<el-select v-model="form1.data.procureUnit" slot="append" placeholder="请选择"> <el-select v-model="form1.data.procureUnit" slot="append" placeholder="请选择">
<template v-if=" attributes.find(attr => attr.label === '单位')"> <template v-if=" attributes.find(attr => attr.label === '单位')">
<el-option <el-option
@@ -152,26 +152,27 @@
<el-select v-model="provinceIndex" placeholder="省" @change="selectProvince"> <el-select v-model="provinceIndex" placeholder="省" @change="selectProvince">
<el-option v-for="(item, index) in provinceData" :key="index" :value="index" <el-option v-for="(item, index) in provinceData" :key="index" :value="index"
:label="item.name"/> :label="item.name"/>
<!-- <span slot="prefix">省</span>--> <!-- <span slot="prefix">省</span>-->
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-select v-model="cityIndex" placeholder="市"> <el-select v-model="cityIndex" placeholder="市" @change="selectCity">
<template v-if="provinceIndex !== null"> <template v-if="provinceIndex !== null">
<el-option v-for="(item, index) in cityData[provinceIndex]" :key="index" <el-option v-for="(item, index) in cityData[provinceIndex]" :key="index"
:value="index" :value="index"
:label="item.name"/> :label="item.name"/>
</template> </template>
<!-- <span slot="prefix">市</span>--> <!-- <span slot="prefix">市</span>-->
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-select v-model="areaIndex" placeholder="区/县"> <el-select v-model="areaIndex" placeholder="区/县" @change="selectArea">
<template v-if="provinceIndex !== null && cityIndex !== null"> <template v-if="provinceIndex !== null && cityIndex !== null">
<el-option v-for="(item, index) in areaData[provinceIndex][cityIndex]" :key="index" :value="index" <el-option v-for="(item, index) in areaData[provinceIndex][cityIndex]"
:key="index" :value="index"
:label="item.name"/> :label="item.name"/>
</template> </template>
<!-- <span slot="prefix">区/县</span>--> <!-- <span slot="prefix">区/县</span>-->
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@@ -222,6 +223,8 @@ export default {
attributesLoaded: false, attributesLoaded: false,
goodsList: [], goodsList: [],
attributes: [], attributes: [],
goodsAttributes: [],
address: ['', '', ''],
form: { form: {
addressDetail: '' addressDetail: ''
}, },
@@ -242,7 +245,8 @@ export default {
len: null, len: null,
extraAttributes: {}, extraAttributes: {},
attributes: {}, attributes: {},
addressRegion: undefined addressRegion: [],
addressDetail: null
}, },
// 表单属性 // 表单属性
props: { props: {
@@ -532,14 +536,24 @@ export default {
}) })
}, },
selectGoods(val) { selectGoods(val) {
this.goodsList.forEach(({_id, name}) => { this.goodsList.forEach(({_id, name, extraAttributes}) => {
if (_id === val) this.form1.data.goodsName = name if (_id === val) {
this.form1.data.goodsName = name
console.log(extraAttributes)
this.goodsAttributes = extraAttributes
}
}) })
}, },
selectProvince(index){ selectProvince(index) {
console.log(index, this.provinceIndex) this.form1.data.addressRegion[0] = this.provinceData[index].code
console.log(this.cityData, this.cityData[index]) },
} 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: { watch: {
"form1.data"(val) { "form1.data"(val) {
@@ -564,7 +578,7 @@ export default {
</style> </style>
<style> <style>
.input-with-select .el-input-group__append { /deep/ .input-with-select .el-input-group__append {
background-color: #fff !important; background-color: #fff !important;
width: 130px !important; width: 130px !important;
} }
+3 -1
View File
@@ -25,7 +25,9 @@
<view class="ml-20 flex justify-start items-center"> <view class="ml-20 flex justify-start items-center">
<building-one theme="outline" size="24" fill="#a92924" strokeLinecap="square"/> <building-one theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
<view class="text-main "> <view class="text-main ">
<text class="mx-20">{{ sheet.quoteList.length > 0 ? sheet.quoteList.rows.length : 0 }} <text class="mx-20">{{
(sheet.quoteList && sheet.quoteList.rows && sheet.quoteList.rows.length > 0) ? sheet.quoteList.rows.length : 0
}}
</text> </text>
<text>家已报价</text> <text>家已报价</text>
</view> </view>
+1 -1
View File
@@ -15,7 +15,7 @@
<el-carousel height="170px"> <el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item"> <el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img" <image class="carousel-img"
src="http://jyx.gxwebsoft.com/uploads/20210506/600fc93e6b85324b3ea1373ee264290d.jpg" src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image> mode="aspectFill"></image>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
+3 -3
View File
@@ -757,11 +757,11 @@ export default {
// } // }
this.form1.data.productList = this.productList this.form1.data.productList = this.productList
if (this.projectProvinceIndex !== null) { if (this.projectProvinceIndex !== null) {
this.form1.data.province = this.provinceData[this.projectProvinceIndex] this.form1.data.province = this.provinceData[this.projectProvinceIndex].code
if (this.projectCityIndex !== null) { if (this.projectCityIndex !== null) {
this.form1.data.city = this.cityData[this.projectProvinceIndex] this.form1.data.city = this.cityData[this.projectProvinceIndex].code
if (this.projectAreaIndex !== null) { if (this.projectAreaIndex !== null) {
this.form1.data.area = this.areaData[this.projectProvinceIndex][this.projectCityIndex] this.form1.data.area = this.areaData[this.projectProvinceIndex][this.projectCityIndex].code
} }
} }
} }
+38 -31
View File
@@ -15,7 +15,7 @@
<el-carousel height="170px"> <el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item"> <el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img" <image class="carousel-img"
src="http://jyx.gxwebsoft.com/uploads/20210506/600fc93e6b85324b3ea1373ee264290d.jpg" src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image> mode="aspectFill"></image>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
@@ -165,17 +165,15 @@ export default {
{ {
key: "title", key: "title",
title: "标题", title: "标题",
type: "text", type: "html",
width: 280, formatter: (val, row, column, index) => {
// formatter: (val, row, column, index) => { return `<text class="text-main">${val}</text>`
// return val.map(item=>item.name).join("/") }
// }
}, },
{ {
key: "num", key: "num",
title: "加工量", title: "加工量",
type: "text", type: "text",
width: 280,
// formatter: (val, row, column, index) => { // formatter: (val, row, column, index) => {
// return val.map(item=>item.procureNumber + item.procureUnit).join("/") // return val.map(item=>item.procureNumber + item.procureUnit).join("/")
// } // }
@@ -184,7 +182,6 @@ export default {
key: "productList", key: "productList",
title: "收货地", title: "收货地",
type: "text", type: "text",
minWidth: 200,
formatter: (val, row, column, index) => { formatter: (val, row, column, index) => {
let str = "" let str = ""
try { try {
@@ -195,29 +192,33 @@ export default {
} catch (err) { } catch (err) {
str = "" str = ""
} }
return str return str
} }
}, },
// { {
// key: "user", key: "user",
// title: "采购单位", title: "采购企业",
// type: "text", type: "text",
// width: 280, formatter: (val, row, column, index) => {
// formatter: (val, row, column, index) => { if(val.accountType === 1) {
// if(val.accountType == 1) { return val.person.personName
// return val.person.personName }else {
// }else { return val.company.companyName
// return val.company.companyName }
// } }
// } },
// {
// }, key: "",
title: "报价情况",
type: "text",
formatter: (val, row, column, index) => {
return `${val.quoteNum}家已报价`
}
},
{ {
key: "_add_time", key: "_add_time",
title: "添加时间", title: "发布时间",
type: "time", type: "time",
width: 160
}, },
], ],
@@ -291,8 +292,11 @@ export default {
url: '/pages/process/my' url: '/pages/process/my'
}) })
}, },
toRelease() { async toRelease() {
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) { const {userInfo} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
this.$confirm('您尚未认证, 是否前往认证?', '提示', { this.$confirm('您尚未认证, 是否前往认证?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@@ -300,7 +304,7 @@ export default {
}).then(() => { }).then(() => {
this.getCertUrl() this.getCertUrl()
}) })
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) { } else if (vk.pubfn.isNull(userInfo.businessCard)) {
this.$confirm('请完善名片信息', '提示', { this.$confirm('请完善名片信息', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@@ -314,8 +318,11 @@ export default {
}) })
} }
}, },
toDetail(id) { async toDetail(id) {
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) { const {userInfo} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
this.$confirm('您尚未认证, 是否前往认证?', '提示', { this.$confirm('您尚未认证, 是否前往认证?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@@ -323,7 +330,7 @@ export default {
}).then(() => { }).then(() => {
this.getCertUrl() this.getCertUrl()
}) })
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) { } else if (vk.pubfn.isNull(userInfo.businessCard)) {
this.$confirm('请完善名片信息', '提示', { this.$confirm('请完善名片信息', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
+1 -1
View File
@@ -15,7 +15,7 @@
<el-carousel height="170px"> <el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item"> <el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img" <image class="carousel-img"
src="http://jyx.gxwebsoft.com/uploads/20210506/600fc93e6b85324b3ea1373ee264290d.jpg" src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image> mode="aspectFill"></image>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
+41 -7
View File
@@ -15,14 +15,14 @@
<el-carousel height="170px"> <el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item"> <el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img" <image class="carousel-img"
src="http://jyx.gxwebsoft.com/uploads/20210506/600fc93e6b85324b3ea1373ee264290d.jpg" src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image> mode="aspectFill"></image>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
<view class="goods-options"> <view class="goods-options">
<el-row class=""> <el-row class="">
<el-button @click="toRelease" type="primary" round>发布现货</el-button> <el-button @click="toRelease" type="primary" round>发布现货</el-button>
<el-button type="primary" round plain class="empty-bg-plain-btn">我发布的现货</el-button> <el-button @click="toMy" type="primary" round plain class="empty-bg-plain-btn">我发布的现货</el-button>
</el-row> </el-row>
</view> </view>
</view> </view>
@@ -175,8 +175,11 @@ export default {
} }
this.search(1) this.search(1)
}, },
toRelease() { async toRelease() {
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) { const {userInfo} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
this.$confirm('您尚未认证, 是否前往认证?', '提示', { this.$confirm('您尚未认证, 是否前往认证?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@@ -184,7 +187,33 @@ export default {
}).then(() => { }).then(() => {
this.getCertUrl() this.getCertUrl()
}) })
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) { } 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/spot/release/release'
})
}
},
async toMy() {
const {userInfo} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.getCertUrl()
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
this.$confirm('请完善名片信息', '提示', { this.$confirm('请完善名片信息', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@@ -193,11 +222,12 @@ export default {
vk.navigateTo('/pages/user/user?menu=business-card'); vk.navigateTo('/pages/user/user?menu=business-card');
}) })
} else { } else {
uni.navigateTo({ vk.navigateTo({
url: '/pages/spot/release/release' url: '/pages/spot/goods/my'
}) })
} }
}, },
search(pageIndex) { search(pageIndex) {
vk.callFunction({ vk.callFunction({
url: 'client/spot/goods/pub/getList', url: 'client/spot/goods/pub/getList',
@@ -345,6 +375,10 @@ export default {
margin: 0 auto; margin: 0 auto;
cursor: pointer; cursor: pointer;
} }
.goods-image {
width: 100%;
}
} }
.paginatio { .paginatio {