新增金久信学堂
This commit is contained in:
@@ -17,12 +17,12 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格型号">
|
||||
<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
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '规格型号').options"
|
||||
v-for="(item, index) in goodsAttributes.find(attr => attr.label === '规格型号').values"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
@@ -31,12 +31,12 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="其他数据">
|
||||
<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
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '其他数据').options"
|
||||
v-for="(item, index) in goodsAttributes.find(attr => attr.label === '其他数据').values"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
@@ -47,7 +47,7 @@
|
||||
<el-select v-model="form1.data.standard" placeholder="请选择">
|
||||
<template v-if="form1.data.goodsId">
|
||||
<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"
|
||||
:label="item"
|
||||
:value="item">
|
||||
@@ -106,7 +106,7 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<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="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '单位')">
|
||||
<el-option
|
||||
@@ -152,26 +152,27 @@
|
||||
<el-select v-model="provinceIndex" placeholder="省" @change="selectProvince">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
<!-- <span slot="prefix">省</span>-->
|
||||
<!-- <span slot="prefix">省</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="cityIndex" placeholder="市">
|
||||
<el-select v-model="cityIndex" placeholder="市" @change="selectCity">
|
||||
<template v-if="provinceIndex !== null">
|
||||
<el-option v-for="(item, index) in cityData[provinceIndex]" :key="index"
|
||||
:value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
<!-- <span slot="prefix">市</span>-->
|
||||
<!-- <span slot="prefix">市</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<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">
|
||||
<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"/>
|
||||
</template>
|
||||
<!-- <span slot="prefix">区/县</span>-->
|
||||
<!-- <span slot="prefix">区/县</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -222,6 +223,8 @@ export default {
|
||||
attributesLoaded: false,
|
||||
goodsList: [],
|
||||
attributes: [],
|
||||
goodsAttributes: [],
|
||||
address: ['', '', ''],
|
||||
form: {
|
||||
addressDetail: ''
|
||||
},
|
||||
@@ -242,7 +245,8 @@ export default {
|
||||
len: null,
|
||||
extraAttributes: {},
|
||||
attributes: {},
|
||||
addressRegion: undefined
|
||||
addressRegion: [],
|
||||
addressDetail: null
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
@@ -532,14 +536,24 @@ export default {
|
||||
})
|
||||
},
|
||||
selectGoods(val) {
|
||||
this.goodsList.forEach(({_id, name}) => {
|
||||
if (_id === val) this.form1.data.goodsName = name
|
||||
this.goodsList.forEach(({_id, name, extraAttributes}) => {
|
||||
if (_id === val) {
|
||||
this.form1.data.goodsName = name
|
||||
console.log(extraAttributes)
|
||||
this.goodsAttributes = extraAttributes
|
||||
}
|
||||
})
|
||||
},
|
||||
selectProvince(index){
|
||||
console.log(index, this.provinceIndex)
|
||||
console.log(this.cityData, this.cityData[index])
|
||||
}
|
||||
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"(val) {
|
||||
@@ -564,7 +578,7 @@ export default {
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.input-with-select .el-input-group__append {
|
||||
/deep/ .input-with-select .el-input-group__append {
|
||||
background-color: #fff !important;
|
||||
width: 130px !important;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
<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">{{ 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>
|
||||
</view>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="http://jyx.gxwebsoft.com/uploads/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
|
||||
@@ -757,11 +757,11 @@ export default {
|
||||
// }
|
||||
this.form1.data.productList = this.productList
|
||||
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) {
|
||||
this.form1.data.city = this.cityData[this.projectProvinceIndex]
|
||||
this.form1.data.city = this.cityData[this.projectProvinceIndex].code
|
||||
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
@@ -15,7 +15,7 @@
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="http://jyx.gxwebsoft.com/uploads/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
@@ -165,17 +165,15 @@ export default {
|
||||
{
|
||||
key: "title",
|
||||
title: "标题",
|
||||
type: "text",
|
||||
width: 280,
|
||||
// formatter: (val, row, column, index) => {
|
||||
// return val.map(item=>item.name).join("/")
|
||||
// }
|
||||
type: "html",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `<text class="text-main">${val}</text>`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "num",
|
||||
title: "加工量",
|
||||
type: "text",
|
||||
width: 280,
|
||||
// formatter: (val, row, column, index) => {
|
||||
// return val.map(item=>item.procureNumber + item.procureUnit).join("/")
|
||||
// }
|
||||
@@ -184,7 +182,6 @@ export default {
|
||||
key: "productList",
|
||||
title: "收货地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
formatter: (val, row, column, index) => {
|
||||
let str = ""
|
||||
try {
|
||||
@@ -195,29 +192,33 @@ export default {
|
||||
} 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: "user",
|
||||
title: "采购企业",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
if(val.accountType === 1) {
|
||||
return val.person.personName
|
||||
}else {
|
||||
return val.company.companyName
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "",
|
||||
title: "报价情况",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val.quoteNum}家已报价`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "_add_time",
|
||||
title: "添加时间",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
|
||||
],
|
||||
@@ -291,8 +292,11 @@ export default {
|
||||
url: '/pages/process/my'
|
||||
})
|
||||
},
|
||||
toRelease() {
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
async toRelease() {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -300,7 +304,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -314,8 +318,11 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
toDetail(id) {
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
async toDetail(id) {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -323,7 +330,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="http://jyx.gxwebsoft.com/uploads/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="http://jyx.gxwebsoft.com/uploads/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
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 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>
|
||||
</view>
|
||||
</view>
|
||||
@@ -175,8 +175,11 @@ export default {
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
toRelease() {
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
async toRelease() {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -184,7 +187,33 @@ export default {
|
||||
}).then(() => {
|
||||
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('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -193,11 +222,12 @@ export default {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/spot/release/release'
|
||||
vk.navigateTo({
|
||||
url: '/pages/spot/goods/my'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
search(pageIndex) {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/goods/pub/getList',
|
||||
@@ -345,6 +375,10 @@ export default {
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.goods-image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.paginatio {
|
||||
|
||||
Reference in New Issue
Block a user