协议管理修改
This commit is contained in:
parent
d8a4dbfdbb
commit
a4e8c717b8
|
|
@ -106,6 +106,17 @@
|
|||
@change="deviceTypeChange"
|
||||
></el-cascader>
|
||||
</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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
|
|
|
|||
|
|
@ -95,28 +95,23 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<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">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-zoom-in"
|
||||
size="mini"
|
||||
@click="handleView(scope.row)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
size="mini" type="primary"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
|
|
@ -137,24 +132,16 @@
|
|||
<el-dialog :title="title" :visible.sync="showHouse" width="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<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-col :span="12">
|
||||
<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"
|
||||
:show-all-levels="false"
|
||||
:options="uniteList"
|
||||
|
|
@ -165,13 +152,10 @@
|
|||
@change="uniteChange"
|
||||
placeholder="请选择租赁单位"
|
||||
style="width: 100%;"
|
||||
:disabled="isEdit"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-col>
|
||||
|
||||
:disabled="isEdits"
|
||||
></el-cascader> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="授权人" prop="authPerson">
|
||||
<el-input
|
||||
|
|
@ -187,7 +171,14 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<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"
|
||||
:show-all-levels="false"
|
||||
:options="projectList"
|
||||
|
|
@ -198,24 +189,9 @@
|
|||
@change="projectChange"
|
||||
placeholder="请选择租赁工程"
|
||||
style="width: 100%;"
|
||||
:disabled="isEdit"
|
||||
></el-cascader>
|
||||
</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>-->
|
||||
:disabled="isEdits"
|
||||
></el-cascader> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
|
@ -498,8 +474,12 @@ import {forEach} from 'jszip';
|
|||
import {listUser} from "@/api/system/user";
|
||||
import {getListProject, getListUnite} from "@/api/lease/apply";
|
||||
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
|
||||
export default {
|
||||
name: "supplier",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
uploadKey: Date.now(),
|
||||
|
|
@ -583,7 +563,10 @@ export default {
|
|||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
unitId:null,
|
||||
projectId:null,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
unitId: [
|
||||
|
|
@ -690,7 +673,7 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
|
||||
//上传组件-图片删除
|
||||
handleRemoveElectricianImgList(file, fileList) {
|
||||
let sum = 0
|
||||
this.businessLicenseListTemp.forEach((item, index) => {
|
||||
|
|
@ -703,8 +686,7 @@ export default {
|
|||
this.delBusinessFileIdList.push(file.url);
|
||||
}
|
||||
console.log('delBusinessFileIdList', this.delBusinessFileIdList)
|
||||
},
|
||||
|
||||
},
|
||||
isImage(file) {
|
||||
this.urlTemp = require('@/assets/file.png');
|
||||
if (this.updataIf(file)) {
|
||||
|
|
@ -732,8 +714,7 @@ export default {
|
|||
return true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
handleDownload(file) {
|
||||
console.log(file)
|
||||
if (file.status === 'ready') {
|
||||
|
|
@ -743,8 +724,7 @@ export default {
|
|||
downloadFileData({fileName: file.name, fileUrl: file.url})
|
||||
// downloadFileData({ fileName: file.name,fileUrl:file.url })
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
handleChangeBusinessList(file, fileList) {
|
||||
const fileListTemp = fileList.filter(item => {
|
||||
return item.uid != file.uid
|
||||
|
|
@ -786,7 +766,10 @@ export default {
|
|||
this.businessLicenseListTemp = fileList;
|
||||
},
|
||||
|
||||
async getList() {
|
||||
|
||||
|
||||
//查询列表
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const params = {
|
||||
keyWord: this.queryParams.keyWord,
|
||||
|
|
@ -801,29 +784,31 @@ export default {
|
|||
this.total = response.total;
|
||||
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
|
||||
async getUnitList() {
|
||||
// getUnitList({}).then((response) => {
|
||||
// this.unitList = response.data
|
||||
// })
|
||||
getUnitList() {
|
||||
getListUnite({projectId: null}).then((response) => {
|
||||
this.uniteList = response.data;
|
||||
});
|
||||
},
|
||||
|
||||
async getProjectList() {
|
||||
// getProjectList({}).then((response) => {
|
||||
// this.projectList = response.data
|
||||
// })
|
||||
},
|
||||
getProjectList() {
|
||||
getListProject({unitId: null}).then((response) => {
|
||||
this.projectList = response.data;
|
||||
});
|
||||
},
|
||||
|
||||
uniteChange(val) {
|
||||
// this.projectList = [];
|
||||
uniteChange(val) {
|
||||
if (val && val.length > 0) {
|
||||
this.maForm.unitId = this.unitId[this.unitId.length - 1];
|
||||
} else if (val && val.length == 0) {
|
||||
|
|
@ -869,10 +854,7 @@ export default {
|
|||
this.maForm.unitId = response.data.unitId;
|
||||
this.maForm.projectId = response.data.projectId;
|
||||
this.unitId = this.treeParentsById(this.uniteList, this.maForm.unitId);
|
||||
this.projectId = this.treeParentsById(
|
||||
this.projectList,
|
||||
this.maForm.projectId
|
||||
);
|
||||
this.projectId = this.treeParentsById(this.projectList,this.maForm.projectId);
|
||||
|
||||
var taskId = this.form.taskId
|
||||
console.log(taskId)
|
||||
|
|
@ -1003,8 +985,8 @@ export default {
|
|||
|
||||
//** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.unitId = this.maForm.unitId;
|
||||
this.form.projectId = this.maForm.projectId;
|
||||
// this.form.unitId = this.maForm.unitId;
|
||||
// this.form.projectId = this.maForm.projectId;
|
||||
|
||||
this.$refs["form"].validate(async valid => {
|
||||
console.log("this.maForm", this.maForm)
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
maxlength="150"
|
||||
type="textarea"
|
||||
style="width: 240px"
|
||||
rows="1"
|
||||
rows="2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue