作者 何书鹏

优惠券去掉有效时间和用券时间

... ... @@ -88,6 +88,8 @@ class Coupons extends Backend
$params = $this->request->post();
if ($params) {
$params = json_decode($params['data'], true);
$params['gettime'] = date('Y-m-d H:i:s') . ' - ' .date('Y-m-d H:i:s',strtotime('+30year'));
$params['usetime'] = date('Y-m-d H:i:s') . ' - ' .date('Y-m-d H:i:s',strtotime('+30year'));
$result = false;
Db::startTrans();
try {
... ... @@ -137,6 +139,8 @@ class Coupons extends Backend
$params = $this->request->post();
if ($params) {
$params = json_decode($params['data'], true);
$params['gettime'] = date('Y-m-d H:i:s') . ' - ' .date('Y-m-d H:i:s',strtotime('+30year'));
$params['usetime'] = date('Y-m-d H:i:s') . ' - ' .date('Y-m-d H:i:s',strtotime('+30year'));
$result = false;
Db::startTrans();
try {
... ...
... ... @@ -78,7 +78,7 @@
<el-form-item label="优惠券描述:">
<el-input type="input" v-model="detailData.description" placeholder="仅商家端显示,用于区分相似优惠券(最多可输入十个字)"></el-input>
</el-form-item>
<el-form-item label="领取时间:" prop="gettime">
<!--<el-form-item label="领取时间:" prop="gettime">
<el-date-picker v-model="detailData.gettime" type="datetimerange" range-separator="至" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
... ... @@ -87,7 +87,7 @@
<el-date-picker v-model="detailData.usetime" type="datetimerange" range-separator="至" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-form-item>-->
<el-form-item label="发券总量:">
<div class="display-flex">
<el-input type="number" v-model="detailData.stock" style="width:170px;" placeholder="请输入发券总量">
... ...
... ... @@ -78,7 +78,7 @@
<el-form-item label="优惠券描述:">
<el-input type="input" v-model="detailData.description" placeholder="仅商家端显示,用于区分相似优惠券(最多可输入十个字)"></el-input>
</el-form-item>
<el-form-item label="有效时间:" prop="gettime">
<!--<el-form-item label="有效时间:" prop="gettime">
<el-date-picker v-model="detailData.gettime" type="datetimerange" range-separator="至" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
... ... @@ -87,7 +87,7 @@
<el-date-picker v-model="detailData.usetime" type="datetimerange" range-separator="至" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-form-item>-->
<el-form-item label="发券总量:">
<div class="display-flex">
<el-input type="number" v-model="detailData.stock" style="width:170px;" placeholder="请输入发券总量">
... ...
... ... @@ -525,8 +525,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
this.$refs[check].validate((valid) => {
if (valid) {
let subData = JSON.parse(JSON.stringify(that.detailData));
subData.gettime=subData.gettime.join(' - ');
subData.usetime=subData.usetime.join(' - ');
// subData.gettime=subData.gettime.join(' - ');
// subData.usetime=subData.usetime.join(' - ');
if(subData.goods_type=='all'){
subData.goods_ids=0
}else{
... ...