删多余代码
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/produceshiftorder',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/produceshiftorder/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/produceshiftorder',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function finishd(data) {
|
||||
return request({
|
||||
url: 'api/produceshiftorder/finishd',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function synchron() {
|
||||
return request({
|
||||
url: 'api/produceshiftorder/synchron',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, finishd, synchron }
|
||||
@@ -43,8 +43,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备驱动" prop="driver_code">
|
||||
<el-select
|
||||
filterable
|
||||
v-model="form.driver_code"
|
||||
filterable
|
||||
placeholder=""
|
||||
@change="changeDriver"
|
||||
>
|
||||
@@ -75,54 +75,25 @@ import { get, selectDriverCodeList } from '@/api/acs/device/driverConfig'
|
||||
import { getDicts } from '@/api/system/dict'
|
||||
import standard_inspect_site from './driver/standard_inspect_site'
|
||||
import standard_ordinary_site from './driver/standard_ordinary_site'
|
||||
import weighing_site from './driver/weighing_site'
|
||||
import machines_site from './driver/machines_site'
|
||||
import lamp_three_color from './driver/lamp_three_color'
|
||||
import standard_autodoor from './driver/standard_autodoor'
|
||||
import standard_emptypallet_site from './driver/standard_emptypallet_site'
|
||||
import standard_manipulator_inspect_site from './driver/standard_manipulator_inspect_site'
|
||||
import standard_special_inspect_site from './driver/standard_special_inspect_site'
|
||||
import special_ordinary_site from './driver/special_ordinary_site'
|
||||
import standard_storage from '@/views/acs/device/driver/standard_storage'
|
||||
import standard_scanner from '@/views/acs/device/driver/standard_scanner'
|
||||
import standard_conveyor_control_with_scanner from '@/views/acs/device/driver/standard_conveyor_control_with_scanner'
|
||||
import standard_conveyor_control_with_plcscanner from '@/views/acs/device/driver/standard_conveyor_control_with_plcscanner'
|
||||
import standard_conveyor_control from '@/views/acs/device/driver/standard_conveyor_control'
|
||||
import standard_conveyor_monitor from '@/views/acs/device/driver/standard_conveyor_monitor'
|
||||
import non_line_manipulator_inspect_site from '@/views/acs/device/driver/non_line_manipulator_inspect_site'
|
||||
import non_line_inspect_site from '@/views/acs/device/driver/non_line_inspect_site'
|
||||
import manipulator_inspect_site_NDC from '@/views/acs/device/driver/manipulator_inspect_site_NDC'
|
||||
import standard_manipulator_stacking_site from '@/views/acs/device/driver/standard_manipulator_stacking_site'
|
||||
import standard_photoelectric_inspect_site from '@/views/acs/device/driver/standard_photoelectric_inspect_site'
|
||||
|
||||
import hailiang_special_pick_station from '@/views/acs/device/driver/hailiang_one/hailiang_special_pick_station'
|
||||
import hailiang_special_empty_station from '@/views/acs/device/driver/hailiang_one/hailiang_special_empty_station'
|
||||
import hailiang_special_full_station from '@/views/acs/device/driver/hailiang_one/hailiang_special_full_station'
|
||||
import hailiang_special_pour_station from '@/views/acs/device/driver/hailiang_one/hailiang_special_pour_station'
|
||||
import hailiang_special_device from '@/views/acs/device/driver/hailiang_one/hailiang_special_device'
|
||||
import hailiang_engraving_machine from '@/views/acs/device/driver/hailiang_one/hailiang_engraving_machine'
|
||||
import hailiang_engraving_cache from '@/views/acs/device/driver/hailiang_one/hailiang_engraving_cache'
|
||||
import hailiang_packer_station from '@/views/acs/device/driver/hailiang_one/hailiang_packer_station'
|
||||
import hailiang_auto_cache_line from '@/views/acs/device/driver/hailiang_one/hailiang_auto_cache_line'
|
||||
import hailiang_cleaning_feeding_line from '@/views/acs/device/driver/hailiang_one/hailiang_cleaning_feeding_line'
|
||||
import hailiang_cleaning_machine from '@/views/acs/device/driver/hailiang_one/hailiang_cleaning_machine'
|
||||
import hailiang_cleaning_machine_storage_station from '@/views/acs/device/driver/hailiang_one/hailiang_cleaning_machine_storage_station'
|
||||
import agv_ndc_one from '@/views/acs/device/driver/agv/agv_ndc_one'
|
||||
import agv_ndc_two from '@/views/acs/device/driver/agv/agv_ndc_two'
|
||||
import hailiang_xj_plc_test from '@/views/acs/device/driver/hailiang_one/hailiang_xj_plc_test'
|
||||
import hailiang_smart_plc_test from '@/views/acs/device/driver/hailiang_one/hailiang_smart_plc_test'
|
||||
|
||||
export default {
|
||||
name: 'DeviceConfig',
|
||||
components: { standard_ordinary_site, standard_inspect_site, standard_autodoor,
|
||||
standard_emptypallet_site, standard_manipulator_inspect_site, standard_special_inspect_site,
|
||||
lamp_three_color, standard_storage, special_ordinary_site, standard_scanner, standard_conveyor_control_with_scanner,
|
||||
standard_conveyor_control_with_plcscanner, standard_conveyor_control, standard_conveyor_monitor, weighing_site, machines_site, non_line_manipulator_inspect_site,
|
||||
non_line_inspect_site, manipulator_inspect_site_NDC, standard_manipulator_stacking_site,
|
||||
standard_photoelectric_inspect_site, agv_ndc_two, agv_ndc_one, hailiang_packer_station, hailiang_engraving_cache,
|
||||
hailiang_special_pick_station, hailiang_special_empty_station, hailiang_special_full_station, hailiang_special_pour_station, hailiang_special_device,
|
||||
hailiang_engraving_machine, hailiang_auto_cache_line, hailiang_cleaning_feeding_line, hailiang_cleaning_machine, hailiang_cleaning_machine_storage_station,
|
||||
hailiang_xj_plc_test, hailiang_smart_plc_test },
|
||||
components: {
|
||||
standard_ordinary_site,
|
||||
standard_inspect_site,
|
||||
standard_storage,
|
||||
standard_scanner,
|
||||
standard_conveyor_control_with_scanner,
|
||||
standard_conveyor_control,
|
||||
standard_conveyor_monitor,
|
||||
hailiang_smart_plc_test
|
||||
},
|
||||
dicts: ['device_type'],
|
||||
mixins: [crud],
|
||||
data() {
|
||||
|
||||
@@ -1,215 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="is_disabled(crud.selections.length, crud.selections[0])"
|
||||
@click="finishd(crud.selections[0])"
|
||||
>
|
||||
强制完成
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="synchron()"
|
||||
>
|
||||
同步
|
||||
</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="550px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="120px">
|
||||
<el-form-item label="生产总量" prop="qty">
|
||||
<el-input v-model="form.qty" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<el-input v-model="form.material_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input v-model="form.material_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号">
|
||||
<el-input v-model="form.material_spec" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编号" prop="device_code">
|
||||
<el-select
|
||||
v-model="form.device_code"
|
||||
filterable
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 370px"
|
||||
>
|
||||
<el-option v-for="item in deviceList" :key="item.device_code" :label="item.device_code" :value="item.device_code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否agv搬运" prop="is_needmove">
|
||||
<el-radio-group v-model="form.is_needmove" size="mini">
|
||||
<el-radio-button label="1">是</el-radio-button>
|
||||
<el-radio-button label="0">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="small"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="order_code" label="工单编码" />
|
||||
<el-table-column prop="order_status" label="工单状态">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.order_status[scope.row.order_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="qty" label="下料数量" />
|
||||
<el-table-column prop="device_code" label="设备编号" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="material_code" label="物料编码" />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="规格型号" />
|
||||
<el-table-column prop="one_qty" label="每箱接料数量" />
|
||||
<el-table-column prop="is_needmove" label="是否AGV搬运" />
|
||||
<el-table-column prop="create_by" label="创建者" />
|
||||
<el-table-column prop="create_time" label="创建时间" min-width="150" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudProduceshiftorder from '@/api/acs/order/produceshiftorder'
|
||||
import deviceCrud from '@/api/acs/device/device'
|
||||
|
||||
const defaultForm = {
|
||||
order_id: null,
|
||||
order_code: null,
|
||||
order_status: null,
|
||||
qty: null,
|
||||
material_code: null,
|
||||
material_name: null,
|
||||
material_uuid: null,
|
||||
material_spec: null,
|
||||
create_by: null,
|
||||
create_time: null,
|
||||
update_by: null,
|
||||
update_time: null,
|
||||
is_deleted: null,
|
||||
ext_order_id: null,
|
||||
device_code: null,
|
||||
is_needmove: '1'
|
||||
}
|
||||
export default {
|
||||
name: 'Produceshiftorder',
|
||||
dicts: ['order_status'],
|
||||
components: { pagination, crudOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '工单信息',
|
||||
url: 'api/produceshiftorder',
|
||||
idField: 'order_id',
|
||||
sort: 'order_id,desc',
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: true,
|
||||
reset: false
|
||||
},
|
||||
crudMethod: { ...crudProduceshiftorder }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
deviceList: [],
|
||||
permission: {
|
||||
add: ['admin', 'produceshiftorder:add'],
|
||||
edit: ['admin', 'produceshiftorder:edit'],
|
||||
del: ['admin', 'produceshiftorder:del']
|
||||
},
|
||||
rules: {
|
||||
order_code: [
|
||||
{ required: true, message: '工单编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
order_status: [
|
||||
{ required: true, message: '工单状态不能为空', trigger: 'blur' }
|
||||
],
|
||||
qty: [
|
||||
{ required: true, message: '生产总量不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_code: [
|
||||
{ required: true, message: '物料编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
device_code: [
|
||||
{ required: true, message: '设备编号不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
deviceCrud.selectDeviceList().then(data => {
|
||||
this.deviceList = data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
is_disabled(length, data) {
|
||||
if (length !== 1) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
finishd(data) {
|
||||
crudProduceshiftorder.finishd({ data: data }).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
synchron() {
|
||||
crudProduceshiftorder.synchron().then(res => {
|
||||
this.crud.notify('同步成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user