Commit 2b3f44fd authored by zhanglw's avatar zhanglw

成为供应商

parent dfe4197e
......@@ -607,6 +607,33 @@ export const HttpReq = {
return res
})
},
// 短信注册
smsRegistration: function(data) {
return request({
url: '/api/bsw/bigScreen/personalCenter/smsRegistration',
method: 'post',
data: data
}).then((res) => {
return res
})
},
// 填写注册信息--注册成为供应商
supplierRegister: function(data) {
return request({
url: '/api/bsw/bigScreen/personalCenter/supplierRegister',
method: 'post',
data: data
}).then((res) => {
return res
})
},
// 完善供应商信息--根据当前登录用户查询供应商的详细信息
improveSupplierInformation: function(params) {
return request({
url: '/api/bsw/bigScreen/personalCenter/improveSupplierInformation?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
id: null
}
}
......
......@@ -16,6 +16,15 @@
<el-input v-model="formData.title" placeholder="单行输入" class="cell-input" />
</div>
</el-form-item>
<el-form-item v-show="formData.type>=4" label="分类:" class="form-cell" prop="url">
<div class="cell-box">
<el-select v-model="formData.subType" placeholder="请选择">
<el-option label="综合资讯" value="1" />
<el-option label="最新动态" value="2" />
<el-option label="行业要问" value="3" />
</el-select>
</div>
</el-form-item>
<el-form-item v-show="formData.type>=4" label="链接:" class="form-cell" prop="url">
<div class="cell-box">
<el-input v-model="formData.url" placeholder="单行输入" class="cell-input" />
......@@ -108,6 +117,7 @@ export default {
newsPageId: null,
title: '', // 标题
type: '1', // 类型
subType: '1',
source: '', // 来源
content: '', // 内容
picture: '', // 图片
......@@ -196,6 +206,7 @@ export default {
newsPageId: null,
title: '', // 标题
type: '1', // 类型
subType: '1',
source: '', // 来源
content: '', // 内容
picture: '', // 图片
......
......@@ -16,6 +16,15 @@
<el-input v-model="formData.title" disabled placeholder="单行输入" class="cell-input" />
</div>
</el-form-item>
<el-form-item v-show="formData.type>=4" label="分类:" class="form-cell" prop="url">
<div class="cell-box">
<el-select v-model="formData.subType" placeholder="请选择">
<el-option label="综合资讯" value="1" />
<el-option label="最新动态" value="2" />
<el-option label="行业要问" value="3" />
</el-select>
</div>
</el-form-item>
<el-form-item v-show="formData.type>=4" label="链接:" class="form-cell" prop="url">
<div class="cell-box">
<el-input v-model="formData.url" disabled placeholder="单行输入" class="cell-input" />
......@@ -84,6 +93,7 @@ export default {
newsPageId: null,
title: '', // 标题
type: '', // 类型
subType: '1',
source: '', // 来源
content: '', // 内容
picture: '', // 图片
......@@ -172,6 +182,7 @@ export default {
newsPageId: null,
title: '', // 标题
type: '', // 类型
subType: '1',
source: '', // 来源
content: '', // 内容
picture: '', // 图片
......
......@@ -137,7 +137,15 @@ export default {
submitForm() {
this.$refs.formViewRef.validate((valid, obj) => {
if (valid) {
HttpReq.webClientApi.supplierRegister(this.formData).then((res) => {
this.$notify({
title: res.msg,
type: res.code === 200 ? 'success' : 'error'
})
if (res.code === 200) {
this.$router.push({ path: '/console' })
}
})
} else {
this.$message({
message: '表单信息有误,请核对无误后提交!',
......
......@@ -365,6 +365,21 @@ export default {
},
loadData() {
this.findAreaQueryOnly(0, 1, 'provinceOpts')
HttpReq.webClientApi.improveSupplierInformation().then((res) => {
if (res.code === 200) {
this.formData = Object.assign(this.formData, res.data)
if (this.formData.businessLicense) {
this.imgList = this.formData.businessLicense.split(';')
}
this.findAreaQueryOnly(this.formData.registeredAddressProvince, 2, 'cityOpts')
this.findAreaQueryOnly(this.formData.registeredAddressCity, 3, 'countyOpts')
} else {
this.$message({
message: res.msg,
type: 'error'
})
}
})
}
}
}
......
......@@ -276,21 +276,30 @@ export default {
}
if (valid) {
this.loading = true
if (user.rememberMe) {
Cookies.set('username', user.username, { expires: Config.passCookieExpires })
Cookies.set('password', user.password, { expires: Config.passCookieExpires })
Cookies.set('rememberMe', user.rememberMe, { expires: Config.passCookieExpires })
} else {
Cookies.remove('username')
Cookies.remove('password')
Cookies.remove('rememberMe')
}
this.$store.dispatch('Login', user).then(() => {
this.loading = false
this.$router.push({ path: '/console/registerInfo' })
}).catch(() => {
this.loading = false
this.getCode()
HttpReq.webClientApi.smsRegistration(user).then((res) => {
this.$notify({
title: res.msg,
type: 'success',
duration: 2500
})
if (res.code === 200) {
if (user.rememberMe) {
Cookies.set('username', user.username, { expires: Config.passCookieExpires })
Cookies.set('password', user.password, { expires: Config.passCookieExpires })
Cookies.set('rememberMe', user.rememberMe, { expires: Config.passCookieExpires })
} else {
Cookies.remove('username')
Cookies.remove('password')
Cookies.remove('rememberMe')
}
this.$store.dispatch('Login', user).then(() => {
this.loading = false
this.$router.push({ path: '/console/registerInfo' })
}).catch(() => {
this.loading = false
this.getCode()
})
}
})
} else {
console.log('error submit!!')
......
......@@ -160,33 +160,33 @@ export default {
projectObj: {
productId: null,
customerId: null, // 供应商id
enterpriseName: '佛山英沃传感科技有限公司 ', // 供应商名称
productName: 'VIVO1020热能工程压力变送器', // 产品名称
enterpriseName: ' ', // 供应商名称
productName: '', // 产品名称
productType: '1', // 产品大类
productSubType: null, // 产品小类
minPrice: '100', // 价格区间-小
maxPrice: '400', // 价格区间-大
minPrice: '', // 价格区间-小
maxPrice: '', // 价格区间-大
productFeature: null, // 产品特点
productFeatureList: ['精准选型', '操作简单', '测量精准', '性能可靠', '敬酒耐用', '成本低廉 '],
productFeatureList: [],
productPic: '', // 产品图片
productPicList: ['', '', '', '', ''],
productDescribe: '', // 产品描述(富文本)
notes: null, // 其他说明
letterOfCommitment: false, // 交易保障承诺
attributeBrand: '鸿捷', // 属性-品牌
attributeConsumptionCurrent: '消耗电流', // 属性-消耗电流
attributeBrand: '', // 属性-品牌
attributeConsumptionCurrent: '', // 属性-消耗电流
attributeProductName: '', // 属性-产品名称
attributeRatedPower: '额定功率', // 属性-额定功率
attributeModel: '型号', // 属性-型号
attributeReactionTime: '反应时间', // 属性-反应时间
attributeWorkingVoltage: '工作电压', // 属性-工作电压
attributeEncapsulation: '封装', // 属性-封装
attributeQualityAssurance: '质量保证', // 属性-质量保证
attributeProducingArea: '产地', // 属性-产地
attributeNumber: '数量', // 属性-数量
attributeColor: '颜色', // 属性-颜色
attributeApplicableScenarios: '适用场景', // 属性-适用场景
attributeBatchNumber: '批号', // 属性-批号
attributeRatedPower: '', // 属性-额定功率
attributeModel: '', // 属性-型号
attributeReactionTime: '', // 属性-反应时间
attributeWorkingVoltage: '', // 属性-工作电压
attributeEncapsulation: '', // 属性-封装
attributeQualityAssurance: '', // 属性-质量保证
attributeProducingArea: '', // 属性-产地
attributeNumber: '', // 属性-数量
attributeColor: '', // 属性-颜色
attributeApplicableScenarios: '', // 属性-适用场景
attributeBatchNumber: '', // 属性-批号
rank: '1' // 产品品级
},
throttle: null, // 节流器
......
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