rev:工单修改
This commit is contained in:
@@ -32,4 +32,12 @@ export function confirm(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, confirm }
|
||||
export function startBom(data) {
|
||||
return request({
|
||||
url: 'api/bomCallMaterial/startBom',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, confirm, startBom }
|
||||
|
||||
@@ -60,6 +60,17 @@
|
||||
<rrOperation />
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="startBom"
|
||||
>
|
||||
提交
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -107,6 +118,12 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机台名称" prop="device_name">
|
||||
<el-input v-model="form.device_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="叫料重量" prop="call_qty">
|
||||
<el-input-number v-model="form.call_qty" :precision="2" :controls="false" :min="1" style="width: 200px" />
|
||||
@@ -139,12 +156,14 @@
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="device_code" label="机台编码" :min-width="flexWidth('device_code',crud.data,'机台编码')" />
|
||||
<el-table-column prop="device_name" label="机台名称" :min-width="flexWidth('device_name',crud.data,'机台名称')" />
|
||||
<el-table-column prop="call_qty" label="计划叫料重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="real_qty" label="实际叫料重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="real_weigh_qty" label="实际用料重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
|
||||
<el-table-column prop="create_name" label="叫料人" :min-width="flexWidth('create_name',crud.data,'叫料人')" />
|
||||
<el-table-column prop="create_time" label="叫料时间" :min-width="flexWidth('create_time',crud.data,'叫料时间')" />
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||
<el-table-column prop="start_time" label="开始时间" :min-width="flexWidth('start_time',crud.data,'开始时间')" />
|
||||
<el-table-column prop="confirm_time" label="结束时间" :min-width="flexWidth('confirm_time',crud.data,'结束时间')" />
|
||||
<el-table-column
|
||||
v-permission="['admin','Supplierbase:edit','Supplierbase:del']"
|
||||
@@ -156,8 +175,8 @@
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:disabled-dle="scope.row.bom_status !== '1'"
|
||||
:disabled-edit="scope.row.bom_status !== '1'"
|
||||
:disabled-dle="scope.row.bom_status !== '0'"
|
||||
:disabled-edit="scope.row.bom_status !== '0'"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
@@ -188,12 +207,14 @@ const defaultForm = {
|
||||
material_id: null,
|
||||
bom_id: null,
|
||||
device_code: null,
|
||||
device_name: null,
|
||||
call_qty: null,
|
||||
real_qty: null,
|
||||
bom_status: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
start_time: null,
|
||||
confirm_time: null
|
||||
}
|
||||
export default {
|
||||
@@ -272,6 +293,17 @@ export default {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
startBom() {
|
||||
const data = this.$refs.table.selection[0]
|
||||
if (data.bom_status !== '0') {
|
||||
this.crud.notify('当前状态不为生成不允许提交!!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudCallMaterial.startBom(data).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,13 +103,13 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.task_type === '2'" label="物料编码" prop="material_code">
|
||||
<el-form-item v-if="form.task_type === '1'" label="物料编码" prop="material_code">
|
||||
<el-input v-model="form.material_code" style="width: 200px;" @change="queryMater" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.task_type === '2'" label="物料名称" prop="material_name">
|
||||
<el-form-item v-if="form.task_type === '1'" label="物料名称" prop="material_name">
|
||||
<el-input v-model="form.material_name" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -117,13 +117,13 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.task_type === '2'" label="物料规格" prop="material_spec">
|
||||
<el-form-item v-if="form.task_type === '1'" label="物料规格" prop="material_spec">
|
||||
<el-input v-model="form.material_spec" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.task_type === '2'" label="物料重量" prop="material_qty">
|
||||
<el-form-item v-if="form.task_type === '1'" label="物料重量" prop="material_qty">
|
||||
<el-input-number v-model="form.material_qty" :precision="2" :controls="false" :min="0" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
Reference in New Issue
Block a user