代码更新
This commit is contained in:
35
mes/qd/src/api/wms/st/vehiclebill/inemptyvehicl.js
Normal file
35
mes/qd/src/api/wms/st/vehiclebill/inemptyvehicl.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/inemptyvehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/inemptyvehicle/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/inemptyvehicle',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function createTask(data) {
|
||||
return request({
|
||||
url: 'api/inemptyvehicle/createTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, createTask }
|
||||
35
mes/qd/src/api/wms/st/vehiclebill/outemptyvehicl.js
Normal file
35
mes/qd/src/api/wms/st/vehiclebill/outemptyvehicl.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/outemptyvehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/outemptyvehicle/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/outemptyvehicle',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function createTask(data) {
|
||||
return request({
|
||||
url: 'api/outemptyvehicle/createTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, createTask }
|
||||
@@ -238,7 +238,7 @@
|
||||
<el-table-column prop="inv_code" label="锁定单据编码" width="130" />
|
||||
<el-table-column prop="inv_type" label="锁定单据类型" width="110" :formatter="invtypeFormat" />
|
||||
<el-table-column prop="vehicle_qty" label="载具数量" />
|
||||
<el-table-column prop="update_by" label="修改者" />
|
||||
<el-table-column prop="update_optname" label="修改者" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||
<el-table-column
|
||||
v-permission="[]"
|
||||
|
||||
202
mes/qd/src/views/wms/st/vehiclebill/PointDialog.vue
Normal file
202
mes/qd/src/views/wms/st/vehiclebill/PointDialog.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="请选择点位"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-row style="margin-bottom: 10px;">
|
||||
<el-col :span="22">
|
||||
<el-form :inline="true" class="demo-form-inline">
|
||||
<el-form-item :inline="true" label="模糊搜索:">
|
||||
<el-input v-model="query.search" placeholder="请输入点位编码或名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属区域" prop="region_id">
|
||||
<el-select
|
||||
v-model="query.region_id"
|
||||
placeholder="请选择"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reginoList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
border
|
||||
:cell-style="{'text-align':'center'}"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="point_code" label="终点点位编码" show-overflow-tooltip />
|
||||
<el-table-column prop="point_name" label="终点点位名称" show-overflow-tooltip />
|
||||
<el-table-column prop="region_name" label="所属区域" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_qty" label="载具数量" show-overflow-tooltip :formatter="formatQty" />
|
||||
<el-table-column prop="point_type" label="点位类型">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sch_point_type[scope.row.point_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudPoint from '@/api/wms/sch/point'
|
||||
|
||||
export default {
|
||||
name: 'EndPointDialog',
|
||||
components: { rrOperation, pagination },
|
||||
dicts: ['sch_area_type', 'sch_point_type'],
|
||||
cruds() {
|
||||
return CRUD({ title: '点位', url: 'api/point/selectPoint', crudMethod: { ...crudPoint }, optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
openParam: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {
|
||||
search: ''
|
||||
},
|
||||
tableRadio: '',
|
||||
tableData: [],
|
||||
reginoList: [],
|
||||
dialogVisible: false,
|
||||
material: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudPoint.getRegion().then(res => {
|
||||
this.reginoList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
open() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged2', this.tableRadio)
|
||||
return
|
||||
}
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先选择终点点位')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged2', this.rows)
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
formatQty(row) {
|
||||
debugger
|
||||
if (row.vehicle_qty === '') {
|
||||
return '0'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.el-table_body tr.current-row>td {
|
||||
background-color: #e9e500;
|
||||
}
|
||||
</style>
|
||||
217
mes/qd/src/views/wms/st/vehiclebill/in/index.vue
Normal file
217
mes/qd/src/views/wms/st/vehiclebill/in/index.vue
Normal file
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<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-input
|
||||
v-model="query.bill_code"
|
||||
clearable
|
||||
placeholder="单据编号"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:loading="loading"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="createTask"
|
||||
>
|
||||
生成任务
|
||||
</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="mini" label-width="100px">
|
||||
<el-form-item label="数量:" prop="vehicle_qty">
|
||||
<el-input v-model="form.vehicle_qty" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="起始点位:" prop="start_point_code">
|
||||
<el-input v-model="form.start_point_name" style="width: 370px;" @focus="openStartPonit" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下一点位:">
|
||||
<el-input v-model="form.next_point_name" style="width: 370px;" @focus="openEndPonit" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:">
|
||||
<el-input v-model="form.remark" type="textarea" style="width: 370px;" />
|
||||
</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="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="record_uuid" label="记录标识" />
|
||||
<el-table-column prop="bill_code" label="单据编号" show-overflow-tooltip />
|
||||
<el-table-column prop="bill_status" label="单据状态">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.st_bill_status[scope.row.bill_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="start_point_code" label="起始点位" />
|
||||
<el-table-column prop="next_point_code" label="下一点位" />
|
||||
<el-table-column prop="start_region_name" label="起始区域" />
|
||||
<el-table-column prop="endt_region_name" label="终点区域" />
|
||||
<el-table-column prop="vehicle_qty" label="数量" />
|
||||
<el-table-column prop="task_uuid" label="任务标识" show-overflow-tooltip/>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<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 v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<PointDialog :dialog-show.sync="pointDialog" @tableChanged2="tableChanged2" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudInemptyvehicl from '@/api/wms/st/vehiclebill/inemptyvehicl'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import PointDialog from '@/views/wms/st/vehiclebill/PointDialog'
|
||||
|
||||
const defaultForm = {
|
||||
record_uuid: null,
|
||||
bill_code: null,
|
||||
io_type: null,
|
||||
bill_status: null,
|
||||
vehicle_qty: null,
|
||||
start_point_code: null,
|
||||
next_point_code: null,
|
||||
start_point_name: null,
|
||||
next_point_name: null,
|
||||
start_region_id: null,
|
||||
end_region_id: null,
|
||||
task_uuid: null,
|
||||
remark: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
is_delete: null
|
||||
}
|
||||
export default {
|
||||
name: 'Inemptyvehicle',
|
||||
dicts: ['st_bill_status'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, PointDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '空载具入库',
|
||||
url: 'api/inemptyvehicle',
|
||||
idField: 'record_uuid',
|
||||
sort: 'record_uuid,desc',
|
||||
crudMethod: { ...crudInemptyvehicl },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pointDialog: false,
|
||||
is_startAndEnd: null,
|
||||
loading: false,
|
||||
permission: {},
|
||||
rules: {
|
||||
vehicle_qty: [
|
||||
{ required: true, message: '数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_point_code: [
|
||||
{ required: true, message: '起始点位不能为空', trigger: 'blur' }
|
||||
],
|
||||
next_point_code: [
|
||||
{ required: true, message: '终点点位不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
openStartPonit() {
|
||||
// 1代表起始点位 2代表终点点位
|
||||
this.is_startAndEnd = '1'
|
||||
this.pointDialog = true
|
||||
},
|
||||
openEndPonit() {
|
||||
// 1代表起始点位 2代表终点点位
|
||||
this.is_startAndEnd = '2'
|
||||
this.pointDialog = true
|
||||
},
|
||||
tableChanged2(row) {
|
||||
if (this.is_startAndEnd === '1') {
|
||||
this.form.start_point_code = row.point_code
|
||||
this.form.start_point_name = row.point_name
|
||||
}
|
||||
if (this.is_startAndEnd === '2') {
|
||||
this.form.next_point_code = row.point_code
|
||||
this.form.next_point_name = row.point_name
|
||||
}
|
||||
},
|
||||
createTask() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (_selectData[0].bill_status !== '10') {
|
||||
return this.crud.notify('只能对生成状态的单据生成任务', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = _selectData[0]
|
||||
this.loading = true
|
||||
crudInemptyvehicl.createTask(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.loading = false
|
||||
}).cache(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
217
mes/qd/src/views/wms/st/vehiclebill/out/index.vue
Normal file
217
mes/qd/src/views/wms/st/vehiclebill/out/index.vue
Normal file
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<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-input
|
||||
v-model="query.bill_code"
|
||||
clearable
|
||||
placeholder="单据编号"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:loading="loading"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="createTask"
|
||||
>
|
||||
生成任务
|
||||
</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="mini" label-width="100px">
|
||||
<el-form-item label="数量:" prop="vehicle_qty">
|
||||
<el-input v-model="form.vehicle_qty" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="起始点位:">
|
||||
<el-input v-model="form.start_point_name" style="width: 370px;" @focus="openStartPonit" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下一点位:" prop="next_point_code">
|
||||
<el-input v-model="form.next_point_name" style="width: 370px;" @focus="openEndPonit" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:">
|
||||
<el-input v-model="form.remark" type="textarea" style="width: 370px;" />
|
||||
</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="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="record_uuid" label="记录标识" />
|
||||
<el-table-column prop="bill_code" label="单据编号" show-overflow-tooltip />
|
||||
<el-table-column prop="bill_status" label="单据状态">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.st_bill_status[scope.row.bill_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="start_point_code" label="起始点位" />
|
||||
<el-table-column prop="next_point_code" label="下一点位" />
|
||||
<el-table-column prop="start_region_name" label="起始区域" />
|
||||
<el-table-column prop="endt_region_name" label="终点区域" />
|
||||
<el-table-column prop="vehicle_qty" label="数量" />
|
||||
<el-table-column prop="task_uuid" label="任务标识" show-overflow-tooltip/>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<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 v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<PointDialog :dialog-show.sync="pointDialog" @tableChanged2="tableChanged2" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudOutemptyvehicl from '@/api/wms/st/vehiclebill/outemptyvehicl'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import PointDialog from '@/views/wms/st/vehiclebill/PointDialog'
|
||||
|
||||
const defaultForm = {
|
||||
record_uuid: null,
|
||||
bill_code: null,
|
||||
io_type: null,
|
||||
bill_status: null,
|
||||
vehicle_qty: null,
|
||||
start_point_code: null,
|
||||
next_point_code: null,
|
||||
start_point_name: null,
|
||||
next_point_name: null,
|
||||
start_region_id: null,
|
||||
end_region_id: null,
|
||||
task_uuid: null,
|
||||
remark: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
is_delete: null
|
||||
}
|
||||
export default {
|
||||
name: 'Outemptyvehicle',
|
||||
dicts: ['st_bill_status'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, PointDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '空载具出库',
|
||||
url: 'api/outemptyvehicle',
|
||||
idField: 'record_uuid',
|
||||
sort: 'record_uuid,desc',
|
||||
crudMethod: { ...crudOutemptyvehicl },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pointDialog: false,
|
||||
is_startAndEnd: null,
|
||||
loading: false,
|
||||
permission: {},
|
||||
rules: {
|
||||
vehicle_qty: [
|
||||
{ required: true, message: '数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_point_code: [
|
||||
{ required: true, message: '起始点位不能为空', trigger: 'blur' }
|
||||
],
|
||||
next_point_code: [
|
||||
{ required: true, message: '终点点位不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
openStartPonit() {
|
||||
// 1代表起始点位 2代表终点点位
|
||||
this.is_startAndEnd = '1'
|
||||
this.pointDialog = true
|
||||
},
|
||||
openEndPonit() {
|
||||
// 1代表起始点位 2代表终点点位
|
||||
this.is_startAndEnd = '2'
|
||||
this.pointDialog = true
|
||||
},
|
||||
tableChanged2(row) {
|
||||
if (this.is_startAndEnd === '1') {
|
||||
this.form.start_point_code = row.point_code
|
||||
this.form.start_point_name = row.point_name
|
||||
}
|
||||
if (this.is_startAndEnd === '2') {
|
||||
this.form.next_point_code = row.point_code
|
||||
this.form.next_point_name = row.point_name
|
||||
}
|
||||
},
|
||||
createTask() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (_selectData[0].bill_status !== '10') {
|
||||
return this.crud.notify('只能对生成状态的单据生成任务', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = _selectData[0]
|
||||
this.loading = true
|
||||
crudOutemptyvehicl.createTask(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.loading = false
|
||||
}).cache(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user