This commit is contained in:
parent
74370c30f9
commit
1d00227a36
|
|
@ -54,6 +54,15 @@ export function getListUnite(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 项目部-下拉
|
||||||
|
export function getListDepartApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/select/getDepartList',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 单位-下拉
|
// 单位-下拉
|
||||||
export function getMaterialUnitListApi(data) {
|
export function getMaterialUnitListApi(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,9 @@
|
||||||
</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">
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">
|
<!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">
|
||||||
减免申请
|
减免申请
|
||||||
</el-button>
|
</el-button> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">
|
||||||
|
|
|
||||||
|
|
@ -20,21 +20,21 @@
|
||||||
|
|
||||||
<el-form-item prop="startTime">
|
<el-form-item prop="startTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.startTime"
|
v-model="queryParams.startTime"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="开始日期"
|
placeholder="开始日期"
|
||||||
style="width: 130px"
|
style="width: 130px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>-</el-form-item>
|
<el-form-item>-</el-form-item>
|
||||||
<el-form-item prop="endTime">
|
<el-form-item prop="endTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.endTime"
|
v-model="queryParams.endTime"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="结束日期"
|
placeholder="结束日期"
|
||||||
style="width: 130px"
|
style="width: 130px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
<!-- <el-table-column label="租赁期限(天)" align="center" prop="leaseDay" width="100"/>-->
|
<!-- <el-table-column label="租赁期限(天)" align="center" prop="leaseDay" width="100"/>-->
|
||||||
<el-table-column label="授权人" align="center" prop="authPerson" width="100" />
|
<el-table-column label="授权人" align="center" prop="authPerson" width="100" />
|
||||||
<el-table-column label="授权人电话" align="center" prop="phone" width="120" />
|
<el-table-column label="授权人电话" align="center" prop="phone" width="120" />
|
||||||
<!-- <el-table-column label="分部工程" align="center" prop="branchProIdsStr" width="150"/>-->
|
<!-- <el-table-column label="分部工程" align="center" prop="branchProIdsStr" width="150"/>-->
|
||||||
<el-table-column label="租赁单位类型" align="center" width="100">
|
<el-table-column label="租赁单位类型" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.protocol == '1'">内部单位</span>
|
<span v-if="scope.row.protocol == '1'">内部单位</span>
|
||||||
|
|
@ -116,11 +116,11 @@
|
||||||
<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-form-item label="租赁工程" prop="projectId">
|
||||||
<treeselect
|
<treeselect
|
||||||
v-model="form.unitId"
|
v-model="form.projectId"
|
||||||
:disabled="isEdits"
|
:disabled="isEdits"
|
||||||
:options="uniteList"
|
:options="projectList"
|
||||||
:normalizer="normalizer"
|
:normalizer="normalizer"
|
||||||
:show-count="true"
|
:show-count="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
|
@ -128,8 +128,8 @@
|
||||||
noChildrenText="没有数据了"
|
noChildrenText="没有数据了"
|
||||||
noOptionsText="没有数据"
|
noOptionsText="没有数据"
|
||||||
noResultsText="没有搜索结果"
|
noResultsText="没有搜索结果"
|
||||||
placeholder="请选择租赁单位"
|
placeholder="请选择租赁工程"
|
||||||
@select="unitSelect"
|
@select="handleSelectPro"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -147,11 +147,11 @@
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="租赁工程" prop="projectId">
|
<el-form-item label="租赁单位" prop="unitId">
|
||||||
<treeselect
|
<treeselect
|
||||||
v-model="form.projectId"
|
v-model="form.unitId"
|
||||||
:disabled="isEdits"
|
:disabled="isEdits"
|
||||||
:options="projectList"
|
:options="uniteList"
|
||||||
:normalizer="normalizer"
|
:normalizer="normalizer"
|
||||||
:show-count="true"
|
:show-count="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
|
@ -159,7 +159,8 @@
|
||||||
noChildrenText="没有数据了"
|
noChildrenText="没有数据了"
|
||||||
noOptionsText="没有数据"
|
noOptionsText="没有数据"
|
||||||
noResultsText="没有搜索结果"
|
noResultsText="没有搜索结果"
|
||||||
placeholder="请选择租赁工程"
|
placeholder="请选择租赁单位"
|
||||||
|
@select="unitSelect"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -217,60 +218,58 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<!-- <el-col :span="12">-->
|
<!-- <el-col :span="12">-->
|
||||||
<!-- <el-form-item label="分部工程" prop="remark">-->
|
<!-- <el-form-item label="分部工程" prop="remark">-->
|
||||||
<!-- <el-select-->
|
<!-- <el-select-->
|
||||||
<!-- clearable-->
|
<!-- clearable-->
|
||||||
<!-- multiple-->
|
<!-- multiple-->
|
||||||
<!-- filterable-->
|
<!-- filterable-->
|
||||||
<!-- style="width: 100%"-->
|
<!-- style="width: 100%"-->
|
||||||
<!-- placeholder="请选择分部工程"-->
|
<!-- placeholder="请选择分部工程"-->
|
||||||
<!-- v-model="form.branchProIds"-->
|
<!-- v-model="form.branchProIds"-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<!-- <el-option-->
|
<!-- <el-option-->
|
||||||
<!-- :key="dict.value"-->
|
<!-- :key="dict.value"-->
|
||||||
<!-- :label="dict.label"-->
|
<!-- :label="dict.label"-->
|
||||||
<!-- :value="dict.value * 1"-->
|
<!-- :value="dict.value * 1"-->
|
||||||
<!-- v-for="dict in dict.type.branch_project"-->
|
<!-- v-for="dict in dict.type.branch_project"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </el-select>-->
|
<!-- </el-select>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="所属项目部" prop="projectUnitId">
|
|
||||||
<treeselect
|
|
||||||
v-model="form.projectUnitId"
|
|
||||||
:disabled="isEdits"
|
|
||||||
:options="uniteList"
|
|
||||||
:normalizer="normalizer"
|
|
||||||
:show-count="true"
|
|
||||||
style="width: 100%"
|
|
||||||
:disable-branch-nodes="true"
|
|
||||||
noChildrenText="没有数据了"
|
|
||||||
noOptionsText="没有数据"
|
|
||||||
noResultsText="没有搜索结果"
|
|
||||||
placeholder="请选择所属项目部"
|
|
||||||
@select="unitSelect"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="所属项目部" prop="projectUnitId">
|
||||||
|
<treeselect
|
||||||
|
v-model="form.projectUnitId"
|
||||||
|
:disabled="isEdits"
|
||||||
|
:options="departList"
|
||||||
|
:normalizer="normalizer"
|
||||||
|
:show-count="true"
|
||||||
|
style="width: 100%"
|
||||||
|
:disable-branch-nodes="true"
|
||||||
|
noChildrenText="没有数据了"
|
||||||
|
noOptionsText="没有数据"
|
||||||
|
noResultsText="没有搜索结果"
|
||||||
|
placeholder="请选择所属项目部"
|
||||||
|
@select="unitSelect"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
<el-col :span="12">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-input
|
||||||
<el-input
|
v-model="form.remark"
|
||||||
v-model="form.remark"
|
type="textarea"
|
||||||
type="textarea"
|
placeholder="请输入备注"
|
||||||
placeholder="请输入备注"
|
maxlength="100"
|
||||||
maxlength="100"
|
:disabled="isEdits"
|
||||||
:disabled="isEdits"
|
/>
|
||||||
/>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
@ -339,9 +338,9 @@
|
||||||
<el-descriptions-item label="租赁单位">
|
<el-descriptions-item label="租赁单位">
|
||||||
{{ form.unitName }}
|
{{ form.unitName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="所属项目部">
|
<el-descriptions-item label="所属项目部">
|
||||||
{{ form.projectUnitName }}
|
{{ form.projectUnitName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="授权人">
|
<el-descriptions-item label="授权人">
|
||||||
{{ form.authPerson }}
|
{{ form.authPerson }}
|
||||||
|
|
@ -362,9 +361,9 @@
|
||||||
<el-descriptions-item label="租赁单位类型">
|
<el-descriptions-item label="租赁单位类型">
|
||||||
{{ form.protocol === '1' ? '内部单位' : '外部单位' }}
|
{{ form.protocol === '1' ? '内部单位' : '外部单位' }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<!-- <el-descriptions-item label="分部工程">-->
|
<!-- <el-descriptions-item label="分部工程">-->
|
||||||
<!-- {{ form.branchProIdsStr }}-->
|
<!-- {{ form.branchProIdsStr }}-->
|
||||||
<!-- </el-descriptions-item>-->
|
<!-- </el-descriptions-item>-->
|
||||||
<el-descriptions-item label="备注">
|
<el-descriptions-item label="备注">
|
||||||
{{ form.remark }}
|
{{ form.remark }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
@ -494,7 +493,7 @@ import { getToken } from '@/utils/auth'
|
||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
import { forEach } from 'jszip'
|
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, getListDepartApi } from '@/api/lease/apply'
|
||||||
|
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
|
@ -531,6 +530,7 @@ export default {
|
||||||
unitList: [],
|
unitList: [],
|
||||||
//租赁单位
|
//租赁单位
|
||||||
uniteList: [],
|
uniteList: [],
|
||||||
|
departList: [],
|
||||||
selectTreeProps: {
|
selectTreeProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name',
|
label: 'name',
|
||||||
|
|
@ -566,7 +566,7 @@ export default {
|
||||||
status: undefined,
|
status: undefined,
|
||||||
time: null, //申请时间
|
time: null, //申请时间
|
||||||
startTime: undefined,
|
startTime: undefined,
|
||||||
endTime: undefined,
|
endTime: undefined
|
||||||
},
|
},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
businessLicenseFileList: [],
|
businessLicenseFileList: [],
|
||||||
|
|
@ -593,13 +593,13 @@ export default {
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
projectUnitId: [
|
projectUnitId: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择所属项目部',
|
message: '请选择所属项目部',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
projectId: [
|
projectId: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
|
@ -636,7 +636,7 @@ export default {
|
||||||
message: '请选择租赁类型',
|
message: '请选择租赁类型',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
//上传
|
//上传
|
||||||
|
|
@ -663,8 +663,8 @@ export default {
|
||||||
this.queryParams.startTime = this.format(date)
|
this.queryParams.startTime = this.format(date)
|
||||||
this.queryParams.endTime = this.format(date)
|
this.queryParams.endTime = this.format(date)
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getUnitList()
|
// this.getUnitList()
|
||||||
this.getProjectList()
|
// this.getProjectList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
format(date) {
|
format(date) {
|
||||||
|
|
@ -865,7 +865,12 @@ export default {
|
||||||
this.maForm.unitId = ''
|
this.maForm.unitId = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleSelectPro(val) {
|
||||||
|
console.log('🚀 ~ val:', val)
|
||||||
|
this.form.projectUnitId = ''
|
||||||
|
this.departList = null
|
||||||
|
this.getListDepart(val.name)
|
||||||
|
},
|
||||||
projectChange(val) {
|
projectChange(val) {
|
||||||
if (val && val.length > 0) {
|
if (val && val.length > 0) {
|
||||||
this.maForm.projectId = this.projectId[this.projectId.length - 1]
|
this.maForm.projectId = this.projectId[this.projectId.length - 1]
|
||||||
|
|
@ -873,10 +878,22 @@ export default {
|
||||||
this.maForm.projectId = ''
|
this.maForm.projectId = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async getListDepart(projectName) {
|
||||||
|
try {
|
||||||
|
const res = await getListDepartApi({ projectName })
|
||||||
|
console.log('🚀 ~ res:', res)
|
||||||
|
this.departList = res.data
|
||||||
|
console.log('🚀 ~ this.departList:', this.departList)
|
||||||
|
} catch (error) {
|
||||||
|
console.log('🚀 ~ error:', error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset()
|
this.reset()
|
||||||
|
this.getUnitList()
|
||||||
|
this.getProjectList()
|
||||||
this.uploadKey = Date.now()
|
this.uploadKey = Date.now()
|
||||||
this.delBusinessFileIdList = []
|
this.delBusinessFileIdList = []
|
||||||
this.businessLicenseListTemp = []
|
this.businessLicenseListTemp = []
|
||||||
|
|
@ -909,7 +926,7 @@ export default {
|
||||||
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.projectList, this.maForm.projectId)
|
this.projectId = this.treeParentsById(this.projectList, this.maForm.projectId)
|
||||||
console.log("vvvvvvvvvvvvvvvvv",this.form)
|
console.log('vvvvvvvvvvvvvvvvv', this.form)
|
||||||
var taskId = this.form.taskId
|
var taskId = this.form.taskId
|
||||||
console.log(taskId)
|
console.log(taskId)
|
||||||
if (taskId) {
|
if (taskId) {
|
||||||
|
|
@ -1062,11 +1079,11 @@ export default {
|
||||||
// this.form.fileName =null;
|
// this.form.fileName =null;
|
||||||
const reqData = new FormData()
|
const reqData = new FormData()
|
||||||
if (this.businessLicenseListTemp.length != 0) {
|
if (this.businessLicenseListTemp.length != 0) {
|
||||||
console.log("xxxxxxxxxxxxxx",this.form)
|
console.log('xxxxxxxxxxxxxx', this.form)
|
||||||
await this.getImaUploadEdit(), await this.editAgreementTemp(this.form)
|
await this.getImaUploadEdit(), await this.editAgreementTemp(this.form)
|
||||||
await this.deleteFile()
|
await this.deleteFile()
|
||||||
} else {
|
} else {
|
||||||
console.log("xxxxxxxxxxxxxx",this.form)
|
console.log('xxxxxxxxxxxxxx', this.form)
|
||||||
await this.editAgreementTemp(this.form)
|
await this.editAgreementTemp(this.form)
|
||||||
await this.deleteFile()
|
await this.deleteFile()
|
||||||
}
|
}
|
||||||
|
|
@ -1212,21 +1229,21 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const formatTime = (date) => {
|
const formatTime = date => {
|
||||||
const year = date.getFullYear();
|
const year = date.getFullYear()
|
||||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
const day = String(date.getDate()).padStart(2, '0');
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
const hours = String(date.getHours()).padStart(2, '0');
|
const hours = String(date.getHours()).padStart(2, '0')
|
||||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
const minutes = String(date.getMinutes()).padStart(2, '0')
|
||||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
const seconds = String(date.getSeconds()).padStart(2, '0')
|
||||||
return `${year}${month}${day}_${hours}${minutes}${seconds}`;
|
return `${year}${month}${day}_${hours}${minutes}${seconds}`
|
||||||
};
|
}
|
||||||
|
|
||||||
const currentTime = formatTime(new Date());
|
const currentTime = formatTime(new Date())
|
||||||
this.download(
|
this.download(
|
||||||
'/material/bm_agreement_info/export',
|
'/material/bm_agreement_info/export',
|
||||||
{
|
{
|
||||||
...this.queryParams,
|
...this.queryParams
|
||||||
// startTime: this.queryParams.time ? this.queryParams.time[0] : '',
|
// startTime: this.queryParams.time ? this.queryParams.time[0] : '',
|
||||||
// endTime: this.queryParams.time ? this.queryParams.time[1] : ''
|
// endTime: this.queryParams.time ? this.queryParams.time[1] : ''
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -243,6 +243,7 @@
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出数据</el-button>
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出数据</el-button>
|
||||||
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportDetails">导出明细数据</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -672,6 +673,15 @@ export default {
|
||||||
`工器具台账_${new Date().getTime()}.xlsx`
|
`工器具台账_${new Date().getTime()}.xlsx`
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
handleExportDetails() {
|
||||||
|
this.download(
|
||||||
|
'material/material_maMachine/exportRetainedEquipmentDetails',
|
||||||
|
{
|
||||||
|
...this.queryParams
|
||||||
|
},
|
||||||
|
`工器具台账详情_${new Date().getTime()}.xlsx`
|
||||||
|
)
|
||||||
|
},
|
||||||
//查看在库编码数据
|
//查看在库编码数据
|
||||||
openRecords(row) {
|
openRecords(row) {
|
||||||
this.dialogList = []
|
this.dialogList = []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue