rev:新增原材料盘点、损溢;老车间包装

This commit is contained in:
2023-05-26 16:24:02 +08:00
parent 1ce759c718
commit 40ec3496ff
37 changed files with 1299 additions and 378 deletions

View File

@@ -101,12 +101,11 @@
slot="right"
class="filter-item"
type="success"
icon="el-icon-position"
size="mini"
:disabled="confirm_flag"
@click="startWork()"
icon="el-icon-check"
@click="save"
>
开工
保存
</el-button>
<el-button
slot="right"
@@ -118,6 +117,17 @@
>
打印
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-position"
size="mini"
:disabled="confirm_flag"
@click="startWork()"
>
开工
</el-button>
</crudOperation>
<!--表单组件-->
@@ -402,7 +412,7 @@ export default {
query: {
workorder_status: '2',
product_area: 'A2',
workprocedure_code: 'BZ',
workprocedure_code: 'A1_BZ',
is_error: '0'
},
url: 'api/produceWorkorder',
@@ -431,46 +441,7 @@ export default {
roadList: ['1', '2', '3', '4', '5', '6', '7'],
confirm_flag: true,
permission: {},
rules: {
struct_id: [
{required: true, message: '仓位标识不能为空', trigger: 'blur'}
],
struct_code: [
{required: true, message: '仓位编码不能为空', trigger: 'blur'}
],
struct_name: [
{required: true, message: '仓位名称不能为空', trigger: 'blur'}
],
sect_id: [
{required: true, message: '库区标识不能为空', trigger: 'blur'}
],
stor_id: [
{required: true, message: '仓库标识不能为空', trigger: 'blur'}
],
capacity: [
{required: false, message: '不能为空', trigger: 'blur'},
{validator: numberOne}
],
weight: [
{required: false, message: '不能为空', trigger: 'blur'},
{validator: numberOne}
],
width: [
{required: false, message: '不能为空', trigger: 'blur'},
{validator: numberOne}
],
height: [
{required: false, message: '不能为空', trigger: 'blur'},
{validator: numberOne}
],
zdepth: [
{required: false, message: '不能为空', trigger: 'blur'},
{validator: numberOne}
],
material_height_type: [
{required: true, message: '物料高度类型不能为空', trigger: 'blur'}
]
}
rules: {}
}
},
created() {
@@ -542,10 +513,10 @@ export default {
this.currentRow.extra_map.package_qty = Math.ceil(this.currentRow.plan_qty / this.currentRow.extra_map.one_package_qty)
this.currentRow.extra_map.box_num = Math.ceil(this.currentRow.extra_map.package_qty / this.currentRow.extra_map.one_box_package_qty)
orderExt.add(this.currentRow).then(res => {
this.notify('操作成功', 'success')
})
crudProduceshiftorder.openStart(this.currentRow).then(res => {
})
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
},
sectQueryChange(val) {
if (val.length === 1) {
@@ -562,12 +533,35 @@ export default {
}
this.crud.toQuery()
},
save() {
if (!this.crud.query.one_box_package_qty || !this.crud.query.one_package_qty || !this.crud.query.box_type ||
!this.crud.query.target_roadway || !this.crud.query.is_flip ||
!this.crud.query.tray_full_num) {
this.crud.notify('缺少开工必要参数,保证输入框内不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.currentRow.workorder_code) {
this.crud.notify('请选择一条工单记录进行保存', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.currentRow.extra_map = this.crud.query
this.currentRow.extra_map.package_qty = Math.ceil(this.currentRow.plan_qty / this.currentRow.extra_map.one_package_qty)
this.currentRow.extra_map.box_num = Math.ceil(this.currentRow.extra_map.package_qty / this.currentRow.extra_map.one_box_package_qty)
orderExt.add(this.currentRow).then(res => {
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
print() {
if (!this.currentRow) {
debugger
if (!this.currentRow.workorder_code) {
this.crud.notify('请选择一条工单记录进行打印', CRUD.NOTIFICATION_TYPE.INFO)
return
}
orderExt.getExtList(this.currentRow).then(res => {
debugger
if (res.length == 0 || !res) {
this.crud.notify('该工单需要打印的箱数为0', CRUD.NOTIFICATION_TYPE.INFO)
return
}
res.forEach((item) => {
const LODOP = getLodop()
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