|
|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
|
<el-breadcrumb class="heading">
|
|
|
<el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
|
|
|
- <el-breadcrumb-item :to="{ path: '/oilsupplier/addtionaudit/techlist' }">增项审批</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item :to="{ path: '/oilsupplier/supplierappend/techlist' }">技术服务类列表</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>编辑</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
<el-card class="box-card">
|
|
|
@@ -11,32 +11,36 @@
|
|
|
<i class="icon icon-table2"></i> 编辑
|
|
|
</span>
|
|
|
<span style="float: right;">
|
|
|
- <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" @click="AuditEntity"
|
|
|
+ v-if="auditBtn && this.formData.Status != '6'">{{auditTitle}}</el-button>
|
|
|
+ <router-link :to="'/oilsupplier/supplierappend/techlist'">
|
|
|
<el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
|
|
|
</router-link>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
+ <el-steps :active="formData.Step" simple align-center finish-status="success">
|
|
|
+ <el-step title="填信息"></el-step>
|
|
|
+ <el-step title="待审批"></el-step>
|
|
|
+ <el-step title="已审批"></el-step>
|
|
|
+ <el-step title="待交费"></el-step>
|
|
|
+ <el-step title="待入库"></el-step>
|
|
|
+ <el-step title="完成"></el-step>
|
|
|
+ </el-steps>
|
|
|
<el-card class="box-card">
|
|
|
<div slot="header">
|
|
|
<span><i class="icon icon-table2"></i> 增项信息</span>
|
|
|
- <el-button style="float: right; padding: 3px 0" type="text" @click="saveEntity()">保存信息</el-button>
|
|
|
</div>
|
|
|
- <el-form label-width="150px" ref="EntityForm" :rules="appendRules" :model="formData">
|
|
|
+ <el-form label-width="150px" ref="EntityForm" :rules="appendRules" :model="formData" :disabled="true">
|
|
|
<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>
|
|
|
+ <el-form-item label="推荐单位名称" prop="RecUnitName">
|
|
|
+ <el-input v-model="formData.RecUnitName" placeholder="请输入推荐单位名称"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="供应方公司名称" prop="checkSelectedSupplier">
|
|
|
- <el-select v-model="supplierOptions" filterable @change="getInfo" placeholder="请选择供应方公司"
|
|
|
+ <el-select v-model="supplierOptions" filterable placeholder="请选择供应方公司"
|
|
|
style="width: 100%">
|
|
|
<el-option v-for="item in supplierList" :key="item.SupplierId" :label="item.SupplierName"
|
|
|
:value="item.SupplierId">
|
|
|
@@ -59,19 +63,7 @@
|
|
|
</el-card>
|
|
|
<!-- 增项分类列表 -->
|
|
|
<el-card class="box-card" style="margin-top: 10px;">
|
|
|
- <div slot="header">
|
|
|
- <span><i class="icon icon-table2"></i> 增项分类</span>
|
|
|
- <el-button style="float: right; padding: 3px 0" type="text" @click="addSortData()">添加</el-button>
|
|
|
- </div>
|
|
|
<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>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
|
|
|
@@ -84,41 +76,17 @@
|
|
|
</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-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>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="分类编码" prop="Code">
|
|
|
- <el-input v-model="dialogFormData.Code" placeholder="请输入分类编码" disabled></el-input>
|
|
|
- </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>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button size="mini" @click="cancelOption()">取 消</el-button>
|
|
|
- <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="专业科室" v-if="this.formData.Status == '1'">
|
|
|
+ <el-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false" filterable
|
|
|
+ style="width: 100%" v-model="majorDept" placeholder="请选择组织">
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
<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
|
|
|
+ <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 100%" filterable allow-create
|
|
|
default-first-option>
|
|
|
<el-option v-for="item in auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
|
|
|
</el-option>
|
|
|
@@ -139,12 +107,52 @@
|
|
|
<el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="审核" :visible.sync="dialogMakeSure2">
|
|
|
+ <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
|
|
|
+ <el-form-item label="专业科室" v-if="this.formData.Status == '1'">
|
|
|
+ <el-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false" filterable
|
|
|
+ style="width: 100%" v-model="majorDept" placeholder="请选择组织">
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="复审部门" v-if="this.formData.Status == '1'">
|
|
|
+ <el-cascader :options="secorgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
|
|
|
+ filterable style="width: 100%" @change="auditOrgChange" placeholder="请选择组织">
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ <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: 100%" filterable allow-create
|
|
|
+ default-first-option>
|
|
|
+ <el-option v-for="item in secauditerOptions" :key="item.userid" :label="item.username" :value="item.userid">
|
|
|
+ </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-cascader :options="secorgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
|
|
|
+ filterable style="width: 100%" @change="auditOrgChange" placeholder="请选择组织">
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="审批人">
|
|
|
- <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 90%" filterable allow-create
|
|
|
+ <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 100%" filterable allow-create
|
|
|
default-first-option>
|
|
|
- <el-option v-for="item in auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
|
|
|
+ <el-option v-for="item in secauditerOptions" :key="item.userid" :label="item.username" :value="item.userid">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
@@ -198,19 +206,35 @@
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
- auditbusList: [], // 待审核业务
|
|
|
auditerOptions: [], // 审核人员
|
|
|
+ secauditerOptions: [],
|
|
|
+ auditerCurOptions: [],
|
|
|
+ orgtreelist: [], //二级单位
|
|
|
+ AuditdialogShow: false, //提交审核弹框
|
|
|
+ organizeOption: [], // 审批部门
|
|
|
+ auditerOption: [], // 审批人
|
|
|
+ majorDept: [],
|
|
|
+ auditbusList: [], // 待审核业务
|
|
|
dialogMakeSure: false,
|
|
|
dialogAllocation: false,
|
|
|
+ dialogMakeSure2: false,
|
|
|
aduitlabel: '审核人',
|
|
|
auditer: '',
|
|
|
+ auditTitle: '审批',
|
|
|
+ auditBtn: false,
|
|
|
+ auditstepcode: '',
|
|
|
dictData: null,
|
|
|
+ orgtreeprops: {
|
|
|
+ value: 'id',
|
|
|
+ label: 'Fullname',
|
|
|
+ children: 'children'
|
|
|
+ },
|
|
|
+ FirstAudit: '',
|
|
|
supplierList: [], //供应方公司列表
|
|
|
supplierOptions: '', //已选择的供应方公司列表
|
|
|
// serviceType: '', //服务类型()
|
|
|
- optionsList: [], //增项分类层级列表
|
|
|
selectedOptList: [], //已选择的增项分类列表
|
|
|
- orgtreeprops: {
|
|
|
+ tytreeprops: {
|
|
|
value: 'id',
|
|
|
label: 'Name',
|
|
|
children: 'children'
|
|
|
@@ -232,22 +256,24 @@
|
|
|
//增项信息表
|
|
|
formData: {
|
|
|
Id: '',
|
|
|
- SupplierId: 1,
|
|
|
- SupplierCertId: 1,
|
|
|
+ Step: 1,
|
|
|
+ Status: '',
|
|
|
+ SupplierId: 0,
|
|
|
+ SupplierCertId: 0,
|
|
|
RecUnitFlag: '', //推荐单位的级联Id标记
|
|
|
RecUnitId: '', //推荐单位编码
|
|
|
RecUnitName: '', //推荐单位名称
|
|
|
- AppendType: '', //增项类别(1 物资类,2 基建类,3 技术服务类)
|
|
|
+ AppendType: '', //增项类别(01 物资类,02 基建类,03 技术服务类)
|
|
|
Remark: '', //备注
|
|
|
},
|
|
|
dialogVisible: false, //增项分类dialog
|
|
|
dialogTitle: '',
|
|
|
dialogFormData: {
|
|
|
Id: '',
|
|
|
- SupplierId: 1, //供方表ID
|
|
|
- SupplierCertId: 1, //供方证书表ID
|
|
|
+ SupplierId: 0, //供方表ID
|
|
|
+ SupplierCertId: 0, //供方证书表ID
|
|
|
SupplierCertAppendId: '', //增项信息表ID
|
|
|
- SubClassId: 2, //分类表主键(物资类或基建类或技术服务类)
|
|
|
+ SubClassId: 3, //分类表主键(物资类或基建类或技术服务类)
|
|
|
SortFlag: '', //分类标记
|
|
|
Code: '', //分类编码
|
|
|
Name: '', //分类名称
|
|
|
@@ -288,118 +314,51 @@
|
|
|
shenheForm: {
|
|
|
SuccessStatus: 1,
|
|
|
AuditorRemark: '',
|
|
|
- AppendId: 0
|
|
|
+ AppendId: 0,
|
|
|
+ Auditer: '',
|
|
|
+ MajorDept: '',
|
|
|
},
|
|
|
AppendId: '', //传的参数
|
|
|
serviceId: '',
|
|
|
- Id: '', //传的参数
|
|
|
editFlag: '', //编辑操作标记
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
// this.serviceType = this.$route.params.opera //获取服务类型
|
|
|
- this.Id = this.$route.query.Id
|
|
|
- this.editFlag = this.$route.query.editFlag
|
|
|
+ this.serviceId = this.$route.params.opera
|
|
|
+ this.AppendId = this.serviceId
|
|
|
+ this.editFlag = '1'
|
|
|
this.getEntityById()
|
|
|
- this.dialogFormData.SupplierCertAppendId = this.Id
|
|
|
+ this.dialogFormData.SupplierCertAppendId = this.AppendId
|
|
|
this.getSortList()
|
|
|
- this.getOrgTreeList() //获取推荐单位层级列表
|
|
|
- this.getTechTreeList() //获取技术服务类层级列表
|
|
|
- this.getSupplierList() //获取供应方公司列表
|
|
|
+ this.getorgtreelist()
|
|
|
+ this.getorgtreelistbydeptid()
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
- //获取推荐单位列表
|
|
|
- getOrgTreeList() {
|
|
|
- let _this = this
|
|
|
- let params = {
|
|
|
- IsInnerOrganize: this.organizeform.IsInnerOrganize
|
|
|
- }
|
|
|
- _this.$axios.get('organizes/list', {
|
|
|
- params
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- _this.organizeTreeList = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- //获取供应方公司列表
|
|
|
- getSupplierList() {
|
|
|
- let _this = this
|
|
|
- _this.$axios.get('/suppliercertappend/getsupplier/' + '3', {})
|
|
|
- .then(res => {
|
|
|
- _this.supplierList = res.data
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- //获取技术服务类层级列表
|
|
|
- getTechTreeList() {
|
|
|
- let _this = this
|
|
|
- this.$axios.get('technologyservice/businesslist', {})
|
|
|
- .then(res => {
|
|
|
- _this.optionsList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Name')
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- //获取SupplierId和SupplierCertId
|
|
|
- getInfo(vId) { //这个vId也就是value值
|
|
|
- let obj = {}
|
|
|
- obj = this.supplierList.find((item) => {
|
|
|
- return item.SupplierId === vId; //筛选出匹配数据
|
|
|
- })
|
|
|
- this.formData.SupplierId = parseInt(obj.SupplierId)
|
|
|
- this.formData.SupplierCertId = parseInt(obj.SupplierCertId)
|
|
|
- },
|
|
|
-
|
|
|
- //获取分类级联Id
|
|
|
- getCode(item) {
|
|
|
- let sortFlagStr = item.toString()
|
|
|
- this.dialogFormData.SortFlag = sortFlagStr
|
|
|
- this.getCodeById(item[item.length - 1]) //根据分类Id获取Code
|
|
|
- },
|
|
|
-
|
|
|
- //根据分类Id获取Code
|
|
|
- getCodeById(Id) {
|
|
|
- let _this = this
|
|
|
- this.$axios.get('technologyservice/getcode/' + Id, {})
|
|
|
- .then(res => {
|
|
|
- _this.dialogFormData.Code = res.data.items[0].Code
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- //获取推荐单位级联Id
|
|
|
- getCode2(item) {
|
|
|
- let codeStr = item.toString()
|
|
|
- this.formData.RecUnitFlag = codeStr
|
|
|
- },
|
|
|
-
|
|
|
//获取需要修改的增项信息
|
|
|
getEntityById() {
|
|
|
let _this = this
|
|
|
- api2.getEntityById(_this.Id, _this.$axios).then(res => {
|
|
|
+ api2.getEntityById(_this.AppendId, _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]))
|
|
|
- }
|
|
|
- _this.selectedOrgList = arr2
|
|
|
+ if (_this.formData.Status === '1') {
|
|
|
+ this.aduitlabel = '复审人员'
|
|
|
+ this.auditTitle = '初审'
|
|
|
+ this.auditstepcode = 'FIRST_TRIAL'
|
|
|
+ } else if (_this.formData.Status === '2') {
|
|
|
+ this.auditTitle = '复审'
|
|
|
+ this.auditstepcode = 'SECOND_TRIAL'
|
|
|
+ } else if (_this.formData.Status === '3') {
|
|
|
+ this.auditTitle = '提交专业审批'
|
|
|
+ this.auditstepcode = 'PROF_RECE'
|
|
|
+ } else if (_this.formData.Status === '4') {
|
|
|
+ this.auditTitle = '专业审批'
|
|
|
+ this.auditstepcode = 'PROF_AUDIT'
|
|
|
+ } else if (_this.formData.Status === '5') {
|
|
|
+ this.auditTitle = '集中审批'
|
|
|
+ this.auditstepcode = 'PROF_REGULATION'
|
|
|
}
|
|
|
+ this.getDictOptions()
|
|
|
+ this.isAccess()
|
|
|
//显示公司名
|
|
|
_this.supplierOptions = _this.formData.SupplierId.toString()
|
|
|
}).catch(err => {
|
|
|
@@ -407,41 +366,11 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- //保存增项信息
|
|
|
- saveEntity() {
|
|
|
- let _this = this
|
|
|
- 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.updateData()
|
|
|
- } else {
|
|
|
- _this.addAppend()
|
|
|
- }
|
|
|
- } else {
|
|
|
- return false
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- //更新增项信息
|
|
|
- updateData() {
|
|
|
- let _this = this
|
|
|
- api2.updateEntity(_this.Id, _this.formData, _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
|
|
|
- });
|
|
|
- }
|
|
|
+ isAccess() {
|
|
|
+ apiCert.isAccess(this.auditstepcode, this.$axios).then(res => {
|
|
|
+ this.auditBtn = res.data
|
|
|
}).catch(err => {
|
|
|
- console.error(err)
|
|
|
+ console.log(err)
|
|
|
})
|
|
|
},
|
|
|
|
|
|
@@ -464,195 +393,78 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- //添加增项信息
|
|
|
- addAppend() {
|
|
|
+ AuditEntity() {
|
|
|
+ if (this.formData.Status === '3') {
|
|
|
+ this.dialogAllocation = true
|
|
|
+ } else if (this.formData.Status === '1') {
|
|
|
+ this.dialogMakeSure2 = true
|
|
|
+ } else {
|
|
|
+ this.dialogMakeSure = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getDictOptions() {
|
|
|
+ let params = {
|
|
|
+ status: this.formData.Status,
|
|
|
+ majorAduit: this.formData.ThirdAudit
|
|
|
+ }
|
|
|
+ suppapi.getDictListByStatus(params, this.$axios).then(res => {
|
|
|
+ this.dictData = res.data.items
|
|
|
+ this.auditerOptions = res.data.items['Auditer']
|
|
|
+ this.organizeOption = res.data.items['Organizes']
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getorgtreelist() {
|
|
|
let _this = this
|
|
|
- _this.formData.AppendType = '3'
|
|
|
- _this.$axios.post('/suppliercertappend/addappend/', _this.formData)
|
|
|
+ let params = {
|
|
|
+ IsInnerOrganize: 1
|
|
|
+ }
|
|
|
+ _this.$axios.get('organizes/orgalllist', {
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- _this.dialogFormData.SupplierCertAppendId = res.data.item //接收插入数据后返回的Id
|
|
|
- _this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message,
|
|
|
- })
|
|
|
- } else {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
+ _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- //添加增项分类
|
|
|
- addSortData() {
|
|
|
- let _this = this
|
|
|
- //先判断是否保存了增项信息
|
|
|
- if (this.checkAppendSave()) {
|
|
|
- _this.dialogTitle = '添加'
|
|
|
- _this.dialogVisible = true
|
|
|
- _this.selectedOptList = [] //置空,防止先修改再添加时的已选分类信息保留
|
|
|
- _this.dialogFormData.Id = ''
|
|
|
- _this.dialogFormData.SortFlag = ''
|
|
|
- _this.dialogFormData.Code = ''
|
|
|
- _this.dialogFormData.Remark = ''
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- //编辑增项分类
|
|
|
- editSortData(row) {
|
|
|
+ getorgtreelistbydeptid() {
|
|
|
let _this = this
|
|
|
- _this.dialogTitle = '编辑'
|
|
|
- _this.dialogVisible = true
|
|
|
- _this.dialogFormData = row
|
|
|
- //显示原增项结构
|
|
|
- if (_this.dialogFormData.SortFlag != null) {
|
|
|
- let arr = _this.dialogFormData.SortFlag.split(',')
|
|
|
- let arr2 = []
|
|
|
- for (let i = 0; i < arr.length; i++) {
|
|
|
- arr2.push(parseInt(arr[i]))
|
|
|
- }
|
|
|
- _this.selectedOptList = arr2
|
|
|
+ let params = {
|
|
|
+ IsInnerOrganize: 1
|
|
|
}
|
|
|
- },
|
|
|
-
|
|
|
- //取消
|
|
|
- cancelOption() {
|
|
|
- let _this = this
|
|
|
- _this.dialogVisible = false
|
|
|
- },
|
|
|
-
|
|
|
- //确定
|
|
|
- ensureOption() {
|
|
|
- this.$refs['dialogFormData'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- let _this = this
|
|
|
- if (_this.dialogTitle == '添加') {
|
|
|
- let arr = []
|
|
|
- arr = _this.$refs['cascader'].currentLabels //_this.$refs['cascader'].currentLabels获取当前级联选项的id对应的value
|
|
|
- _this.dialogFormData.Name = arr[arr.length - 1]
|
|
|
- _this.dialogFormData.SupplierCertAppendId = parseInt(_this.dialogFormData.SupplierCertAppendId)
|
|
|
- _this.addSortAppend()
|
|
|
- }
|
|
|
- if (_this.dialogTitle == '编辑') {
|
|
|
- let arr = []
|
|
|
- arr = _this.$refs['cascader'].currentLabels
|
|
|
- _this.dialogFormData.Name = arr[arr.length - 1]
|
|
|
- api.updateEntity(_this.dialogFormData.Id, _this.dialogFormData, _this.$axios).then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
- });
|
|
|
- //关闭dialog
|
|
|
- _this.dialogVisible = false
|
|
|
- //更新列表
|
|
|
- this.getSortList()
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- });
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- return false
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- //判断是否保存了增项信息
|
|
|
- checkAppendSave() {
|
|
|
- if (this.dialogFormData.SupplierCertAppendId == '' && this.editFlag == null) {
|
|
|
- this.$message({
|
|
|
- type: 'error',
|
|
|
- message: '无法执行该命令,请先保存增项信息!'
|
|
|
+ _this.$axios.get('organizes/listbydeptid', {
|
|
|
+ params
|
|
|
})
|
|
|
- return false
|
|
|
- }
|
|
|
- return true
|
|
|
- },
|
|
|
-
|
|
|
- //添加增项分类信息
|
|
|
- addSortAppend() {
|
|
|
- let _this = this
|
|
|
- _this.$axios.post('/suppliercertappendsub/addappendsub/', _this.dialogFormData)
|
|
|
.then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- _this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message,
|
|
|
- })
|
|
|
- //关闭dialog
|
|
|
- _this.dialogVisible = false
|
|
|
- //更新增项分类表
|
|
|
- _this.getSortList()
|
|
|
- } else {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
+ _this.secorgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- //删除增项分类信息
|
|
|
- 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(() => {})
|
|
|
- },
|
|
|
-
|
|
|
- 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')
|
|
|
+ auditOrgChange(val) {
|
|
|
+ console.log(this.formData.Status, 'status')
|
|
|
+ let auditstepcode = ''
|
|
|
+ if (this.formData.Status === '1') {
|
|
|
+ auditstepcode = 'SECOND_TRIAL'
|
|
|
+ } else if (this.formData.Status === '3') {
|
|
|
+ auditstepcode = 'PROF_AUDIT'
|
|
|
+ } else {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let deptid = val[val.length - 1]
|
|
|
+ console.log(deptid)
|
|
|
+ this.auditerOptions = []
|
|
|
+ this.auditer = ''
|
|
|
+ suppapi.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
|
|
|
+ this.secauditerOptions = res.data.item
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- allocationBtn() {
|
|
|
- this.dialogAllocation = true
|
|
|
- },
|
|
|
- AuditEntity() {
|
|
|
- this.dialogMakeSure = true
|
|
|
- },
|
|
|
// 审核通过
|
|
|
makeSure() {
|
|
|
console.log(this.auditer)
|
|
|
@@ -670,13 +482,16 @@
|
|
|
},
|
|
|
|
|
|
checkstatus() {
|
|
|
+ this.shenheForm.Auditer = this.auditer
|
|
|
+ this.shenheForm.MajorDept = this.majorDept[this.majorDept.length - 1]
|
|
|
let params = this.shenheForm
|
|
|
- console.log(this.shenheForm, '---this.shenheForm----')
|
|
|
- api2.auditEntityFir(this.AppendId, this.auditer, params, this.$axios).then(res => {
|
|
|
+ console.log("------shenheform", this.shenheForm)
|
|
|
+ api2.auditEntityFir(this.formData.Id, params, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
this.getEntityById()
|
|
|
this.dialogMakeSure = false
|
|
|
this.dialogAllocation = false
|
|
|
+ this.dialogMakeSure2 = false
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
@@ -687,12 +502,13 @@
|
|
|
message: res.data.message
|
|
|
})
|
|
|
}
|
|
|
- this.applyLoading = false
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+
|
|
|
+
|
|
|
//列表排序功能
|
|
|
orderby(column) {
|
|
|
if (column.order == 'ascending') {
|
|
|
@@ -701,17 +517,16 @@
|
|
|
this.Column.Order = 'desc'
|
|
|
}
|
|
|
this.Column.Prop = column.prop
|
|
|
- this.initData()
|
|
|
},
|
|
|
//分页功能
|
|
|
handleCurrentChange(value) {
|
|
|
this.currentPage = value
|
|
|
- this.initData()
|
|
|
+ this.getSortList()
|
|
|
},
|
|
|
handleSizeChange(value) {
|
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
|
- this.initData()
|
|
|
+ this.getSortList()
|
|
|
},
|
|
|
|
|
|
jstimehandle(val) {
|