材料站领料退料
This commit is contained in:
parent
cabf9f8c28
commit
67ec45b7ea
|
|
@ -200,7 +200,7 @@
|
||||||
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="规格型号" align="center" prop="typeModel" :show-overflow-tooltip="true" />
|
<el-table-column label="规格型号" align="center" prop="typeModel" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="计量单位" align="center" prop="unitName" />
|
<el-table-column label="计量单位" align="center" prop="unitName" />
|
||||||
<!-- <el-table-column label="当前在用量" align="center" prop="num"></el-table-column> -->
|
<el-table-column label="当前在用量" align="center" prop="num"></el-table-column>
|
||||||
<el-table-column label="管理模式" align="center" prop="manageType">
|
<el-table-column label="管理模式" align="center" prop="manageType">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- 0编码1数量 -->
|
<!-- 0编码1数量 -->
|
||||||
|
|
|
||||||
|
|
@ -645,7 +645,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async handleDepartChange() {
|
async handleDepartChange() {
|
||||||
this.queryParams.proName = null // 清空工程已选
|
this.queryParams.projectName = null // 清空工程已选
|
||||||
this.proOptions = [] // 清空原有下拉
|
this.proOptions = [] // 清空原有下拉
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="领料工程" prop="proName">
|
<el-form-item label="领料工程" prop="leaseProject">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.proName"
|
v-model="queryParams.leaseProject"
|
||||||
placeholder="请选择领料工程"
|
placeholder="请选择领料工程"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
|
|
@ -465,7 +465,7 @@ export default {
|
||||||
startTime: '', // 开始时间
|
startTime: '', // 开始时间
|
||||||
endTime: '', // 结束时间
|
endTime: '', // 结束时间
|
||||||
impUnitName: '', // 分公司
|
impUnitName: '', // 分公司
|
||||||
proName: '', // 领料工程
|
leaseProject: '', // 领料工程
|
||||||
maTypeNames: '', // 物资名称
|
maTypeNames: '', // 物资名称
|
||||||
leasePerson: '', // 领料人
|
leasePerson: '', // 领料人
|
||||||
code: '', // 领料单号
|
code: '', // 领料单号
|
||||||
|
|
@ -577,14 +577,14 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async handleDepartChange() {
|
async handleDepartChange() {
|
||||||
this.queryParams.proName = null // 清空工程已选
|
this.queryParams.leaseProject = null // 清空工程已选
|
||||||
this.proOptions = [] // 清空原有下拉
|
this.proOptions = [] // 清空原有下拉
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 同时传入分公司和项目部参数
|
// 同时传入分公司和项目部参数
|
||||||
const params = {
|
const params = {
|
||||||
impUnitName: this.queryParams.impUnitName, // 分公司名称
|
impUnitName: this.queryParams.impUnitName, // 分公司名称
|
||||||
proName: this.queryParams.proName,
|
proName: this.queryParams.leaseProject,
|
||||||
}
|
}
|
||||||
const res = await getProListByDepartApi(params)
|
const res = await getProListByDepartApi(params)
|
||||||
this.proOptions = res.data.map(item => ({
|
this.proOptions = res.data.map(item => ({
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,8 @@ export default {
|
||||||
dialogForm: {
|
dialogForm: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keyWord: '' // 关键字
|
keyWord: '', // 关键字
|
||||||
|
parentId: null, // 父级id
|
||||||
},
|
},
|
||||||
dialogColumns: [
|
dialogColumns: [
|
||||||
{ label: '类型名称', prop: 'typeCode' },
|
{ label: '类型名称', prop: 'typeCode' },
|
||||||
|
|
@ -407,7 +408,7 @@ export default {
|
||||||
this.dialogTitle = '查看'
|
this.dialogTitle = '查看'
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.dialogForm.code = row.code
|
this.dialogForm.parentId = row.id
|
||||||
this.getDetailsList()
|
this.getDetailsList()
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -336,6 +336,7 @@ export default {
|
||||||
teamId: null,
|
teamId: null,
|
||||||
proId: null,
|
proId: null,
|
||||||
agreementId: null, //协议id
|
agreementId: null, //协议id
|
||||||
|
agreementIds:[],
|
||||||
agreementCode: null, //协议code
|
agreementCode: null, //协议code
|
||||||
// companyId: '', //登录信息中取
|
// companyId: '', //登录信息中取
|
||||||
// createBy: '', //用户名
|
// createBy: '', //用户名
|
||||||
|
|
@ -467,9 +468,9 @@ export default {
|
||||||
// this.GetAgreementInfoById()
|
// this.GetAgreementInfoById()
|
||||||
},
|
},
|
||||||
// 获取 设备树结构数据
|
// 获取 设备树结构数据
|
||||||
async GetDeviceTypeTreeFn(agreementId) {
|
async GetDeviceTypeTreeFn(agreementIds) {
|
||||||
const params = {
|
const params = {
|
||||||
agreementId: agreementId
|
agreementIds: agreementIds
|
||||||
}
|
}
|
||||||
const res = await getDeviceTreeByAgreementId(params)
|
const res = await getDeviceTreeByAgreementId(params)
|
||||||
console.log('resgetUseTypeTreee==========', res)
|
console.log('resgetUseTypeTreee==========', res)
|
||||||
|
|
@ -600,7 +601,7 @@ export default {
|
||||||
}
|
}
|
||||||
const res = await getAgreementInfoByIdBackApi(params)
|
const res = await getAgreementInfoByIdBackApi(params)
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (!(res.data && res.data.agreementId)) {
|
if (!(res.data && res.data.length > 0)) {
|
||||||
// this.$message.error('当前单位和工程无协议!')
|
// this.$message.error('当前单位和工程无协议!')
|
||||||
this.queryParams.teamId = null
|
this.queryParams.teamId = null
|
||||||
this.queryParams.proId = null
|
this.queryParams.proId = null
|
||||||
|
|
@ -608,10 +609,10 @@ export default {
|
||||||
this.GetUnitData()
|
this.GetUnitData()
|
||||||
this.GetProData()
|
this.GetProData()
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.agreementId = res.data.agreementId
|
this.queryParams.agreementIds = res.data.map(item => item.agreementId)
|
||||||
this.queryParams.agreementCode = res.data.agreementCode
|
// this.queryParams.agreementCode = res.data.agreementCode
|
||||||
this.equipmentList = []
|
this.equipmentList = []
|
||||||
this.GetDeviceTypeTreeFn(res.data.agreementId)
|
this.GetDeviceTypeTreeFn(this.queryParams.agreementIds)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -631,7 +632,7 @@ export default {
|
||||||
item.tempMaCodeList = item.maCodeList || item.maCodeVoList || []
|
item.tempMaCodeList = item.maCodeList || item.maCodeVoList || []
|
||||||
item.maTypeName = item.materialName
|
item.maTypeName = item.materialName
|
||||||
})
|
})
|
||||||
this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementId)
|
this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementIds)
|
||||||
},
|
},
|
||||||
//是否可用勾选框
|
//是否可用勾选框
|
||||||
selectable(row) {
|
selectable(row) {
|
||||||
|
|
@ -672,7 +673,7 @@ export default {
|
||||||
backPerson: this.queryParams.backPerson,
|
backPerson: this.queryParams.backPerson,
|
||||||
phone: this.queryParams.phone,
|
phone: this.queryParams.phone,
|
||||||
remark: this.queryParams.remark,
|
remark: this.queryParams.remark,
|
||||||
agreementId: this.queryParams.agreementId,
|
agreementIds: this.queryParams.agreementIds,
|
||||||
isBack,
|
isBack,
|
||||||
taskId: this.queryParams.taskId,
|
taskId: this.queryParams.taskId,
|
||||||
createBy: sessionStorage.getItem('userName')
|
createBy: sessionStorage.getItem('userName')
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
||||||
<el-form-item label="租赁工程" prop="proId">
|
<el-form-item label="租赁工程" prop="proId">
|
||||||
<el-select
|
<el-select
|
||||||
v-if="!isEdit || !maForm.teamId"
|
|
||||||
v-model="maForm.proId"
|
v-model="maForm.proId"
|
||||||
placeholder="请选择租赁工程"
|
placeholder="请选择租赁工程"
|
||||||
filterable
|
filterable
|
||||||
|
|
@ -13,11 +12,9 @@
|
||||||
>
|
>
|
||||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.proName" :value="item.proId" />
|
<el-option v-for="(item, index) in projectList" :key="index" :label="item.proName" :value="item.proId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-else v-model="maForm.projectName" disabled maxlength="50" style="width: 240px" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="领用班组" prop="teamId">
|
<el-form-item label="领用班组" prop="teamId">
|
||||||
<el-select
|
<el-select
|
||||||
v-if="!isEdit"
|
|
||||||
v-model="maForm.teamId"
|
v-model="maForm.teamId"
|
||||||
placeholder="请选择班组"
|
placeholder="请选择班组"
|
||||||
filterable
|
filterable
|
||||||
|
|
@ -32,7 +29,6 @@
|
||||||
:data-key="item.id"
|
:data-key="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-else v-model="maForm.teamName" disabled maxlength="50" style="width: 240px" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="班组长" prop="leasePerson">
|
<el-form-item label="班组长" prop="leasePerson">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -239,6 +235,12 @@ export default {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isView: {
|
||||||
|
type: Boolean,
|
||||||
|
default: () => {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
editTaskId: {
|
editTaskId: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: () => {
|
default: () => {
|
||||||
|
|
@ -356,31 +358,32 @@ export default {
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.getStandardConfigListApi() //标准配置下拉选
|
this.getStandardConfigListApi() //标准配置下拉选
|
||||||
if (this.isEdit) {
|
if (this.isEdit && this.isView == false) {
|
||||||
console.log('isEdit', this.isEdit)
|
console.log('isEdit', this.isEdit)
|
||||||
this.taskId = this.editTaskId
|
this.taskId = this.editTaskId
|
||||||
this.id = this.editId
|
this.id = this.editId
|
||||||
this.getTaskInfo()
|
this.projectInfoList().then(() => {
|
||||||
} else {
|
this.getTaskInfo()
|
||||||
// this.getBmTeam()
|
})
|
||||||
|
} else if(this.isEdit && this.isView){
|
||||||
this.projectInfoList()
|
this.projectInfoList()
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.fitNum = this.maForm.fitNum
|
this.fitNum = this.maForm.fitNum
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
watch: {
|
// watch: {
|
||||||
maForm: {
|
// maForm: {
|
||||||
handler(newVal, oldVal) {
|
// handler(newVal, oldVal) {
|
||||||
if (newVal.teamId && newVal.proId) {
|
// if (newVal.teamId && newVal.proId) {
|
||||||
this.getAgreementId()
|
// this.getAgreementId()
|
||||||
} else {
|
// } else {
|
||||||
this.equipmentTypeList = []
|
// this.equipmentTypeList = []
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
deep: true
|
// deep: true
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
fitNumChange() {
|
fitNumChange() {
|
||||||
const newVal = Math.min(5, Math.max(1, parseInt(this.maForm.fitNum) || 1))
|
const newVal = Math.min(5, Math.max(1, parseInt(this.maForm.fitNum) || 1))
|
||||||
|
|
@ -395,7 +398,7 @@ export default {
|
||||||
this.maForm.fitNum = newVal
|
this.maForm.fitNum = newVal
|
||||||
},
|
},
|
||||||
// 获取协议id
|
// 获取协议id
|
||||||
getAgreementId() {
|
async getAgreementId() {
|
||||||
if (!this.maForm.teamId || !this.maForm.proId) return
|
if (!this.maForm.teamId || !this.maForm.proId) return
|
||||||
getAgreement({
|
getAgreement({
|
||||||
teamId: this.maForm.teamId,
|
teamId: this.maForm.teamId,
|
||||||
|
|
@ -463,11 +466,15 @@ export default {
|
||||||
console.log('🚀 ~ projectInfoList ~ error:', error)
|
console.log('🚀 ~ projectInfoList ~ error:', error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changePro(e) {
|
async changePro(e) {
|
||||||
console.log('🚀 ~ changePro ~ e:', e)
|
console.log('🚀 ~ changePro ~ e:', e)
|
||||||
this.maForm.proId = e
|
this.maForm.proId = e
|
||||||
this.maForm.projectId = this.projectList.find(item => item.proId === e)?.projectId
|
this.maForm.projectId = this.projectList.find(item => item.proId === e)?.projectId
|
||||||
this.getBmTeam()
|
await this.getBmTeam()
|
||||||
|
if(this.maForm.proId){
|
||||||
|
this.equipmentList = []
|
||||||
|
await this.getAgreementId()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
changeTeam(e) {
|
changeTeam(e) {
|
||||||
console.log('🚀 ~ changeTeam ~ e:', e)
|
console.log('🚀 ~ changeTeam ~ e:', e)
|
||||||
|
|
@ -597,15 +604,17 @@ export default {
|
||||||
// this.loading = true;
|
// this.loading = true;
|
||||||
await getApplyInfo(this.id).then(response => {
|
await getApplyInfo(this.id).then(response => {
|
||||||
Object.assign(this.maForm, response.data.leaseApplyInfo)
|
Object.assign(this.maForm, response.data.leaseApplyInfo)
|
||||||
this.maForm.projectId = response.data.leaseApplyInfo.proId
|
|
||||||
this.maForm.proId = response.data.leaseApplyInfo.proId
|
this.maForm.proId = response.data.leaseApplyInfo.proId
|
||||||
|
this.maForm.projectId = this.projectList.find(item => item.proId === response.data.leaseApplyInfo.proId)?.projectId
|
||||||
|
this.maForm.relPhone = response.data.leaseApplyInfo.phone || response.data.leaseApplyInfo.relPhone || ''
|
||||||
|
this.getBmTeam()
|
||||||
this.equipmentList = response.data.leaseApplyDetailsList || []
|
this.equipmentList = response.data.leaseApplyDetailsList || []
|
||||||
|
this.getAgreementId()
|
||||||
// 如果 bmFileInfos有值
|
// 如果 bmFileInfos有值
|
||||||
if (this.maForm.bmFileInfos.length > 0) {
|
if (this.maForm.bmFileInfos.length > 0) {
|
||||||
this.isFileFbs = true
|
this.isFileFbs = true
|
||||||
}
|
}
|
||||||
// this.loading = false;
|
// this.loading = false;
|
||||||
this.getAgreementId()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
|
|
@ -679,8 +688,8 @@ export default {
|
||||||
.confirm('是否确认保存当前页面')
|
.confirm('是否确认保存当前页面')
|
||||||
.then(function () {})
|
.then(function () {})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (this.isEdit) {
|
if (this.isEdit && this.isView == false) {
|
||||||
this.maForm.leaseProjectId = this.maForm.projectId
|
this.maForm.leaseProjectId = this.maForm.proId
|
||||||
console.log('编辑')
|
console.log('编辑')
|
||||||
this.loading = true
|
this.loading = true
|
||||||
updateApplyInfo({
|
updateApplyInfo({
|
||||||
|
|
@ -697,7 +706,7 @@ export default {
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
} else if (!this.isEdit) {
|
} else if (this.isEdit && this.isView ) {
|
||||||
console.log('新增')
|
console.log('新增')
|
||||||
// console.log(this.equipmentList)
|
// console.log(this.equipmentList)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
/* 新增工机具 */
|
/* 新增工机具 */
|
||||||
addTools() {
|
addTools() {
|
||||||
this.isEdit = false
|
this.isEdit = true
|
||||||
|
this.isView = true
|
||||||
this.editTaskId = ''
|
this.editTaskId = ''
|
||||||
this.queryTaskId = ''
|
this.queryTaskId = ''
|
||||||
this.pageContent = '领料申请'
|
this.pageContent = '领料申请'
|
||||||
|
|
@ -61,6 +62,7 @@ export default {
|
||||||
/* 编辑工机具 */
|
/* 编辑工机具 */
|
||||||
editTools(taskId, id) {
|
editTools(taskId, id) {
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
|
this.isView = false
|
||||||
this.pageContent = '领料编辑'
|
this.pageContent = '领料编辑'
|
||||||
this.editTaskId = taskId
|
this.editTaskId = taskId
|
||||||
this.editId = id
|
this.editId = id
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,7 @@
|
||||||
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
||||||
<el-form-item label="租赁工程" prop="proId">
|
<el-form-item label="租赁工程" prop="proId">
|
||||||
<el-select
|
<el-select
|
||||||
v-if="!isEdit"
|
|
||||||
v-model="maForm.proId"
|
v-model="maForm.proId"
|
||||||
:disabled="isEdit"
|
|
||||||
placeholder="请选择租赁工程"
|
placeholder="请选择租赁工程"
|
||||||
filterable
|
filterable
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
|
|
@ -14,11 +12,9 @@
|
||||||
>
|
>
|
||||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.proName" :value="item.proId" />
|
<el-option v-for="(item, index) in projectList" :key="index" :label="item.proName" :value="item.proId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-else v-model="maForm.projectName" disabled maxlength="50" style="width: 240px" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="领用班组" prop="teamId">
|
<el-form-item label="领用班组" prop="teamId">
|
||||||
<el-select
|
<el-select
|
||||||
v-if="!isEdit"
|
|
||||||
v-model="maForm.teamId"
|
v-model="maForm.teamId"
|
||||||
placeholder="请选择班组"
|
placeholder="请选择班组"
|
||||||
filterable
|
filterable
|
||||||
|
|
@ -34,7 +30,6 @@
|
||||||
@change="changeTeam"
|
@change="changeTeam"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-else v-model="maForm.teamName" disabled maxlength="50" style="width: 240px" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="班组长" prop="leasePerson">
|
<el-form-item label="班组长" prop="leasePerson">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -230,6 +225,12 @@ export default {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isView: {
|
||||||
|
type: Boolean,
|
||||||
|
default: () => {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
editTaskId: {
|
editTaskId: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: () => {
|
default: () => {
|
||||||
|
|
@ -380,34 +381,38 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getStandardConfigListApi() //标准配置下拉选
|
this.getStandardConfigListApi() //标准配置下拉选
|
||||||
if (this.isEdit) {
|
if (this.isEdit && this.isView == false) {
|
||||||
console.log('isEdit', this.isEdit)
|
console.log('isEdit', this.isEdit)
|
||||||
this.taskId = this.editTaskId
|
this.taskId = this.editTaskId
|
||||||
this.id = this.editId
|
this.id = this.editId
|
||||||
this.getTaskInfo()
|
this.projectInfoList().then(() => {
|
||||||
} else {
|
this.getTaskInfo()
|
||||||
|
})
|
||||||
|
} else if(this.isEdit && this.isView){
|
||||||
this.projectInfoList()
|
this.projectInfoList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
// watch: {
|
||||||
'maForm.teamId'(newVal) {
|
// 'maForm.teamId'(newVal) {
|
||||||
if (newVal && this.maForm.proId) {
|
// console.log("kkkkkkkkkkkkkkkkkkkk",newVal)
|
||||||
this.getAgreementId()
|
// if (newVal && this.maForm.proId) {
|
||||||
} else {
|
// this.getAgreementId()
|
||||||
this.equipmentTypeList = []
|
// } else {
|
||||||
}
|
// this.equipmentTypeList = []
|
||||||
},
|
// }
|
||||||
'maForm.proId'(newVal) {
|
// },
|
||||||
if (newVal && this.maForm.teamId) {
|
// 'maForm.proId'(newVal) {
|
||||||
this.getAgreementId()
|
// console.log("ppppppppppppppppppppppp",newVal)
|
||||||
} else {
|
// if (newVal && this.maForm.teamId) {
|
||||||
this.equipmentTypeList = []
|
// this.getAgreementId()
|
||||||
}
|
// } else {
|
||||||
}
|
// this.equipmentTypeList = []
|
||||||
},
|
// }
|
||||||
|
// }
|
||||||
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
// 获取协议id
|
// 获取协议id
|
||||||
getAgreementId() {
|
async getAgreementId() {
|
||||||
getAgreement({
|
getAgreement({
|
||||||
teamId: this.maForm.teamId,
|
teamId: this.maForm.teamId,
|
||||||
// projectId: this.maForm.projectId,
|
// projectId: this.maForm.projectId,
|
||||||
|
|
@ -437,6 +442,7 @@ export default {
|
||||||
// 获取班组
|
// 获取班组
|
||||||
async getBmTeam() {
|
async getBmTeam() {
|
||||||
try {
|
try {
|
||||||
|
console.log("xxxxxxxxxxxxxxxxxx", this.maForm.projectId)
|
||||||
const idCard = sessionStorage.getItem('idCard')
|
const idCard = sessionStorage.getItem('idCard')
|
||||||
const res = await getBmTeamApi({ isAll: 0, idCard, projectId: this.maForm.projectId })
|
const res = await getBmTeamApi({ isAll: 0, idCard, projectId: this.maForm.projectId })
|
||||||
// console.log('🚀 ~ getBmTeam ~ res:', res)
|
// console.log('🚀 ~ getBmTeam ~ res:', res)
|
||||||
|
|
@ -466,11 +472,16 @@ export default {
|
||||||
console.log('🚀 ~ getBmTeam ~ error:', error)
|
console.log('🚀 ~ getBmTeam ~ error:', error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changePro(e) {
|
async changePro(e) {
|
||||||
console.log('🚀 ~ changePro ~ e:', e)
|
console.log('🚀 ~ changePro ~ e:', e)
|
||||||
this.maForm.proId = e
|
this.maForm.proId = e
|
||||||
this.maForm.projectId = this.projectList.find(item => item.proId === e)?.projectId
|
this.maForm.projectId = this.projectList.find(item => item.proId === e)?.projectId
|
||||||
this.getBmTeam()
|
await this.getBmTeam()
|
||||||
|
if(this.maForm.proId){
|
||||||
|
console.log("xxxxxxxyyyyyyyyyyy", this.maForm.proId)
|
||||||
|
this.equipmentList = []
|
||||||
|
await this.getAgreementId()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
changeTeam(e) {
|
changeTeam(e) {
|
||||||
|
|
@ -622,10 +633,10 @@ export default {
|
||||||
this.$message.warning(response.msg)
|
this.$message.warning(response.msg)
|
||||||
}
|
}
|
||||||
Object.assign(this.maForm, response.data.leaseApplyInfo)
|
Object.assign(this.maForm, response.data.leaseApplyInfo)
|
||||||
this.maForm.projectId = response.data.leaseApplyInfo.proId
|
|
||||||
this.maForm.proId = response.data.leaseApplyInfo.proId
|
this.maForm.proId = response.data.leaseApplyInfo.proId
|
||||||
|
this.maForm.projectId = this.projectList.find(item => item.proId === response.data.leaseApplyInfo.proId)?.projectId
|
||||||
this.maForm.relPhone = response.data.leaseApplyInfo.phone || response.data.leaseApplyInfo.relPhone || ''
|
this.maForm.relPhone = response.data.leaseApplyInfo.phone || response.data.leaseApplyInfo.relPhone || ''
|
||||||
// this.getBmTeam()
|
this.getBmTeam()
|
||||||
this.equipmentList = response.data.leaseApplyDetailsList || []
|
this.equipmentList = response.data.leaseApplyDetailsList || []
|
||||||
if (this.equipmentList.length > 0) {
|
if (this.equipmentList.length > 0) {
|
||||||
this.equipmentList.forEach(item => {
|
this.equipmentList.forEach(item => {
|
||||||
|
|
@ -636,6 +647,7 @@ export default {
|
||||||
this.parentId = this.equipmentList[0].parentId
|
this.parentId = this.equipmentList[0].parentId
|
||||||
console.log('🚀 ~ awaitgetApplyInfo ~ this.parentId:', this.parentId)
|
console.log('🚀 ~ awaitgetApplyInfo ~ this.parentId:', this.parentId)
|
||||||
}
|
}
|
||||||
|
this.getAgreementId()
|
||||||
// 如果 bmFileInfos有值
|
// 如果 bmFileInfos有值
|
||||||
if (this.maForm.bmFileInfos.length > 0) {
|
if (this.maForm.bmFileInfos.length > 0) {
|
||||||
this.isFileFbs = true
|
this.isFileFbs = true
|
||||||
|
|
@ -732,8 +744,8 @@ export default {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.maForm.isOut = isOut
|
this.maForm.isOut = isOut
|
||||||
this.maForm.createBy = sessionStorage.getItem('userName')
|
this.maForm.createBy = sessionStorage.getItem('userName')
|
||||||
if (this.isEdit) {
|
if (this.isEdit && this.isView == false) {
|
||||||
this.maForm.leaseProjectId = this.maForm.projectId
|
this.maForm.leaseProjectId = this.maForm.proId
|
||||||
console.log('编辑')
|
console.log('编辑')
|
||||||
updateApplyInfo({
|
updateApplyInfo({
|
||||||
leaseApplyDetailsList: this.equipmentList,
|
leaseApplyDetailsList: this.equipmentList,
|
||||||
|
|
@ -749,7 +761,7 @@ export default {
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
} else if (!this.isEdit) {
|
} else if (this.isEdit && this.isView ) {
|
||||||
console.log('新增')
|
console.log('新增')
|
||||||
addApplyInfo({
|
addApplyInfo({
|
||||||
leaseApplyDetailsList: this.equipmentList,
|
leaseApplyDetailsList: this.equipmentList,
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-if="scope.row.taskStatus == 1"
|
v-if="scope.row.taskStatus == 1"
|
||||||
>
|
>
|
||||||
出库
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="warning" v-if="scope.row.taskStatus != 1" @click="handleLld(scope.row)">
|
<el-button size="mini" type="warning" v-if="scope.row.taskStatus != 1" @click="handleLld(scope.row)">
|
||||||
领料单
|
领料单
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
/* 新增工机具 */
|
/* 新增工机具 */
|
||||||
addTools() {
|
addTools() {
|
||||||
this.isEdit = false
|
this.isEdit = true
|
||||||
|
this.isView = true
|
||||||
this.editTaskId = ''
|
this.editTaskId = ''
|
||||||
this.queryTaskId = ''
|
this.queryTaskId = ''
|
||||||
this.pageContent = '领料申请'
|
this.pageContent = '领料申请'
|
||||||
|
|
@ -61,6 +62,7 @@ export default {
|
||||||
/* 编辑工机具 */
|
/* 编辑工机具 */
|
||||||
editTools(taskId, id) {
|
editTools(taskId, id) {
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
|
this.isView = false
|
||||||
this.pageContent = '领料出库'
|
this.pageContent = '领料出库'
|
||||||
this.editTaskId = taskId
|
this.editTaskId = taskId
|
||||||
this.editId = id
|
this.editId = id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue