rev:刻字包装任务/工序/工单merge
This commit is contained in:
@@ -106,7 +106,7 @@ import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
|
||||
const defaultForm = { dict_id: null, name: null, label: null, value: null, dictSort: null, dictType: null, para1: null, para2: null, para3: null, createId: null, createName: null, createTime: null, updateId: null, updateName: null, updateTime: null }
|
||||
const defaultForm = { dict_id: null, name: null, label: null, value: null, dict_sort: null, dict_type: null, para1: null, para2: null, para3: null, create_id: null, create_name: null, create_time: null, update_id: null, update_name: null, update_time: null }
|
||||
|
||||
export default {
|
||||
components: { pagination, rrOperation, udOperation },
|
||||
|
||||
@@ -86,14 +86,14 @@ import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
|
||||
const defaultForm = { dictId: null, code: null, name: null, label: null, value: null, dictSort: null, dictType: null, para1: null, para2: null, para3: null, createId: null, createName: null, createTime: null, updateId: null, updateName: null, updateTime: null }
|
||||
const defaultForm = { dict_id: null, code: null, name: null, label: null, value: null, dict_sort: null, dict_type: null, para1: null, para2: null, para3: null, create_id: null, create_name: null, create_time: null, update_id: null, update_name: null, update_time: null }
|
||||
|
||||
export default {
|
||||
name: 'Dict',
|
||||
components: { crudOperation, pagination, rrOperation, udOperation, dictDetail },
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({ title: '字典', url: 'api/dict', idField: 'dictId', crudMethod: { ...crudDict }})
|
||||
CRUD({ title: '字典', url: 'api/dict', idField: 'dict_id', crudMethod: { ...crudDict }})
|
||||
]
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm)],
|
||||
|
||||
@@ -14,6 +14,12 @@ export function edit(data) {
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}export function setEmp(data) {
|
||||
return request({
|
||||
url: 'api/specialDevice/setEmp',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { query, edit }
|
||||
export default { query, setEmp, edit }
|
||||
|
||||
@@ -39,14 +39,55 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编号">
|
||||
<el-form-item >
|
||||
<rrOperation :permission="permission" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation v-show="false" :permission="permission" />
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="setEmpty(crud.selections)"
|
||||
>
|
||||
设置空位
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync=pointMVisible
|
||||
title="点位物料信息"
|
||||
width="540px"
|
||||
@close="materiValueCancel()"
|
||||
>
|
||||
<el-form ref="form" :model="materialForm" :rules="rules" size="mini" label-width="110px">
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="materialForm.material_code" clearable @clear="materialForm.material_code='',materialForm.material_id='',materialForm.material_spec=''" style="width: 370px">
|
||||
<el-button slot="append" icon="el-icon-plus" @click="queryMater(scope.$index, scope.row)" />
|
||||
</el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量(个)" prop="deviceinstor_qty">
|
||||
<el-input-number v-model="materialForm.deviceinstor_qty" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料重量(g)" prop="deviceinstor_weight">
|
||||
<el-input-number v-model="materialForm.deviceinstor_weight" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="materiValueCancel()">取消</el-button>
|
||||
<el-button type="primary" @click="pointMateriSubmit()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -59,27 +100,20 @@
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="product_area" label="生产车间" width="100px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="设备编码" width="100px" show-overflow-tooltip />
|
||||
<el-table-column prop="material_id" label="物料id" width="200px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.material_id">
|
||||
<el-button slot="append" icon="el-icon-plus" @click="queryMater(scope.$index, scope.row)" />
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_name" label="物料名称" width="200px" show-overflow-tooltip />
|
||||
<el-table-column prop="material_id" label="物料id" width="200px" show-overflow-tooltip />
|
||||
<el-table-column prop="material_code" label="物料编码" width="200px" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="200px" show-overflow-toolti />
|
||||
<el-table-column prop="deviceinstor_qty" label="物料数量(单位:个)" align="center" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.deviceinstor_qty" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deviceinstor_weight" label="物料重量(单位:g)" align="center" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.deviceinstor_weight" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deviceinstor_qty" label="物料数量(个)" align="center" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="deviceinstor_weight" label="物料重量(g)" align="center" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" style="margin-left: -1px;margin-right: 2px" type="text" @click="updateSKMaterial(scope.row)">提交修改</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
slot="left"
|
||||
@click="toEditMaterial(scope.row)">
|
||||
修改
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -98,13 +132,13 @@
|
||||
|
||||
<script>
|
||||
import crudDevice from '@/views/wms/device_manage/deviceMaterial/deviceMaterial.js'
|
||||
import CRUD, { presenter, header, form } from '@crud/crud'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
|
||||
const defaultForm = { product_area: 'A1', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
|
||||
const defaultForm = { product_area: 'A1', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null,material_code: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
|
||||
|
||||
export default {
|
||||
name: 'SKdevice',
|
||||
@@ -112,14 +146,21 @@ export default {
|
||||
dicts: ['product_area'],
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({ title: '深坑设备物料', url: 'api/specialDevice/query', query: { product_area: 'A1', workprocedure_id: '1535144552481034240' }, idField: 'device_code', crudMethod: { ...crudDevice }})
|
||||
CRUD({ title: '深坑设备物料', url: 'api/specialDevice/query', query: { product_area: 'A1', workprocedure_id: '1535144552481034240' }, idField: 'device_code', crudMethod: { ...crudDevice },
|
||||
optShow: {add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true}})
|
||||
]
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm)],
|
||||
mixins: [presenter(), header(), form(defaultForm),crud()],
|
||||
data() {
|
||||
return {
|
||||
materType: '',
|
||||
materialShow: false,
|
||||
pointMVisible: false,
|
||||
materialForm:{},
|
||||
queryTypeOptions: [
|
||||
{ key: 'name', display_name: '字典名称' },
|
||||
{ key: 'description', display_name: '描述' }
|
||||
@@ -130,19 +171,52 @@ export default {
|
||||
]
|
||||
},
|
||||
permission: {
|
||||
add: ['admin', 'dict:add'],
|
||||
edit: ['admin', 'dict:edit'],
|
||||
del: ['admin', 'dict:del']
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setEmpty(rows) {
|
||||
var points = []
|
||||
rows.forEach((item) => {
|
||||
points.push(item.device_code)
|
||||
})
|
||||
crudDevice.setEmp(points).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.materiValueCancel()
|
||||
this.crud.refresh()
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
toEditMaterial(row) {
|
||||
this.pointMVisible = true
|
||||
this.materialForm = JSON.parse(JSON.stringify(row))
|
||||
},
|
||||
setMaterValue(row) {
|
||||
this.nowrow.material_id = row.material_id
|
||||
this.nowrow.material_code = row.material_code
|
||||
this.nowrow.material_name = row.material_name
|
||||
this.nowrow.material_spec = row.material_spec
|
||||
this.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||
this.materialForm.material_id = row.material_id
|
||||
this.materialForm.material_code = row.material_code
|
||||
this.materialForm.material_name = row.material_name
|
||||
this.materialForm.material_spec = row.material_spec // 通过splice 替换数据 触发视图更新
|
||||
},
|
||||
materiValueCancel(){
|
||||
this.materialForm = {}
|
||||
this.dialogVisible = false
|
||||
this.pointMVisible = false
|
||||
},
|
||||
materiCancel(){
|
||||
this.materialForm.material_id = ""
|
||||
this.materialForm.material_code = ""
|
||||
this.materialForm.material_name = ""
|
||||
},
|
||||
pointMateriSubmit(){
|
||||
console.log(this.materialForm)
|
||||
crudDevice.edit(this.materialForm).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.materiValueCancel()
|
||||
this.crud.refresh()
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
queryMater(index, row) {
|
||||
this.materialShow = true
|
||||
|
||||
@@ -199,6 +199,17 @@
|
||||
>
|
||||
取消下发
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="is_disopen(crud.selections)"
|
||||
@click="openstart(crud.selections)"
|
||||
>
|
||||
开工
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -348,23 +359,16 @@
|
||||
<el-input v-model="form.sale_id" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否搬运" prop="is_needmove">
|
||||
<el-radio
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
:key="item.id"
|
||||
v-model="form.is_needmove"
|
||||
:label="item.value"
|
||||
>{{ item.label }}
|
||||
</el-radio>
|
||||
<el-select
|
||||
v-model="form.is_needmove" style="width: 200px" >
|
||||
<el-option v-for="item in trueorfalse" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="允许修改报工数量" prop="is_canupdate_update">
|
||||
<el-radio
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
:key="item.id"
|
||||
v-model="form.is_canupdate_update"
|
||||
:label="item.value"
|
||||
>{{ item.label }}
|
||||
</el-radio>
|
||||
<el-form-item label="修改报工数" prop="is_canupdate_update">
|
||||
<el-select
|
||||
v-model="form.is_canupdate_update" style="width: 200px" >
|
||||
<el-option v-for="item in trueorfalse" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="是否启用封箱线" prop="is_used_fxx">
|
||||
<el-radio
|
||||
@@ -375,41 +379,42 @@
|
||||
>{{ item.label }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="是否翻转" prop="is_foreward">
|
||||
<el-radio
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
:key="item.id"
|
||||
v-model="form.package_ext.is_foreward"
|
||||
:label="item.value"
|
||||
>{{ item.label }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="包装模版" prop="package_model">
|
||||
<el-input-number
|
||||
v-model="form.package_ext.package_model"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
@focus="materialShow=true"
|
||||
@clear="form.material_id='',form.material_code='',form.material_name='',form.material_spec=''"
|
||||
/>
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="拆箱数量" prop="demol_num">
|
||||
<el-input-number
|
||||
v-model="form.package_ext.demol_num"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
@focus="materialShow=true"
|
||||
@clear="form.material_id='',form.material_code='',form.material_name='',form.material_spec=''"
|
||||
/>
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="总袋量" prop="bag_num">
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="总袋量" prop="order_bag_num">
|
||||
<el-input-number
|
||||
v-model="form.package_ext.bag_num"
|
||||
v-model="form.package_ext.order_bag_num"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
@focus="materialShow=true"
|
||||
@clear="form.material_id='',form.material_code='',form.material_name='',form.material_spec=''"
|
||||
/>
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="码盘模版" prop="stack_model">
|
||||
<el-input-number
|
||||
v-model="form.package_ext.stack_model"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
@focus="materialShow=true"
|
||||
@clear="form.material_id='',form.material_code='',form.material_name='',form.material_spec=''"
|
||||
/>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -548,11 +553,12 @@ import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import AddDialog from '@/views/wms/product_manage/workorder/AddDialog'
|
||||
import UploadDialog from '@/views/wms/product_manage/workorder/UploadDialog'
|
||||
import ReplaceDeviceDialog from '@/views/wms/product_manage/workorder/ReplaceDeviceDialog'
|
||||
import {openStart} from "./produceshiftorder";
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
workorder_code: null,
|
||||
shift_type_scode: null,
|
||||
shift_type_scode: "1",
|
||||
workprocedure_id: null,
|
||||
product_area: 'A1',
|
||||
plan_qty: null,
|
||||
@@ -570,10 +576,10 @@ const defaultForm = {
|
||||
realproduceend_date: null,
|
||||
device_code: null,
|
||||
current_produce_person_id: null,
|
||||
is_canupdate_update: null,
|
||||
is_canupdate_update: true,
|
||||
package_ext: {},
|
||||
workorder_status: null,
|
||||
is_needmove: null,
|
||||
is_needmove: true,
|
||||
sale_id: null,
|
||||
create_type: null,
|
||||
is_error: null,
|
||||
@@ -624,6 +630,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trueorfalse: [ { value: true, label: '是' }, { value: false, label: '否' }],
|
||||
deviceList: [],
|
||||
classes3: [],
|
||||
materType: '01',
|
||||
@@ -712,12 +719,12 @@ export default {
|
||||
const year = d.getFullYear()
|
||||
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||
if (val === '02') {
|
||||
if (val === '2') {
|
||||
this.form.planproducestart_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||
const day1 = d.getDate() < 10 ? '0' + (d.getDate() + 1) : d.getDate() + 1
|
||||
this.form.planproduceend_date = [year, month, day1].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||
}
|
||||
if (val === '01') {
|
||||
if (val === '1') {
|
||||
this.form.planproducestart_date = [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||
this.form.planproduceend_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||
}
|
||||
@@ -850,6 +857,18 @@ export default {
|
||||
return true
|
||||
}
|
||||
},
|
||||
is_disopen(rows) {
|
||||
var length = rows.length
|
||||
if (length === 1 ) {
|
||||
if (rows[0].workorder_status==='2'){
|
||||
return false
|
||||
}else {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
@@ -907,6 +926,12 @@ export default {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
openstart(rows) {
|
||||
crudProduceshiftorder.openStart(rows[0]).then(res => {
|
||||
this.crud.notify('开工成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.addShow = true
|
||||
},
|
||||
@@ -918,11 +943,22 @@ export default {
|
||||
},
|
||||
[CRUD.HOOK.beforeToAdd]() {
|
||||
this.initDataPlan()
|
||||
},
|
||||
[CRUD.HOOK.beforeToEdit]() {
|
||||
console.log(this.form.package_ext)
|
||||
console.log(this.form)
|
||||
if (this.form.package_ext != null && JSON.stringify(this.form.package_ext).length>3){
|
||||
this.form.package_ext = JSON.parse(this.form.package_ext)
|
||||
}
|
||||
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
if (JSON.stringify(this.form.package_ext).length>3){
|
||||
this.form.package_ext = JSON.stringify(this.form.package_ext)
|
||||
}else {
|
||||
this.form.package_ext = ''
|
||||
}
|
||||
}
|
||||
// [CRUD.HOOK.afterToEdit]() {
|
||||
// const editForm1 = JSON.parse(JSON.stringify(this.form))
|
||||
// this.getNotWorkDeviceByWorkproceduceId(editForm1.workprocedure_id)
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -161,12 +161,12 @@
|
||||
<el-table-column v-if="false" prop="task_status" label="任务状态" />
|
||||
<el-table-column prop="task_status_name" label="任务状态" width="120px" :formatter="formatTaskStatusName" />
|
||||
<el-table-column prop="point_code1" label="起点" :min-width="flexWidth('point_code1',crud.data,'起点')" />
|
||||
<el-table-column prop="point_code2" label="终点" :min-width="flexWidth('point_code2',crud.data,'终点')" />
|
||||
<el-table-column prop="point_code3" label="返回点" :min-width="flexWidth('point_code3',crud.data,'返回点')" />
|
||||
<el-table-column prop="point_code2" label="倒料点" :min-width="flexWidth('point_code2',crud.data,'终点')" />
|
||||
<el-table-column prop="point_code3" label="终点" :min-width="flexWidth('point_code3',crud.data,'返回点')" />
|
||||
<el-table-column prop="product_area" label="生产车间" />
|
||||
<el-table-column prop="point1_region_name" label="起点区域" width="120" />
|
||||
<el-table-column prop="point2_region_name" label="终点区域" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="point3_region_name" label="返回点区域" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="point2_region_name" label="倒料点区域" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="point3_region_name" label="终点区域" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_code" label="载具编码1" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_code2" label="载具编码2" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_type" label="载具类型" min-width="100" show-overflow-tooltip>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<!--托盘物料-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync=dialogVisible
|
||||
@@ -88,32 +88,70 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="materiValueCancel()">取消</el-button>
|
||||
<el-button type="primary" @click="materiValueSubmit()">确认</el-button>
|
||||
<el-button type="primary" @click="pointMateriSubmit()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--点位物料-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync=pointMVisible
|
||||
title="点位物料信息"
|
||||
width="540px"
|
||||
@close="materiValueCancel()"
|
||||
>
|
||||
<el-form ref="form" :model="materialForm" :rules="rules" size="mini" label-width="110px">
|
||||
<el-form-item label="载具编码" prop="vehicle_code">
|
||||
<el-input v-model="materialForm.point_code" disabled style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="materialForm.material_code" clearable @clear="materialForm.material_code='',materialForm.material_id='',materialForm.material_name='',materialForm.material_spec=''" style="width: 370px">
|
||||
<el-button slot="append" icon="el-icon-plus" @click="queryMater(scope.$index, scope.row)" />
|
||||
</el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量" prop="storage_qty">
|
||||
<el-input v-model="materialForm.qty" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="锁定类型" prop="lock_type">
|
||||
<el-select
|
||||
v-model="materialForm.lock_type"
|
||||
size="mini"
|
||||
placeholder="锁定类型"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.d_lock_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位状态" prop="point_status">
|
||||
<el-select
|
||||
v-model="materialForm.point_status"
|
||||
size="mini"
|
||||
placeholder="锁定类型"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="materiValueCancel()">取消</el-button>
|
||||
<el-button type="primary" @click="pointMateriSubmit()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- <el-dialog-->
|
||||
<!-- :close-on-click-modal="false"-->
|
||||
<!-- :before-close="crud.cancelCU"-->
|
||||
<!-- :visible.sync="crud.status.cu > 0"-->
|
||||
<!-- :title="crud.status.title"-->
|
||||
<!-- width="710px"-->
|
||||
<!-- >-->
|
||||
<!-- <el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="120px">-->
|
||||
<!-- <el-form-item label="载具编码">-->
|
||||
<!-- <el-input v-model="form.vehicle_code" style="width: 200px;" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="点位状态">-->
|
||||
<!-- <el-input v-model="form.point_status" style="width: 200px;" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="锁定状态">-->
|
||||
<!-- <el-input v-model="form.lock_type" style="width: 200px;" />-->
|
||||
<!-- </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"
|
||||
@@ -143,6 +181,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_spec" label="物料规格" />
|
||||
<el-table-column prop="qty" label="数量" />
|
||||
<el-table-column prop="remark" label="备注" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="is_used" label="是否启用">
|
||||
<template slot-scope="scope">
|
||||
@@ -151,20 +190,16 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="update_name" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||
<!-- <el-table-column-->
|
||||
<!-- v-permission="[]"-->
|
||||
<!-- label="操作"-->
|
||||
<!-- fixed="right"-->
|
||||
<!-- width="120px"-->
|
||||
<!-- align="center"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <udOperation-->
|
||||
<!-- :data="scope.row"-->
|
||||
<!-- :permission="permission"-->
|
||||
<!-- />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column v-permission="[]" label="操作" width="100px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
slot="left"
|
||||
@click="toEditMaterial(scope.row)">
|
||||
修改
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
@@ -182,7 +217,7 @@
|
||||
|
||||
<script>
|
||||
import crudDevice from '@/views/wms/staging_manage/staging/kzStaging/kzStaging.js'
|
||||
import CRUD, { presenter, header, form } from '@crud/crud'
|
||||
import CRUD, { crud,presenter, header, form } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
@@ -199,19 +234,26 @@ const defaultForm = { product_area: 'A1', region_code: 'A1_KZHC', workprocedure_
|
||||
export default {
|
||||
name: 'SKdevice',
|
||||
components: { crudOperation, pagination, udOperation, rrOperation, ViewDialog, MaterDtl },
|
||||
dicts: ['product_area'],
|
||||
dicts: ['product_area','d_lock_type','point_status'],
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({ title: '刻字缓存区', url: 'api/point/queryVehicle', query: { product_area: 'A1', region_code: 'A1_KZHC' }, idField: 'device_code', crudMethod: { ...crudDevice }})
|
||||
CRUD({ title: '刻字缓存区', url: 'api/point/queryVehicle', query: { product_area: 'A1', region_code: 'A1_KZHC' }, idField: 'device_code', crudMethod: { ...crudDevice },optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}})
|
||||
]
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm)],
|
||||
mixins: [presenter(), header(), form(defaultForm),crud()],
|
||||
data() {
|
||||
return {
|
||||
materialForm:{},
|
||||
materType:'',
|
||||
materialShow: false,
|
||||
dialogVisible: false,
|
||||
pointMVisible: false,
|
||||
queryTypeOptions: [
|
||||
{ key: 'name', display_name: '字典名称' },
|
||||
{ key: 'description', display_name: '描述' }
|
||||
@@ -226,17 +268,18 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
setEmpty(rows) {
|
||||
var structIds = []
|
||||
console.log(rows)
|
||||
var points = []
|
||||
rows.forEach((item) => {
|
||||
structIds.push(item.workorder_id)
|
||||
points.push(item.point_id)
|
||||
})
|
||||
alert(structIds)
|
||||
// crudProduceshiftorder.submits(orders).then(res => {
|
||||
// this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
// this.crud.toQuery()
|
||||
// })
|
||||
}, // 取消下发
|
||||
crudDevice.setEmp(points).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.materiValueCancel()
|
||||
this.crud.refresh()
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
setMaterValue(row) {
|
||||
this.materialForm.material_id = row.material_id
|
||||
this.materialForm.material_code = row.material_code
|
||||
@@ -251,6 +294,7 @@ export default {
|
||||
materiValueCancel(){
|
||||
this.materialForm = {}
|
||||
this.dialogVisible = false
|
||||
this.pointMVisible = false
|
||||
},
|
||||
materiValueSubmit(){
|
||||
console.log(this.materialForm)
|
||||
@@ -262,12 +306,25 @@ export default {
|
||||
|
||||
})
|
||||
},
|
||||
pointMateriSubmit(){
|
||||
crudDevice.edit(this.materialForm).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.materiValueCancel()
|
||||
this.crud.refresh()
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
toView(row) {
|
||||
crudStoragevehicleinfo.vehileInfo(row).then(data => {
|
||||
this.dialogVisible = true
|
||||
this.materialForm = data
|
||||
})
|
||||
},
|
||||
toEditMaterial(row) {
|
||||
this.pointMVisible = true
|
||||
this.materialForm = row
|
||||
},
|
||||
toViewOption(row) {
|
||||
if (row) {
|
||||
this.$refs.viewDialog.setParentData(row)
|
||||
|
||||
@@ -66,5 +66,12 @@ export function vehileInfo(data) {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function setEmp(data) {
|
||||
return request({
|
||||
url: 'api/point/setEmp',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, findPoints, getPoint, getRegion, changeUsed, vehileInfo }
|
||||
export default { add, edit, del, changeActive, setEmp, getPoint, getRegion, changeUsed, vehileInfo }
|
||||
|
||||
Reference in New Issue
Block a user