Commit e476bb27 by zhangquan

紧急版本联调

1 parent 64a7348c
......@@ -101,6 +101,14 @@ const exportcardRecordList = params => {
})
}
const exportExchangCodeApi = params => {
params.method = `scrm.api.equity.card.class.exchange.code.export`
return http({
data: params,
sign: true
})
}
export default {
getEquityCardList,
newEquityCard,
......@@ -114,5 +122,6 @@ export default {
getCollectionMerchantList,
getQrUrl,
getcardRecordList,
exportcardRecordList
exportcardRecordList,
exportExchangCodeApi
}
......@@ -213,8 +213,8 @@
:visible.sync="dialogShow">
<div class="codeNumArea">
<el-form ref="codeRef" label-width="154px" :rules="codeRules" :model="codeForm">
<el-form-item label="生成数量:" prop="num" class="m-t-20">
<el-input type="text" maxLength="5" v-model="codeForm.num" oninput="value=value.replace(/^0/g,'').replace(/[^\d]/g,'')" placeholder="请输入生成数量"></el-input>
<el-form-item label="生成数量:" prop="amount" class="m-t-20">
<el-input type="text" maxLength="5" v-model="codeForm.amount" oninput="value=value.replace(/^0/g,'').replace(/[^\d]/g,'')" placeholder="请输入生成数量"></el-input>
</el-form-item>
</el-form>
<!-- <label for="">生成数量:</label>
......@@ -252,10 +252,10 @@ export default {
dialogShow: false,
codeForm: {
id: '',
num: ''
amount: ''
},
codeRules: {
num: [
amount: [
{
required: true,
// validator: (rule, value, callback) => {
......@@ -510,27 +510,41 @@ export default {
downLoadExchangeCode(){
this.$refs.codeRef.validate(valid => {
if (valid) {
// var params = this.getParams()
// this.$apis.beforeSale.getExportApi(params).then(res => {
// // window.open(res)
// let tempaa = utils.getExplorer()
// if (tempaa == 'QQ') {
// window.open(res)
// } else {
// let iframe = document.createElement('iframe')
// iframe.style.display = 'none'
// iframe.src = res
// document.body.appendChild(iframe)
// }
// })
var params = {
amount: this.codeForm.amount,
cardClassId: this.codeForm.id,
}
const loading = this.$loading({
lock: true,
text: 'Loading...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)',
customClass:'loadingClass'
})
this.$apis.equityApi.exportExchangCodeApi(params).then(res => {
loading.close()
// window.open(res)
this.closeCodeDialog()
this.$message.success('生成兑换码成功!')
let tempaa = this.getExplorer()
if (tempaa == 'QQ') {
window.open(res)
} else {
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = res
document.body.appendChild(iframe)
}
}).catch(err=> {
loading.close()
})
}
})
},
closeCodeDialog(){
console.log(13)
this.dialogShow = !this.dialogShow
this.codeForm.id = ''
this.codeForm.num = ''
this.codeForm.amount = ''
},
openDialog(row){
this.codeForm.id = row.id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!