|
|
@@ -42,8 +42,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="是否为制造商" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 2" @click="type_change(scope,canadd,newcanadd)" :disabled="operType != '制造商'|| !canadd || !newcanadd">非制造商</el-button>
|
|
|
- <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 1" @click="type_change(scope,canadd,newcanadd)" :disabled="operType != '制造商'|| !canadd || !newcanadd">制造商</el-button>
|
|
|
+ <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 2" @click="type_change(scope,canadd,newcanadd)" :disabled="(operType != '制造商')&& !(canadd || newcanadd)">非制造商</el-button>
|
|
|
+ <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 1" @click="type_change(scope,canadd,newcanadd)" :disabled="(operType != '制造商')&& !(canadd || newcanadd)">制造商</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="CertSubStatus"
|
|
|
@@ -351,10 +351,10 @@ export default {
|
|
|
},
|
|
|
type_change(val,canadd,newcanadd){
|
|
|
if (canadd == true || newcanadd == true) {
|
|
|
- if (val.row.IsManufacturer == 2){
|
|
|
- this.tableloading = true
|
|
|
- let IsManufacturer = 2
|
|
|
- this.$axios.get('suppliercertsub/updatemanufacturer/' + parseInt(val.row.Id) +'/'+parseInt(val.row.SupplierId) + '/' + IsManufacturer + '', {}).then(res => {
|
|
|
+ if (val.row.IsManufacturer == 2){
|
|
|
+ this.tableloading = true
|
|
|
+ let IsManufacturer = 2
|
|
|
+ this.$axios.get('suppliercertsub/updatemanufacturer/' + parseInt(val.row.Id) +'/'+parseInt(val.row.SupplierId) + '/' + IsManufacturer + '', {}).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
@@ -364,13 +364,13 @@ export default {
|
|
|
this.tableloading = false
|
|
|
}
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
}else if (val.row.IsManufacturer == 1){//---------------转换供应商与非供应商
|
|
|
- this.tableloading = true
|
|
|
- let IsManufacturer = 1
|
|
|
- this.$axios.get('suppliercertsub/updatemanufacturer/' + parseInt(val.row.Id) +'/'+parseInt(val.row.SupplierId) + '/' + IsManufacturer + '', {}).then(res => {
|
|
|
+ this.tableloading = true
|
|
|
+ let IsManufacturer = 1
|
|
|
+ this.$axios.get('suppliercertsub/updatemanufacturer/' + parseInt(val.row.Id) +'/'+parseInt(val.row.SupplierId) + '/' + IsManufacturer + '', {}).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
@@ -380,9 +380,9 @@ export default {
|
|
|
this.tableloading = false
|
|
|
}
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
},
|