小接口
This commit is contained in:
@@ -32,6 +32,14 @@ export function changeActive(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function changeIsWorkDevice(data) {
|
||||
return request({
|
||||
url: 'api/device/changeIsWorkDevice',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDevice() {
|
||||
return request({
|
||||
url: 'api/device/getDevice',
|
||||
|
||||
@@ -107,4 +107,12 @@ export function issued(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getMaterial, getDevice, getProduceline, getCust, getWorkprocedure, excelImport, getDevice1, copyAdd, sortUpdate, mandFinish, issued }
|
||||
export function getVehicleType(data) {
|
||||
return request({
|
||||
url: 'api/producetask/getVehicleType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getMaterial, getDevice, getProduceline, getCust, getWorkprocedure, excelImport, getDevice1, copyAdd, sortUpdate, mandFinish, issued, getVehicleType }
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<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="small" label-width="80px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px">
|
||||
<el-form-item label="设备编码" prop="device_code">
|
||||
<el-input v-model="form.device_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
@@ -45,6 +45,10 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否工单设备">
|
||||
<el-radio v-model="form.is_work_device" label="0">否</el-radio>
|
||||
<el-radio v-model="form.is_work_device" label="1">是</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
@@ -76,6 +80,16 @@
|
||||
<el-table-column prop="create_time" label="创建时间" width="150px" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="150px" />
|
||||
<el-table-column prop="is_work_device" label="是否工单设备" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
:value="format_is_work_device(scope.row.is_work_device)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeIsWorkDevice(scope.row, scope.row.is_work_device)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-permission="['admin','device:edit','device:del']" label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
@@ -97,15 +111,15 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudDevice, { changeActive } from '@/api/wms/pdm/device'
|
||||
import crudDevice, { changeActive, changeIsWorkDevice } from '@/api/wms/pdm/device'
|
||||
import crudWorkprocedure from '@/api/wms/pdm/workprocedure'
|
||||
|
||||
const defaultForm = { device_id: null, device_code: null, device_name: null, device_type: null, workprocedure_id: null, is_used: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, ext_id: null }
|
||||
const defaultForm = { device_id: null, device_code: null, device_name: null, device_type: null, workprocedure_id: null, is_used: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, ext_id: null, is_work_device: '0' }
|
||||
export default {
|
||||
name: 'Device',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['is_used', 'pdm_device_type'],
|
||||
dicts: ['is_used', 'pdm_device_type', 'is_work_device'],
|
||||
cruds() {
|
||||
return CRUD({ title: '生产设备信息', url: 'api/device', idField: 'device_id', sort: 'device_id,desc', optShow: { add: true, edit: true, del: true, download: false, reset: true }, crudMethod: { ...crudDevice }})
|
||||
},
|
||||
@@ -152,6 +166,9 @@ export default {
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
},
|
||||
format_is_work_device(is_work_device) {
|
||||
return is_work_device === '1'
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
let msg = '此操作将停用,是否继续!'
|
||||
if (val !== '1') {
|
||||
@@ -170,6 +187,25 @@ export default {
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
changeIsWorkDevice(data, val) {
|
||||
let msg = '此操作将停用,是否继续!'
|
||||
if (val !== '1') {
|
||||
msg = '此操作将启用,是否继续!'
|
||||
}
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
changeIsWorkDevice(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
data.is_work_device = !data.is_work_device
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
`````<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
@@ -133,7 +133,7 @@
|
||||
<el-input v-model="form.material_name" style="width: 200px;" @focus="getMater" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="device_id">
|
||||
<el-select v-model="form.device_id" filterable clearable style="width: 200px" placeholder="请选择设备">
|
||||
<el-select v-model="form.device_id" filterable clearable style="width: 200px" placeholder="请选择设备" @change="getVehicleType()">
|
||||
<el-option
|
||||
v-for="item in deviceList1"
|
||||
:key="item.device_id"
|
||||
@@ -166,7 +166,7 @@
|
||||
<el-input-number v-model="form.seq_no" controls-position="right" style="width: 200px;text-align: left" :min="1" />
|
||||
<!-- <el-input-number v-model="form.seq_no" :precision="0" :step="10" :min="0" style="width: 200px;" />-->
|
||||
</el-form-item>
|
||||
<el-form-item label="静置时间" prop="stewing_time">
|
||||
<el-form-item label="静置时间" prop="stewing_time" :rules="isHLJ ? [{ required: true, message: '混料机的静置时间不能为空', trigger: 'blur' }] : [{ required: false }]">
|
||||
<el-input v-model="form.stewing_time" :rows="3" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="型号" prop="model">
|
||||
@@ -204,7 +204,7 @@
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.MD_EVEHICLE_TYPE"
|
||||
v-for="item in vehicleTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -308,7 +308,7 @@ import CopyDialog from '@/views/wms/pdm/produceTask/CopyDialog'
|
||||
import SortDialog from '@/views/wms/pdm/produceTask/SortDialog'
|
||||
import MaterDialog from './MaterDialog.vue'
|
||||
|
||||
const defaultForm = { producetask_id: null, producetask_code: null, producetask_status: null, material_id: null, material_name: null, device_id: null, produceline_id: null, cust_id: null, seq_no: null, plan_qty: null, real_qty: null, plan_start_time: null, real_start_time: null, plan_end_time: null, real_end_time: null, producetask_finish_type: null, stand_hour: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, model: null, molten_pool: null, is_package: '0' }
|
||||
const defaultForm = { producetask_id: null, producetask_code: null, producetask_status: null, material_id: null, material_name: null, device_id: null, produceline_id: null, cust_id: null, seq_no: null, plan_qty: null, real_qty: null, plan_start_time: null, real_start_time: null, plan_end_time: null, real_end_time: null, producetask_finish_type: null, stand_hour: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, model: null, molten_pool: null, stewing_time: null, is_package: '0' }
|
||||
export default {
|
||||
name: 'Producetask',
|
||||
dicts: ['PRODUCETASK_STATUS', 'PRODUCETASK_STATUS_TYPE', 'MD_EVEHICLE_TYPE'],
|
||||
@@ -338,6 +338,8 @@ export default {
|
||||
currentRow: null,
|
||||
materDialog: false,
|
||||
materType: '',
|
||||
vehicleTypeList: [],
|
||||
isHLJ: false,
|
||||
rules: {
|
||||
device_id: [
|
||||
{ required: true, message: '设备标识不能为空', trigger: 'blur' }
|
||||
@@ -375,6 +377,7 @@ export default {
|
||||
this.getMaterial()
|
||||
this.getWorkprocedure()
|
||||
this.getDevice1()
|
||||
this.getVehicleType()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
@@ -505,6 +508,17 @@ export default {
|
||||
console.log(row)
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_name = row.material_name
|
||||
},
|
||||
getVehicleType() {
|
||||
if (this.form.vehicle_type) {
|
||||
this.form.vehicle_type = null
|
||||
}
|
||||
const data = { device_id: this.form.device_id }
|
||||
crudProducetask.getVehicleType(data).then(res => {
|
||||
console.log(res)
|
||||
this.vehicleTypeList = res.vehicleTypeList
|
||||
this.isHLJ = res.isHLJ
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,11 +147,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="start_area_name" label="起始区域" width="95" show-overflow-tooltip />
|
||||
<el-table-column prop="start_point_code" label="起点编码" width="110px" />
|
||||
<el-table-column prop="start_point_name" label="起点名称" width="105px" show-overflow-tooltip />
|
||||
<el-table-column prop="start_point_code" label="起点编码" width="120px" />
|
||||
<el-table-column prop="start_point_name" label="起点名称" width="135px" show-overflow-tooltip />
|
||||
<el-table-column prop="next_area_name" label="下一区域" width="95" show-overflow-tooltip />
|
||||
<el-table-column prop="next_point_code" label="终点编码" width="110px" />
|
||||
<el-table-column prop="next_point_name" label="终点名称" width="105px" show-overflow-tooltip />
|
||||
<el-table-column prop="next_point_code" label="终点编码" width="120px" />
|
||||
<el-table-column prop="next_point_name" label="终点名称" width="135px" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_code" label="载具编码" width="80px" />
|
||||
<el-table-column v-if="false" prop="finished_type" label="任务完成类型" width="120px">
|
||||
<template slot-scope="scope">
|
||||
@@ -159,6 +159,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="120" />
|
||||
<el-table-column prop="is_auto_issue" label="是否自动下发" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.is_auto_issue[scope.row.is_auto_issue] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" width="150px" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
@@ -239,7 +244,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Task',
|
||||
dicts: ['task_status', 'sch_acs_task_type', 'sch_task_type', 'task_finished_type'],
|
||||
dicts: ['task_status', 'sch_acs_task_type', 'sch_task_type', 'task_finished_type', 'is_auto_issue'],
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<el-table ref="table" v-loading="crud.loading" :cell-style="{'text-align':'center'}" :header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="struct_code" label="仓位编码" />
|
||||
<el-table-column prop="struct_name" label="仓位名称" width="100" />
|
||||
<el-table-column prop="struct_name" label="仓位名称" width="120" />
|
||||
<el-table-column prop="sect_name" label="库区" width="120" />
|
||||
<el-table-column prop="stor_name" label="仓库" />
|
||||
<el-table-column v-if="false" prop="disrule_type" label="分配规则类型" width="100">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
>
|
||||
<el-table-column type="selection" width="45" />
|
||||
<el-table-column :show-overflow-tooltip="true" prop="struct_code" width="95" label="仓位编码" />
|
||||
<el-table-column :show-overflow-tooltip="true" prop="struct_name" width="100" label="仓位名称" />
|
||||
<el-table-column :show-overflow-tooltip="true" prop="struct_name" width="120" label="仓位名称" />
|
||||
<el-table-column :show-overflow-tooltip="true" prop="sect_name" width="100" label="所属库区" />
|
||||
<el-table-column :show-overflow-tooltip="true" prop="stor_name" width="100" label="所属仓库" />
|
||||
<el-table-column v-permission="['admin','dict:edit','dict:del']" label="操作" width="130px" align="center" fixed="right">
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<el-table ref="table" v-loading="crud.loading" :header-cell-style="{'text-align':'center'}" :cell-style="{'text-align':'center'}" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="struct_code" label="仓位编码" />
|
||||
<el-table-column prop="struct_name" label="仓位名称" width="110" />
|
||||
<el-table-column prop="struct_name" label="仓位名称" width="120" />
|
||||
<el-table-column prop="vehicle_type" label="载具类型" width="270">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.is_edit=='0'">{{ scope.row.vehicle_type_name }}</span>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
{{ dict.label.st_bill_status[scope.row.bill_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="start_point_name" label="起始点位" width="120" />
|
||||
<el-table-column prop="start_point_name" label="起始点位" width="130" />
|
||||
<el-table-column prop="next_point_name" label="下一点位" width="130" />
|
||||
<el-table-column prop="start_area" label="起始区域">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<el-table-column v-if="false" prop="struct_id" label="仓位标识" />
|
||||
<el-table-column prop="sect_name" label="所属库区" width="120" />
|
||||
<el-table-column prop="struct_code" label="仓位编码" />
|
||||
<el-table-column prop="struct_name" label="仓位名称" />
|
||||
<el-table-column prop="struct_name" label="仓位名称" width="120" />
|
||||
<el-table-column prop="vehicle_code" label="载具号" />
|
||||
<el-table-column v-if="false" prop="material_id" label="物料标识" />
|
||||
<el-table-column prop="material_code" label="物料编码" />
|
||||
|
||||
Reference in New Issue
Block a user