New file |
| | |
| | | <!DOCTYPE HTML> |
| | | <html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> |
| | | <meta name="renderer" content="webkit|ie-comp|ie-stand"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" |
| | | content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> |
| | | <meta http-equiv="Cache-Control" content="no-siteapp"/> |
| | | <!-- 本框架基本脚本和样式 --> |
| | | <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script> |
| | | <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}"> |
| | | <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}"> |
| | | <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/> |
| | | </head> |
| | | |
| | | <body> |
| | | <div class="ibox-content" id="app" v-cloak> |
| | | <el-row> |
| | | <p class="el-big-title">中奖信息</p> |
| | | </el-row> |
| | | <el-row style="margin-top: 20px;"> |
| | | <el-col> |
| | | <el-form :model="formSelect"> |
| | | <el-row> |
| | | <el-form-item label="奖品名称:" :label-width="formLabelWidth"> |
| | | {{formSelect.jpmc}} |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row style="display:flex;"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="奖品图片:" :label-width="formLabelWidth"> |
| | | <img :src="formSelect.jptp" style="max-width: 200px;"> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="数量:" :label-width="formLabelWidth"> |
| | | {{formSelect.sl}} |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="display:flex;"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="中奖人:" :label-width="formLabelWidth"> |
| | | {{formSelect.zjr}} |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="中奖时间:" :label-width="formLabelWidth"> |
| | | {{formSelect.zjsj}} |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="display:flex;"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="活动名称:" :label-width="formLabelWidth"> |
| | | {{formSelect.hdmc}} |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="活动编号:" :label-width="formLabelWidth"> |
| | | {{formSelect.hdbh}} |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="display:flex;"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="兑奖方式:" :label-width="formLabelWidth"> |
| | | <span v-if="formSelect.djfs == 1">线下兑换</span> |
| | | <span v-if="formSelect.djfs == 2">物流配送</span> |
| | | <span v-if="formSelect.djfs == 3">客服兑换</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="兑奖时间:" :label-width="formLabelWidth"> |
| | | {{formSelect.djsj}} |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row style="margin-top: 20px;"> |
| | | <el-col class="col-sm-2" > |
| | | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" v-if="formSelect.state == 1"> |
| | | <el-form-item label="兑奖码" prop="writeOffCode"> |
| | | <el-input v-model="ruleForm.writeOffCode" placeholder="请输入兑奖码"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col class="col-sm-2 text-center"> |
| | | <el-button type="primary" v-if="formSelect.state == 1" @click="dataSubmit('ruleForm')">核销</el-button> |
| | | <el-button type="danger" @click="cancelSubmit">关闭</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </body> |
| | | <script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script> |
| | | <script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script> |
| | | <script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> |
| | | |
| | | <script> |
| | | var writeoffId = $.query.get("writeoffId"); |
| | | var app = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | formLabelWidth: '120px', |
| | | formSelect: { |
| | | jpmc: '', |
| | | jptp: '', |
| | | sl: '', |
| | | zjr: '', |
| | | zjsj: '', |
| | | hdmc: '', |
| | | hdbh: '', |
| | | djfs: '', |
| | | state: '', |
| | | djsj: '' |
| | | }, |
| | | ruleForm : { |
| | | writeOffCode:'', |
| | | }, |
| | | rules : { |
| | | writeOffCode : [ |
| | | { required: true, message: '请输入兑奖码', trigger: 'blur' } |
| | | ], |
| | | }, |
| | | }, |
| | | created: function () { |
| | | this.loadInfo(); |
| | | }, |
| | | mounted: function () { |
| | | }, |
| | | methods: { |
| | | //加载分类 |
| | | loadInfo() { |
| | | let _this = this; |
| | | //加载配置 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data: {writeoffId}, |
| | | url: basePath + '/admin/activitySignWriteoff/findSignWriteoff', |
| | | callback: function (data) { |
| | | _this.formSelect = data.mapInfo.signWriteoffVo; |
| | | } |
| | | }); |
| | | }, |
| | | //核销 |
| | | dataSubmit : function(formName) { |
| | | const _this = this; |
| | | let flag = false; |
| | | _this.$refs[formName].validate((valid) => { |
| | | if (!valid) { |
| | | flag = true; |
| | | return; |
| | | } |
| | | }); |
| | | if (flag) { |
| | | return; |
| | | } |
| | | let resultData = { |
| | | writeoffId : writeoffId, |
| | | writeOffCode : _this.ruleForm.writeOffCode, |
| | | } |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data: resultData, |
| | | url: basePath + '/admin/activitySignWriteoff/writeoffCodeSubmit', |
| | | callback: function (data) { |
| | | _this.$message({ |
| | | message: data.info, |
| | | type: 'success', |
| | | }); |
| | | _this.loadInfo(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | cancelSubmit() { |
| | | this.closeFrame(); |
| | | }, |
| | | closeFrame() { |
| | | parent.layer.close(parent.layer.getFrameIndex(window.name)); |
| | | parent.location.reload(); |
| | | }, |
| | | } |
| | | }) |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |