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">
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -242,7 +243,7 @@
|
||||||
<treeselect
|
<treeselect
|
||||||
v-model="form.projectUnitId"
|
v-model="form.projectUnitId"
|
||||||
:disabled="isEdits"
|
:disabled="isEdits"
|
||||||
:options="uniteList"
|
:options="departList"
|
||||||
:normalizer="normalizer"
|
:normalizer="normalizer"
|
||||||
:show-count="true"
|
:show-count="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
|
@ -255,11 +256,9 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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
|
||||||
|
|
@ -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: [],
|
||||||
|
|
@ -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