|
|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
|
<el-breadcrumb class="heading">
|
|
|
<el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
|
|
|
- <el-breadcrumb-item :to="{ path: '/oilsupplier/supplierappend/basislist' }">基建类列表</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item :to="{ path: '/oilsupplier/addtionaudit/techlist' }">基建类列表</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>编辑</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
<el-card class="box-card">
|
|
|
@@ -11,7 +11,7 @@
|
|
|
<i class="icon icon-table2"></i> 编辑
|
|
|
</span>
|
|
|
<span style="float: right;">
|
|
|
- <router-link :to="'/oilsupplier/supplierappend/basislist'">
|
|
|
+ <router-link :to="'/oilsupplier/addtionaudit/techlist'">
|
|
|
<el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
|
|
|
</router-link>
|
|
|
</span>
|
|
|
@@ -26,18 +26,17 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="推荐单位名称" prop="checkSelectedRecUnitName">
|
|
|
- <el-cascader ref="tjdwCascader" :options="organizeTreeList" :props="organizeTreeProps" change-on-select :show-all-levels="false"
|
|
|
- v-model="selectedOrgList" @change="getCode2" placeholder="请选择推荐单位" style="width: 100%">
|
|
|
+ <el-cascader ref="tjdwCascader" :options="organizeTreeList" :props="organizeTreeProps"
|
|
|
+ change-on-select :show-all-levels="false" v-model="selectedOrgList" @change="getCode2"
|
|
|
+ placeholder="请选择推荐单位" style="width: 100%">
|
|
|
</el-cascader>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="供应方公司名称" prop="checkSelectedSupplier">
|
|
|
- <el-select v-model="supplierOptions" filterable @change="getInfo" placeholder="请选择供应方公司" style="width: 100%">
|
|
|
- <el-option
|
|
|
- v-for="item in supplierList"
|
|
|
- :key="item.SupplierId"
|
|
|
- :label="item.SupplierName"
|
|
|
+ <el-select v-model="supplierOptions" filterable @change="getInfo" placeholder="请选择供应方公司"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-option v-for="item in supplierList" :key="item.SupplierId" :label="item.SupplierName"
|
|
|
:value="item.SupplierId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -65,8 +64,10 @@
|
|
|
<el-table :data="entityList" border height="calc(100vh - 345px)" style="width: 100%" @sort-change="orderby">
|
|
|
<el-table-column label="操作" min-width="100" align="center" fixed>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" title="编辑" size="medium" icon="el-icon-edit" @click="editSortData(scope.row)"></el-button>
|
|
|
- <el-button type="text" title="删除" size="medium" icon="el-icon-delete" @click="deleteData(scope.row.Id)"></el-button>
|
|
|
+ <el-button type="text" title="编辑" size="medium" icon="el-icon-edit" @click="editSortData(scope.row)">
|
|
|
+ </el-button>
|
|
|
+ <el-button type="text" title="删除" size="medium" icon="el-icon-delete" @click="deleteData(scope.row.Id)">
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column>
|
|
|
@@ -74,20 +75,22 @@
|
|
|
<el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
- :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage" :page-sizes="[10, 15, 20, 25]" :page-size="size"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
|
|
|
</el-pagination>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
<!-- 增项分类添加、修改 -->
|
|
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="800px">
|
|
|
- <el-form label-width="150px" ref="dialogFormData" :rules="sortEntityFormRules" :model="dialogFormData" >
|
|
|
+ <el-form label-width="150px" ref="dialogFormData" :rules="sortEntityFormRules" :model="dialogFormData">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="分类名称" prop="checkSelectedOptList">
|
|
|
- <el-cascader ref="cascader" :options="optionsList" style="width:100%" :props="orgtreeprops" change-on-select :show-all-levels="false"
|
|
|
- v-model="selectedOptList" @change="getCode" placeholder="请选择分类">
|
|
|
+ <el-cascader ref="cascader" :options="optionsList" style="width:100%" :props="orgtreeprops"
|
|
|
+ change-on-select :show-all-levels="false" v-model="selectedOptList" @change="getCode"
|
|
|
+ placeholder="请选择分类">
|
|
|
</el-cascader>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -97,8 +100,9 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="备注" prop="Remark">
|
|
|
- <el-input type="textarea" v-model="dialogFormData.Remark" placeholder="请输入备注" style="width: 100%"></el-input>
|
|
|
+ <el-form-item label="备注" prop="Remark">
|
|
|
+ <el-input type="textarea" v-model="dialogFormData.Remark" placeholder="请输入备注" style="width: 100%">
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -179,24 +183,24 @@
|
|
|
Id: '',
|
|
|
SupplierId: 1,
|
|
|
SupplierCertId: 1,
|
|
|
- RecUnitFlag: '',//推荐单位的级联Id标记
|
|
|
+ RecUnitFlag: '', //推荐单位的级联Id标记
|
|
|
RecUnitId: '', //推荐单位编码
|
|
|
RecUnitName: '', //推荐单位名称
|
|
|
AppendType: '', //增项类别(1 物资类,2 基建类,3 技术服务类)
|
|
|
- Remark: '',//备注
|
|
|
+ Remark: '', //备注
|
|
|
},
|
|
|
- dialogVisible: false,//增项分类dialog
|
|
|
+ dialogVisible: false, //增项分类dialog
|
|
|
dialogTitle: '',
|
|
|
dialogFormData: {
|
|
|
Id: '',
|
|
|
- SupplierId: 1,//供方表ID
|
|
|
- SupplierCertId: 1,//供方证书表ID
|
|
|
- SupplierCertAppendId: '',//增项信息表ID
|
|
|
- SubClassId: 2,//分类表主键(物资类或基建类或技术服务类)
|
|
|
- SortFlag: '',//分类标记
|
|
|
- Code: '',//分类编码
|
|
|
- Name: '',//分类名称
|
|
|
- Remark: '',//备注
|
|
|
+ SupplierId: 1, //供方表ID
|
|
|
+ SupplierCertId: 1, //供方证书表ID
|
|
|
+ SupplierCertAppendId: '', //增项信息表ID
|
|
|
+ SubClassId: 2, //分类表主键(物资类或基建类或技术服务类)
|
|
|
+ SortFlag: '', //分类标记
|
|
|
+ Code: '', //分类编码
|
|
|
+ Name: '', //分类名称
|
|
|
+ Remark: '', //备注
|
|
|
},
|
|
|
//列表数据
|
|
|
entityList: [],
|
|
|
@@ -230,19 +234,20 @@
|
|
|
trigger: 'blur'
|
|
|
}],
|
|
|
},
|
|
|
- Id: '', //传的参数
|
|
|
+ AnnualId: '', //传的参数
|
|
|
+ serviceId: '',
|
|
|
editFlag: '', //编辑操作标记
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
// this.serviceType = this.$route.params.opera //获取服务类型
|
|
|
- this.Id = this.$route.query.Id
|
|
|
+ this.serviceId = this.$route.params.opera
|
|
|
+ console.log("---this.serviceId----", this.serviceId)
|
|
|
this.editFlag = this.$route.query.editFlag
|
|
|
- if(this.editFlag == '1' && this.Id !== '') {
|
|
|
- this.getEntityById()
|
|
|
- this.dialogFormData.SupplierCertAppendId = this.Id
|
|
|
- this.getSortList()
|
|
|
- }
|
|
|
+ this.AnnualId = this.serviceId
|
|
|
+ this.getEntityById()
|
|
|
+ this.dialogFormData.SupplierCertAppendId = this.AnnualId
|
|
|
+ this.getSortList()
|
|
|
this.getOrgTreeList() //获取推荐单位层级列表
|
|
|
this.getTechTreeList() //获取技术服务类层级列表
|
|
|
this.getSupplierList() //获取供应方公司列表
|
|
|
@@ -291,10 +296,10 @@
|
|
|
},
|
|
|
|
|
|
//获取SupplierId和SupplierCertId
|
|
|
- getInfo(vId) {//这个vId也就是value值
|
|
|
+ getInfo(vId) { //这个vId也就是value值
|
|
|
let obj = {}
|
|
|
- obj = this.supplierList.find((item)=>{
|
|
|
- return item.SupplierId === vId;//筛选出匹配数据
|
|
|
+ obj = this.supplierList.find((item) => {
|
|
|
+ return item.SupplierId === vId; //筛选出匹配数据
|
|
|
})
|
|
|
this.formData.SupplierId = parseInt(obj.SupplierId)
|
|
|
this.formData.SupplierCertId = parseInt(obj.SupplierCertId)
|
|
|
@@ -304,7 +309,7 @@
|
|
|
getCode(item) {
|
|
|
let sortFlagStr = item.toString()
|
|
|
this.dialogFormData.SortFlag = sortFlagStr
|
|
|
- this.getCodeById(item[item.length-1]) //根据分类Id获取Code
|
|
|
+ this.getCodeById(item[item.length - 1]) //根据分类Id获取Code
|
|
|
},
|
|
|
|
|
|
//根据分类Id获取Code
|
|
|
@@ -328,14 +333,15 @@
|
|
|
//获取需要修改的增项信息
|
|
|
getEntityById() {
|
|
|
let _this = this
|
|
|
- api2.getEntityById(_this.Id, _this.$axios).then(res => {
|
|
|
+ api2.getEntityById(_this.AnnualId, _this.$axios).then(res => {
|
|
|
_this.formData = res.data
|
|
|
+ console.log("--_this.formData---",_this.formData)
|
|
|
//显示原推荐单位
|
|
|
if (_this.formData.RecUnitFlag != null) {
|
|
|
let arr = _this.formData.RecUnitFlag.split(',')
|
|
|
let arr2 = []
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
- arr2.push(parseInt(arr[i]))
|
|
|
+ arr2.push(parseInt(arr[i]))
|
|
|
}
|
|
|
_this.selectedOrgList = arr2
|
|
|
}
|
|
|
@@ -352,8 +358,8 @@
|
|
|
this.$refs['EntityForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
let arr = _this.$refs['tjdwCascader'].currentLabels
|
|
|
- _this.formData.RecUnitName = arr[arr.length - 1] //获取推荐单位名
|
|
|
- if(_this.editFlag == '1' && _this.Id !== '') {
|
|
|
+ _this.formData.RecUnitName = arr[arr.length - 1] //获取推荐单位名
|
|
|
+ if (_this.editFlag == '1' && _this.AnnualId !== '') {
|
|
|
_this.updateData()
|
|
|
} else {
|
|
|
_this.addAppend()
|
|
|
@@ -367,7 +373,7 @@
|
|
|
//更新增项信息
|
|
|
updateData() {
|
|
|
let _this = this
|
|
|
- api2.updateEntity(_this.Id, _this.formData, _this.$axios).then(res => {
|
|
|
+ api2.updateEntity(_this.AnnualId, _this.formData, _this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
@@ -422,16 +428,16 @@
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
//添加增项分类
|
|
|
addSortData() {
|
|
|
let _this = this
|
|
|
//先判断是否保存了增项信息
|
|
|
- if(this.checkAppendSave()) {
|
|
|
+ if (this.checkAppendSave()) {
|
|
|
_this.dialogTitle = '添加'
|
|
|
_this.dialogVisible = true
|
|
|
_this.selectedOptList = [] //置空,防止先修改再添加时的已选分类信息保留
|
|
|
@@ -453,7 +459,7 @@
|
|
|
let arr = _this.dialogFormData.SortFlag.split(',')
|
|
|
let arr2 = []
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
- arr2.push(parseInt(arr[i]))
|
|
|
+ arr2.push(parseInt(arr[i]))
|
|
|
}
|
|
|
_this.selectedOptList = arr2
|
|
|
}
|
|
|
@@ -518,7 +524,7 @@
|
|
|
}
|
|
|
return true
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//添加增项分类信息
|
|
|
addSortAppend() {
|
|
|
let _this = this
|
|
|
@@ -549,30 +555,30 @@
|
|
|
deleteData(Id) {
|
|
|
let _this = this
|
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- api.deleteEntity(Id, _this.$axios)
|
|
|
- .then(res => {
|
|
|
- // response
|
|
|
- if (res.data.code === 0) {
|
|
|
- _this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- // 更新列表
|
|
|
- this.getSortList()
|
|
|
- } else {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ api.deleteEntity(Id, _this.$axios)
|
|
|
+ .then(res => {
|
|
|
+ // response
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ // 更新列表
|
|
|
+ this.getSortList()
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
},
|
|
|
|
|
|
//列表排序功能
|