|
|
|
@ -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;
|
|
|
|
|
},
|
|
|
|
|
refuseShow(index) {
|
|
|
|
|
this.refuseIsShow = true;
|
|
|
|
|
this.rowData = index;
|
|
|
|
|
},
|
|
|
|
|
show(index) {
|
|
|
|
|
this.isShow = true;
|
|
|
|
|
passShow(index) {
|
|
|
|
|
this.passIsShow = true;
|
|
|
|
|
this.rowData = index;
|
|
|
|
|
},
|
|
|
|
|
cancel(){
|
|
|
|
|
this.passIsShow = false;
|
|
|
|
|
},
|
|
|
|
|
//确认通过审核
|
|
|
|
|
confirm(index) {
|
|
|
|
|
console.log('确认通过审核');
|
|
|
|
|
this.passIsShow = false;
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|