Browse Source

完善销售政策--切换结构功能

master
yunuo970428 2 years ago
parent
commit
9ba7c95ce1
  1. 5
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceEdit.vue
  2. 47
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengce.vue
  3. 7
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengceAdd.vue

5
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceEdit.vue

@ -150,7 +150,7 @@
<script>
import { save, update, fetchSid, submitVehicleApply } from '@/api/jichuxinxi/salepolicy'
import { typeValues, getPathSidByUserSid, fetchBySid } from '@/api/dictcommons/dictcommons'
import { typeValues, getOrgSidByPath, fetchBySid } from '@/api/dictcommons/dictcommons'
import vehicle from './relation/vehicleSelect'
export default {
@ -190,6 +190,7 @@ export default {
staffSid: '',
instanceId: '', // ID
taskId: '', // ID
orgPath: '',
baseDiscountpackageVehs: []
},
dialogStatus: '', //
@ -215,7 +216,7 @@ export default {
},
methods: {
init() {
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) {
this.temp.useOrg = resp.data
fetchBySid(resp.data).then((res) => {

47
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengce.vue

@ -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
}
})
},

7
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengceAdd.vue

@ -151,7 +151,7 @@
<script>
import { save, update, fetchSid, submitVehicleApply } from '@/api/jichuxinxi/salepolicy'
import { typeValues, getPathSidByUserSid, fetchBySid } from '@/api/dictcommons/dictcommons'
import { typeValues, getOrgSidByPath, fetchBySid } from '@/api/dictcommons/dictcommons'
import vehicle from './relation/vehicleselect'
export default {
@ -191,6 +191,7 @@ export default {
staffSid: '',
instanceId: '', // ID
taskId: '', // ID
orgPath: '',
baseDiscountpackageVehs: []
},
dialogStatus: '', //
@ -199,7 +200,7 @@ export default {
},
methods: {
init() {
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) {
this.temp.useOrg = resp.data
fetchBySid(resp.data).then((res) => {
@ -229,6 +230,7 @@ export default {
this.dialogStatus = 'add'
this.temp.createBySid = window.sessionStorage.getItem('userSid')
this.temp.staffSid = window.sessionStorage.getItem('staffSid')
this.temp.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.viewTitle = '【新增】销售政策申请'
},
showEdit(sid) {
@ -402,6 +404,7 @@ export default {
staffSid: '',
instanceId: '', // ID
taskId: '', // ID
orgPath: '',
baseDiscountpackageVehs: []
}
this.disabled = false

Loading…
Cancel
Save