feature_0521
liuyang 5 years ago
parent 059640d3a3
commit 72594c4b56

@ -29,11 +29,11 @@
<template slot="action" slot-scope="{row}">
<i-col span="12">
<Button type="success" class="router-btn"
@click="() => {stop(row)}">审核通过</Button>
@click="() => {passShow(row)}">审核通过</Button>
</i-col>
<i-col span="12">
<Button type="error" class="router-btn"
@click="() => {show(row)}">审核不通过</Button>
@click="() => {refuseShow(row)}">审核不通过</Button>
</i-col>
</template>
@ -97,7 +97,7 @@
<!-- 拒绝 -->
<Modal
v-model="isShow"
v-model="refuseIsShow"
:title="showStoreName"
:footer-hide="true"
width="600"
@ -114,25 +114,51 @@
</div>
</Modal>
<!-- 升级 -->
<Modal
v-model="passIsShow"
:title="showStoreName"
:footer-hide="true"
width="600"
class-name="vertical-center-modal"
@on-ok="ok">
<div slot="header">
<p style="text-align: center;">确认审核</p>
</div>
<div style="text-align:center;min-height:100px">
<span style="line-height:100px">确认通过审核吗?</span>
</div>
<div style="margin-top:20px;text-align: center;">
<Button @click="cancel(rowData)"></Button>
<Button style="margin-left:20px" type="primary" @click="confirm(rowData)"></Button>
</div>
</Modal>
<Page :total="total" :current="pageNum" :page-size="pageSize" show-elevator show-total
placement="top" @on-change="handlePage" class-name="ks-page"></Page>
</div>
</template>
<script>
import zeroExtend from "../../services/customer/zeroExtend";
import staff from "../../services/staff/staff";
export default {
name: "",
data() {
return {
tabIndex:0,
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
searchShop:null,
date:"",
companyId:0,
isShow: false,
refuseIsShow: false,
passIsShow:false,
showStoreName: '',
rowData:{},
//list
companyList: [],
//list
organizationalList: [],
selectedStore: 0,
shopList: [],
loading:false,
@ -378,9 +404,70 @@
}
},
mounted: function () {
this.getSelectList();
this.downShopData();
},
methods: {
/**基础数据区域list、零售公司list、客户list*/
getSelectList: function () {
let that = this;
let request = {
userId: this.userId,
};
zeroExtend.getSelectListRequest(request, function (data) {
if (data.data.code !== "0000") {
that.$Message.error("系统异常");
}
data = data.data.results;
if (data) {
that.organizationalList = data;
that.companyList = that.organizationalList.filter(item => item.level === 2);
}
//
that.insertAllOption();
});
},
//
insertAllOption: function () {
if (this.companyList.length === 0 || this.companyList[0].id !== 0) {
this.companyList.splice(0, 0, {"id": 0, "name": "全部"});
}
if (this.shopList.length === 0 || this.shopList[0].id !== 0) {
this.shopList.splice(0, 0, {"id": 0, "name": "全部"});
}
},
//
downShopData: function (selected) {
let that = this;
let companyId = selected;
if (!selected) {
companyId = that.companyId;
}
let customerIds = [];
this.customerList = [];
if (companyId === 0) {
//
} else {
this.customerList = this.organizationalList.filter(item => item.parentId === companyId && item.level === 3);
this.insertAllOption();
}
customerIds = this.customerList.map(item => item.id);
let request =
{userId: that.userId, customerIds: JSON.stringify(customerIds)};
staff.downShopData(request, function (data) {
data = data.data.results;
if (data) {
that.shopList = [{"id": 0, "name": "全部"}];
for (let i = 0; i < data.length; i++) {
let entity = data[i];
if (entity) {
that.shopList.push(entity);
}
}
}
})
},
//
companySelect: function () {
//
@ -442,17 +529,29 @@
console.log('tabIndex',this.tabIndex);
},
ok() {
this.isShow = false;
this.refuseIsShow = false;
},
//
refuse(index) {
console.log(123);
this.isShow = false;
this.refuseIsShow = false;
},
show(index) {
this.isShow = true;
refuseShow(index) {
this.refuseIsShow = true;
this.rowData = index;
},
passShow(index) {
this.passIsShow = true;
this.rowData = index;
},
cancel(){
this.passIsShow = false;
},
//
confirm(index) {
console.log('确认通过审核');
this.passIsShow = false;
},
}
}
</script>

@ -46,8 +46,8 @@
<div slot="header">
<p style="text-align: center;">确认升级</p>
</div>
<div>
<i-input type="textarea" :rows="4" placeholder="请填写审核不通过原因"></i-input>
<div style="text-align:center;min-height:100px">
<span style="line-height:100px">确认将张继军从客户经理升级成服务经理吗?</span>
</div>
<div style="margin-top:20px;text-align: center;">
<Button @click="cancel(rowData)"></Button>
@ -66,6 +66,8 @@
<script>
import recruitTable from "./recruitTable";
import zeroExtend from "../../services/customer/zeroExtend";
import staff from "../../services/staff/staff";
export default {
name: "",
components: {
@ -74,6 +76,7 @@
data() {
return {
tabIndex:0,
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
searchShop:null,
date:"",
companyId:0,
@ -87,6 +90,8 @@
selectedStore: 0,
shopList: [],
loading:false,
//list
organizationalList: [],
total: 0,
pageSize: 10,
pageNum: 1,
@ -169,9 +174,70 @@
}
},
mounted: function () {
this.getSelectList();
this.downShopData();
},
methods: {
/**基础数据区域list、零售公司list、客户list*/
getSelectList: function () {
let that = this;
let request = {
userId: this.userId,
};
zeroExtend.getSelectListRequest(request, function (data) {
if (data.data.code !== "0000") {
that.$Message.error("系统异常");
}
data = data.data.results;
if (data) {
that.organizationalList = data;
that.companyList = that.organizationalList.filter(item => item.level === 2);
}
//
that.insertAllOption();
});
},
//
insertAllOption: function () {
if (this.companyList.length === 0 || this.companyList[0].id !== 0) {
this.companyList.splice(0, 0, {"id": 0, "name": "全部"});
}
if (this.shopList.length === 0 || this.shopList[0].id !== 0) {
this.shopList.splice(0, 0, {"id": 0, "name": "全部"});
}
},
//
downShopData: function (selected) {
let that = this;
let companyId = selected;
if (!selected) {
companyId = that.companyId;
}
let customerIds = [];
this.customerList = [];
if (companyId === 0) {
//
} else {
this.customerList = this.organizationalList.filter(item => item.parentId === companyId && item.level === 3);
this.insertAllOption();
}
customerIds = this.customerList.map(item => item.id);
let request =
{userId: that.userId, customerIds: JSON.stringify(customerIds)};
staff.downShopData(request, function (data) {
data = data.data.results;
if (data) {
that.shopList = [{"id": 0, "name": "全部"}];
for (let i = 0; i < data.length; i++) {
let entity = data[i];
if (entity) {
that.shopList.push(entity);
}
}
}
})
},
//
companySelect: function () {
//

Loading…
Cancel
Save