diff --git a/src/api/store/warehousing.js b/src/api/store/warehousing.js index ef49fed..5ca5100 100644 --- a/src/api/store/warehousing.js +++ b/src/api/store/warehousing.js @@ -3,62 +3,51 @@ import request from '@/utils/request' //机具退料入库 export function getReturnOfMaterialsInfoAll(query) { return request({ - url: '/material/returnOfMaterialsInfo/getReturnOfMaterialsInfoAll', - method: 'get', - params: query + url: '/material/returnOfMaterialsInfo/getReturnOfMaterialsInfoAll', + method: 'get', + params: query, }) - } - +} //机具退料入库--机具类型,规格型号下拉数据 export function getTypeList(query) { return request({ - url: '/material/returnOfMaterialsInfo/getTypeList', - method: 'get', - params: query + url: '/material/returnOfMaterialsInfo/getTypeList', + method: 'get', + params: query, }) - } - +} +//机具退料入库--机具类型,规格型号下拉数据 +export function getInfoListByTypeApi(query) { + return request({ + url: '/material/returnOfMaterialsInfo/getInfoListByType', + method: 'get', + params: query, + }) +} //修试后入库--列表 export function getRepairedList(data) { return request({ - url: '/material/RepairTestInput/getRepairedList', - method: 'get', - params: data + url: '/material/RepairTestInput/getRepairedList', + method: 'get', + params: data, }) - } - +} + //修试后入库--详情 export function getRepairedDetailList(data) { return request({ - url: '/material//RepairTestInput/getRepairedDetailList', - method: 'get', - params: data + url: '/material//RepairTestInput/getRepairedDetailList', + method: 'get', + params: data, }) - } - //修试后入库--审核 +} +//修试后入库--审核 export function inputByType(data) { return request({ - url: '/material/RepairTestInput/inputByType', - method: 'post', - data: data + url: '/material/RepairTestInput/inputByType', + method: 'post', + data: data, }) - } - - - - - - - - - - - - - - - - - +} diff --git a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue index f09b5a4..072a1ee 100644 --- a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue +++ b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue @@ -38,12 +38,7 @@ placeholder="请选择" :disabled="isEdit" > - + @@ -56,27 +51,17 @@ placeholder="请选择" :disabled="isEdit" > - + - + - + @@ -102,11 +87,6 @@ placeholder="请输入规格型号" popper-class="popper-select" :props="deviceTypeTreeProps" - :disabled=" - (isEdit && !isView) || - isCost || - wholeTypeNameList.length > 0 - " > @@ -150,12 +130,7 @@ placeholder="请选择费用承担方" :disabled="isEdit" > - + @@ -173,14 +148,7 @@ - + 保存 @@ -196,47 +164,21 @@ --> - + - - - - - + + + + + + - + - 删除 + 删除 @@ -267,16 +204,25 @@ > - - + + + + + + + + 是 + 否 + + + + + + + + + + @@ -614,15 +560,10 @@ export default { this.taskId = this.viewTaskId if (this.taskId) { - Promise.all([ - this.GetTaskDetail(this.taskId), - this.GetDeviceTypeTree(), - ]).then(() => { + Promise.all([this.GetTaskDetail(this.taskId), this.GetDeviceTypeTree()]).then(() => { let selectList = [] this.leaseApplyDetails.forEach((e) => { - selectList.push( - this.getParentsById(this.deviceTypeTree, e.typeId), - ) + selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId)) }) this.$nextTick(() => { this.deviceType = selectList @@ -655,7 +596,7 @@ export default { this.GetAgreementInfoById() }, async getLevelTwoUnitCbx() { - const res = await getLevelTwoUnitCbx({id: ''}) + const res = await getLevelTwoUnitCbx({ id: '' }) console.log('🚀 ~ getLevelTwoUnitCbx ~ res:', res) this.unitList = res.data @@ -709,9 +650,7 @@ export default { console.log(res, '根据工程和单位获取协议id') if (res.data.isSlt == 1) { - this.$message.error( - '当前协议下对应的工程已完成结算,不可重复领料!', - ) + this.$message.error('当前协议下对应的工程已完成结算,不可重复领料!') this.isCost = true if (this.leaseApplyDetails.length > 0) { @@ -757,18 +696,15 @@ export default { this.queryParams.unitId = data.unitId this.queryParams.costBearingParty = data.costBearingParty this.queryParams.proId = data.proId - this.queryParams.leaseApplyInfo.phone = - data.leaseApplyInfoList[0].phone - this.queryParams.leaseApplyInfo.leasePerson = - data.leaseApplyInfoList[0].leasePerson + this.queryParams.leaseApplyInfo.phone = data.leaseApplyInfoList[0].phone + this.queryParams.leaseApplyInfo.leasePerson = data.leaseApplyInfoList[0].leasePerson this.queryParams.agreementCode = data.agreementCode this.queryParams.agreementId = data.agreementId this.queryParams.estimateLeaseTime = data.estimateLeaseTime // 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 this.leaseApplyInfoList = data.leaseApplyInfoList this.leaseApplyDetails = data.leaseApplyDetails.map((item) => { return this.handelEchoData(item) @@ -791,17 +727,14 @@ export default { this.queryParams.unitId = data.unitId this.queryParams.proId = data.proId this.queryParams.costBearingParty = data.costBearingParty - this.queryParams.leaseApplyInfo.phone = - data.leaseApplyInfoList[0].phone - this.queryParams.leaseApplyInfo.leasePerson = - data.leaseApplyInfoList[0].leasePerson + this.queryParams.leaseApplyInfo.phone = data.leaseApplyInfoList[0].phone + this.queryParams.leaseApplyInfo.leasePerson = data.leaseApplyInfoList[0].leasePerson this.queryParams.agreementCode = data.agreementCode this.queryParams.agreementId = data.agreementId this.queryParams.estimateLeaseTime = data.estimateLeaseTime // 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 this.leaseApplyInfoList = data.leaseApplyInfoList this.leaseApplyDetails = data.leaseApplyDetails.map((item) => { return this.handelEchoData(item) @@ -809,9 +742,7 @@ export default { }, //生成回显数据 handelEchoData(item) { - const template = JSON.parse( - JSON.stringify(this.leaseApplyDetailsItem), - ) + const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem)) template.createBy = item.createBy template.companyId = item.companyId template.typeId = item.typeId @@ -885,57 +816,70 @@ export default { if (!valid) { return false } else { - if ( - this.leaseApplyDetails.length === 0 && - this.wholeTypeNameList.length === 0 - ) { + if (this.leaseApplyDetails.length === 0 && this.wholeTypeNameList.length === 0) { this.$message.error('请添加机具类型或成套设备') return } let canSave = true if (this.leaseApplyDetails.length > 0) { - this.queryParams.leaseApplyDetails = - this.leaseApplyDetails + this.queryParams.leaseApplyDetails = this.leaseApplyDetails try { - this.queryParams.leaseApplyDetails.forEach( - (item) => { - if (item.num == 0) { - this.$message.error( - '机具类型库存量为零无法领料', - ) - throw new Error() - } - if (item.preNum == '') { - this.$message.error('请填写预领数量') - throw new Error() - } - }, - ) + this.queryParams.leaseApplyDetails.forEach((item) => { + if (item.num == 0) { + this.$message.error('机具类型库存量为零无法领料') + throw new Error() + } + if (!item.childrenList && item.preNum == '') { + this.$message.error('请填写预领数量') + throw new Error() + } + }) } catch (e) { throw e } } - if (this.wholeTypeNameList.length > 0) { - const wholeTypeList = [] - this.wholeTypeNameList.forEach((i) => { - i.childrenList.forEach((e) => { + this.leaseApplyDetails.forEach((e) => { + if (e.childrenList && e.childrenList.length > 0) { + e.childrenList.forEach((j) => { const items = { companyId: '101', - guigeCn: e.deviceType, - preNum: e.deviceNum, - typeCn: e.typeName, - typeId: e.deviceTypeId, - wholeTypeName: i.wholeTypeName, + guigeCn: j.deviceType, + typeCn: j.typeName, + createBy: this.user.name, + typeId: j.deviceTypeId, + preNum: j.deviceNum, + num: j.num, } - wholeTypeList.push(items) + this.queryParams.leaseApplyDetails.push(items) }) - }) + } + }) - this.queryParams.leaseApplyDetails = wholeTypeList - } + this.queryParams.leaseApplyDetails = this.queryParams.leaseApplyDetails.filter( + (e) => !e.childrenList, + ) + // 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, + // } + + // wholeTypeList.push(items) + // }) + // }) + + // this.queryParams.leaseApplyDetails = wholeTypeList + // } if (!canSave) { return false @@ -949,15 +893,8 @@ export default { } if (this.taskId) { this.leaseApplyInfoList.forEach((v) => { - v = Object.assign( - v, - this.queryParams.leaseApplyInfo, - ) - this.$set( - v, - 'leaseApplyDetails', - this.queryParams.leaseApplyDetails, - ) + v = Object.assign(v, this.queryParams.leaseApplyInfo) + this.$set(v, 'leaseApplyDetails', this.queryParams.leaseApplyDetails) }) if (this.$route.query.isBack) { this.queryParams.souceByRefuse = 1 @@ -973,7 +910,7 @@ export default { res = await editLeaseApply(params) } else { - // console.log(this.queryParams) + console.log(this.queryParams, '参数---') res = await submitLeaseApply(this.queryParams) } if (res.code == 200) { @@ -1022,8 +959,7 @@ export default { }, /////// 设备类型树 切换 deviceTypeChange(val) { - const deviceTypeList = - this.$refs.deviceTypeCascader.getCheckedNodes() + const deviceTypeList = this.$refs.deviceTypeCascader.getCheckedNodes() // if (val.length > 0) { // for (let i in val) { @@ -1031,6 +967,9 @@ export default { // } // } let tempList = [] + + // const isRepeat = this.tempList.some((e) => e.typeId == val[val.length - 1]) + if (val.length > 0) { const items = val.map((e) => { return e[3] @@ -1038,40 +977,44 @@ export default { for (let i in items) { for (let z in deviceTypeList) { if (deviceTypeList[z].data.id === items[i]) { - let { num, companyId, id, unitName } = - deviceTypeList[z].data - tempList.push({ - createBy: this.user.name, - typeId: id, - num, - companyId, - unitCn: unitName, - typeCn: deviceTypeList[z].pathLabels[2], - guigeCn: deviceTypeList[z].pathLabels[3], - }) - break + let { num, companyId, id, unitName } = deviceTypeList[z].data + + const isRepeat = this.leaseApplyDetails.some((e) => e.typeId === id) + if (!isRepeat) { + this.leaseApplyDetails.push({ + createBy: this.user.name, + typeId: id, + num, + companyId, + unitCn: unitName, + typeCn: deviceTypeList[z].pathLabels[2], + guigeCn: deviceTypeList[z].pathLabels[3], + }) + + // break + } } } } - const newDataList = [...this.leaseApplyDetails, ...tempList] - const map = new Map() - for (let item of newDataList) { - if (!map.has(item.typeId)) { - map.set(item.typeId, item) - } - } - const newArray = [...map.values()] + // const newDataList = [...this.leaseApplyDetails, ...tempList] + // const map = new Map() + // for (let item of newDataList) { + // if (!map.has(item.typeId)) { + // map.set(item.typeId, item) + // } + // } + // const newArray = [...map.values()] - let newArray_array = [] - items.forEach((e) => { - newArray.forEach((j) => { - if (e == j.typeId) { - newArray_array.push(j) - } - }) - }) - this.leaseApplyDetails = newArray_array + // let newArray_array = [] + // items.forEach((e) => { + // newArray.forEach((j) => { + // if (e == j.typeId) { + // newArray_array.push(j) + // } + // }) + // }) + // this.leaseApplyDetails = newArray_array } else { this.leaseApplyDetails = [] } @@ -1112,9 +1055,7 @@ export default { }, //// 将数据处理成 表格中需要的数据 handelTableItemData(node) { - const template = JSON.parse( - JSON.stringify(this.leaseApplyDetailsItem), - ) + const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem)) template.createBy = this.user.name console.log(node.data) template.num = node.data.num @@ -1125,9 +1066,7 @@ export default { template.guigeCn = node.pathLabels[3] if (this.taskId) { - const index = this.leaseApplyInfoList.find( - (key) => key.companyId == node.data.companyId, - ) + const index = this.leaseApplyInfoList.find((key) => key.companyId == node.data.companyId) template.parenntId = index ? index.id : '' } @@ -1174,25 +1113,21 @@ export default { childrenList: [], } queryCompleteSetToolsApi(wholeTypeNameData).then((res) => { - wholeTypeNameData.childrenList = res.data - wholeTypeNameData.childrenList.forEach( - (e) => (e.initNum = e.deviceNum), - ) - const isREpeat = this.wholeTypeNameList.find( - (e) => e.id === val, - ) - if (!isREpeat) { - this.wholeTypeNameList.push(wholeTypeNameData) - } else { - this.$modal.msgError( - '当前抱杆成套设备已添加,不可重复添加!', - ) - } + console.log(res, '996') - console.log(this.wholeTypeNameList, '处理后的数据---') + this.leaseApplyDetails.push({ wholeTypeName: selLable.wholeTypeName, childrenList: res.data }) + // wholeTypeNameData.childrenList = res.data + // wholeTypeNameData.childrenList.forEach((e) => (e.initNum = e.deviceNum)) + // const isREpeat = this.wholeTypeNameList.find((e) => e.id === val) + // if (!isREpeat) { + // this.wholeTypeNameList.push(wholeTypeNameData) + // } else { + // this.$modal.msgError('当前抱杆成套设备已添加,不可重复添加!') + // } + // console.log(this.wholeTypeNameList, '处理后的数据---') }) - this.queryParams.wholeTypeName = '' + // this.queryParams.wholeTypeName = '' }, /* 删除 */ @@ -1202,9 +1137,7 @@ export default { /* 更改数量 */ onChangeInput(val, v) { - this.wholeTypeNameList[v].childrenList.forEach( - (e) => (e.deviceNum = e.initNum * val), - ) + this.wholeTypeNameList[v].childrenList.forEach((e) => (e.deviceNum = e.initNum * val)) }, }, } diff --git a/src/views/claimAndreturn/picking/outbound-nw/index.vue b/src/views/claimAndreturn/picking/outbound-nw/index.vue index 3996058..047af44 100644 --- a/src/views/claimAndreturn/picking/outbound-nw/index.vue +++ b/src/views/claimAndreturn/picking/outbound-nw/index.vue @@ -19,11 +19,7 @@ /> - + - - + + - + - 查询 - 重置 + 查询 + 重置 @@ -103,50 +74,20 @@ >推送到智慧工地 --> - + - - + + - - - + + + --> - + - 查看 - - + + @@ -262,19 +184,10 @@ /> - 查询 - 重置 + 重置 @@ -283,68 +196,26 @@ align="center" label="序号" type="index" - :index=" - indexContinuation( - queryParams.pageNum, - queryParams.pageSize, - ) - " + :index="indexContinuation(queryParams.pageNum, queryParams.pageSize)" /> - - - - - - + + + + + + 编码出库 数量出库 @@ -363,81 +234,37 @@ - - + + 待出库数量:{{ outNum }} - 部分设备出库时,需进行装车,需记录车牌号码 + 部分设备出库时,需进行装车,需记录车牌号码 - + - 查询 - 重置 + 查询 + 重置 - 出库 + 出库 - - + + - - - - + + + + - - + + - 部分设备出库时,需进行装车,需记录车牌号码 + 部分设备出库时,需进行装车,需记录车牌号码 - 出库 + 出库 - - - - - + + + + + { if (item2.children && item2.children.length > 0) { item2.children.forEach((item3) => { - if ( - item3.children && - item3.children.length > 0 - ) { + if (item3.children && item3.children.length > 0) { item3.children.forEach((item4) => { - item4.machineTypeName = - item3.typeName - item4.specificationType = - item4.typeName + item4.machineTypeName = item3.typeName + item4.specificationType = item4.typeName // this.$set(item4, 'purchasePrice', 0); // this.$set(item4, 'purchaseNum', 1); }) diff --git a/src/views/claimAndreturn/picking/outbound/index.vue b/src/views/claimAndreturn/picking/outbound/index.vue index 000e509..1314132 100644 --- a/src/views/claimAndreturn/picking/outbound/index.vue +++ b/src/views/claimAndreturn/picking/outbound/index.vue @@ -19,11 +19,7 @@ /> - + - - + + - + - 查询 - 重置 + 查询 + 重置 @@ -93,10 +64,7 @@ >导出 - + @@ -105,28 +73,11 @@ align="center" label="序号" type="index" - :index=" - indexContinuation(queryParams.pageNum, queryParams.pageSize) - " - /> - - - + + + - + - 查看 - - + + @@ -216,19 +149,10 @@ /> - 查询 - 重置 + 重置 @@ -237,82 +161,44 @@ align="center" label="序号" type="index" - :index=" - indexContinuation( - queryParams.pageNum, - queryParams.pageSize, - ) - " - /> - - - - - + + + + + + + + 是 + 否 + + - 出库记录 - 出库单 + 出库记录 + 出库单 - + 编码出库 数量出库 + 查看附件 @@ -325,12 +211,7 @@ @pagination="getDialogList" /> - + @@ -348,151 +229,62 @@ /> - 查询 - 重置 - 导出 + 查询 + 重置 + 导出 - - - - - - + + + + + + - - + + 待出库数量:{{ outNum }} - + + - 部分设备出库时,需进行装车,需记录车牌号码 - + 部分设备出库时,需进行装车,需记录车牌号码 + - + - - + - 查询 - 重置 + 查询 + 重置 - 出库 + 出库 - - + + - - - - + + + + - - + + - 部分设备出库时,需进行装车,需记录车牌号码 - + 部分设备出库时,需进行装车,需记录车牌号码 + - + - - 出库 + 出库 - - - - - + + + + + - - - - - - 出库单 - - - - 领料单位:{{ leaseOutData.unitName }} - - - 工程名称:{{ leaseOutData.proName }} - - - 时间:{{ leaseOutData.updateTime }} - - - 编号:{{ leaseOutData.code }} - - - - - - - - - - - - - + + + + + 出库单 + + + 领料单位:{{ leaseOutData.unitName }} + + + 工程名称:{{ leaseOutData.proName }} + + + 时间:{{ leaseOutData.updateTime }} + + + 编号:{{ leaseOutData.code }} + + + + + + + + + + + + + - - - 审核: - - - 领料: - - - 仓库: - - - 操作人: - + + + 审核: + + + 领料: + + + 仓库: + + + 操作人: + + + - - - - + + diff --git a/src/views/warehouseManage/machinery/type/index.vue b/src/views/warehouseManage/machinery/type/index.vue index 4dc8d1e..f7f1c55 100644 --- a/src/views/warehouseManage/machinery/type/index.vue +++ b/src/views/warehouseManage/machinery/type/index.vue @@ -34,19 +34,12 @@ @mousemove="onMousemove(data)" @mouseleave="onMouseleave()" > - {{ node.label.slice(0, 3) + '...' }} + {{ + node.label.slice(0, 3) + '...' + }} {{ node.label }} - + - 查询 - 重置 + 重置 @@ -136,30 +120,16 @@ >导出 --> - + - + - + - + @@ -196,23 +160,10 @@ prop="keeperUserName" show-overflow-tooltip /> - + - - 编码管理 - - - 数量管理 - + 编码管理 + 数量管理 @@ -222,19 +173,11 @@ - + - {{ scope.row.photoName }} + {{ + scope.row.photoName + }} - + + + 是 + 否 + + + + + 是 + 否 + + + - + - - + + @@ -375,11 +310,7 @@ - + @@ -390,12 +321,8 @@ placeholder="请选择管理模式" style="width: 100%" > - 编码管理 - 数量管理 + 编码管理 + 数量管理 @@ -417,12 +344,7 @@ - + @@ -441,11 +363,7 @@ - + @@ -514,19 +432,11 @@ action="#" :limit="1" accept=".docx" - :http-request=" - (obj) => fileUpLoad(obj, 'fileUrl') - " + :http-request="(obj) => fileUpLoad(obj, 'fileUrl')" :on-exceed="exceedFile" > - 点击上传文件需小于20M + 点击上传文件需小于20M @@ -535,9 +445,7 @@ - + - - - + + + - - - + + + @@ -614,27 +493,12 @@ - - + + - + @@ -666,9 +530,7 @@ @@ -682,40 +544,24 @@ append-to-body :close-on-click-modal="false" > - + - + - + - 确 定 - 取 消 + 确 定 + 取 消 @@ -726,14 +572,7 @@