add: mes对接、日志优化
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-loading.fullscreen.lock="fullscreenLoading" class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
@@ -38,7 +38,18 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission" >
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="synchronize()"
|
||||
>
|
||||
同步
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
@@ -156,6 +167,7 @@ export default {
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
fullscreenLoading: false,
|
||||
workShopList: []
|
||||
}
|
||||
},
|
||||
@@ -167,6 +179,15 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
synchronize() {
|
||||
this.fullscreenLoading = true
|
||||
crudMdBaseMaterial.synchronize(this.crud.query).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
getWorkShopList() { // 获取车间列表
|
||||
crudMdBaseWorkShop.getWorkShopList().then(res => {
|
||||
this.workShopList = res
|
||||
|
||||
@@ -24,4 +24,12 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export function synchronize(data) {
|
||||
return request({
|
||||
url: 'api/mdBaseMaterial/synchronize',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, synchronize }
|
||||
|
||||
@@ -75,7 +75,7 @@ const defaultForm = {
|
||||
current_point: null
|
||||
}
|
||||
export default {
|
||||
name: 'PdmBdMudConsumption',
|
||||
name: 'MudConsumption',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -72,6 +72,16 @@
|
||||
>
|
||||
开工
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="synchronize()"
|
||||
>
|
||||
同步
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -357,7 +367,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPdmBdWorkorder from './pdmBdWorkorder'
|
||||
import crudPdmBdWorkorder, { orderSynchronize } from './pdmBdWorkorder'
|
||||
import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
|
||||
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
@@ -368,6 +378,7 @@ import pagination from '@crud/Pagination'
|
||||
import crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop'
|
||||
import MaterialDialog from '@/views/wms/sch/group/MaterialDialog.vue'
|
||||
import item from '@/layout/components/Sidebar/Item.vue'
|
||||
import crudMdBaseMaterial from '@/views/wms/basedata/material/mdBaseMaterial'
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
@@ -532,6 +543,15 @@ export default {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
synchronize() {
|
||||
this.fullscreenLoading = true
|
||||
crudPdmBdWorkorder.orderSynchronize(this.crud.query).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import request from '@/utils/request'
|
||||
import { synchronize } from '@/views/wms/basedata/material/mdBaseMaterial'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
@@ -32,4 +33,12 @@ export function submits(param) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, submits }
|
||||
export function orderSynchronize(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdWorkorder/synchronize',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, submits, orderSynchronize }
|
||||
|
||||
@@ -49,8 +49,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="workorder_code" label="工单编号" width="120px"/>
|
||||
<el-table-column v-if="false" prop="material_id" label="物料标识" />
|
||||
<el-table-column prop="workshop_code" label="所属车间" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="half_material_code" label="半成品" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="raw_material_code" label="配方" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="update_name" label="修改人" />
|
||||
|
||||
@@ -107,7 +107,6 @@
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.point_code }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="form.point_code" style="width: 240px;" />-->
|
||||
</el-form-item>
|
||||
<el-form-item label="点位名称">
|
||||
<el-input v-model="form.point_name" style="width: 240px;" disabled/>
|
||||
@@ -192,6 +191,39 @@
|
||||
<!--<el-form-item label="是否首个流程任务">
|
||||
<el-input v-model="form.is_first_flow_task" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="绑定状态">
|
||||
<el-select
|
||||
v-model="form.group_bind_material_status"
|
||||
size="mini"
|
||||
placeholder="绑定状态"
|
||||
class="filter-item"
|
||||
style="width: 240px;"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.group_bind_material_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具类型">
|
||||
<el-select
|
||||
v-model="form.vehicle_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 240px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.vehicle_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程编码">
|
||||
<el-input v-model="form.flow_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
@@ -296,6 +328,7 @@ import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
vehicle_code: null,
|
||||
vehicle_type: null,
|
||||
material_id: null,
|
||||
child_vehicle_code: null,
|
||||
source_vehicle_code: null,
|
||||
@@ -330,7 +363,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'VehicleMaterialGroup',
|
||||
dicts: ['group_status', 'group_bind_material_status'],
|
||||
dicts: ['group_status', 'group_bind_material_status', 'vehicle_type'],
|
||||
components: { WorkOrderDialog, MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -403,6 +436,7 @@ export default {
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_spec = row.material_spec
|
||||
this.form.material_code = row.material_code
|
||||
this.form.redundance_material_code = row.raw_material_code
|
||||
if (this.choose === '工单') {
|
||||
this.form.workorder_code = row.workorder_code
|
||||
}
|
||||
@@ -412,6 +446,7 @@ export default {
|
||||
this.form.material_id = null
|
||||
this.form.material_spec = null
|
||||
this.form.material_code = null
|
||||
this.form.redundance_material_code = null
|
||||
},
|
||||
setPointName(data) {
|
||||
var point = this.pointList.find(item => item.point_code === data)
|
||||
|
||||
Reference in New Issue
Block a user