|
|
@@ -12,10 +12,6 @@
|
|
|
<span>
|
|
|
<i class="icon icon-table2"></i> 不良行为记录
|
|
|
</span>
|
|
|
- <span style="float: right;margin-left:8px;">
|
|
|
- <el-button type="primary" size="mini" @click="addaudit" style="float: right; margin-left:10px;">添加</el-button>
|
|
|
- </span>
|
|
|
-
|
|
|
<el-form :model="searchForm" ref="searchformRef" :inline="true" style="float: right; margin-top: -5px">
|
|
|
<el-form-item label="企业名称">
|
|
|
<el-input size="mini" v-model="searchForm.Companyname" placeholder="请输入内容"></el-input>
|
|
|
@@ -39,16 +35,18 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" size="mini" @click="addaudit">添加</el-button>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
</div>
|
|
|
|
|
|
<!--内框表格显示-->
|
|
|
- <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%">
|
|
|
+ <el-table size="mini" :data="entityList" border height="calc(100vh - 243px)" style="width: 100%">
|
|
|
<!--内框表格剩余栏显示-->
|
|
|
- <el-table-column label="企业名称" prop="Companyname"></el-table-column>
|
|
|
- <el-table-column label="类别名称" prop="Categoryname"></el-table-column>
|
|
|
- <el-table-column label="不良行为" prop="Record"></el-table-column>
|
|
|
+ <el-table-column label="企业名称" prop="Companyname" align="center"></el-table-column>
|
|
|
+ <el-table-column label="类别名称" prop="Categoryname" align="center"></el-table-column>
|
|
|
+ <el-table-column label="不良行为" prop="Record" align="center"></el-table-column>
|
|
|
|
|
|
<!--内框表格操作栏显示-->
|
|
|
<el-table-column label="操作" min-width="35" align="center" fixed="right">
|
|
|
@@ -65,24 +63,30 @@
|
|
|
:total="currentItemCount"></el-pagination>
|
|
|
</el-card>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<!-- 添加框(默认隐藏) -->
|
|
|
<el-dialog title="企业不良行为添加" :visible.sync="addshow" width="360px">
|
|
|
<el-form :model="entityForm" :rules="rules" ref="EntityFormref">
|
|
|
<!-- 第一行 -->
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="企业名称" required prop="CompanyCode">
|
|
|
- <el-select placeholder="请选择" style="width: 100%" v-model="entityForm.CompanyCode" filterable>
|
|
|
- <el-option v-for="item in companys" :key="item.Id" :label="item.SupplierName" :value="item.Id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="企业名称" prop="CompanyName">
|
|
|
+ <el-input placeholder="请选择企业名称" v-model="entityForm.CompanyName" style="width:100%">
|
|
|
+ <el-button type="primary" style="width:30%" @click="companyDialog = true" slot="append">选择</el-button>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!-- 第二行 -->
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="准入类别" required prop="Categorycode">
|
|
|
+ <el-form-item label="准入类别" prop="Categorycode">
|
|
|
<el-select default-first-option placeholder="请选择" style="width: 100%" v-model="entityForm.Categorycode">
|
|
|
<el-option label="物资类" value="01"></el-option>
|
|
|
<el-option label="基建类" value="02"></el-option>
|
|
|
@@ -93,7 +97,7 @@
|
|
|
</el-row>
|
|
|
<!-- 第叁行 -->
|
|
|
<el-row>
|
|
|
- <el-form-item label="不良行为" required prop="Record">
|
|
|
+ <el-form-item label="不良行为" prop="Record">
|
|
|
<el-input type="textarea" v-model="entityForm.Record"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
@@ -104,6 +108,19 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<!-- 编辑框(默认隐藏) -->
|
|
|
<el-dialog title="企业不良行为编辑" :visible.sync="editshow" width="360px">
|
|
|
<el-form :model="editForm" :rules="rules" ref="EditFormref">
|
|
|
@@ -143,6 +160,36 @@
|
|
|
<el-button type="primary" size="small" @click="EditSubmit()">编 辑</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-dialog title="企业列表" :visible.sync="companyDialog" top="5vh">
|
|
|
+ <span style="float: right;">
|
|
|
+ <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="initCompany($event)">查询
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="companyDialog = false">
|
|
|
+ 取消</el-button>
|
|
|
+ </span>
|
|
|
+ <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
|
|
|
+ <el-form-item label="企业名称">
|
|
|
+ <el-input size="mini" style="width: 165px;" v-model="companyChooseName" placeholder="请输入企业名称"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-table size="mini" :data="dataList" border >
|
|
|
+ <el-table-column label="操作" width="100px" align="center" fixed>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" size="small" @click="getChooseCode(scope.row)">选择</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="Id" label="编码" width="120px" align="center" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="SupplierName" label="名称" align="center" show-overflow-tooltip></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" :current-page="currentPage1"
|
|
|
+ :page-sizes="[10, 15, 20, 25]" :page-size="size1" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="currentItemCount1">
|
|
|
+ </el-pagination>
|
|
|
+
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -160,18 +207,24 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ companyChooseName:'',
|
|
|
+ companyDialog:false,
|
|
|
+ dataList:[],
|
|
|
addshow: false,
|
|
|
editshow: false,
|
|
|
editId: "",
|
|
|
// 定义列表数据
|
|
|
entityList: [],
|
|
|
- companys: [],
|
|
|
// 分页参数
|
|
|
size: 10,
|
|
|
+ size1: 10,
|
|
|
currentPage: 1,
|
|
|
+ currentPage1: 1,
|
|
|
currentItemCount: 0,
|
|
|
+ currentItemCount1: 0,
|
|
|
entityForm: {
|
|
|
CompanyCode: "",
|
|
|
+ CompanyName:"",
|
|
|
Categorycode: "",
|
|
|
Record: ""
|
|
|
},
|
|
|
@@ -185,7 +238,7 @@
|
|
|
Categorycode: ""
|
|
|
},
|
|
|
rules: {
|
|
|
- CompanyCode: [{
|
|
|
+ CompanyName: [{
|
|
|
required: true,
|
|
|
message: "请输入企业名称",
|
|
|
trigger: "change"
|
|
|
@@ -205,6 +258,12 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ getChooseCode(val) {
|
|
|
+ console.log(val)
|
|
|
+ this.entityForm.CompanyCode=val.Id
|
|
|
+ this.entityForm.CompanyName=val.SupplierName
|
|
|
+ this.companyDialog = false
|
|
|
+ },
|
|
|
EditSubmit() {
|
|
|
this.$refs["EditFormref"].validate(valid => {
|
|
|
if (valid) {
|
|
|
@@ -303,12 +362,23 @@
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- initCompany() {
|
|
|
+ initCompany(event) {
|
|
|
+ if (event != null) {
|
|
|
+ this.currentPage1 = 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ let params = {
|
|
|
+ _size: this.size1,
|
|
|
+ _currentPage: this.currentPage1,
|
|
|
+ _companyName:this.companyChooseName
|
|
|
+ };
|
|
|
+
|
|
|
setapi
|
|
|
- .getCompany(this.$axios)
|
|
|
+ .getCompany(params,this.$axios)
|
|
|
.then(res => {
|
|
|
console.log(res.data.items);
|
|
|
- this.companys = res.data.items;
|
|
|
+ this.dataList = res.data.items;
|
|
|
+ this.currentItemCount1 = res.data.currentItemCount;
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.error(err);
|
|
|
@@ -316,7 +386,6 @@
|
|
|
},
|
|
|
//初始化列表方法
|
|
|
initDatas(event) {
|
|
|
- console.log(event);
|
|
|
if (event != null) {
|
|
|
this.currentPage = 1;
|
|
|
}
|
|
|
@@ -345,12 +414,20 @@
|
|
|
this.currentPage = value;
|
|
|
this.initDatas();
|
|
|
},
|
|
|
+ handleCurrentChange1(value) {
|
|
|
+ this.currentPage1 = value;
|
|
|
+ this.initCompany();
|
|
|
+ },
|
|
|
handleSizeChange(value) {
|
|
|
this.size = value;
|
|
|
this.currentPage = 1;
|
|
|
this.initDatas();
|
|
|
},
|
|
|
-
|
|
|
+ handleSizeChange1(value){
|
|
|
+ this.size1 = value;
|
|
|
+ this.currentPage1 = 1;
|
|
|
+ this.initCompany();
|
|
|
+ },
|
|
|
searchCommand(command) {
|
|
|
if (command == "clear") {
|
|
|
this.clearSearch();
|