diff --git a/src/api/lease/apply.js b/src/api/lease/apply.js
index 37bc10ee..c50c6c99 100644
--- a/src/api/lease/apply.js
+++ b/src/api/lease/apply.js
@@ -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) {
return request({
diff --git a/src/views/business/reliefRecord/index.vue b/src/views/business/reliefRecord/index.vue
index e96394b9..23dceb75 100644
--- a/src/views/business/reliefRecord/index.vue
+++ b/src/views/business/reliefRecord/index.vue
@@ -51,9 +51,9 @@
-
+
diff --git a/src/views/material/lease/protocol/index.vue b/src/views/material/lease/protocol/index.vue
index 82ac53d5..a1f62d4f 100644
--- a/src/views/material/lease/protocol/index.vue
+++ b/src/views/material/lease/protocol/index.vue
@@ -20,21 +20,21 @@
-
@@ -78,7 +78,7 @@
-
+
内部单位
@@ -116,11 +116,11 @@
-
+
@@ -147,11 +147,11 @@
-
+
@@ -217,60 +218,58 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
@@ -339,9 +338,9 @@
{{ form.unitName }}
-
- {{ form.projectUnitName }}
-
+
+ {{ form.projectUnitName }}
+
{{ form.authPerson }}
@@ -362,9 +361,9 @@
{{ form.protocol === '1' ? '内部单位' : '外部单位' }}
-
-
-
+
+
+
{{ form.remark }}
@@ -494,7 +493,7 @@ import { getToken } from '@/utils/auth'
import { Base64 } from 'js-base64'
import { forEach } from 'jszip'
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 '@riophae/vue-treeselect/dist/vue-treeselect.css'
@@ -531,6 +530,7 @@ export default {
unitList: [],
//租赁单位
uniteList: [],
+ departList: [],
selectTreeProps: {
children: 'children',
label: 'name',
@@ -566,7 +566,7 @@ export default {
status: undefined,
time: null, //申请时间
startTime: undefined,
- endTime: undefined,
+ endTime: undefined
},
fileList: [],
businessLicenseFileList: [],
@@ -593,13 +593,13 @@ export default {
trigger: 'blur'
}
],
- projectUnitId: [
- {
- required: true,
- message: '请选择所属项目部',
- trigger: 'blur'
- }
- ],
+ projectUnitId: [
+ {
+ required: true,
+ message: '请选择所属项目部',
+ trigger: 'blur'
+ }
+ ],
projectId: [
{
required: true,
@@ -636,7 +636,7 @@ export default {
message: '请选择租赁类型',
trigger: 'change'
}
- ],
+ ]
},
//上传
@@ -663,8 +663,8 @@ export default {
this.queryParams.startTime = this.format(date)
this.queryParams.endTime = this.format(date)
this.getList()
- this.getUnitList()
- this.getProjectList()
+ // this.getUnitList()
+ // this.getProjectList()
},
methods: {
format(date) {
@@ -865,7 +865,12 @@ export default {
this.maForm.unitId = ''
}
},
-
+ handleSelectPro(val) {
+ console.log('🚀 ~ val:', val)
+ this.form.projectUnitId = ''
+ this.departList = null
+ this.getListDepart(val.name)
+ },
projectChange(val) {
if (val && val.length > 0) {
this.maForm.projectId = this.projectId[this.projectId.length - 1]
@@ -873,10 +878,22 @@ export default {
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() {
this.reset()
+ this.getUnitList()
+ this.getProjectList()
this.uploadKey = Date.now()
this.delBusinessFileIdList = []
this.businessLicenseListTemp = []
@@ -909,7 +926,7 @@ export default {
this.maForm.projectId = response.data.projectId
this.unitId = this.treeParentsById(this.uniteList, this.maForm.unitId)
this.projectId = this.treeParentsById(this.projectList, this.maForm.projectId)
- console.log("vvvvvvvvvvvvvvvvv",this.form)
+ console.log('vvvvvvvvvvvvvvvvv', this.form)
var taskId = this.form.taskId
console.log(taskId)
if (taskId) {
@@ -1062,11 +1079,11 @@ export default {
// this.form.fileName =null;
const reqData = new FormData()
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.deleteFile()
} else {
- console.log("xxxxxxxxxxxxxx",this.form)
+ console.log('xxxxxxxxxxxxxx', this.form)
await this.editAgreementTemp(this.form)
await this.deleteFile()
}
@@ -1212,21 +1229,21 @@ export default {
},
handleExport() {
- const formatTime = (date) => {
- const year = date.getFullYear();
- const month = String(date.getMonth() + 1).padStart(2, '0');
- const day = String(date.getDate()).padStart(2, '0');
- const hours = String(date.getHours()).padStart(2, '0');
- const minutes = String(date.getMinutes()).padStart(2, '0');
- const seconds = String(date.getSeconds()).padStart(2, '0');
- return `${year}${month}${day}_${hours}${minutes}${seconds}`;
- };
+ const formatTime = date => {
+ const year = date.getFullYear()
+ const month = String(date.getMonth() + 1).padStart(2, '0')
+ const day = String(date.getDate()).padStart(2, '0')
+ const hours = String(date.getHours()).padStart(2, '0')
+ const minutes = String(date.getMinutes()).padStart(2, '0')
+ const seconds = String(date.getSeconds()).padStart(2, '0')
+ return `${year}${month}${day}_${hours}${minutes}${seconds}`
+ }
- const currentTime = formatTime(new Date());
+ const currentTime = formatTime(new Date())
this.download(
'/material/bm_agreement_info/export',
{
- ...this.queryParams,
+ ...this.queryParams
// startTime: this.queryParams.time ? this.queryParams.time[0] : '',
// endTime: this.queryParams.time ? this.queryParams.time[1] : ''
},
diff --git a/src/views/materialsStation/equipment/equipmentRecord/index.vue b/src/views/materialsStation/equipment/equipmentRecord/index.vue
index a1a8af7f..c369001f 100644
--- a/src/views/materialsStation/equipment/equipmentRecord/index.vue
+++ b/src/views/materialsStation/equipment/equipmentRecord/index.vue
@@ -243,6 +243,7 @@
导出数据
+ 导出明细数据
@@ -672,6 +673,15 @@ export default {
`工器具台账_${new Date().getTime()}.xlsx`
)
},
+ handleExportDetails() {
+ this.download(
+ 'material/material_maMachine/exportRetainedEquipmentDetails',
+ {
+ ...this.queryParams
+ },
+ `工器具台账详情_${new Date().getTime()}.xlsx`
+ )
+ },
//查看在库编码数据
openRecords(row) {
this.dialogList = []