|
@@ -40,7 +40,7 @@
|
|
|
<el-table-column label="操作" min-width="180" align="center" fixed>
|
|
<el-table-column label="操作" min-width="180" align="center" fixed>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<router-link
|
|
<router-link
|
|
|
- :to="'/oilsupplier/annualaudit/' + scope.row.SupplierId + '/operation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId">
|
|
|
|
|
|
|
+ :to="'/oilsupplier/annualaudit/' + scope.row.SupplierId + '/operation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId+'&Status='+scope.row.Status">
|
|
|
<el-button type="primary" plain title="查看详情" size="mini">打开</el-button>
|
|
<el-button type="primary" plain title="查看详情" size="mini">打开</el-button>
|
|
|
</router-link>
|
|
</router-link>
|
|
|
<el-dropdown @command="MoreCmdClick">
|
|
<el-dropdown @command="MoreCmdClick">
|
|
@@ -146,11 +146,11 @@
|
|
|
</span>
|
|
</span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<el-dialog title="年审申请添加" :visible.sync="addshow" width="360px">
|
|
<el-dialog title="年审申请添加" :visible.sync="addshow" width="360px">
|
|
|
- <el-form label-width="90px">
|
|
|
|
|
|
|
+ <el-form label-width="90px" :model="entityForm" :rules="rules" ref="EntityFormref">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="企业名称">
|
|
|
|
|
- <el-select filterable default-first-option ref="supselect" v-model="entityForm.SupplierId"
|
|
|
|
|
|
|
+ <el-form-item label="企业名称" prop="SupplierId" required>
|
|
|
|
|
+ <el-select filterable default-first-option ref="supselect" v-model="entityForm.SupplierId" required
|
|
|
placeholder="请选择" @change="supplierchange" style="width: 100%">
|
|
placeholder="请选择" @change="supplierchange" style="width: 100%">
|
|
|
<el-option v-for="item in selectsupplierlist" :key="item.Id" :label="item.Realname" :value="item.Id">
|
|
<el-option v-for="item in selectsupplierlist" :key="item.Id" :label="item.Realname" :value="item.Id">
|
|
|
</el-option>
|
|
</el-option>
|
|
@@ -160,7 +160,7 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="准入类别">
|
|
|
|
|
|
|
+ <el-form-item label="准入类别" prop="SupplierTypeName" required>
|
|
|
<el-select filterable default-first-option v-model="entityForm.SupplierTypeName" placeholder="请选择"
|
|
<el-select filterable default-first-option v-model="entityForm.SupplierTypeName" placeholder="请选择"
|
|
|
style="width: 100%">
|
|
style="width: 100%">
|
|
|
<el-option label="物资类" value="01"></el-option>
|
|
<el-option label="物资类" value="01"></el-option>
|
|
@@ -172,20 +172,23 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="初审单位">
|
|
|
|
|
- <el-select ref="selectauditOrg" v-model="entityForm.FirstAudit" placeholder="请选择" style="width: 100%"
|
|
|
|
|
|
|
+ <el-form-item label="初审单位" prop="FirstAudit" required>
|
|
|
|
|
+ <el-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
|
|
|
|
|
+ filterable @change="auditOrgChang" style="width: 100%" v-model="entityForm.FirstAudit"
|
|
|
|
|
+ placeholder="请选择组织"></el-cascader>
|
|
|
|
|
+ <!-- <el-select ref="selectauditOrg" v-model="entityForm.FirstAudit" placeholder="请选择" style="width: 100%"
|
|
|
@change="auditOrgChang" filterable allow-create default-first-option>
|
|
@change="auditOrgChang" filterable allow-create default-first-option>
|
|
|
- <el-option v-for="item in organizeOption" :key="item.Id" :label="item.Fullname" :value="item.Id">
|
|
|
|
|
|
|
+ <el-option v-for="item in organizeOption" :key="item.id" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
|
|
|
|
+ </el-select> -->
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="审批人">
|
|
|
|
|
- <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 100%" filterable
|
|
|
|
|
- allow-create default-first-option>
|
|
|
|
|
|
|
+ <el-form-item label="审批人" prop="auditer" required>
|
|
|
|
|
+ <el-select ref="selectAuditer" v-model="entityForm.auditer" placeholder="请选择" style="width: 100%"
|
|
|
|
|
+ filterable allow-create default-first-option>
|
|
|
<el-option v-for="item in auditerOption" :key="item.id" :label="item.realname" :value="item.id">
|
|
<el-option v-for="item in auditerOption" :key="item.id" :label="item.realname" :value="item.id">
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -194,7 +197,7 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<span style="float: right;margin-top:-10px;">
|
|
<span style="float: right;margin-top:-10px;">
|
|
|
- <el-button size="small" @click="addUserShow = false">取 消</el-button>
|
|
|
|
|
|
|
+ <el-button size="small" @click="addshow = false">取 消</el-button>
|
|
|
<el-button type="primary" size="small" @click="addAnnualAudit()">确 定</el-button>
|
|
<el-button type="primary" size="small" @click="addAnnualAudit()">确 定</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
<br>
|
|
<br>
|
|
@@ -225,6 +228,12 @@
|
|
|
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ orgtreelist: [],
|
|
|
|
|
+ orgtreeprops: {
|
|
|
|
|
+ value: 'id',
|
|
|
|
|
+ label: 'Fullname',
|
|
|
|
|
+ children: 'children'
|
|
|
|
|
+ },
|
|
|
historyVisible: false,
|
|
historyVisible: false,
|
|
|
addshow: false,
|
|
addshow: false,
|
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
@@ -260,6 +269,7 @@
|
|
|
SupplierId: '',
|
|
SupplierId: '',
|
|
|
SupplierTypeName: '',
|
|
SupplierTypeName: '',
|
|
|
FirstAudit: '',
|
|
FirstAudit: '',
|
|
|
|
|
+ auditer: '',
|
|
|
},
|
|
},
|
|
|
searchForm: {
|
|
searchForm: {
|
|
|
Id: '',
|
|
Id: '',
|
|
@@ -292,8 +302,29 @@
|
|
|
ModifiedOn: '',
|
|
ModifiedOn: '',
|
|
|
ModifiedUserId: '',
|
|
ModifiedUserId: '',
|
|
|
ModifiedBy: '',
|
|
ModifiedBy: '',
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ rules: {
|
|
|
|
|
+ SupplierId: [{
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择企业名称',
|
|
|
|
|
+ trigger: 'blur'
|
|
|
|
|
+ }, ],
|
|
|
|
|
+ SupplierTypeName: [{
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择准入类别',
|
|
|
|
|
+ trigger: 'blur'
|
|
|
|
|
+ }],
|
|
|
|
|
+ FirstAudit: [{
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择初审单位',
|
|
|
|
|
+ trigger: 'blur'
|
|
|
|
|
+ }],
|
|
|
|
|
+ auditer: [{
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择审批人',
|
|
|
|
|
+ trigger: 'blur'
|
|
|
|
|
+ }]
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -302,6 +333,7 @@
|
|
|
//查询列表
|
|
//查询列表
|
|
|
this.initDatas()
|
|
this.initDatas()
|
|
|
this.getselectsupplier()
|
|
this.getselectsupplier()
|
|
|
|
|
+ this.getorgtreelist()
|
|
|
this.getDictOptions()
|
|
this.getDictOptions()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -341,28 +373,32 @@
|
|
|
this.entityForm.SupplierName = obj.Realname
|
|
this.entityForm.SupplierName = obj.Realname
|
|
|
},
|
|
},
|
|
|
addAnnualAudit() {
|
|
addAnnualAudit() {
|
|
|
- console.log("----this.auditer--", this.auditer)
|
|
|
|
|
- api.addEntity(this.entityForm, this.auditer, this.$axios).then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- console.log("--------res.data----", res.data)
|
|
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
|
|
- this.entityForm.Id = res.data.item;
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
- this.addshow = false
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.$refs['EntityFormref'].validate((valid) => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ console.log("----this.entityForm.auditer--", this.entityForm.auditer)
|
|
|
|
|
+ api.addEntity(this.entityForm, this.entityForm.auditer, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ console.log("--------res.data----", res.data)
|
|
|
|
|
+ //保存成功后,初始化数据,变成修改
|
|
|
|
|
+ this.entityForm.Id = res.data.item;
|
|
|
|
|
+ this.initDatas();
|
|
|
|
|
+ this.addshow = false
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error(err)
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
addaudit() {
|
|
addaudit() {
|
|
|
this.addshow = true
|
|
this.addshow = true
|
|
@@ -384,9 +420,10 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
auditOrgChang(val) {
|
|
auditOrgChang(val) {
|
|
|
|
|
+ console.log("------val----", val)
|
|
|
this.auditerOption = []
|
|
this.auditerOption = []
|
|
|
- this.auditer = ''
|
|
|
|
|
- supplierapi.getAuditerByDept(val, this.$axios).then(res => {
|
|
|
|
|
|
|
+ this.entityForm.auditer = ''
|
|
|
|
|
+ supplierapi.getAuditerByDept(val[val.length - 1], this.$axios).then(res => {
|
|
|
if (res.data.item.length === 0) {
|
|
if (res.data.item.length === 0) {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
@@ -395,16 +432,34 @@
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
this.auditerOption = res.data.item
|
|
this.auditerOption = res.data.item
|
|
|
- console.log("---this.auditerOption--",this.auditerOption)
|
|
|
|
|
|
|
+ console.log("---this.auditerOption--", this.auditerOption)
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ getorgtreelist() {
|
|
|
|
|
+ let _this = this
|
|
|
|
|
+ // request
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ IsInnerOrganize: 1
|
|
|
|
|
+ }
|
|
|
|
|
+ _this.$axios.get('organizes/list', {
|
|
|
|
|
+ params
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ // handle error
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
getDictOptions() {
|
|
getDictOptions() {
|
|
|
supplierapi.getDictList(this.$axios).then(res => {
|
|
supplierapi.getDictList(this.$axios).then(res => {
|
|
|
this.dictData = res.data.items
|
|
this.dictData = res.data.items
|
|
|
- this.organizeOption = res.data.items['Organizes']
|
|
|
|
|
|
|
+ //this.organizeOption = res.data.items['Organizes']
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|