Browse Source

优化

master
常熟吴彦祖 2 weeks ago
parent
commit
cd36563c5e
  1. 101
      src/views/modules/warehouse/labelChangeForDaPanDian.vue

101
src/views/modules/warehouse/labelChangeForDaPanDian.vue

@ -373,7 +373,12 @@
</el-col>
<el-col :span="12">
<el-form-item label="物料编码">
<el-input v-model="editInventoryForm.partNo" readonly></el-input>
<div style="display: flex; gap: 8px;">
<el-input v-model="editInventoryForm.partNo" readonly style="width: 100px;"></el-input>
<el-button type="primary" @click="querySamePartInventory" :loading="samePartLoading" style="flex-shrink: 0;">
查询同物料
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
@ -515,11 +520,50 @@
<el-button @click="restoreNonPalletDialogVisible = false" :disabled="restoreNonPalletLoading">取消</el-button>
</div>
</el-dialog>
<!-- IFS同物料库存列表弹窗 - rqrq -->
<el-dialog
title="IFS同物料库存列表(双击选择)"
:visible.sync="samePartInventoryDialogVisible"
:close-on-click-modal="false"
width="1000px"
append-to-body>
<el-table
:data="samePartInventoryList"
border
stripe
highlight-current-row
v-loading="samePartLoading"
height="400"
style="width: 100%"
@row-dblclick="handleSamePartRowDblClick">
<el-table-column prop="lotBatchNo" label="批次号" min-width="120" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="locationNo" label="库位" min-width="100" align="center" header-align="center"></el-table-column>
<el-table-column prop="warehouse" label="仓库" min-width="80" align="center" header-align="center"></el-table-column>
<el-table-column prop="waivDevRejNo" label="WDR" min-width="80" align="center" header-align="center"></el-table-column>
<el-table-column prop="engChgLevel" label="版本号" min-width="80" align="center" header-align="center"></el-table-column>
<el-table-column prop="expirationDate" label="失效日期" min-width="100" align="center" header-align="center">
<template slot-scope="scope">
{{ scope.row.expirationDate ? scope.row.expirationDate.substring(0, 10) : '' }}
</template>
</el-table-column>
<el-table-column prop="qtyOnhand" label="在库数量" min-width="100" align="right" header-align="center"></el-table-column>
<el-table-column prop="qtyReserved" label="预留数量" min-width="100" align="right" header-align="center"></el-table-column>
<el-table-column prop="availabilityControlId" label="可用控制" min-width="80" align="center" header-align="center"></el-table-column>
</el-table>
<div style="margin-top: 10px; color: #909399; font-size: 12px;">
<i class="el-icon-info"></i> 数据来源IFS系统库存双击行可将该记录的批次号WDR版本号失效日期覆盖到编辑表单
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="samePartInventoryDialogVisible = false">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getHandlingUnitLabelList, reprintLabel, deleteLabel, getFailedPrintTasks, retryFailedPrintTasks, updateHandlingUnitInventory, removeNonPalletInventory, restoreNonPalletInventory } from '@/api/warehouse/labelQuery'
import { getInventoryPartInStock } from '@/api/base/ifsInventoryQuery' // IFS - rqrq
import { getLocationList } from '@/api/warehouse/location'
import { searchSysLanguagePackList, saveUserFavorite, searchUserFavorite } from '@/api/sysLanguage'
import { createOtherInboundHU, printLabel } from '@/api/warehouse/otherInbound'
@ -842,6 +886,10 @@ export default {
restoreNonPalletDialogVisible: false,
restoreNonPalletLoading: false,
restoreNonPalletPassword: '',
// - rqrq
samePartInventoryDialogVisible: false,
samePartLoading: false,
samePartInventoryList: [],
}
},
activated() {
@ -1449,6 +1497,57 @@ export default {
}).catch(() => {
//
})
},
/**
* 查询IFS同物料库存 - rqrq
*/
querySamePartInventory() {
if (!this.editInventoryForm.partNo) {
this.$alert('物料编码为空,无法查询', '提示', { confirmButtonText: '确定' })
return
}
this.samePartLoading = true
this.samePartInventoryList = []
// IFS - rqrq
getInventoryPartInStock({
site: localStorage.getItem('site'),
partNo: this.editInventoryForm.partNo
}).then(({ data }) => {
if (data && data.code === 0) {
this.samePartInventoryList = data.rows || []
if (this.samePartInventoryList.length === 0) {
this.$message.warning('IFS中未找到该物料的库存记录')
} else {
this.samePartInventoryDialogVisible = true
}
} else {
this.$alert(data.msg || '查询IFS库存失败', '错误', { confirmButtonText: '确定' })
}
}).catch(error => {
this.$alert('查询IFS库存失败:' + error.message, '错误', { confirmButtonText: '确定' })
}).finally(() => {
this.samePartLoading = false
})
},
/**
* 双击IFS库存行覆盖数据到编辑表单 - rqrq
* @param row IFS库存行数据
*/
handleSamePartRowDblClick(row) {
// 使IFS- rqrq
this.editInventoryForm.batchNo = row.lotBatchNo || ''
this.editInventoryForm.wdr = row.waivDevRejNo || ''
this.editInventoryForm.engChgLevel = row.engChgLevel || ''
this.editInventoryForm.expiredDate = row.expirationDate ? row.expirationDate.substring(0, 10) : ''
// - rqrq
this.samePartInventoryDialogVisible = false
this.$message.success('已将IFS库存记录的批次号、WDR、版本号、失效日期覆盖到表单')
}
}
}

Loading…
Cancel
Save