add:三线清洗功能前端

This commit is contained in:
zhangzq
2024-02-26 09:14:14 +08:00
parent 45377df88e
commit a77500f2d8
6 changed files with 1041 additions and 0 deletions

View File

@@ -0,0 +1,144 @@
<template>
<el-dialog
title="点位详情"
append-to-body
fullscreen
:visible.sync="dialogVisible"
@open="open"
@close="close"
>
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span style="font-weight: bold;font-size: 15px;">点位信息:</span>
<!-- <el-button style="float: right; padding: 3px 10px;" type="text">操作按钮</el-button>-->
</div>
<el-form ref="form" disabled :inline="true" :model="form" :rules="rules" size="mini" label-width="100px">
<el-form-item label="区域编码">
<el-input v-model="form.region_code" style="width: 200px;"/>
</el-form-item>
<el-form-item label="区域名称">
<el-input v-model="form.region_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="点位编码">
<el-input v-model="form.point_code" style="width: 200px;"/>
</el-form-item>
<el-form-item label="点位名称">
<el-input v-model="form.point_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="点位类型">
<el-input v-model="form.point_type_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="点位状态">
<el-input v-model="form.point_status_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="锁定类型">
<el-input v-model="form.lock_type_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="载具类型">
<el-input v-model="form.lock_type_name" style="width: 200px;"/>
</el-form-item>
<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.vehicle_qty" style="width: 200px;"/>
</el-form-item>
</el-form>
</el-card>
<el-card class="box-card" shadow="always">
<div slot="header" class="clearfix">
<span style="font-weight: bold;font-size: 15px;">载具物料信息:</span>
</div>
<el-form ref="form" :inline="true" :model="form2" :rules="rules" size="mini" label-width="100px">
<el-form-item label="物料编号">
<el-input v-model="form2.material_code" style="width: 200px;"/>
</el-form-item>
<el-form-item label="物料名称">
<el-input v-model="form2.material_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="物料规格">
<el-input v-model="form2.material_spec" style="width: 200px;"/>
</el-form-item>
<el-form-item label="物料批次">
<el-input v-model="form2.pcsn" style="width: 200px;"/>
</el-form-item>
<el-form-item label="物料数量">
<el-input v-model="form2.storage_qty" style="width: 200px;"/>
</el-form-item>
<el-form-item label="物料重量">
<el-input v-model="form2.weight" style="width: 200px;"/>
</el-form-item>
</el-form>
</el-card>
</el-dialog>
</template>
<script>
import { crud } from '@crud/crud'
import crudDevice from '@/views/wms/staging_manage/staging/kzStaging/kzStaging.js'
export default {
name: 'ViewDialog',
components: {},
dicts: [],
mixins: [crud()],
props: {
dialogShow: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
classes3: [],
parentData: {},
form: {},
form2: {},
workprocedureList: [],
tableData: [],
rules: {}
}
},
watch: {
dialogShow: {
handler(newValue) {
this.dialogVisible = newValue
}
}
},
methods: {
open() {
},
close() {
this.$emit('AddChanged')
},
setParentData(parentData) {
if (parentData) {
this.form = parentData
crudDevice.vehileInfo(parentData.vehicle_code).then(data => {
this.dialogVisible = true
this.form2 = data
})
}
}
}
}
</script>
<style scoped>
::v-deep .el-card__header {
padding: 5px 0 5px 10px;
background-color: #f8f8f9;
}
::v-deep .el-card__body {
padding: 10px 0 10px 0;
}
</style>

View File

@@ -0,0 +1,83 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: '/api/schConveyorPosition/create',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: '/api/schConveyorPosition/delete',
method: 'post',
data: ids
})
}
export function edit(data) {
return request({
url: '/api/schConveyorPosition/update',
method: 'post',
data
})
}
export function getLables() {
return request({
url: '/api/schConveyorPosition/label',
method: 'get',
})
}
export function findPoints(area_type) {
return request({
url: 'api/point/area_type/' + area_type
})
}
export function changeActive(data) {
return request({
url: 'api/point/changeActive',
method: 'put',
data
})
}
export function getPoint(data) {
return request({
url: '/api/point/getPoint',
method: 'post',
data
})
}
export function getRegion() {
return request({
url: '/api/point/getRegion',
method: 'get'
})
}
export function changeUsed(data) {
return request({
url: 'api/point/changeUsed',
method: 'post',
data: data
})
}
export function vehileInfo(data) {
return request({
url: 'api/storagevehicleinfo/vehicleInfo?vehicle_code='+data,
method: 'get',
})
}
export function setEmp(data) {
return request({
url: 'api/point/setEmp',
method: 'post',
data
})
}
export default { add, edit, del, getLables, changeActive, setEmp, getPoint, getRegion, changeUsed, vehileInfo }

