Commit cc80feab by 张立顺

ohter:eslint 格式化问题

1 parent a7307d38
{ {
"name": "dj-car-life-system", "name": "dj-car-life-system",
"version": "0.1.0", "version": "0.1.0",
"private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve --open", "serve": "vue-cli-service serve --open",
"start": "npm run serve", "start": "npm run serve",
......
...@@ -9,7 +9,7 @@ import request from './request' ...@@ -9,7 +9,7 @@ import request from './request'
import RequestMethods from './request.methods' import RequestMethods from './request.methods'
// 用户相关 // 用户相关
const USER_PATH = 'dj.api.' const USER_PATH = 'dj.api.'
// 角色相关 // 角色相关
const ROLE_PATH = 'fims.role.' const ROLE_PATH = 'fims.role.'
export const LOGIN_URL = `${USER_PATH}user.login` export const LOGIN_URL = `${USER_PATH}user.login`
......
...@@ -415,7 +415,7 @@ export const afterTodayOptions = { ...@@ -415,7 +415,7 @@ export const afterTodayOptions = {
// 'N':'不扣水续费' // 'N':'不扣水续费'
// } // }
//财务列表-订单表-表头原始数据 // 财务列表-订单表-表头原始数据
export const orderTableHead = [ export const orderTableHead = [
{ {
name: '序号', name: '序号',
...@@ -465,7 +465,7 @@ export const orderTableHead = [ ...@@ -465,7 +465,7 @@ export const orderTableHead = [
prop: 'orderType', prop: 'orderType',
sort: 21, sort: 21,
formatter: function(row, column) { formatter: function(row, column) {
let orderTypeList = [ const orderTypeList = [
{ {
confId: '1', confId: '1',
confLabel: '正常' confLabel: '正常'
...@@ -487,7 +487,7 @@ export const orderTableHead = [ ...@@ -487,7 +487,7 @@ export const orderTableHead = [
confLabel: '未收款' confLabel: '未收款'
} }
] ]
let o = orderTypeList.find(k => +k.confId === row.orderType) const o = orderTypeList.find(k => +k.confId === row.orderType)
return o ? o.confLabel : '-' return o ? o.confLabel : '-'
} }
} }
...@@ -688,7 +688,7 @@ export const billsTableHead = [ ...@@ -688,7 +688,7 @@ export const billsTableHead = [
prop: 'divisionType', prop: 'divisionType',
sort: 5, sort: 5,
formatter: function(row, column) { formatter: function(row, column) {
let divisionTypeList = [ const divisionTypeList = [
{ {
confId: '1', confId: '1',
confLabel: '线下对账' confLabel: '线下对账'
...@@ -698,7 +698,7 @@ export const billsTableHead = [ ...@@ -698,7 +698,7 @@ export const billsTableHead = [
confLabel: '线上分账' confLabel: '线上分账'
} }
] ]
let o = divisionTypeList.find(k => { const o = divisionTypeList.find(k => {
return k.confId == row.divisionType return k.confId == row.divisionType
}) })
return o ? o.confLabel : '-' return o ? o.confLabel : '-'
...@@ -720,7 +720,7 @@ export const billsTableHead = [ ...@@ -720,7 +720,7 @@ export const billsTableHead = [
prop: 'odDivisionStatus', prop: 'odDivisionStatus',
sort: 19, sort: 19,
formatter: function(row, column) { formatter: function(row, column) {
let ODDIVISIONSTATUS = { const ODDIVISIONSTATUS = {
1: '待分账', 1: '待分账',
2: '分账中', 2: '分账中',
3: '分账成功', 3: '分账成功',
...@@ -737,7 +737,7 @@ export const billsTableHead = [ ...@@ -737,7 +737,7 @@ export const billsTableHead = [
prop: 'deductChargeFlag', prop: 'deductChargeFlag',
sort: 20, sort: 20,
formatter: function(row, column) { formatter: function(row, column) {
let DEDUCTCHARGEFLAG = { const DEDUCTCHARGEFLAG = {
Y: '扣除手续费(按0.6%的标准)', Y: '扣除手续费(按0.6%的标准)',
N: '不扣水续费' N: '不扣水续费'
} }
......
import Vue from 'vue' // import Vue from 'vue'
import { Message, MessageBox, Loading } from 'element-ui'; import { Message, MessageBox, Loading } from 'element-ui'
import moment from 'moment' import moment from 'moment'
let loadingInstance = '' let loadingInstance = ''
export const Util = { export const Util = {
/** /**
* 简单alert * 简单alert
* title 标题 * title 标题
...@@ -31,14 +30,14 @@ export const Util = { ...@@ -31,14 +30,14 @@ export const Util = {
callback: function(action, done) { callback: function(action, done) {
if (action == 'confirm') { if (action == 'confirm') {
if (options.success) { if (options.success) {
(options.success)(done) options.success(done)
} }
} else { } else {
console.log(done); console.log(done)
// done() // done()
} }
} }
}); })
/* Vue.$vux.alert.show({ /* Vue.$vux.alert.show({
title: options.title||'', title: options.title||'',
...@@ -61,8 +60,7 @@ export const Util = { ...@@ -61,8 +60,7 @@ export const Util = {
type: options.type || 'error', type: options.type || 'error',
duration: options.time || 2000, duration: options.time || 2000,
onClose: options.onClose || '' onClose: options.onClose || ''
}); })
}, },
/** /**
...@@ -83,108 +81,110 @@ export const Util = { ...@@ -83,108 +81,110 @@ export const Util = {
loading: function(message) { loading: function(message) {
loadingInstance = Loading.service({ loadingInstance = Loading.service({
text: message || '加载中...' text: message || '加载中...'
}); })
}, },
/** /**
* 关闭loading * 关闭loading
*/ */
closeLoading: function() { closeLoading: function() {
loadingInstance.close(); loadingInstance.close()
}, },
/** /**
* 校验手机号码格式 * 校验手机号码格式
*/ */
checkPhone: function(mobile) { checkPhone: function(mobile) {
let myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/; const myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile); return myreg.test(mobile)
}, },
/** /**
* 校验固定电话 * 校验固定电话
*/ */
validationTel: function(tel) { validationTel: function(tel) {
let reg = /^0[\d]{2,3}-[\d]{7,8}$/; const reg = /^0[\d]{2,3}-[\d]{7,8}$/
return reg.test(tel); return reg.test(tel)
}, },
/** /**
* 是否特殊字符 * 是否特殊字符
*/ */
isSpecialLetter: function(str) { isSpecialLetter: function(str) {
let reg = new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"); const reg = new RegExp(
return reg.test(str); "[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"
)
return reg.test(str)
}, },
/** /**
* 只能输入英文字母和数字,不能输入中文 * 只能输入英文字母和数字,不能输入中文
*/ */
validationInput: function(str) { validationInput: function(str) {
let reg = /[^\w\.\/]/ig; const reg = /[^\w\.\/]/gi
return reg.test(str); return reg.test(str)
}, },
/** /**
* 获取当前时间 * 获取当前时间
*/ */
getCurrentDate: function() { getCurrentDate: function() {
let time = new Date(); const time = new Date()
let y = time.getFullYear(); const y = time.getFullYear()
let m = time.getMonth() + 1; const m = time.getMonth() + 1
let d = time.getDate(); const d = time.getDate()
return { return {
date: y + '/' + m + '/' + d date: y + '/' + m + '/' + d
} }
}, },
/** /**
   * 获取浏览器参数 * 获取浏览器参数
   */ */
  getUrlParams: function(name) { getUrlParams: function(name) {
    let vars = [], const vars = []
      hash; let hash
      let oParams = {}; const oParams = {}
    let hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); const hashes = window.location.href
    for (let i = 0; i < hashes.length; i++) { .slice(window.location.href.indexOf('?') + 1)
      hash = hashes[i].split('='); .split('&')
      vars.push(hash[0]); for (let i = 0; i < hashes.length; i++) {
      oParams[hash[0]] = hash[1]; hash = hashes[i].split('=')
    } vars.push(hash[0])
    console.log(vars); oParams[hash[0]] = hash[1]
    if(name){ }
      return oParams[name]; console.log(vars)
    }else{ if (name) {
      return oParams; return oParams[name]
    } } else {
  }, return oParams
}
},
/** /**
* 根据当前时间,计算往后30天的日期 * 根据当前时间,计算往后30天的日期
*/ */
getAfterDate: function(day) { getAfterDate: function(day) {
let date1 = new Date(); const date1 = new Date()
let date2 = new Date(date1); const date2 = new Date(date1)
let time = 30; let time = 30
if (day) { if (day) {
time = day; time = day
} }
date2.setDate(date1.getDate() + time); date2.setDate(date1.getDate() + time)
let _date = date2.getFullYear() + '-' + (date2.getMonth() + 1) + '-' + date2.getDate(); const _date =
date2.getFullYear() + '-' + (date2.getMonth() + 1) + '-' + date2.getDate()
return { return {
date: _date, date: _date,
year: date2.getFullYear(), year: date2.getFullYear(),
month: date2.getMonth() + 1, month: date2.getMonth() + 1,
day: date2.getDate() day: date2.getDate()
}; }
}, },
/** /**
* 日期格式转换 * 日期格式转换
*/ */
...@@ -223,7 +223,7 @@ export const Util = { ...@@ -223,7 +223,7 @@ export const Util = {
* console.log(bar===foo) false * console.log(bar===foo) false
* @param {*} obj * @param {*} obj
*/ */
deepClone: function (obj) { deepClone: function(obj) {
// Handle the 3 simple types, and null or undefined or function // Handle the 3 simple types, and null or undefined or function
if (obj == null || typeof obj !== 'object') return obj if (obj == null || typeof obj !== 'object') return obj
// Handle Date // Handle Date
...@@ -243,8 +243,7 @@ export const Util = { ...@@ -243,8 +243,7 @@ export const Util = {
return copy return copy
} }
throw new Error("Unable to clone obj! Its type isn't supported.") throw new Error("Unable to clone obj! Its type isn't supported.")
}, }
} }
export const showModal = Util.msg export const showModal = Util.msg
......
...@@ -17,50 +17,50 @@ export default { ...@@ -17,50 +17,50 @@ export default {
props: { props: {
show: { show: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
title: { title: {
type: String, type: String,
default: '提示', default: '提示'
}, },
width: { width: {
type: String, type: String,
default: '46%', default: '46%'
}, },
cancel: { cancel: {
required: false, required: false,
type: Function, type: Function
}, },
confirm: { confirm: {
required: false, required: false,
type: Function, type: Function
}, },
usefooter: { usefooter: {
required: false, required: false,
type: Boolean, type: Boolean,
default: false, default: false
}, },
appendtobody: { appendtobody: {
required: false, required: false,
type: Boolean, type: Boolean,
default: false, default: false
}, }
}, },
data() { data() {
return { return {
hasFooter: false, hasFooter: false
} }
}, },
created() { created() {
let o = this.$slots const o = this.$slots
this.hasFooter = o.footer this.hasFooter = o.footer
}, },
mounted: function () {}, mounted: function() {},
methods: { methods: {
/** /**
* 取消关闭弹框 * 取消关闭弹框
*/ */
onCancel: function () { onCancel: function() {
// 兼容以前的页面 // 兼容以前的页面
this.$emit('close') this.$emit('close')
}, },
...@@ -68,8 +68,8 @@ export default { ...@@ -68,8 +68,8 @@ export default {
/** /**
* 确定 * 确定
*/ */
onConfirm: function () {}, onConfirm: function() {}
}, }
} }
</script> </script>
......
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
} }
) )
.then(() => { .then(() => {
const reload = async () => { const reload = async() => {
localStorage.clear() localStorage.clear()
await this.logout() await this.logout()
this.$store.commit('d2admin/gray/set', false) this.$store.commit('d2admin/gray/set', false)
...@@ -161,7 +161,7 @@ export default { ...@@ -161,7 +161,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(async () => { .then(async() => {
await this.$store.commit('d2admin/gray/set', false) await this.$store.commit('d2admin/gray/set', false)
resolve(true) resolve(true)
}) })
......
...@@ -9,7 +9,7 @@ const COOKIE_NAME_PREFIX = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env. ...@@ -9,7 +9,7 @@ const COOKIE_NAME_PREFIX = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.
* @param {Object} setting cookie setting * @param {Object} setting cookie setting
*/ */
cookies.set = function(name = 'default', value = '', cookieSetting = {}) { cookies.set = function(name = 'default', value = '', cookieSetting = {}) {
let currentCookieSetting = { const currentCookieSetting = {
expires: 1 expires: 1
} }
Object.assign(currentCookieSetting, cookieSetting) Object.assign(currentCookieSetting, cookieSetting)
......
...@@ -13,7 +13,7 @@ const util = { ...@@ -13,7 +13,7 @@ const util = {
* @description 更新标题 * @description 更新标题
* @param {String} title 标题 * @param {String} title 标题
*/ */
util.title = function (titleText) { util.title = function(titleText) {
const processTitle = process.env.VUE_APP_TITLE const processTitle = process.env.VUE_APP_TITLE
window.document.title = `${processTitle}${titleText ? ` | ${titleText}` : ''}` window.document.title = `${processTitle}${titleText ? ` | ${titleText}` : ''}`
} }
...@@ -22,7 +22,7 @@ util.title = function (titleText) { ...@@ -22,7 +22,7 @@ util.title = function (titleText) {
* @description 打开新页面 * @description 打开新页面
* @param {String} url 地址 * @param {String} url 地址
*/ */
util.open = function (url, target) { util.open = function(url, target) {
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('href', url) a.setAttribute('href', url)
a.setAttribute('target', target || '_blank') a.setAttribute('target', target || '_blank')
...@@ -64,9 +64,9 @@ util.deepClone = (obj) => { ...@@ -64,9 +64,9 @@ util.deepClone = (obj) => {
* @param {Function} condition 回调函数,必须返回谓词,判断是否找到了。会传入(item, index, level)三个参数 * @param {Function} condition 回调函数,必须返回谓词,判断是否找到了。会传入(item, index, level)三个参数
* @param {String} children 子数组的key * @param {String} children 子数组的key
*/ */
util.deepFind = function (menus, id) { util.deepFind = function(menus, id) {
const cloneMenus = util.deepClone(menus) const cloneMenus = util.deepClone(menus)
for (let menu of cloneMenus) { for (const menu of cloneMenus) {
if (menu.id === id) { if (menu.id === id) {
delete menu.children delete menu.children
return menu return menu
...@@ -112,7 +112,7 @@ util.colorToRgb = (sColor, alpha) => { ...@@ -112,7 +112,7 @@ util.colorToRgb = (sColor, alpha) => {
* 重置form * 重置form
* 用法: util.resetForm.call(this,'formName') * 用法: util.resetForm.call(this,'formName')
*/ */
util.resetForm = function (formName) { util.resetForm = function(formName) {
this.$nextTick(() => { this.$nextTick(() => {
for (var key in this[formName]) { for (var key in this[formName]) {
if (this[formName].hasOwnProperty(key)) { if (this[formName].hasOwnProperty(key)) {
...@@ -127,7 +127,7 @@ util.resetForm = function (formName) { ...@@ -127,7 +127,7 @@ util.resetForm = function (formName) {
* 格式化时间 * 格式化时间
* @param {Array} time * @param {Array} time
*/ */
util.formatTime = function (time) { util.formatTime = function(time) {
return { return {
startTime: time ? time[0] + ' ' + '00:00:00' : '', startTime: time ? time[0] + ' ' + '00:00:00' : '',
endTime: time ? time[1] + ' ' + '23:59:59' : '' endTime: time ? time[1] + ' ' + '23:59:59' : ''
......
...@@ -11,12 +11,12 @@ const userInfo = JSON.parse(unescape(sessionStorage.getItem(SESSION_NAME))) || { ...@@ -11,12 +11,12 @@ const userInfo = JSON.parse(unescape(sessionStorage.getItem(SESSION_NAME))) || {
const INDEX_PATH = userInfo ? (userInfo.detail.accountType !== 7 ? '/index' : '/onlineAccountList') : '/index' const INDEX_PATH = userInfo ? (userInfo.detail.accountType !== 7 ? '/index' : '/onlineAccountList') : '/index'
const defaultPage = userInfo ? (userInfo.detail.accountType !== 7 ? home : localRoutes['90503']) : home const defaultPage = userInfo ? (userInfo.detail.accountType !== 7 ? home : localRoutes['90503']) : home
defaultPage.fullPath = INDEX_PATH defaultPage.fullPath = INDEX_PATH
// 判定是否需要缓存 // 判定是否需要缓存
const isKeepAlive = data => _.get(data, 'meta.cache', false) const isKeepAlive = data => _.get(data, 'meta.cache', false)
// const setIcon = meta => { // const setIcon = meta => {
// console.log(meta) // console.log(meta)
// return (meta.icon = localRoutes[meta.authId].icon) // return (meta.icon = localRoutes[meta.authId].icon)
// } // }
export default { export default {
namespaced: true, namespaced: true,
......
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
load({ state, commit, dispatch }) { load({ state, commit, dispatch }) {
return new Promise(async resolve => { return new Promise(async resolve => {
// store 赋值 // store 赋值
let activeName = await dispatch('d2admin/db/get', { const activeName = await dispatch('d2admin/db/get', {
dbName: 'sys', dbName: 'sys',
path: 'theme.activeName', path: 'theme.activeName',
defaultValue: state.list[0].name, defaultValue: state.list[0].name,
......
...@@ -92,8 +92,8 @@ import * as api from '@api/finance' ...@@ -92,8 +92,8 @@ import * as api from '@api/finance'
import { getMerchantPageSearch } from '@api/publicAccount' import { getMerchantPageSearch } from '@api/publicAccount'
export default { export default {
name: 'downloadAccountDialog', name: 'downloadAccountDialog',
data () { data() {
let validateLonlat = (rule, value, callback) => { const validateLonlat = (rule, value, callback) => {
if (value) { if (value) {
if (!this.infoForm.payEndDate) { if (!this.infoForm.payEndDate) {
callback(new Error('请选择结束日期')) callback(new Error('请选择结束日期'))
...@@ -214,19 +214,19 @@ export default { ...@@ -214,19 +214,19 @@ export default {
// } // }
}, },
created () { created() {
// this.$nextTick(() => { // this.$nextTick(() => {
// this.$refs.accountForm.resetFields(); // this.$refs.accountForm.resetFields();
// }) // })
}, },
components: {}, components: {},
mounted () { mounted() {
this.selectMerchant() this.selectMerchant()
}, },
methods: { methods: {
selectMerchant () { selectMerchant() {
var params = {} var params = {}
params.currentPage = 1 params.currentPage = 1
params.pageSize = 1000 params.pageSize = 1000
...@@ -245,26 +245,26 @@ export default { ...@@ -245,26 +245,26 @@ export default {
}) })
}, },
clickMerchantType (e) { clickMerchantType(e) {
e === this.infoForm.merchantType e === this.infoForm.merchantType
? (this.infoForm.merchantType = '') ? (this.infoForm.merchantType = '')
: (this.infoForm.merchantType = e) : (this.infoForm.merchantType = e)
console.log(this.infoForm.merchantType) console.log(this.infoForm.merchantType)
}, },
changeType () { changeType() {
this.infoForm.merchant = [] this.infoForm.merchant = []
// this.baseData.merchantList = [] // this.baseData.merchantList = []
this.selectMerchant() this.selectMerchant()
}, },
changeStartDate () { changeStartDate() {
if (this.infoForm.payEndDate) { if (this.infoForm.payEndDate) {
this.infoForm.payEndDate = '' this.infoForm.payEndDate = ''
} }
}, },
remoteMethod (query) { remoteMethod(query) {
// if (query !== '') { // if (query !== '') {
this.selectLoading = true this.selectLoading = true
var params = {} var params = {}
...@@ -284,7 +284,7 @@ export default { ...@@ -284,7 +284,7 @@ export default {
// } // }
}, },
handleAddConfirm () { handleAddConfirm() {
// console.log(this.infoForm.remark) // console.log(this.infoForm.remark)
console.log(this.infoForm) console.log(this.infoForm)
// this.handleClose() // this.handleClose()
...@@ -316,7 +316,7 @@ export default { ...@@ -316,7 +316,7 @@ export default {
}) })
}, },
handleClose () { handleClose() {
this.$emit('accountClose', true) this.$emit('accountClose', true)
} }
} }
......
...@@ -430,7 +430,7 @@ export default { ...@@ -430,7 +430,7 @@ export default {
downloadAccountDialog downloadAccountDialog
}, },
data () { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
isSubOrder: false, isSubOrder: false,
...@@ -575,7 +575,7 @@ export default { ...@@ -575,7 +575,7 @@ export default {
} }
}, },
mounted () { mounted() {
// console.log(document.getElementById('financeChart')) // console.log(document.getElementById('financeChart'))
if (this.userInfo.beSuper) { if (this.userInfo.beSuper) {
getParkStore({}).then(res => { getParkStore({}).then(res => {
...@@ -602,14 +602,14 @@ export default { ...@@ -602,14 +602,14 @@ export default {
this.getTotal() this.getTotal()
}, },
watch: { watch: {
summaryDate (newValue) { summaryDate(newValue) {
this.getSummary() this.getSummary()
} }
}, },
methods: { methods: {
...mapActions({ close: 'd2admin/page/close' }), ...mapActions({ close: 'd2admin/page/close' }),
handleAddClose (isRefresh = false) { }, handleAddClose(isRefresh = false) { },
drawFunnelChart () { drawFunnelChart() {
// console.log(funnelOption) // console.log(funnelOption)
getTransferData({}).then(res => { getTransferData({}).then(res => {
funnelOption.series[0].data[0].tooltipValue = res.totalCustomerNums funnelOption.series[0].data[0].tooltipValue = res.totalCustomerNums
...@@ -621,7 +621,7 @@ export default { ...@@ -621,7 +621,7 @@ export default {
this.financeChart.setOption(funnelOption) this.financeChart.setOption(funnelOption)
}) })
}, },
handleReset () { handleReset() {
this.searchForm = { this.searchForm = {
time: '', time: '',
yqMerchantId: '', yqMerchantId: '',
...@@ -643,7 +643,7 @@ export default { ...@@ -643,7 +643,7 @@ export default {
this.getOptionsList() this.getOptionsList()
}, },
// 导出 // 导出
handleExport () { handleExport() {
var params = this.getParams() var params = this.getParams()
params.pageNum = 1 params.pageNum = 1
api.exportFile(params).then(res => { api.exportFile(params).then(res => {
...@@ -651,12 +651,12 @@ export default { ...@@ -651,12 +651,12 @@ export default {
this.$open(res) this.$open(res)
}) })
}, },
//下载对账单 // 下载对账单
downloadAccount () { downloadAccount() {
this.accountVisible = !this.accountVisible this.accountVisible = !this.accountVisible
}, },
// 查看明细 // 查看明细
handleDetail (data) { handleDetail(data) {
this.close({ tagName: '/financeDetail' }) this.close({ tagName: '/financeDetail' })
this.$router.push({ this.$router.push({
name: 'financeDetail', name: 'financeDetail',
...@@ -666,7 +666,7 @@ export default { ...@@ -666,7 +666,7 @@ export default {
}) })
}, },
getServiceStore (merchantId) { getServiceStore(merchantId) {
getServiceStore({ getServiceStore({
yqMerchantId: merchantId yqMerchantId: merchantId
}).then(res => { }).then(res => {
...@@ -675,7 +675,7 @@ export default { ...@@ -675,7 +675,7 @@ export default {
}) })
}, },
getOptionsList () { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if ( if (
...@@ -697,7 +697,7 @@ export default { ...@@ -697,7 +697,7 @@ export default {
} }
}) })
}, },
getSummary () { getSummary() {
api api
.getSummary({ .getSummary({
beginDateStr: this.summaryDate beginDateStr: this.summaryDate
...@@ -715,10 +715,10 @@ export default { ...@@ -715,10 +715,10 @@ export default {
this.summayData = res this.summayData = res
}) })
}, },
keyDowmGetList () { keyDowmGetList() {
this.getList() this.getList()
}, },
getList () { getList() {
var params = this.getParams() var params = this.getParams()
params = { params = {
...this.page, ...this.page,
...@@ -750,7 +750,7 @@ export default { ...@@ -750,7 +750,7 @@ export default {
this.total = res.total this.total = res.total
}) })
}, },
numAddPrefix (item) { numAddPrefix(item) {
const moneyLabels = [ const moneyLabels = [
'goodsCost', 'goodsCost',
'totalPrice', 'totalPrice',
...@@ -777,7 +777,7 @@ export default { ...@@ -777,7 +777,7 @@ export default {
} }
return item return item
}, },
getSelectInputParams () { getSelectInputParams() {
const list = Object.keys(this.searchSelectObj) const list = Object.keys(this.searchSelectObj)
var params = {} var params = {}
list.forEach(i => { list.forEach(i => {
...@@ -786,7 +786,7 @@ export default { ...@@ -786,7 +786,7 @@ export default {
}) })
return params return params
}, },
getParams () { getParams() {
var params = this.getSelectInputParams() var params = this.getSelectInputParams()
if (this.searchForm.yqMerchantId) { if (this.searchForm.yqMerchantId) {
params.yqMerchantId = this.searchForm.yqMerchantId params.yqMerchantId = this.searchForm.yqMerchantId
...@@ -814,29 +814,29 @@ export default { ...@@ -814,29 +814,29 @@ export default {
// } // }
return params return params
}, },
getTotal () { getTotal() {
api.getListTotal(this.getParams()).then(res => { api.getListTotal(this.getParams()).then(res => {
this.totalObj = res this.totalObj = res
}) })
}, },
handleSearch () { handleSearch() {
this.page.pageNum = 1 this.page.pageNum = 1
this.getList() this.getList()
this.getTotal() this.getTotal()
}, },
// 每页条数 // 每页条数
handleSizeChange (value) { handleSizeChange(value) {
this.page.pageSize = value this.page.pageSize = value
this.getList() this.getList()
}, },
// 页码 // 页码
handleCurrentChange (value) { handleCurrentChange(value) {
this.page.pageNum = value this.page.pageNum = value
this.getList() this.getList()
}, },
accountClose (isRefresh) { accountClose(isRefresh) {
this.accountVisible = !this.accountVisible this.accountVisible = !this.accountVisible
// isRefresh && this.handleSearch() // isRefresh && this.handleSearch()
} }
......
...@@ -436,7 +436,7 @@ export default { ...@@ -436,7 +436,7 @@ export default {
pageSize: 20 pageSize: 20
}, },
payTypeOpts: { payTypeOpts: {
'1':'微信支付', '1': '微信支付',
'2': '4S店支付', '2': '4S店支付',
'3': 'POS机收款' '3': 'POS机收款'
}, },
......
...@@ -33,8 +33,8 @@ const customTransOption = { ...@@ -33,8 +33,8 @@ const customTransOption = {
show: false show: false
}, },
axisLabel: { axisLabel: {
//interval: 0, // interval: 0,
//rotate: 45 // rotate: 45
}, },
offset: 10 offset: 10
}, },
...@@ -53,17 +53,17 @@ const customTransOption = { ...@@ -53,17 +53,17 @@ const customTransOption = {
{ {
name: '客户到店', name: '客户到店',
type: 'line', type: 'line',
//stack: '总量', // stack: '总量',
itemStyle: { itemStyle: {
color: '#0947C6' color: '#0947C6'
}, },
data: [120, 132, 101, 134, 90, 230, 210], data: [120, 132, 101, 134, 90, 230, 210]
}, },
{ {
name: '客户转化', name: '客户转化',
type: 'line', type: 'line',
//stack: '总量', // stack: '总量',
itemStyle: { itemStyle: {
color: '#2B9AFF' color: '#2B9AFF'
}, },
......
export function debounce(func, wait, immediate) { export function debounce(func, wait, immediate) {
let timeout, args, context, timestamp, result; let timeout, args, context, timestamp, result
const later = function () { const later = function() {
// 据上一次触发时间间隔 // 据上一次触发时间间隔
const last = +new Date() - timestamp; const last = +new Date() - timestamp
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
if (last < wait && last > 0) { if (last < wait && last > 0) {
timeout = setTimeout(later, wait - last); timeout = setTimeout(later, wait - last)
} else { } else {
timeout = null; timeout = null
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用 // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
if (!immediate) { if (!immediate) {
result = func.apply(context, args); result = func.apply(context, args)
if (!timeout) context = args = null; if (!timeout) context = args = null
}
} }
} }
};
return function (...args) { return function(...args) {
context = this; context = this
timestamp = +new Date(); timestamp = +new Date()
const callNow = immediate && !timeout; const callNow = immediate && !timeout
// 如果延时不存在,重新设定延时 // 如果延时不存在,重新设定延时
if (!timeout) timeout = setTimeout(later, wait); if (!timeout) timeout = setTimeout(later, wait)
if (callNow) { if (callNow) {
result = func.apply(context, args); result = func.apply(context, args)
context = args = null; context = args = null
} }
return result; return result
}; }
} }
...@@ -32,8 +32,8 @@ const incomeFlowOption = { ...@@ -32,8 +32,8 @@ const incomeFlowOption = {
show: false show: false
}, },
axisLabel: { axisLabel: {
//interval: 0, // interval: 0,
//rotate: 45 // rotate: 45
}, },
offset: 10 offset: 10
}, },
...@@ -57,8 +57,8 @@ const incomeFlowOption = { ...@@ -57,8 +57,8 @@ const incomeFlowOption = {
color: '#0947C6' color: '#0947C6'
}, },
data: [120, 132, 101, 134, 90, 230, 210], data: [120, 132, 101, 134, 90, 230, 210],
smooth: true, smooth: true
}, }
/* { /* {
name: '支出', name: '支出',
type: 'line', type: 'line',
......
const incomeProductOption = { const incomeProductOption = {
color: ['rgba(9,71,198,0.8)', 'rgba(255,178,25,1)','rgba(255,178,25,0.8)','rgba(0,157,255,1)', 'rgba(0,157,255,0.8)', 'rgba(0,157,255,0.6)', 'rgba(0,228,115,1)','rgba(0,228,115,0.8)'], color: ['rgba(9,71,198,0.8)', 'rgba(255,178,25,1)', 'rgba(255,178,25,0.8)', 'rgba(0,157,255,1)', 'rgba(0,157,255,0.8)', 'rgba(0,157,255,0.6)', 'rgba(0,228,115,1)', 'rgba(0,228,115,0.8)'],
title: { title: {
text: '累计收入\n555555元', text: '累计收入\n555555元',
top: '50%', top: '50%',
...@@ -27,8 +27,8 @@ const incomeProductOption = { ...@@ -27,8 +27,8 @@ const incomeProductOption = {
avoidLabelOverlap: true, avoidLabelOverlap: true,
radius: ['40%', '60%'], radius: ['40%', '60%'],
center: ['50%', '60%'], center: ['50%', '60%'],
label:{ label: {
show: false, show: false
/* align: 'left', /* align: 'left',
normal:{ normal:{
formatter(v) { formatter(v) {
...@@ -58,23 +58,23 @@ const incomeProductOption = { ...@@ -58,23 +58,23 @@ const incomeProductOption = {
] ]
} }
function insertBr(text) { function insertBr(text) {
if(text.length <= 8){ if (text.length <= 8) {
return text; return text
}else if(text.length > 8 && text.length <= 16){ } else if (text.length > 8 && text.length <= 16) {
return text = `${text.slice(0,8)}\n${text.slice(8)}\n` return text = `${text.slice(0, 8)}\n${text.slice(8)}\n`
}else if(text.length > 16 && text.length <= 24){ } else if (text.length > 16 && text.length <= 24) {
return text = `${text.slice(0,8)}\n${text.slice(8,16)}\n${text.slice(16)}\n` return text = `${text.slice(0, 8)}\n${text.slice(8, 16)}\n${text.slice(16)}\n`
}else if(text.length > 24 && text.length <= 30){ } else if (text.length > 24 && text.length <= 30) {
return text = `${text.slice(0,8)}\n${text.slice(8,16)}\n${text.slice(16,24)}\n${text.slice(24)}\n` return text = `${text.slice(0, 8)}\n${text.slice(8, 16)}\n${text.slice(16, 24)}\n${text.slice(24)}\n`
}else if(text.length > 30){ } else if (text.length > 30) {
return text = `${text.slice(0,8)}\n${text.slice(8,16)}\n${text.slice(16,24)}\n${text.slice(24,30)}\n${text.slice(30)}\n` return text = `${text.slice(0, 8)}\n${text.slice(8, 16)}\n${text.slice(16, 24)}\n${text.slice(24, 30)}\n${text.slice(30)}\n`
} }
} }
function insertTooltipBr(text) { function insertTooltipBr(text) {
if(text.length <= 30){ if (text.length <= 30) {
return text; return text
}else if(text.length > 30){ } else if (text.length > 30) {
return text = `${text.slice(0,30)}</br>${text.slice(30)}` return text = `${text.slice(0, 30)}</br>${text.slice(30)}`
} }
} }
export default incomeProductOption export default incomeProductOption
const storeFlowOption = { const storeFlowOption = {
color: ['rgba(9,71,198,1)', 'rgba(9,71,198,0.8)', 'rgba(9,71,198,0.6)','rgba(9,71,198,0.4)','rgba(9,71,198,0.3)'], color: ['rgba(9,71,198,1)', 'rgba(9,71,198,0.8)', 'rgba(9,71,198,0.6)', 'rgba(9,71,198,0.4)', 'rgba(9,71,198,0.3)'],
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
//formatter: '{a} <br/>{b} : {c} ({d}%)', // formatter: '{a} <br/>{b} : {c} ({d}%)',
formatter: (params) => { formatter: (params) => {
return `${insertTooltipBr(params.name)} : ${params.value}(${params.percent}%)` return `${insertTooltipBr(params.name)} : ${params.value}(${params.percent}%)`
}, },
...@@ -13,9 +13,9 @@ const storeFlowOption = { ...@@ -13,9 +13,9 @@ const storeFlowOption = {
orient: 'vertical', orient: 'vertical',
right: 0, right: 0,
data: [], data: [],
formatter: function (name) { formatter: function(name) {
if(name.length>8) { if (name.length > 8) {
return name.substr(0,8)+'...' return name.substr(0, 8) + '...'
} }
return name return name
}, },
...@@ -34,8 +34,8 @@ const storeFlowOption = { ...@@ -34,8 +34,8 @@ const storeFlowOption = {
avoidLabelOverlap: true, avoidLabelOverlap: true,
radius: '50%', radius: '50%',
center: ['40%', '65%'], center: ['40%', '65%'],
label:{ label: {
show:false, show: false
/* align: 'left', /* align: 'left',
normal:{ normal:{
formatter(v) { formatter(v) {
...@@ -50,12 +50,12 @@ const storeFlowOption = { ...@@ -50,12 +50,12 @@ const storeFlowOption = {
data: [ data: [
{ {
value: 335, value: 335,
name: '直接访问', name: '直接访问'
}, },
{ {
value: 335, value: 335,
name: '直接访问', name: '直接访问'
}, },
{ {
...@@ -63,8 +63,8 @@ const storeFlowOption = { ...@@ -63,8 +63,8 @@ const storeFlowOption = {
name: '直接访问', name: '直接访问',
itemStyle: { itemStyle: {
color: 'rgba(9,71,198,0.6)' color: 'rgba(9,71,198,0.6)'
}, }
}, }
], ],
emphasis: { emphasis: {
itemStyle: { itemStyle: {
...@@ -78,24 +78,24 @@ const storeFlowOption = { ...@@ -78,24 +78,24 @@ const storeFlowOption = {
} }
function insertBr(text) { function insertBr(text) {
if(text.length <= 8){ if (text.length <= 8) {
return text; return text
}else if(text.length > 8 && text.length <= 16){ } else if (text.length > 8 && text.length <= 16) {
return text = `${text.slice(0,8)}\n${text.slice(8)}\n` return text = `${text.slice(0, 8)}\n${text.slice(8)}\n`
}else if(text.length > 16 && text.length <= 24){ } else if (text.length > 16 && text.length <= 24) {
return text = `${text.slice(0,8)}\n${text.slice(8,16)}\n${text.slice(16)}\n` return text = `${text.slice(0, 8)}\n${text.slice(8, 16)}\n${text.slice(16)}\n`
}else if(text.length > 24 && text.length <= 30){ } else if (text.length > 24 && text.length <= 30) {
return text = `${text.slice(0,8)}\n${text.slice(8,16)}\n${text.slice(16,24)}\n${text.slice(24)}\n` return text = `${text.slice(0, 8)}\n${text.slice(8, 16)}\n${text.slice(16, 24)}\n${text.slice(24)}\n`
}else if(text.length > 30){ } else if (text.length > 30) {
return text = `${text.slice(0,8)}\n${text.slice(8,16)}\n${text.slice(16,24)}\n${text.slice(24,30)}\n${text.slice(30)}\n` return text = `${text.slice(0, 8)}\n${text.slice(8, 16)}\n${text.slice(16, 24)}\n${text.slice(24, 30)}\n${text.slice(30)}\n`
} }
} }
function insertTooltipBr(text) { function insertTooltipBr(text) {
if(text.length <= 30){ if (text.length <= 30) {
return text; return text
}else if(text.length > 30){ } else if (text.length > 30) {
return text = `${text.slice(0,30)}</br>${text.slice(30)}` return text = `${text.slice(0, 30)}</br>${text.slice(30)}`
} }
} }
......
...@@ -244,8 +244,8 @@ export default { ...@@ -244,8 +244,8 @@ export default {
// 注意 这里的演示没有传验证码 // 注意 这里的演示没有传验证码
// 具体需要传递的数据请自行修改代码 // 具体需要传递的数据请自行修改代码
this.login(_p) this.login(_p)
.then(async ({ isMutiAccount, accountInfo, userInfo }) => { .then(async({ isMutiAccount, accountInfo, userInfo }) => {
if(isMutiAccount) { if (isMutiAccount) {
this.isMutiAccount = isMutiAccount this.isMutiAccount = isMutiAccount
this.accountInfo = accountInfo this.accountInfo = accountInfo
this.loginToken = accountInfo.loginToken this.loginToken = accountInfo.loginToken
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
import { getDetailApi } from '@api/publicAccount' import { getDetailApi } from '@api/publicAccount'
export default { export default {
name: 'accountDetail', name: 'accountDetail',
data () { data() {
return { return {
detailForm: {}, detailForm: {},
// 图片对于字段 // 图片对于字段
...@@ -200,7 +200,7 @@ export default { ...@@ -200,7 +200,7 @@ export default {
}, },
watch: { watch: {
accountDetailVisible (newVal) { accountDetailVisible(newVal) {
if (newVal) { if (newVal) {
this.merchantId = this.merchantRow.merchantId this.merchantId = this.merchantRow.merchantId
this.getDetail() this.getDetail()
...@@ -208,13 +208,13 @@ export default { ...@@ -208,13 +208,13 @@ export default {
} }
}, },
mounted () { mounted() {
this.merchantId = this.merchantRow.merchantId this.merchantId = this.merchantRow.merchantId
this.getDetail() this.getDetail()
}, },
methods: { methods: {
getDetail () { getDetail() {
getDetailApi({ merchantId: this.merchantId }).then(res => { getDetailApi({ merchantId: this.merchantId }).then(res => {
// console.log(res) // console.log(res)
this.currentPage = res.yseMerchantInfo ? res.yseMerchantInfo.custType : 'O' this.currentPage = res.yseMerchantInfo ? res.yseMerchantInfo.custType : 'O'
......
...@@ -159,7 +159,7 @@ import { uploadImg, imgRecognitionApi, getBankListApi, getYseBankListApi, sendTo ...@@ -159,7 +159,7 @@ import { uploadImg, imgRecognitionApi, getBankListApi, getYseBankListApi, sendTo
import { registerYseMerchantApi, draftYseMerchantApi, getDetailApi } from '@api/publicAccount' import { registerYseMerchantApi, draftYseMerchantApi, getDetailApi } from '@api/publicAccount'
export default { export default {
name: 'applyAccount', name: 'applyAccount',
data () { data() {
var checkPhoneObj = { var checkPhoneObj = {
required: true, required: true,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
...@@ -641,7 +641,7 @@ export default { ...@@ -641,7 +641,7 @@ export default {
glUploadImg glUploadImg
}, },
mounted () { mounted() {
if (this.$route.params.merchantId) { if (this.$route.params.merchantId) {
this.targetAccount = this.$route.params this.targetAccount = this.$route.params
sessionStorage.setItem(this.sessionName, JSON.stringify(this.$route.params)) sessionStorage.setItem(this.sessionName, JSON.stringify(this.$route.params))
...@@ -681,7 +681,7 @@ export default { ...@@ -681,7 +681,7 @@ export default {
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
// 获取详情,数据恢复 // 获取详情,数据恢复
getDetail () { getDetail() {
getDetailApi({ merchantId: this.targetAccount.merchantId }).then(res => { getDetailApi({ merchantId: this.targetAccount.merchantId }).then(res => {
// console.log(res) // console.log(res)
if (res.yseMerchantInfo) { if (res.yseMerchantInfo) {
...@@ -750,19 +750,19 @@ export default { ...@@ -750,19 +750,19 @@ export default {
}) })
}, },
// 开户行 // 开户行
getBankList () { getBankList() {
getBankListApi({}).then(res => { getBankListApi({}).then(res => {
this.formList[this.findFormIdx('bankType')].optionList = res this.formList[this.findFormIdx('bankType')].optionList = res
}) })
}, },
// 支行 // 支行
getYseBankList () { }, getYseBankList() { },
// 找到在formList的位置,通过name来匹配 // 找到在formList的位置,通过name来匹配
findFormIdx (name) { findFormIdx(name) {
return this.formList.findIndex(item => item.name === name) return this.formList.findIndex(item => item.name === name)
}, },
// 切换radio后,将obj里面的图片写入editForm // 切换radio后,将obj里面的图片写入editForm
afterChangePic () { afterChangePic() {
// this[this.typeToForm[this.custType]] // this[this.typeToForm[this.custType]]
var picKeys = Object.keys(this.picObj) var picKeys = Object.keys(this.picObj)
picKeys.forEach(item => { picKeys.forEach(item => {
...@@ -776,7 +776,7 @@ export default { ...@@ -776,7 +776,7 @@ export default {
// console.log(this.picObj) // console.log(this.picObj)
}, },
// 切换radio/编辑,开户行恢复opt数据 // 切换radio/编辑,开户行恢复opt数据
recoveryOpenAccBank () { recoveryOpenAccBank() {
this.formList[this.findFormIdx('openAccBankType')].optionList = this.editForm.openAccBankType ? [{ branchBankType: this.editForm.openAccBankType, branchBankName: this.editForm.openAccBankName }] : [] this.formList[this.findFormIdx('openAccBankType')].optionList = this.editForm.openAccBankType ? [{ branchBankType: this.editForm.openAccBankType, branchBankName: this.editForm.openAccBankName }] : []
}, },
// 上传/删除图片后,将图片的值写入Obj中 // 上传/删除图片后,将图片的值写入Obj中
...@@ -785,7 +785,7 @@ export default { ...@@ -785,7 +785,7 @@ export default {
// ? (this.editForm.papers[this.picObj[attrName].attrName] = this.picObj[attrName].url) // ? (this.editForm.papers[this.picObj[attrName].attrName] = this.picObj[attrName].url)
// : delete this.editForm.papers[this.picObj[attrName].attrName] // : delete this.editForm.papers[this.picObj[attrName].attrName]
// }, // },
handleImgChange ({ file, attrName, targetItem }) { handleImgChange({ file, attrName, targetItem }) {
var hasFnList = ['idCard', 'idCardBack', 'bankCard', 'businessLicense'] var hasFnList = ['idCard', 'idCardBack', 'bankCard', 'businessLicense']
var reader = new FileReader() var reader = new FileReader()
var fileInfo = file.raw var fileInfo = file.raw
...@@ -804,18 +804,18 @@ export default { ...@@ -804,18 +804,18 @@ export default {
}) })
} }
}, },
handleImgRemove ({ attrName, targetItem }) { handleImgRemove({ attrName, targetItem }) {
this.picObj[attrName].url = '' this.picObj[attrName].url = ''
delete this.editForm.papers[this.picObj[attrName].attrName] delete this.editForm.papers[this.picObj[attrName].attrName]
// this.writeToEditForm(attrName, false) // this.writeToEditForm(attrName, false)
// this.$refs.editFormRef.$refs.editFrom.validateField(targetItem.name) // this.$refs.editFormRef.$refs.editFrom.validateField(targetItem.name)
}, },
handlePreview (file, attrName) { handlePreview(file, attrName) {
// console.log(file) // console.log(file)
// console.log(attrName) // console.log(attrName)
}, },
// 验证码 // 验证码
handleSend () { handleSend() {
sendToSmsCodeApi({ phone: this.editForm.operPhone }).then((res) => { sendToSmsCodeApi({ phone: this.editForm.operPhone }).then((res) => {
this.notice.okTips('已发送,30分钟内有效') this.notice.okTips('已发送,30分钟内有效')
this.isSend = true this.isSend = true
...@@ -824,7 +824,7 @@ export default { ...@@ -824,7 +824,7 @@ export default {
this.msgDown() this.msgDown()
}) })
}, },
msgDown () { msgDown() {
this.time = setTimeout(() => { this.time = setTimeout(() => {
clearTimeout(this.time) clearTimeout(this.time)
if (this.sendMsg > 1) { if (this.sendMsg > 1) {
...@@ -836,7 +836,7 @@ export default { ...@@ -836,7 +836,7 @@ export default {
}, 1000) }, 1000)
}, },
// 自动识别type - 识别类型(1:身份证;2:银行卡;3:营业执照);imgUrl - 图片地址 // 自动识别type - 识别类型(1:身份证;2:银行卡;3:营业执照);imgUrl - 图片地址
handleAutoRecognition (type, imgUrl, needWriteList) { handleAutoRecognition(type, imgUrl, needWriteList) {
// console.log(type) // console.log(type)
// console.log(imgUrl) // console.log(imgUrl)
imgRecognitionApi({ type: type, imgUrl: imgUrl }).then(res => { imgRecognitionApi({ type: type, imgUrl: imgUrl }).then(res => {
...@@ -865,7 +865,7 @@ export default { ...@@ -865,7 +865,7 @@ export default {
} }
}) })
}, },
getParams () { getParams() {
var params = _.cloneDeep(this.editForm) var params = _.cloneDeep(this.editForm)
params.merchantId = this.targetAccount.merchantId params.merchantId = this.targetAccount.merchantId
// 身份证日期 // 身份证日期
...@@ -886,11 +886,11 @@ export default { ...@@ -886,11 +886,11 @@ export default {
return params return params
}, },
jumpScroll (idName) { jumpScroll(idName) {
document.getElementById(idName).scrollIntoView() document.getElementById(idName).scrollIntoView()
}, },
// 确认 // 确认
handleConfirm () { handleConfirm() {
var params = this.getParams() var params = this.getParams()
var picKeys = Object.keys(this.picObj) var picKeys = Object.keys(this.picObj)
for (var item of picKeys) { for (var item of picKeys) {
...@@ -912,7 +912,7 @@ export default { ...@@ -912,7 +912,7 @@ export default {
}) })
}, },
// 存草稿 // 存草稿
handleDraft () { handleDraft() {
var params = this.getParams() var params = this.getParams()
draftYseMerchantApi(params).then(res => { draftYseMerchantApi(params).then(res => {
this.notice.okTips() this.notice.okTips()
...@@ -920,11 +920,11 @@ export default { ...@@ -920,11 +920,11 @@ export default {
}) })
}, },
// 删除session // 删除session
deleteSession () { deleteSession() {
sessionStorage.removeItem(this.sessionName) sessionStorage.removeItem(this.sessionName)
}, },
// 取消 // 取消
handleCancel () { handleCancel() {
this.isSend = false this.isSend = false
this.time && clearTimeout(this.time) this.time && clearTimeout(this.time)
this.deleteSession() this.deleteSession()
......
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
name: 'merchantId', name: 'merchantId',
type: 'input', type: 'input',
placeholder: '请输入商户号', placeholder: '请输入商户号',
isClear: true, isClear: true
// keyFn: this.keyDowmGetList // keyFn: this.keyDowmGetList
}], }],
getListApi: getList, getListApi: getList,
......
...@@ -289,7 +289,7 @@ export default { ...@@ -289,7 +289,7 @@ export default {
}, },
changeDate(date) { changeDate(date) {
console.log(date); console.log(date)
var params = {} var params = {}
params.merchantId = this.merchantInfo.merchantId params.merchantId = this.merchantInfo.merchantId
params.entryDate = date params.entryDate = date
......
...@@ -300,7 +300,7 @@ export default { ...@@ -300,7 +300,7 @@ export default {
// merchant: serviceItem // merchant: serviceItem
} }
// console.log(params) // console.log(params)
addParentMerchant({data: params}).then(res => { addParentMerchant({ data: params }).then(res => {
this.notice.okTips() this.notice.okTips()
this.handleRelateClose() this.handleRelateClose()
this.keyDowmGetList() this.keyDowmGetList()
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
import { showToast } from '@/common/util' import { showToast } from '@/common/util'
import { import {
GETYQMERCHANTCONFIGDETAIL, GETYQMERCHANTCONFIGDETAIL,
UPDATEYQMERCHANTCONFIG, UPDATEYQMERCHANTCONFIG
} from '@api/serviceManage' } from '@api/serviceManage'
export default { export default {
data() { data() {
...@@ -33,10 +33,10 @@ export default { ...@@ -33,10 +33,10 @@ export default {
{ id: 2, name: '门店收款', disabled: false }, { id: 2, name: '门店收款', disabled: false },
{ id: 3, name: 'POS机收款', disabled: false }, { id: 3, name: 'POS机收款', disabled: false },
{ id: 0, name: '不升级', disabled: true }, { id: 0, name: '不升级', disabled: true },
{ id: 1, name: '微信支付', disabled: false }, { id: 1, name: '微信支付', disabled: false }
// { id: 4, name: '支付宝支付', disabled: false }, // { id: 4, name: '支付宝支付', disabled: false },
], ],
checkList: [0], checkList: [0]
} }
}, },
mounted() { mounted() {
...@@ -45,8 +45,8 @@ export default { ...@@ -45,8 +45,8 @@ export default {
methods: { methods: {
// 获取园区店配置 // 获取园区店配置
getInfo() { getInfo() {
let o = this.$route.query const o = this.$route.query
let oParams = {} const oParams = {}
oParams.yqMerchantId = o.yqMerchantId oParams.yqMerchantId = o.yqMerchantId
GETYQMERCHANTCONFIGDETAIL(oParams).then((res) => { GETYQMERCHANTCONFIGDETAIL(oParams).then((res) => {
this.checkList = res.supportPayTypes || [] this.checkList = res.supportPayTypes || []
...@@ -57,8 +57,8 @@ export default { ...@@ -57,8 +57,8 @@ export default {
// 监听支付方式勾选 // 监听支付方式勾选
onChange(list) { onChange(list) {
console.log(list) console.log(list)
let olist = this.pageTypeList const olist = this.pageTypeList
let idx = list.findIndex((k) => k == 3) const idx = list.findIndex((k) => k == 3)
// 初始化,所有设置可选 // 初始化,所有设置可选
olist.map((k) => { olist.map((k) => {
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
return k return k
}) })
//如果包含 POS机收款,则不能选择微信、支付宝 // 如果包含 POS机收款,则不能选择微信、支付宝
if (idx >= 0) { if (idx >= 0) {
olist.map((k) => { olist.map((k) => {
if (k.id == 1 || k.id == 4) { if (k.id == 1 || k.id == 4) {
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
}) })
} }
//如果包含 微信、支付宝,则不能选择POS机收款 // 如果包含 微信、支付宝,则不能选择POS机收款
if (list.indexOf(1) >= 0 || list.indexOf(4) >= 0) { if (list.indexOf(1) >= 0 || list.indexOf(4) >= 0) {
olist.map((k) => { olist.map((k) => {
if (k.id == 3) { if (k.id == 3) {
...@@ -99,31 +99,31 @@ export default { ...@@ -99,31 +99,31 @@ export default {
saveInfo() { saveInfo() {
if (!this.checkList || this.checkList.length <= 0) { if (!this.checkList || this.checkList.length <= 0) {
showToast({ showToast({
message: '请选择支付方式', message: '请选择支付方式'
}) })
return false return false
} }
if (this.checkList.indexOf(3) < 0 && this.checkList.indexOf(1) < 0) { if (this.checkList.indexOf(3) < 0 && this.checkList.indexOf(1) < 0) {
showToast({ showToast({
message: '微信支付和pos机收款必须选择一个', message: '微信支付和pos机收款必须选择一个'
}) })
return false return false
} }
let oParams = {} const oParams = {}
oParams.yqMerchantId = this.$route.query.yqMerchantId oParams.yqMerchantId = this.$route.query.yqMerchantId
oParams.supportPayTypes = this.checkList oParams.supportPayTypes = this.checkList
UPDATEYQMERCHANTCONFIG(oParams).then((res) => { UPDATEYQMERCHANTCONFIG(oParams).then((res) => {
console.log(res) console.log(res)
showToast({ showToast({
message: '保存成功', message: '保存成功',
type: 'success', type: 'success'
}) })
this.goBack() this.goBack()
}) })
}, }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
}, { }, {
confId: 8, confId: 8,
confLabel: '虚拟园区店' confLabel: '虚拟园区店'
}], }]
} }
} }
}, },
...@@ -228,7 +228,7 @@ export default { ...@@ -228,7 +228,7 @@ export default {
) )
} }
}) })
}, }
} }
} }
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!