Commit e476bb27 by zhangquan

紧急版本联调

1 parent 64a7348c
...@@ -101,6 +101,14 @@ const exportcardRecordList = params => { ...@@ -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 { export default {
getEquityCardList, getEquityCardList,
newEquityCard, newEquityCard,
...@@ -114,5 +122,6 @@ export default { ...@@ -114,5 +122,6 @@ export default {
getCollectionMerchantList, getCollectionMerchantList,
getQrUrl, getQrUrl,
getcardRecordList, getcardRecordList,
exportcardRecordList exportcardRecordList,
exportExchangCodeApi
} }
...@@ -213,8 +213,8 @@ ...@@ -213,8 +213,8 @@
:visible.sync="dialogShow"> :visible.sync="dialogShow">
<div class="codeNumArea"> <div class="codeNumArea">
<el-form ref="codeRef" label-width="154px" :rules="codeRules" :model="codeForm"> <el-form ref="codeRef" label-width="154px" :rules="codeRules" :model="codeForm">
<el-form-item label="生成数量:" prop="num" class="m-t-20"> <el-form-item label="生成数量:" prop="amount" 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-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-item>
</el-form> </el-form>
<!-- <label for="">生成数量:</label> <!-- <label for="">生成数量:</label>
...@@ -252,10 +252,10 @@ export default { ...@@ -252,10 +252,10 @@ export default {
dialogShow: false, dialogShow: false,
codeForm: { codeForm: {
id: '', id: '',
num: '' amount: ''
}, },
codeRules: { codeRules: {
num: [ amount: [
{ {
required: true, required: true,
// validator: (rule, value, callback) => { // validator: (rule, value, callback) => {
...@@ -510,27 +510,41 @@ export default { ...@@ -510,27 +510,41 @@ export default {
downLoadExchangeCode(){ downLoadExchangeCode(){
this.$refs.codeRef.validate(valid => { this.$refs.codeRef.validate(valid => {
if (valid) { if (valid) {
// var params = this.getParams() var params = {
// this.$apis.beforeSale.getExportApi(params).then(res => { amount: this.codeForm.amount,
// // window.open(res) cardClassId: this.codeForm.id,
// let tempaa = utils.getExplorer() }
// if (tempaa == 'QQ') { 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) // window.open(res)
// } else { this.closeCodeDialog()
// let iframe = document.createElement('iframe') this.$message.success('生成兑换码成功!')
// iframe.style.display = 'none' let tempaa = this.getExplorer()
// iframe.src = res if (tempaa == 'QQ') {
// document.body.appendChild(iframe) 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(){ closeCodeDialog(){
console.log(13)
this.dialogShow = !this.dialogShow this.dialogShow = !this.dialogShow
this.codeForm.id = '' this.codeForm.id = ''
this.codeForm.num = '' this.codeForm.amount = ''
}, },
openDialog(row){ openDialog(row){
this.codeForm.id = row.id 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!