# Conflicts:
#	mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
This commit is contained in:
2023-06-13 11:21:20 +08:00
108 changed files with 3362 additions and 1044 deletions

View File

@@ -0,0 +1,19 @@
import request from '@/utils/request'
export function query(data) {
return request({
url: 'api/specialDevice/query',
method: 'post',
data
})
}
export function edit(data) {
return request({
url: 'api/specialDevice/update',
method: 'post',
data
})
}
export default { query, edit }

View File

@@ -0,0 +1,148 @@
<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 v-show="false" :permission="permission" />
</div>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
highlight-current-row
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
@current-change="handleCurrentChange"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="product_area" label="生产车间" width="100px" show-overflow-tooltip />
<el-table-column prop="device_code" label="设备编码" width="100px" show-overflow-tooltip />
<el-table-column prop="material_id" label="物料id" width="200px" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.material_id">
<el-button slot="append" icon="el-icon-plus" @click="queryMater(scope.$index, scope.row)" />
</el-input>
</template>
</el-table-column>
<el-table-column prop="material_name" label="物料名称" width="200px" show-overflow-tooltip />
<el-table-column prop="material_spec" label="物料规格" width="200px" show-overflow-toolti />
<el-table-column prop="deviceinstor_qty" label="物料数量(单位:个)" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.deviceinstor_qty" /></template>
</el-table-column>
<el-table-column prop="deviceinstor_weight" label="物料重量(单位:g)" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.deviceinstor_weight" /></template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip />
<el-table-column label="操作" width="150px" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" style="margin-left: -1px;margin-right: 2px" type="text" @click="updateSKMaterial(scope.row)">提交修改</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</el-card>
</div>
</template>
<script>
import crudDevice from '@/views/wms/device_manage/deviceMaterial/deviceMaterial.js'
import CRUD, { presenter, header, form } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import rrOperation from '@crud/RR.operation'
const defaultForm = { product_area: 'A1', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
export default {
name: 'SKdevice',
components: { crudOperation, pagination, rrOperation },
dicts: ['product_area'],
cruds() {
return [
CRUD({ title: '深坑设备物料', url: 'api/specialDevice/query', query: { product_area: 'A1', workprocedure_id: '1535144552481034240' }, idField: 'device_code', crudMethod: { ...crudDevice }})
]
},
mixins: [presenter(), header(), form(defaultForm)],
data() {
return {
materialShow: false,
queryTypeOptions: [
{ key: 'name', display_name: '字典名称' },
{ key: 'description', display_name: '描述' }
],
rules: {
material_spec: [
{ required: true, message: '请输入编码', trigger: 'blur' }
]
},
permission: {
add: ['admin', 'dict:add'],
edit: ['admin', 'dict:edit'],
del: ['admin', 'dict:del']
}
}
},
methods: {
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,156 @@
<template>
<div class="app-container">
<!--表单组件-->
<el-dialog
append-to-body
:close-on-click-modal="false"
:before-close="crud.cancelCU"
:visible="crud.status.cu > 0"
:title="crud.status.title"
width="500px"
>
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
<el-form-item label="物料系列" prop="code">
<el-input v-model="form.material_spec" style="width: 370px;" />
</el-form-item>
<el-form-item label="工序调度编号">
<el-input v-model="form.process_id" 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.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!-- 字典列表 -->
<el-card class="box-card">
<!--工具栏-->
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-input
v-model="query.search"
clearable
size="mini"
placeholder="设备编号模糊查询"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<rrOperation :permission="permission" />
</div>
<crudOperation :permission="permission" />
</div>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
highlight-current-row
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
@current-change="handleCurrentChange"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="product_area" label="生产车间" width="100px" show-overflow-tooltip />
<el-table-column prop="device_code" label="设备编码" width="100px" show-overflow-tooltip />
<el-table-column prop="material_id" label="物料id" width="200px" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.material_id">
<el-button slot="append" icon="el-icon-plus" @click="queryMater(scope.$index, scope.row)" />
</el-input>
</template>
</el-table-column>
<el-table-column prop="material_name" label="物料名称" width="200px" show-overflow-tooltip />
<el-table-column prop="material_spec" label="物料规格" width="200px" show-overflow-toolti />
<el-table-column prop="deviceinstor_qty" label="物料数量(个)" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.deviceinstor_qty" /></template>
</el-table-column>
<el-table-column prop="deviceinstor_weight" label="物料重量(g)" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.deviceinstor_weight" /></template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip />
<el-table-column label="操作" width="150px" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" style="margin-left: -1px;margin-right: 2px" type="text" @click="updateSKMaterial(scope.row)">提交修改</el-button>
</template>
</el-table-column>
</el-table>
<MaterDtl
:dialog-show.sync="materialShow"
:is-single="true"
:mater-opt-code="materType"
@setMaterValue="setMaterValue"
/>
<!--分页组件-->
<pagination />
</el-card>
</div>
</template>
<script>
import crudDevice from '@/views/wms/device_manage/deviceMaterial/deviceMaterial.js'
import 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 MaterDtl from '@/views/wms/pub/MaterDialog'
const defaultForm = { product_area: 'A1', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
export default {
name: 'SKdevice',
components: { crudOperation, pagination, rrOperation, MaterDtl },
cruds() {
return [
CRUD({ title: '深坑设备物料', url: 'api/specialDevice/query', query: { product_area: 'A1', workprocedure_id: '1535144552481034240' }, idField: 'device_code', crudMethod: { ...crudDevice }})
]
},
mixins: [presenter(), header(), form(defaultForm)],
data() {
return {
materialShow: false,
queryTypeOptions: [
{ key: 'name', display_name: '字典名称' },
{ key: 'description', display_name: '描述' }
],
rules: {
material_spec: [
{ required: true, message: '请输入编码', trigger: 'blur' }
]
},
permission: {
add: ['admin', 'dict:add'],
edit: ['admin', 'dict:edit'],
del: ['admin', 'dict:del']
}
}
},
methods: {
queryMater(index, row) {
this.materialShow = true
this.nowindex = index
this.nowrow = row
},
updateSKMaterial(row) {
crudDevice.edit(row).then(() => {
this.notify('保存成功', 'success')
}).catch(() => {
})
},
setMaterValue(row) {
this.nowrow.material_id = row.material_id
this.nowrow.material_code = row.material_code
this.nowrow.material_name = row.material_name
this.nowrow.material_spec = row.material_spec
this.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,293 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-input
v-model="query.blurry"
size="mini"
clearable
placeholder="输入用户名"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<rrOperation />
</div>
<crudOperation :permission="permission" />
</div>
<!-- 表单渲染 -->
<el-dialog
append-to-body
:close-on-click-modal="false"
:before-close="crud.cancelCU"
:visible.sync="crud.status.cu > 0"
:title="crud.status.title"
width="520px"
>
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="80px">
<el-form-item label="角色名称" prop="name">
<el-input v-model="form.name" style="width: 380px;" />
</el-form-item>
<el-form-item label="备注" prop="description">
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<el-row :gutter="15">
<!--角色管理-->
<el-col :span="12" style="margin-bottom: 10px">
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span class="role-span">用户列表</span>
</div>
<el-table
ref="table"
v-loading="crud.loading"
highlight-current-row
style="width: 100%;"
:data="crud.data"
@selection-change="crud.selectionChangeHandler"
@current-change="handleCurrentChange"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="name" label="名称" min-width="100" show-overflow-tooltip />
<el-table-column show-overflow-tooltip prop="remark" label="描述" />
<el-table-column show-overflow-tooltip width="135px" prop="createTime" label="创建日期">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
v-permission="['admin','roles:edit','roles:del']"
label="操作"
width="130px"
align="center"
fixed="right"
>
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</el-card>
</el-col>
<!-- 菜单授权 -->
<el-col :span="12">
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<el-tooltip class="item" effect="dark" content="选择指定用户分配设备" placement="top">
<span class="role-span">设备分配</span>
</el-tooltip>
<el-button
v-permission="['admin','roles:edit']"
:disabled="!showButton"
:loading="menuLoading"
icon="el-icon-check"
size="mini"
style="float: right; padding: 6px 10px"
type="primary"
@click="saveMenu"
>保存
</el-button>
</div>
<el-tree
ref="menu"
lazy
:data="menus"
:default-checked-keys="menu_ids"
:load="getMenuDatas"
:props="defaultProps"
check-strictly
accordion
show-checkbox
node-key="menu_id"
@check="menuChange"
/>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import crudUsers from '@/views/system/user/user.js'
import crudMenu from '@/views/system/menu/menu'
import { getChild, getMenusTree } from '@/views/system/menu/menu'
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'
const defaultForm = { role_id: null, name: null, remark: null }
export default {
name: 'Role',
components: { pagination, crudOperation, rrOperation, udOperation, crudMenu },
cruds() {
return CRUD({ idField: 'user_id', title: '用户', url: '/api/users', crudMethod: { ...crudUsers }})
},
mixins: [presenter(), header(), form(defaultForm), crud()],
data() {
return {
defaultProps: { children: 'children', label: 'title', isLeaf: 'leaf' },
currentId: 0, menuLoading: false, showButton: false,
menus: [], menu_ids: [], // 多选时使用
permission: {
add: ['admin', 'roles:add'],
edit: ['admin', 'roles:edit'],
del: ['admin', 'roles:del']
},
rules: {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
],
permission: [
{ required: true, message: '请输入权限', trigger: 'blur' }
]
}
}
},
created() {
},
methods: {
getMenuDatas(node, resolve) {
setTimeout(() => {
getMenusTree(node.data.menu_id ? node.data.menu_id : 0).then(res => {
resolve(res)
})
}, 100)
},
getMenusByRole(val) {
if (this.currentId && val[0] && val[1]) {
const param = {
role_id: this.currentId,
system_type: val[0],
category: val[1]
}
const _this = this
crudMenu.getMenusByRole(param).then(res => {
_this.menus = res
// 初始化默认选中的key
_this.menu_ids = []
_this.menus.forEach(function(data) {
_this.menu_ids.push(data)
})
})
}
},
[CRUD.HOOK.afterRefresh]() {
this.$refs.menu.setCheckedKeys([])
},
// 提交前做的操作
[CRUD.HOOK.afterValidateCU](crud) {
return true
},
// 触发单选
handleCurrentChange(val) {
if (val) {
const _this = this
// 清空菜单的选中
this.$refs.menu.setCheckedKeys([])
// 保存当前的角色id
this.currentId = val.role_id
// 初始化默认选中的key
this.menu_ids = []
val.menus.forEach(function(data) {
_this.menu_ids.push(data)
})
this.showButton = true
}
},
menuChange(menu) {
// 获取该节点的所有子节点id 包含自身
getChild(menu.menu_id).then(childIds => {
// 判断是否在 menu_ids 中,如果存在则删除,否则添加
if (this.menu_ids.indexOf(menu.menu_id) !== -1) {
for (let i = 0; i < childIds.length; i++) {
const index = this.menu_ids.indexOf(childIds[i])
if (index !== -1) {
this.menu_ids.splice(index, 1)
}
}
} else {
for (let i = 0; i < childIds.length; i++) {
const index = this.menu_ids.indexOf(childIds[i])
if (index === -1) {
this.menu_ids.push(childIds[i])
}
}
}
this.$refs.menu.setCheckedKeys(this.menu_ids)
})
},
// 保存菜单
saveMenu() {
this.menuLoading = true
const role = { role_id: this.currentId, menus: [] }
// 得到已选中的 key 值
this.menu_ids.forEach(function(menu_id) {
const menu = { menu_id: menu_id }
role.menus.push(menu)
})
crudRoles.editMenu(role).then(() => {
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.menuLoading = false
this.crud.toQuery()
// this.update()
}).catch(err => {
this.menuLoading = false
console.log(err.response.data.message)
})
},
// 改变数据
update() {
// 无刷新更新 表格数据
crudRoles.get(this.currentId).then(res => {
for (let i = 0; i < this.crud.data.length; i++) {
if (res.menu_id === this.crud.data[i].menu_id) {
this.crud.data[i] = res
break
}
}
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss">
.role-span {
font-weight: bold;
color: #303133;
font-size: 15px;
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-input-number .el-input__inner {
text-align: left;
}
::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,57 @@
import request from '@/utils/request'
// 获取所有的Role
export function getAll() {
return request({
url: 'api/sysRole/all',
method: 'get'
})
}
export function add(data) {
return request({
url: 'api/sysRole',
method: 'post',
data
})
}
export function get(id) {
return request({
url: 'api/sysRole/' + id,
method: 'get'
})
}
export function getLevel() {
return request({
url: 'api/sysRole/level',
method: 'get'
})
}
export function del(ids) {
return request({
url: 'api/sysRole',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/sysRole',
method: 'put',
data
})
}
export function editMenu(data) {
return request({
url: 'api/sysRole/menu',
method: 'put',
data
})
}
export default { add, edit, del, get, editMenu, getLevel }

View File

@@ -38,7 +38,7 @@
</template>
<script>
import crudProduceshiftorder from '@/views/wms/product_manage/workorder'
import crudProduceshiftorder from '@/views/wms/product_manage/workorder/produceshiftorder'
import CRUD, { crud } from '@crud/crud'
export default {

View File

@@ -48,7 +48,16 @@
class="filter-item"
/>
</el-form-item>
<el-form-item label="设备搜索">
<el-input
v-model="query.device_code"
clearable
size="small"
placeholder="设备编号"
style="width: 200px;"
class="filter-item"
/>
</el-form-item>
<el-form-item label=" 工单状态">
<el-select
v-model="order_status"
@@ -384,19 +393,16 @@
<!-- <el-table-column prop="workprocedure_code" label="工序编码" />-->
<el-table-column prop="product_area" label="生产车间" />
<el-table-column prop="plan_qty" label="计划数量" />
<el-table-column prop="real_qty" label="报工总数" />
<el-table-column prop="nok_qty" label="报废总数" />
<el-table-column prop="report_qty" label="报修总数" />
<el-table-column prop="person_real_qty" label="人员实际数量" width="100" show-overflow-tooltip />
<el-table-column prop="dq_real_qty" label="电气实际数量" width="100" show-overflow-tooltip />
<el-table-column prop="material_name" label="物料名称" width="120" show-overflow-tooltip />
<el-table-column prop="real_qty" label="报工总数" />
<el-table-column prop="material_spec" label="物料规格" width="120" show-overflow-tooltip />
<el-table-column prop="device_code" label="当前设备编码" width="100" show-overflow-tooltip />
<el-table-column prop="workprocedure_name" label="工序名称" width="120" show-overflow-tooltip />
<el-table-column prop="material_weight" label="物料单重" width="100" :formatter="crud.formatQlNum4" />
<el-table-column prop="planproducestart_date" label="计划开始时间" width="100" show-overflow-tooltip />
<el-table-column prop="planproduceend_date" label="计划结束时间" width="100" show-overflow-tooltip />
<el-table-column prop="realproducestart_date" label="实际开始时间" width="100" show-overflow-tooltip />
<el-table-column prop="realproduceend_date" label="实际结束时间" width="100" show-overflow-tooltip />
<el-table-column prop="device_code" label="当前设备编码" width="100" show-overflow-tooltip />
<el-table-column prop="is_canupdate_update" label="允许修改报工数" :formatter="formatBoolean" width="200" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="is_needmove" label="是否搬运" :formatter="formatBoolean" />
@@ -413,6 +419,9 @@
<el-table-column prop="is_error" :formatter="formatBoolean" label="是否异常"></el-table-column>
<el-table-column prop="error_info" label="异常信息" show-overflow-tooltip />
<el-table-column prop="remark" label="备注" />
<el-table-column prop="nok_qty" label="报废总数" />
<el-table-column prop="report_qty" label="报修总数" />
<el-table-column prop="person_real_qty" label="人员实际数量" width="100" show-overflow-tooltip />
<el-table-column prop="current_produce_person_name" label="操作工" show-overflow-tooltip />
<el-table-column prop="create_name" label="创建人" show-overflow-tooltip />
<el-table-column prop="create_time" label="创建时间" show-overflow-tooltip />
@@ -579,6 +588,9 @@ export default {
this.initClass3()
},
methods: {
databaseUploadApi(){
},
formatBoolean: function(row, column) {
var ret = ''
if (row[column.property] === true) {

View File

@@ -105,8 +105,8 @@ export function getReportWork(data) {
export function reportQuery(data) {
return request({
url: '/api/produceWorkorder/reportQuery',
method: 'post',
url: '/api/produceWorkorder/reportQuery2',
method: 'get',
data
})
}

View File

@@ -4,29 +4,51 @@
append-to-body
fullscreen
:visible.sync="dialogVisible"
@open="open"
@close="close"
>
<el-card class="box-card" shadow="never">
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="180px">
<div>
<el-form ref="form" :inline="true" :rules="rules" size="mini" label-width="180px">
<el-form-item label="工单编码">
<el-input v-model="form.workorder_code" style="width: 200px;" clearable/>
<el-input v-model="query.workorder_code" style="width: 200px;" clearable/>
</el-form-item>
<el-form-item label="班次类型" prop="shift_type_scode">
<el-select
v-model="query.shift_type_scode"
style="width: 200px"
clearable
filterable
placeholder="请选择"
>
<el-option
v-for="item in dict.PDM_BI_SHIFTTYPE"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="生产日期">
<el-date-picker
v-model="query.createTime"
type="daterange"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00','23:59:59']"
/>
</el-form-item>
<el-form-item label="只显示未审核">
<el-switch
v-model="form.is_report"
v-model="query.is_report"
active-color="#409EFF"
inactive-color="#F56C6C"
active-value='true'
inactive-valu='false'
/>
</el-form-item>
<el-dropdown split-button type="primary" class="filter-item" @click="report()">
<i class="el-icon-search el-icon--left" />查询
</el-dropdown>
<rrOperation :crud="crud" />
</el-form>
</el-card>
</div>
<div class="crud-opts2" style="margin-top: 30px;margin-bottom: 15px">
<span class="role-span">工单生产记录详情</span>
<span class="crud-opts-right2">
@@ -38,7 +60,8 @@
<!--表格渲染-->
<el-table
ref="table"
:data="tableData"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
max-height="600"
border
@@ -60,17 +83,17 @@
<el-input v-model = scope.row.report_qty></el-input>
</template>
</el-table-column>
<el-table-column prop="nok_qty" label="报废数量" >
<template slot-scope="scope">
<el-input v-model = scope.row.nok_qty></el-input>
</template>
</el-table-column>
<el-table-column prop="repare_qty" label="报修数量" >
<template slot-scope="scope">
<el-input v-model = scope.row.repare_qty></el-input>
</template>
</el-table-column>
<el-table-column prop="person_finish_qty" label="人员期末数量" />
<!-- <el-table-column prop="nok_qty" label="报废数量" >-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model = scope.row.nok_qty></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="repare_qty" label="报修数量" >-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model = scope.row.repare_qty></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="person_finish_qty" label="人员期末数量" />-->
<el-table-column prop="operatetime_start" label="开工时间" />
<el-table-column prop="operatetime_end" label="完工时间" />
<el-table-column prop="report_status" label="报工状态" >
@@ -89,8 +112,7 @@
</el-table>
<!--分页组件-->
<!-- <pagination />-->
<pagination />
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false">确定</el-button>
@@ -101,12 +123,56 @@
<script>
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import crudProduceshiftorder from '@/views/wms/product_manage/workorder/produceshiftorder'
import CRUD, { presenter, header, form } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import rrOperation from '@crud/RR.operation'
const defaultForm = { sale_id: null,
is_report: null,
workorder_id: null,
workorder_code: null,
producedeviceorder_code: null,
shift_type_scode: null,
workprocedure_id: null,
produce_date: null,
plan_qty: null,
real_qty: null,
report_qty: null,
material_id: null,
material_code: null,
material_weight: null,
planproducestart_date: null,
planproduceend_date: null,
realproducestart_date: null,
realproduceend_date: null,
order_status: null,
is_needmove: null,
order_type_scode: null,
create_id: null,
create_name: null,
create_time: null,
update_optid: null,
update_optname: null,
update_time: null,
sysdeptid: null,
syscompanyid: null,
is_delete: null,
material_name: null,
device_id: null,
is_canupdate_update: null,
material_spec: null }
export default {
name: 'ViewDialog',
components: { },
components: { crudOperation, pagination, rrOperation },
cruds() {
return [
CRUD({ title: '报工审核', url: '/api/produceWorkorder/reportQuery2', query: {}, idField: 'macoperate_id', crudMethod: { ...crudProduceshiftorder }})
]
},
dicts: ['PDM_BI_SHIFTTYPE', 'MPS_BD_ORDERSTATUS', 'is_used', 'PDM_BI_ORDERTYPE', 'IS_OR_NOT'],
mixins: [],
mixins: [presenter(), header(), form(defaultForm)],
props: {
dialogShow: {
type: Boolean,
@@ -194,8 +260,7 @@ export default {
const arr = []
arr.push(data)
crudProduceshiftorder.reportApprove(arr).then(res => {
this.tableData = res.content
this.report()
//todo:刷新数据
})
},
setForm() {

View File

@@ -0,0 +1,208 @@
<template>
<div class="app-container">
<!--表单组件-->
<!-- 字典列表 -->
<el-card class="box-card">
<!--工具栏-->
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-form ref="form" :inline="true" :rules="rules" size="mini" label-width="180px">
<el-form-item label="工单编码">
<el-input v-model="query.workorder_code" style="width: 200px;" clearable/>
</el-form-item>
<el-form-item label="班次类型" prop="shift_type_scode">
<el-select
v-model="query.shift_type_scode"
style="width: 200px"
clearable
filterable
placeholder="请选择"
>
<el-option
v-for="item in dict.PDM_BI_SHIFTTYPE"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="生产日期">
<el-date-picker
v-model="query.create_time"
type="daterange"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00','23:59:59']"
/>
</el-form-item>
<el-form-item label="只显示未审核">
<el-switch
v-model="query.is_report"
active-color="#409EFF"
inactive-color="#F56C6C"
active-value='true'
inactive-valu='false'
/>
</el-form-item>
<el-dropdown split-button type="primary" class="filter-item" @click="report()">
<i class="el-icon-search el-icon--left" />查询
</el-dropdown>
</el-form>
</div>
<crudOperation v-show="false" :permission="permission" />
</div>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
highlight-current-row
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="workorder_code" label="工单编号" />
<el-table-column prop="seq_number" label="报工顺序号" />
<el-table-column prop="shift_type_scode" label="班次类型">
<template slot-scope="scope">
{{ dict.label.PDM_BI_SHIFTTYPE[scope.row.shift_type_scode] }}
</template>
</el-table-column>
<el-table-column prop="product_area" label="生产车间" />
<el-table-column prop="device_code" label="设备编码" align="center" />
<el-table-column prop="needproduct_qty" label="待生产数" />
<el-table-column prop="report_qty" label="报工数量" >
<template slot-scope="scope">
<el-input v-model = scope.row.report_qty></el-input>
</template>
</el-table-column>
<el-table-column prop="nok_qty" label="报废数量" >
<template slot-scope="scope">
<el-input v-model = scope.row.nok_qty></el-input>
</template>
</el-table-column>
<el-table-column prop="repare_qty" label="报修数量" >
<template slot-scope="scope">
<el-input v-model = scope.row.repare_qty></el-input>
</template>
</el-table-column>
<el-table-column prop="person_finish_qty" label="人员期末数量" />
<el-table-column prop="operatetime_start" label="开工时间" />
<el-table-column prop="operatetime_end" label="完工时间" />
<el-table-column prop="report_status" label="报工状态" >
<template slot-scope="scope">
{{ reportStatus[scope.row.report_status-1].label }}
</template>
</el-table-column>
<el-table-column prop="produce_person_name" label="操作人" align="center" />
<el-table-column prop="confirm_name" label="审核人" align="center" />
<el-table-column prop="confirm_time" label="审核时间" align="center" />
<el-table-column label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<el-button :disabled="scope.row.report_status =='3'" size="mini" style="margin-left: -1px;margin-right: 2px" type="text" @click="reportApprove(scope.row)">提交审核</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</el-card>
</div>
</template>
<script>
import crudReport from '@/views/wms/product_manage/workorder/produceshiftorder'
import CRUD, { presenter, header, form } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import rrOperation from '@crud/RR.operation'
const defaultForm = { sale_id: null,
is_report: null,
workorder_id: null,
workorder_code: null,
producedeviceorder_code: null,
shift_type_scode: null,
workprocedure_id: null,
produce_date: null,
plan_qty: null,
real_qty: null,
report_qty: null,
material_id: null,
material_code: null,
material_weight: null,
planproducestart_date: null,
planproduceend_date: null,
realproducestart_date: null,
realproduceend_date: null,
order_status: null,
is_needmove: null,
order_type_scode: null,
create_id: null,
create_name: null,
create_time: null,
update_optid: null,
update_optname: null,
update_time: null,
sysdeptid: null,
syscompanyid: null,
is_delete: null,
material_name: null,
device_id: null,
is_canupdate_update: null,
material_spec: null }
export default {
name: 'reportDialog',
components: { crudOperation, pagination, rrOperation },
dicts: ['product_area'],
cruds() {
return [
CRUD({ title: '报工审核', url: '/api/produceWorkorder/reportQuery2', query: {}, idField: 'macoperate_id', crudMethod: { ...crudReport }})
]
},
mixins: [presenter(), header(), form(defaultForm)],
data() {
return {
trueorfalse: [{ value: true, label: '是' }, { value: false, label: '否' }],
reportStatus: [{ value: '1', label: '创建记录' }, { value: '2', label: '报工完成' }, { value: '3', label: '审核完成' }],
queryTypeOptions: [
{ key: 'name', display_name: '字典名称' },
{ key: 'description', display_name: '描述' }
],
rules: {
material_spec: [
{ required: true, message: '请输入编码', trigger: 'blur' }
]
},
permission: {
add: ['admin', 'dict:add'],
edit: ['admin', 'dict:edit'],
del: ['admin', 'dict:del']
}
}
},
methods: {
report() {
crudReport.reportQuery({ workorder_code: this.form.workorder_code, is_report: this.form.is_report }).then(res => {
this.tableData = res.content
})
},
reportApprove(data) {
const arr = []
arr.push(data)
crudReport.reportApprove(arr).then(res => {
this.tableData = res.content
this.report()
})
},
setForm() {
this.dialogVisible = true
}
}
}
</script>
<style scoped>
</style>

View File

@@ -52,7 +52,7 @@
@current-change="handleCurrentChange"
>
<el-table-column type="selection" width="55" />
<el-table-column show-overflow-tooltip prop="material_spec" label="物料系列" />
<el-table-column show-overflow-tooltip prop="rule_code" label="物料系列" />
<el-table-column show-overflow-tooltip prop="process_id" label="工序调度编号" />
<el-table-column show-overflow-tooltip prop="process_name" label="工序调度名称" />
<el-table-column

View File

@@ -109,7 +109,7 @@
<el-select
v-model="task_status"
multiple
style="width: 400px"
style="width: 200px"
placeholder="任务状态"
class="filter-item"
clearable
@@ -127,12 +127,20 @@
/>
</el-select>
</el-form-item>
<rrOperation />
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<span>
未完成数
<el-input
v-model="undo"
clearable
style="width: 60px"
/>
<el-button type="primary" @click="taskScheduler()">任务调度</el-button>
</span>
<crudOperation :permission="permission" />
<!--表格渲染-->
<el-table
@@ -143,20 +151,21 @@
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="50" />
<el-table-column prop="task_code" label="任务编码" min-width="100" show-overflow-tooltip />
<el-table-column prop="table_fk_id" 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 :formatter = "acsTypeName"></el-table-column>
<el-table-column v-if="true" prop="material_spec" label="物料标识" min-width="150" show-overflow-tooltip />
<el-table-column prop="task_name" label="任务类型" min-width="120" show-overflow-tooltip />
<el-table-column prop = "acs_task_type" label="acs任务类型" min-width="120" show-overflow-tooltip :formatter = "acsTypeName"></el-table-column>
<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 />
<el-table-column prop="point2_region_name" label="终点区域" min-width="120" show-overflow-tooltip />
<el-table-column prop="point_code3" label="返回点" min-width="100" show-overflow-tooltip />
<el-table-column prop="product_area" label="生产车间" />
<el-table-column prop="point1_region_name" label="起点区域" width="120" />
<el-table-column prop="point2_region_name" label="终点区域" min-width="120" show-overflow-tooltip />
<el-table-column prop="point3_region_name" label="返回点区域" min-width="120" show-overflow-tooltip />
<el-table-column prop="vehicle_code" label="载具编码1" min-width="100" show-overflow-tooltip />
<el-table-column prop="vehicle_code2" label="载具编码2" min-width="100" show-overflow-tooltip />
@@ -232,7 +241,6 @@ 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'
export default {
name: 'Task',
@@ -273,6 +281,7 @@ export default {
fullscreen: false,
currentComponent: '',
openParam: {},
undo: 0,
create_time: [],
task_status: ['-1'],
taskStatusList: [],
@@ -297,6 +306,9 @@ export default {
crudTask.getTaskType().then(res => {
this.taskTypeList = res
})
crudTask.undo().then(res => {
this.undo = res
})
crudTask.getAcsTaskType().then(res => {
this.acsTaskTypeList = res
})

View File

@@ -43,6 +43,12 @@ export function getAcsTaskType() {
method: 'get'
})
}
export function undo() {
return request({
url: 'api/task//undo',
method: 'get'
})
}
export function getFinishType() {
return request({
@@ -74,5 +80,6 @@ export default {
getTaskType,
getAcsTaskType,
getFinishType,
scheduler
scheduler,
undo
}

View File

@@ -35,51 +35,34 @@
@row-click="clcikRow"
>
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
<el-table-column show-overflow-tooltip prop="bill_code" label="单据号" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" align="center" />
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" align="center" />
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" align="center" />
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column
show-overflow-tooltip
prop="assign_qty"
:formatter="crud.formatNum3"
label="已分配数量"
align="center"
/>
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
</el-table>
</el-card>
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
<!-- <el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini">
<el-form-item prop="checked">
<el-checkbox v-model="form.checked" true-label="1" false-label="0" @change="checkedChange()">仅显示未完成的任务</el-checkbox>
</el-form-item>
</el-form>
</el-card>
</el-card>-->
<div class="crud-opts2">
<span class="role-span">入库单据任务项</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<!-- <el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="updateTask()"
>
修改
</el-button>-->
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
:disabled="dis_del"
@click="delTask()"
>
删除
@@ -90,7 +73,8 @@
type="warning"
icon="el-icon-check"
size="mini"
@click="reIssueTask()"
:disabled="dis_send"
@click="sendTask()"
>
下发
</el-button>
@@ -100,20 +84,11 @@
type="warning"
icon="el-icon-check"
size="mini"
:disabled="dis_confirm"
@click="confirmTask()"
>
标识完成
</el-button>
<!-- <el-button
slot="left"
class="filter-item"
type="warning"
icon="el-icon-check"
size="mini"
@click="cancelTask()"
>
取消完成
</el-button>-->
</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
@@ -130,33 +105,30 @@
@row-click="clcikDisRow"
>
<el-table-column width="60" prop="seq_no" label="序号" align="center" />
<el-table-column width="150" prop="material_code" label="物料编码" align="center" />
<el-table-column width="150" prop="material_name" label="物料名称" align="center" />
<el-table-column width="170" prop="pcsn" label="子卷号" align="center" />
<el-table-column width="120" prop="sap_pcsn" label="SAP批次" align="center" />
<el-table-column width="230" prop="box_no" label="木箱码" align="center" />
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip width="170" prop="pcsn" label="批次" align="center" />
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column show-overflow-tooltip prop="struct_code" label="分配货位" align="center" />
<el-table-column show-overflow-tooltip prop="work_status" label="指令状态" :formatter="statusFormat" align="center" />
<el-table-column show-overflow-tooltip prop="task_code" label="指令操作号" align="center" />
<el-table-column show-overflow-tooltip prop="point_code" label="入库点位编码" align="center" />
<el-table-column show-overflow-tooltip prop="point_name" label="入库点位名称" align="center" />
<el-table-column show-overflow-tooltip prop="point_code1" label="起始位置" align="center" />
<el-table-column show-overflow-tooltip prop="point_code2" label="目的位置" align="center" />
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
<el-table-column show-overflow-tooltip prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
<el-table-column show-overflow-tooltip prop="task_type" label="任务类型" align="center" width="150px" :formatter="formatType"/>
</el-table>
</el-card>
<StructUpdateDiv :dialog-show.sync="structShow" :sect-prop="sectProp" :bucket-form="bucketForm" @updateCommit="updateCommit" />
</el-dialog>
</template>
<script>
import CRUD, { crud } from '@crud/crud'
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
export default {
name: 'TaskDialog',
components: { StructUpdateDiv },
components: {},
mixins: [crud()],
dicts: ['io_bill_status', 'task_status'],
dicts: ['SCH_TASK_TYPE_DTL', 'task_status'],
props: {
dialogShow: {
type: Boolean,
@@ -173,23 +145,16 @@ export default {
data() {
return {
dialogVisible2: false,
tableDtl: [],
stor_id: '',
sect_id: '',
sectProp: null,
structShow: false,
sects: [],
dis_row: null,
dis_del: true,
dis_send: true,
dis_confirm: true,
fullscreenLoading: false,
bucketParam: null,
bucketForm: null,
bucketDtlShow: false,
form: {
tableMater: [],
dtl_row: null,
checked: '1'
},
storlist: [],
rules: {
}
}
@@ -209,154 +174,81 @@ export default {
this.form.dtl_row = null
this.$emit('AddChanged')
},
clcikRow(row) {
this.form.dtl_row = row
this.queryTableDdis()
},
clcikDisRow(row) {
debugger
this.dis_row = row
if (this.dis_row.task_status < 5) {
this.dis_del = false
this.dis_send = false
} else {
this.dis_del = true
this.dis_send = true
}
if (this.dis_row.task_status < 7) {
this.dis_confirm = false
} else {
this.dis_confirm = true
}
},
delTask() {
if (!this.dis_row) {
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.dis_row.work_status !== '04') {
this.crud.notify('只能对状态为生成的任务进行删除!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.fullscreenLoading = true
crudRawAssist.delTask(this.dis_row).then(res => {
crudProductIn.delTask({ 'iostorinvdis_id': this.dis_row.iostorinvdis_id }).then(res => {
this.crud.notify('删除成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.fullscreenLoading = false
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
this.form.tableMater = res
}).catch(() => {
this.fullscreenLoading = false
})
crudRawAssist.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '2' }).then(res => {
this.openParam = res
this.dis_row = null
this.crud.notify('删除任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => {
this.fullscreenLoading = false
})
this.queryTableDdis()
this.initFlag()
}).catch(() => {
this.fullscreenLoading = false
})
},
statusFormat(row, column) {
return this.dict.label.task_status[row.work_status]
sendTask() {
this.fullscreenLoading = true
crudProductIn.sendTask({ 'task_id': this.dis_row.task_id }).then(res => {
this.crud.notify('下发成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.fullscreenLoading = false
this.queryTableDdis()
this.initFlag()
}).catch(() => {
this.fullscreenLoading = false
})
},
confirmTask() {
if (!this.dis_row) {
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.dis_row.work_status === '99' || this.dis_row.work_status === '00') {
this.crud.notify('只能已生成或下发进行中的任务完成!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.fullscreenLoading = true
crudRawAssist.confirmTask(this.dis_row).then(res => {
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
this.form.tableMater = res2
this.fullscreenLoading = false
this.crud.notify('强制确认任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => {
this.fullscreenLoading = false
})
crudProductIn.confirmTask({ 'task_id': this.dis_row.task_id }).then(res => {
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.fullscreenLoading = false
this.queryTableDdis()
this.initFlag()
}).catch(() => {
this.fullscreenLoading = false
})
},
cancelTask() {
if (!this.dis_row) {
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.dis_row.work_status !== '99') {
this.crud.notify('只能对状态为完成的任务进行取消!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.fullscreenLoading = true
crudRawAssist.cancelTask(this.dis_row).then(res => {
this.fullscreenLoading = false
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
this.form.tableMater = res2
this.crud.notify('取消确认任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => {
this.fullscreenLoading = false
})
}).catch(() => {
this.fullscreenLoading = false
})
},
reIssueTask() {
if (!this.dis_row) {
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.dis_row.work_status !== '04') {
this.crud.notify('只能对状态为生成的任务进行下发!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.fullscreenLoading = true
crudRawAssist.reIssueTask(this.dis_row).then(res => {
this.fullscreenLoading = false
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
this.form.tableMater = res2
this.crud.notify('下发任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
}).catch(() => {
this.fullscreenLoading = false
})
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
this.form.tableMater = res
})
},
updateTask() {
if (!this.dis_row) {
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
return
}
debugger
if (this.dis_row.work_status !== '01') {
this.crud.notify('只能对状态为生成的任务进行修改!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.structShow = true
this.bucketForm = this.dis_row
},
updateCommit() {
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
this.form.tableMater = res
this.crud.notify('修改任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
checkedChange(val) {
this.form.dtl_row.checked = this.form.checked
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
this.form.tableMater = res
})
},
clcikRow(row, column, event) {
this.form.dtl_row = row
row.checked = this.form.checked
crudRawAssist.queryTask(row).then(res => {
this.form.tableMater = res
})
},
clcikDisRow(row, column, event) {
this.dis_row = row
},
assignFormat(row, column) {
if (!row.assign_qty) {
return '0'
} else {
return row.assign_qty
}
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
bucketDtl(row) {
crudRawAssist.bucketDtl(row).then(res => {
this.bucketParam = res
this.bucketDtlShow = true
})
queryTableDdis() {
if (this.form.dtl_row !== null) {
crudProductIn.getIosInvDis({ 'iostorinvdtl_id': this.form.dtl_row.iostorinvdtl_id }).then(res => {
this.form.tableMater = res
}).catch(() => {
this.form.tableMater = []
})
}
},
formatStatus(row) {
return this.dict.label.task_status[row.task_status]
},
formatType(row) {
return this.dict.label.SCH_TASK_TYPE_DTL[row.task_type]
},
initFlag() {
this.dis_del = true
this.dis_send = true
this.dis_confirm = true
}
}
}

View File

@@ -141,17 +141,17 @@
>
分配
</el-button>
<!-- <el-button
slot="right"
class="filter-item"
type="success"
:disabled="dis_flag"
icon="el-icon-position"
size="mini"
@click="divOpen"
>
作业任务
</el-button>-->
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-position"
size="mini"
:disabled="task_flag"
@click="taskOpen"
>
作业任务
</el-button>
<el-button
slot="right"
class="filter-item"
@@ -220,6 +220,7 @@
<AddDialog @AddChanged="querytable" />
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
<DivDialog :dialog-show.sync="divShow" :stor-id="storId" :open-param="openParam" @AddChanged="querytable" />
<TaskDialog :dialog-show.sync="taskShow" :open-param="taskOpenParam" />
</div>
</template>
@@ -237,10 +238,11 @@ import DivDialog from '@/views/wms/storage_manage/product/productIn/DivDialog'
import ViewDialog from '@/views/wms/storage_manage/product/productIn/ViewDialog'
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
import { mapGetters } from 'vuex'
import TaskDialog from '@/views/wms/storage_manage/product/productIn/TaskDialog'
export default {
name: 'ProductIn',
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog },
components: { TaskDialog, ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog },
cruds() {
return CRUD({
title: '',
@@ -258,15 +260,18 @@ export default {
height: document.documentElement.clientHeight - 180 + 'px;',
permission: {},
dis_flag: true,
task_flag: true,
confirm_flag: true,
disShow: false,
viewShow: false,
mstrow: {},
divShow: false,
openParam: [],
taskOpenParam: [],
currentRow: null,
storlist: [],
storId: null
storId: null,
taskShow: false
}
},
computed: {
@@ -320,12 +325,18 @@ export default {
} else {
this.confirm_flag = true
}
if (currentRow.bill_status !== '99') {
this.task_flag = false
} else {
this.task_flag = true
}
}
},
handleCurrentChange(currentRow) {
if (currentRow === null) {
this.dis_flag = true
this.confirm_flag = true
this.task_flag = true
this.currentRow = {}
}
},
@@ -357,6 +368,12 @@ export default {
this.divShow = true
})
},
taskOpen() {
crudProductIn.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
this.taskOpenParam = res
})
this.taskShow = true
},
querytable() {
this.onSelectAll()
this.crud.toQuery()

View File

@@ -104,6 +104,30 @@ export function cancelConfirmvehicle(data) {
})
}
export function delTask(data) {
return request({
url: '/api/productIn/delTask',
method: 'post',
data
})
}
export function sendTask(data) {
return request({
url: '/api/productIn/sendTask',
method: 'post',
data
})
}
export function confirmTask(data) {
return request({
url: '/api/productIn/confirmTask',
method: 'post',
data
})
}
export default {
add,
edit,
@@ -117,5 +141,8 @@ export default {
unDivStruct,
setPoint,
confirm,
cancelConfirmvehicle
cancelConfirmvehicle,
delTask,
sendTask,
confirmTask
}

View File

@@ -0,0 +1,150 @@
<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="80px"
label-suffix=":"
>
<el-form-item label="所属仓库">
<el-select
v-model="query.stor_id"
clearable
size="mini"
placeholder="单据状态"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in storlist"
:key="item.stor_id"
:label="item.stor_name"
:value="item.stor_id"
/>
</el-select>
</el-form-item>
<el-form-item label="入库日期">
<el-date-picker
v-model="query.createTime"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery"
/>
</el-form-item>
<el-form-item label="仓位">
<el-input
v-model="query.struct_code"
size="mini"
clearable
placeholder="仓位"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="物料">
<el-input
v-model="query.material_code"
size="mini"
clearable
placeholder="仓位"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation />
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission"/>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
size="mini"
:data="crud.data"
highlight-current-row
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库名称" />
<el-table-column show-overflow-tooltip prop="sect_name" label="库区名称" />
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位编码" />
<el-table-column show-overflow-tooltip prop="struct_name" label="仓位名称" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可用数量" :formatter="crud.formatNum3" />
<el-table-column show-overflow-tooltip prop="frozen_qty" label="冻结数量" :formatter="crud.formatNum3" />
<el-table-column show-overflow-tooltip prop="ivt_qty" label="库存数量" :formatter="crud.formatNum3" />
<el-table-column show-overflow-tooltip prop="warehousing_qty" label="待入数量" :formatter="crud.formatNum3" />
<el-table-column show-overflow-tooltip prop="unit_name" label="单位" />
<el-table-column show-overflow-tooltip prop="instorage_time" label="入库时间" min-width="150" />
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import CRUD, { crud, 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 DateRangePicker from '@/components/DateRangePicker/index'
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
import ProductIvt from '@/views/wms/storage_manage/product/productIvt/productivt'
export default {
name: 'ProductIn',
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
cruds() {
return CRUD({
title: '成品库存',
optShow: { add: false, reset: true },
idField: 'stockrecord_id',
url: '/api/stIvtStructivtCp',
crudMethod: { ...ProductIvt }
})
},
mixins: [presenter(), header(), crud()],
// 数据字典
data() {
return {
height: document.documentElement.clientHeight - 180 + 'px;',
permission: {},
storlist: [],
storId: null
}
},
mounted: function() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 180 + 'px;'
}
},
created() {
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
this.storlist = res.content
})
},
methods: {
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog__body {
padding-top: 10px;
}
</style>

View File

@@ -0,0 +1,31 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: '/api/stIvtStructivtCp',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: '/api/stIvtStructivtCp/delete',
method: 'post',
data: ids
})
}
export function edit(data) {
return request({
url: '/api/stIvtStructivtCp/update',
method: 'post',
data
})
}
export default {
add,
edit,
del
}

View File

@@ -0,0 +1,281 @@
<template>
<el-dialog
v-loading.fullscreen.lock="fullscreenLoading"
append-to-body
:visible.sync="dialogVisible2"
destroy-on-close
:show-close="false"
fullscreen
@close="close"
>
<span slot="title" class="dialog-footer">
<div class="crud-opts2">
<span class="el-dialog__title2">入库单任务操作</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button slot="left" type="info" @click="dialogVisible2 = false">关闭</el-button>
</span>
</div>
</span>
<div class="crud-opts2">
<span class="role-span">入库单据明细项</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
<el-table
ref="table"
:data="this.openParam"
style="width: 100%;"
max-height="300"
border
highlight-current-row
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@row-click="clcikRow"
>
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" align="center" />
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
</el-table>
</el-card>
<!-- <el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini">
<el-form-item prop="checked">
<el-checkbox v-model="form.checked" true-label="1" false-label="0" @change="checkedChange()">仅显示未完成的任务</el-checkbox>
</el-form-item>
</el-form>
</el-card>-->
<div class="crud-opts2">
<span class="role-span">入库单据任务项</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
:disabled="dis_del"
@click="delTask()"
>
删除
</el-button>
<el-button
slot="left"
class="filter-item"
type="warning"
icon="el-icon-check"
size="mini"
:disabled="dis_send"
@click="sendTask()"
>
下发
</el-button>
<el-button
slot="left"
class="filter-item"
type="warning"
icon="el-icon-check"
size="mini"
:disabled="dis_confirm"
@click="confirmTask()"
>
标识完成
</el-button>
</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
<el-table
ref="disTable"
:data="form.tableMater"
style="width: 100%;"
max-height="300"
:row-class-name="tableRowClassName"
highlight-current-row
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@row-click="clcikDisRow"
>
<el-table-column width="60" prop="seq_no" label="序号" align="center" />
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip width="170" prop="pcsn" label="批次" align="center" />
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column show-overflow-tooltip prop="point_code1" label="起始位置" align="center" />
<el-table-column show-overflow-tooltip prop="point_code2" label="目的位置" align="center" />
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
<el-table-column show-overflow-tooltip prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
<el-table-column show-overflow-tooltip prop="task_type" label="任务类型" align="center" width="150px" :formatter="formatType"/>
</el-table>
</el-card>
</el-dialog>
</template>
<script>
import CRUD, { crud } from '@crud/crud'
import crudProductOut from '@/views/wms/storage_manage/product/productOut/productout'
export default {
name: 'TaskDialog',
components: {},
mixins: [crud()],
dicts: ['SCH_TASK_TYPE_DTL', 'task_status'],
props: {
dialogShow: {
type: Boolean,
default: false
},
bussConfig: {
type: Object
},
openParam: {
type: Array,
default: () => { return [] }
}
},
data() {
return {
dialogVisible2: false,
dis_row: null,
dis_del: true,
dis_send: true,
dis_confirm: true,
fullscreenLoading: false,
form: {
tableMater: [],
dtl_row: null,
checked: '1'
},
rules: {
}
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible2 = newValue
}
}
},
methods: {
close() {
this.$emit('update:dialogShow', false)
this.form.tableMater = []
this.form.checked = '1'
this.form.dtl_row = null
this.$emit('AddChanged')
},
clcikRow(row) {
this.form.dtl_row = row
this.queryTableDdis()
},
clcikDisRow(row) {
debugger
this.dis_row = row
if (this.dis_row.task_status < 5) {
this.dis_del = false
this.dis_send = false
} else {
this.dis_del = true
this.dis_send = true
}
if (this.dis_row.task_status < 7) {
this.dis_confirm = false
} else {
this.dis_confirm = true
}
},
delTask() {
this.fullscreenLoading = true
crudProductOut.delTask({ 'iostorinvdis_id': this.dis_row.iostorinvdis_id }).then(res => {
this.crud.notify('删除成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.fullscreenLoading = false
this.queryTableDdis()
this.initFlag()
}).catch(() => {
this.fullscreenLoading = false
})
},
sendTask() {
this.fullscreenLoading = true
crudProductOut.sendTask({ 'task_id': this.dis_row.task_id }).then(res => {
this.crud.notify('下发成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.fullscreenLoading = false
this.queryTableDdis()
this.initFlag()
}).catch(() => {
this.fullscreenLoading = false
})
},
confirmTask() {
this.fullscreenLoading = true
crudProductOut.confirmTask({ 'task_id': this.dis_row.task_id }).then(res => {
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.fullscreenLoading = false
this.queryTableDdis()
this.initFlag()
}).catch(() => {
this.fullscreenLoading = false
})
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
queryTableDdis() {
if (this.form.dtl_row !== null) {
crudProductOut.getIosInvDis({ 'iostorinvdtl_id': this.form.dtl_row.iostorinvdtl_id }).then(res => {
this.form.tableMater = res
}).catch(() => {
this.form.tableMater = []
})
}
},
formatStatus(row) {
return this.dict.label.task_status[row.task_status]
},
formatType(row) {
return this.dict.label.SCH_TASK_TYPE_DTL[row.task_type]
},
initFlag() {
this.dis_del = true
this.dis_send = true
this.dis_confirm = true
}
}
}
</script>
<style>
.crud-opts2 {
padding: 0;
display: -webkit-flex;
display: flex;
align-items: center;
}
.crud-opts2 .el-dialog__title2 {
line-height: 24px;
font-size:20px;
color:#303133;
}
.crud-opts2 .role-span {
padding: 10px 0px 10px 0px;
}
.crud-opts2 .crud-opts-form {
padding: 10px 0px 0px 20px;
}
.input-with-select {
background-color: #fff;
}
</style>

View File

@@ -101,6 +101,17 @@
>
分配
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-position"
size="mini"
:disabled="task_flag"
@click="taskOpen"
>
作业任务
</el-button>
<el-button
slot="right"
class="filter-item"
@@ -170,6 +181,7 @@
<AddDialog @AddChanged="querytable" />
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-id="storId" :row-mst="mstrow" @DivChanged="querytable" />
<TaskDialog :dialog-show.sync="taskShow" :open-param="taskOpenParam" />
</div>
</template>
@@ -184,10 +196,11 @@ import AddDialog from '@/views/wms/storage_manage/product/productOut/AddDialog'
import DivDialog from '@/views/wms/storage_manage/product/productOut/DivDialog'
import ViewDialog from '@//views/wms/storage_manage/product/productOut/ViewDialog'
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
import TaskDialog from '@/views/wms/storage_manage/product/productOut/TaskDialog'
export default {
name: 'ProductOut',
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog },
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog, TaskDialog },
cruds() {
return CRUD({ title: '用户', idField: 'iostorinv_id', url: 'api/productOut', crudMethod: { ...productOut },
optShow: {
@@ -209,10 +222,12 @@ export default {
edit: ['admin', 'checkoutbill:edit'],
del: ['admin', 'checkoutbill:del']
},
task_flag: true,
openMoneyDialog: false,
loadingConfirm: false,
divShow: false,
taskShow: false,
taskOpenParam: [],
dis_flag: true,
work_flag: true,
confirm_flag: true,
@@ -281,6 +296,11 @@ export default {
} else {
this.confirm_flag = true
}
if (current.bill_status !== '99') {
this.task_flag = false
} else {
this.task_flag = true
}
}
},
stateFormat(row, column) {
@@ -294,6 +314,7 @@ export default {
this.dis_flag = true
this.confirm_flag = true
this.work_flag = true
this.task_flag = true
this.currentRow = {}
}
},
@@ -308,6 +329,12 @@ export default {
this.mstrow = this.currentRow
})
},
taskOpen() {
productOut.getIosInvDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
this.taskOpenParam = res
})
this.taskShow = true
},
confirm() {
this.loadingConfirm = true
productOut.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {

View File

@@ -88,6 +88,30 @@ export function manualDiv(data) {
})
}
export function delTask(data) {
return request({
url: '/api/productOut/delTask',
method: 'post',
data
})
}
export function sendTask(data) {
return request({
url: '/api/productOut/sendTask',
method: 'post',
data
})
}
export function confirmTask(data) {
return request({
url: '/api/productOut/confirmTask',
method: 'post',
data
})
}
export default {
add,
edit,
@@ -99,5 +123,8 @@ export default {
setPoint,
confirm,
getStructIvt,
manualDiv
manualDiv,
delTask,
sendTask,
confirmTask
}