|
|
@@ -9,13 +9,19 @@
|
|
|
|
|
|
</span>
|
|
|
<el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
|
|
|
+ <el-form-item label="编码">
|
|
|
+ <el-input size="mini" v-model="searchForm.Code" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="名称">
|
|
|
+ <el-input size="mini" v-model="searchForm.Name" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="筛选条件">
|
|
|
<el-select placeholder="请选择" v-model="conditions" style="width: 100%" size="mini">
|
|
|
<el-option :key="1" label="编码和级别匹配正确" :value="1"></el-option>
|
|
|
<el-option :key="2" label="1级降2级" :value="2"></el-option>
|
|
|
<el-option :key="3" label="2级升1级" :value="3"></el-option>
|
|
|
- <el-option :key="4" label="旧表有导入无" :value="4"></el-option>
|
|
|
- <el-option :key="5" label="导入有旧表无" :value="5"></el-option>
|
|
|
+<!-- <el-option :key="4" label="旧表有导入无" :value="4"></el-option>-->
|
|
|
+<!-- <el-option :key="5" label="导入有旧表无" :value="5"></el-option>-->
|
|
|
<el-option :key="6" label="完全匹配正确" :value="6"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
@@ -23,30 +29,31 @@
|
|
|
<el-button type="primary" size="mini" @click="importhandleSearch">查询</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" size="mini" @click="deleteList" :disabled="isDisable">删除</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="deleteList" :disabled="isDisable" :loading="deleteloading">删除</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="changeList" v-if="conditions !== 3" :disabled="isDisableCh" :loading="changeloading">变更</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <el-table stripe highlight-current-row :data="entityList" id="rebateSetTable" size="mini" border height="calc(100vh - 243px)"
|
|
|
- style="width: 100%" @sort-change="orderby" v-loading="loading" >
|
|
|
- <el-table-column>
|
|
|
+ <el-table highlight-current-row :data="entityList" id="rebateSetTable" size="mini" border height="calc(100vh - 243px)"
|
|
|
+ style="width: 100%" @sort-change="orderby" v-loading="loading" :row-class-name="tableRowClassName">
|
|
|
+ <el-table-column align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-checkbox :label="scope.row['Id']" :key="scope.row['Id']" style="margin-left:15px;" @change="handleCheckedCitiesChange($event, scope.row['Id'])">
|
|
|
+ <el-checkbox :key="scope.row['ClassId']" @change="handleCheckedCitiesChange($event, scope.row['ClassId'])">
|
|
|
</el-checkbox>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-for="column in tableColumns" :prop="column.prop" sortable :width="column.width"
|
|
|
+ <el-table-column v-for="column in tableColumns" :prop="column.prop" :width="column.width"
|
|
|
:key="column.Id" :label="column.label" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="(column.prop != 'GoodsLevel' && column.prop != 'GoodsDesc' && column.prop != 'Standard' && column.prop != 'CompanyType')">{{ transferStr(scope.row[column.prop]) }}</span>
|
|
|
- <span v-else-if="(column.prop === 'CompanyType')">物资类</span>
|
|
|
+ <span v-else-if="(column.prop === 'GoodsLevel')">{{(scope.row[column.prop])}}|{{(scope.row['tmp'+column.prop])}}</span>
|
|
|
<span v-else>{{ (scope.row[column.prop]) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<!--动态显示的表头-->
|
|
|
<template v-for="column in dynamicTableColumns">
|
|
|
- <el-table-column :prop="column.prop" sortable :width="80"
|
|
|
+ <el-table-column :prop="column.prop" :width="80"
|
|
|
:key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='0'" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
{{ transferStr2(scope.row[column.prop]) }}|{{transferStr2(scope.row['tmp'+column.prop])}}
|
|
|
@@ -56,7 +63,7 @@
|
|
|
|
|
|
<el-table-column label="贸易产品">
|
|
|
<template v-for="column in dynamicTableColumns">
|
|
|
- <el-table-column :prop="column.prop" sortable :width="80"
|
|
|
+ <el-table-column :prop="column.prop" :width="80"
|
|
|
:key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='2'" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
{{ transferStr2(scope.row[column.prop]) }}|{{transferStr2(scope.row['tmp'+column.prop])}}
|
|
|
@@ -67,10 +74,10 @@
|
|
|
|
|
|
<el-table-column label="制造产品">
|
|
|
<template v-for="column in dynamicTableColumns">
|
|
|
- <el-table-column :prop="column.prop" sortable :width="80"
|
|
|
+ <el-table-column :prop="column.prop" :width="80"
|
|
|
:key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='1'" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ transferStr(scope.row[column.prop]) }}|{{transferStr2(scope.row['tmp'+column.prop])}}
|
|
|
+ {{ transferStr2(scope.row[column.prop]) }}|{{transferStr2(scope.row['tmp'+column.prop])}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</template>
|
|
|
@@ -108,7 +115,11 @@
|
|
|
Prop: ''
|
|
|
},
|
|
|
loading: false,
|
|
|
+ deleteloading: false,
|
|
|
+ changeloading: false,
|
|
|
searchForm: {
|
|
|
+ Name: '',
|
|
|
+ Code: '',
|
|
|
AccessCardNo: '',
|
|
|
SupplierName: '',
|
|
|
SupplierTypeCode: '',
|
|
|
@@ -194,11 +205,17 @@
|
|
|
dynamicTableColumns: [],
|
|
|
CreateOn: [],
|
|
|
deleteArr: [],
|
|
|
- isDisable: true
|
|
|
+ isDisable: true,
|
|
|
+ isDisableCh: true
|
|
|
}
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ tableRowClassName({row, rowIndex}) {
|
|
|
+ if (row.checked === 1) {
|
|
|
+ return 'yellow-row'
|
|
|
+ }
|
|
|
+ },
|
|
|
// 列表排序功能
|
|
|
orderby (column) {
|
|
|
if (column.order === 'ascending') {
|
|
|
@@ -257,21 +274,65 @@
|
|
|
let a = this.deleteArr.findIndex(item => item === val)
|
|
|
this.deleteArr.splice(a, 1)
|
|
|
}
|
|
|
- console.log(val, this.deleteArr.length, 'value')
|
|
|
+ console.log(val, this.deleteArr, 'value')
|
|
|
if (this.deleteArr.length > 0) {
|
|
|
this.isDisable = false
|
|
|
+ this.isDisableCh = false
|
|
|
+ } else {
|
|
|
+ this.isDisable = true
|
|
|
+ this.isDisableCh = true
|
|
|
}
|
|
|
},
|
|
|
deleteList () {
|
|
|
- let params = {
|
|
|
- deleteArr: this.deleteArr.toString()
|
|
|
- }
|
|
|
- api.deleteList(params, this.$axios).then(res => {
|
|
|
- this.entityList = res.data.items
|
|
|
- this.currentItemCount = res.data.currentItemCount
|
|
|
- this.loading = false
|
|
|
- }).catch(err => {
|
|
|
- console.error(err)
|
|
|
+ this.$confirm('确认删除企业对应的准入范围?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.deleteloading = true
|
|
|
+ api.deleteList(this.deleteArr.toString(), this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ this.initDatas()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.deleteloading = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changeList () {
|
|
|
+ this.$confirm('确认暂停企业对应的准入范围?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.changeloading = true
|
|
|
+ api.changeList(this.deleteArr.toString(), this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ this.initDatas()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.changeloading = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
initDatas () {
|
|
|
@@ -301,7 +362,10 @@
|
|
|
api.getCompareList(myCreateOn, params, this.$axios).then(res => {
|
|
|
this.entityList = res.data.items
|
|
|
this.currentItemCount = res.data.currentItemCount
|
|
|
+ this.isDisable = true
|
|
|
+ this.isDisableCh = true
|
|
|
this.loading = false
|
|
|
+ this.deleteArr = []
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
@@ -318,3 +382,8 @@
|
|
|
|
|
|
}
|
|
|
</script>
|
|
|
+<style>
|
|
|
+.el-table .yellow-row {
|
|
|
+ background: lightyellow;
|
|
|
+}
|
|
|
+</style>
|