代码更新
This commit is contained in:
@@ -321,7 +321,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import ViewDialog from '@/views/wms/pdm/produce/ViewDialog'
|
||||
import ViewDialog from '@/views/wms/pdm/workerorder/ViewDialog'
|
||||
import DeviceDialog from '@/views/wms/pub/DeviceDialog'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -1,28 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/cppoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/cppoint/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/cppoint',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export default { add, edit, del }
|
||||
@@ -102,26 +102,27 @@
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" >
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
slot="right"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeUsed(crud.selections, 1)"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-circle-close"
|
||||
slot="right"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeUsed(crud.selections, 0)">
|
||||
@click="changeUsed(crud.selections, 0)"
|
||||
>
|
||||
禁用
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
@@ -276,12 +277,11 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
/* import checkoutbill from '@/api/wms/st/core/outbill/checkoutbill'*/
|
||||
|
||||
const defaultForm = { point_id: null, is_host: null, point_code: null, point_name: null, area_type: null, point_type: null, point_status: null, lock_type: '00', vehicle_code: null, source_id: null, remark: null, is_used: null, is_delete: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||
const defaultForm = { point_id: null, point_code: null, point_name: null, point_type: null, point_status: null, lock_type: '1', vehicle_code: null, source_id: null, remark: null, is_used: null, is_delete: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||
export default {
|
||||
name: 'Point',
|
||||
dicts: ['sch_point_type', 'vehicle_type', 'sch_area_type', 'sch_point_status', 'is_used', 'd_lock_type', 'SCH_TASK_TYPE_DTL', 'vehicle_type', 'IS_HOST', 'device_point_type'],
|
||||
dicts: ['vehicle_type', 'd_lock_type', 'SCH_TASK_TYPE_DTL', 'vehicle_type'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -342,13 +342,6 @@ export default {
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
invtypeFormat(row) {
|
||||
for (const item of this.invtypelist) {
|
||||
if (item.code === row.inv_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
},
|
||||
@@ -381,13 +374,11 @@ export default {
|
||||
getPointStatusList(id) {
|
||||
crudRegion.getPointStatusSelectById(id).then(res => {
|
||||
this.pointStatusList = res
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
getPointTypeList(id) {
|
||||
crudRegion.getPointTypeSelectById(id).then(res => {
|
||||
this.pointTypesList = res
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
changeUsed(data, flag) { // 更改启用状态
|
||||
|
||||
@@ -293,14 +293,6 @@ export default {
|
||||
}
|
||||
return ''
|
||||
},
|
||||
formatFinishTypeName(row, column) {
|
||||
for (const item of this.finishTypeList) {
|
||||
if (item.code === row.finished_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
return ''
|
||||
},
|
||||
doOperate(row, command) {
|
||||
let method_name = ''
|
||||
switch (command) {
|
||||
@@ -335,47 +327,6 @@ export default {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
beforeHandleCommand(index, row, command) {
|
||||
return {
|
||||
'index': index,
|
||||
'row': row,
|
||||
'command': command
|
||||
}
|
||||
},
|
||||
handleCommand(command) {
|
||||
let method_name = ''
|
||||
switch (command.command) {
|
||||
case 'a':// 完成
|
||||
method_name = 'forceFinish'
|
||||
break
|
||||
case 'b':// 取消
|
||||
method_name = 'cancel'
|
||||
break
|
||||
case 'c':// 拉回
|
||||
method_name = 'pullBack'
|
||||
break
|
||||
case 'd':// 下发
|
||||
method_name = 'renotifyAcs'
|
||||
break
|
||||
case 'e':// 详情
|
||||
method_name = 'view'
|
||||
break
|
||||
}
|
||||
if (method_name === 'view') {
|
||||
this.view(command.row)
|
||||
return
|
||||
}
|
||||
const data = {
|
||||
task_id: command.row.task_id,
|
||||
method_name: method_name
|
||||
}
|
||||
crudTask.operation(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
view(row) {
|
||||
this.task_id = row.task_id
|
||||
switch (row.task_type) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/ysapoint',
|
||||
url: 'api/regionio',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/ysapoint/',
|
||||
url: 'api/regionio/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function del(ids) {
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/ysapoint',
|
||||
url: 'api/regionio',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
@@ -134,7 +134,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBill from '@/api/wms/st/bill'
|
||||
import crudBill from '@/views/wms/st/bill'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -236,7 +236,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudCppoint from './cppoint'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -252,10 +251,9 @@ export default {
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '成品库区',
|
||||
url: 'api/cppoint',
|
||||
url: 'api/regionio/warehousing',
|
||||
idField: 'point_id',
|
||||
sort: 'point_id,desc',
|
||||
crudMethod: { ...crudCppoint },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: true,
|
||||
@@ -282,6 +280,7 @@ export default {
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.query.region_code = "'CPQYA01'"
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
@@ -134,7 +134,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBill from '@/api/wms/st/bill'
|
||||
import crudBill from '@/views/wms/st/bill'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
<script>
|
||||
|
||||
import CppInventory from '@/views/wms/sch/cppoint/cppInventory'
|
||||
import CppInRegion from '@/views/wms/sch/cppoint/cppInRegion'
|
||||
import CppOutRegion from '@/views/wms/sch/cppoint/cppOutRegion'
|
||||
import CppInventory from '@/views/wms/st/cppoint/cppInventory'
|
||||
import CppInRegion from '@/views/wms/st/cppoint/cppInRegion'
|
||||
import CppOutRegion from '@/views/wms/st/cppoint/cppOutRegion'
|
||||
export default {
|
||||
name: 'Cppoint',
|
||||
components: { CppOutRegion, CppInRegion, CppInventory }
|
||||
@@ -1,449 +0,0 @@
|
||||
<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>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
placeholder="物料编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具编号">
|
||||
<el-input
|
||||
v-model="query.vehicle_code"
|
||||
clearable
|
||||
placeholder="载具编码"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
placeholder="批次"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.st_bill_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始点位">
|
||||
<el-input
|
||||
v-model="query.start_point_code"
|
||||
clearable
|
||||
placeholder="点位编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点点位">
|
||||
<el-input
|
||||
v-model="query.end_point_code"
|
||||
clearable
|
||||
placeholder="点位编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始区域">
|
||||
<el-input
|
||||
v-model="query.start_region_code"
|
||||
clearable
|
||||
placeholder="区域编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点区域">
|
||||
<el-input
|
||||
v-model="query.end_region_code"
|
||||
clearable
|
||||
placeholder="区域编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</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 || crud.status.view > 0 " :title="crud.status.title" width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料" prop="material_id">
|
||||
<label slot="label">物 料:</label>
|
||||
<el-input v-model="form.material_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="getMater" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="批次">
|
||||
<label slot="label">批 次:</label>
|
||||
<el-input v-model="form.pcsn" style="width: 200px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="载具编码:">
|
||||
<el-input v-model="form.vehicle_code" style="width: 200px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量" prop="qty">
|
||||
<label slot="label">数 量:</label>
|
||||
<el-input v-model="form.qty" style="width: 200px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始区域:" prop="start_region_id">
|
||||
<el-select
|
||||
v-model="form.start_region_id"
|
||||
placeholder="请选择"
|
||||
style="width: 200px;"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="changeStart"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reginoList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点区域:" prop="end_region_id">
|
||||
<el-select
|
||||
v-model="form.end_region_id"
|
||||
placeholder="请选择"
|
||||
style="width: 200px;"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="changeEnd"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reginoList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始点位:" prop="start_point_code">
|
||||
<el-input v-model="form.start_point_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="openStartPonit" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点点位:" prop="end_point_code">
|
||||
<el-input v-model="form.end_point_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="openEndPonit" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注:">
|
||||
<el-input v-model="form.remark" type="textarea" style="width: 530px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</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" :disabled="crud.status.view > 0" @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="iostorinv_id" label="出入单标识" />
|
||||
<el-table-column prop="bill_code" label="单据编号" show-overflow-tooltip min-width="130px">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="material_code" label="物料编码" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="pcsn" label="批次" />
|
||||
<el-table-column prop="vehicle_code" label="载具编码" />
|
||||
<el-table-column prop="qty" label="数量" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="unit_name" label="单位" />
|
||||
<el-table-column prop="start_point_name" label="起始点位" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="end_point_name" label="终点点位" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="start_region_name" label="起始区域" />
|
||||
<el-table-column prop="end_region_name" label="终点区域" />
|
||||
<el-table-column prop="task_id" label="任务标识" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="create_mode" label="生成方式">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.ST_CREATE_MODE[scope.row.create_mode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column prop="confirm_optname" label="确认人" />
|
||||
<el-table-column prop="confirm_time" label="确认时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:disabled-edit="scope.row.bill_status !== '10'"
|
||||
:disabled-dle="scope.row.bill_status !== '10'"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<MaterDialog :dialog-show.sync="materDialog" @setMaterValue="setMaterValue" />
|
||||
<PointDialog :dialog-show.sync="pointDialog" :open-param="pointParam" @tableChanged2="tableChanged2" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudRegionioIn from '@/api/wms/st/inbill/regionioIn'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import PointDialog from '@/views/wms/pub/PointDialog'
|
||||
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 crudPoint from '@/api/wms/sch/point'
|
||||
|
||||
const defaultForm = {
|
||||
iostorinv_id: null,
|
||||
bill_code: null,
|
||||
io_type: null,
|
||||
material_id: null,
|
||||
material_name: null,
|
||||
pcsn: null,
|
||||
vehicle_code: null,
|
||||
qty: null,
|
||||
qty_unit_id: null,
|
||||
bill_status: null,
|
||||
start_point_code: null,
|
||||
end_point_code: null,
|
||||
start_point_name: null,
|
||||
end_point_name: null,
|
||||
start_region_id: null,
|
||||
end_region_id: null,
|
||||
cust_id: null,
|
||||
create_mode: null,
|
||||
task_id: null,
|
||||
remark: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
confirm_optid: null,
|
||||
confirm_optname: null,
|
||||
confirm_time: null,
|
||||
is_delete: null
|
||||
}
|
||||
export default {
|
||||
name: 'RegionioIn',
|
||||
dicts: ['st_bill_status', 'ST_CREATE_MODE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDialog, PointDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '区域入库',
|
||||
url: 'api/regionioIn',
|
||||
idField: 'iostorinv_id',
|
||||
sort: 'iostorinv_id,desc',
|
||||
crudMethod: { ...crudRegionioIn },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
is_startOrEnd: null,
|
||||
pointParam: null,
|
||||
end_region_param: null,
|
||||
reginoList: [],
|
||||
materDialog: false,
|
||||
pointDialog: false,
|
||||
permission: {},
|
||||
rules: {
|
||||
material_id: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||
],
|
||||
qty: [
|
||||
{ required: true, message: '数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_region_id: [
|
||||
{ required: true, message: '起点区域不能为空', trigger: 'blur' }
|
||||
],
|
||||
end_region_id: [
|
||||
{ required: true, message: '终点区域不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_point_code: [
|
||||
{ required: true, message: '起点点位不能为空', trigger: 'blur' }
|
||||
],
|
||||
end_point_code: [
|
||||
{ required: true, message: '终点点位不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudPoint.getRegion().then(res => {
|
||||
this.reginoList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
getMater() {
|
||||
this.materDialog = true
|
||||
},
|
||||
setMaterValue(row) {
|
||||
debugger
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_name = row.material_name
|
||||
},
|
||||
changeStart(val) {
|
||||
this.pointParam = val
|
||||
this.form.start_point_name = null
|
||||
this.form.start_point_code = null
|
||||
},
|
||||
changeEnd(val) {
|
||||
if (this.form.start_point_code === null) {
|
||||
this.form.end_region_id = null
|
||||
this.crud.notify('请先选择起始点位', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
} else {
|
||||
this.pointParam = val
|
||||
this.form.end_point_name = null
|
||||
this.form.end_point_code = null
|
||||
}
|
||||
},
|
||||
openStartPonit() {
|
||||
if (this.form.start_region_id === null) {
|
||||
return this.crud.notify('请选择起始区域', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// 1代表起始点位
|
||||
this.is_startOrEnd = '1'
|
||||
this.pointDialog = true
|
||||
},
|
||||
openEndPonit() {
|
||||
if (this.form.end_region_id === null) {
|
||||
return this.crud.notify('请选择终点区域', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// 2代表终点点位
|
||||
this.is_startOrEnd = '2'
|
||||
this.pointDialog = true
|
||||
},
|
||||
tableChanged2(row) {
|
||||
if (this.is_startOrEnd === '1') {
|
||||
this.form.start_point_code = row.point_code
|
||||
this.form.start_point_name = row.point_name
|
||||
} else {
|
||||
this.form.end_point_code = row.point_code
|
||||
this.form.end_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
|
||||
crudRegionioIn.createTask(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,165 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="选择库存"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1200px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="模糊搜索">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@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="material_code" label="物料编码" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="200" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="规格" show-overflow-tooltip />
|
||||
<el-table-column prop="material_model" label="型号" />
|
||||
<el-table-column prop="pcsn" label="批次" />
|
||||
<el-table-column prop="struct_code" label="仓位编码" />
|
||||
<el-table-column prop="struct_name" label="仓位名称" width="120px"/>
|
||||
<el-table-column prop="vehicle_code" label="载具编码" />
|
||||
<el-table-column prop="canuse_qty" label="数量" />
|
||||
<el-table-column prop="unit_name" label="单位" />
|
||||
|
||||
</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 '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudRegionioOut from '@/api/wms/st/outbill/regionioOut'
|
||||
|
||||
export default {
|
||||
name: 'MaterDialog',
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '物料', url: 'api/regionioOut/getMaterial', crudMethod: { ...crudRegionioOut }, optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
materOptCode: {
|
||||
type: String,
|
||||
default: '00'
|
||||
},
|
||||
openParam: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableRadio: null,
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
open() {
|
||||
this.query.region_id = this.openParam
|
||||
this.crud.toQuery()
|
||||
},
|
||||
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()
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('getMaterial', 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('getMaterial', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,451 +0,0 @@
|
||||
<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>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
placeholder="物料编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具编号">
|
||||
<el-input
|
||||
v-model="query.vehicle_code"
|
||||
clearable
|
||||
placeholder="载具编码"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
placeholder="批次"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.st_bill_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始点位">
|
||||
<el-input
|
||||
v-model="query.start_point_code"
|
||||
clearable
|
||||
placeholder="点位编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点点位">
|
||||
<el-input
|
||||
v-model="query.end_point_code"
|
||||
clearable
|
||||
placeholder="点位编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始区域">
|
||||
<el-input
|
||||
v-model="query.start_region_code"
|
||||
clearable
|
||||
placeholder="区域编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点区域">
|
||||
<el-input
|
||||
v-model="query.end_region_code"
|
||||
clearable
|
||||
placeholder="区域编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</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 || crud.status.view > 0 " :title="crud.status.title" width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料" prop="material_id">
|
||||
<label slot="label">物 料:</label>
|
||||
<el-input v-model="form.material_name" style="width: 200px;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="批次">
|
||||
<label slot="label">批 次:</label>
|
||||
<el-input v-model="form.pcsn" style="width: 200px;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="载具编码:">
|
||||
<el-input v-model="form.vehicle_code" style="width: 200px;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量" prop="qty">
|
||||
<label slot="label">数 量:</label>
|
||||
<el-input v-model="form.qty" style="width: 200px;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始区域:" prop="start_region_id">
|
||||
<el-select
|
||||
v-model="form.start_region_id"
|
||||
placeholder="请选择"
|
||||
style="width: 200px;"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="changeStart"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reginoList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点区域:" prop="end_region_id">
|
||||
<el-select
|
||||
v-model="form.end_region_id"
|
||||
placeholder="请选择"
|
||||
style="width: 200px;"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="changeEnd"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reginoList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始点位:" prop="start_point_code">
|
||||
<el-input v-model="form.start_point_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="openStartPonit" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点点位:" prop="end_point_code">
|
||||
<el-input v-model="form.end_point_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="openEndPonit" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注:">
|
||||
<el-input v-model="form.remark" type="textarea" style="width: 530px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</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" :disabled="crud.status.view > 0" @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="iostorinv_id" label="出入单标识" />
|
||||
<el-table-column prop="bill_code" label="单据编号" show-overflow-tooltip min-width="140px">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="material_code" label="物料编码" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="pcsn" label="批次" />
|
||||
<el-table-column prop="vehicle_code" label="载具编码" />
|
||||
<el-table-column prop="qty" label="数量" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="unit_name" label="单位" />
|
||||
<el-table-column prop="start_point_name" label="起始点位" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="end_point_name" label="终点点位" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="start_region_name" label="起始区域" />
|
||||
<el-table-column prop="end_region_name" label="终点区域" />
|
||||
<el-table-column prop="task_id" label="任务标识" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="create_mode" label="生成方式">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.ST_CREATE_MODE[scope.row.create_mode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column prop="confirm_optname" label="确认人" />
|
||||
<el-table-column prop="confirm_time" label="确认时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:disabled-edit="scope.row.bill_status !== '10'"
|
||||
:disabled-dle="scope.row.bill_status !== '10'"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<MaterDialog :dialog-show.sync="materDialog" :open-param="materParam" @getMaterial="getMaterial" />
|
||||
<PointDialog :dialog-show.sync="pointDialog" :open-param="pointParam" @tableChanged2="tableChanged2" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudRegionioOut from '@/api/wms/st/outbill/regionioOut'
|
||||
import MaterDialog from '@/views/wms/st/outbill/MaterDialog'
|
||||
import PointDialog from '@/views/wms/pub/PointDialog'
|
||||
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 crudPoint from '@/api/wms/sch/point'
|
||||
|
||||
const defaultForm = {
|
||||
iostorinv_id: null,
|
||||
bill_code: null,
|
||||
io_type: null,
|
||||
material_id: null,
|
||||
material_name: null,
|
||||
pcsn: null,
|
||||
vehicle_code: null,
|
||||
qty: null,
|
||||
qty_unit_id: null,
|
||||
bill_status: null,
|
||||
start_point_code: null,
|
||||
end_point_code: null,
|
||||
start_point_name: null,
|
||||
end_point_name: null,
|
||||
start_region_id: null,
|
||||
end_region_id: null,
|
||||
cust_id: null,
|
||||
create_mode: null,
|
||||
task_id: null,
|
||||
remark: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
confirm_optid: null,
|
||||
confirm_optname: null,
|
||||
confirm_time: null,
|
||||
is_delete: null
|
||||
}
|
||||
export default {
|
||||
name: 'RegionioOut',
|
||||
dicts: ['st_bill_status', 'ST_CREATE_MODE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDialog, PointDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '区域出库',
|
||||
url: 'api/regionioOut',
|
||||
idField: 'iostorinv_id',
|
||||
sort: 'iostorinv_id,desc',
|
||||
crudMethod: { ...crudRegionioOut },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
is_startOrEnd: null,
|
||||
pointParam: null,
|
||||
materParam: null,
|
||||
end_region_param: null,
|
||||
reginoList: [],
|
||||
materDialog: false,
|
||||
pointDialog: false,
|
||||
permission: {},
|
||||
rules: {
|
||||
material_id: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||
],
|
||||
qty: [
|
||||
{ required: true, message: '数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_region_id: [
|
||||
{ required: true, message: '起点区域不能为空', trigger: 'blur' }
|
||||
],
|
||||
end_region_id: [
|
||||
{ required: true, message: '终点区域不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_point_code: [
|
||||
{ required: true, message: '起点点位不能为空', trigger: 'blur' }
|
||||
],
|
||||
end_point_code: [
|
||||
{ required: true, message: '终点点位不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudPoint.getRegion().then(res => {
|
||||
this.reginoList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
getMater() {
|
||||
this.materDialog = true
|
||||
},
|
||||
setMaterValue(row) {
|
||||
debugger
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_name = row.material_name
|
||||
},
|
||||
changeStart(val) {
|
||||
this.materParam = val
|
||||
this.form.start_point_name = null
|
||||
this.form.start_point_code = null
|
||||
},
|
||||
changeEnd(val) {
|
||||
this.pointParam = val
|
||||
this.form.end_point_name = null
|
||||
this.form.end_point_code = null
|
||||
},
|
||||
openStartPonit() {
|
||||
if (this.form.start_region_id === null) {
|
||||
return this.crud.notify('请选择起始区域', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
this.materDialog = true
|
||||
},
|
||||
openEndPonit() {
|
||||
if (this.form.end_region_id === null) {
|
||||
return this.crud.notify('请选择终点区域', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// 2代表终点点位
|
||||
this.is_startOrEnd = '2'
|
||||
this.pointDialog = true
|
||||
},
|
||||
getMaterial(row) {
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_name = row.material_name
|
||||
this.form.vehicle_code = row.vehicle_code
|
||||
this.form.pcsn = row.pcsn
|
||||
this.form.qty = row.canuse_qty
|
||||
this.form.start_point_code = row.struct_code
|
||||
this.form.start_point_name = row.struct_name
|
||||
},
|
||||
tableChanged2(row) {
|
||||
if (this.is_startOrEnd === '1') {
|
||||
this.form.start_point_code = row.point_code
|
||||
this.form.start_point_name = row.point_name
|
||||
} else {
|
||||
this.form.end_point_code = row.point_code
|
||||
this.form.end_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
|
||||
crudRegionioOut.createTask(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -16,9 +16,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Inventory from '@/views/wms/sch/ysa/inventory'
|
||||
import YsqInRegion from '@/views/wms/sch/ysa/ysqInRegion'
|
||||
import YsqOutRegion from '@/views/wms/sch/ysa/ysqOutRegion'
|
||||
import Inventory from '@/views/wms/st/ysa/inventory'
|
||||
import YsqInRegion from '@/views/wms/st/ysa/ysqInRegion'
|
||||
import YsqOutRegion from '@/views/wms/st/ysa/ysqOutRegion'
|
||||
export default {
|
||||
name: 'Ysapoint',
|
||||
components: { YsqOutRegion, YsqInRegion, Inventory }
|
||||
@@ -236,7 +236,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudYsapoint from './ysapoint'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -252,10 +251,9 @@ export default {
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '养生A区',
|
||||
url: 'api/ysapoint',
|
||||
url: 'api/regionio/warehousing',
|
||||
idField: 'point_id',
|
||||
sort: 'point_id,desc',
|
||||
crudMethod: { ...crudYsapoint },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: true,
|
||||
@@ -282,6 +280,7 @@ export default {
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.query.region_code = "'YSQA01', 'YSAQKTPQ01'"
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
@@ -134,7 +134,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBill from '@/api/wms/st/bill'
|
||||
import crudBill from '@/views/wms/st/bill'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -134,7 +134,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBill from '@/api/wms/st/bill'
|
||||
import crudBill from '@/views/wms/st/bill'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
Reference in New Issue
Block a user