|
@@ -12,16 +12,17 @@
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
</el-input>
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 审核状态 -->
|
|
<div class="grid-content bg-purple">
|
|
<div class="grid-content bg-purple">
|
|
<el-dropdown @command="handleCommand">
|
|
<el-dropdown @command="handleCommand">
|
|
<div class="pulldown">
|
|
<div class="pulldown">
|
|
- <span class="el-dropdown-link" v-if="!providerStatus">
|
|
|
|
|
|
+ <span v-if="!providerStatus" class="el-dropdown-link">
|
|
审核状态
|
|
审核状态
|
|
</span>
|
|
</span>
|
|
- <span class="el-dropdown-link" v-if="providerStatus">
|
|
|
|
|
|
+ <span v-if="providerStatus" class="el-dropdown-link">
|
|
{{ providerStatus }}
|
|
{{ providerStatus }}
|
|
</span>
|
|
</span>
|
|
- <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
|
|
+ <i class="el-icon-arrow-down el-icon--right" />
|
|
</div>
|
|
</div>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-item command="审核状态">审核状态</el-dropdown-item>
|
|
<el-dropdown-item command="审核状态">审核状态</el-dropdown-item>
|
|
@@ -30,10 +31,13 @@
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 供应商状态 -->
|
|
<div class="grid-content bg-purple">
|
|
<div class="grid-content bg-purple">
|
|
<el-dropdown @command="AhandleCommand">
|
|
<el-dropdown @command="AhandleCommand">
|
|
<div class="pulldown">
|
|
<div class="pulldown">
|
|
- <span v-if="!Auditstatus" class="el-dropdown-link"> 供应商状态 </span>
|
|
|
|
|
|
+ <span v-if="!Auditstatus" class="el-dropdown-link">
|
|
|
|
+ 供应商状态
|
|
|
|
+ </span>
|
|
<span v-if="Auditstatus" class="el-dropdown-link">
|
|
<span v-if="Auditstatus" class="el-dropdown-link">
|
|
{{ Auditstatus }}
|
|
{{ Auditstatus }}
|
|
</span>
|
|
</span>
|
|
@@ -46,7 +50,7 @@
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
</div>
|
|
</div>
|
|
- <!-- 日期查询 -->
|
|
|
|
|
|
+ <!-- 日期查询 -->
|
|
<div class="grid-content bg-purple">
|
|
<div class="grid-content bg-purple">
|
|
<div class="block">
|
|
<div class="block">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
@@ -57,88 +61,165 @@
|
|
range-separator="至"
|
|
range-separator="至"
|
|
start-placeholder="开始日期"
|
|
start-placeholder="开始日期"
|
|
end-placeholder="结束日期"
|
|
end-placeholder="结束日期"
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
:picker-options="pickerOptions"
|
|
:picker-options="pickerOptions"
|
|
- @change="startEndTime"
|
|
|
|
|
|
+ @change="startEndTime"
|
|
>
|
|
>
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-table v-loading="listLoading" :data="temporaryList" element-loading-text="Loading" border fit
|
|
|
|
- highlight-current-row @selection-change="handleSelectionChange" @select-all="handleAll">
|
|
|
|
- <el-table-column type="selection"> </el-table-column>
|
|
|
|
- <el-table-column label="供应商名称" align="center" prop="name" width="200">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="社会统一信用代码" width="200" align="center" prop="socialCode">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="账号" width="150" align="center" prop="account">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="法人名称" width="180" align="center" prop="legalPerson">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="联系人" width="180" align="center" prop="contacts">
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ <el-table
|
|
|
|
+ v-loading="listLoading"
|
|
|
|
+ :data="temporaryList"
|
|
|
|
+ element-loading-text="Loading"
|
|
|
|
+ border
|
|
|
|
+ fit
|
|
|
|
+ highlight-current-row
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
|
+ @select-all="handleAll"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column type="selection"> </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="供应商名称"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="name"
|
|
|
|
+ width="200"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="社会统一信用代码"
|
|
|
|
+ width="200"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="socialCode"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="账号" width="150" align="center" prop="account">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="法人名称"
|
|
|
|
+ width="180"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="legalPerson"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="联系人"
|
|
|
|
+ width="180"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="contacts"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
|
|
- <el-table-column label="电话" width="180" align="center" prop="contactsMobile">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="供应商状态" width="180" align="center" prop="statusText">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="状态" align="center" prop="isDeletedText">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" prop="createdAt" label="时间" width="180">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" prop="created_at" label="操作" width="250">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="toedit(scope.row.id)">编辑
|
|
|
|
- </el-tag>
|
|
|
|
- <el-tag type="success" style="margin-right: 15px; cursor: pointer" @click="Srecover(scope.row.id)"
|
|
|
|
- v-if="scope.row.isDeleted == 1">恢复</el-tag>
|
|
|
|
- <el-tag type="danger" style="margin-right: 15px; cursor: pointer" @click="Sdeleted(scope.row.id)"
|
|
|
|
- v-if="scope.row.isDeleted == 0">禁用</el-tag>
|
|
|
|
- <el-tag type="primary" style="margin-right: 15px; cursor: pointer" @click="reset(scope.row.id)"
|
|
|
|
- v-permission="['admin']">重置密码</el-tag>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- <div style="display: flex; justify-content: space-between">
|
|
|
|
- <el-row type="flex" justify="end">
|
|
|
|
- <div class="btn" style="display: flex; justify-content: flex-end">
|
|
|
|
- <el-button type="primary" @click="failed">审核失败</el-button>
|
|
|
|
- <el-button type="primary" @click="success">审核成功</el-button>
|
|
|
|
- <el-button type="primary" @click="Exports">批量导出</el-button>
|
|
|
|
- <el-button type="success" @click="recover">恢复</el-button>
|
|
|
|
- <el-button type="danger" @click="deleted">禁用</el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-row>
|
|
|
|
- <div class="pagesip">
|
|
|
|
- <el-button type="primary" size="small" style="
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="电话"
|
|
|
|
+ width="180"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="contactsMobile"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="供应商状态"
|
|
|
|
+ width="180"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="statusText"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="状态" align="center" prop="isDeletedText">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" prop="createdAt" label="时间" width="180">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="center"
|
|
|
|
+ prop="created_at"
|
|
|
|
+ label="操作"
|
|
|
|
+ width="250"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-tag
|
|
|
|
+ type="primary"
|
|
|
|
+ style="cursor: pointer; margin-right: 15px"
|
|
|
|
+ @click="toedit(scope.row.id)"
|
|
|
|
+ >编辑
|
|
|
|
+ </el-tag>
|
|
|
|
+ <el-tag
|
|
|
|
+ type="success"
|
|
|
|
+ style="margin-right: 15px; cursor: pointer"
|
|
|
|
+ @click="Srecover(scope.row.id)"
|
|
|
|
+ v-if="scope.row.isDeleted == 1"
|
|
|
|
+ >恢复</el-tag
|
|
|
|
+ >
|
|
|
|
+ <el-tag
|
|
|
|
+ type="danger"
|
|
|
|
+ style="margin-right: 15px; cursor: pointer"
|
|
|
|
+ @click="Sdeleted(scope.row.id)"
|
|
|
|
+ v-if="scope.row.isDeleted == 0"
|
|
|
|
+ >禁用</el-tag
|
|
|
|
+ >
|
|
|
|
+ <el-tag
|
|
|
|
+ type="primary"
|
|
|
|
+ style="margin-right: 15px; cursor: pointer"
|
|
|
|
+ @click="reset(scope.row.id)"
|
|
|
|
+ v-permission="['admin']"
|
|
|
|
+ >重置密码</el-tag
|
|
|
|
+ >
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <div style="display: flex; justify-content: space-between">
|
|
|
|
+ <el-row type="flex" justify="end">
|
|
|
|
+ <div class="btn" style="display: flex; justify-content: flex-end">
|
|
|
|
+ <el-button type="primary" @click="failed">审核失败</el-button>
|
|
|
|
+ <el-button type="primary" @click="success">审核成功</el-button>
|
|
|
|
+ <el-button type="primary" @click="Exports">批量导出</el-button>
|
|
|
|
+ <el-button type="success" @click="recover">恢复</el-button>
|
|
|
|
+ <el-button type="danger" @click="deleted">禁用</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-row>
|
|
|
|
+ <div class="pagesip">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="small"
|
|
|
|
+ style="
|
|
background-color: #d8ab5a;
|
|
background-color: #d8ab5a;
|
|
border-color: #d8ab5a;
|
|
border-color: #d8ab5a;
|
|
margin: 0 20px;
|
|
margin: 0 20px;
|
|
- " @click="jumpFirstPage">首页
|
|
|
|
- </el-button>
|
|
|
|
- <el-pagination background @current-change="handleCurrentChange" layout="total,prev, pager, next"
|
|
|
|
- :total="total" :page-size="pagesize" :current-page="currentPage" prev-text="上一页" next-text="下一页"
|
|
|
|
- :hide-on-single-page="false" ref="pagination">
|
|
|
|
- </el-pagination>
|
|
|
|
- <el-button type="primary" size="small" style="
|
|
|
|
|
|
+ "
|
|
|
|
+ @click="jumpFirstPage"
|
|
|
|
+ >首页
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-pagination
|
|
|
|
+ background
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
+ layout="total,prev, pager, next"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page-size="pagesize"
|
|
|
|
+ :current-page="currentPage"
|
|
|
|
+ prev-text="上一页"
|
|
|
|
+ next-text="下一页"
|
|
|
|
+ :hide-on-single-page="false"
|
|
|
|
+ ref="pagination"
|
|
|
|
+ >
|
|
|
|
+ </el-pagination>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="small"
|
|
|
|
+ style="
|
|
background-color: #d8ab5a;
|
|
background-color: #d8ab5a;
|
|
border-color: #d8ab5a;
|
|
border-color: #d8ab5a;
|
|
margin: 0 20px;
|
|
margin: 0 20px;
|
|
- " @click="jumpLastPage">尾页
|
|
|
|
- </el-button>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ "
|
|
|
|
+ @click="jumpLastPage"
|
|
|
|
+ >尾页
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import {
|
|
|
|
- dataConversionUtil
|
|
|
|
- } from "../../utils/Excel.js";
|
|
|
|
- import {
|
|
|
|
- getSupplierSearch
|
|
|
|
- } from "@/api/supplier";
|
|
|
|
|
|
+import { dataConversionUtil } from "../../utils/Excel.js";
|
|
|
|
+import { getSupplierSearch } from "@/api/supplier";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
filters: {
|
|
filters: {
|
|
@@ -161,7 +242,7 @@ export default {
|
|
status: "",
|
|
status: "",
|
|
socialCode: "",
|
|
socialCode: "",
|
|
legalPerson: "",
|
|
legalPerson: "",
|
|
- isDeleted:'',//供应商状态 0代表未认证,1代表已认证
|
|
|
|
|
|
+ isDeleted: "",
|
|
},
|
|
},
|
|
/* 当前页数 */
|
|
/* 当前页数 */
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
@@ -175,7 +256,7 @@ export default {
|
|
listLoading: false,
|
|
listLoading: false,
|
|
providerStatus: "",
|
|
providerStatus: "",
|
|
search: "",
|
|
search: "",
|
|
- Auditstatus:'',
|
|
|
|
|
|
+ Auditstatus: "",
|
|
multipleSelection: [],
|
|
multipleSelection: [],
|
|
checked: false,
|
|
checked: false,
|
|
pickerOptions: {
|
|
pickerOptions: {
|
|
@@ -229,7 +310,6 @@ export default {
|
|
this.temporaryList = data.result;
|
|
this.temporaryList = data.result;
|
|
this.srcList = data.result;
|
|
this.srcList = data.result;
|
|
this.total = res.data.total;
|
|
this.total = res.data.total;
|
|
-
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleSelectionChange(data) {
|
|
handleSelectionChange(data) {
|
|
@@ -240,7 +320,7 @@ export default {
|
|
this.multipleSelection = data;
|
|
this.multipleSelection = data;
|
|
console.log(this.multipleSelection);
|
|
console.log(this.multipleSelection);
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
toedit(id) {
|
|
toedit(id) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/edit",
|
|
path: "/edit",
|
|
@@ -250,388 +330,344 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
- // 日期审核状态查询
|
|
|
|
|
|
+ // 日期审核状态查询
|
|
startEndTime() {
|
|
startEndTime() {
|
|
- this.formData.startTime = this.value2[0]
|
|
|
|
- this.formData.endTime = this.value2[1]
|
|
|
|
- this.currentPage = 1
|
|
|
|
- this.searchForm = { ...this.formData }
|
|
|
|
- this.getAllList(this.searchForm)
|
|
|
|
|
|
+ this.formData.startTime = this.value2[0];
|
|
|
|
+ this.formData.endTime = this.value2[1];
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = { ...this.formData };
|
|
|
|
+ this.getAllList(this.searchForm);
|
|
},
|
|
},
|
|
- /* 审核状态查询 */
|
|
|
|
|
|
+ /* 审核状态查询 */
|
|
handleCommand(command) {
|
|
handleCommand(command) {
|
|
this.providerStatus = command;
|
|
this.providerStatus = command;
|
|
- if(command === '审核状态'){
|
|
|
|
- this.formData.isDeleted=''
|
|
|
|
- }
|
|
|
|
- if (command === '正常') {
|
|
|
|
- this.formData.isDeleted = 0
|
|
|
|
- }
|
|
|
|
- if (command === '删除') {
|
|
|
|
- this.formData.isDeleted = 1
|
|
|
|
|
|
+ if(command === '审核状态'){
|
|
|
|
+ this.formData.isDeleted=''
|
|
}
|
|
}
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = { ...this.formData };
|
|
|
|
- this.getAllList(this.searchForm);
|
|
|
|
|
|
+ if (command === '正常') {
|
|
|
|
+ this.formData.isDeleted = 0
|
|
|
|
+ }
|
|
|
|
+ if (command === '删除') {
|
|
|
|
+ this.formData.isDeleted = 1
|
|
|
|
+ }
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = { ...this.formData };
|
|
|
|
+ this.getAllList(this.searchForm);
|
|
},
|
|
},
|
|
|
|
|
|
// 输入供应商状态查询
|
|
// 输入供应商状态查询
|
|
- AhandleCommand(command){
|
|
|
|
- this.Auditstatus=command
|
|
|
|
- if(command === '供应商状态'){
|
|
|
|
- this.formData.status=''
|
|
|
|
|
|
+ AhandleCommand(command) {
|
|
|
|
+ this.Auditstatus = command;
|
|
|
|
+ if (command === "供应商状态") {
|
|
|
|
+ this.formData.status = "";
|
|
|
|
+ }
|
|
|
|
+ if (command === "已认证") {
|
|
|
|
+ this.formData.status = 2;
|
|
|
|
+ }
|
|
|
|
+ if (command === "未认证") {
|
|
|
|
+ this.formData.status = 1;
|
|
}
|
|
}
|
|
- if (command === '已认证') {
|
|
|
|
- this.formData.status = 2
|
|
|
|
- }
|
|
|
|
- if (command === '未认证') {
|
|
|
|
- this.formData.status = 1
|
|
|
|
- }
|
|
|
|
this.currentPage = 1;
|
|
this.currentPage = 1;
|
|
this.searchForm = { ...this.formData };
|
|
this.searchForm = { ...this.formData };
|
|
this.getAllList(this.searchForm);
|
|
this.getAllList(this.searchForm);
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
- // 日期审核状态查询
|
|
|
|
- startEndTime() {
|
|
|
|
- this.formData.startTime = this.value2[0]
|
|
|
|
- this.formData.endTime = this.value2[1]
|
|
|
|
- this.currentPage = 1
|
|
|
|
- this.searchForm = {
|
|
|
|
- ...this.formData
|
|
|
|
- }
|
|
|
|
- this.getAllList(this.searchForm)
|
|
|
|
- },
|
|
|
|
- /* 输入供应商状态查询 */
|
|
|
|
- handleCommand(command) {
|
|
|
|
- this.status = command;
|
|
|
|
- if (command === '正常') {
|
|
|
|
- this.formData.status = 5
|
|
|
|
- }
|
|
|
|
- if (command === '删除') {
|
|
|
|
- this.formData.status = 4
|
|
|
|
- }
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = {
|
|
|
|
- ...this.formData
|
|
|
|
- };
|
|
|
|
- this.getAllList(this.searchForm);
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /* 审核状态查询 */
|
|
|
|
- AhandleCommand(command) {
|
|
|
|
- this.Auditstatus = command
|
|
|
|
- if (command === '已认证') {
|
|
|
|
- this.formData.status = 5
|
|
|
|
- }
|
|
|
|
- if (command === '未认证') {
|
|
|
|
- this.formData.status = 4
|
|
|
|
- }
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = {
|
|
|
|
- ...this.formData
|
|
|
|
- };
|
|
|
|
- this.getAllList(this.searchForm);
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
|
|
+ // 日期审核状态查询
|
|
|
|
+ startEndTime() {
|
|
|
|
+ this.formData.startTime = this.value2[0];
|
|
|
|
+ this.formData.endTime = this.value2[1];
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = {
|
|
|
|
+ ...this.formData,
|
|
|
|
+ };
|
|
|
|
+ this.getAllList(this.searchForm);
|
|
|
|
+ },
|
|
|
|
|
|
- /* 输入出票人名称查询 */
|
|
|
|
- Search() {
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = {
|
|
|
|
- ...this.formData
|
|
|
|
- };
|
|
|
|
- this.getAllList(this.searchForm);
|
|
|
|
- },
|
|
|
|
|
|
+ /* 输入出票人名称查询 */
|
|
|
|
+ Search() {
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = {
|
|
|
|
+ ...this.formData,
|
|
|
|
+ };
|
|
|
|
+ this.getAllList(this.searchForm);
|
|
|
|
+ },
|
|
|
|
|
|
- /* 分页功能,改变当前页 */
|
|
|
|
- handleCurrentChange(val) {
|
|
|
|
- this.currentPage = val;
|
|
|
|
- this.getAllList(this.searchForm);
|
|
|
|
- },
|
|
|
|
|
|
+ /* 分页功能,改变当前页 */
|
|
|
|
+ handleCurrentChange(val) {
|
|
|
|
+ this.currentPage = val;
|
|
|
|
+ this.getAllList(this.searchForm);
|
|
|
|
+ },
|
|
|
|
|
|
- /* 分页功能去首页 */
|
|
|
|
- jumpFirstPage() {
|
|
|
|
- this.$refs.pagination.handleCurrentChange(1);
|
|
|
|
- this.$emit("handleCurrentChange", 1);
|
|
|
|
- },
|
|
|
|
- /* 分页功能:去尾页 */
|
|
|
|
- jumpLastPage() {
|
|
|
|
- let font = this.$refs.pagination;
|
|
|
|
- let cpage = Math.ceil(font.total / font.pageSize);
|
|
|
|
- font.handleCurrentChange(cpage);
|
|
|
|
- },
|
|
|
|
|
|
+ /* 分页功能去首页 */
|
|
|
|
+ jumpFirstPage() {
|
|
|
|
+ this.$refs.pagination.handleCurrentChange(1);
|
|
|
|
+ this.$emit("handleCurrentChange", 1);
|
|
|
|
+ },
|
|
|
|
+ /* 分页功能:去尾页 */
|
|
|
|
+ jumpLastPage() {
|
|
|
|
+ let font = this.$refs.pagination;
|
|
|
|
+ let cpage = Math.ceil(font.total / font.pageSize);
|
|
|
|
+ font.handleCurrentChange(cpage);
|
|
|
|
+ },
|
|
|
|
|
|
- /* 导出 */
|
|
|
|
- Exports() {
|
|
|
|
- if (this.multipleSelection == "") {
|
|
|
|
- this.$message({
|
|
|
|
- type: "warning",
|
|
|
|
- message: "请选择数据!",
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- var tableHeader = [
|
|
|
|
- [
|
|
|
|
- "序号",
|
|
|
|
- "供应商名称",
|
|
|
|
- "社会统一信用码",
|
|
|
|
- "账号",
|
|
|
|
- "法人名称",
|
|
|
|
- "联系人",
|
|
|
|
- "电话",
|
|
|
|
- "审核状态",
|
|
|
|
- "时间",
|
|
|
|
- ],
|
|
|
|
- ];
|
|
|
|
- var dataList = [];
|
|
|
|
- this.multipleSelection.forEach((item, index) => {
|
|
|
|
- dataList.push([
|
|
|
|
- index + 1,
|
|
|
|
- item.name,
|
|
|
|
- item.socialCode,
|
|
|
|
- item.account,
|
|
|
|
- item.legalPerson,
|
|
|
|
- item.contacts,
|
|
|
|
- item.contactsMobile,
|
|
|
|
- item.statusText,
|
|
|
|
- item.createdAt,
|
|
|
|
- ]);
|
|
|
|
- });
|
|
|
|
- dataConversionUtil.dataToExcel("供应商列表", tableHeader, dataList);
|
|
|
|
- this.$message.success("导出成功!");
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- success() {
|
|
|
|
- let ids = Array.from(this.multipleSelection, ({
|
|
|
|
- id
|
|
|
|
- }) => id);
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Supplier/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: ids,
|
|
|
|
- operateType: 3,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- failed() {
|
|
|
|
- let ids = Array.from(this.multipleSelection, ({
|
|
|
|
- id
|
|
|
|
- }) => id);
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Supplier/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: ids,
|
|
|
|
- operateType: 4,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- recover() {
|
|
|
|
- let ids = Array.from(this.multipleSelection, ({
|
|
|
|
- id
|
|
|
|
- }) => id);
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Supplier/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: ids,
|
|
|
|
- operateType: 2,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- Srecover(id) {
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Supplier/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: [id],
|
|
|
|
- operateType: 2,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- deleted() {
|
|
|
|
- let ids = Array.from(this.multipleSelection, ({
|
|
|
|
- id
|
|
|
|
- }) => id);
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Supplier/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: ids,
|
|
|
|
- operateType: 1,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- Sdeleted(id) {
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Supplier/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: [id],
|
|
|
|
- operateType: 1,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getAllList();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- reset(id) {
|
|
|
|
- this.$prompt("请输入密码", "重置密码", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancleButtonText: "取消",
|
|
|
|
- })
|
|
|
|
- .then(({
|
|
|
|
- value
|
|
|
|
- }) => {
|
|
|
|
- if(value.length <6){
|
|
|
|
- this.$message({
|
|
|
|
- type:'error',
|
|
|
|
- message:'密码至少六位!'
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Account/password/resetSupplier",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- password: value,
|
|
|
|
- supplierId: id,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- console.log(res);
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: "重置成功",
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- })
|
|
|
|
- .catch(() => {
|
|
|
|
- this.$message({
|
|
|
|
- type: "info",
|
|
|
|
- message: "取消重置密码",
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- };
|
|
|
|
|
|
+ /* 导出 */
|
|
|
|
+ Exports() {
|
|
|
|
+ if (this.multipleSelection == "") {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "warning",
|
|
|
|
+ message: "请选择数据!",
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ var tableHeader = [
|
|
|
|
+ [
|
|
|
|
+ "序号",
|
|
|
|
+ "供应商名称",
|
|
|
|
+ "社会统一信用码",
|
|
|
|
+ "账号",
|
|
|
|
+ "法人名称",
|
|
|
|
+ "联系人",
|
|
|
|
+ "电话",
|
|
|
|
+ "审核状态",
|
|
|
|
+ "时间",
|
|
|
|
+ ],
|
|
|
|
+ ];
|
|
|
|
+ var dataList = [];
|
|
|
|
+ this.multipleSelection.forEach((item, index) => {
|
|
|
|
+ dataList.push([
|
|
|
|
+ index + 1,
|
|
|
|
+ item.name,
|
|
|
|
+ item.socialCode,
|
|
|
|
+ item.account,
|
|
|
|
+ item.legalPerson,
|
|
|
|
+ item.contacts,
|
|
|
|
+ item.contactsMobile,
|
|
|
|
+ item.statusText,
|
|
|
|
+ item.createdAt,
|
|
|
|
+ ]);
|
|
|
|
+ });
|
|
|
|
+ dataConversionUtil.dataToExcel("供应商列表", tableHeader, dataList);
|
|
|
|
+ this.$message.success("导出成功!");
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ success() {
|
|
|
|
+ let ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Supplier/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: ids,
|
|
|
|
+ operateType: 3,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ failed() {
|
|
|
|
+ let ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Supplier/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: ids,
|
|
|
|
+ operateType: 4,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ recover() {
|
|
|
|
+ let ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Supplier/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: ids,
|
|
|
|
+ operateType: 2,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ Srecover(id) {
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Supplier/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: [id],
|
|
|
|
+ operateType: 2,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ deleted() {
|
|
|
|
+ let ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Supplier/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: ids,
|
|
|
|
+ operateType: 1,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ Sdeleted(id) {
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Supplier/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: [id],
|
|
|
|
+ operateType: 1,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getAllList();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ reset(id) {
|
|
|
|
+ this.$prompt("请输入密码", "重置密码", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancleButtonText: "取消",
|
|
|
|
+ })
|
|
|
|
+ .then(({ value }) => {
|
|
|
|
+ if (value.length < 6) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "error",
|
|
|
|
+ message: "密码至少六位!",
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Account/password/resetSupplier",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ password: value,
|
|
|
|
+ supplierId: id,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ console.log(res);
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "重置成功",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "info",
|
|
|
|
+ message: "取消重置密码",
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
- .pulldown {
|
|
|
|
- width: 185px;
|
|
|
|
- height: 40px;
|
|
|
|
- border: 1px solid #e8e8e8;
|
|
|
|
- border-radius: 10px;
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: center;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- padding: 0 20px;
|
|
|
|
- color: #999999;
|
|
|
|
- }
|
|
|
|
|
|
+.pulldown {
|
|
|
|
+ width: 185px;
|
|
|
|
+ height: 40px;
|
|
|
|
+ border: 1px solid #e8e8e8;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ padding: 0 20px;
|
|
|
|
+ color: #999999;
|
|
|
|
+}
|
|
|
|
|
|
- .pagesip {
|
|
|
|
- width: 100%;
|
|
|
|
- margin: 20px auto;
|
|
|
|
- display: flex;
|
|
|
|
- // align-items: center;
|
|
|
|
- justify-content: flex-end;
|
|
|
|
- }
|
|
|
|
|
|
+.pagesip {
|
|
|
|
+ width: 100%;
|
|
|
|
+ margin: 20px auto;
|
|
|
|
+ display: flex;
|
|
|
|
+ // align-items: center;
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
+}
|
|
|
|
|
|
- .el-pagination.is-background .el-pager li:not(.disabled).active {
|
|
|
|
- background-color: #d8ab5a;
|
|
|
|
- }
|
|
|
|
|
|
+.el-pagination.is-background .el-pager li:not(.disabled).active {
|
|
|
|
+ background-color: #d8ab5a;
|
|
|
|
+}
|
|
|
|
|
|
- .el-col {
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
- }
|
|
|
|
|
|
+.el-col {
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+}
|
|
|
|
|
|
- .btn {
|
|
|
|
- padding: 20px;
|
|
|
|
- }
|
|
|
|
|
|
+.btn {
|
|
|
|
+ padding: 20px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|