View File

@@ -0,0 +1,244 @@
<template>
<div class="app-container">
<!--表单组件-->
<!-- 字典列表 -->
<el-card class="box-card">
<!--工具栏-->
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="90px"
label-suffix=":"
>
<el-form-item label="输送线">
<el-select
v-model="query.position_code"
class="filter-item" clearable filterable
style="width: 200px"
@change="crud.toQuery()"
>
<el-option
v-for="item in position_List"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
</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>
</div>
<!--托盘物料-->
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
title="载具物料信息"
width="540px"
@close="materiValueCancel()"
>
<el-form ref="form" :model="materialForm" size="mini" label-width="110px">
<el-form-item label="载具编码" prop="vehicle_code">
<el-input v-model="materialForm.storagevehicle_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 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.storage_qty" clearable style="width: 370px;" />
</el-form-item>
<el-form-item label="物料重量" prop="weight">
<el-input v-model="materialForm.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-dialog
:close-on-click-modal="false"
:visible.sync="pointMVisible"
title="点位物料信息"
width="540px"
@close="materiValueCancel()"
>
<el-form ref="form" :model="materialForm" 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 style="width: 370px" @clear="materialForm.material_code='',materialForm.point_status='1',materialForm.material_id='',materialForm.material_name='',materialForm.material_spec=''">
<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>
<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"
v-loading="crud.loading"
:data="crud.data"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="position_name" label="输送线名称" sortable width="120" show-overflow-tooltip>
<!-- <template slot-scope="scope">-->
<!-- <el-link type="warning" @click="toView(scope.row)">{{ scope.row.point_code }}</el-link>-->
<!-- </template>-->
</el-table-column>
<el-table-column prop="position_no" label="顺序编号" width="80" sortable show-overflow-tooltip />
<el-table-column prop="storagevehicle_code" label="载具编号" min-width="120" show-overflow-tooltip />
<el-table-column prop="materila_code" label="物料编号" min-width="120" show-overflow-tooltip />
<el-table-column prop="materila_spec" label="物料规格"/>
<el-table-column prop="qty" label="数量" />
<el-table-column prop="wrokprocedure_id" label="所属工序" min-width="100" show-overflow-tooltip /><el-table-column prop="max_no" label="输送线最大值" />
<el-table-column prop="create_time" label="创建时间" />
<el-table-column v-permission="[]" label="操作" width="100px" align="center" fixed="right">
<template slot-scope="scope">
<el-button
slot="left"
type="text"
@click="toEditMaterial(scope.row)"
>
修改
</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</el-card>
<ViewDialog ref="viewDialog" />
</div>
</template>
<script>
import crudConveyor from '@/views/wms/staging_manage/conveyor/conveyor.js'
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'
import udOperation from '@crud/UD.operation'
import ViewDialog from '@/views/wms/staging_manage/staging/kzStaging/ViewDialog'
const defaultForm = { }
export default {
name: 'conveyor',
components: { crudOperation, pagination, udOperation, rrOperation, ViewDialog },
dicts: [],
cruds() {
return [
CRUD({ title: '输送线列表', url: '/api/schConveyorPosition', query: { }, idField: 'id',sort: ['position_code,desc', 'position_no,asc'], crudMethod: { ...crudConveyor }, optShow: {
add: false,
edit: false,
del: false,
download: false,
reset: true
}, props: { size: 20 }})
]
},
mixins: [presenter(), header(), form(defaultForm), crud()],
data() {
return {
materialForm: {},
position_List: [],
materType: '01',
materialShow: false,
dialogVisible: false,
pointMVisible: false,
permission: {}
}
},
created() {
crudConveyor.getLables().then((res)=>{
this.position_List = res
})
},
methods: {
setEmpty(rows) {
var points = []
rows.forEach((item) => {
points.push(item.point_id)
})
},
setMaterValue(row) {
this.$set(this.materialForm, 'material_id', row.material_id)
this.$set(this.materialForm, 'material_code', row.material_code)
this.$set(this.materialForm, 'material_name', row.material_name)
this.$set(this.materialForm, 'material_spec', row.material_spec)
if (row.material_spec != null || row.material_spec != '') {
this.materialForm.point_status = '2'
}
},
mclearable() {
this.materialForm.material_id = ''
this.materialForm.material_code = ''
this.materialForm.material_name = ''
},
materiValueCancel() {
this.materialForm = {}
this.dialogVisible = false
this.pointMVisible = false
},
toView(row) {
},
toEditMaterial(row) {
this.pointMVisible = true
this.materialForm = row
},
toViewOption(row) {
if (row) {
this.$refs.viewDialog.setParentData(row)
}
},
queryMater(index, row) {
this.materialShow = true
this.nowindex = index
this.nowrow = row
},
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,144 @@
<template>
<el-dialog
title="点位详情"
append-to-body
fullscreen
:visible.sync="dialogVisible"
@open="open"
@close="close"
>
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span style="font-weight: bold;font-size: 15px;">点位信息:</span>
<!-- <el-button style="float: right; padding: 3px 10px;" type="text">操作按钮</el-button>-->
</div>
<el-form ref="form" disabled :inline="true" :model="form" :rules="rules" size="mini" label-width="100px">
<el-form-item label="区域编码">
<el-input v-model="form.region_code" style="width: 200px;"/>
</el-form-item>
<el-form-item label="区域名称">
<el-input v-model="form.region_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="点位编码">
<el-input v-model="form.point_code" style="width: 200px;"/>
</el-form-item>
<el-form-item label="点位名称">
<el-input v-model="form.point_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="点位类型">
<el-input v-model="form.point_type_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="点位状态">
<el-input v-model="form.point_status_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="锁定类型">
<el-input v-model="form.lock_type_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="载具类型">
<el-input v-model="form.lock_type_name" style="width: 200px;"/>
</el-form-item>
<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.vehicle_qty" style="width: 200px;"/>
</el-form-item>
</el-form>
</el-card>
<el-card class="box-card" shadow="always">
<div slot="header" class="clearfix">
<span style="font-weight: bold;font-size: 15px;">载具物料信息:</span>
</div>
<el-form ref="form" :inline="true" :model="form2" :rules="rules" size="mini" label-width="100px">
<el-form-item label="物料编号">
<el-input v-model="form2.material_code" style="width: 200px;"/>
</el-form-item>
<el-form-item label="物料名称">
<el-input v-model="form2.material_name" style="width: 200px;"/>
</el-form-item>
<el-form-item label="物料规格">
<el-input v-model="form2.material_spec" style="width: 200px;"/>
</el-form-item>
<el-form-item label="物料批次">
<el-input v-model="form2.pcsn" style="width: 200px;"/>
</el-form-item>
<el-form-item label="物料数量">
<el-input v-model="form2.storage_qty" style="width: 200px;"/>
</el-form-item>
<el-form-item label="物料重量">
<el-input v-model="form2.weight" style="width: 200px;"/>
</el-form-item>
</el-form>
</el-card>
</el-dialog>
</template>
<script>
import { crud } from '@crud/crud'
import crudDevice from '@/views/wms/staging_manage/staging/kzStaging/kzStaging.js'
export default {
name: 'ViewDialog',
components: {},
dicts: [],
mixins: [crud()],
props: {
dialogShow: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
classes3: [],
parentData: {},
form: {},
form2: {},
workprocedureList: [],
tableData: [],
rules: {}
}
},
watch: {
dialogShow: {
handler(newValue) {
this.dialogVisible = newValue
}
}
},
methods: {
open() {
},
close() {
this.$emit('AddChanged')
},
setParentData(parentData) {
if (parentData) {
this.form = parentData
crudDevice.vehileInfo(parentData.vehicle_code).then(data => {
this.dialogVisible = true
this.form2 = data
})
}
}
}
}
</script>
<style scoped>
::v-deep .el-card__header {
padding: 5px 0 5px 10px;
background-color: #f8f8f9;
}
::v-deep .el-card__body {
padding: 10px 0 10px 0;
}
</style>

View File

@@ -0,0 +1,349 @@
<template>
<div class="app-container">
<!--表单组件-->
<!-- 字典列表 -->
<el-card class="box-card">
<!--工具栏-->
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="90px"
label-suffix=":"
>
<el-form-item label="生产车间">
<el-select
v-model="form.product_area"
placeholder=""
style="width: 200px"
>
<el-option
v-for="item in dict.product_area"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备编号">
<el-input
v-model="query.search"
clearable
size="mini"
placeholder="设备编号模糊查询"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="设备编号">
<rrOperation :permission="permission" />
</el-form-item>
</el-form>
</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>
</div>
<!--托盘物料-->
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
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.storagevehicle_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 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.storage_qty" clearable style="width: 370px;" />
</el-form-item>
<el-form-item label="物料重量" prop="weight">
<el-input v-model="materialForm.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-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 style="width: 370px" @clear="materialForm.material_code='',materialForm.point_status='1',materialForm.material_id='',materialForm.material_name='',materialForm.material_spec=''">
<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-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="point_code" label="点位编码" sortable width="120" show-overflow-tooltip>
<!-- <template slot-scope="scope">-->
<!-- <el-link type="warning" @click="toView(scope.row)">{{ scope.row.point_code }}</el-link>-->
<!-- </template>-->
</el-table-column>
<el-table-column prop="point_name" label="点位名称" width="150" sortable show-overflow-tooltip />
<el-table-column prop="region_name" label="区域名称" min-width="120" show-overflow-tooltip />
<el-table-column prop="point_status" label="点位状态">
<template slot-scope="scope">
{{ scope.row.point_status == '2' ? '有料' : scope.row.point_status == '3'?'空载具':'空位' }}
</template>
</el-table-column>
<el-table-column prop="lock_type_name" label="锁定类型" />
<el-table-column prop="vehicle_code" label="载具编码" min-width="100">
<template slot-scope="scope">
<el-link type="warning" @click="toView(scope.row.vehicle_code)">{{ scope.row.vehicle_code }}</el-link>
</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">
{{ scope.row.is_used == '1' ? '是' : '否' }}
</template>
</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="操作" width="100px" align="center" fixed="right">
<template slot-scope="scope">
<el-button
slot="left"
type="text"
@click="toEditMaterial(scope.row)"
>
修改
</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<MaterDtl
:dialog-show.sync="materialShow"
:is-single="true"
:mater-opt-code="materType"
@setMaterValue="setMaterValue"
/>
<pagination />
</el-card>
<ViewDialog ref="viewDialog" />
</div>
</template>
<script>
import crudDevice from '@/views/wms/staging_manage/fhstaging/fhstaging.js'
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'
import udOperation from '@crud/UD.operation'
import ViewDialog from '@/views/wms/staging_manage/staging/kzStaging/ViewDialog'
import MaterDtl from '@/views/wms/pub/MaterDialog'
import crudStoragevehicleinfo from '@/views/wms/masterdata_manage/master/storagevehicleinfo/storagevehicleinfo'
const defaultForm = { product_area: 'A1', region_code: 'A1_KZHC', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
export default {
name: 'SKdevice',
components: { crudOperation, pagination, udOperation, rrOperation, ViewDialog, MaterDtl },
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 }, optShow: {
add: false,
edit: false,
del: false,
download: false,
reset: true
}, props: { size: 20 }})
]
},
mixins: [presenter(), header(), form(defaultForm), crud()],
data() {
return {
materialForm: {},
materType: '01',
materialShow: false,
dialogVisible: false,
pointMVisible: false,
queryTypeOptions: [
{ key: 'name', display_name: '字典名称' },
{ key: 'description', display_name: '描述' }
],
rules: {
material_spec: [
{ required: true, message: '请输入编码', trigger: 'blur' }
]
},
permission: {}
}
},
methods: {
setEmpty(rows) {
var points = []
rows.forEach((item) => {
points.push(item.point_id)
})
crudDevice.setEmp(points).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.materiValueCancel()
this.crud.refresh()
}).catch(() => {
})
},
setMaterValue(row) {
this.$set(this.materialForm, 'material_id', row.material_id)
this.$set(this.materialForm, 'material_code', row.material_code)
this.$set(this.materialForm, 'material_name', row.material_name)
this.$set(this.materialForm, 'material_spec', row.material_spec)
if (row.material_spec != null || row.material_spec != '') {
this.materialForm.point_status = '2'
}
},
mclearable() {
this.materialForm.material_id = ''
this.materialForm.material_code = ''
this.materialForm.material_name = ''
},
materiValueCancel() {
this.materialForm = {}
this.dialogVisible = false
this.pointMVisible = false
},
materiValueSubmit() {
crudStoragevehicleinfo.updateVehicleMaterial(this.materialForm).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.materiValueCancel()
this.crud.refresh()
}).catch(() => {
})
},
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)
}
},
queryMater(index, row) {
this.materialShow = true
this.nowindex = index
this.nowrow = row
},
updateSKMaterial(row) {
crudDevice.edit(row).then(() => {
this.notify('保存成功', 'success')
}).catch(() => {
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,77 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/point',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/point/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/point',
method: 'put',
data
})
}
export function findPoints(area_type) {
return request({
url: 'api/point/area_type/' + area_type
})
}
export function changeActive(data) {
return request({
url: 'api/point/changeActive',
method: 'put',
data
})
}
export function getPoint(data) {
return request({
url: '/api/point/getPoint',
method: 'post',
data
})
}
export function getRegion() {
return request({
url: '/api/point/getRegion',
method: 'get'
})
}
export function changeUsed(data) {
return request({
url: 'api/point/changeUsed',
method: 'post',
data: data
})
}
export function vehileInfo(data) {
return request({
url: 'api/storagevehicleinfo/vehicleInfo?vehicle_code='+data,
method: 'get',
})
}
export function setEmp(data) {
return request({
url: 'api/point/setEmp',
method: 'post',
data
})
}
export default { add, edit, del, changeActive, setEmp, getPoint, getRegion, changeUsed, vehileInfo }