Commit 4dea76b0 by zhouzy

console

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