|
|
@@ -11,7 +11,8 @@
|
|
|
<i class="icon icon-table2"></i> 编辑
|
|
|
</span>
|
|
|
<span style="float: right;">
|
|
|
- <el-button type="primary" size="mini" @click="AuditEntity">提交审批</el-button>
|
|
|
+ <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">分配</el-button>
|
|
|
+ <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
|
|
|
<router-link :to="'/oilsupplier/addtionaudit/techlist'">
|
|
|
<el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
|
|
|
</router-link>
|
|
|
@@ -27,18 +28,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>
|
|
|
@@ -66,8 +66,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>
|
|
|
@@ -75,20 +77,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>
|
|
|
@@ -98,8 +102,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>
|
|
|
@@ -109,6 +114,46 @@
|
|
|
<el-button size="mini" type="primary" @click="ensureOption()">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="审核" :visible.sync="dialogMakeSure">
|
|
|
+ <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
|
|
|
+ <el-form-item :label="aduitlabel"
|
|
|
+ v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
|
|
|
+ <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 90%" filterable allow-create
|
|
|
+ default-first-option>
|
|
|
+ <el-option v-for="item in auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="审核状态">
|
|
|
+ <template>
|
|
|
+ <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
|
|
|
+ <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">未通过</el-radio>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="意见">
|
|
|
+ <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-top: -25px">
|
|
|
+ <el-button size="small" @click="dialogMakeSure = false">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="分配" :visible.sync="dialogAllocation">
|
|
|
+ <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
|
|
|
+ <el-form-item label="审批人">
|
|
|
+ <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 90%" filterable allow-create
|
|
|
+ default-first-option>
|
|
|
+ <el-option v-for="item in auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-top: -25px">
|
|
|
+ <el-button size="small" @click="dialogAllocation = false">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -117,6 +162,7 @@
|
|
|
import {
|
|
|
mapGetters
|
|
|
} from 'vuex'
|
|
|
+ import suppapi from '@/api/oilsupplier/supplier'
|
|
|
import api from '@/api/oilsupplier/supplierappendsub'
|
|
|
import api2 from '@/api/oilsupplier/supplierappend'
|
|
|
import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
@@ -152,6 +198,13 @@
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
+ auditbusList: [], // 待审核业务
|
|
|
+ auditerOptions: [], // 审核人员
|
|
|
+ dialogMakeSure: false,
|
|
|
+ dialogAllocation: false,
|
|
|
+ aduitlabel: '审核人',
|
|
|
+ auditer: '',
|
|
|
+ dictData: null,
|
|
|
supplierList: [], //供应方公司列表
|
|
|
supplierOptions: '', //已选择的供应方公司列表
|
|
|
// serviceType: '', //服务类型()
|
|
|
@@ -181,24 +234,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: [],
|
|
|
@@ -232,6 +285,13 @@
|
|
|
trigger: 'blur'
|
|
|
}],
|
|
|
},
|
|
|
+ shenheForm: {
|
|
|
+ SuccessStatus: 1,
|
|
|
+ AuditorRemark: '',
|
|
|
+ AppendId: 0
|
|
|
+ },
|
|
|
+ AppendId: '', //传的参数
|
|
|
+ serviceId: '',
|
|
|
Id: '', //传的参数
|
|
|
editFlag: '', //编辑操作标记
|
|
|
}
|
|
|
@@ -240,11 +300,9 @@
|
|
|
// this.serviceType = this.$route.params.opera //获取服务类型
|
|
|
this.Id = this.$route.query.Id
|
|
|
this.editFlag = this.$route.query.editFlag
|
|
|
- if(this.editFlag == '1' && this.Id !== '') {
|
|
|
- this.getEntityById()
|
|
|
- this.dialogFormData.SupplierCertAppendId = this.Id
|
|
|
- this.getSortList()
|
|
|
- }
|
|
|
+ this.getEntityById()
|
|
|
+ this.dialogFormData.SupplierCertAppendId = this.Id
|
|
|
+ this.getSortList()
|
|
|
this.getOrgTreeList() //获取推荐单位层级列表
|
|
|
this.getTechTreeList() //获取技术服务类层级列表
|
|
|
this.getSupplierList() //获取供应方公司列表
|
|
|
@@ -279,25 +337,6 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //提交审批
|
|
|
- AuditEntity() {
|
|
|
- apiCert.auditEntityappend(this.Id, this.$axios).then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- });
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- console.error(err)
|
|
|
- });
|
|
|
- },
|
|
|
|
|
|
//获取技术服务类层级列表
|
|
|
getTechTreeList() {
|
|
|
@@ -312,10 +351,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)
|
|
|
@@ -325,7 +364,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
|
|
|
@@ -351,12 +390,13 @@
|
|
|
let _this = this
|
|
|
api2.getEntityById(_this.Id, _this.$axios).then(res => {
|
|
|
_this.formData = res.data
|
|
|
+ this.getDictOptions()
|
|
|
//显示原推荐单位
|
|
|
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
|
|
|
}
|
|
|
@@ -373,8 +413,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.Id !== '') {
|
|
|
_this.updateData()
|
|
|
} else {
|
|
|
_this.addAppend()
|
|
|
@@ -443,16 +483,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 = [] //置空,防止先修改再添加时的已选分类信息保留
|
|
|
@@ -474,7 +514,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
|
|
|
}
|
|
|
@@ -539,7 +579,7 @@
|
|
|
}
|
|
|
return true
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//添加增项分类信息
|
|
|
addSortAppend() {
|
|
|
let _this = this
|
|
|
@@ -570,30 +610,87 @@
|
|
|
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
|
|
|
- })
|
|
|
- }
|
|
|
+ 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(() => {})
|
|
|
+ },
|
|
|
+
|
|
|
+ getDictOptions() {
|
|
|
+ console.log("---this.formData----", this.formData)
|
|
|
+ suppapi.getDictListByStatus(this.formData.Status, this.$axios).then(res => {
|
|
|
+ this.dictData = res.data.items
|
|
|
+ this.auditerOptions = res.data.items['Auditer']
|
|
|
+ console.log(this.auditerOptions, 'this.auditerOptions')
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ allocationBtn() {
|
|
|
+ this.dialogAllocation = true
|
|
|
+ },
|
|
|
+ AuditEntity() {
|
|
|
+ this.dialogMakeSure = true
|
|
|
+ },
|
|
|
+ // 审核通过
|
|
|
+ makeSure() {
|
|
|
+ console.log(this.auditer)
|
|
|
+ if (this.shenheForm.SuccessStatus === 1) {
|
|
|
+ if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' &&
|
|
|
+ this.formData.Status !== '5') {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择审核人!'
|
|
|
})
|
|
|
- .catch(() => {})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.checkstatus()
|
|
|
+ },
|
|
|
+
|
|
|
+ checkstatus() {
|
|
|
+ let params = this.shenheForm
|
|
|
+ console.log(this.shenheForm, '---this.shenheForm----')
|
|
|
+ api2.auditEntityFir(this.AppendId, this.auditer, params, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.getEntityById()
|
|
|
+ this.dialogMakeSure = false
|
|
|
+ this.dialogAllocation = false
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.applyLoading = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
})
|
|
|
- .catch(() => {})
|
|
|
},
|
|
|
|
|
|
//列表排序功能
|