|
|
@ -37,7 +37,7 @@ |
|
|
|
</div> |
|
|
|
<div class="listtop"> |
|
|
|
<div class="tit">销售政策列表</div> |
|
|
|
<pageye v-show="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
|
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
|
</div> |
|
|
|
<div class=""> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange"> |
|
|
@ -100,7 +100,7 @@ |
|
|
|
<div class="pages"> |
|
|
|
<div class="tit"/> |
|
|
|
<!-- 翻页 --> |
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -114,7 +114,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { deleteBySids, listPage } from '@/api/jichuxinxi/salepolicy' |
|
|
|
import { typeValues } from '@/api/dictcommons/dictcommons' |
|
|
|
import { typeValues, selectHaveMessage } from '@/api/dictcommons/dictcommons' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
@ -177,18 +177,19 @@ export default { |
|
|
|
tableKey: 0, |
|
|
|
list: [], |
|
|
|
sids: [], |
|
|
|
total: 1, |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
listQuery: { |
|
|
|
current: 1, |
|
|
|
size: 5, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
discountTypeKey: '', // 优惠类型key |
|
|
|
getEffectiveStartDate: '', // 开始有效期 |
|
|
|
isEmploy: '', // 是否有效 |
|
|
|
salesPolicyKey: '', // 政策类别key |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid') |
|
|
|
staffSid: '', |
|
|
|
orgPath: '' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -271,30 +272,28 @@ export default { |
|
|
|
this.listQuery = { |
|
|
|
current: 1, |
|
|
|
size: 5, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
discountTypeKey: '', // 优惠类型key |
|
|
|
getEffectiveStartDate: '', // 开始有效期 |
|
|
|
isEmploy: '', // 是否有效 |
|
|
|
salesPolicyKey: '', // 政策类别key |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid') |
|
|
|
staffSid: '', |
|
|
|
orgPath: '' |
|
|
|
} |
|
|
|
} |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// 下拉框 |
|
|
|
getType() { |
|
|
|
typeValues({ |
|
|
|
type: 'discountPolicyType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
typeValues({ type: 'discountPolicyType' }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.salesPolicy_list = res.data |
|
|
|
console.log('下拉框请求政策类别', this.salesPolicy_list) |
|
|
|
} |
|
|
|
}) |
|
|
|
typeValues({ |
|
|
|
type: 'discountPackageType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
typeValues({ type: 'discountPackageType' }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.discountType_list = res.data |
|
|
|
console.log('下拉框请求优惠包类别', this.discountType_list) |
|
|
|
} |
|
|
@ -302,8 +301,12 @@ export default { |
|
|
|
}, |
|
|
|
// 打开添加 |
|
|
|
toAdd() { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divadd'].showAdd() |
|
|
|
selectHaveMessage({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divadd'].showAdd() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 打开编辑 |
|
|
|
handleUpdate() { |
|
|
@ -347,18 +350,16 @@ export default { |
|
|
|
// 查询列表信息 |
|
|
|
getList() { |
|
|
|
this.listLoading = true |
|
|
|
this.listQuery.params.staffSid = window.sessionStorage.getItem('staffSid') |
|
|
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
listPage(this.listQuery).then((response) => { |
|
|
|
this.listLoading = false |
|
|
|
if ( |
|
|
|
response.code === '200' && |
|
|
|
response.data && |
|
|
|
response.data.total > 0 |
|
|
|
) { |
|
|
|
if (response.success) { |
|
|
|
this.list = response.data.records |
|
|
|
this.total = response.data.total |
|
|
|
this.listQuery.total = response.data.total |
|
|
|
} else { |
|
|
|
this.list = [] |
|
|
|
this.total = 0 |
|
|
|
this.listQuery.total = 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|