Commit ce4e592c authored by zhanglw's avatar zhanglw

黄页产品列表

parent 732cdb39
...@@ -293,9 +293,6 @@ ...@@ -293,9 +293,6 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
<el-button @click="cancelView">关闭</el-button> <el-button @click="cancelView">关闭</el-button>
<!-- <el-button type="danger" @click="submitForm()">预览</el-button>-->
<el-button type="primary" @click="submitForm()">保存</el-button>
<el-button v-if="formData.homePageId" type="success" @click="submitForm(true)">发布</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
......
...@@ -56,9 +56,6 @@ ...@@ -56,9 +56,6 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
<el-button @click="cancelView">关闭</el-button> <el-button @click="cancelView">关闭</el-button>
<!-- <el-button type="danger" @click="submitForm()">预览</el-button>-->
<el-button type="primary" @click="submitForm()">保存</el-button>
<el-button v-if="formData.newsPageId" type="success" @click="submitForm(true)">发布</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
......
...@@ -135,11 +135,13 @@ ...@@ -135,11 +135,13 @@
<el-input v-model="formData.registeredCapital" type="number" placeholder="请输入数字" class="cell-input" /> <el-input v-model="formData.registeredCapital" type="number" placeholder="请输入数字" class="cell-input" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="注册地址:" class="form-cell"> <el-form-item label="注册地址:" class="form-cell" required>
<div class="cell-box"> <div class="cell-box">
<el-form-item prop="registeredAddressProvince" style="margin: 0;display: inline-block;">
<el-select v-model="formData.registeredAddressProvince" placeholder="省" style="width: 120px" @change="findAreaByCodeAndType(formData.registeredAddressProvince,2, 'cityOpts')"> <el-select v-model="formData.registeredAddressProvince" placeholder="省" style="width: 120px" @change="findAreaByCodeAndType(formData.registeredAddressProvince,2, 'cityOpts')">
<el-option v-for="item in provinceOpts" :key="item.id" :label="item.name" :value="item.code" /> <el-option v-for="item in provinceOpts" :key="item.id" :label="item.name" :value="item.code" />
</el-select> </el-select>
</el-form-item>
<el-select v-model="formData.registeredAddressCity" placeholder="市" style="width: 160px" @change="findAreaByCodeAndType(formData.registeredAddressCity,3, 'countyOpts')"> <el-select v-model="formData.registeredAddressCity" placeholder="市" style="width: 160px" @change="findAreaByCodeAndType(formData.registeredAddressCity,3, 'countyOpts')">
<el-option v-for="item in cityOpts" :key="item.id" :label="item.name" :value="item.code" /> <el-option v-for="item in cityOpts" :key="item.id" :label="item.name" :value="item.code" />
</el-select> </el-select>
...@@ -240,7 +242,8 @@ export default { ...@@ -240,7 +242,8 @@ export default {
registeredCapital: { required: true, message: '请填写注册资本', trigger: 'blur' }, registeredCapital: { required: true, message: '请填写注册资本', trigger: 'blur' },
enterpriseIntroduction: { required: true, message: '请填写企业介绍', trigger: 'blur' }, enterpriseIntroduction: { required: true, message: '请填写企业介绍', trigger: 'blur' },
mainProductsIntroduction: { required: true, message: '请填写主营产品介绍', trigger: 'blur' }, mainProductsIntroduction: { required: true, message: '请填写主营产品介绍', trigger: 'blur' },
businessScopeIntroduction: { required: true, message: '请填写业务范围介绍', trigger: 'blur' } businessScopeIntroduction: { required: true, message: '请填写业务范围介绍', trigger: 'blur' },
registeredAddressProvince: { required: true, message: '请填写注册省份', trigger: 'blur' }
} }
} }
}, },
......
...@@ -135,11 +135,13 @@ ...@@ -135,11 +135,13 @@
<el-input v-model="formData.registeredCapital" type="number" placeholder="请输入数字" class="cell-input" /> <el-input v-model="formData.registeredCapital" type="number" placeholder="请输入数字" class="cell-input" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="注册地址:" class="form-cell"> <el-form-item label="注册地址:" class="form-cell" required>
<div class="cell-box"> <div class="cell-box">
<el-form-item prop="registeredAddressProvince" style="margin: 0;display: inline-block;">
<el-select v-model="formData.registeredAddressProvince" placeholder="省" style="width: 120px" @change="findAreaByCodeAndType(formData.registeredAddressProvince,2, 'cityOpts')"> <el-select v-model="formData.registeredAddressProvince" placeholder="省" style="width: 120px" @change="findAreaByCodeAndType(formData.registeredAddressProvince,2, 'cityOpts')">
<el-option v-for="item in provinceOpts" :key="item.id" :label="item.name" :value="item.code" /> <el-option v-for="item in provinceOpts" :key="item.id" :label="item.name" :value="item.code" />
</el-select> </el-select>
</el-form-item>
<el-select v-model="formData.registeredAddressCity" placeholder="市" style="width: 160px" @change="findAreaByCodeAndType(formData.registeredAddressCity,3, 'countyOpts')"> <el-select v-model="formData.registeredAddressCity" placeholder="市" style="width: 160px" @change="findAreaByCodeAndType(formData.registeredAddressCity,3, 'countyOpts')">
<el-option v-for="item in cityOpts" :key="item.id" :label="item.name" :value="item.code" /> <el-option v-for="item in cityOpts" :key="item.id" :label="item.name" :value="item.code" />
</el-select> </el-select>
...@@ -239,7 +241,8 @@ export default { ...@@ -239,7 +241,8 @@ export default {
registeredCapital: { required: true, message: '请填写注册资本', trigger: 'blur' }, registeredCapital: { required: true, message: '请填写注册资本', trigger: 'blur' },
enterpriseIntroduction: { required: true, message: '请填写企业介绍', trigger: 'blur' }, enterpriseIntroduction: { required: true, message: '请填写企业介绍', trigger: 'blur' },
mainProductsIntroduction: { required: true, message: '请填写主营产品介绍', trigger: 'blur' }, mainProductsIntroduction: { required: true, message: '请填写主营产品介绍', trigger: 'blur' },
businessScopeIntroduction: { required: true, message: '请填写业务范围介绍', trigger: 'blur' } businessScopeIntroduction: { required: true, message: '请填写业务范围介绍', trigger: 'blur' },
registeredAddressProvince: { required: true, message: '请填写注册省份', trigger: 'blur' }
} }
} }
}, },
......
...@@ -31,9 +31,10 @@ ...@@ -31,9 +31,10 @@
<img v-if="item.isGood" src="@/assets/home_images/recommend.png" class="stamp" title="推荐" style="top: 10px;right: 8px"> <img v-if="item.isGood" src="@/assets/home_images/recommend.png" class="stamp" title="推荐" style="top: 10px;right: 8px">
<img v-if="item.isHot" src="@/assets/home_images/hot.png" class="stamp" title="热门" style="top: 0;left: 0"> <img v-if="item.isHot" src="@/assets/home_images/hot.png" class="stamp" title="热门" style="top: 0;left: 0">
<el-image <el-image
:src="item.imgSrc?imgSrcStart+'/img'+item.imgSrc:defaultImgProduct" class="touch"
:preview-src-list="item.imgSrcList.length?item.imgSrcList:[defaultImgProduct]" :src="item.imgSrc?imgSrcStart+'/productPic/'+item.imgSrc:defaultImgProduct"
style="width:284px;height: 284px;margin: 0 32px 4px" style="width:284px;height: 284px;margin: 0 32px 4px"
@click="goToDetails(item, '/product/details')"
> >
<div slot="placeholder" class="image-slot">加载中<span class="dot">...</span></div> <div slot="placeholder" class="image-slot">加载中<span class="dot">...</span></div>
</el-image> </el-image>
...@@ -154,9 +155,9 @@ ...@@ -154,9 +155,9 @@
<div class="search-box"> <div class="search-box">
<el-row style="padding-top: 10px"> <el-row style="padding-top: 10px">
<el-col :span="2"> <el-col :span="2">
<div class="search-item" :class="query.type===undefined?'active':''"> <div class="search-item" :class="query.type===''?'active':''">
<span class="touch label" @click="setQuertType()">默认排序</span> <span class="touch label" @click="setQuertType('')">默认排序</span>
<span v-if="query.type===undefined"> <span v-if="query.type===''">
<i v-if="query.sort" class="el-icon-sort-up touch" /> <i v-if="query.sort" class="el-icon-sort-up touch" />
<i v-else class="el-icon-sort-down touch" /> <i v-else class="el-icon-sort-down touch" />
</span> </span>
...@@ -187,7 +188,7 @@ ...@@ -187,7 +188,7 @@
<el-input v-model="query.minPrice" placeholder="请输入价格(元)" clearable style="width: 140px" /> <el-input v-model="query.minPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
~ ~
<el-input v-model="query.maxPrice" placeholder="请输入价格(元)" clearable style="width: 140px" /> <el-input v-model="query.maxPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
<div class="btn touch">确 定</div> <div class="btn touch" @click="search">确 定</div>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -199,9 +200,10 @@ ...@@ -199,9 +200,10 @@
<img v-if="item.isGood" src="@/assets/home_images/recommend.png" class="stamp" title="推荐" style="top: 10px;right: 8px"> <img v-if="item.isGood" src="@/assets/home_images/recommend.png" class="stamp" title="推荐" style="top: 10px;right: 8px">
<img v-if="item.isHot" src="@/assets/home_images/hot.png" class="stamp" title="热门" style="top: 0;left: 0"> <img v-if="item.isHot" src="@/assets/home_images/hot.png" class="stamp" title="热门" style="top: 0;left: 0">
<el-image <el-image
:src="item.imgSrc?imgSrcStart+'/img'+item.imgSrc:defaultImgProduct" class="touch"
:preview-src-list="item.imgSrcList.length?item.imgSrcList:[defaultImgProduct]" :src="item.imgSrc?imgSrcStart+'/productPic/'+item.imgSrc:defaultImgProduct"
style="width:284px;height: 284px;margin: 0 32px 4px" style="width:284px;height: 284px;margin: 0 32px 4px"
@click="goToDetails(item, '/product/details')"
> >
<div slot="placeholder" class="image-slot">加载中<span class="dot">...</span></div> <div slot="placeholder" class="image-slot">加载中<span class="dot">...</span></div>
</el-image> </el-image>
...@@ -277,12 +279,11 @@ export default { ...@@ -277,12 +279,11 @@ export default {
defaultImgSystem: default_system, defaultImgSystem: default_system,
imgSrcStart: process.env.VUE_APP_BASE_API, imgSrcStart: process.env.VUE_APP_BASE_API,
page: 1, page: 1,
pageSize: 10, pageSize: 12,
total: 33, total: 0,
query: { query: {
keyword: '', supplierId: '',
area: undefined, type: '',
type: undefined,
sort: false sort: false
}, },
mapDom: null, mapDom: null,
...@@ -428,11 +429,22 @@ export default { ...@@ -428,11 +429,22 @@ export default {
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.query.supplierId = this.$route.params.id
this.search()
}) })
}, },
methods: { methods: {
onDictReady(dict) {}, onDictReady(dict) {},
search() {
HttpReq.webClientApi.productGetHardwareList({
page: this.page - 1,
pageSize: this.pageSize,
...this.query
}).then((res) => {
this.productList = res.data.hardwareList.data
this.total = res.data.hardwareList.total
})
},
tabChange(tabIndex) { tabChange(tabIndex) {
if (this.tabIndex === tabIndex) { if (this.tabIndex === tabIndex) {
return return
...@@ -456,6 +468,8 @@ export default { ...@@ -456,6 +468,8 @@ export default {
this.mapDom.resize() this.mapDom.resize()
} }
/* eslint-enable */ /* eslint-enable */
} else {
this.search()
} }
}, },
setQuertType(type) { setQuertType(type) {
...@@ -503,7 +517,7 @@ export default { ...@@ -503,7 +517,7 @@ export default {
} }
}, },
loadData() { loadData() {
this.search()
}, },
goTop() { goTop() {
document.body.scrollTop = 0 document.body.scrollTop = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment