Commit e572c946 by zhangquan

ui完成

1 parent d4b5a1e5
...@@ -202,12 +202,24 @@ ...@@ -202,12 +202,24 @@
</div> </div>
</el-drawer> </el-drawer>
<GLDialog <GLDialog
class="codeDialog"
mode="small" mode="small"
title="会员兑换码"
@onOk="downLoadExchangeCode" @onOk="downLoadExchangeCode"
okText="确认并生成excel文件" okText="确认并生成excel文件"
cancelText="取消"
:before-close="closeCodeDialog"
@onCancel="closeCodeDialog" @onCancel="closeCodeDialog"
:visible.sync="dialogShow"> :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>
</el-form>
<!-- <label for="">生成数量:</label>
<el-input type="text" maxLength="5" oninput="value=value.replace(/^0/g,'').replace(/[^\d]/g,'')" placeholder="请输入生成数量"></el-input> -->
</div>
</GLDialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -238,6 +250,26 @@ export default { ...@@ -238,6 +250,26 @@ export default {
return { return {
url: url, url: url,
dialogShow: false, dialogShow: false,
codeForm: {
id: '',
num: ''
},
codeRules: {
num: [
{
required: true,
// validator: (rule, value, callback) => {
// if (!value || (value && !value.trim())) {
// return callback(new Error('请输入作废原因'))
// } else {
// return callback()
// }
// },
message: '请输入生成数量',
trigger: 'change'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
hasTryNum: '', hasTryNum: '',
value: false, value: false,
...@@ -476,14 +508,36 @@ export default { ...@@ -476,14 +508,36 @@ export default {
}, },
methods: { methods: {
downLoadExchangeCode(){ 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)
// }
// })
}
})
}, },
closeCodeDialog(){ closeCodeDialog(){
console.log(13)
this.dialogShow = !this.dialogShow
this.codeForm.id = ''
this.codeForm.num = ''
}, },
openDialog(row){ openDialog(row){
this.curRowId = row this.codeForm.id = row.id
this.dialogShow = true this.dialogShow = true
this.$nextTick(()=>{
this.$refs?.codeRef?.clearValidate()
})
}, },
handleDetail(row) { handleDetail(row) {
this.$refs.detailDetailRef.show(row) this.$refs.detailDetailRef.show(row)
...@@ -993,4 +1047,21 @@ export default { ...@@ -993,4 +1047,21 @@ export default {
margin-right: 12px; margin-right: 12px;
} }
} }
.codeDialog{
.el-dialog__body{
display: flex;
align-items: center;
justify-content: center;
.codeNumArea{
display: flex;
align-items: center;
label{
white-space: nowrap;
}
/deep/ .el-input{
width: 284px;
}
}
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!