Commit 3f46c396 by cwq0219

merge

2 parents fac2f0c5 1defe410
......@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.2.0",
"glsx-components": "^1.2.2",
"lodash": "^4.17.21",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
......@@ -41,4 +41,4 @@
"> 1%",
"last 2 versions"
]
}
}
\ No newline at end of file
......@@ -2,10 +2,10 @@
function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) {
/* eslint-disable */
var reg = {
priceReg: /^\d[\d\.]*$/,
numReg: /^[1-9]\d*$/
}
/* eslint-enable */
priceReg: /^\d[\d\.]*$/,
numReg: /^[1-9]\d*$/
}
/* eslint-enable */
regRule = regRule || 'priceReg'
if (newValue && ((minValue && newValue < minValue) || (maxValue && newValue > maxValue))) {
return oldValue || ''
......@@ -76,23 +76,22 @@ const auditStatusList = [{
]
//会员中心得状态list
const statusList=[
// {
// confId: '',
// confName: '全部'
// },
{
confId: 1,
confName: '生效中'
},
{
confId: 2,
confName: '已失效'
}
]
//会员订单类型字典
const orderTypesList=[
{
const statusList = [
// {
// confId: '',
// confName: '全部'
// },
{
confId: 1,
confName: '生效中'
},
{
confId: 2,
confName: '已失效'
}
]
//会员订单类型字典
const orderTypesList = [{
confId: 1,
confName: '套餐'
},
......@@ -101,7 +100,7 @@ const orderTypesList=[
confName: '会员卡'
}
]
const orderStatusList=[
const orderStatusList = [
// 2: '待收货',
// 3: '已完成',
// 4: '售后中',
......@@ -128,8 +127,7 @@ const orderStatusList=[
confName: '已经退款'
},
]
const serviceStatusList=[
{
const serviceStatusList = [{
confId: 1,
confName: '未生效'
},
......@@ -143,8 +141,7 @@ const serviceStatusList=[
}
]
const memberTypeList=[
{
const memberTypeList = [{
confId: 1,
confName: '正式会员'
},
......@@ -153,8 +150,7 @@ const memberTypeList=[
confName: '试用会员'
}
]
const stateList=[
{
const stateList = [{
confId: 0,
confName: '待上架'
},
......@@ -168,5 +164,14 @@ const stateList=[
},
]
export { limitPrice, liveStatusList, auditStatusList,statusList ,serviceStatusList,
memberTypeList,stateList,orderTypesList,orderStatusList}
\ No newline at end of file
export {
limitPrice,
liveStatusList,
auditStatusList,
statusList,
serviceStatusList,
memberTypeList,
stateList,
orderTypesList,
orderStatusList
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
<div class="glsx-combi-form">
<el-form :ref="formRef" :inline="true" :model="formObj" :label-width="labelWidth" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ ...item.style }" :label="item.label ? item.label + ':' : ''" :prop="item.name">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
......
......@@ -3,43 +3,40 @@
<div class="edit-share marketing p-t-20">
<div class="container edit-container">
<p class="edit-title">{{ title }}代金券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="144px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="useChannelHtml">
<el-radio v-model="editForm.useChannel" label="1" :disabled="apear!='couponAdd'">线上商品</el-radio>
<el-radio v-model="editForm.useChannel" label="2" :disabled="apear!='couponAdd'" @change="clickUseChannel">到店核销</el-radio>
</template>
<template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear!='couponAdd'">无有效期</el-radio><br>
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveTime">
<el-form-item prop="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"
:disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable>
</el-date-picker>
</el-form-item>
</el-radio><br>
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveDays">
领取后&nbsp;&nbsp;<el-input v-model="editForm.effectiveDays" style="width: 100px;" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />&nbsp;&nbsp;天内有效
<!-- <el-input v-model="editForm.effectiveDays" style="width: 250px;" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" >
<span slot="prepend">领取后</span>
<span slot="append">天内有效</span>
</el-input> -->
</el-form-item>
</el-radio>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays">
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
领取后你好<el-input v-model="editForm.effectiveDays" style="width:100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />天内有效
</el-radio>
</el-form-item>
</template>
<template slot="useBarriersHtml">
<el-radio v-model="editForm.useBarriers" label="1" :disabled="apear!='couponAdd'">无限制</el-radio>
<el-radio v-model="editForm.useBarriers" label="2" :disabled="apear!='couponAdd' || editForm.useChannel == 2">
<el-form-item prop="full">
订单满<el-input v-model="editForm.full" placeholder="输入金额(元)" style="width: 110px;" :disabled="apear!='couponAdd'|| editForm.useBarriers != 2" />元可用
</el-form-item>
</el-radio>
<el-form-item prop="full">
<el-radio v-model="editForm.useBarriers" label="2" :disabled="apear!='couponAdd' || editForm.useChannel == 2">
订单满<el-input v-model="editForm.full" placeholder="输入金额(元)" style="width: 110px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.useBarriers != 2" />元可用
</el-radio>
</el-form-item>
</template>
<template slot="denominationHtml">
<el-input v-model="editForm.denomination" style="width: 150px" :disabled="apear!='couponAdd'" @blur.native.capture="denominationBlur">
......@@ -64,7 +61,7 @@
</GLTable>
</div>
<template slot="useDescriptionHtml">
<el-input type="textarea" v-model="editForm.useDescription" style="width: 308px" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" :disabled="apear=='couponSee'" />
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" :disabled="apear=='couponSee'" />
</template>
</glsx-combi-form>
</div>
......@@ -110,24 +107,11 @@
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear=='couponSee'" @click="handleCancel">返回</el-button>
</div>
<select-muti-pro-forcoupon-dialog v-if="isMutiSelectVisible" :isMutiSelectVisible="isMutiSelectVisible" :searchForm="searchProForm" :selectedProList="selectedProList" @handleMutiSelectConfirm="handleMutiSelectConfirm" @handleMutiSelectClose="handleMutiSelectClose">
<!-- <template slot="search">
<div class="flex">
<el-form :inline="true" :model="searchProForm">
<el-form-item label="商品名称:">
<el-input :size="size" v-model="searchProForm.name" placeholder="请输入商品名称" maxlength="20" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button :size="size" type="primary" @click="handleConfigSearch">查询</el-button>
<el-button :size="size" @click="handleConfigReset">重置</el-button>
</el-form-item>
</el-form>
</div>
</template> -->
</select-muti-pro-forcoupon-dialog>
</div>
</template>
......
......@@ -5,27 +5,28 @@
<p class="edit-title">{{ title }}折扣劵</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveTime">
<el-form-item prop="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"
:disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable>
</el-date-picker>
</el-form-item>
</el-radio><br>
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveDays">
领取后&nbsp;&nbsp;<el-input v-model="editForm.effectiveDays" style="width: 100px;" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />&nbsp;&nbsp;天内有效
</el-form-item>
</el-radio>
</el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays">
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
领取后<el-input v-model="editForm.effectiveDays" style="width: 100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />天内有效
</el-radio>
</el-form-item>
</template>
<template slot="useDescriptionHtml">
<el-input type="textarea" v-model="editForm.useDescription" style="width: 308px" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" :disabled="apear=='couponSee'" />
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" :disabled="apear=='couponSee'" />
</template>
</glsx-combi-form>
</div>
......@@ -48,8 +49,8 @@
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear=='couponSee'" @click="handleCancel">返回</el-button>
</div>
</div>
......
......@@ -5,27 +5,28 @@
<p class="edit-title">{{ title }}兑换券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveTime">
<el-form-item prop="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"
:disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable>
</el-date-picker>
</el-form-item>
</el-radio><br>
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveDays">
领取后&nbsp;&nbsp;<el-input v-model="editForm.effectiveDays" style="width: 100px;" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />&nbsp;&nbsp;天内有效
</el-form-item>
</el-radio>
</el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays">
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
领取后<el-input v-model="editForm.effectiveDays" style="width: 100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />天内有效
</el-radio>
</el-form-item>
</template>
<template slot="useDescriptionHtml">
<el-input type="textarea" v-model="editForm.useDescription" style="width: 308px" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" :disabled="apear=='couponSee'" />
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" :disabled="apear=='couponSee'" />
</template>
</glsx-combi-form>
</div>
......@@ -48,8 +49,8 @@
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear=='couponSee'" @click="handleCancel">返回</el-button>
</div>
</div>
......
......@@ -6,46 +6,47 @@
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear!='couponAdd'">无有效期</el-radio><br>
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveTime">
<el-form-item prop="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"
:disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable>
</el-date-picker>
</el-form-item>
</el-radio><br>
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveDays">
领取后&nbsp;&nbsp;<el-input v-model="editForm.effectiveDays" style="width: 100px;" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />&nbsp;&nbsp;天内有效
</el-form-item>
</el-radio>
</el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays">
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
领取后<el-input v-model="editForm.effectiveDays" style="width: 100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />天内有效
</el-radio>
</el-form-item>
</template>
<template slot="useTypeHtml">
<el-radio v-model="editForm.useType" label="0" :disabled="apear!='couponAdd'">无限制</el-radio><br>
<el-radio v-model="editForm.useType" label="1" :disabled="apear!='couponAdd'">
<el-form-item prop="usageTimes">
有效期内可使用&nbsp;&nbsp;
<el-input v-model="editForm.usageTimes" style="width: 100px;" :disabled="apear!='couponAdd'|| editForm.useType != 1" />&nbsp;&nbsp;次
</el-form-item>
</el-radio><br>
<el-form-item prop="usageTimes" style="margin-top: 12px;display: block;">
<el-radio v-model="editForm.useType" label="1" :disabled="apear!='couponAdd'">
有效期内可使用
<el-input v-model="editForm.usageTimes" style="width: 100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.useType != 1" />次
</el-radio>
</el-form-item>
<el-radio v-model="editForm.useType" label="2" :disabled="apear!='couponAdd'">
<el-form-item prop="useLimitDays">
有效期内
<el-input v-model="editForm.useLimitDays" style="width: 100px;" :disabled="apear!='couponAdd'|| editForm.useType != 2" />&nbsp;&nbsp;天
&nbsp;&nbsp;可使用&nbsp;&nbsp;
有效期内
<el-input v-model="editForm.useLimitDays" style="width: 100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.useType != 2" />
天可使用
</el-form-item>
<el-form-item prop="usageTimes2">
<el-input v-model="editForm.usageTimes2" style="width: 100px;" :disabled="apear!='couponAdd'|| editForm.useType != 2" />&nbsp;&nbsp;次
<el-input v-model="editForm.usageTimes2" style="width: 100px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.useType != 2" />次
</el-form-item>
</el-radio>
</template>
<template slot="useDescriptionHtml">
<el-input type="textarea" v-model="editForm.useDescription" style="width: 308px" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" :disabled="apear=='couponSee'" />
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" :disabled="apear=='couponSee'" />
</template>
</glsx-combi-form>
</div>
......@@ -68,8 +69,8 @@
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear=='couponSee'" @click="handleCancel">返回</el-button>
</div>
</div>
......
......@@ -11,8 +11,8 @@
<div>
<glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
......@@ -65,6 +65,7 @@ export default {
label: '名称',
name: 'couponName',
type: 'input',
width: '215px',
maxlength: 20
},
// {
......@@ -78,7 +79,7 @@ export default {
label: '优惠券类型',
name: 'discountType',
type: 'select',
width: '160px',
width: '215px',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
......@@ -88,7 +89,7 @@ export default {
label: '优惠券状态',
name: 'status',
type: 'select',
width: '160px',
width: '215px',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
......
......@@ -5,10 +5,10 @@
<div>
<glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="writeOff">优惠券核销</el-button>
<el-button :size="size" type="primary" @click="goback">返回</el-button>
<el-button :size="size" @click="goback">返回</el-button>
</span>
</glsx-combi-form>
</div>
......
......@@ -150,12 +150,15 @@
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
:picker-options="dateOptions"
@change="changeValue"
></el-date-picker>-
<el-time-picker
v-model="basicForm.sendDate"
size="small"
value-format="HH:mm:ss"
placeholder="选择时间"
:picker-options="timeOptions"
></el-time-picker>
</div>
</el-form-item>
......@@ -278,7 +281,17 @@ export default {
// 是否有修改筛选成员
isUpdate: true,
tagging: [],
groupNumber: ''
groupNumber: '',
dateOptions: {
disabledDate(time) {
let now = new Date()
now.setTime(now.getTime() - 3600 * 1000 * 24)
return time.getTime() < now
}
},
timeOptions: {
selectableRange: '00:00:00 - 23:59:59'
}
}
},
mounted() {
......@@ -438,6 +451,22 @@ export default {
this.groupNumber = res
this.isUpdate = false
})
},
changeValue(v) {
console.log(v, Date.now())
const date = new Date(v).getTime()
if (date < Date.now()) {
this.timeOptions = {
selectableRange: `${dayjs()
.add(1, 'm')
.format('HH:mm')}:00 - 23:59:59`
}
console.log(this.timeOptions)
} else {
this.timeOptions = {
selectableRange: '00:00:00 - 23:59:59'
}
}
}
}
}
......
......@@ -52,12 +52,15 @@
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
:picker-options="dateOptions"
@change="changeValue"
></el-date-picker>-
<el-time-picker
v-model="basicForm.sendDate"
size="small"
value-format="HH:mm:ss"
placeholder="选择时间"
:picker-options="timeOptions"
></el-time-picker>
</div>
</el-form-item>
......@@ -97,6 +100,7 @@ import Vue from 'vue'
import WelcomeWords from './components/welcomeWords.vue'
import SelectMembers from './components/selectMembers.vue'
import Preview from './components/preview.vue'
import * as dayjs from 'dayjs'
export default {
components: {
WelcomeWords,
......@@ -166,7 +170,17 @@ export default {
]
},
membersVisible: false,
key: new Date()
key: new Date(),
dateOptions: {
disabledDate(time) {
let now = new Date()
now.setTime(now.getTime() - 3600 * 1000 * 24)
return time.getTime() < now
}
},
timeOptions: {
selectableRange: '00:00:00 - 23:59:59'
}
}
},
mounted() {
......@@ -246,6 +260,22 @@ export default {
})
}
})
},
changeValue(v) {
console.log(v, Date.now())
const date = new Date(v).getTime()
if (date < Date.now()) {
this.timeOptions = {
selectableRange: `${dayjs()
.add(1, 'm')
.format('HH:mm')}:00 - 23:59:59`
}
console.log(this.timeOptions)
} else {
this.timeOptions = {
selectableRange: '00:00:00 - 23:59:59'
}
}
}
}
}
......
......@@ -185,7 +185,7 @@ export default {
}
.statistics-li {
display: inline-block;
width: 142px;
// width: 142px;
color: #424242;
font-size: 14px;
text-align: center;
......@@ -193,6 +193,7 @@ export default {
&.statistics-border {
padding-right: 35 px;
margin-right: 0;
padding-right: 36px;
border-right: 1px solid #5850ff;
}
.statistics-number {
......
......@@ -28,7 +28,7 @@
:class="[item.status == 0 ? 'unsend' : 'send']"
>{{ item.status == 0 ? '未' : '已' }}发送</span>
</div>
<div class="info-num">共{{ item.customerCount }}个客户</div>
<div class="info-num">共{{ item.customerCount ? item.customerCount : 0 }}个客户</div>
</div>
<div class="info-right">
<div v-if="item.remindStatus == 1">已提醒</div>
......@@ -68,6 +68,7 @@
<div class="info-name">
{{ item.customerName }}
<div
class="customer-table"
:class="[item.status == 0 ? 'unsend' : 'send']"
>{{ item.status == 0 ? '未' : '已' }}送达</div>
</div>
......@@ -260,6 +261,9 @@ export default {
color: #fff;
border-radius: 2px;
}
.customer-table {
display: table;
}
div {
margin-top: 10px;
font-size: 14px;
......
......@@ -98,7 +98,7 @@
title="浏览量"
width="200"
trigger="hover"
content="购买活动商品的账号数量。"
content="进入活动页面但未购买商品的张傲数量+购买活动商品的账号数量。"
>
<img slot="reference" :src="iconUrl" alt />
</el-popover>
......@@ -116,7 +116,7 @@
title="累计销量"
width="200"
trigger="hover"
content="购买活动商品的账号数量。"
content="购买活动商品付款金额的累加。"
>
<img slot="reference" :src="iconUrl" alt />
</el-popover>
......
......@@ -75,7 +75,7 @@
</el-form-item>
</el-row>
</el-form>
<GLTable ref="memberCenterRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable v-if="isReload" ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="accountName" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div>
......@@ -84,26 +84,26 @@
</div>
<glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<!-- <el-scrollbar> -->
<div class="modal-body">
<div class="equity-name">汽车权益</div>
<div class="equity-panel">
<div class="equity-item" v-for="(item, index) in merchantData.carServiceList" :key="index">
<div class="equity-item-icon"><img :src="item.equityIcon" /></div>
<div class="equity-item-name">{{ item.equityName }}</div>
<div class="equity-item-desc">{{ item.equityDesc }}</div>
</div>
<div class="modal-body">
<div class="equity-name">汽车权益</div>
<div class="equity-panel">
<div class="equity-item" v-for="(item, index) in merchantData.carServiceList" :key="index">
<div class="equity-item-icon"><img :src="item.equityIcon" /></div>
<div class="equity-item-name">{{ item.equityName }}</div>
<div class="equity-item-desc">{{ item.equityDesc }}</div>
</div>
<div v-for="(item, index) in merchantData.goodsServiceList" :key="index">
<div class="equity-name">{{ item.goodsCategory }}</div>
<div class="equity-panel">
<div class="equity-item" v-for="(v, xindex) in item.equityGoodsGroupDescDtos" :key="xindex">
<div class="equity-item-icon"><img :src="v.equityIcon" /></div>
<div class="equity-item-name">{{ v.equityName }}</div>
<div class="equity-item-desc">{{ v.equityDesc }}</div>
</div>
</div>
<div v-for="(item, index) in merchantData.goodsServiceList" :key="index">
<div class="equity-name">{{ item.goodsCategory }}</div>
<div class="equity-panel">
<div class="equity-item" v-for="(v, xindex) in item.equityGoodsGroupDescDtos" :key="xindex">
<div class="equity-item-icon"><img :src="v.equityIcon" /></div>
<div class="equity-item-name">{{ v.equityName }}</div>
<div class="equity-item-desc">{{ v.equityDesc }}</div>
</div>
</div>
</div>
</div>
<!-- </el-scrollbar> -->
</glsx-dialog>
</div>
......@@ -135,6 +135,7 @@ export default {
// }, 1000)
}
return {
isReload: true,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -190,13 +191,12 @@ export default {
},
{
label: '开通方式',
prop: 'activeTypeDesc',
prop: 'activeTypeDesc'
},
{
label: '开通日期',
prop: 'activeTime',
prop: 'activeTime'
// addHtml: 'activeTime'
},
{
......@@ -237,7 +237,7 @@ export default {
//权益 - 弹窗
isDialogVisible: false,
merchantData: {},
merchantId: 44184606 //记得改
merchantId: 0 //记得改 44184606
}
},
created() {
......@@ -281,12 +281,11 @@ export default {
},
getCardContentFun() {
getCardContent({ merchantId: this.merchantId }).then(res => {
this.ruleForm.equityId = res[0].id
this.ruleForm.equityId = res[0].id
this.ruleForm.cardName = res[0].cardClassName
this.ruleForm.price = res[0].price
this.ruleForm.marketPrice = res[0].marketPrice
this.ruleForm.linkUrl = res[0].url
})
},
openEditWrap() {
......@@ -333,16 +332,21 @@ export default {
})
},
handleReset() {
// this.searchForm = {
// name: '',
// status: '-1'
// }
this.isReload = false
this.searchForm = {}
this.handleSearch()
this.$nextTick(() => {
this.isReload = true
})
},
handleSearch() {
this.$refs.memberCenterRef.refreshTable()
},
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.memberCenterRef.data.length) {
this.$refs.memberCenterRef.setTableHeightFun()
}
},
handleClose() {
this.isDialogVisible = !this.isDialogVisible
},
......@@ -439,7 +443,7 @@ export default {
}
.editForm {
padding-top: 0px;
.cardNameInput{
.cardNameInput {
width: 423px;
}
}
......@@ -447,7 +451,7 @@ export default {
.pageTitle {
position: relative;
padding: 0 0px;
padding: 0 0px;
height: 20px;
font-size: 20px;
font-weight: 700;
......
......@@ -2,15 +2,15 @@
<div class="live-room">
<div class="live-room container">
<div class="flex">
<el-form :inline="true" style="width:100%" :model="searchForm" label-width="70px" label-position="right">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row>
<el-form-item size="small" label="订单编号">
<el-input :size="size" v-model="searchForm.orderCode" placeholder="请输入订单编号" clearable></el-input>
</el-form-item>
<el-form-item size="small" label="名称" style="margin-left:20px">
<el-form-item size="small" label="名称" style="margin-left: 20px">
<el-input :size="size" v-model="searchForm.packageName" placeholder="请输入名称" clearable></el-input>
</el-form-item>
<el-form-item size="small" label="类型" style="margin-left:-10px">
<el-form-item size="small" label="类型" style="margin-left: -10px">
<el-select size="small" v-model="searchForm.orderType" placeholder="请选择">
<el-option v-for="item in orderTypeList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
......@@ -24,7 +24,7 @@
<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="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item>
......@@ -36,12 +36,12 @@
{{ item }}
</div>
</div>
<GLTable ref="memberOrderRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable ref="memberOrderRef" v-if="isReload" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<!-- <span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" />
</span> -->
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType==1">详情</el-button>
<el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button>
</span>
</GLTable>
</div>
......@@ -54,6 +54,7 @@ import { getOrderListApi } from '@/api/modules/order'
export default {
data() {
return {
isReload: true,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -162,7 +163,7 @@ export default {
break
case 3:
delete this.searchForm.orderStatus
delete this.searchForm['orderStatus[1]']
delete this.searchForm['orderStatus[1]']
delete this.searchForm['orderStatus[2]']
this.searchForm['orderStatus[0]'] = 3
break
......@@ -202,9 +203,21 @@ export default {
handleSearch() {
this.$refs.memberOrderRef.refreshTable()
},
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.memberOrderRef.data.length) {
this.$refs.memberOrderRef.setTableHeightFun()
}
},
handleReset() {
this.isReload = false
this.currentIndex = 1
this.searchForm = {}
this.handleSearch()
this.searchForm.orderStatus = '' //默认查询全部
// this.handleSearch()
this.$nextTick(() => {
this.isReload = true
})
}
}
}
......
......@@ -67,7 +67,8 @@
</el-table-column>
<el-table-column prop="orderStatus" label="状态" align="center">
<template slot-scope="scope">
<span>{{ scope.row.orderStatus == 2 ? '待收货' : scope.row.orderStatus == 3 ? '已完成' : scope.row.orderStatus == 4 ? '售后中' : scope.row.orderStatus == 2 ? '退款失败' : scope.row.orderStatus == 2 ? '已退款' : '' }}</span>
<span>{{ scope.row.orderStatus == 2 ? '待收货' : scope.row.orderStatus == 3 ? '已完成' : scope.row.orderStatus == 4 ? '售后中' : scope.row.orderStatus == 5 ? '退款失败' : scope.row.orderStatus == 6 ? '已退款' : '' }}</span>
<div>{{scope.row.refundReason}}</div>
</template>
</el-table-column>
</el-table>
......@@ -113,25 +114,12 @@ export default {
this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice)
this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice)
this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus)
this.$set(this.tableData[0],'refundReason',this.detail.refundReason)
}else{
this.$message.error(`${res.message}`)
}
})
},
// setTableData() {
// this.$set(this.tableData[0], 'couponList', this.detail.couponList)
// this.$set(this.tableData[0], 'orderType', this.detail.orderType)
// this.$set(this.tableData[0], 'effectiveNum', this.detail.effectiveNum)
// this.$set(this.tableData[0], 'originalPrice', this.detail.originalPrice)
// this.$set(this.tableData[0], 'amount', 1)
// this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice)
// this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice)
// this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus)
// console.log(this.tableData[0], '表格数据')
// },
goBack() {
console.log(this.detail, 'gggg')
this.$router.go(-1)
......
......@@ -37,7 +37,7 @@
</el-row>
</el-form>
</div>
<GLTable ref="memberRecordRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable ref="memberRecordRef" v-if="isReload" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="verificationTime" slot-scope="scope">
<span>{{ dateFormatFun(scope.scope.verificationTime) }}</span>
</span>
......@@ -53,6 +53,7 @@ export default {
name: 'record',
data() {
return {
isReload:true,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -68,7 +69,7 @@ export default {
userReq: '',
verificationOperator: '',
orderCode: '',
merchantId: 44184606
merchantId: 0
},
// 44187877
searchFormTable: {},
......@@ -115,10 +116,18 @@ export default {
addHtml: 'verificationTime'
}
]
}
},
merchantId: 0
}
},
created () {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
this.searchForm.merchantId=this.merchantId
}
},
methods: {
dateFormatFun(date) {
return dateFormat(date)
......@@ -143,15 +152,7 @@ export default {
this.$refs.memberRecordRef.setTableHeightFun()
}
},
// handleShare(row) {
// getLiveShareApi({ id: row.id }).then(res => {
// console.log(res)
// this.isShareVisible = !this.isShareVisible
// this.shareForm = res
// })
// },
handleShareClose() {
// this.handleShare()
this.isShareVisible = !this.isShareVisible
},
......@@ -186,8 +187,13 @@ export default {
this.$refs.memberRecordRef.refreshTable()
},
handleReset() {
this.searchForm = { merchantId: 44184606 }
this.handleSearch()
// this.searchForm = { merchantId: 44184606 }
// this.handleSearch()
this.isReload=false
this.searchForm={ merchantId: this.merchantId }
this.$nextTick(()=>{
this.isReload=true
})
}
}
}
......
......@@ -18,7 +18,7 @@
</el-form-item>
</el-row>
</el-form>
<GLTable ref="memberServiceRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable v-if="isReload" ref="memberServiceRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span>
</span>
......@@ -57,6 +57,7 @@ export default {
},
data() {
return {
isReload:true,
isFirstShow: false,
panelContent: '会员服务:是由门店根据自店服务项目创建的线上服务券,如“一年十二次洗车券”、“陶瓷镀膜”等,客户购买后可到店出示服务券享受服务,门店扫码进行次数核销。',
size: 'small',
......@@ -164,14 +165,19 @@ export default {
},
handleReset() {
this.isReload=false
this.searchForm = { couponName: '', merchantId: this.merchantId, discountType:7 }
this.handleSearch()
// this.handleSearch()
this.$nextTick(()=>{
this.isReload=true
})
},
handleSearch() {
this.$refs.memberServiceRef.refreshTable()
},
setTableFinishFun(content) {
console.log(content, this.$refs.memberServiceRef.data.length, '获取数据')
// console.log(content, this.$refs.memberServiceRef.data.length, '获取数据')
//接收到的数据为空
if (!this.$refs.memberServiceRef.data.length) {
this.$refs.memberServiceRef.setTableHeightFun()
......
......@@ -6,7 +6,7 @@
<el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button>
<el-button :size="size" @click="isDialogVisible = true">查看示例效果</el-button>
</div>
<GLTable ref="memberSetMealRef" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable ref="memberSetMealRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="list" slot-scope="scope">
<div v-for="(item, index) in scope.scope.list" :key="index">{{ item.couponName }}×{{ item.serviceQuantity }}</div>
</span>
......@@ -26,21 +26,17 @@
</span>
</GLTable>
</div>
<!-- btnCancelLabel="关闭" -->
<!-- btnCancelLabel="关闭" -->
<glsx-dialog title="示例效果" width="1142px" :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="content-body">
<div class="content-item col1">
<div class="subTitle">
1、管理后台先创建套餐
</div>
<div class="subTitle">1、管理后台先创建套餐</div>
<div class="imageWrap">
<img src="@/assets/table.png" alt="" />
</div>
</div>
<div class="content-item col2">
<div class="subTitle">
2、小程序端进行展示
</div>
<div class="subTitle">2、小程序端进行展示</div>
<div class="twoImageWrap">
<img src="@/assets/card1.png" alt="" />
<img src="@/assets/card2.png" alt="" />
......@@ -120,11 +116,11 @@ export default {
isDialogVisible: false
}
},
created () {
this.getLoginCountFun()
created() {
this.getLoginCountFun()
},
methods: {
getLoginCountFun() {
getLoginCountFun() {
//loginType:5是查会员套餐浏览次数
getLoginCount({ loginType: 5 }).then(res => {
//获取是否第一次点击该页面
......@@ -143,6 +139,13 @@ export default {
handleSearch() {
this.$refs.memberSetMealRef.refreshTable()
},
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.memberSetMealRef.data.length) {
this.$refs.memberSetMealRef.setTableHeightFun()
}
},
//创建套餐
handleCreate() {
this.$router.push('/memberCenter/setmealAddUpdate')
......@@ -222,19 +225,18 @@ export default {
margin-bottom: 20px;
}
/deep/ .el-dialog__header {
.main-title{
font-size: 16px;
/deep/ .el-dialog__header {
.main-title {
font-size: 16px;
font-weight: 700;
color: #000000;
font-weight: 700;
color: #000000;
}
}
/deep/ .el-dialog__body {
border-top: 1px solid #e6e6e6;
border-bottom: 1px solid #e6e6e6;
padding: 20px 25px;
border-bottom: 1px solid #e6e6e6;
padding: 20px 25px;
.content-body {
display: flex;
......@@ -249,13 +251,14 @@ export default {
font-weight: 700;
color: #000000;
}
.imageWrap,.twoImageWrap{
margin-left: 25px;
img{
border: 1.5px solid rgba(0, 0, 0, 0.03);
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.03);
.imageWrap,
.twoImageWrap {
margin-left: 25px;
img {
border: 1.5px solid rgba(0, 0, 0, 0.03);
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.03);
}
img+img{
img + img {
margin-left: 22px;
}
}
......
<template>
<div class="live-room">
<div class="topMsg">
<p class="pageTitle">创建套餐</p>
<p class="pageTitle" v-if="!id">创建套餐</p>
<p class="pageTitle" v-else>编辑套餐</p>
<el-button type="primary" size="small" @click="goBack">返回</el-button>
</div>
<div class="live-room container">
<el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item size="small" label="套餐名称" prop="packageName" style="width: 440px">
<el-input size="small" v-model="ruleForm.packageName" maxlength="20" placeholder="请输入套餐名称"></el-input>
<el-input size="small" v-model="ruleForm.packageName" maxlength="20" placeholder="请输入套餐名称"></el-input>
</el-form-item>
<el-form-item size="small" label="套餐内容" class="is-required">
<el-button @click="openDialog" size="small" icon="el-icon-plus">选择服务</el-button>
......@@ -202,7 +203,7 @@ export default {
}
}
})
console.log('编辑内容', this.choseItemList, this.totalPrice)
this.copyTotalPrice = this.totalPrice
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
this.copyChoseItemList = this.choseItemList
......@@ -224,7 +225,7 @@ export default {
serviceQuantity: 0
}
})
console.log(this.allItemList, '服务套餐')
if (this.id) {
this.getServiceInfo() //获取编辑详情
}
......@@ -241,12 +242,12 @@ export default {
closeChoseItemFun(item, index) {
this.totalPrice = this.totalPrice - item.vipPrice * item.serviceQuantity
// item.serviceQuantity = 0
this.allItemList.forEach(ele => {
if (ele.id == item.serviceId) {
ele.serviceQuantity = 0
}
})
this.selectNumFun()
// this.allItemList.forEach(ele => {
// if (ele.id == item.serviceId) {
// ele.serviceQuantity = 0
// }
// })
// this.selectNumFun()
this.choseItemList.splice(index, 1)
},
selectNumFun() {
......@@ -400,7 +401,8 @@ export default {
...ele,
serviceId: ele.id
}
})
})
console.log('确定之后choseItemList', this.choseItemList)
this.setmealDialogVisible = false
},
handleClose() {
......@@ -414,7 +416,7 @@ export default {
// //第二个参数这里是对象,不是number(n)
// return preValue + choseItem.vipPrice * choseItem.serviceQuantity
// }, 0)
this.getSetmealServiceFun()
// this.getSetmealServiceFun()
},
handleTipClose() {
this.isTipDialogVisible = false
......
......@@ -5,7 +5,7 @@
<p class="edit-title">{{ title }}秒杀活动</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="activityTimeHtml">
<el-form-item>
<!-- <el-form-item> -->
<el-date-picker
v-model="editForm.activityTime"
type="datetimerange"
......@@ -16,13 +16,12 @@
:picker-options="pickerOptions"
:disabled="isDisabled" clearable>
</el-date-picker>
</el-form-item>
<!-- </el-form-item> -->
</template>
<div slot="goodsHtml">
<el-button type="primary" v-if="apear!='see'" @click="handleRelateProClose">选择商品</el-button>
<div v-if="selectedProInfo.id && !specificationDetailList.length">
<div v-if="selectedProInfo.id && !specificationDetailList.length" style="margin-top:10px">
<p>
<!-- <img ng-src="{{selectPro.goodsImage}}" style="width: 50px;height:50px;"/> -->
<img class="img-60" :src="selectedProInfo.goodsImage"/>
&nbsp;&nbsp;&nbsp;
零售价 {{(selectedProInfo.retailPrice/100).toFixed(2)}}元
......@@ -83,8 +82,8 @@
</glsx-combi-form>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear!='see'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear!='see'" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="apear!='see'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear=='see'" @click="handleCancel">返回</el-button>
</div>
<select-single-pro-dialog v-if="isSingleSelectVisible" :isSingleSelectVisible="isSingleSelectVisible" :selectedProInfo="selectedProInfo" @handleSingleSelectConfirm="handleSingleSelectConfirm" @handleSingleSelectClose="handleSingleSelectClose"></select-single-pro-dialog>
......@@ -136,7 +135,8 @@ export default {
promotion: '',
activityTime: [],
activityPrice: '',
goodsStock: ''
goodsStock: '',
goodsId:''
},
//商品列表
tableParams: {
......@@ -160,8 +160,8 @@ export default {
searchProForm: {
name: ''
},
selectedAllProList: [],
selectedProList: [],
// selectedAllProList: [],
// selectedProList: [],
editRule: {
activityName: [{ required: true, message: '请输入活动名称', trigger: 'change' }],
activityImg: [{ required: true, message: '请选择活动宣传图', trigger: 'change' }],
......@@ -169,6 +169,7 @@ export default {
activityTime: [{ required: true, message: '活动时间不能为空', trigger: 'change' }],
activityPrice: [{ required: true, message: '请设置秒杀价', trigger: 'change' }],
goodsStock: [{ required: true, message: '请设置活动库存', trigger: 'change' }],
goodsId: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }],
},
editFormData: [
{
......@@ -209,7 +210,7 @@ export default {
},
{
label: '商品',
name: '',
name: 'goodsId',
addHtml: 'goodsHtml'
},
]
......@@ -296,6 +297,7 @@ export default {
// this.editForm.goodsImage = selectedProInfo.goodsImage
this.handleSingleSelectClose()
if(selectedProInfo){
this.editForm.goodsId = selectedProInfo.id
this.getGoodInfo(selectedProInfo.id)
}
},
......@@ -499,13 +501,13 @@ export default {
handleConfirm() {
this.validateRules()
var flag = true
if(JSON.stringify(this.selectedProInfo) == '{}'){
this.$message({
message: '未选择商品',
type: 'error'
})
flag = false
}
// if(JSON.stringify(this.selectedProInfo) == '{}'){
// this.$message({
// message: '未选择商品',
// type: 'error'
// })
// flag = false
// }
if(this.nameToValSpecsList && this.nameToValSpecsList.length > 0){
for (var key in this.nameToValSpecsList) {
var item = this.nameToValSpecsList[key]
......
......@@ -8,8 +8,8 @@
<div>
<glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
......@@ -64,13 +64,14 @@ export default {
label: '活动名称',
name: 'activityName',
type: 'input',
width: '215px',
maxlength: 20
},
{
label: '状态',
name: 'activityStatus',
type: 'select',
width: '160px',
width: '215px',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!