|
@@ -2,6 +2,7 @@
|
|
<a-modal
|
|
<a-modal
|
|
centered
|
|
centered
|
|
class="promotionList-basicInfo-modal"
|
|
class="promotionList-basicInfo-modal"
|
|
|
|
+ id="promotionList-basicInfo-modal"
|
|
:footer="null"
|
|
:footer="null"
|
|
:maskClosable="false"
|
|
:maskClosable="false"
|
|
:title="itemSn?'编辑':'新增'"
|
|
:title="itemSn?'编辑':'新增'"
|
|
@@ -26,7 +27,7 @@
|
|
<a-form-model-item label="促销时间" prop="activeDate">
|
|
<a-form-model-item label="促销时间" prop="activeDate">
|
|
<a-range-picker
|
|
<a-range-picker
|
|
style="width:100%"
|
|
style="width:100%"
|
|
- id="promotionList-basicInfo-activeDate"
|
|
|
|
|
|
+ id="promotionList-activeDate"
|
|
:disabledDate="disabledDate"
|
|
:disabledDate="disabledDate"
|
|
v-model="form.activeDate"
|
|
v-model="form.activeDate"
|
|
:format="dateFormat"
|
|
:format="dateFormat"
|
|
@@ -39,23 +40,23 @@
|
|
<a-form-model-item label="参与客户" prop="dealerScope">
|
|
<a-form-model-item label="参与客户" prop="dealerScope">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="12" :sm="24">
|
|
<a-col :md="12" :sm="24">
|
|
- <a-select v-model="form.dealerScope" placeholder="请选择参与客户" @change="changeDealerScope" allowClear>
|
|
|
|
- <a-select-option value="ALL_DEALER">全部客户</a-select-option>
|
|
|
|
- <a-select-option value="SOME_DEALER">部分客户</a-select-option>
|
|
|
|
|
|
+ <a-select id="promotionList-dealerScope" v-model="form.dealerScope" placeholder="请选择参与客户" @change="changeDealerScope" allowClear>
|
|
|
|
+ <a-select-option id="promotionList-dealerScope-all" value="ALL_DEALER">全部客户</a-select-option>
|
|
|
|
+ <a-select-option id="promotionList-dealerScope-some" value="SOME_DEALER">部分客户</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="3" :sm="24" v-show="form.dealerScope && form.dealerScope!='ALL_DEALER' ">
|
|
<a-col :md="3" :sm="24" v-show="form.dealerScope && form.dealerScope!='ALL_DEALER' ">
|
|
- <a-button type="primary" :loading="spinning" @click="handleDealerModal">选择</a-button>
|
|
|
|
|
|
+ <a-button id="promotionList-basicInfo-dealerScope" type="primary" :loading="spinning" @click="handleDealerModal">选择</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="4" :sm="24" v-show="form.dealerScope && form.dealerScope!='ALL_DEALER' ">
|
|
<a-col :md="4" :sm="24" v-show="form.dealerScope && form.dealerScope!='ALL_DEALER' ">
|
|
- <a-button type="primary" :loading="spinning" @click="openGuideModal=true" ghost>导入客户</a-button>
|
|
|
|
|
|
+ <a-button id="promotionList-basicInfo-import" type="primary" :loading="spinning" @click="openGuideModal=true" ghost>导入客户</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="5" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
|
|
<a-col :md="5" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
|
|
已{{ chooseDealerList.length }}选项
|
|
已{{ chooseDealerList.length }}选项
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
|
|
<a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
|
|
<div class="buyerBox">
|
|
<div class="buyerBox">
|
|
- <a-tag closable v-for="con in chooseDealerList" :key="con.dealerSn" @close="delBuyerName(con)">
|
|
|
|
|
|
+ <a-tag closable v-for="con in chooseDealerList" id="promotionList-dealerSn" :key="con.dealerSn" @close="delBuyerName(con)">
|
|
{{ con.dealerName }}
|
|
{{ con.dealerName }}
|
|
</a-tag>
|
|
</a-tag>
|
|
</div>
|
|
</div>
|
|
@@ -63,11 +64,11 @@
|
|
</a-row>
|
|
</a-row>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="订单起订金额" prop="minOrderFlag">
|
|
<a-form-model-item label="订单起订金额" prop="minOrderFlag">
|
|
- <a-select default-value="0" v-model="form.minOrderFlag" style="width: 180px" placeholder="请选择">
|
|
|
|
- <a-select-option value="0">
|
|
|
|
|
|
+ <a-select default-value="0" id="promotionList-minOrderFlag" v-model="form.minOrderFlag" style="width: 180px" placeholder="请选择">
|
|
|
|
+ <a-select-option value="0" id="promotionList-minOrderFlag0">
|
|
不限
|
|
不限
|
|
</a-select-option>
|
|
</a-select-option>
|
|
- <a-select-option value="1">
|
|
|
|
|
|
+ <a-select-option value="1" id="promotionList-minOrderFlag1">
|
|
限制
|
|
限制
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
@@ -75,6 +76,7 @@
|
|
v-show="form.minOrderFlag && form.minOrderFlag=='1'"
|
|
v-show="form.minOrderFlag && form.minOrderFlag=='1'"
|
|
style="margin-left:10px;width:300px;"
|
|
style="margin-left:10px;width:300px;"
|
|
v-model="form.minOrderAmount"
|
|
v-model="form.minOrderAmount"
|
|
|
|
+ id="promotionList-minOrderAmount"
|
|
:min="0"
|
|
:min="0"
|
|
:step="1"
|
|
:step="1"
|
|
:max="99999999"
|
|
:max="99999999"
|
|
@@ -82,11 +84,11 @@
|
|
placeholder="请输入金额"/>
|
|
placeholder="请输入金额"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="活动经费上限" prop="upperLimitFlag">
|
|
<a-form-model-item label="活动经费上限" prop="upperLimitFlag">
|
|
- <a-select default-value="0" v-model="form.upperLimitFlag" style="width: 180px" placeholder="请选择">
|
|
|
|
- <a-select-option value="0">
|
|
|
|
|
|
+ <a-select default-value="0" id="promotionList-upperLimitFlag" v-model="form.upperLimitFlag" style="width: 180px" placeholder="请选择">
|
|
|
|
+ <a-select-option value="0" id="promotionList-upperLimitFlag0">
|
|
不限
|
|
不限
|
|
</a-select-option>
|
|
</a-select-option>
|
|
- <a-select-option value="1">
|
|
|
|
|
|
+ <a-select-option value="1" id="promotionList-upperLimitFlag1">
|
|
限制
|
|
限制
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
@@ -94,6 +96,7 @@
|
|
v-show="form.upperLimitFlag&&form.upperLimitFlag=='1'"
|
|
v-show="form.upperLimitFlag&&form.upperLimitFlag=='1'"
|
|
style="margin-left:10px;width:300px;"
|
|
style="margin-left:10px;width:300px;"
|
|
v-model="form.upperLimitAmount"
|
|
v-model="form.upperLimitAmount"
|
|
|
|
+ id="promotionList-upperLimitAmount"
|
|
:min="0"
|
|
:min="0"
|
|
:step="1"
|
|
:step="1"
|
|
:max="99999999"
|
|
:max="99999999"
|
|
@@ -112,7 +115,7 @@
|
|
<a-form-model-item label="附件" help="(支持图片、word、excel、PDF等格式,最多10个附件)">
|
|
<a-form-model-item label="附件" help="(支持图片、word、excel、PDF等格式,最多10个附件)">
|
|
<Upload
|
|
<Upload
|
|
style="height: 100%;"
|
|
style="height: 100%;"
|
|
- id="allocateBill-attachList"
|
|
|
|
|
|
+ id="promotionList-attachList"
|
|
v-model="form.attachmentList"
|
|
v-model="form.attachmentList"
|
|
ref="attachList"
|
|
ref="attachList"
|
|
:fileSize="10"
|
|
:fileSize="10"
|
|
@@ -125,7 +128,7 @@
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
<div class="btn-cont">
|
|
<div class="btn-cont">
|
|
- <a-button id="promotionList-basicInfo-modal-back" @click="isShow = false">取消</a-button>
|
|
|
|
|
|
+ <a-button id="promotionList-modal-cancel" @click="isShow = false">取消</a-button>
|
|
<a-button style="margin-left: 15px;" type="primary" id="promotionList-modal-save" :loading="loadingSave" @click="handleSave">确定</a-button>
|
|
<a-button style="margin-left: 15px;" type="primary" id="promotionList-modal-save" :loading="loadingSave" @click="handleSave">确定</a-button>
|
|
</div>
|
|
</div>
|
|
</a-spin>
|
|
</a-spin>
|
|
@@ -150,12 +153,14 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
|
+import moment from 'moment'
|
|
|
|
+// 组件
|
|
import { Upload } from '@/components'
|
|
import { Upload } from '@/components'
|
|
import department from '@/views/expenseManagement/expenseReimbursement/department.js'
|
|
import department from '@/views/expenseManagement/expenseReimbursement/department.js'
|
|
import warehouse from '@/views/common/chooseWarehouse.js'
|
|
import warehouse from '@/views/common/chooseWarehouse.js'
|
|
-import moment from 'moment'
|
|
|
|
import chooseDealer from './chooseDealer'
|
|
import chooseDealer from './chooseDealer'
|
|
import importDealerModa from './importDealerModa.vue'
|
|
import importDealerModa from './importDealerModa.vue'
|
|
|
|
+// 接口
|
|
import { dealerPromotionSave, dealerPromotionInfo, dealerPromotionEdit } from '@/api/promotion'
|
|
import { dealerPromotionSave, dealerPromotionInfo, dealerPromotionEdit } from '@/api/promotion'
|
|
export default {
|
|
export default {
|
|
name: 'PromotionListBasicInfoModal',
|
|
name: 'PromotionListBasicInfoModal',
|
|
@@ -173,30 +178,33 @@ export default {
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
- isShow: this.openModal, // 是否打开弹框
|
|
|
|
spinning: false,
|
|
spinning: false,
|
|
|
|
+ isShow: this.openModal, // 是否打开弹框
|
|
|
|
+ // 表单label布局
|
|
formItemLayout: {
|
|
formItemLayout: {
|
|
labelCol: { span: 5 },
|
|
labelCol: { span: 5 },
|
|
wrapperCol: { span: 16 }
|
|
wrapperCol: { span: 16 }
|
|
},
|
|
},
|
|
|
|
+ // 提交参数
|
|
form: {
|
|
form: {
|
|
- title: '',
|
|
|
|
- activeDate: undefined,
|
|
|
|
|
|
+ title: '', // 促销名称
|
|
|
|
+ activeDate: undefined, // 促销时间
|
|
expenseDepartmentSn: undefined, // 费用所属部门
|
|
expenseDepartmentSn: undefined, // 费用所属部门
|
|
description: '', // 活动简称
|
|
description: '', // 活动简称
|
|
content: '', // 活动描述
|
|
content: '', // 活动描述
|
|
attachmentList: '', // 附件
|
|
attachmentList: '', // 附件
|
|
promotionDealerList: [], // 参与客户
|
|
promotionDealerList: [], // 参与客户
|
|
dealerScope: 'SOME_DEALER', // 全部客户 部分客户
|
|
dealerScope: 'SOME_DEALER', // 全部客户 部分客户
|
|
- minOrderFlag: '0', // 订单起订金额
|
|
|
|
- minOrderAmount: undefined,
|
|
|
|
|
|
+ minOrderFlag: '0', // 订单起订量
|
|
|
|
+ minOrderAmount: undefined, // 订单起订金额
|
|
upperLimitFlag: '0', // 活动经费上限
|
|
upperLimitFlag: '0', // 活动经费上限
|
|
- upperLimitAmount: undefined
|
|
|
|
|
|
+ upperLimitAmount: undefined// 活动经费上限金额
|
|
},
|
|
},
|
|
- openDealerModal: false,
|
|
|
|
- chooseDealerList: [],
|
|
|
|
|
|
+ openDealerModal: false, // 打开参与客户弹窗
|
|
|
|
+ chooseDealerList: [], // 所选参与客户数据
|
|
attachList: [], // 附件
|
|
attachList: [], // 附件
|
|
- dateFormat: 'YYYY-MM-DD',
|
|
|
|
|
|
+ dateFormat: 'YYYY-MM-DD', // 时间显示格式
|
|
|
|
+ // 表单验证规则
|
|
rules: {
|
|
rules: {
|
|
title: [{ required: true, message: '请输入促销名称', trigger: 'blur' }],
|
|
title: [{ required: true, message: '请输入促销名称', trigger: 'blur' }],
|
|
activeDate: [{ required: true, message: '请选择促销时间', trigger: 'change' }],
|
|
activeDate: [{ required: true, message: '请选择促销时间', trigger: 'change' }],
|
|
@@ -207,9 +215,9 @@ export default {
|
|
upperLimitFlag: [{ required: true, message: '请选择活动经费上限', trigger: 'change' }],
|
|
upperLimitFlag: [{ required: true, message: '请选择活动经费上限', trigger: 'change' }],
|
|
content: [{ required: true, message: '请输入促销描述', trigger: 'blur' }]
|
|
content: [{ required: true, message: '请输入促销描述', trigger: 'blur' }]
|
|
},
|
|
},
|
|
- attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo',
|
|
|
|
- openGuideModal: false,
|
|
|
|
- loadingSave: false
|
|
|
|
|
|
+ attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo', // 上传附件地址
|
|
|
|
+ openGuideModal: false, // 导入参与客户弹窗
|
|
|
|
+ loadingSave: false// 保存按钮加载状态
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|