diff --git a/src/api/materialsStation/index.js b/src/api/materialsStation/index.js index 99f89698..ce77bef1 100644 --- a/src/api/materialsStation/index.js +++ b/src/api/materialsStation/index.js @@ -837,3 +837,12 @@ export function getSubUnitList(query) { }) } +// 获取领料单 +export function getLeaseDataByCode(data) { + return request({ + url: '/material/material_lease_apply_info/getLeaseDataByCode', + method: 'get', + params: data + }) +} + diff --git a/src/views/business/businessHandling/directApply.vue b/src/views/business/businessHandling/directApply.vue index f8262994..0ec32864 100644 --- a/src/views/business/businessHandling/directApply.vue +++ b/src/views/business/businessHandling/directApply.vue @@ -295,10 +295,10 @@ v-model="scope.row.directNum" :value="scope.row.directNum || ''" controls-position="right" - :precision="0" + :precision="scope.row.unitValue == 1 ? 3 : 0" style="width: 100%" :disabled="isDetail || !scope.row.isActive" - :min="1" + :min="scope.row.unitValue == 1 ? 0.001 : 1" @change="directNumChange(scope.row)" > @@ -915,6 +915,11 @@ export default { // 数量变更 directNumChange(row) { + if (row.unitValue == 1) { + row.directNum = Number(String(row.directNum).replace(/[^\d.]/g, '')) + } else { + row.directNum = Number(String(row.directNum).replace(/[^\d]/g, '')) + } if (row.directNum > row.useNum) { this.$message.error('直转数量不能大于领料数量') this.$nextTick(() => { diff --git a/src/views/materialsStation/toolsLease/outBound/component/OutCodeDlg.vue b/src/views/materialsStation/toolsLease/outBound/component/OutCodeDlg.vue index b7aa1e31..e3163111 100644 --- a/src/views/materialsStation/toolsLease/outBound/component/OutCodeDlg.vue +++ b/src/views/materialsStation/toolsLease/outBound/component/OutCodeDlg.vue @@ -105,10 +105,19 @@ export default { } }) }, + // saveCodeOut() { + // console.log('Selected codes:', this.outCodeList) + // this.$emit('selectOutCode', this.selectedCodeList) + // this.openCode = false + // } saveCodeOut() { - console.log('Selected codes:', this.outCodeList) - this.$emit('selectOutCode', this.selectedCodeList) - this.openCode = false + // 直接从 el-table 的引用中获取当前选中的行 + const selectedRows = this.$refs.multipleTable.selection; + console.log('Selected codes:', selectedRows); + + // 发送选中的行列表 + this.$emit('selectOutCode', selectedRows); + this.openCode = false; } } } diff --git a/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue b/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue index 37854ab4..578bf6b4 100644 --- a/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue +++ b/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue @@ -1,5 +1,4 @@