Commit 10d3920c by wangql
2 parents 4e6bf3fe c985efcc
......@@ -13,6 +13,16 @@ const getRecordListApi = params => {
sign: true
})
}
const getVerificationCode=params=>{
params.method = `scrm.api.coupon.verification.code.verification`
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
// const auditGoodApi = params => {
// params.method = `${defaultPath}audit.goods`
......@@ -78,4 +88,4 @@ const getRecordListApi = params => {
// })
// }
export { getRecordListApi }
export { getRecordListApi,getVerificationCode }
......@@ -30,7 +30,8 @@
<el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-form-item size="small" style="float: right">
<el-button :size="size" type="primary" @click="openDialog">核销</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item>
......@@ -42,18 +43,39 @@
<span>{{ dateFormatFun(scope.scope.verificationTime) }}</span>
</span>
</GLTable>
<glsx-dialog title="优惠券核销(请确保用户到店后核销,避免引起不必要问题)" :hasScroll="false" width="580px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body">
<el-form :rules="rules" ref="ruleForm" :model="ruleForm" label-width="80px">
<!-- style="width: 440px" -->
<el-form-item size="small" label="核销码" prop="verficationCode" style="width: 300px">
<el-input size="small" v-model.trim="ruleForm.verficationCode" maxlength="50" placeholder="请输入核销码"></el-input>
</el-form-item>
</el-form>
</div>
</glsx-dialog>
</div>
</div>
</template>
<script>
import { getRecordListApi } from '@/api/modules/record'
import glsxDialog from '@/components/glsx-dialog'
import { getRecordListApi,getVerificationCode } from '@/api/modules/record'
import url from "@/assets/empty.png"
import { dateFormat } from '@/utils/index.js'
export default {
name: 'record',
components: {
glsxDialog
},
data() {
return {
ruleForm: {
verficationCode: ''
},
isDialogVisible: false,
rules: {
verficationCode: [{ required: true, message: '请输入核销码', trigger: 'blur' }]
},
url:url,
isReload:true,
pickerOptions: {
......@@ -71,7 +93,8 @@ export default {
userReq: '',
verificationOperator: '',
orderCode: '',
merchantId: 0
merchantId: 0,
discountTypes: [7]
},
// 44187877
searchFormTable: {},
......@@ -166,7 +189,30 @@ export default {
}
})
},
openDialog() {
this.isDialogVisible = true
},
handleClose() {
this.isDialogVisible = !this.isDialogVisible
this.$refs.ruleForm.resetFields()
},
handleConfirm() {
// getRecordListApi
this.$refs['ruleForm'].validate(valid => {
if (!valid) {
return
}
let params = {}
params.verficationCode = this.ruleForm.verficationCode
// params.discountTypes=[7]
getVerificationCode(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
})
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
// console.log(row)
......@@ -192,7 +238,7 @@ export default {
// this.searchForm = { merchantId: 44184606 }
// this.handleSearch()
this.isReload=false
this.searchForm={ merchantId: this.merchantId }
this.searchForm={ merchantId: this.merchantId ,discountTypes: [7]}
this.$nextTick(()=>{
this.isReload=true
})
......@@ -214,4 +260,21 @@ export default {
.el-range-editor--small.el-input__inner {
width: 215px;
}
/deep/.el-dialog__header {
padding-top: 20px;
padding-bottom: 20px;
}
/deep/ .el-dialog__body {
border-bottom: 1px solid #e6e6e6;
border-top: 1px solid #e6e6e6;
padding: 20px 25px;
.content-body {
}
}
/deep/ .el-dialog__footer {
// text-align: center;
padding-top: 12px;
padding-bottom: 12px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!