Compare commits

...

2 Commits

@ -29,11 +29,11 @@
<template slot="action" slot-scope="{row}"> <template slot="action" slot-scope="{row}">
<i-col span="12"> <i-col span="12">
<Button type="success" class="router-btn" <Button type="success" class="router-btn"
@click="() => {stop(row)}">审核通过</Button> @click="() => {passShow(row)}">审核通过</Button>
</i-col> </i-col>
<i-col span="12"> <i-col span="12">
<Button type="error" class="router-btn" <Button type="error" class="router-btn"
@click="() => {show(row)}">审核不通过</Button> @click="() => {refuseShow(row)}">审核不通过</Button>
</i-col> </i-col>
</template> </template>
@ -97,7 +97,7 @@
<!-- 拒绝 --> <!-- 拒绝 -->
<Modal <Modal
v-model="isShow" v-model="refuseIsShow"
:title="showStoreName" :title="showStoreName"
:footer-hide="true" :footer-hide="true"
width="600" width="600"
@ -113,6 +113,26 @@
<Button ghost type="primary" @click="refuse(rowData)"></Button> <Button ghost type="primary" @click="refuse(rowData)"></Button>
</div> </div>
</Modal> </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 <Page :total="total" :current="pageNum" :page-size="pageSize" show-elevator show-total
placement="top" @on-change="handlePage" class-name="ks-page"></Page> placement="top" @on-change="handlePage" class-name="ks-page"></Page>
@ -120,19 +140,25 @@
</template> </template>
<script> <script>
import zeroExtend from "../../services/customer/zeroExtend";
import staff from "../../services/staff/staff";
export default { export default {
name: "", name: "",
data() { data() {
return { return {
tabIndex:0, tabIndex:0,
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
searchShop:null, searchShop:null,
date:"", date:"",
companyId:0, companyId:0,
isShow: false, refuseIsShow: false,
passIsShow:false,
showStoreName: '', showStoreName: '',
rowData:{}, rowData:{},
//list //list
companyList: [], companyList: [],
//list
organizationalList: [],
selectedStore: 0, selectedStore: 0,
shopList: [], shopList: [],
loading:false, loading:false,
@ -378,9 +404,70 @@
} }
}, },
mounted: function () { mounted: function () {
this.getSelectList();
this.downShopData();
}, },
methods: { 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 () { companySelect: function () {
// //
@ -442,16 +529,28 @@
console.log('tabIndex',this.tabIndex); console.log('tabIndex',this.tabIndex);
}, },
ok() { ok() {
this.isShow = false; this.refuseIsShow = false;
}, },
// //
refuse(index) { refuse(index) {
console.log(123); console.log(123);
this.isShow = false; this.refuseIsShow = false;
},
refuseShow(index) {
this.refuseIsShow = true;
this.rowData = index;
}, },
show(index) { passShow(index) {
this.isShow = true; this.passIsShow = true;
this.rowData = index; this.rowData = index;
},
cancel(){
this.passIsShow = false;
},
//
confirm(index) {
console.log('确认通过审核');
this.passIsShow = false;
}, },
} }
} }

@ -46,8 +46,8 @@
<div slot="header"> <div slot="header">
<p style="text-align: center;">确认升级</p> <p style="text-align: center;">确认升级</p>
</div> </div>
<div> <div style="text-align:center;min-height:100px">
<i-input type="textarea" :rows="4" placeholder="请填写审核不通过原因"></i-input> <span style="line-height:100px">确认将张继军从客户经理升级成服务经理吗?</span>
</div> </div>
<div style="margin-top:20px;text-align: center;"> <div style="margin-top:20px;text-align: center;">
<Button @click="cancel(rowData)"></Button> <Button @click="cancel(rowData)"></Button>
@ -66,6 +66,8 @@
<script> <script>
import recruitTable from "./recruitTable"; import recruitTable from "./recruitTable";
import zeroExtend from "../../services/customer/zeroExtend";
import staff from "../../services/staff/staff";
export default { export default {
name: "", name: "",
components: { components: {
@ -74,6 +76,7 @@
data() { data() {
return { return {
tabIndex:0, tabIndex:0,
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
searchShop:null, searchShop:null,
date:"", date:"",
companyId:0, companyId:0,
@ -87,6 +90,8 @@
selectedStore: 0, selectedStore: 0,
shopList: [], shopList: [],
loading:false, loading:false,
//list
organizationalList: [],
total: 0, total: 0,
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
@ -169,9 +174,70 @@
} }
}, },
mounted: function () { mounted: function () {
this.getSelectList();
this.downShopData();
}, },
methods: { 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 () { companySelect: function () {
// //

Loading…
Cancel
Save