mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 05:39:36 +08:00
1
This commit is contained in:
parent
3a98992638
commit
81c696db94
@ -32,8 +32,8 @@
|
|||||||
placeholder='请选择类型' v-decorator="['type',{rules: [{ required: true, message: '优惠券类型'}]}]"
|
placeholder='请选择类型' v-decorator="['type',{rules: [{ required: true, message: '优惠券类型'}]}]"
|
||||||
@change='getType'
|
@change='getType'
|
||||||
>
|
>
|
||||||
<a-select-option value='1'>抵用券</a-select-option>
|
<a-select-option :value='1'>抵用券</a-select-option>
|
||||||
<a-select-option value='2'>优惠券</a-select-option>
|
<a-select-option :value='2'>优惠券</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
</a-radio>
|
</a-radio>
|
||||||
<div>
|
<div>
|
||||||
<a-input-number v-if='value === 2' placeholder='发送数量' @change='clickNumber'
|
<a-input-number v-if='value === 2' placeholder='发送数量' @change='clickNumber'
|
||||||
v-decorator="['num',{rules: [{ required: true, message: '数量不能为空'}]}]"
|
v-model='publicSendNum'
|
||||||
style='margin-top: 20px;width: 200px' />
|
style='margin-top: 20px;width: 200px' />
|
||||||
</div>
|
</div>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
@ -229,12 +229,12 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '企业负责人',
|
title: '企业负责人',
|
||||||
dataIndex: 'contacts',
|
dataIndex: 'contacts'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '联系电话',
|
title: '联系电话',
|
||||||
dataIndex: 'phone'
|
dataIndex: 'phone'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
CompanyList: [],
|
CompanyList: [],
|
||||||
notSelectEnterpriseDataList: [],
|
notSelectEnterpriseDataList: [],
|
||||||
@ -247,7 +247,8 @@ export default {
|
|||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
mdl: {},
|
mdl: {},
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
form: this.$form.createForm(this)
|
form: this.$form.createForm(this),
|
||||||
|
publicSendNum: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
@ -256,7 +257,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickNumber(value) {
|
clickNumber(value) {
|
||||||
this.mdl.num = value
|
this.publicSendNum = value
|
||||||
// 数值改变
|
// 数值改变
|
||||||
this.selectEnterpriseDataList.forEach(item => {
|
this.selectEnterpriseDataList.forEach(item => {
|
||||||
if (!item.moreNum) {
|
if (!item.moreNum) {
|
||||||
@ -277,9 +278,9 @@ export default {
|
|||||||
this.selectEnterpriseDataList = this.selectEnterpriseDataList.map(item => {
|
this.selectEnterpriseDataList = this.selectEnterpriseDataList.map(item => {
|
||||||
if (item.id == this.ticketId) {
|
if (item.id == this.ticketId) {
|
||||||
console.log('this.ticketNum ', this.ticketNum)
|
console.log('this.ticketNum ', this.ticketNum)
|
||||||
console.log('this.mdl.num ', this.mdl.num)
|
console.log('this.publicSendNum ', this.publicSendNum)
|
||||||
item.moreNum = this.ticketNum
|
item.moreNum = this.ticketNum
|
||||||
item.sumNum = item.moreNum + this.mdl.num
|
item.sumNum = item.moreNum + this.publicSendNum
|
||||||
}
|
}
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
@ -330,6 +331,9 @@ export default {
|
|||||||
this.mdl = Object.assign(record)
|
this.mdl = Object.assign(record)
|
||||||
this.visible = true
|
this.visible = true
|
||||||
if (record.id > 0) {
|
if (record.id > 0) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.mdl, 'id', 'title', 'content', 'duration', 'type', 'money', 'address', 'isVerification', 'enterpriseIds', 'isShow', 'startTime', 'endDate', 'remark', 'isDefault', 'version', 'deleteFlag', 'createBy', 'createTime', 'updateBy', 'updateTime'))
|
||||||
|
})
|
||||||
get(record.id).then(res => {
|
get(record.id).then(res => {
|
||||||
// 选择企业
|
// 选择企业
|
||||||
this.selectEnterpriseDataList = res.selectCustomerList
|
this.selectEnterpriseDataList = res.selectCustomerList
|
||||||
@ -337,10 +341,16 @@ export default {
|
|||||||
// 未选中企业
|
// 未选中企业
|
||||||
this.notSelectEnterpriseDataList = res.notSelectCustomerList
|
this.notSelectEnterpriseDataList = res.notSelectCustomerList
|
||||||
// this.notSelectEnterpriseIdList = res.notSelectCustomerList.map(item => item.id)
|
// this.notSelectEnterpriseIdList = res.notSelectCustomerList.map(item => item.id)
|
||||||
|
|
||||||
|
if (res.num) { // 有限制
|
||||||
|
this.value = 2
|
||||||
|
this.publicSendNum = res.num
|
||||||
|
this.notSelectEnterpriseDataList.map(item => item.sumNum = res.num)
|
||||||
|
} else { // 无限制
|
||||||
|
this.value = 1
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.$nextTick(() => {
|
|
||||||
this.form.setFieldsValue(pick(this.mdl, 'id', 'title', 'content', 'duration', 'type', 'money', 'address', 'isVerification', 'enterpriseIds', 'isShow', 'startTime', 'endDate', 'remark', 'isDefault', 'version', 'deleteFlag', 'createBy', 'createTime', 'updateBy', 'updateTime'))
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
// 查询企业
|
// 查询企业
|
||||||
getTicketByCompany().then(res => {
|
getTicketByCompany().then(res => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user