协议管理修改
This commit is contained in:
parent
d8a4dbfdbb
commit
a4e8c717b8
|
|
@ -106,6 +106,17 @@
|
||||||
@change="deviceTypeChange"
|
@change="deviceTypeChange"
|
||||||
></el-cascader>
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
v-model="maForm.remark"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
clearable
|
||||||
|
maxlength="150"
|
||||||
|
type="textarea"
|
||||||
|
style="width: 240px"
|
||||||
|
rows="2"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
|
|
|
||||||
|
|
@ -95,28 +95,23 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" sortable/>
|
<el-table-column label="备注" align="center" prop="remark" sortable/>
|
||||||
<el-table-column label="操作" align="center" width="180">
|
<el-table-column label="操作" align="center" width="220">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
|
||||||
icon="el-icon-zoom-in"
|
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini" type="primary"
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="danger"
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
|
|
@ -138,23 +133,15 @@
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<!-- <el-form-item label="租赁单位" prop="unitId">-->
|
|
||||||
<!-- <el-select-->
|
|
||||||
<!-- v-model="form.unitId"-->
|
|
||||||
<!-- filterable-->
|
|
||||||
<!-- placeholder="请选择租赁单位"-->
|
|
||||||
<!-- style="width: 100%"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="item in unitList"-->
|
|
||||||
<!-- :key="item.unitId"-->
|
|
||||||
<!-- :label="item.unitName"-->
|
|
||||||
<!-- :value="item.unitId"-->
|
|
||||||
<!-- ></el-option>-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-form-item label="租赁单位" prop="unitId" >
|
<el-form-item label="租赁单位" prop="unitId" >
|
||||||
<el-cascader
|
<treeselect
|
||||||
|
v-model="form.unitId" :disabled="isEdits"
|
||||||
|
:options="uniteList" :normalizer="normalizer"
|
||||||
|
:show-count="true" style="width: 100%;" :disable-branch-nodes="true"
|
||||||
|
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||||
|
placeholder="请选择租赁单位"
|
||||||
|
/>
|
||||||
|
<!-- <el-cascader
|
||||||
v-model="unitId"
|
v-model="unitId"
|
||||||
:show-all-levels="false"
|
:show-all-levels="false"
|
||||||
:options="uniteList"
|
:options="uniteList"
|
||||||
|
|
@ -165,13 +152,10 @@
|
||||||
@change="uniteChange"
|
@change="uniteChange"
|
||||||
placeholder="请选择租赁单位"
|
placeholder="请选择租赁单位"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
:disabled="isEdit"
|
:disabled="isEdits"
|
||||||
></el-cascader>
|
></el-cascader> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="授权人" prop="authPerson">
|
<el-form-item label="授权人" prop="authPerson">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -187,7 +171,14 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="租赁工程" prop="projectId">
|
<el-form-item label="租赁工程" prop="projectId">
|
||||||
<el-cascader
|
<treeselect
|
||||||
|
v-model="form.projectId" :disabled="isEdits"
|
||||||
|
:options="projectList" :normalizer="normalizer"
|
||||||
|
:show-count="true" style="width: 100%;" :disable-branch-nodes="true"
|
||||||
|
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||||
|
placeholder="请选择租赁工程"
|
||||||
|
/>
|
||||||
|
<!-- <el-cascader
|
||||||
v-model="projectId"
|
v-model="projectId"
|
||||||
:show-all-levels="false"
|
:show-all-levels="false"
|
||||||
:options="projectList"
|
:options="projectList"
|
||||||
|
|
@ -198,24 +189,9 @@
|
||||||
@change="projectChange"
|
@change="projectChange"
|
||||||
placeholder="请选择租赁工程"
|
placeholder="请选择租赁工程"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
:disabled="isEdit"
|
:disabled="isEdits"
|
||||||
></el-cascader>
|
></el-cascader> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="租赁工程" prop="proId">
|
|
||||||
<el-select
|
|
||||||
v-model="form.proId"
|
|
||||||
filterable
|
|
||||||
placeholder="请选择租赁工程"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in projectList"
|
|
||||||
:key="item.proId"
|
|
||||||
:label="item.proName"
|
|
||||||
:value="item.proId"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>-->
|
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -498,8 +474,12 @@ import {forEach} from 'jszip';
|
||||||
import {listUser} from "@/api/system/user";
|
import {listUser} from "@/api/system/user";
|
||||||
import {getListProject, getListUnite} from "@/api/lease/apply";
|
import {getListProject, getListUnite} from "@/api/lease/apply";
|
||||||
|
|
||||||
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "supplier",
|
name: "supplier",
|
||||||
|
components: { Treeselect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
uploadKey: Date.now(),
|
uploadKey: Date.now(),
|
||||||
|
|
@ -583,7 +563,10 @@ export default {
|
||||||
dialogImageUrl: '',
|
dialogImageUrl: '',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
unitId:null,
|
||||||
|
projectId:null,
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
unitId: [
|
unitId: [
|
||||||
|
|
@ -690,7 +673,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
//上传组件-图片删除
|
||||||
handleRemoveElectricianImgList(file, fileList) {
|
handleRemoveElectricianImgList(file, fileList) {
|
||||||
let sum = 0
|
let sum = 0
|
||||||
this.businessLicenseListTemp.forEach((item, index) => {
|
this.businessLicenseListTemp.forEach((item, index) => {
|
||||||
|
|
@ -704,7 +687,6 @@ export default {
|
||||||
}
|
}
|
||||||
console.log('delBusinessFileIdList', this.delBusinessFileIdList)
|
console.log('delBusinessFileIdList', this.delBusinessFileIdList)
|
||||||
},
|
},
|
||||||
|
|
||||||
isImage(file) {
|
isImage(file) {
|
||||||
this.urlTemp = require('@/assets/file.png');
|
this.urlTemp = require('@/assets/file.png');
|
||||||
if (this.updataIf(file)) {
|
if (this.updataIf(file)) {
|
||||||
|
|
@ -733,7 +715,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleDownload(file) {
|
handleDownload(file) {
|
||||||
console.log(file)
|
console.log(file)
|
||||||
if (file.status === 'ready') {
|
if (file.status === 'ready') {
|
||||||
|
|
@ -744,7 +725,6 @@ export default {
|
||||||
// downloadFileData({ fileName: file.name,fileUrl:file.url })
|
// downloadFileData({ fileName: file.name,fileUrl:file.url })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleChangeBusinessList(file, fileList) {
|
handleChangeBusinessList(file, fileList) {
|
||||||
const fileListTemp = fileList.filter(item => {
|
const fileListTemp = fileList.filter(item => {
|
||||||
return item.uid != file.uid
|
return item.uid != file.uid
|
||||||
|
|
@ -786,7 +766,10 @@ export default {
|
||||||
this.businessLicenseListTemp = fileList;
|
this.businessLicenseListTemp = fileList;
|
||||||
},
|
},
|
||||||
|
|
||||||
async getList() {
|
|
||||||
|
|
||||||
|
//查询列表
|
||||||
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const params = {
|
const params = {
|
||||||
keyWord: this.queryParams.keyWord,
|
keyWord: this.queryParams.keyWord,
|
||||||
|
|
@ -802,28 +785,30 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 转换菜单数据结构 */
|
||||||
|
normalizer(node) {
|
||||||
|
if (node.children && !node.children.length) {
|
||||||
|
delete node.children;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: node.id,
|
||||||
|
label: node.name,
|
||||||
|
children: node.children,
|
||||||
|
};
|
||||||
|
},
|
||||||
//获取单位类型 ,getUnitList, getProjectList
|
//获取单位类型 ,getUnitList, getProjectList
|
||||||
async getUnitList() {
|
getUnitList() {
|
||||||
// getUnitList({}).then((response) => {
|
|
||||||
// this.unitList = response.data
|
|
||||||
// })
|
|
||||||
getListUnite({projectId: null}).then((response) => {
|
getListUnite({projectId: null}).then((response) => {
|
||||||
this.uniteList = response.data;
|
this.uniteList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getProjectList() {
|
||||||
async getProjectList() {
|
|
||||||
// getProjectList({}).then((response) => {
|
|
||||||
// this.projectList = response.data
|
|
||||||
// })
|
|
||||||
getListProject({unitId: null}).then((response) => {
|
getListProject({unitId: null}).then((response) => {
|
||||||
this.projectList = response.data;
|
this.projectList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
uniteChange(val) {
|
uniteChange(val) {
|
||||||
// this.projectList = [];
|
|
||||||
if (val && val.length > 0) {
|
if (val && val.length > 0) {
|
||||||
this.maForm.unitId = this.unitId[this.unitId.length - 1];
|
this.maForm.unitId = this.unitId[this.unitId.length - 1];
|
||||||
} else if (val && val.length == 0) {
|
} else if (val && val.length == 0) {
|
||||||
|
|
@ -869,10 +854,7 @@ export default {
|
||||||
this.maForm.unitId = response.data.unitId;
|
this.maForm.unitId = response.data.unitId;
|
||||||
this.maForm.projectId = response.data.projectId;
|
this.maForm.projectId = response.data.projectId;
|
||||||
this.unitId = this.treeParentsById(this.uniteList, this.maForm.unitId);
|
this.unitId = this.treeParentsById(this.uniteList, this.maForm.unitId);
|
||||||
this.projectId = this.treeParentsById(
|
this.projectId = this.treeParentsById(this.projectList,this.maForm.projectId);
|
||||||
this.projectList,
|
|
||||||
this.maForm.projectId
|
|
||||||
);
|
|
||||||
|
|
||||||
var taskId = this.form.taskId
|
var taskId = this.form.taskId
|
||||||
console.log(taskId)
|
console.log(taskId)
|
||||||
|
|
@ -1003,8 +985,8 @@ export default {
|
||||||
|
|
||||||
//** 提交按钮 */
|
//** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.form.unitId = this.maForm.unitId;
|
// this.form.unitId = this.maForm.unitId;
|
||||||
this.form.projectId = this.maForm.projectId;
|
// this.form.projectId = this.maForm.projectId;
|
||||||
|
|
||||||
this.$refs["form"].validate(async valid => {
|
this.$refs["form"].validate(async valid => {
|
||||||
console.log("this.maForm", this.maForm)
|
console.log("this.maForm", this.maForm)
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
maxlength="150"
|
maxlength="150"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
rows="1"
|
rows="2"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue