领料成套流程完善
This commit is contained in:
parent
4327215dc1
commit
2ab271b14a
|
|
@ -63,9 +63,16 @@
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请选择成套设备"
|
placeholder="请选择成套设备"
|
||||||
@change="onChangeWholeTypeName"
|
@change="onChangeWholeTypeName"
|
||||||
|
@remove-tag="onRemoveTag"
|
||||||
v-model="queryParams.wholeTypeName"
|
v-model="queryParams.wholeTypeName"
|
||||||
|
multiple
|
||||||
>
|
>
|
||||||
<el-option v-for="item in holdingPoleSelList" :key="item.id" :label="item.wholeTypeName" :value="item.id" />
|
<el-option
|
||||||
|
v-for="item in holdingPoleSelList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.wholeTypeName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型名称" prop="status">
|
<el-form-item label="类型名称" prop="status">
|
||||||
|
|
@ -93,7 +100,12 @@
|
||||||
placeholder="请选择规格型号"
|
placeholder="请选择规格型号"
|
||||||
@change="changeType"
|
@change="changeType"
|
||||||
>
|
>
|
||||||
<el-option v-for="item in typeListDev" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option
|
||||||
|
v-for="item in typeListDev"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预计领料时间" prop="estimateLeaseTime">
|
<el-form-item label="预计领料时间" prop="estimateLeaseTime">
|
||||||
|
|
@ -181,11 +193,17 @@
|
||||||
<el-table-column align="center" label="设备所属" prop="deviceAscription" />
|
<el-table-column align="center" label="设备所属" prop="deviceAscription" />
|
||||||
<el-table-column label="预领数量" prop="deviceNum" align="center" />
|
<el-table-column label="预领数量" prop="deviceNum" align="center" />
|
||||||
<el-table-column align="center" label="库存数量" prop="num" />
|
<el-table-column align="center" label="库存数量" prop="num" />
|
||||||
|
<el-table-column align="center" label="是否管理库存">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<el-tag size="mini" type="primary" v-if="row.isStorage == 1">是</el-tag>
|
||||||
|
<el-tag size="mini" type="warning" v-if="row.isStorage == 0">否</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="wholeTypeName" align="center" label="抱杆设备名称" />
|
<el-table-column prop="wholeTypeName" align="center" label="成套设备名称" />
|
||||||
<el-table-column align="center" label="抱杆设备数量" width="260">
|
<el-table-column align="center" label="成套设备数量" width="260">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:min="1"
|
:min="1"
|
||||||
|
|
@ -202,18 +220,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-table
|
<el-table v-loading="loading" :data="leaseApplyDetails" @selection-change="handleSelectionChange">
|
||||||
v-loading="loading"
|
|
||||||
:data="leaseApplyDetails"
|
|
||||||
v-show="wholeTypeNameList.length === 0"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||||
<el-table-column label="序号" type="index" width="80" />
|
<el-table-column label="序号" type="index" width="80" />
|
||||||
<el-table-column label="机具名称" prop="typeCn" :show-overflow-tooltip="true" />
|
<el-table-column label="机具名称" prop="typeCn" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="规格型号" prop="guigeCn" :show-overflow-tooltip="true" />
|
<el-table-column label="规格型号" prop="guigeCn" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="计量单位" prop="unitCn" />
|
<el-table-column label="计量单位" prop="unitCn" align="center" />
|
||||||
<el-table-column label="库存数量" prop="num" />
|
<el-table-column label="库存数量" prop="num" align="center" />
|
||||||
<el-table-column label="预领数量" align="center">
|
<el-table-column label="预领数量" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -228,10 +241,22 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="createTime">
|
<el-table-column label="备注" align="center" prop="createTime">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input maxlength="100" v-model="scope.row.remark" placeholder="请输入备注" clearable style="width: 100%" />
|
<el-input
|
||||||
|
maxlength="100"
|
||||||
|
v-model="scope.row.remark"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" v-if="isView">
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
fixed="right"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
v-if="isView"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- size="mini"-->
|
<!-- size="mini"-->
|
||||||
|
|
@ -682,6 +707,7 @@ export default {
|
||||||
this.queryParams.agreementCode = data.agreementCode
|
this.queryParams.agreementCode = data.agreementCode
|
||||||
this.queryParams.agreementId = data.agreementId
|
this.queryParams.agreementId = data.agreementId
|
||||||
this.queryParams.estimateLeaseTime = data.estimateLeaseTime
|
this.queryParams.estimateLeaseTime = data.estimateLeaseTime
|
||||||
|
this.queryParams.wholeTypeName = data.wholeTypeName
|
||||||
|
|
||||||
// this.queryParams.leaseType = data.leaseType
|
// this.queryParams.leaseType = data.leaseType
|
||||||
this.$set(this.queryParams, 'leaseType', data.leaseType)
|
this.$set(this.queryParams, 'leaseType', data.leaseType)
|
||||||
|
|
@ -690,6 +716,10 @@ export default {
|
||||||
this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
|
this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
|
||||||
return this.handelEchoData(item)
|
return this.handelEchoData(item)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (data.ctLeaseApplyDetails) {
|
||||||
|
this.getCtFileList(data.ctLeaseApplyDetails)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 驳回提交 任务详情数据
|
// 驳回提交 任务详情数据
|
||||||
async GetTaskDetail2(taskId) {
|
async GetTaskDetail2(taskId) {
|
||||||
|
|
@ -713,6 +743,7 @@ export default {
|
||||||
this.queryParams.agreementCode = data.agreementCode
|
this.queryParams.agreementCode = data.agreementCode
|
||||||
this.queryParams.agreementId = data.agreementId
|
this.queryParams.agreementId = data.agreementId
|
||||||
this.queryParams.estimateLeaseTime = data.estimateLeaseTime
|
this.queryParams.estimateLeaseTime = data.estimateLeaseTime
|
||||||
|
this.queryParams.wholeTypeName = data.wholeTypeName
|
||||||
// this.queryParams.leaseType = data.leaseType
|
// this.queryParams.leaseType = data.leaseType
|
||||||
this.$set(this.queryParams, 'leaseType', data.leaseType)
|
this.$set(this.queryParams, 'leaseType', data.leaseType)
|
||||||
this.queryParams.leaseApplyInfo.remark = data.leaseApplyInfoList[0].remark
|
this.queryParams.leaseApplyInfo.remark = data.leaseApplyInfoList[0].remark
|
||||||
|
|
@ -720,6 +751,39 @@ export default {
|
||||||
this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
|
this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
|
||||||
return this.handelEchoData(item)
|
return this.handelEchoData(item)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (data.ctLeaseApplyDetails) {
|
||||||
|
this.getCtFileList(data.ctLeaseApplyDetails)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 生成成套附属设备
|
||||||
|
getCtFileList(ctData) {
|
||||||
|
const ctList = []
|
||||||
|
for (const key in ctData) {
|
||||||
|
ctList.push({
|
||||||
|
wholeTypeName: key,
|
||||||
|
wholeTypeNum: ctData[key][0].setsNum,
|
||||||
|
childrenList: [],
|
||||||
|
id: ctData[key][0].ctParentId,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
ctList.forEach((e) => {
|
||||||
|
queryCompleteSetToolsApi(e).then((res) => {
|
||||||
|
e.childrenList = res.data.map((j) => {
|
||||||
|
return {
|
||||||
|
...j,
|
||||||
|
initNum: j.deviceNum,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
e.childrenList.forEach((i) => {
|
||||||
|
i.deviceNum = i.initNum * e.wholeTypeNum
|
||||||
|
})
|
||||||
|
this.wholeTypeNameList.push(e)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//生成回显数据
|
//生成回显数据
|
||||||
handelEchoData(item) {
|
handelEchoData(item) {
|
||||||
|
|
@ -807,10 +871,10 @@ export default {
|
||||||
this.queryParams.leaseApplyDetails = this.leaseApplyDetails
|
this.queryParams.leaseApplyDetails = this.leaseApplyDetails
|
||||||
try {
|
try {
|
||||||
this.queryParams.leaseApplyDetails.forEach((item) => {
|
this.queryParams.leaseApplyDetails.forEach((item) => {
|
||||||
if (item.num == 0) {
|
// if (item.num == 0) {
|
||||||
this.$message.error('机具类型库存量为零无法领料')
|
// this.$message.error('机具类型库存量为零无法领料')
|
||||||
throw new Error()
|
// throw new Error()
|
||||||
}
|
// }
|
||||||
if (item.preNum == '') {
|
if (item.preNum == '') {
|
||||||
this.$message.error('请填写预领数量')
|
this.$message.error('请填写预领数量')
|
||||||
throw new Error()
|
throw new Error()
|
||||||
|
|
@ -821,6 +885,8 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const submitQueryParams = JSON.parse(JSON.stringify(this.queryParams))
|
||||||
|
|
||||||
if (this.wholeTypeNameList.length > 0) {
|
if (this.wholeTypeNameList.length > 0) {
|
||||||
const wholeTypeList = []
|
const wholeTypeList = []
|
||||||
this.wholeTypeNameList.forEach((i) => {
|
this.wholeTypeNameList.forEach((i) => {
|
||||||
|
|
@ -832,13 +898,17 @@ export default {
|
||||||
typeCn: e.typeName,
|
typeCn: e.typeName,
|
||||||
typeId: e.deviceTypeId,
|
typeId: e.deviceTypeId,
|
||||||
wholeTypeName: i.wholeTypeName,
|
wholeTypeName: i.wholeTypeName,
|
||||||
|
isCt: 0,
|
||||||
|
ctParentId: i.id,
|
||||||
|
setsNum: i.wholeTypeNum,
|
||||||
}
|
}
|
||||||
|
|
||||||
wholeTypeList.push(items)
|
// wholeTypeList.push(items)
|
||||||
|
submitQueryParams.leaseApplyDetails.push(items)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
this.queryParams.leaseApplyDetails = wholeTypeList
|
// this.queryParams.leaseApplyDetails = wholeTypeList
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!canSave) {
|
if (!canSave) {
|
||||||
|
|
@ -862,16 +932,43 @@ export default {
|
||||||
if (this.rejectTaskStatus == 100) {
|
if (this.rejectTaskStatus == 100) {
|
||||||
this.queryParams.souceByRefuse = 1
|
this.queryParams.souceByRefuse = 1
|
||||||
}
|
}
|
||||||
const params = {
|
|
||||||
...this.queryParams,
|
const params = JSON.parse(JSON.stringify(this.queryParams))
|
||||||
taskId: this.taskId,
|
params.taskId = this.taskId
|
||||||
leaseApplyInfoList: this.leaseApplyInfoList,
|
params.leaseApplyInfoList = this.leaseApplyInfoList
|
||||||
|
params.leaseApplyDetails.forEach((e) => {
|
||||||
|
e.isCt = 1
|
||||||
|
})
|
||||||
|
if (this.wholeTypeNameList.length > 0) {
|
||||||
|
const wholeTypeList = []
|
||||||
|
this.wholeTypeNameList.forEach((i) => {
|
||||||
|
i.childrenList.forEach((e) => {
|
||||||
|
const items = {
|
||||||
|
companyId: '101',
|
||||||
|
guigeCn: e.deviceType,
|
||||||
|
preNum: e.deviceNum,
|
||||||
|
typeCn: e.typeName,
|
||||||
|
typeId: e.deviceTypeId,
|
||||||
|
wholeTypeName: i.wholeTypeName,
|
||||||
|
isCt: 0,
|
||||||
|
ctParentId: i.id,
|
||||||
|
setsNum: i.wholeTypeNum,
|
||||||
|
}
|
||||||
|
|
||||||
|
// wholeTypeList.push(items)
|
||||||
|
params.leaseApplyDetails.push(items)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// this.queryParams.leaseApplyDetails = wholeTypeList
|
||||||
}
|
}
|
||||||
|
|
||||||
res = await editLeaseApply(params)
|
res = await editLeaseApply(params)
|
||||||
} else {
|
} else {
|
||||||
// console.log(this.queryParams)
|
// console.log(this.queryParams)
|
||||||
res = await submitLeaseApply(this.queryParams)
|
|
||||||
|
console.log('submitQueryParams', submitQueryParams)
|
||||||
|
res = await submitLeaseApply(submitQueryParams)
|
||||||
}
|
}
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
|
@ -1016,28 +1113,35 @@ export default {
|
||||||
this.holdingPoleSelList = res
|
this.holdingPoleSelList = res
|
||||||
},
|
},
|
||||||
/* 抱杆成套设备change事件 */
|
/* 抱杆成套设备change事件 */
|
||||||
onChangeWholeTypeName(val) {
|
async onChangeWholeTypeName(val) {
|
||||||
const selLable = this.holdingPoleSelList.find((e) => e.id === val)
|
val.forEach((e) => {
|
||||||
|
const selLable = this.holdingPoleSelList.find((j) => j.id === e)
|
||||||
|
const isPush = this.wholeTypeNameList.some((z) => z.id == e)
|
||||||
|
|
||||||
|
if (!isPush) {
|
||||||
const wholeTypeNameData = {
|
const wholeTypeNameData = {
|
||||||
id: val,
|
id: e,
|
||||||
wholeTypeName: selLable.wholeTypeName,
|
wholeTypeName: selLable.wholeTypeName,
|
||||||
wholeTypeNum: 1,
|
wholeTypeNum: 1,
|
||||||
childrenList: [],
|
childrenList: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
queryCompleteSetToolsApi(wholeTypeNameData).then((res) => {
|
queryCompleteSetToolsApi(wholeTypeNameData).then((res) => {
|
||||||
wholeTypeNameData.childrenList = res.data
|
wholeTypeNameData.childrenList = res.data.map((e) => {
|
||||||
wholeTypeNameData.childrenList.forEach((e) => (e.initNum = e.deviceNum))
|
return {
|
||||||
const isREpeat = this.wholeTypeNameList.find((e) => e.id === val)
|
...e,
|
||||||
if (!isREpeat) {
|
initNum: e.deviceNum,
|
||||||
this.wholeTypeNameList.push(wholeTypeNameData)
|
|
||||||
} else {
|
|
||||||
this.$modal.msgError('当前抱杆成套设备已添加,不可重复添加!')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(this.wholeTypeNameList, '处理后的数据---')
|
|
||||||
})
|
})
|
||||||
|
this.wholeTypeNameList.push(wholeTypeNameData)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
this.queryParams.wholeTypeName = ''
|
// 移除时触发
|
||||||
|
onRemoveTag(val) {
|
||||||
|
this.wholeTypeNameList = this.wholeTypeNameList.filter((e) => e.id != val)
|
||||||
},
|
},
|
||||||
|
|
||||||
/* 删除 */
|
/* 删除 */
|
||||||
|
|
@ -1052,7 +1156,7 @@ export default {
|
||||||
// 获取规格型号
|
// 获取规格型号
|
||||||
async getMaTypeDataByIdFun(val) {
|
async getMaTypeDataByIdFun(val) {
|
||||||
const res = await getMaTypeDataById({ id: val })
|
const res = await getMaTypeDataById({ id: val })
|
||||||
this.typeListDev = res.data
|
this.typeListDev = res.data.filter((e) => e.isStorage == 1)
|
||||||
console.log('🚀 ~ getMaTypeDataByIdFun ~ res:', res)
|
console.log('🚀 ~ getMaTypeDataByIdFun ~ res:', res)
|
||||||
},
|
},
|
||||||
// 选择规格型号
|
// 选择规格型号
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,71 @@
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
<el-table v-if="wholeTypeNameList.length > 0" :data="wholeTypeNameList">
|
||||||
|
<el-table-column type="index" align="center" />
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<el-table :data="row.childrenList">
|
||||||
|
<el-table-column label="序号" align="center" type="index" />
|
||||||
|
<el-table-column
|
||||||
|
label="机具名称"
|
||||||
|
align="center"
|
||||||
|
prop="typeName"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="规格型号"
|
||||||
|
align="center"
|
||||||
|
prop="typeModelName"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="计量单位"
|
||||||
|
align="center"
|
||||||
|
prop="unitName"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column label="当前库存" align="center" prop="num" show-overflow-tooltip />
|
||||||
|
<el-table-column
|
||||||
|
label="预出库数量"
|
||||||
|
align="center"
|
||||||
|
prop="outNum"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column label="差缺量" align="center" prop="" show-overflow-tooltip>
|
||||||
|
<template
|
||||||
|
slot-scope="scope"
|
||||||
|
v-if="Number(scope.row.outNum) - Number(scope.row.num) > 0"
|
||||||
|
>
|
||||||
|
<span style="color: red; cursor: pointer" @click="handleDifference(scope.row)">
|
||||||
|
{{ Number(scope.row.outNum) - Number(scope.row.num) }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="预领数量" align="center" prop="preNum" show-overflow-tooltip />
|
||||||
|
<el-table-column label="申请人" align="center" prop="applyFor" show-overflow-tooltip />
|
||||||
|
<el-table-column
|
||||||
|
label="申请时间"
|
||||||
|
align="center"
|
||||||
|
prop="updateTimes"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="任务状态"
|
||||||
|
align="center"
|
||||||
|
prop="taskName"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="wholeTypeName" align="center" label="成套设备名称" />
|
||||||
|
<el-table-column align="center" prop="wholeTypeNum" label="成套设备数量" width="260">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
|
@ -318,6 +383,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'
|
import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'
|
||||||
|
import { queryCompleteSetToolsApi } from '@/api/store/completeTools.js'
|
||||||
import {
|
import {
|
||||||
auditLeaseByCompanyCq,
|
auditLeaseByCompanyCq,
|
||||||
getLeaseListAllCq,
|
getLeaseListAllCq,
|
||||||
|
|
@ -476,6 +542,8 @@ export default {
|
||||||
label: '领料数量',
|
label: '领料数量',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
wholeTypeNameList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -661,6 +729,32 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.flowPath = this.flowPath
|
this.flowPath = this.flowPath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (res.rows[0].ctLeaseApplyDetails) {
|
||||||
|
this.getCtFileList(res.rows[0].ctLeaseApplyDetails)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 生成成套附属设备
|
||||||
|
getCtFileList(ctData) {
|
||||||
|
for (const key in ctData) {
|
||||||
|
const ctList = {
|
||||||
|
wholeTypeName: key,
|
||||||
|
wholeTypeNum: ctData[key][0].setsNum,
|
||||||
|
childrenList: [],
|
||||||
|
}
|
||||||
|
ctList.childrenList = ctData[key].map((e) => {
|
||||||
|
return {
|
||||||
|
...e,
|
||||||
|
applyFor: this.queryParams.applyFor,
|
||||||
|
updateTimes: this.queryParams.updateTimes,
|
||||||
|
taskName: this.queryParams.taskName,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.wholeTypeNameList.push(ctList)
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(this.wholeTypeNameList, ' this.wholeTypeNameList')
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 领料出库 -->
|
<!-- 领料出库 -->
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="80px"
|
||||||
|
>
|
||||||
<el-form-item label="领料单号" prop="code">
|
<el-form-item label="领料单号" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.code"
|
v-model="queryParams.code"
|
||||||
|
|
@ -13,7 +20,13 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单位名称" prop="unitId">
|
<el-form-item label="单位名称" prop="unitId">
|
||||||
<el-select v-model="queryParams.unitId" placeholder="请选择单位名称" clearable>
|
<el-select v-model="queryParams.unitId" placeholder="请选择单位名称" clearable>
|
||||||
<el-option v-for="item in unitList" filterable :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option
|
||||||
|
v-for="item in unitList"
|
||||||
|
filterable
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工程名称" prop="proId">
|
<el-form-item label="工程名称" prop="proId">
|
||||||
|
|
@ -77,12 +90,24 @@
|
||||||
prop="createTimes"
|
prop="createTimes"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="出库状态" align="center" prop="taskName" :show-overflow-tooltip="true"></el-table-column>
|
label="已出库数量"
|
||||||
|
align="center"
|
||||||
|
prop="alNum"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="出库状态"
|
||||||
|
align="center"
|
||||||
|
prop="taskName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" @click="handleView(scope.row)" v-hasPermi="['picking:outbound:view']">查看</el-button>
|
<el-button size="mini" @click="handleView(scope.row)" v-hasPermi="['picking:outbound:view']"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -124,7 +149,9 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -177,7 +204,12 @@
|
||||||
>
|
>
|
||||||
数量出库
|
数量出库
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="primary" v-if="scope.row.isCt == 0" @click="onViewFile(scope.row)">
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
v-if="scope.row.isCt == 0 && scope.row.main"
|
||||||
|
@click="onViewFile(scope.row)"
|
||||||
|
>
|
||||||
查看附件
|
查看附件
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -237,7 +269,7 @@
|
||||||
<el-tag size="mini" type="warning" v-if="row.isStorage == 0">否</el-tag>
|
<el-tag size="mini" type="warning" v-if="row.isStorage == 0">否</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="预领数量" prop="deviceNum" align="center" />
|
<el-table-column label="预领数量" prop="applyNum" align="center" />
|
||||||
<el-table-column align="center" label="库存数量" prop="num" />
|
<el-table-column align="center" label="库存数量" prop="num" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -833,15 +865,20 @@ export default {
|
||||||
|
|
||||||
// 查看附件
|
// 查看附件
|
||||||
async onViewFile(row) {
|
async onViewFile(row) {
|
||||||
console.log(row)
|
|
||||||
|
|
||||||
const res = await queryCompleteSetToolsApi({
|
const res = await queryCompleteSetToolsApi({
|
||||||
id: row.ctParentId,
|
id: row.ctParentId,
|
||||||
wholeTypeName: row.typeName,
|
wholeTypeName: row.wholeName,
|
||||||
wholeTypeNum: 1,
|
wholeTypeNum: 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.fileList = res.data.filter((e) => e.isStorage == 0)
|
this.fileList = res.data
|
||||||
|
.filter((e) => e.isStorage == 1)
|
||||||
|
.map((j) => {
|
||||||
|
return {
|
||||||
|
...j,
|
||||||
|
applyNum: j.deviceNum * row.setsNum,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
this.openFileVisible = true
|
this.openFileVisible = true
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -397,6 +397,8 @@ export default {
|
||||||
}
|
}
|
||||||
this.$message.closeAll()
|
this.$message.closeAll()
|
||||||
const checkNode = this.$refs['mainDeviceRef'].getCheckedNodes()
|
const checkNode = this.$refs['mainDeviceRef'].getCheckedNodes()
|
||||||
|
|
||||||
|
console.log('checkNode', checkNode)
|
||||||
this.recursionGetDeviceName(this.deviceTypeTreeNew, val[val.length - 2])
|
this.recursionGetDeviceName(this.deviceTypeTreeNew, val[val.length - 2])
|
||||||
if (checkNode.length < 1) return
|
if (checkNode.length < 1) return
|
||||||
|
|
||||||
|
|
@ -408,7 +410,7 @@ export default {
|
||||||
deviceAscription: '抱杆设备', // 所属类型
|
deviceAscription: '抱杆设备', // 所属类型
|
||||||
ascriptionType: 1, // 所属类型 1 主体设备 2 配套设备
|
ascriptionType: 1, // 所属类型 1 主体设备 2 配套设备
|
||||||
typeName: this.deviceName,
|
typeName: this.deviceName,
|
||||||
isStorage: checkNode[0].isStorage,
|
isStorage: checkNode[0].data.isStorage,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.tempList.length === 0) {
|
if (this.tempList.length === 0) {
|
||||||
|
|
@ -446,6 +448,7 @@ export default {
|
||||||
deviceAscription: '配套设备', // 所属类型
|
deviceAscription: '配套设备', // 所属类型
|
||||||
ascriptionType: 2, // 所属类型 1 主体设备 2 配套设备
|
ascriptionType: 2, // 所属类型 1 主体设备 2 配套设备
|
||||||
typeName: this.deviceName,
|
typeName: this.deviceName,
|
||||||
|
isStorage: checkNode[0].data.isStorage,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 先判断当前所选的配套设备是否已选择为主体设备
|
// 先判断当前所选的配套设备是否已选择为主体设备
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue