Commit 57510b55 by 胡悦
2 parents 86b312d6 728e0152
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="glsx-combi-form"> <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"> <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"> <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 v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span> <span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'"> <el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
......
...@@ -3,43 +3,40 @@ ...@@ -3,43 +3,40 @@
<div class="edit-share marketing p-t-20"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}代金券</p> <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"> <template slot="useChannelHtml">
<el-radio v-model="editForm.useChannel" label="1" :disabled="apear!='couponAdd'">线上商品</el-radio> <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> <el-radio v-model="editForm.useChannel" label="2" :disabled="apear!='couponAdd'" @change="clickUseChannel">到店核销</el-radio>
</template> </template>
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear!='couponAdd'">无有效期</el-radio><br> <el-radio v-model="editForm.effectiveType" label="3" :disabled="apear!='couponAdd'">无有效期</el-radio><br>
<el-form-item prop="effectiveTime" style="margin-top: 12px;display: block;">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveTime">
<el-date-picker <el-date-picker
v-model="editForm.effectiveTime" v-model="editForm.effectiveTime"
type="daterange" type="daterange"
style="width:295px"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable> :disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable>
</el-date-picker> </el-date-picker>
</el-radio>
</el-form-item> </el-form-item>
</el-radio><br>
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveDays"> <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-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
<!-- <el-input v-model="editForm.effectiveDays" style="width: 250px;" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" > 领取后你好<el-input v-model="editForm.effectiveDays" style="width:100px;margin-left:5px;margin-right:5px" :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>
</template> </template>
<template slot="useBarriersHtml"> <template slot="useBarriersHtml">
<el-radio v-model="editForm.useBarriers" label="1" :disabled="apear!='couponAdd'">无限制</el-radio> <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-form-item prop="full">
订单满<el-input v-model="editForm.full" placeholder="输入金额(元)" style="width: 110px;" :disabled="apear!='couponAdd'|| editForm.useBarriers != 2" />元可用 <el-radio v-model="editForm.useBarriers" label="2" :disabled="apear!='couponAdd' || editForm.useChannel == 2">
</el-form-item> 订单满<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-radio>
</el-form-item>
</template> </template>
<template slot="denominationHtml"> <template slot="denominationHtml">
<el-input v-model="editForm.denomination" style="width: 150px" :disabled="apear!='couponAdd'" @blur.native.capture="denominationBlur"> <el-input v-model="editForm.denomination" style="width: 150px" :disabled="apear!='couponAdd'" @blur.native.capture="denominationBlur">
...@@ -64,7 +61,7 @@ ...@@ -64,7 +61,7 @@
</GLTable> </GLTable>
</div> </div>
<template slot="useDescriptionHtml"> <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> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -110,24 +107,11 @@ ...@@ -110,24 +107,11 @@
</div> </div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <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="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> <el-button type="default" v-if="apear=='couponSee'" @click="handleCancel">返回</el-button>
</div> </div>
<select-muti-pro-forcoupon-dialog v-if="isMutiSelectVisible" :isMutiSelectVisible="isMutiSelectVisible" :searchForm="searchProForm" :selectedProList="selectedProList" @handleMutiSelectConfirm="handleMutiSelectConfirm" @handleMutiSelectClose="handleMutiSelectClose"> <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> </select-muti-pro-forcoupon-dialog>
</div> </div>
</template> </template>
......
...@@ -5,27 +5,28 @@ ...@@ -5,27 +5,28 @@
<p class="edit-title">{{ title }}折扣劵</p> <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="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-form-item prop="effectiveTime" style="margin-top: 12px;display: block;">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveTime">
<el-date-picker <el-date-picker
v-model="editForm.effectiveTime" v-model="editForm.effectiveTime"
type="daterange" type="daterange"
style="width:295px"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable> :disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable>
</el-date-picker> </el-date-picker>
</el-radio>
</el-form-item> </el-form-item>
</el-radio><br>
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveDays"> <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-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
</el-form-item> 领取后<el-input v-model="editForm.effectiveDays" style="width: 100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />天内有效
</el-radio> </el-radio>
</el-form-item>
</template> </template>
<template slot="useDescriptionHtml"> <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> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -48,8 +49,8 @@ ...@@ -48,8 +49,8 @@
</div> </div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <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="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> <el-button type="default" v-if="apear=='couponSee'" @click="handleCancel">返回</el-button>
</div> </div>
</div> </div>
......
...@@ -5,27 +5,28 @@ ...@@ -5,27 +5,28 @@
<p class="edit-title">{{ title }}兑换券</p> <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="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-form-item prop="effectiveTime" style="margin-top: 12px;display: block;">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveTime">
<el-date-picker <el-date-picker
v-model="editForm.effectiveTime" v-model="editForm.effectiveTime"
type="daterange" type="daterange"
style="width:295px"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable> :disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable>
</el-date-picker> </el-date-picker>
</el-radio>
</el-form-item> </el-form-item>
</el-radio><br>
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveDays"> <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-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
</el-form-item> 领取后<el-input v-model="editForm.effectiveDays" style="width: 100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />天内有效
</el-radio> </el-radio>
</el-form-item>
</template> </template>
<template slot="useDescriptionHtml"> <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> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -48,8 +49,8 @@ ...@@ -48,8 +49,8 @@
</div> </div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <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="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> <el-button type="default" v-if="apear=='couponSee'" @click="handleCancel">返回</el-button>
</div> </div>
</div> </div>
......
...@@ -6,46 +6,47 @@ ...@@ -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"> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear!='couponAdd'">无有效期</el-radio><br> <el-radio v-model="editForm.effectiveType" label="3" :disabled="apear!='couponAdd'">无有效期</el-radio><br>
<el-form-item prop="effectiveTime" style="margin-top: 12px;display: block;">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveTime">
<el-date-picker <el-date-picker
v-model="editForm.effectiveTime" v-model="editForm.effectiveTime"
type="daterange" type="daterange"
style="width:295px"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable> :disabled="editForm.effectiveType != 2||apear!='couponAdd'" clearable>
</el-date-picker> </el-date-picker>
</el-radio>
</el-form-item> </el-form-item>
</el-radio><br>
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
<el-form-item prop="effectiveDays"> <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-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
</el-form-item> 领取后<el-input v-model="editForm.effectiveDays" style="width: 100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />天内有效
</el-radio> </el-radio>
</el-form-item>
</template> </template>
<template slot="useTypeHtml"> <template slot="useTypeHtml">
<el-radio v-model="editForm.useType" label="0" :disabled="apear!='couponAdd'">无限制</el-radio><br> <el-radio v-model="editForm.useType" label="0" :disabled="apear!='couponAdd'">无限制</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-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;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.useType != 1" />次
<el-input v-model="editForm.usageTimes" style="width: 100px;" :disabled="apear!='couponAdd'|| editForm.useType != 1" />&nbsp;&nbsp;次 </el-radio>
</el-form-item> </el-form-item>
</el-radio><br>
<el-radio v-model="editForm.useType" label="2" :disabled="apear!='couponAdd'"> <el-radio v-model="editForm.useType" label="2" :disabled="apear!='couponAdd'">
<el-form-item prop="useLimitDays"> <el-form-item prop="useLimitDays">
有效期内 有效期内
<el-input v-model="editForm.useLimitDays" style="width: 100px;" :disabled="apear!='couponAdd'|| editForm.useType != 2" />&nbsp;&nbsp;天 <el-input v-model="editForm.useLimitDays" style="width: 100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.useType != 2" />
&nbsp;&nbsp;可使用&nbsp;&nbsp; 天可使用
</el-form-item> </el-form-item>
<el-form-item prop="usageTimes2"> <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-form-item>
</el-radio> </el-radio>
</template> </template>
<template slot="useDescriptionHtml"> <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> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -68,8 +69,8 @@ ...@@ -68,8 +69,8 @@
</div> </div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <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="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> <el-button type="default" v-if="apear=='couponSee'" @click="handleCancel">返回</el-button>
</div> </div>
</div> </div>
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<div> <div>
<glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns"> <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="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -65,6 +65,7 @@ export default { ...@@ -65,6 +65,7 @@ export default {
label: '名称', label: '名称',
name: 'couponName', name: 'couponName',
type: 'input', type: 'input',
width: '215px',
maxlength: 20 maxlength: 20
}, },
// { // {
...@@ -78,7 +79,7 @@ export default { ...@@ -78,7 +79,7 @@ export default {
label: '优惠券类型', label: '优惠券类型',
name: 'discountType', name: 'discountType',
type: 'select', type: 'select',
width: '160px', width: '215px',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
...@@ -88,7 +89,7 @@ export default { ...@@ -88,7 +89,7 @@ export default {
label: '优惠券状态', label: '优惠券状态',
name: 'status', name: 'status',
type: 'select', type: 'select',
width: '160px', width: '215px',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<div> <div>
<glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns"> <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="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="writeOff">优惠券核销</el-button>
<el-button :size="size" type="primary" @click="goback">返回</el-button> <el-button :size="size" @click="goback">返回</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
......
...@@ -237,7 +237,7 @@ export default { ...@@ -237,7 +237,7 @@ export default {
//权益 - 弹窗 //权益 - 弹窗
isDialogVisible: false, isDialogVisible: false,
merchantData: {}, merchantData: {},
merchantId: 44184606 //记得改 merchantId: 0 //记得改 44184606
} }
}, },
created() { created() {
......
...@@ -67,7 +67,8 @@ ...@@ -67,7 +67,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="orderStatus" label="状态" align="center"> <el-table-column prop="orderStatus" label="状态" align="center">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -113,25 +114,12 @@ export default { ...@@ -113,25 +114,12 @@ export default {
this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice) this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice)
this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice) this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice)
this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus) this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus)
this.$set(this.tableData[0],'refundReason',this.detail.refundReason)
}else{ }else{
this.$message.error(`${res.message}`) 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() { goBack() {
console.log(this.detail, 'gggg') console.log(this.detail, 'gggg')
this.$router.go(-1) this.$router.go(-1)
......
...@@ -203,7 +203,7 @@ export default { ...@@ -203,7 +203,7 @@ export default {
} }
} }
}) })
console.log('编辑内容', this.choseItemList, this.totalPrice)
this.copyTotalPrice = this.totalPrice this.copyTotalPrice = this.totalPrice
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据 this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
this.copyChoseItemList = this.choseItemList this.copyChoseItemList = this.choseItemList
...@@ -225,7 +225,7 @@ export default { ...@@ -225,7 +225,7 @@ export default {
serviceQuantity: 0 serviceQuantity: 0
} }
}) })
console.log(this.allItemList, '服务套餐')
if (this.id) { if (this.id) {
this.getServiceInfo() //获取编辑详情 this.getServiceInfo() //获取编辑详情
} }
...@@ -242,12 +242,12 @@ export default { ...@@ -242,12 +242,12 @@ export default {
closeChoseItemFun(item, index) { closeChoseItemFun(item, index) {
this.totalPrice = this.totalPrice - item.vipPrice * item.serviceQuantity this.totalPrice = this.totalPrice - item.vipPrice * item.serviceQuantity
// item.serviceQuantity = 0 // item.serviceQuantity = 0
this.allItemList.forEach(ele => { // this.allItemList.forEach(ele => {
if (ele.id == item.serviceId) { // if (ele.id == item.serviceId) {
ele.serviceQuantity = 0 // ele.serviceQuantity = 0
} // }
}) // })
this.selectNumFun() // this.selectNumFun()
this.choseItemList.splice(index, 1) this.choseItemList.splice(index, 1)
}, },
selectNumFun() { selectNumFun() {
...@@ -402,6 +402,7 @@ export default { ...@@ -402,6 +402,7 @@ export default {
serviceId: ele.id serviceId: ele.id
} }
}) })
console.log('确定之后choseItemList', this.choseItemList)
this.setmealDialogVisible = false this.setmealDialogVisible = false
}, },
handleClose() { handleClose() {
...@@ -415,7 +416,7 @@ export default { ...@@ -415,7 +416,7 @@ export default {
// //第二个参数这里是对象,不是number(n) // //第二个参数这里是对象,不是number(n)
// return preValue + choseItem.vipPrice * choseItem.serviceQuantity // return preValue + choseItem.vipPrice * choseItem.serviceQuantity
// }, 0) // }, 0)
this.getSetmealServiceFun() // this.getSetmealServiceFun()
}, },
handleTipClose() { handleTipClose() {
this.isTipDialogVisible = false this.isTipDialogVisible = false
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<p class="edit-title">{{ title }}秒杀活动</p> <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="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="activityTimeHtml"> <template slot="activityTimeHtml">
<el-form-item> <!-- <el-form-item> -->
<el-date-picker <el-date-picker
v-model="editForm.activityTime" v-model="editForm.activityTime"
type="datetimerange" type="datetimerange"
...@@ -16,13 +16,12 @@ ...@@ -16,13 +16,12 @@
:picker-options="pickerOptions" :picker-options="pickerOptions"
:disabled="isDisabled" clearable> :disabled="isDisabled" clearable>
</el-date-picker> </el-date-picker>
</el-form-item> <!-- </el-form-item> -->
</template> </template>
<div slot="goodsHtml"> <div slot="goodsHtml">
<el-button type="primary" v-if="apear!='see'" @click="handleRelateProClose">选择商品</el-button> <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> <p>
<!-- <img ng-src="{{selectPro.goodsImage}}" style="width: 50px;height:50px;"/> -->
<img class="img-60" :src="selectedProInfo.goodsImage"/> <img class="img-60" :src="selectedProInfo.goodsImage"/>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
零售价 {{(selectedProInfo.retailPrice/100).toFixed(2)}}元 零售价 {{(selectedProInfo.retailPrice/100).toFixed(2)}}元
...@@ -83,8 +82,8 @@ ...@@ -83,8 +82,8 @@
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <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="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> <el-button type="default" v-if="apear=='see'" @click="handleCancel">返回</el-button>
</div> </div>
<select-single-pro-dialog v-if="isSingleSelectVisible" :isSingleSelectVisible="isSingleSelectVisible" :selectedProInfo="selectedProInfo" @handleSingleSelectConfirm="handleSingleSelectConfirm" @handleSingleSelectClose="handleSingleSelectClose"></select-single-pro-dialog> <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 { ...@@ -136,7 +135,8 @@ export default {
promotion: '', promotion: '',
activityTime: [], activityTime: [],
activityPrice: '', activityPrice: '',
goodsStock: '' goodsStock: '',
goodsId:''
}, },
//商品列表 //商品列表
tableParams: { tableParams: {
...@@ -160,8 +160,8 @@ export default { ...@@ -160,8 +160,8 @@ export default {
searchProForm: { searchProForm: {
name: '' name: ''
}, },
selectedAllProList: [], // selectedAllProList: [],
selectedProList: [], // selectedProList: [],
editRule: { editRule: {
activityName: [{ required: true, message: '请输入活动名称', trigger: 'change' }], activityName: [{ required: true, message: '请输入活动名称', trigger: 'change' }],
activityImg: [{ required: true, message: '请选择活动宣传图', trigger: 'change' }], activityImg: [{ required: true, message: '请选择活动宣传图', trigger: 'change' }],
...@@ -169,6 +169,7 @@ export default { ...@@ -169,6 +169,7 @@ export default {
activityTime: [{ required: true, message: '活动时间不能为空', trigger: 'change' }], activityTime: [{ required: true, message: '活动时间不能为空', trigger: 'change' }],
activityPrice: [{ required: true, message: '请设置秒杀价', trigger: 'change' }], activityPrice: [{ required: true, message: '请设置秒杀价', trigger: 'change' }],
goodsStock: [{ required: true, message: '请设置活动库存', trigger: 'change' }], goodsStock: [{ required: true, message: '请设置活动库存', trigger: 'change' }],
goodsId: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }],
}, },
editFormData: [ editFormData: [
{ {
...@@ -209,7 +210,7 @@ export default { ...@@ -209,7 +210,7 @@ export default {
}, },
{ {
label: '商品', label: '商品',
name: '', name: 'goodsId',
addHtml: 'goodsHtml' addHtml: 'goodsHtml'
}, },
] ]
...@@ -296,6 +297,7 @@ export default { ...@@ -296,6 +297,7 @@ export default {
// this.editForm.goodsImage = selectedProInfo.goodsImage // this.editForm.goodsImage = selectedProInfo.goodsImage
this.handleSingleSelectClose() this.handleSingleSelectClose()
if(selectedProInfo){ if(selectedProInfo){
this.editForm.goodsId = selectedProInfo.id
this.getGoodInfo(selectedProInfo.id) this.getGoodInfo(selectedProInfo.id)
} }
}, },
...@@ -498,14 +500,14 @@ export default { ...@@ -498,14 +500,14 @@ export default {
handleConfirm() { handleConfirm() {
this.validateRules() this.validateRules()
var flag = true // var flag = true
if(JSON.stringify(this.selectedProInfo) == '{}'){ // if(JSON.stringify(this.selectedProInfo) == '{}'){
this.$message({ // this.$message({
message: '未选择商品', // message: '未选择商品',
type: 'error' // type: 'error'
}) // })
flag = false // flag = false
} // }
if(this.nameToValSpecsList && this.nameToValSpecsList.length > 0){ if(this.nameToValSpecsList && this.nameToValSpecsList.length > 0){
for (var key in this.nameToValSpecsList) { for (var key in this.nameToValSpecsList) {
var item = this.nameToValSpecsList[key] var item = this.nameToValSpecsList[key]
...@@ -528,6 +530,8 @@ export default { ...@@ -528,6 +530,8 @@ export default {
} }
} }
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
console.log(this.$refs.editFormRef.$refs[this.editChildRef].validate);
if (valid) { if (valid) {
if(!flag){ if(!flag){
return return
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<div> <div>
<glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns"> <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="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -64,13 +64,14 @@ export default { ...@@ -64,13 +64,14 @@ export default {
label: '活动名称', label: '活动名称',
name: 'activityName', name: 'activityName',
type: 'input', type: 'input',
width: '215px',
maxlength: 20 maxlength: 20
}, },
{ {
label: '状态', label: '状态',
name: 'activityStatus', name: 'activityStatus',
type: 'select', type: 'select',
width: '160px', width: '215px',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!