|
|
@ -309,8 +309,34 @@ |
|
|
|
|
|
|
|
|
<!-- 添加物料弹窗(显示已有标签列表)--> |
|
|
<!-- 添加物料弹窗(显示已有标签列表)--> |
|
|
<el-dialog :title="'添加物料 - ' + (addMaterialRow ? addMaterialRow.countNo : '')" :visible.sync="addMaterialDialogVisible" width="1000px" :close-on-click-modal="false" v-drag> |
|
|
<el-dialog :title="'添加物料 - ' + (addMaterialRow ? addMaterialRow.countNo : '')" :visible.sync="addMaterialDialogVisible" width="1000px" :close-on-click-modal="false" v-drag> |
|
|
<div style="margin-bottom: 10px;"> |
|
|
|
|
|
<el-button type="primary" size="small" @click="showMaterialQueryDialog">添加物料</el-button> |
|
|
|
|
|
|
|
|
<div style="margin-bottom: 10px; display: flex; align-items: center; gap: 15px;"> |
|
|
|
|
|
<el-button type="primary" size="small" @click="showMaterialQueryDialog">选择物料</el-button> |
|
|
|
|
|
<!-- 一键物料操作 - rqrq --> |
|
|
|
|
|
<div style="display: flex; align-items: center; gap: 5px;"> |
|
|
|
|
|
<span style="font-size: 12px; color: #606266;">一键物料操作:</span> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="quickMaterialPartNo" |
|
|
|
|
|
placeholder="输入物料号回车" |
|
|
|
|
|
clearable |
|
|
|
|
|
ref="part" |
|
|
|
|
|
size="small" |
|
|
|
|
|
style="width: 150px;" |
|
|
|
|
|
@keyup.enter.native="handleQuickMaterialAction" |
|
|
|
|
|
:disabled="quickMaterialLoading"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
<el-select v-model="quickMaterialAction" size="small" style="width: 80px;"> |
|
|
|
|
|
<el-option label="添加" value="add"></el-option> |
|
|
|
|
|
<el-option label="删除" value="delete"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
<el-button |
|
|
|
|
|
:type="quickMaterialAction === 'add' ? 'success' : 'danger'" |
|
|
|
|
|
size="small" |
|
|
|
|
|
@click="handleQuickMaterialAction" |
|
|
|
|
|
:loading="quickMaterialLoading" |
|
|
|
|
|
:disabled="quickMaterialLoading || !quickMaterialPartNo"> |
|
|
|
|
|
{{ quickMaterialLoading ? '处理中...' : (quickMaterialAction === 'add' ? '添加' : '删除') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 当前标签列表表格 - rqrq --> |
|
|
<!-- 当前标签列表表格 - rqrq --> |
|
|
<el-table :data="currentLabelList" :height="350" border v-loading="currentLabelListLoading" style="width: 100%;"> |
|
|
<el-table :data="currentLabelList" :height="350" border v-loading="currentLabelListLoading" style="width: 100%;"> |
|
|
@ -377,7 +403,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { searchCountHeaderList, createCycleCount, createManualCount, queryMaterialForManualCount, addMaterialToCount, releaseCount, pushCountToWcs, completeCount, cancelCount, deleteCount, searchCountLabelList, searchCountPalletList, searchCountResultList, searchMaterialSummary, searchOrderTaskByCountNo, searchOrderTaskDetail, getSysIfCount, updateSysIfCount, queryAdjustmentTransList, queryAdjustmentTransSubList } from '@/api/check/physicalInventory' |
|
|
|
|
|
|
|
|
import { searchCountHeaderList, createCycleCount, createManualCount, queryMaterialForManualCount, addMaterialToCount, quickAddMaterialByPartNo, deleteMaterialByPartNo, releaseCount, pushCountToWcs, completeCount, cancelCount, deleteCount, searchCountLabelList, searchCountPalletList, searchCountResultList, searchMaterialSummary, searchOrderTaskByCountNo, searchOrderTaskDetail, getSysIfCount, updateSysIfCount, queryAdjustmentTransList, queryAdjustmentTransSubList } from '@/api/check/physicalInventory' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'searchPhysicalInventory', |
|
|
name: 'searchPhysicalInventory', |
|
|
@ -527,6 +553,11 @@ export default { |
|
|
currentLabelList: [], |
|
|
currentLabelList: [], |
|
|
currentLabelListLoading: false, |
|
|
currentLabelListLoading: false, |
|
|
|
|
|
|
|
|
|
|
|
// 一键物料操作 - rqrq |
|
|
|
|
|
quickMaterialPartNo: '', |
|
|
|
|
|
quickMaterialAction: 'add', // add-添加 delete-删除 |
|
|
|
|
|
quickMaterialLoading: false, |
|
|
|
|
|
|
|
|
// 当前标签列表列配置 - rqrq |
|
|
// 当前标签列表列配置 - rqrq |
|
|
currentLabelColumnList: [ |
|
|
currentLabelColumnList: [ |
|
|
{ columnProp: "unitId", headerAlign: "center", align: "center", columnLabel: "标签号", columnWidth: 150, columnSortable: false, showOverflowTooltip: true, fixed: "" }, |
|
|
{ columnProp: "unitId", headerAlign: "center", align: "center", columnLabel: "标签号", columnWidth: 150, columnSortable: false, showOverflowTooltip: true, fixed: "" }, |
|
|
@ -1003,6 +1034,86 @@ export default { |
|
|
this.materialQueryDialogVisible = true |
|
|
this.materialQueryDialogVisible = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 一键物料操作处理 - rqrq |
|
|
|
|
|
handleQuickMaterialAction() { |
|
|
|
|
|
if (!this.quickMaterialPartNo) { |
|
|
|
|
|
this.$message.warning('请输入物料号') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.addMaterialRow) return |
|
|
|
|
|
|
|
|
|
|
|
const partNo = this.quickMaterialPartNo.trim() |
|
|
|
|
|
|
|
|
|
|
|
if (this.quickMaterialAction === 'add') { |
|
|
|
|
|
// 一键添加物料 - rqrq |
|
|
|
|
|
// this.$confirm(`确认添加物料 ${partNo} 的所有标签到盘点单?`, '提示', { |
|
|
|
|
|
// confirmButtonText: '确定', |
|
|
|
|
|
// cancelButtonText: '取消', |
|
|
|
|
|
// type: 'info' |
|
|
|
|
|
// }).then(() => { |
|
|
|
|
|
this.quickMaterialLoading = true |
|
|
|
|
|
const params = { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
countNo: this.addMaterialRow.countNo, |
|
|
|
|
|
searchPartNo: partNo, |
|
|
|
|
|
username: this.$store.state.user.name |
|
|
|
|
|
} |
|
|
|
|
|
quickAddMaterialByPartNo(params).then(({ data }) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success('添加成功,新增 ' + data.result + ' 个标签') |
|
|
|
|
|
this.quickMaterialPartNo = '' |
|
|
|
|
|
this.loadCurrentLabelList() |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.$refs.part.focus(); |
|
|
|
|
|
}, 50); |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg || '添加失败', '提示', { type: 'error' }) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.$alert('网络错误', '错误', { confirmButtonText: '确定' }) |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
this.quickMaterialLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
// }).catch(() => {}) |
|
|
|
|
|
} else { |
|
|
|
|
|
// 一键删除物料 - rqrq |
|
|
|
|
|
// this.$confirm(`确认删除物料 ${partNo} 的所有标签?此操作不可恢复!`, '警告', { |
|
|
|
|
|
// confirmButtonText: '确定', |
|
|
|
|
|
// cancelButtonText: '取消', |
|
|
|
|
|
// type: 'warning' |
|
|
|
|
|
// }).then(() => { |
|
|
|
|
|
this.quickMaterialLoading = true |
|
|
|
|
|
const params = { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
countNo: this.addMaterialRow.countNo, |
|
|
|
|
|
searchPartNo: partNo |
|
|
|
|
|
} |
|
|
|
|
|
deleteMaterialByPartNo(params).then(({ data }) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success('删除成功,已删除 ' + data.result + ' 个标签') |
|
|
|
|
|
this.quickMaterialPartNo = '' |
|
|
|
|
|
this.loadCurrentLabelList() |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.$refs.part.focus(); |
|
|
|
|
|
}, 50); |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg || '删除失败', '提示', { type: 'error' }) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.$alert('网络错误', '错误', { confirmButtonText: '确定' }) |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
this.quickMaterialLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
// }).catch(() => {}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 查询物料 - rqrq |
|
|
// 查询物料 - rqrq |
|
|
queryMaterialForAdd() { |
|
|
queryMaterialForAdd() { |
|
|
if (!this.materialQueryForm.searchPartNo) { |
|
|
if (!this.materialQueryForm.searchPartNo) { |
|
|
|