Commit 4e6926c0 by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !89
2 parents eb1c83c6 74f5e3b4
<template>
<div class="scrm-main">
<div class="scrm-main" v-loading="loading">
<div v-show="step == 1">
<div class="account-header scrm-flex-between scrm-box-f">
<span>创建子商户/门店</span>
......@@ -105,9 +105,12 @@ export default {
console.log(value)
if (value.length == 11 && !isNaN(value)) {
callback(new Error('登录账户名不可为 11 位纯数字'))
} else {
callback()
}
}
return {
loading: false,
editStatus: false,
nextStatus: false,
accountTypesRule: false,
......@@ -230,10 +233,13 @@ export default {
},
//下一步
handleNext() {
console.log(2222)
this.loading = true
const pm1 = new Promise((resolve, reject) => {
this.$refs.baseInfoForm.$refs.baseForm.validate(valid => {
if (valid) resolve()
else {
this.loading = false
setTimeout(() => {
var isError = document.getElementsByClassName('is-error')
isError[0].querySelector('input').focus()
......@@ -246,6 +252,7 @@ export default {
this.$refs.accountInfoForm.validate(valid => {
if (valid) resolve()
else {
this.loading = false
pm1.then(() => {
document.querySelector('#app').scrollTop = 1000
})
......@@ -257,10 +264,12 @@ export default {
})
})
if (this.accounttypeId.length == 0) {
this.loading = false
this.accountTypesRule = true
return
}
if (this.accountAddForm.merchantType == 1 && this.accountAddForm.merchantOrgcode && !util.checkIdCard(this.accountAddForm.merchantOrgcode)) {
this.loading = false
this.$message.error('请输入正确的身份证号码')
document.querySelector('#app').scrollTop = 0
setTimeout(() => {
......@@ -282,6 +291,7 @@ export default {
if (this.accountAddForm.residentPhone) {
const result = reg.test(this.accountAddForm.residentPhone)
if (!result) {
this.loading = false
this.$message({
message: '请输入正确的驻店信息',
type: 'warning'
......@@ -320,6 +330,7 @@ export default {
Promise.all([pm1, pm2]).then(() => {
this.$apis.store[merchant](params).then(res => {
if (res) {
this.loading = false
this.step = 2
this.nextStatus = true
if (typeof res == 'number') {
......
......@@ -82,6 +82,8 @@ export default {
console.log(value)
if (value.length == 11 && !isNaN(value)) {
callback(new Error('登录账户名不可为 11 位纯数字'))
} else {
callback()
}
}
return {
......
......@@ -64,10 +64,12 @@ export default {
}
this.$apis.baseInfo.merchantInfo(para).then(res => {
this.blocInfo = res
if (res.stores) {
this.storesList = res.stores.map(item => {
item.date = `${this.dateFormat(item.starttime, 'YYYY.MM.DD')}--${this.dateFormat(item.endtime, 'YYYY.MM.DD')}`
return item
})
}
})
},
dateFormat: function(dateTime, format = 'yyyy-MM-dd') {
......
......@@ -5,20 +5,18 @@ const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [
`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`,
`${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`,
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
// 'https://webapi.amap.com/maps?v=1.3&key=bd290dc27d0945959280753215ddda71&plugin=AMap.Geocoder'
]
}
module.exports = {
outputDir: `../dist/${packageName}`,
outputDir: `dist`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
......@@ -37,13 +35,13 @@ module.exports = {
jsonpFunction: `webpackJsonp_${packageName}`
},
externals: {
'vue': 'Vue',
vue: 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'echarts': 'echarts',
'AMap': 'AMap'
vuex: 'Vuex',
axios: 'axios',
echarts: 'echarts',
AMap: 'AMap'
}
},
devServer: {
......@@ -56,8 +54,7 @@ module.exports = {
}
},
chainWebpack: config => {
config.plugin('html')
.tap(args => {
config.plugin('html').tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!