This commit is contained in:
2023-06-03 09:56:23 +08:00
54 changed files with 870 additions and 343 deletions

View File

@@ -70,9 +70,9 @@
<el-form-item label="区域名称" prop="region_name">
<el-input v-model="form.region_name" style="width: 370px;" />
</el-form-item>
<el-form-item label="是否合并任务" prop="merge">
<el-form-item label="是否合并任务" prop="is_merge">
<el-select
v-model="form.merge"
v-model="form.is_merge"
placeholder=""
style="width: 370px"
>
@@ -111,9 +111,9 @@
<el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
<el-table-column prop="product_area" label="生产车间" :min-width="flexWidth('product_area',crud.data,'生产车间')" />
<el-table-column prop="merge" label="是否合并任务" :min-width="flexWidth('merge',crud.data,'是否合并任务')">
<el-table-column prop="is_merge" label="是否合并任务" :min-width="flexWidth('is_merge',crud.data,'是否合并任务')">
<template slot-scope="scope">
{{ scope.row.merge ? '是' : '否' }}
{{ dict.label.IS_OR_NOT[scope.row.is_merge] }}
</template>
</el-table-column>
<el-table-column prop="point_type_explain" label="点位类型说明" :min-width="flexWidth('point_type_explain',crud.data,'点位类型说明')" />
@@ -150,7 +150,7 @@ const defaultForm = {
product_area: 'A1',
point_type_explain: null,
point_status_explain: null,
merge: '1',
is_merge: '1',
remark: null,
create_id: null,
create_name: null,

View File

@@ -56,15 +56,6 @@
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<!-- <el-form-item label="任务类型">-->
<!-- <treeselect-->
<!-- v-model="query.task_type"-->
<!-- :load-options="loadChildNodes"-->
<!-- :options="classes1"-->
<!-- style="width: 180px"-->
<!-- placeholder="请选择"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="任务类型">
<el-select
v-model="query.task_type"
@@ -116,7 +107,7 @@
<el-form-item label="任务状态">
<el-select
v-model="query.task_status"
v-model="task_status"
multiple
style="width: 400px"
placeholder="任务状态"
@@ -124,6 +115,10 @@
clearable
@change="handTaskStatus"
>
<el-option
label="调度中任务"
value="-1"
/>
<el-option
v-for="item in taskStatusList"
:key="item.code"
@@ -137,7 +132,7 @@
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<el-button type="primary" @click="taskScheduler()" >任务调度</el-button>
<el-button type="primary" @click="taskScheduler()">任务调度</el-button>
<crudOperation :permission="permission" />
<!--表格渲染-->
<el-table
@@ -152,16 +147,11 @@
<el-table-column prop="task_code" label="任务编码" min-width="100" show-overflow-tooltip />
<el-table-column v-if="true" prop="task_id" label="任务标识" min-width="150" show-overflow-tooltip />
<el-table-column v-if="true" prop="material_id" label="物料标识" min-width="150" show-overflow-tooltip />
<el-table-column prop="acs_task_type" label="acs任务类型" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ acsTaskTypeList[scope.row.acs_task_type - 1] }}
</template>
</el-table-column>
<el-table-column prop = "acs_task_type" label="acs任务类型" min-width="120" show-overflow-tooltip :formatter = "acsTypeName"></el-table-column>
<el-table-column prop="task_name" label="任务类型" min-width="120" show-overflow-tooltip />
<el-table-column v-if="false" prop="task_status" label="任务状态" />
<el-table-column prop="product_area" label="生产车间" />
<el-table-column prop="task_status_name" label="任务状态" width="120px" :formatter="formatTaskStatusName" />
<el-table-column prop="point_code1" label="起点" width="100" />
<el-table-column prop="point1_region_name" label="起点区域" width="120" />
<el-table-column prop="point_code2" label="终点" min-width="100" show-overflow-tooltip />
@@ -242,7 +232,7 @@ import pagination from '@crud/Pagination'
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
import {scheduler} from "./task";
import { scheduler } from './task'
export default {
name: 'Task',
@@ -266,7 +256,7 @@ export default {
task_type: '',
finished_type: '',
product_area: 'A1',
task_status: ''
task_status: '-1'
},
optShow: {
add: false,
@@ -284,6 +274,7 @@ export default {
currentComponent: '',
openParam: {},
create_time: [],
task_status: ['-1'],
taskStatusList: [],
taskTypeList: [],
acsTaskTypeList: [],
@@ -309,7 +300,7 @@ export default {
crudTask.getAcsTaskType().then(res => {
this.acsTaskTypeList = res
})
// this.crud.query.task_status = ['-1']
this.crud.query.task_status = ['-1']
// this.crud.toQuery()
},
methods: {
@@ -359,12 +350,17 @@ export default {
this.crud.toQuery()
},
handTaskStatus(value) {
this.crud.query.more_task_status = null
if (value) {
this.crud.query.more_task_status = value.toString()
}
this.crud.query.task_status = value.toString()
this.crud.toQuery()
},
acsTypeName(row, column) {
for (const item of this.acsTaskTypeList) {
if (Number(item.value) === Number(row.acs_task_type)) {
return item.label
}
}
return ''
},
formatTaskStatusName(row, column) {
for (const item of this.taskStatusList) {
if (item.value === row.task_status) {

View File

@@ -67,7 +67,7 @@
</el-table-column>
<el-table-column show-overflow-tooltip width="150" prop="bucketunique" label="箱号" />
<el-table-column show-overflow-tooltip width="150" prop="storagevehicle_type" label="箱类型" />
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" />
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" :formatter="formterStatus" />
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip width="150" prop="pcsn" label="批次" />
@@ -99,6 +99,7 @@ import crudProductIn from '@/views/wms/storage_manage/product/productIn/producti
const start = new Date()
export default {
name: 'AddBox',
dicts: ['BOX_STATUS'],
components: { crudOperation, rrOperation, pagination, DateRangePicker },
cruds() {
return CRUD({
@@ -155,6 +156,9 @@ export default {
this.$emit('update:dialogShow', false)
this.rows = this.$refs.multipleTable.selection
this.$emit('tableChanged2', this.tableRadio)
},
formterStatus(row) {
return this.dict.label.BOX_STATUS[row.status]
}
}
}

View File

@@ -70,8 +70,8 @@
</template>
</el-table-column>
<el-table-column show-overflow-tooltip width="150" prop="sale_code" label="销售单号" />
<el-table-column show-overflow-tooltip width="150" prop="sale_type" label="销售单类型" />
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" />
<el-table-column show-overflow-tooltip width="150" prop="sale_type" label="销售单类型" :formatter="formterType" />
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" :formatter="formterStatus" />
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip width="150" prop="sale_qty" label="销售数量" />
@@ -106,6 +106,7 @@ import crudProductIn from '@/views/wms/storage_manage/product/productIn/producti
const start = new Date()
export default {
name: 'AddDtl',
dicts: ['PCS_SAL_TYPE', 'PCS_SALE_STATUS'],
components: { crudOperation, rrOperation, pagination, DateRangePicker },
cruds() {
return CRUD({
@@ -160,6 +161,12 @@ export default {
this.$emit('update:dialogShow', false)
this.rows = this.$refs.multipleTable.selection
this.$emit('tableChanged', this.tableRadio)
},
formterType(row) {
return this.dict.label.PCS_SAL_TYPE[row.sale_type]
},
formterStatus(row) {
return this.dict.label.PCS_SALE_STATUS[row.status]
}
}
}

View File

@@ -85,6 +85,7 @@
<el-form-item label="放入数量:" prop="storage_qty">
<el-input-number
v-model="form.storage_qty"
:disabled="form.bucketunique !== ''"
style="width: 200px"
size="mini"
:controls="false"
@@ -155,6 +156,16 @@
>
组盘确认
</el-button>
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="cancelConfirmvehicle()"
>
取消组盘
</el-button>
<el-button
slot="left"
:loading="divBtn"
@@ -231,7 +242,7 @@
<script>
import CRUD, { crud } from '@crud/crud'
import StructDiv from '@/views/wms/pub/StructDialog'
import StructDiv from '@/views/wms/storage_manage/product/productIn/StructDiv'
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
import crudPoint from '@/views/wms/scheduler_manage/point/point'
import AddBox from '@/views/wms/storage_manage/product/productIn/AddBox'
@@ -474,6 +485,22 @@ export default {
})
})
},
cancelConfirmvehicle() {
if (!this.form.dtl_row) {
this.crud.notify('请选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return
}
crudProductIn.cancelConfirmvehicle(this.form.dtl_row).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
this.form.vehicle_code = ''
this.form.bucketunique = ''
this.openParam = res
this.form.tableMater = []
this.dis_row = null
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})
},
sectQueryChange(val) {
debugger
this.sectProp = val
@@ -493,20 +520,17 @@ export default {
tableChanged(row) {
this.form.sect_id = this.sect_id
this.form.stor_id = this.stor_id
// 新增一行物料时,给行进行赋值
for (let i = 0; i < this.form.tableMater.length; i++) {
this.form.tableMater[i].struct_id = row.point_id
this.form.tableMater[i].struct_code = row.point_code
this.form.tableMater[i].struct_name = row.point_name
this.form.tableMater[i].region_code = row.region_code
this.form.tableMater[i].region_name = row.region_name
this.form.tableMater.splice(i, 1, this.form.tableMater[i]) // 通过splice 替换数据 触发视图更新
}
crudProductIn.divStruct(this.form).then(res => {
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
this.dis_row.struct_id = row.struct_id
this.divBtn = true
crudProductIn.divStruct(this.dis_row).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
this.openParam = res
this.form.tableMater = []
this.dis_row = null
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
this.form.tableMater = []
}).finally(() => {
this.divBtn = false
})
},
tableChanged2(row) {
@@ -520,15 +544,14 @@ export default {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.sect_id) {
this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// 如果勾选了,直接跳后台
if (this.form.checked) {
if (!this.sect_id) {
this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.divBtn = true
debugger
this.dis_row.stor_id = this.stor_id.toString()
this.dis_row.sect_id = this.sect_id.toString()
crudProductIn.divStruct(this.dis_row).then(res => {
@@ -542,6 +565,10 @@ export default {
this.divBtn = false
})
} else {
if (!this.stor_id) {
this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.structShow = true
this.$refs.child.getMsg(false)
}

View File

@@ -0,0 +1,208 @@
<template>
<el-dialog
title="货位选择"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
width="1000px"
@close="close"
@open="open"
>
<!-- 搜索 -->
<el-row>
<el-col :span="6">
<el-cascader
v-model="query.sect"
placeholder="所属库区"
:options="sects"
:props="{ checkStrictly: true }"
clearable
@change="sectQueryChange"
/>
</el-col>
<el-col :span="6">
<el-input
v-model="query.struct_code"
clearable
style="width: 200px"
size="mini"
placeholder="输入货位编码、名称"
prefix-icon="el-icon-search"
class="filter-item"
/>
</el-col>
<el-col :span="6">
<rrOperation/>
</el-col>
</el-row>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@select="handleSelectionChange"
@select-all="onSelectAll"
>
<el-table-column type="selection" width="55"/>
<el-table-column prop="struct_code" label="货位编码"/>
<el-table-column prop="struct_name" label="货位名称"/>
<el-table-column prop="sect_name" label="库区名称"/>
<el-table-column prop="lock_type" :formatter="lockFormat" label="是否锁定"/>
<el-table-column prop="storagevehicle_code" 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, {crud, header, presenter} from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import crudStructattr from '@/api/wms/basedata/st/structattr'
import crudSectattr from '@/api/wms/basedata/st/sectattr'
export default {
name: 'StructDiv',
components: {crudOperation, rrOperation, pagination},
cruds() {
return CRUD({
title: '仓位',
optShow: {},
url: 'api/structattr',
idField: 'struct_id',
sort: 'struct_id,desc',
query: { search: '', is_lock: '0', sect_id: '', stor_id: '' },
crudMethod: { ...crudStructattr }
})
},
mixins: [presenter(), header()],
dicts: ['d_lock_type'],
props: {
dialogShow: {
type: Boolean,
default: false
},
storId: {
type: String,
default: ''
}
},
data() {
return {
sects: [],
classes: [],
dialogVisible: false,
sect: {},
mol_type: '',
checkrow: {},
rows: []
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
},
sectProp: {
handler(newValue, oldValue) {
this.sect = newValue
}
}
},
methods: {
open() {
this.crud.resetQuery(false)
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
this.sects = res.content
})
/* if (this.sect) {
this.query.sect = this.sect
if (this.sect.length === 1) {
this.query.stor_id = this.sect[0]
this.query.sect_id = ''
}
if (this.sect.length === 0) {
this.query.sect_id = ''
this.query.stor_id = ''
}
if (this.sect.length === 2) {
this.query.stor_id = this.sect[0]
this.query.sect_id = this.sect[1]
}
}*/
this.query.stor_id = this.storId
this.query.is_used = '1'
this.query.is_delete = '0'
this.crud.toQuery()
},
sectQueryChange(val) {
if (val.length === 1) {
this.query.stor_id = val[0]
this.query.sect_id = ''
}
if (val.length === 0) {
this.query.sect_id = ''
this.query.stor_id = ''
}
if (val.length === 2) {
this.query.stor_id = val[0]
this.query.sect_id = val[1]
}
this.crud.toQuery()
},
handleSelectionChange(val, row) {
if (val.length > 1) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(val.pop())
this.checkrow = row
} else {
this.checkrow = row
}
},
/**
* 接受父组件传值
* @param msg
*/
getMsg(msg) {
this.mol_type = msg
},
lockFormat(row, column) {
return this.dict.label.d_lock_type[row.lock_type]
},
onSelectAll() {
this.$refs.table.clearSelection()
},
close() {
this.sects = null
this.$emit('update:dialogShow', false)
},
submit() {
this.rows = this.$refs.table.selection
if (this.rows.length <= 0) {
this.$message('请先勾选仓位')
return
}
// 溢单不允许选择已锁定或者有载具的货位
if (this.checkrow.lock_type !== '0') {
this.$message('不允许选择已锁定的货位!')
return
}
this.$emit('update:dialogShow', false)
this.$emit('tableChanged', this.checkrow)
}
}
}
</script>

View File

@@ -96,6 +96,14 @@ export function confirm(data) {
})
}
export function cancelConfirmvehicle(data) {
return request({
url: '/api/productIn/cancelConfirmvehicle',
method: 'post',
data
})
}
export default {
add,
edit,
@@ -108,5 +116,6 @@ export default {
divStruct,
unDivStruct,
setPoint,
confirm
confirm,
cancelConfirmvehicle
}

View File

@@ -409,7 +409,7 @@ export default {
this.nowrow = row
},
async queryStruct() {
if (!this.form.mol_type) {structShow
if (!this.form.mol_type) {
this.crud.notify('请先选择损溢类型!', CRUD.NOTIFICATION_TYPE.INFO)
return
}