Commit 4dea76b0 by zhouzy

console

1 parent cb18dbb1
...@@ -276,7 +276,6 @@ export default { ...@@ -276,7 +276,6 @@ export default {
}) })
// console.log(params) // console.log(params)
this.getListApi(params).then(({ data }) => { this.getListApi(params).then(({ data }) => {
console.log(this.data);
this.data = data[this.tableParams.listName] this.data = data[this.tableParams.listName]
this.total = data.total this.total = data.total
this.loading = false this.loading = false
......
...@@ -174,7 +174,6 @@ export default { ...@@ -174,7 +174,6 @@ export default {
let reader = new FileReader() let reader = new FileReader()
reader.readAsDataURL(file) reader.readAsDataURL(file)
reader.onload = img => { reader.onload = img => {
console.log(file)
let type = fileName.split('.')[fileName.split('.').length - 1] let type = fileName.split('.')[fileName.split('.').length - 1]
let imgUrl = img.target.result.split(',')[1] let imgUrl = img.target.result.split(',')[1]
this.$apis.commonApi this.$apis.commonApi
...@@ -183,7 +182,6 @@ export default { ...@@ -183,7 +182,6 @@ export default {
}) })
.then(({ code, message, data }) => { .then(({ code, message, data }) => {
if (code == 0) { if (code == 0) {
console.log(data)
this.$set(this.form, 'equityIcon', data) this.$set(this.form, 'equityIcon', data)
} else { } else {
this.$message.error(message) this.$message.error(message)
...@@ -194,7 +192,6 @@ export default { ...@@ -194,7 +192,6 @@ export default {
} }
}, },
changeSupplier(e) { changeSupplier(e) {
console.log(e)
this.supplierList.map(i => { this.supplierList.map(i => {
if (i.value == e) { if (i.value == e) {
this.form.equityName = i.label this.form.equityName = i.label
...@@ -203,7 +200,6 @@ export default { ...@@ -203,7 +200,6 @@ export default {
}, },
getAppearanceList(brandName) { getAppearanceList(brandName) {
this.$apis.goodsEquityManageApi.getAppearanceList({ brandName, supplier: 'HW' }).then(({ data }) => { this.$apis.goodsEquityManageApi.getAppearanceList({ brandName, supplier: 'HW' }).then(({ data }) => {
console.log(data)
data.map(i => (i.label = { 1: '卡券', 2: '直充' }[i.appearance])) data.map(i => (i.label = { 1: '卡券', 2: '直充' }[i.appearance]))
this.appearanceList = data this.appearanceList = data
this.form.appearance = '' this.form.appearance = ''
...@@ -214,19 +210,20 @@ export default { ...@@ -214,19 +210,20 @@ export default {
this.form.equityName = this.form.brandName this.form.equityName = this.form.brandName
}, },
submit(type) { submit(type) {
console.log(this.form)
let { form, isEdit } = this let { form, isEdit } = this
let obj = JSON.parse(JSON.stringify(form))
let target = type == 1 ? this.$apis.carEquityManageApi : this.$apis.goodsEquityManageApi let target = type == 1 ? this.$apis.carEquityManageApi : this.$apis.goodsEquityManageApi
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
if (type == 2) { if (type == 2) {
this.form.goodsCategoryId = this.$parent.goodsCategoryId obj.goodsCategoryId = this.$parent.goodsCategoryId
this.form.appearance = form.appearance == '直充' ? 2 : 1 obj.appearance = form.appearance == '直充' ? 2 : 1
} }
let apiName = 'createEquity' let apiName = 'createEquity'
if (isEdit) apiName = 'updateEquity' if (isEdit) apiName = 'updateEquity'
target[apiName](this.form).then(({ code, data, message }) => { target[apiName](obj).then(({ code, data, message }) => {
if (code == 0) { if (code == 0) {
this.close() this.close()
type == 1 ? this.$parent.getCarList() : this.$parent.getCategoryList() type == 1 ? this.$parent.getCarList() : this.$parent.getCategoryList()
......
...@@ -84,7 +84,6 @@ export default { ...@@ -84,7 +84,6 @@ export default {
this.$apis.goodsEquityManageApi.getGoodsList({ goodsCategoryId,pageSize: this.$refs.goodsTable.page.pageSize, pageNum: this.$refs.goodsTable.page.pageNum }).then(({ data }) => { this.$apis.goodsEquityManageApi.getGoodsList({ goodsCategoryId,pageSize: this.$refs.goodsTable.page.pageSize, pageNum: this.$refs.goodsTable.page.pageNum }).then(({ data }) => {
if (!callBack) { if (!callBack) {
this.goodsTableData = data.list || [] this.goodsTableData = data.list || []
console.log(data.total,'data');
this.tableTotal = data.total this.tableTotal = data.total
} else { } else {
return callBack(data.list) return callBack(data.list)
......
...@@ -48,7 +48,6 @@ export default { ...@@ -48,7 +48,6 @@ export default {
watch: { watch: {
'date' (n) { 'date' (n) {
let [orderDateStart, orderDateEnd] = n let [orderDateStart, orderDateEnd] = n
console.log(orderDateStart)
this.searchObj.orderDateStart = orderDateStart ? `${orderDateStart} 00:00:00` : '' this.searchObj.orderDateStart = orderDateStart ? `${orderDateStart} 00:00:00` : ''
this.searchObj.orderDateEnd = orderDateEnd ? `${orderDateEnd} 23:59:59` : '' this.searchObj.orderDateEnd = orderDateEnd ? `${orderDateEnd} 23:59:59` : ''
} }
...@@ -63,7 +62,6 @@ export default { ...@@ -63,7 +62,6 @@ export default {
}) })
}, },
jump(query, name) { jump(query, name) {
console.log('2222222',query)
let parent = name == 'order' ? '/order/detail' : '/sale/detail' let parent = name == 'order' ? '/order/detail' : '/sale/detail'
// window.location.href = `./detail.html?orderCode=${orderCode}` // window.location.href = `./detail.html?orderCode=${orderCode}`
// let target = ['嘀加权益卡管理平台', '运营平台', '权益', parent, '*详情'] // let target = ['嘀加权益卡管理平台', '运营平台', '权益', parent, '*详情']
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<el-form-item style="margin-left: 120px" label="已激活:">{{ cardsInformationForm.recipientCount || '0' }}({{ ChangeDecimalToPercentage(this.cardsInformationForm.recipientCount / this.cardsInformationForm.num) }})</el-form-item> <el-form-item style="margin-left: 120px" label="已激活:">{{ cardsInformationForm.recipientCount || '0' }}({{ ChangeDecimalToPercentage(this.cardsInformationForm.recipientCount / this.cardsInformationForm.num) }})</el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<div class="dialogtitleText" style="margin-top: 20px; margin-right: 20px">权益明细:</div> <div class="dialogtitleText" style="margin-top: 20px; margin-left: 20px">权益明细:</div>
<div class="contain equity-wrap" style="margin: 20px 0px 20px 0px !important"> <div class="contain equity-wrap" style="margin: 20px 0px 20px 0px !important">
<el-form :inline="true" label-width="70px"> <el-form :inline="true" label-width="70px">
<el-row style="align-items: center"> <el-row style="align-items: center">
...@@ -448,7 +448,6 @@ export default { ...@@ -448,7 +448,6 @@ export default {
const xhr = new XMLHttpRequest() const xhr = new XMLHttpRequest()
xhr.onreadystatechange = () => { xhr.onreadystatechange = () => {
if (xhr.readyState === 4 && xhr.status === 200) { if (xhr.readyState === 4 && xhr.status === 200) {
console.log(xhr.responseText)
} }
} }
xhr.open('POST', url) xhr.open('POST', url)
...@@ -538,7 +537,6 @@ export default { ...@@ -538,7 +537,6 @@ export default {
exportbatchdetail() { exportbatchdetail() {
this.$apis.equityApi.cardExport(this.batchPopupListSearch).then(res => { this.$apis.equityApi.cardExport(this.batchPopupListSearch).then(res => {
if (res) { if (res) {
console.log(res)
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('href', res.data) a.setAttribute('href', res.data)
a.setAttribute('target', '_blank') a.setAttribute('target', '_blank')
...@@ -567,7 +565,6 @@ export default { ...@@ -567,7 +565,6 @@ export default {
exportCollection() { exportCollection() {
this.$apis.equityApi.cardExport(this.collectionListSearch).then(res => { this.$apis.equityApi.cardExport(this.collectionListSearch).then(res => {
if (res.data) { if (res.data) {
console.log(res.data)
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('href', res.data) a.setAttribute('href', res.data)
a.setAttribute('target', '_blank') a.setAttribute('target', '_blank')
...@@ -645,17 +642,14 @@ export default { ...@@ -645,17 +642,14 @@ export default {
} else { } else {
this.batchListSearch.batchNo = null this.batchListSearch.batchNo = null
} }
console.log(this.batchListSearch)
resolve() resolve()
}) })
}, },
// 领用记录表格改变领用日期数据格式 // 领用记录表格改变领用日期数据格式
changeCollectionDataFormat() { changeCollectionDataFormat() {
console.log('11111111', this.collectionListSearch)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (this.collectionListSearch.sn.length > 2 || this.collectionListSearch.sn.length < 1) { if (this.collectionListSearch.sn.length > 2 || this.collectionListSearch.sn.length < 1) {
if (this.collectionListSearch.mobile.length > 2 || this.collectionListSearch.mobile.length < 1) { if (this.collectionListSearch.mobile.length > 2 || this.collectionListSearch.mobile.length < 1) {
console.log(this.colletionDate)
this.collectionListSearch.endTime = this.colletionDate ? this.colletionDate[1] + ' 23:59:59' : '' || undefined this.collectionListSearch.endTime = this.colletionDate ? this.colletionDate[1] + ' 23:59:59' : '' || undefined
this.collectionListSearch.startTime = this.colletionDate ? this.colletionDate[0] + ' 00:00:01' : '' || undefined this.collectionListSearch.startTime = this.colletionDate ? this.colletionDate[0] + ' 00:00:01' : '' || undefined
resolve() resolve()
...@@ -677,7 +671,6 @@ export default { ...@@ -677,7 +671,6 @@ export default {
}, },
// 批次管理弹窗搜索 // 批次管理弹窗搜索
beforebatchPopupListSearch() { beforebatchPopupListSearch() {
console.log('222222222', this.batchPopupListSearch)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (this.batchPopupListSearch.cardNo && this.batchPopupListSearch.cardNo.length < 3) { if (this.batchPopupListSearch.cardNo && this.batchPopupListSearch.cardNo.length < 3) {
Message({ Message({
...@@ -697,7 +690,6 @@ export default { ...@@ -697,7 +690,6 @@ export default {
}) })
}, },
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab.name)
this.options = [] this.options = []
}, },
handleChange(value) {}, handleChange(value) {},
...@@ -718,7 +710,6 @@ export default { ...@@ -718,7 +710,6 @@ export default {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
this.$apis.equityApi.generateMemberBatch(this.generateRightCardsForm).then(res => { this.$apis.equityApi.generateMemberBatch(this.generateRightCardsForm).then(res => {
console.log(res)
if (res == true) { if (res == true) {
Message({ Message({
message: '增添成功', message: '增添成功',
...@@ -751,7 +742,6 @@ export default { ...@@ -751,7 +742,6 @@ export default {
}, },
// 批次详情弹窗 // 批次详情弹窗
batchdetails(row) { batchdetails(row) {
console.log(row)
this.cardsInformationForm = row this.cardsInformationForm = row
this.batchPopupListSearch.batchId = row.id this.batchPopupListSearch.batchId = row.id
this.batchdetailsVisible = true this.batchdetailsVisible = true
......
...@@ -208,7 +208,6 @@ export default { ...@@ -208,7 +208,6 @@ export default {
}) })
.catch(err => { .catch(err => {
this.loading = false this.loading = false
console.log(err)
}) })
}, },
exportExcel() { exportExcel() {
......
...@@ -162,7 +162,6 @@ const validatorgoodsImage = (rule, value, callback) => { ...@@ -162,7 +162,6 @@ const validatorgoodsImage = (rule, value, callback) => {
} }
} }
const validatorNoMemberPrice = (rule, value, callback) => { const validatorNoMemberPrice = (rule, value, callback) => {
console.log(window.vm.$children[0].$children[0].ruleForm)
let { salesPrice } = window.vm.$children[0].$children[0].ruleForm let { salesPrice } = window.vm.$children[0].$children[0].ruleForm
if (value) { if (value) {
if (typeof value == 'number') { if (typeof value == 'number') {
...@@ -227,7 +226,6 @@ export default { ...@@ -227,7 +226,6 @@ export default {
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.getListWithPageOutGoods() this.getListWithPageOutGoods()
console.log(this.$route)
let id = this.$route.query.id let id = this.$route.query.id
let edit = this.$route.query.edit let edit = this.$route.query.edit
if (id) { if (id) {
...@@ -289,7 +287,6 @@ export default { ...@@ -289,7 +287,6 @@ export default {
}) })
.then(({ code, message, data }) => { .then(({ code, message, data }) => {
if (code == 0) { if (code == 0) {
console.log(data)
this.ruleForm.brandName = data.brandName this.ruleForm.brandName = data.brandName
this.ruleForm.productName = data.productName this.ruleForm.productName = data.productName
this.ruleForm.costPrice = Number(data.officialPrice) this.ruleForm.costPrice = Number(data.officialPrice)
...@@ -318,7 +315,7 @@ export default { ...@@ -318,7 +315,7 @@ export default {
let reader = new FileReader() let reader = new FileReader()
reader.readAsDataURL(file) reader.readAsDataURL(file)
reader.onload = img => { reader.onload = img => {
console.log(file) // console.log(file)
let type = fileName.split('.')[fileName.split('.').length - 1] let type = fileName.split('.')[fileName.split('.').length - 1]
let imgUrl = img.target.result.split(',')[1] let imgUrl = img.target.result.split(',')[1]
this.$apis.commonApi this.$apis.commonApi
...@@ -366,7 +363,6 @@ export default { ...@@ -366,7 +363,6 @@ export default {
productId productId
}) })
.then(res => { .then(res => {
console.log(res)
if (res.code == 0) { if (res.code == 0) {
this.$apis.orderApi this.$apis.orderApi
.stockAndStatusCheck({ .stockAndStatusCheck({
...@@ -375,7 +371,6 @@ export default { ...@@ -375,7 +371,6 @@ export default {
appearance appearance
}) })
.then(_res => { .then(_res => {
console.log(_res)
if (_res.code == 0) { if (_res.code == 0) {
this.createGoods() this.createGoods()
return return
......
...@@ -155,7 +155,6 @@ export default { ...@@ -155,7 +155,6 @@ export default {
methods: { methods: {
getAllBrandList() { getAllBrandList() {
this.$apis.orderApi.getAllBrandList().then(res => { this.$apis.orderApi.getAllBrandList().then(res => {
console.log(res)
this.goodsBrandList = res.data || [] this.goodsBrandList = res.data || []
}) })
}, },
...@@ -180,7 +179,6 @@ export default { ...@@ -180,7 +179,6 @@ export default {
this.$apis.orderApi.getEquityGoodsById({ id }).then(({ code, data, message }) => { this.$apis.orderApi.getEquityGoodsById({ id }).then(({ code, data, message }) => {
if (code == 0) { if (code == 0) {
this.$apis.orderApi.createGoods(data).then(res => { this.$apis.orderApi.createGoods(data).then(res => {
console.log(res)
if (res.code == 0) { if (res.code == 0) {
this.$message({ this.$message({
message: '复制成功!', message: '复制成功!',
......
...@@ -127,7 +127,6 @@ export default { ...@@ -127,7 +127,6 @@ export default {
setTop(id, type) { setTop(id, type) {
let target = type == 'car' ? this.$apis.carEquityManageApi : this.$apis.goodsEquityManageApi let target = type == 'car' ? this.$apis.carEquityManageApi : this.$apis.goodsEquityManageApi
target.setTop({ id }).then(({ code, message }) => { target.setTop({ id }).then(({ code, message }) => {
console.log(code)
if (code == 0) { if (code == 0) {
if (type == 'car') this.getCarList() if (type == 'car') this.getCarList()
else this.getCategoryList() else this.getCategoryList()
...@@ -139,7 +138,6 @@ export default { ...@@ -139,7 +138,6 @@ export default {
//删除商品权益 //删除商品权益
deletEquity(id) { deletEquity(id) {
this.$apis.goodsEquityManageApi.deleteEquity({ id }).then(({ code, message }) => { this.$apis.goodsEquityManageApi.deleteEquity({ id }).then(({ code, message }) => {
console.log(code)
if (code == 0) { if (code == 0) {
this.getCategoryList() this.getCategoryList()
} else { } else {
...@@ -157,7 +155,6 @@ export default { ...@@ -157,7 +155,6 @@ export default {
status = status == 1 ? 0 : 1 status = status == 1 ? 0 : 1
const callBack = () => { const callBack = () => {
target.updateShelves({ id, status }).then(({ code, message }) => { target.updateShelves({ id, status }).then(({ code, message }) => {
console.log(message)
if (code == 0) { if (code == 0) {
if (type == 'car') this.getCarList() if (type == 'car') this.getCarList()
else this.getCategoryList() else this.getCategoryList()
......
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.$route, '11111111') // console.log(this.$route, '11111111')
this.params = { orderCode: this.$route.query.orderCode } this.params = { orderCode: this.$route.query.orderCode }
this.getDetail(this.params) this.getDetail(this.params)
}, },
......
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
{ {
label: '海威订单号', label: '海威订单号',
minWidth: '100', minWidth: '100',
addHtml: 'thirdOrderCode' prop : 'thirdOrderCode'
} }
] ]
} }
......
...@@ -317,17 +317,14 @@ export default { ...@@ -317,17 +317,14 @@ export default {
this.effectiveNum = '' this.effectiveNum = ''
this.isAdd = false this.isAdd = false
this.inputSwitch = true this.inputSwitch = true
console.log(this.isAdd)
this.disableSelect = false this.disableSelect = false
}, },
extension(row) { extension(row) {
console.log(row)
this.$apis.equityApi this.$apis.equityApi
.getQrUrl({ .getQrUrl({
id: row.id id: row.id
}) })
.then(res => { .then(res => {
console.log(this.editForm)
this.editForm = res.data this.editForm = res.data
this.isVisible = true this.isVisible = true
this.tryNum = row.tryNum this.tryNum = row.tryNum
...@@ -418,16 +415,12 @@ export default { ...@@ -418,16 +415,12 @@ export default {
changeStore() { changeStore() {
// this.clearStyle() // this.clearStyle()
var imageId = this.product.filter(item => item.src == this.ruleForm.backgroundImage).id var imageId = this.product.filter(item => item.src == this.ruleForm.backgroundImage).id
console.log(imageId)
}, },
//编辑 //编辑
edit(row) { edit(row) {
// console.log(this.isAdd)
// console.log(row)
this.ruleForm = row this.ruleForm = row
// this.changeStore() // this.changeStore()
this.dialogVisible = true this.dialogVisible = true
console.log(this.ruleForm.effectiveType)
this.ruleForm.effectiveType = row.effectiveType + '' this.ruleForm.effectiveType = row.effectiveType + ''
//赋值时间框 //赋值时间框
if (this.ruleForm.effectiveType == 2) { if (this.ruleForm.effectiveType == 2) {
...@@ -446,7 +439,6 @@ export default { ...@@ -446,7 +439,6 @@ export default {
copy(row) { copy(row) {
this.disableSelect = false this.disableSelect = false
this.isAdd = true this.isAdd = true
console.log(this.isAdd)
this.dialogVisible = true this.dialogVisible = true
this.ruleForm = row this.ruleForm = row
this.ruleForm.effectiveType = row.effectiveType + '' this.ruleForm.effectiveType = row.effectiveType + ''
...@@ -465,7 +457,6 @@ export default { ...@@ -465,7 +457,6 @@ export default {
this.generateOptions = [] this.generateOptions = []
this.dialogVisible = true this.dialogVisible = true
this.isAdd = cd this.isAdd = cd
console.log(this.isAdd)
setTimeout(() => { setTimeout(() => {
this.clearStyle() this.clearStyle()
}, 20) }, 20)
...@@ -483,18 +474,15 @@ export default { ...@@ -483,18 +474,15 @@ export default {
}, },
//change imageStyle //change imageStyle
changeStyle(cd, src) { changeStyle(cd, src) {
console.log(src)
this.clearStyle() this.clearStyle()
var imgItem = document.getElementById(cd) var imgItem = document.getElementById(cd)
imgItem.style.background = '#5850ff' imgItem.style.background = '#5850ff'
this.$set(this.ruleForm, 'backgroundImage', src) this.$set(this.ruleForm, 'backgroundImage', src)
this.ruleForm.backgroundImage = src this.ruleForm.backgroundImage = src
this.$refs.ruleForm.validateField('backgroundImage') this.$refs.ruleForm.validateField('backgroundImage')
console.log(this.ruleForm)
}, },
//checkbox的input开关 //checkbox的input开关
controlSwitch(value, cd) { controlSwitch(value, cd) {
console.log(value)
if (cd == 'disable') { if (cd == 'disable') {
// this.inputSwitch = true // this.inputSwitch = true
this.ruleForm.effectiveNum = '' this.ruleForm.effectiveNum = ''
...@@ -525,7 +513,6 @@ export default { ...@@ -525,7 +513,6 @@ export default {
this.ruleForm.tryNum = '' this.ruleForm.tryNum = ''
this.ruleForm.tryAble = '0' this.ruleForm.tryAble = '0'
} }
console.log(this.ruleForm, '????????????')
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
// var params = this.ruleForm // var params = this.ruleForm
...@@ -534,11 +521,8 @@ export default { ...@@ -534,11 +521,8 @@ export default {
} }
//判断是否是从新建按钮进来的 //判断是否是从新建按钮进来的
var apiName = this.isAdd ? 'newEquityCard' : 'editEquityCard' var apiName = this.isAdd ? 'newEquityCard' : 'editEquityCard'
console.log(apiName)
this.submitBtn = true this.submitBtn = true
this.$apis.equityApi[apiName](this.ruleForm).then(res => { this.$apis.equityApi[apiName](this.ruleForm).then(res => {
console.log(res)
console.log(apiName)
//请求是否成功 //请求是否成功
if (res.code == 0) { if (res.code == 0) {
this.value = false this.value = false
...@@ -587,7 +571,6 @@ export default { ...@@ -587,7 +571,6 @@ export default {
this.effectiveNum = '' this.effectiveNum = ''
this.isAdd = false this.isAdd = false
this.inputSwitch = true this.inputSwitch = true
console.log(this.isAdd)
this.disableSelect = false this.disableSelect = false
this.$refs[formName].resetFields() this.$refs[formName].resetFields()
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
......
...@@ -261,7 +261,6 @@ export default { ...@@ -261,7 +261,6 @@ export default {
this.$refs.table.refreshTable() this.$refs.table.refreshTable()
}, },
jump(query, name) { jump(query, name) {
console.log('2222222', query)
let parent = name == 'order' ? '/order/detail' : '/sale/detail' let parent = name == 'order' ? '/order/detail' : '/sale/detail'
// window.location.href = `./detail.html?orderCode=${orderCode}` // window.location.href = `./detail.html?orderCode=${orderCode}`
// let target = ['嘀加权益卡管理平台', '运营平台', '权益', parent, '*详情'] // let target = ['嘀加权益卡管理平台', '运营平台', '权益', parent, '*详情']
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!