同步
This commit is contained in:
@@ -35,13 +35,10 @@ export function hangInvalidCheckJob(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function pointOut(groupCodingNo, outQuantity) {
|
||||
export function pointOut(params) {
|
||||
return request({
|
||||
url: '/job/outmydoJob/pointOut',
|
||||
method: 'get',
|
||||
params: {
|
||||
groupCodingNo: groupCodingNo,
|
||||
outQuantity: outQuantity
|
||||
}
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -238,7 +238,21 @@
|
||||
<!-- <el-table-column label="出库子单编号" align="center" prop="stockoutDetailId" width="160" /> -->
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="计划数量" align="center" prop="quantity" />
|
||||
<el-table-column label="计划数量" align="center" prop="quantity" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-if="isAddMode && !isView"
|
||||
v-model="scope.row.quantity"
|
||||
:min="0"
|
||||
:step="1"
|
||||
:controls="false"
|
||||
size="mini"
|
||||
style="width: 120px"
|
||||
@change="handleDetailQuantityChange(scope.row)"
|
||||
/>
|
||||
<span v-else>{{ scope.row.quantity }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配数量" align="center" prop="allotQuantity" />
|
||||
<el-table-column label="实际数量" align="center" prop="assignNum" />
|
||||
</el-table>
|
||||
@@ -246,6 +260,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" plain @click="handleAutoAllot" v-if="!isAddMode" v-hasPermi="['out:outStockout:autoAllot']">自动分配</el-button>
|
||||
<el-button type="primary" plain @click="handleManualAllot" v-if="!isAddMode" v-hasPermi="['out:outStockout:manualAllot']">手动分配</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="!isView">确 定</el-button>
|
||||
<el-button @click="open = false">关 闭</el-button>
|
||||
</div>
|
||||
@@ -356,52 +371,54 @@
|
||||
<!-- 库存明细表格 -->
|
||||
<el-table ref="stockTable" v-loading="stockLoading" :data="stockList" @selection-change="handleStockSelectionChange" max-height="400">
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="stockSelectable" />
|
||||
<el-table-column label="库存编码" align="center" prop="stockId" />
|
||||
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" />
|
||||
<el-table-column label="仓库" align="center" prop="warehouseId" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.warehouse" :value="scope.row.warehouseId"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次号" align="center" prop="lotNo" />
|
||||
<!-- <el-table-column label="库存编码" align="center" prop="stockId" />-->
|
||||
<!-- <el-table-column label="货位名称" align="center" prop="cargoSpaceName" />-->
|
||||
<el-table-column label="通道编号" align="center" prop="groupCodingNo" width="80" />
|
||||
<!-- <el-table-column label="仓库" align="center" prop="warehouseId" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.warehouse" :value="scope.row.warehouseId"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="批次号" align="center" prop="lotNo" />-->
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="规格型号" align="center" prop="netWeight" />
|
||||
<el-table-column label="图号" align="center" prop="grossWeight" />
|
||||
<el-table-column label="库存数量" align="center" prop="quantity" width="80" />
|
||||
<el-table-column label="来源" align="center" prop="spare1" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.origin_type" :value="scope.row.spare1"/>
|
||||
</template>
|
||||
<!-- <el-table-column label="规格型号" align="center" prop="netWeight" />-->
|
||||
<!-- <el-table-column label="图号" align="center" prop="grossWeight" />-->
|
||||
<el-table-column label="库存数量" align="center" prop="quantity" />
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="套账" align="center" prop="spare3" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.account_type" :value="scope.row.spare3"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用途" align="center" prop="spare4" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.purpose_type" :value="scope.row.model"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="台次" align="center" prop="spare5" />
|
||||
<el-table-column label="入库单价" align="center" prop="spare6" />
|
||||
<el-table-column label="状态" align="center" prop="voltage" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.turnover_type" :value="scope.row.voltage"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="件次" align="center" prop="power" />
|
||||
<!-- <el-table-column label="供应商" align="center" prop="phase" />-->
|
||||
<el-table-column label="供应商" align="center" prop="inClassId" />
|
||||
<el-table-column label="管理号" align="center" prop="distribution" />
|
||||
<el-table-column label="产品质量" align="center" prop="spare8" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.quality_type" :value="scope.row.spare8"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同号" align="center" prop="orderId" />
|
||||
<!-- <el-table-column label="来源" align="center" prop="spare1" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.origin_type" :value="scope.row.spare1"/>-->
|
||||
<!-- </template>-->
|
||||
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="套账" align="center" prop="spare3" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.account_type" :value="scope.row.spare3"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="用途" align="center" prop="spare4" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.purpose_type" :value="scope.row.model"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="台次" align="center" prop="spare5" />-->
|
||||
<!-- <el-table-column label="入库单价" align="center" prop="spare6" />-->
|
||||
<!-- <el-table-column label="状态" align="center" prop="voltage" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.turnover_type" :value="scope.row.voltage"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="件次" align="center" prop="power" />-->
|
||||
<!--<!– <el-table-column label="供应商" align="center" prop="phase" />–>-->
|
||||
<!-- <el-table-column label="供应商" align="center" prop="inClassId" />-->
|
||||
<!-- <el-table-column label="管理号" align="center" prop="distribution" />-->
|
||||
<!-- <el-table-column label="产品质量" align="center" prop="spare8" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.quality_type" :value="scope.row.spare8"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="合同号" align="center" prop="orderId" />-->
|
||||
|
||||
</el-table>
|
||||
|
||||
@@ -613,6 +630,10 @@ export default {
|
||||
this.selectedProducts = selection
|
||||
},
|
||||
confirmSelectProduct() {
|
||||
if (this.selectedProducts.length === 0) {
|
||||
this.$modal.msgWarning("请选择物料")
|
||||
return
|
||||
}
|
||||
const duplicate = this.selectedProducts.filter(sel =>
|
||||
this.outStockDetailList.some(ex => ex.productId === sel.productId)
|
||||
)
|
||||
@@ -628,8 +649,13 @@ export default {
|
||||
assignNum: 0
|
||||
}))
|
||||
this.outStockDetailList.push(...items)
|
||||
this.selectedProducts = []
|
||||
this.productSelectVisible = false
|
||||
},
|
||||
handleDetailQuantityChange(row) {
|
||||
const quantity = Number(row.quantity)
|
||||
row.quantity = Number.isNaN(quantity) ? 0 : quantity
|
||||
},
|
||||
handleDeleteDetails() {
|
||||
if (this.selectedDetailRows.length === 0) {
|
||||
this.$modal.msgWarning("请选择要删除的物料")
|
||||
@@ -867,6 +893,7 @@ export default {
|
||||
}
|
||||
|
||||
// 显示库存明细弹窗
|
||||
this.selectedStockRows = []
|
||||
this.stockDialogVisible = true
|
||||
this.resetStockQuery()
|
||||
this.getStockList()
|
||||
|
||||
@@ -198,7 +198,8 @@ export default {
|
||||
|
||||
// 选中的库存数据
|
||||
selectedStockData: [],
|
||||
selectedTotalQuantity: 0
|
||||
selectedTotalQuantity: 0,
|
||||
selectedRows: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -283,6 +284,7 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.selectedRows = selection
|
||||
this.ids = selection.map(item => item.stockId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
@@ -340,8 +342,10 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取选中的完整数据
|
||||
const selectedData = this.managementList.filter(item => this.ids.includes(item.stockId));
|
||||
// 获取选中的完整数据(优先使用表格当前选中行,避免被全量数据干扰)
|
||||
const selectedData = this.selectedRows && this.selectedRows.length
|
||||
? this.selectedRows
|
||||
: this.managementList.filter(item => this.ids.map(id => String(id)).includes(String(item.stockId)))
|
||||
this.selectedStockData = selectedData;
|
||||
this.selectedTotalQuantity = selectedData.reduce((sum, row) => {
|
||||
const q = parseFloat(row.quantity)
|
||||
@@ -365,7 +369,9 @@ export default {
|
||||
this.$modal.msgError('请选择一条库存进行出库')
|
||||
return
|
||||
}
|
||||
const selectedRow = this.managementList.find(item => item.stockId === this.ids[0])
|
||||
const selectedRow = (this.selectedStockData && this.selectedStockData.length)
|
||||
? this.selectedStockData[0]
|
||||
: this.managementList.find(item => String(item.stockId) === String(this.ids[0]))
|
||||
if (!selectedRow) {
|
||||
this.$modal.msgError('未找到选中库存数据')
|
||||
return
|
||||
@@ -381,8 +387,11 @@ export default {
|
||||
return
|
||||
}
|
||||
const groupCodingNo = selectedRow.groupCodingNo
|
||||
console.log('指定货位出库:', groupCodingNo, outQty)
|
||||
pointOut(groupCodingNo, outQty).then(response => {
|
||||
if (!groupCodingNo) {
|
||||
this.$modal.msgError('选中数据缺少通道编码,无法出库')
|
||||
return
|
||||
}
|
||||
pointOut({ groupCodingNo: groupCodingNo, outQuantity: outQty }).then(response => {
|
||||
this.$modal.msgSuccess(response.msg)
|
||||
this.getList()
|
||||
this.exitDialogVisible = false
|
||||
|
||||
Reference in New Issue
Block a user