Commit 550ea9b2 by wuwx

优惠券有效期支持到当天的时分秒

1 parent fbdd12b2
......@@ -15,6 +15,7 @@
"glsx-common": "^1.4.6",
"glsx-components": "^1.3.7",
"lodash": "^4.17.21",
"node-sass": "^4.0.0",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuex": "^3.1.2",
......
......@@ -42,7 +42,7 @@
<br />
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker v-model="editForm.effectiveTime" type="daterange" style="width: 295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
<el-date-picker v-model="editForm.effectiveTime" type="datetimerange" style="width: 295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOption" :default-time="defaultTime" :format="format" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays">
......@@ -112,6 +112,8 @@ export default {
name: 'editCashCoupon',
data() {
return {
defaultTime: ['00:00:00', '23:59:59'], // 选择日期后的默认时间
format: "yyyy-MM-dd HH:mm:ss", // 日期显示格式
showSubmit: true,
userDisable: false,
size: 'small',
......@@ -596,8 +598,8 @@ export default {
//时间段
const d = form.effectiveTime
if (d && d.length > 0) {
obj.effectiveStartTime = d[0] + ' 00:00:00'
obj.effectiveEndTime = d[1] + ' 23:59:59'
obj.effectiveStartTime = d[0]
obj.effectiveEndTime = d[1]
}
}
......
......@@ -52,7 +52,7 @@
<template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker v-model="editForm.effectiveTime" type="daterange" style="width: 295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
<el-date-picker v-model="editForm.effectiveTime" type="datetimerange" style="width: 295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays">
......@@ -85,6 +85,8 @@ export default {
name: 'editDiscountCoupon',
data() {
return {
defaultTime: ['00:00:00', '23:59:59'], // 选择日期后的默认时间
format: "yyyy-MM-dd HH:mm:ss", // 日期显示格式
showSubmit: true,
userDisable: false,
size: 'small',
......@@ -309,8 +311,8 @@ export default {
//时间段
const d = form.effectiveTime
if (d && d.length > 0) {
obj.effectiveStartTime = d[0] + ' 00:00:00'
obj.effectiveEndTime = d[1] + ' 23:59:59'
obj.effectiveStartTime = d[0]
obj.effectiveEndTime = d[1]
}
}
......
......@@ -31,7 +31,7 @@
<template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker v-model="editForm.effectiveTime" type="daterange" style="width: 295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
<el-date-picker v-model="editForm.effectiveTime" type="datetimerange" style="width: 295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays">
......@@ -64,6 +64,8 @@ export default {
name: 'editDiscountCoupon',
data() {
return {
defaultTime: ['00:00:00', '23:59:59'], // 选择日期后的默认时间
format: "yyyy-MM-dd HH:mm:ss", // 日期显示格式
showSubmit: true,
userDisable: false,
size: 'small',
......@@ -287,8 +289,8 @@ export default {
//时间段
const d = form.effectiveTime
if (d && d.length > 0) {
obj.effectiveStartTime = d[0] + ' 00:00:00'
obj.effectiveEndTime = d[1] + ' 23:59:59'
obj.effectiveStartTime = d[0]
obj.effectiveEndTime = d[1]
}
}
......
......@@ -74,7 +74,8 @@ export default {
useB: '',
// 表格
searchForm: {
phone: ''
phone: '',
// isYes:''
},
tableSearchForm: {},
// 搜索
......@@ -84,6 +85,15 @@ export default {
name: 'phone',
type: 'input',
maxlength: 11
},
{
label:'是否加企微',
name:'isYes',
type:'select',
optionList:[],
optionId: 'statusId',
optionLabel: 'statusName',
optionsName: 'isYesStatusList'
}
],
// 表格
......@@ -100,6 +110,13 @@ export default {
label: '用户昵称',
prop: 'userName'
},
{
label: '是否加入企微',
prop: 'isYes',
formatter: cellValue => {
return this.baseData.isYesStatusList.find(item => item.statusId == cellValue.isYes).statusName
}
},
{
label: '优惠券状态',
prop: 'userStatus',
......@@ -113,7 +130,7 @@ export default {
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
},
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
......@@ -135,6 +152,16 @@ export default {
confId: '3',
confName: '已过期'
}
],
isYesStatusList: [
{
statusId: '0',
statusName: '是'
},
{
statusId: '1',
statusName: '否'
}
]
},
exportLoading: false
......@@ -260,7 +287,8 @@ export default {
handleReset() {
this.searchForm = {
phone: ''
phone: '',
isYes:''
}
this.handleSearch()
},
......
......@@ -5,7 +5,7 @@
</template>
<script>
import E from 'wangeditor'
// import E from 'wangeditor'
export default {
name: 'textBox',
data() {
......@@ -15,23 +15,23 @@ export default {
}
},
mounted() {
this.getEdit()
// this.getEdit()
},
methods: {
getEdit() {
var editor = new E('#div-demo')
// getEdit() {
// var editor = new E('#div-demo')
editor.config.uploadImgShowBase64 = true
editor.config.showMenuTooltips = true
editor.config.menuTooltipPosition = 'down'
editor.config.height = 400
editor.config.uploadVideoServer = '/api/upload-video'
editor.config.excludeMenus = [
'code'
]
// editor.config.uploadImgShowBase64 = true
// editor.config.showMenuTooltips = true
// editor.config.menuTooltipPosition = 'down'
// editor.config.height = 400
// editor.config.uploadVideoServer = '/api/upload-video'
// editor.config.excludeMenus = [
// 'code'
// ]
editor.create()
}
// editor.create()
// }
}
}
</script>
......
......@@ -23,6 +23,13 @@
:formRules="item.editRule"
@handleImgDelete="handleFormImgDelete"
>
<template slot="businessType" slot-scope="scope">
<!-- {{ scope.scope }} -->
<!-- <div v-for="(item, idx) in scope.scope.optionList" :key="idx">{{item.confName}}</div> -->
<el-checkbox-group v-model="editForm.applicationType" @change="checkApplication">
<el-checkbox v-for="value in scope.scope.optionList" :key="value.confId" :label="value.confId">{{ value.confName }}</el-checkbox>
</el-checkbox-group>
</template>
<template slot="describeBtn">
<el-button :disabled="isDisabled" type="default" @click="handleDescribeImgAdd">+添加图片</el-button>
<span class="edit-tips m-l-20">最多可添加10张图片</span>
......@@ -489,6 +496,8 @@ export default {
classifyIdList: [],
zoneId: '',
descImgList: [],
businessType:'',
applicationType: [],
// 商品规格
// specificationDetailList: [],
retailPrice: '',
......@@ -578,6 +587,31 @@ export default {
})
}
},
{
label: '业务类型',
name: 'businessType',
addHtml: 'businessType',
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
optionList: [
{
confId: 1,
confName: '123'
},
{
confId: 2,
confName: '456'
},
{
confId: 3,
confName: '789'
}
],
// handleRadioChange: val => {
// this.handleTypeChange(val)
// }
},
{
label: '商品分类',
name: 'classifyIdList',
......@@ -837,6 +871,11 @@ export default {
},
methods: {
checkApplication(res1,res2,res3) {
console.log('res1',res1);
console.log('res2',res2);
console.log('res3',res3);
},
getBaseDate() {
return new Promise(resolve => {
Promise.all([this.$apis.common.getClassifyListApi({}), this.$apis.common.getZoneListApi({ zoneType: 2, merchantId: this.userInfo.merchantId })]).then(([classify, zone]) => {
......@@ -1172,6 +1211,7 @@ export default {
// 获取商品信息
getInfo() {
this.$apis.proManage.getProInfoApi({ id: this.routeInfo.id }).then(res => {
console.log('res',res);
this.editForm = {
...res,
goodsVideo: res.goodsVideo || '',
......@@ -1181,7 +1221,8 @@ export default {
goodsStock: res.goodsStock + '',
supplyPrice: res.supplyPrice ? (res.supplyPrice / 100).toFixed(2) : '',
describeTxt: '',
descImgList: []
descImgList: [],
applicationType:[]
}
// 是否需要安装
this.editForm.install = this.editForm.install || 'Y'
......@@ -1375,6 +1416,7 @@ export default {
})
// console.log(params)
this.$apis.proManage.insertOrUpdateProApi(params).then(res => {
console.log('res',res);
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!