|
@@ -277,21 +277,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import setapi from "@/api/oilsupplier/oilclassorgset";
|
|
|
|
|
|
|
+import setapi from '@/api/oilsupplier/oilclassorgset'
|
|
|
export default {
|
|
export default {
|
|
|
- created() {
|
|
|
|
|
|
|
+ created () {
|
|
|
// 执行初始化方法
|
|
// 执行初始化方法
|
|
|
- this.initDatas();
|
|
|
|
|
- this.initCompany();
|
|
|
|
|
|
|
+ this.initDatas()
|
|
|
|
|
+ this.initCompany()
|
|
|
},
|
|
},
|
|
|
- data() {
|
|
|
|
|
|
|
+ data () {
|
|
|
return {
|
|
return {
|
|
|
- companyChooseName: "",
|
|
|
|
|
|
|
+ companyChooseName: '',
|
|
|
companyDialog: false,
|
|
companyDialog: false,
|
|
|
dataList: [],
|
|
dataList: [],
|
|
|
addshow: false,
|
|
addshow: false,
|
|
|
editshow: false,
|
|
editshow: false,
|
|
|
- editId: "",
|
|
|
|
|
|
|
+ editId: '',
|
|
|
// 定义列表数据
|
|
// 定义列表数据
|
|
|
entityList: [],
|
|
entityList: [],
|
|
|
// 分页参数
|
|
// 分页参数
|
|
@@ -302,265 +302,265 @@ export default {
|
|
|
currentItemCount: 0,
|
|
currentItemCount: 0,
|
|
|
currentItemCount1: 0,
|
|
currentItemCount1: 0,
|
|
|
entityForm: {
|
|
entityForm: {
|
|
|
- CompanyCode: "",
|
|
|
|
|
- CompanyName: "",
|
|
|
|
|
- Categorycode: "",
|
|
|
|
|
- Record: "",
|
|
|
|
|
- Bak2: ""
|
|
|
|
|
|
|
+ CompanyCode: '',
|
|
|
|
|
+ CompanyName: '',
|
|
|
|
|
+ Categorycode: '',
|
|
|
|
|
+ Record: '',
|
|
|
|
|
+ Bak2: ''
|
|
|
},
|
|
},
|
|
|
editForm: {
|
|
editForm: {
|
|
|
- Companyname: "",
|
|
|
|
|
- Categorycode: "",
|
|
|
|
|
- Record: "",
|
|
|
|
|
- Bak2: ""
|
|
|
|
|
|
|
+ Companyname: '',
|
|
|
|
|
+ Categorycode: '',
|
|
|
|
|
+ Record: '',
|
|
|
|
|
+ Bak2: ''
|
|
|
},
|
|
},
|
|
|
searchForm: {
|
|
searchForm: {
|
|
|
- Companyname: "",
|
|
|
|
|
- Categorycode: ""
|
|
|
|
|
|
|
+ Companyname: '',
|
|
|
|
|
+ Categorycode: ''
|
|
|
},
|
|
},
|
|
|
rules: {
|
|
rules: {
|
|
|
CompanyName: [
|
|
CompanyName: [
|
|
|
{
|
|
{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: "请输入企业名称",
|
|
|
|
|
- trigger: "change"
|
|
|
|
|
|
|
+ message: '请输入企业名称',
|
|
|
|
|
+ trigger: 'change'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
Categorycode: [
|
|
Categorycode: [
|
|
|
{
|
|
{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: "请选择准入类别",
|
|
|
|
|
- trigger: "change"
|
|
|
|
|
|
|
+ message: '请选择准入类别',
|
|
|
|
|
+ trigger: 'change'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
Record: [
|
|
Record: [
|
|
|
{
|
|
{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: "请填写不良记录",
|
|
|
|
|
- trigger: "change"
|
|
|
|
|
|
|
+ message: '请填写不良记录',
|
|
|
|
|
+ trigger: 'change'
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
|
- };
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
- back(row) {
|
|
|
|
|
- var id = row.Id;
|
|
|
|
|
|
|
+ back (row) {
|
|
|
|
|
+ var id = row.Id
|
|
|
console.log(id)
|
|
console.log(id)
|
|
|
- this.$confirm("确定恢复不良记录状态?", "提示", {
|
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
- type: "warning"
|
|
|
|
|
|
|
+ this.$confirm('确定恢复不良记录状态?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
setapi
|
|
setapi
|
|
|
.backbadrecordbyid(id, this.$axios)
|
|
.backbadrecordbyid(id, this.$axios)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
- //刷新列表
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ // 刷新列表
|
|
|
|
|
+ this.initDatas()
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- type: "success",
|
|
|
|
|
|
|
+ type: 'success',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- type: "warning",
|
|
|
|
|
|
|
+ type: 'warning',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- console.error(err);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
- .catch(() => {});
|
|
|
|
|
|
|
+ .catch(() => {})
|
|
|
},
|
|
},
|
|
|
- changeVal(val) {
|
|
|
|
|
- if (val != null && val != "") {
|
|
|
|
|
- return val;
|
|
|
|
|
|
|
+ changeVal (val) {
|
|
|
|
|
+ if (val != null && val !== '') {
|
|
|
|
|
+ return val
|
|
|
} else {
|
|
} else {
|
|
|
- return "——";
|
|
|
|
|
|
|
+ return '——'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- getChooseCode(val) {
|
|
|
|
|
- this.entityForm.CompanyCode = val.Id;
|
|
|
|
|
- this.entityForm.CompanyName = val.SupplierName;
|
|
|
|
|
- this.companyDialog = false;
|
|
|
|
|
|
|
+ getChooseCode (val) {
|
|
|
|
|
+ this.entityForm.CompanyCode = val.Id
|
|
|
|
|
+ this.entityForm.CompanyName = val.SupplierName
|
|
|
|
|
+ this.companyDialog = false
|
|
|
},
|
|
},
|
|
|
- EditSubmit() {
|
|
|
|
|
- this.$refs["EditFormref"].validate(valid => {
|
|
|
|
|
|
|
+ EditSubmit () {
|
|
|
|
|
+ this.$refs['EditFormref'].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
setapi
|
|
setapi
|
|
|
.updatebadrecordbyid(this.editId, this.editForm, this.$axios)
|
|
.updatebadrecordbyid(this.editId, this.editForm, this.$axios)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
- this.initDatas();
|
|
|
|
|
- this.editshow = false;
|
|
|
|
|
|
|
+ this.initDatas()
|
|
|
|
|
+ this.editshow = false
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- type: "success",
|
|
|
|
|
|
|
+ type: 'success',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
- });
|
|
|
|
|
- this.$refs["EditFormref"].resetFields();
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ this.$refs['EditFormref'].resetFields()
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- type: "warning",
|
|
|
|
|
|
|
+ type: 'warning',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- console.error(err);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- edit(row) {
|
|
|
|
|
- this.editId = row.Id; //记录将更新的id
|
|
|
|
|
- this.editshow = true; //显示界面
|
|
|
|
|
- this.editForm.Companyname = row.Companyname; //反显名称
|
|
|
|
|
- this.editForm.Categorycode = row.Categorycode; //返现类别名称根据value值
|
|
|
|
|
- this.editForm.Record = row.Record; //返现类别名称根据value值
|
|
|
|
|
- this.editForm.Bak2 = row.Bak2; //返现类别名称根据value值
|
|
|
|
|
|
|
+ edit (row) {
|
|
|
|
|
+ this.editId = row.Id // 记录将更新的id
|
|
|
|
|
+ this.editshow = true // 显示界面
|
|
|
|
|
+ this.editForm.Companyname = row.Companyname // 反显名称
|
|
|
|
|
+ this.editForm.Categorycode = row.Categorycode // 返现类别名称根据value值
|
|
|
|
|
+ this.editForm.Record = row.Record // 返现类别名称根据value值
|
|
|
|
|
+ this.editForm.Bak2 = row.Bak2 // 返现类别名称根据value值
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- deleterow(row) {
|
|
|
|
|
- var id = row.Id;
|
|
|
|
|
- this.$confirm("确定删除?", "提示", {
|
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
- type: "warning"
|
|
|
|
|
|
|
+ deleterow (row) {
|
|
|
|
|
+ var id = row.Id
|
|
|
|
|
+ this.$confirm('确定删除?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
setapi
|
|
setapi
|
|
|
.deletebadrecordbyid(id, this.$axios)
|
|
.deletebadrecordbyid(id, this.$axios)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
- //刷新列表
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ // 刷新列表
|
|
|
|
|
+ this.initDatas()
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- type: "success",
|
|
|
|
|
|
|
+ type: 'success',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- type: "warning",
|
|
|
|
|
|
|
+ type: 'warning',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- console.error(err);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
- .catch(() => {});
|
|
|
|
|
|
|
+ .catch(() => {})
|
|
|
},
|
|
},
|
|
|
- //增加方法
|
|
|
|
|
- addAnnualAudit() {
|
|
|
|
|
- this.$refs["EntityFormref"].validate(valid => {
|
|
|
|
|
|
|
+ // 增加方法
|
|
|
|
|
+ addAnnualAudit () {
|
|
|
|
|
+ this.$refs['EntityFormref'].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
setapi
|
|
setapi
|
|
|
.addBadRecord(this.entityForm, this.$axios)
|
|
.addBadRecord(this.entityForm, this.$axios)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
- //刷新列表
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ // 刷新列表
|
|
|
|
|
+ this.initDatas()
|
|
|
|
|
|
|
|
- this.addshow = false;
|
|
|
|
|
|
|
+ this.addshow = false
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- type: "success",
|
|
|
|
|
|
|
+ type: 'success',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
- });
|
|
|
|
|
- this.$refs["EntityFormref"].resetFields();
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ this.$refs['EntityFormref'].resetFields()
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- type: "warning",
|
|
|
|
|
|
|
+ type: 'warning',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- console.error(err);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- initCompany(event) {
|
|
|
|
|
|
|
+ initCompany (event) {
|
|
|
if (event != null) {
|
|
if (event != null) {
|
|
|
- this.currentPage1 = 1;
|
|
|
|
|
|
|
+ this.currentPage1 = 1
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
let params = {
|
|
let params = {
|
|
|
_size: this.size1,
|
|
_size: this.size1,
|
|
|
_currentPage: this.currentPage1,
|
|
_currentPage: this.currentPage1,
|
|
|
_companyName: this.companyChooseName
|
|
_companyName: this.companyChooseName
|
|
|
- };
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
setapi
|
|
setapi
|
|
|
.getCompany(params, this.$axios)
|
|
.getCompany(params, this.$axios)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
- this.dataList = res.data.items;
|
|
|
|
|
- this.currentItemCount1 = res.data.currentItemCount;
|
|
|
|
|
|
|
+ this.dataList = res.data.items
|
|
|
|
|
+ this.currentItemCount1 = res.data.currentItemCount
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- console.error(err);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- //初始化列表方法
|
|
|
|
|
- initDatas(event) {
|
|
|
|
|
|
|
+ // 初始化列表方法
|
|
|
|
|
+ initDatas (event) {
|
|
|
if (event != null) {
|
|
if (event != null) {
|
|
|
- this.currentPage = 1;
|
|
|
|
|
|
|
+ this.currentPage = 1
|
|
|
}
|
|
}
|
|
|
let params = {
|
|
let params = {
|
|
|
_size: this.size,
|
|
_size: this.size,
|
|
|
_currentPage: this.currentPage
|
|
_currentPage: this.currentPage
|
|
|
- };
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
setapi
|
|
setapi
|
|
|
.getBadRecordBySearch(params, this.searchForm, this.$axios)
|
|
.getBadRecordBySearch(params, this.searchForm, this.$axios)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
- this.entityList = res.data.items;
|
|
|
|
|
- this.currentItemCount = res.data.currentItemCount;
|
|
|
|
|
|
|
+ this.entityList = res.data.items
|
|
|
|
|
+ this.currentItemCount = res.data.currentItemCount
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- console.error(err);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- addaudit() {
|
|
|
|
|
- this.addshow = true;
|
|
|
|
|
|
|
+ addaudit () {
|
|
|
|
|
+ this.addshow = true
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- //分页方法
|
|
|
|
|
- handleCurrentChange(value) {
|
|
|
|
|
- this.currentPage = value;
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ // 分页方法
|
|
|
|
|
+ handleCurrentChange (value) {
|
|
|
|
|
+ this.currentPage = value
|
|
|
|
|
+ this.initDatas()
|
|
|
},
|
|
},
|
|
|
- handleCurrentChange1(value) {
|
|
|
|
|
- this.currentPage1 = value;
|
|
|
|
|
- this.initCompany();
|
|
|
|
|
|
|
+ handleCurrentChange1 (value) {
|
|
|
|
|
+ this.currentPage1 = value
|
|
|
|
|
+ this.initCompany()
|
|
|
},
|
|
},
|
|
|
- handleSizeChange(value) {
|
|
|
|
|
- this.size = value;
|
|
|
|
|
- this.currentPage = 1;
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ handleSizeChange (value) {
|
|
|
|
|
+ this.size = value
|
|
|
|
|
+ this.currentPage = 1
|
|
|
|
|
+ this.initDatas()
|
|
|
},
|
|
},
|
|
|
- handleSizeChange1(value) {
|
|
|
|
|
- this.size1 = value;
|
|
|
|
|
- this.currentPage1 = 1;
|
|
|
|
|
- this.initCompany();
|
|
|
|
|
|
|
+ handleSizeChange1 (value) {
|
|
|
|
|
+ this.size1 = value
|
|
|
|
|
+ this.currentPage1 = 1
|
|
|
|
|
+ this.initCompany()
|
|
|
},
|
|
},
|
|
|
- searchCommand(command) {
|
|
|
|
|
- if (command == "clear") {
|
|
|
|
|
- this.clearSearch();
|
|
|
|
|
|
|
+ searchCommand (command) {
|
|
|
|
|
+ if (command === 'clear') {
|
|
|
|
|
+ this.clearSearch()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- clearSearch() {
|
|
|
|
|
- this.searchForm.Companyname = "";
|
|
|
|
|
- this.searchForm.Categorycode = "";
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ clearSearch () {
|
|
|
|
|
+ this.searchForm.Companyname = ''
|
|
|
|
|
+ this.searchForm.Categorycode = ''
|
|
|
|
|
+ this.initDatas()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-};
|
|
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|