fix: 1、来料入库 2、空载具入库 3、手工叫料 4、手工退料 5、物料组盘 6、新增 确认取货 问题修复

This commit is contained in:
zhengxuming
2025-08-19 10:26:32 +08:00
parent d6585d1684
commit ff6531e25b
16 changed files with 458 additions and 203 deletions

View File

@@ -38,6 +38,15 @@ export function getParentFormTypes() {
})
}
export function finishFormData(data) {
return request({
url: 'api/pmFormData/finish',
method: 'post',
data
})
}
export function getSonFormData(id) {
return request({
url: 'api/pmFormData/getSonFormData/' + id,

View File

@@ -100,6 +100,16 @@
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="warning"
icon="el-icon-check"
size="mini"
@click="finishForm"
>
强制完成
</el-button>
<el-button
slot="right"
class="filter-item"
@@ -235,6 +245,10 @@
v-loading="crud.loading"
lazy
:data="crud.data"
@selection-change="crud.selectionChangeHandler"
@current-change="handleCurrentChange"
@select="handleSelectionChange"
@select-all="onSelectAll"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="120" />
@@ -243,8 +257,8 @@
<el-table-column prop="material_code" label="物料编码" show-overflow-tooltip width="180" />
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="180" />
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="180" />
<el-table-column prop="qty" label="计划数量" show-overflow-tooltip />
<el-table-column prop="assign_qty" label="分配数量" show-overflow-tooltip width="120" />
<!-- <el-table-column prop="qty" label="计划数量" show-overflow-tooltip />
<el-table-column prop="assign_qty" label="分配数量" show-overflow-tooltip width="120" />-->
<el-table-column prop="actual_qty" label="处理数量" show-overflow-tooltip width="120" />
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120" />
<el-table-column prop="unit_name" label="单位" show-overflow-tooltip width="120" />
@@ -286,7 +300,7 @@
</template>
<script>
import crudFormData from './formData'
import crudFormData, { finishFormData } from './formData'
import crudSupp from '../../basedata/supp/supplierbase'
import CRUD, { crud, form, header, presenter } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation.vue'
@@ -354,6 +368,7 @@ export default {
permission: {},
materShow: false,
materOptCode: '',
currentRow: null,
rules: {
stor_id: [{ required: true, message: '请选择仓库', trigger: 'change' }],
form_type: [{ required: true, message: '请选择单据类型', trigger: 'change' }],
@@ -393,6 +408,16 @@ export default {
mounted() {
},
methods: {
finishForm() {
if (!this.currentRow) {
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
return
}
finishFormData(this.currentRow).then(res => {
this.crud.notify('单据完成成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
},
getSuppList() {
crudSupp.dropList({}).then(res => {
this.supplist = res
@@ -434,6 +459,37 @@ export default {
this.form.material_spec = row.material_spec
this.form.unit_id = row.base_unit_id
},
handleSelectionChange(val, row) {
if (val.length > 1) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(val.pop())
this.buttonChange(row)
} else if (val.length === 1) {
this.buttonChange(row)
} else {
this.handleCurrentChange(null)
}
},
onSelectAll() {
this.$refs.table.clearSelection()
this.handleCurrentChange(null)
},
buttonChange(current) {
if (current !== null) {
this.currentRow = current
}
}
,
querytable() {
this.onSelectAll()
this.crud.toQuery()
this.handleCurrentChange(null)
},
handleCurrentChange(currentRow) {
if (currentRow === null) {
this.currentRow = {}
}
},
// getFromTypes() {
// crudFormData.getParentFormTypes().then((res) => { // 获取分类名称,查询根据分类编码查找对应分支树
// this.fromTypes = res
@@ -459,4 +515,3 @@ export default {
</script>
<style scoped>
</style>