|
@@ -4,255 +4,200 @@
|
|
|
<template v-if="!addOrUpdateVisible && !detailVisible && !attachVisible">
|
|
<template v-if="!addOrUpdateVisible && !detailVisible && !attachVisible">
|
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
|
|
|
<el-form-item label="供应商名称">
|
|
<el-form-item label="供应商名称">
|
|
|
- <el-input v-model="dataForm.supplierName" placeholder="供应商名称" clearable/>
|
|
|
|
|
|
|
+ <el-input v-model="dataForm.supplierName" placeholder="供应商名称" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="状态">
|
|
<el-form-item label="状态">
|
|
|
- <el-select
|
|
|
|
|
- v-model="dataForm.supplierState"
|
|
|
|
|
- remote
|
|
|
|
|
- placeholder="请选择">
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in optionsSupplierState"
|
|
|
|
|
- :key="item.code"
|
|
|
|
|
- :label="item.value"
|
|
|
|
|
- :value="item.code">
|
|
|
|
|
|
|
+ <el-select v-model="dataForm.supplierState" remote placeholder="请选择">
|
|
|
|
|
+ <el-option v-for="item in optionsSupplierState" :key="item.code" :label="item.value" :value="item.code">
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button @click="search()">查询</el-button>
|
|
<el-button @click="search()">查询</el-button>
|
|
|
- <el-button v-if="isAuth('purchase:supplie:save')" type="primary" @click="addOrUpdateHandle(0, 0)">录入</el-button>
|
|
|
|
|
|
|
+ <el-button v-if="isAuth('purchase:supplie:save')" type="primary"
|
|
|
|
|
+ @click="addOrUpdateHandle(0, 0)">录入</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
- <el-table
|
|
|
|
|
- :data="dataList"
|
|
|
|
|
- border
|
|
|
|
|
- v-loading="dataListLoading"
|
|
|
|
|
- style="width: 100%;">
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- label="序号"
|
|
|
|
|
- type="index"
|
|
|
|
|
- width="50"
|
|
|
|
|
- align="center">
|
|
|
|
|
|
|
+ <el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
|
|
|
|
|
+ <el-table-column label="序号" type="index" width="50" align="center">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- prop="supplierName"
|
|
|
|
|
- header-align="center"
|
|
|
|
|
- align="center"
|
|
|
|
|
- width="140"
|
|
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
|
|
- label="供应商名称">
|
|
|
|
|
|
|
+ <el-table-column prop="supplierName" header-align="center" align="center" width="140"
|
|
|
|
|
+ :show-tooltip-when-overflow="true" label="供应商名称">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- prop="levelName"
|
|
|
|
|
- header-align="center"
|
|
|
|
|
- align="center"
|
|
|
|
|
- label="级别">
|
|
|
|
|
|
|
+ <el-table-column prop="levelName" header-align="center" align="center" label="级别">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- prop="contact"
|
|
|
|
|
- header-align="center"
|
|
|
|
|
- align="center"
|
|
|
|
|
- width="100"
|
|
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
|
|
- label="联系人">
|
|
|
|
|
|
|
+ <el-table-column prop="contact" header-align="center" align="center" width="100"
|
|
|
|
|
+ :show-tooltip-when-overflow="true" label="联系人">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- prop="tel"
|
|
|
|
|
- header-align="center"
|
|
|
|
|
- align="center"
|
|
|
|
|
- min-width="100"
|
|
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
|
|
- label="电话">
|
|
|
|
|
|
|
+ <el-table-column prop="tel" header-align="center" align="center" min-width="100"
|
|
|
|
|
+ :show-tooltip-when-overflow="true" label="电话">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- prop="addressWork"
|
|
|
|
|
- header-align="center"
|
|
|
|
|
- align="center"
|
|
|
|
|
- min-width="140"
|
|
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
|
|
- label="地址">
|
|
|
|
|
|
|
+ <el-table-column prop="addressWork" header-align="center" align="center" min-width="140"
|
|
|
|
|
+ :show-tooltip-when-overflow="true" label="地址">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- prop="state"
|
|
|
|
|
- header-align="center"
|
|
|
|
|
- align="center"
|
|
|
|
|
- :formatter="formatState"
|
|
|
|
|
- label="状态">
|
|
|
|
|
|
|
+ <el-table-column prop="state" header-align="center" align="center" :formatter="formatState" label="状态">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
-<!-- <el-table-column-->
|
|
|
|
|
-<!-- header-align="center"-->
|
|
|
|
|
-<!-- align="center"-->
|
|
|
|
|
-<!-- label="附件">-->
|
|
|
|
|
-<!-- <template slot-scope="scope">-->
|
|
|
|
|
-<!-- <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small" @click="attachDetails(scope.row)">查看</el-button>-->
|
|
|
|
|
-<!-- </template>-->
|
|
|
|
|
-<!-- </el-table-column>-->
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- prop="notes"
|
|
|
|
|
- header-align="center"
|
|
|
|
|
- align="center"
|
|
|
|
|
- min-width="180"
|
|
|
|
|
- :show-overflow-tooltip="true"
|
|
|
|
|
- label="备注">
|
|
|
|
|
|
|
+ <!-- <el-table-column-->
|
|
|
|
|
+ <!-- header-align="center"-->
|
|
|
|
|
+ <!-- align="center"-->
|
|
|
|
|
+ <!-- label="附件">-->
|
|
|
|
|
+ <!-- <template slot-scope="scope">-->
|
|
|
|
|
+ <!-- <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small" @click="attachDetails(scope.row)">查看</el-button>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
|
|
+ <!-- </el-table-column>-->
|
|
|
|
|
+ <el-table-column prop="prodIntroduce" header-align="center" align="center" min-width="180"
|
|
|
|
|
+ :show-overflow-tooltip="true" label="公司介绍">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- fixed="right"
|
|
|
|
|
- header-align="center"
|
|
|
|
|
- align="center"
|
|
|
|
|
- width="240"
|
|
|
|
|
- label="操作">
|
|
|
|
|
|
|
+ <el-table-column fixed="right" header-align="center" align="center" width="240" label="操作">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="isAuth('purchase:supplie:info')" type="text" size="small" @click="detailHandle(scope.row.supplierId)">查看</el-button>
|
|
|
|
|
- <el-button v-if="isAuth('purchase:supplie:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.supplierId, 1)">编辑</el-button>
|
|
|
|
|
- <el-button v-if="isAuth('purchase:supplie:disqualification')" type="text" size="small" @click="addOrUpdateHandle(scope.row.supplierId, 2)">重新评审</el-button>
|
|
|
|
|
- <el-button v-if="isAuth('purchase:supplie:disqualification')" type="text" size="small" @click="addOrUpdateHandle(scope.row.supplierId, 3)">取消供应商</el-button>
|
|
|
|
|
|
|
+ <el-button v-if="isAuth('purchase:supplie:info')" type="text" size="small"
|
|
|
|
|
+ @click="detailHandle(scope.row.supplierId)">查看</el-button>
|
|
|
|
|
+ <el-button v-if="isAuth('purchase:supplie:update')" type="text" size="small"
|
|
|
|
|
+ @click="addOrUpdateHandle(scope.row.supplierId, 1)">编辑</el-button>
|
|
|
|
|
+ <el-button v-if="isAuth('purchase:supplie:disqualification')" type="text" size="small"
|
|
|
|
|
+ @click="addOrUpdateHandle(scope.row.supplierId, 2)">重新评审</el-button>
|
|
|
|
|
+ <el-button v-if="isAuth('purchase:supplie:disqualification')" type="text" size="small"
|
|
|
|
|
+ @click="addOrUpdateHandle(scope.row.supplierId, 3)">取消供应商</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
- <el-pagination
|
|
|
|
|
- @size-change="sizeChangeHandle"
|
|
|
|
|
- @current-change="currentChangeHandle"
|
|
|
|
|
- :current-page="pageIndex"
|
|
|
|
|
- :page-sizes="[10, 20, 50, 100]"
|
|
|
|
|
- :page-size="pageSize"
|
|
|
|
|
- :total="totalPage"
|
|
|
|
|
|
|
+ <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
|
|
|
|
|
+ :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage"
|
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
|
</el-pagination>
|
|
</el-pagination>
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 弹窗, 新增 / 修改 -->
|
|
<!-- 弹窗, 新增 / 修改 -->
|
|
|
- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @onChose="onChose"></add-or-update>
|
|
|
|
|
- <detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
|
|
|
|
|
- <attach-detail v-if="attachVisible" ref="attachDetail" @onChose="onChose"/>
|
|
|
|
|
|
|
+ <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"
|
|
|
|
|
+ @onChose="onChose"></add-or-update>
|
|
|
|
|
+ <detail v-if="detailVisible" ref="detail" @onChose="onChose" />
|
|
|
|
|
+ <attach-detail v-if="attachVisible" ref="attachDetail" @onChose="onChose" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import AddOrUpdate from './supplier-add-or-update'
|
|
|
|
|
- import Detail from './supplier-detail'
|
|
|
|
|
- import { getSupplierList } from '@/api/sale'
|
|
|
|
|
- import AttachDetail from '../common/attach-detail'
|
|
|
|
|
|
|
+import AddOrUpdate from './supplier-add-or-update'
|
|
|
|
|
+import Detail from './supplier-detail'
|
|
|
|
|
+import { getSupplierList } from '@/api/sale'
|
|
|
|
|
+import AttachDetail from '../common/attach-detail'
|
|
|
export default {
|
|
export default {
|
|
|
- name: 'supplier',
|
|
|
|
|
- components: {
|
|
|
|
|
- AttachDetail,
|
|
|
|
|
- AddOrUpdate,
|
|
|
|
|
- Detail
|
|
|
|
|
|
|
+ name: 'supplier',
|
|
|
|
|
+ components: {
|
|
|
|
|
+ AttachDetail,
|
|
|
|
|
+ AddOrUpdate,
|
|
|
|
|
+ Detail
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ dataForm: {},
|
|
|
|
|
+ dataList: [],
|
|
|
|
|
+ pageIndex: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ totalPage: 0,
|
|
|
|
|
+ dataListLoading: false,
|
|
|
|
|
+ dataListSelections: [],
|
|
|
|
|
+ addOrUpdateVisible: false,
|
|
|
|
|
+ detailVisible: false,
|
|
|
|
|
+ attachVisible: false,
|
|
|
|
|
+ optionsSupplierState: [ // 供应商状态
|
|
|
|
|
+ {
|
|
|
|
|
+ code: null, value: '全部'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ code: '0', value: '评审中'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ code: '1', value: '正常'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ code: '2', value: '评审不合格'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ code: '3', value: '资格取消'
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ optionsState: [] // 审批状态
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.optionsState = this.$store.state.common.approveStates
|
|
|
|
|
+ this.getDataList()
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ onChose() {
|
|
|
|
|
+ this.addOrUpdateVisible = false
|
|
|
|
|
+ this.detailVisible = false
|
|
|
|
|
+ this.attachVisible = false
|
|
|
|
|
+ },
|
|
|
|
|
+ // 查询
|
|
|
|
|
+ search() {
|
|
|
|
|
+ this.pageIndex = 1
|
|
|
|
|
+ this.getDataList()
|
|
|
},
|
|
},
|
|
|
- data () {
|
|
|
|
|
- return {
|
|
|
|
|
- dataForm: {},
|
|
|
|
|
- dataList: [],
|
|
|
|
|
- pageIndex: 1,
|
|
|
|
|
- pageSize: 10,
|
|
|
|
|
- totalPage: 0,
|
|
|
|
|
- dataListLoading: false,
|
|
|
|
|
- dataListSelections: [],
|
|
|
|
|
- addOrUpdateVisible: false,
|
|
|
|
|
- detailVisible: false,
|
|
|
|
|
- attachVisible: false,
|
|
|
|
|
- optionsSupplierState: [ // 供应商状态
|
|
|
|
|
- {
|
|
|
|
|
- code: null, value: '全部'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- code: '0', value: '评审中'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- code: '1', value: '正常'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- code: '2', value: '评审不合格'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- code: '3', value: '资格取消'
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
- optionsState: [] // 审批状态
|
|
|
|
|
|
|
+ // 获取数据列表
|
|
|
|
|
+ getDataList() {
|
|
|
|
|
+ this.dataListLoading = true
|
|
|
|
|
+ this.addOrUpdateVisible = false
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ 'current': this.pageIndex,
|
|
|
|
|
+ 'size': this.pageSize,
|
|
|
|
|
+ 'supplierName': this.dataForm.supplierName ? this.dataForm.supplierName : null,
|
|
|
|
|
+ 'supplierState': this.dataForm.supplierState ? this.dataForm.supplierState : null
|
|
|
}
|
|
}
|
|
|
|
|
+ getSupplierList(params).then(({ data }) => {
|
|
|
|
|
+ if (data && data.code === '200') {
|
|
|
|
|
+ this.dataList = data.data.records
|
|
|
|
|
+ this.totalPage = Number(data.data.total)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.dataList = []
|
|
|
|
|
+ this.totalPage = 0
|
|
|
|
|
+ }
|
|
|
|
|
+ this.dataListLoading = false
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- created () {
|
|
|
|
|
- this.optionsState = this.$store.state.common.approveStates
|
|
|
|
|
|
|
+ // 每页数
|
|
|
|
|
+ sizeChangeHandle(val) {
|
|
|
|
|
+ this.pageSize = val
|
|
|
|
|
+ this.pageIndex = 1
|
|
|
this.getDataList()
|
|
this.getDataList()
|
|
|
},
|
|
},
|
|
|
- methods: {
|
|
|
|
|
- onChose () {
|
|
|
|
|
- this.addOrUpdateVisible = false
|
|
|
|
|
- this.detailVisible = false
|
|
|
|
|
- this.attachVisible = false
|
|
|
|
|
- },
|
|
|
|
|
- // 查询
|
|
|
|
|
- search () {
|
|
|
|
|
- this.pageIndex = 1
|
|
|
|
|
- this.getDataList()
|
|
|
|
|
- },
|
|
|
|
|
- // 获取数据列表
|
|
|
|
|
- getDataList () {
|
|
|
|
|
- this.dataListLoading = true
|
|
|
|
|
- this.addOrUpdateVisible = false
|
|
|
|
|
- let params = {
|
|
|
|
|
- 'current': this.pageIndex,
|
|
|
|
|
- 'size': this.pageSize,
|
|
|
|
|
- 'supplierName': this.dataForm.supplierName ? this.dataForm.supplierName : null,
|
|
|
|
|
- 'supplierState': this.dataForm.supplierState ? this.dataForm.supplierState : null
|
|
|
|
|
- }
|
|
|
|
|
- getSupplierList(params).then(({data}) => {
|
|
|
|
|
- if (data && data.code === '200') {
|
|
|
|
|
- this.dataList = data.data.records
|
|
|
|
|
- this.totalPage = Number(data.data.total)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.dataList = []
|
|
|
|
|
- this.totalPage = 0
|
|
|
|
|
- }
|
|
|
|
|
- this.dataListLoading = false
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 每页数
|
|
|
|
|
- sizeChangeHandle (val) {
|
|
|
|
|
- this.pageSize = val
|
|
|
|
|
- this.pageIndex = 1
|
|
|
|
|
- this.getDataList()
|
|
|
|
|
- },
|
|
|
|
|
- // 当前页
|
|
|
|
|
- currentChangeHandle (val) {
|
|
|
|
|
- this.pageIndex = val
|
|
|
|
|
- this.getDataList()
|
|
|
|
|
- },
|
|
|
|
|
- // 多选
|
|
|
|
|
- selectionChangeHandle (val) {
|
|
|
|
|
- this.dataListSelections = val
|
|
|
|
|
- },
|
|
|
|
|
- // 新增 / 修改
|
|
|
|
|
- addOrUpdateHandle (id, type) {
|
|
|
|
|
- this.addOrUpdateVisible = true
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$refs.addOrUpdate.init(id, type)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 转换属性“状态”
|
|
|
|
|
- formatState (row) {
|
|
|
|
|
- if (!row.state) return ''
|
|
|
|
|
- const item1 = this.optionsSupplierState.find((item) => item.code === row.state.toString())
|
|
|
|
|
- return item1 ? item1.value : ''
|
|
|
|
|
- },
|
|
|
|
|
- // 详情
|
|
|
|
|
- detailHandle (id) {
|
|
|
|
|
- this.detailVisible = true
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$refs.detail.init(id)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 附件
|
|
|
|
|
- attachDetails (row) {
|
|
|
|
|
- this.attachVisible = true
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$refs.attachDetail.init(row.attachList)
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 当前页
|
|
|
|
|
+ currentChangeHandle(val) {
|
|
|
|
|
+ this.pageIndex = val
|
|
|
|
|
+ this.getDataList()
|
|
|
|
|
+ },
|
|
|
|
|
+ // 多选
|
|
|
|
|
+ selectionChangeHandle(val) {
|
|
|
|
|
+ this.dataListSelections = val
|
|
|
|
|
+ },
|
|
|
|
|
+ // 新增 / 修改
|
|
|
|
|
+ addOrUpdateHandle(id, type) {
|
|
|
|
|
+ this.addOrUpdateVisible = true
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.addOrUpdate.init(id, type)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 转换属性“状态”
|
|
|
|
|
+ formatState(row) {
|
|
|
|
|
+ if (!row.state) return ''
|
|
|
|
|
+ const item1 = this.optionsSupplierState.find((item) => item.code === row.state.toString())
|
|
|
|
|
+ return item1 ? item1.value : ''
|
|
|
|
|
+ },
|
|
|
|
|
+ // 详情
|
|
|
|
|
+ detailHandle(id) {
|
|
|
|
|
+ this.detailVisible = true
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.detail.init(id)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 附件
|
|
|
|
|
+ attachDetails(row) {
|
|
|
|
|
+ this.attachVisible = true
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.attachDetail.init(row.attachList)
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style scoped>
|
|
|
|
|
-
|
|
|
|
|
-</style>
|
|
|
|
|
|
|
+<style scoped></style>
|