add:代码逻辑优化;
This commit is contained in:
@@ -4,7 +4,14 @@
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.blurry" clearable placeholder="模糊搜索" style="width: 200px" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
clearable
|
||||
placeholder="模糊搜索"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
<rrOperation />
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,15 @@
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.job_name" clearable size="mini" placeholder="输入任务名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery" />
|
||||
<el-input
|
||||
v-model="query.job_name"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="输入任务名称搜索"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="toQuery"
|
||||
/>
|
||||
<rrOperation />
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
@@ -16,19 +24,25 @@
|
||||
type="info"
|
||||
icon="el-icon-tickets"
|
||||
@click="doLog"
|
||||
>日志</el-button>
|
||||
>日志
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<Log ref="log" />
|
||||
</div>
|
||||
<!--Form表单-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" append-to-body width="730px">
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
width="730px"
|
||||
>
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-form-item label="任务名称" prop="job_name">
|
||||
<el-input v-model="form.job_name" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务描述" prop="description">
|
||||
<el-input v-model="form.description" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="Bean名称" prop="bean_name">
|
||||
<el-input v-model="form.bean_name" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
@@ -55,6 +69,9 @@
|
||||
<el-form-item label="告警邮箱" prop="email">
|
||||
<el-input v-model="form.email" placeholder="多个邮箱用逗号隔开" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="参数内容">
|
||||
<el-input v-model="form.params" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="失败后暂停">
|
||||
<el-radio-group v-model="form.pause_after_failure" style="width: 220px">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
@@ -67,8 +84,8 @@
|
||||
<el-radio :label="true">暂停</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数内容">
|
||||
<el-input v-model="form.params" style="width: 556px;" rows="4" type="textarea" />
|
||||
<el-form-item label="使用说明" prop="description">
|
||||
<el-input v-model="form.description" style="width: 556px;" rows="4" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -77,45 +94,89 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="job_id" label="任务ID" />
|
||||
<el-table-column show-overflow-tooltip prop="job_name" label="任务名称" min-width="120" />
|
||||
|
||||
<el-table-column show-overflow-tooltip prop="is_pause" width="90px" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.is_pause ? 'warning' : 'success'">{{
|
||||
scope.row.is_pause ? '已暂停' : '运行中'
|
||||
}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="description" width="1080px" label="使用说明" />
|
||||
<el-table-column show-overflow-tooltip prop="bean_name" label="Bean名称" />
|
||||
<el-table-column show-overflow-tooltip prop="method_name" label="执行方法" />
|
||||
<el-table-column show-overflow-tooltip prop="params" label="参数" />
|
||||
<el-table-column show-overflow-tooltip prop="cron_expression" label="cron表达式" min-width="100" show-tooltip-when-overflow />
|
||||
<el-table-column show-overflow-tooltip prop="is_pause" width="90px" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.is_pause ? 'warning' : 'success'">{{ scope.row.is_pause ? '已暂停' : '运行中' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="description" width="150px" label="描述" />
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="cron_expression"
|
||||
label="cron表达式"
|
||||
min-width="100"
|
||||
show-tooltip-when-overflow
|
||||
/>
|
||||
|
||||
<el-table-column show-overflow-tooltip prop="create_time" width="136px" label="创建日期">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.create_time) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-permission="['admin','timing:edit','timing:del']" label="操作" width="170px" align="center" fixed="right">
|
||||
<el-table-column
|
||||
v-permission="['admin','timing:edit','timing:del']"
|
||||
label="操作"
|
||||
width="170px"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button v-permission="['admin','timing:edit']" size="mini" style="margin-right: 3px;" type="text" @click="crud.toEdit(scope.row)">编辑</el-button>
|
||||
<el-button v-permission="['admin','timing:edit']" style="margin-left: -2px" type="text" size="mini" @click="execute(scope.row.job_id)">执行</el-button>
|
||||
<el-button v-permission="['admin','timing:edit']" style="margin-left: 3px" type="text" size="mini" @click="updateStatus(scope.row.job_id,scope.row.is_pause ? '恢复' : '暂停')">
|
||||
<el-button
|
||||
v-permission="['admin','timing:edit']"
|
||||
size="mini"
|
||||
style="margin-right: 3px;"
|
||||
type="text"
|
||||
@click="crud.toEdit(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-permission="['admin','timing:edit']"
|
||||
style="margin-left: -2px"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="execute(scope.row.job_id)"
|
||||
>执行
|
||||
</el-button>
|
||||
<el-button
|
||||
v-permission="['admin','timing:edit']"
|
||||
style="margin-left: 3px"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="updateStatus(scope.row.job_id,scope.row.is_pause ? '恢复' : '暂停')"
|
||||
>
|
||||
{{ scope.row.is_pause ? '恢复' : '暂停' }}
|
||||
</el-button>
|
||||
<el-popover
|
||||
:ref="scope.row.job_id"
|
||||
v-permission="['admin','timing:del']"
|
||||
placement="top"
|
||||
width="200"
|
||||
>
|
||||
<p>确定停止并删除该任务吗?</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="$refs[scope.row.job_id].doClose()">取消</el-button>
|
||||
<el-button :loading="delLoading" type="primary" size="mini" @click="delMethod(scope.row.job_id)">确定</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" type="text" size="mini">删除</el-button>
|
||||
</el-popover>
|
||||
<!-- <el-popover-->
|
||||
<!-- :ref="scope.row.job_id"-->
|
||||
<!-- v-permission="['admin','timing:del']"-->
|
||||
<!-- placement="top"-->
|
||||
<!-- width="200"-->
|
||||
<!-- >-->
|
||||
<!-- <p>确定停止并删除该任务吗?</p>-->
|
||||
<!-- <div style="text-align: right; margin: 0">-->
|
||||
<!-- <el-button size="mini" type="text" @click="$refs[scope.row.job_id].doClose()">取消</el-button>-->
|
||||
<!-- <el-button :loading="delLoading" type="primary" size="mini" @click="delMethod(scope.row.job_id)">确定-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-button slot="reference" type="text" size="mini">删除</el-button>-->
|
||||
<!-- </el-popover>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -136,7 +197,26 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import Crontab from './components/crontab'
|
||||
|
||||
const defaultForm = { job_id: null, bean_name: null, cron_expression: null, is_pause: false, job_name: null, method_name: null, params: null, description: null, person_in_charge: null, email: null, sub_task: null, pause_after_failure: true, create_id: null, create_name: null, create_time: null, update_id: null, update_name: null, update_time: null }
|
||||
const defaultForm = {
|
||||
job_id: null,
|
||||
bean_name: null,
|
||||
cron_expression: null,
|
||||
is_pause: false,
|
||||
job_name: null,
|
||||
method_name: null,
|
||||
params: null,
|
||||
description: null,
|
||||
person_in_charge: null,
|
||||
email: null,
|
||||
sub_task: null,
|
||||
pause_after_failure: true,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_id: null,
|
||||
update_name: null,
|
||||
update_time: null
|
||||
}
|
||||
export default {
|
||||
name: 'Timing',
|
||||
components: { Log, pagination, crudOperation, rrOperation, Crontab },
|
||||
|
||||
@@ -38,4 +38,4 @@ export function execution(id) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { del, updateIsPause, execution, add, edit }
|
||||
export default { updateIsPause, execution, add, edit }
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<el-form
|
||||
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
@@ -20,7 +21,7 @@
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation/>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="任务号"
|
||||
@input="handleSearchInput('task_code')"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -27,6 +28,7 @@
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="任务ID"
|
||||
@input="handleSearchInput('task_id')"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -37,6 +39,7 @@
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="载具号"
|
||||
@input="handleSearchInput('vehicle_code')"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -46,6 +49,7 @@
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="起点"
|
||||
@input="handleSearchInput('point_code')"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -86,7 +90,6 @@
|
||||
placeholder="任务类型"
|
||||
class="filter-item"
|
||||
clearable
|
||||
@change="handTaskStatus"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.TASK_TYPE"
|
||||
@@ -96,19 +99,20 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button class="filter-item" type="success" icon="el-icon-delete" size="mini" @click="delQueryItem">清空条件</el-button>
|
||||
<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>
|
||||
<!-- <span>-->
|
||||
<!-- 未完成数:-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="undo"-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 60px"-->
|
||||
<!-- />-->
|
||||
<el-button type="primary" @click="taskScheduler()">执行整出任务</el-button>
|
||||
<!-- </span>-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -180,29 +184,28 @@
|
||||
<el-table-column prop="product_area" show-overflow-tooltip show-tooltip-when-overflow label="生产区域" />
|
||||
<el-table-column prop="id" show-overflow-tooltip show-tooltip-when-overflow label="任务ID" />
|
||||
<el-table-column prop="task_code" show-overflow-tooltip show-tooltip-when-overflow label="任务编码" />
|
||||
<el-table-column prop="task_type" show-overflow-tooltip show-tooltip-when-overflow width="140" label="任务类型">
|
||||
<el-table-column prop="task_type" show-overflow-tooltip show-tooltip-when-overflow width="140" label="任务类型">
|
||||
<template slot-scope="scope">
|
||||
{{ statusEnum.label.TASK_TYPE[scope.row.task_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="vehicle_code" show-overflow-tooltip show-tooltip-when-overflow :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" label="载具编码">
|
||||
<el-table-column prop="vehicle_code" show-overflow-tooltip show-tooltip-when-overflow :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" label="载具编码">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.vehicle_code ? scope.row.vehicle_code : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="status" show-overflow-tooltip show-tooltip-when-overflow label="任务状态">
|
||||
<template slot-scope="scope">
|
||||
{{ statusEnum.label.FORM_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="form_data" show-overflow-tooltip show-tooltip-when-overflow :min-width="flexWidth('form_data',crud.data,'物料信息')" label="物料信息" />
|
||||
<el-table-column prop="point_code1" show-overflow-tooltip show-tooltip-when-overflow width="130" label="起点1" />
|
||||
<el-table-column prop="point_code2" show-overflow-tooltip show-tooltip-when-overflow width="130" label="终点1" />
|
||||
<el-table-column prop="point_code3" show-overflow-tooltip show-tooltip-when-overflow width="130" label="起点2" />
|
||||
<el-table-column prop="point_code4" show-overflow-tooltip show-tooltip-when-overflow width="130" label="终点2" />
|
||||
<el-table-column prop="create_time" show-overflow-tooltip show-tooltip-when-overflow :min-width="flexWidth('create_time',crud.data,'创建时间')" label="创建时间" />
|
||||
<el-table-column prop="update_time" show-overflow-tooltip show-tooltip-when-overflow :min-width="flexWidth('update_time',crud.data,'修改时间')" label="修改时间" />
|
||||
<el-table-column prop="create_time" show-overflow-tooltip show-tooltip-when-overflow :min-width="flexWidth('create_time',crud.data,'创建时间')" label="创建时间" />
|
||||
<el-table-column prop="update_time" show-overflow-tooltip show-tooltip-when-overflow :min-width="flexWidth('update_time',crud.data,'修改时间')" label="修改时间" />
|
||||
<el-table-column prop="task_step" show-overflow-tooltip show-tooltip-when-overflow width="130" label="任务执行步骤" />
|
||||
<el-table-column prop="update_name" show-overflow-tooltip show-tooltip-when-overflow label="修改人" />
|
||||
<el-table-column prop="remark" show-overflow-tooltip show-tooltip-when-overflow :min-width="flexWidth('remark',crud.data,'备注')" label="备注" />
|
||||
@@ -211,8 +214,6 @@
|
||||
<el-table-column prop="handle_class" show-overflow-tooltip show-tooltip-when-overflow width="150" label="处理类" />
|
||||
<el-table-column prop="is_send" show-overflow-tooltip show-tooltip-when-overflow label="立即下发" />
|
||||
<el-table-column prop="group_code" show-overflow-tooltip show-tooltip-when-overflow label="任务组" />
|
||||
<el-table-column prop="form_data" show-overflow-tooltip show-tooltip-when-overflow width="130" label="自定义参数" />
|
||||
|
||||
<el-table-column v-permission="[]" label="操作" width="250px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -261,6 +262,8 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudDict from '@/views/system/dict/dict'
|
||||
import crudFormData from '@/views/wms/pm_manage/feedback_data/formData'
|
||||
import crudbucketrecord from '@/views/wms/md_manage/group_dick/groupdick'
|
||||
|
||||
const defaultForm = {
|
||||
product_area: null,
|
||||
@@ -317,7 +320,24 @@ export default {
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.query.task_code = localStorage.getItem('searchQuery_task_code2') || ''
|
||||
this.query.task_id = localStorage.getItem('searchQuery_task_id2') || ''
|
||||
this.query.vehicle_code = localStorage.getItem('searchQuery_vehicle_code2') || ''
|
||||
this.query.point_code = localStorage.getItem('searchQuery_point_code2') || ''
|
||||
this.getTypes()
|
||||
},
|
||||
methods: {
|
||||
handleSearchInput(queryKey) {
|
||||
if (this.query[queryKey]) {
|
||||
// 只有当输入框不为空时,才保存到 localStorage
|
||||
localStorage.setItem(`searchQuery_${queryKey + '2'}`, this.query[queryKey])
|
||||
} else {
|
||||
// 清空时,移除对应的查询条件
|
||||
localStorage.removeItem(`searchQuery_${queryKey + '2'}`)
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
@@ -365,11 +385,31 @@ export default {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
delQueryItem() {
|
||||
localStorage.removeItem('searchQuery_task_code2')
|
||||
localStorage.removeItem('searchQuery_task_id2')
|
||||
localStorage.removeItem('searchQuery_vehicle_code2')
|
||||
localStorage.removeItem('searchQuery_point_code2')
|
||||
this.query.task_code = ''
|
||||
this.query.task_id = ''
|
||||
this.query.vehicle_code = ''
|
||||
this.query.point_code = ''
|
||||
this.crud.toQuery()
|
||||
},
|
||||
taskScheduler() {
|
||||
crudSchBaseTask.scheduler().then(res => {
|
||||
if (this.crud.selections.length === 0) {
|
||||
this.crud.notify('请选择一个任务', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudSchBaseTask.scheduler(JSON.stringify(this.crud.selections)).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
getTypes() {
|
||||
crudFormData.getTypes().then((res) => {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,12 +74,12 @@
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<span>
|
||||
未完成数:
|
||||
<el-input
|
||||
v-model="undo"
|
||||
clearable
|
||||
style="width: 60px"
|
||||
/>
|
||||
<!-- 未完成数:-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="undo"-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 60px"-->
|
||||
<!-- />-->
|
||||
<el-button type="primary" @click="taskScheduler()">任务调度</el-button>
|
||||
</span>
|
||||
<crudOperation :permission="permission" />
|
||||
|
||||
@@ -38,11 +38,13 @@ export function operation(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function scheduler() {
|
||||
|
||||
export function scheduler(data) {
|
||||
return request({
|
||||
url: 'api/schBaseTask/taskSchedule',
|
||||
method: 'get'
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getTaskStatusList, operation, scheduler}
|
||||
export default { add, edit, del, getTaskStatusList, operation, scheduler }
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="物料或载具编号" label-width="120px">
|
||||
<el-form-item label="物料或载具编号" label-width="120px">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
@@ -18,6 +18,7 @@
|
||||
placeholder="请输入物料或载具编号"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('search')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程ID">
|
||||
@@ -29,6 +30,7 @@
|
||||
placeholder="请输入流程实例ID"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('proc_inst_id')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="子流程ID">
|
||||
@@ -40,6 +42,7 @@
|
||||
placeholder="请输入子流程ID"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('child_id')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
@@ -50,6 +53,7 @@
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 180px;"
|
||||
@input="handleSearchInput('status')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.FLOW_STATUS"
|
||||
@@ -58,6 +62,9 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button class="filter-item" type="success" icon="el-icon-delete" size="mini" @click="delQueryItem">
|
||||
清空条件
|
||||
</el-button>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
@@ -227,6 +234,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import ViewCurrentFlowDesigner from './ViewCurrentFlowDesigner'
|
||||
import ViewDialog from '@/views/wms/flow_manage/act/execution/ViewDialog.vue'
|
||||
import crudFormData from '@/views/wms/pm_manage/feedback_data/formData'
|
||||
|
||||
const defaultForm = {
|
||||
proc_inst_id: null,
|
||||
@@ -287,8 +295,36 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.query.search = localStorage.getItem('searchQuery_search5') || ''
|
||||
this.query.proc_inst_id = localStorage.getItem('searchQuery_proc_inst_id5') || ''
|
||||
this.query.child_id = localStorage.getItem('searchQuery_child_id5') || ''
|
||||
this.query.status = localStorage.getItem('searchQuery_status5') || ''
|
||||
},
|
||||
methods: {
|
||||
handleSearchInput(queryKey) {
|
||||
if (this.query[queryKey]) {
|
||||
// 只有当输入框不为空时,才保存到 localStorage
|
||||
localStorage.setItem(`searchQuery_${queryKey + '5'}`, this.query[queryKey])
|
||||
} else {
|
||||
// 清空时,移除对应的查询条件
|
||||
localStorage.removeItem(`searchQuery_${queryKey + '5'}`)
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
delQueryItem() {
|
||||
localStorage.removeItem('searchQuery_search5')
|
||||
localStorage.removeItem('searchQuery_proc_inst_id5')
|
||||
localStorage.removeItem('searchQuery_child_id5')
|
||||
localStorage.removeItem('searchQuery_status5')
|
||||
this.query.search = ''
|
||||
this.query.proc_inst_id = ''
|
||||
this.query.child_id = ''
|
||||
this.query.status = ''
|
||||
this.crud.toQuery()
|
||||
},
|
||||
toView(row) {
|
||||
if (row !== null) {
|
||||
this.$refs.itemview.setForm(row)
|
||||
|
||||
@@ -65,24 +65,24 @@
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="stor_code" label="仓库" width="160" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="vehicle_code" label="托盘编号" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="parent_vehicle_code" label="父托盘编码" align="center" />
|
||||
<!-- <el-table-column show-overflow-tooltip prop="stor_code" label="仓库" width="160" align="center" />-->
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="vehicle_code" label="载具编号" align="center" />
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip prop="parent_vehicle_code" label="父托盘编码" align="center" />-->
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_id" label="物料id" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编号" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />-->
|
||||
<el-table-column prop="pcsn" label="批次" width="150" align="center" />
|
||||
<el-table-column prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="frozen_qty" :formatter="crud.formatNum3" label="冻结数" align="center" />
|
||||
<el-table-column prop="unit_id" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="物料状态" align="center" />
|
||||
<!-- <el-table-column prop="unit_id" label="单位" align="center" />-->
|
||||
<!-- <el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型" align="center" />-->
|
||||
<el-table-column show-overflow-tooltip prop="prd_ppbom_no" label="单据编号" align="center" />
|
||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" show-overflow-tooltip width="150" :label="item.lable">
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="has_child" label="含子托盘" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
<!-- <el-table-column show-overflow-tooltip prop="has_child" label="含子托盘" align="center" />-->
|
||||
<el-table-column show-overflow-tooltip prop="update_time" label="更新时间" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
@@ -31,6 +31,16 @@
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据编号">
|
||||
<el-input
|
||||
v-model="
|
||||
query.billCode"
|
||||
clearable
|
||||
placeholder="单据编号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="组盘日期">
|
||||
<el-date-picker
|
||||
v-model="query.create_time"
|
||||
@@ -57,12 +67,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{ col.lable }}:</label>
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 200px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<!-- <template v-for="(col,index) in cols">-->
|
||||
<!-- <el-form-item label="col.lable" prop="bill_code">-->
|
||||
<!-- <label slot="label">{{ col.lable }}:</label>-->
|
||||
<!-- <el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 200px" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
|
||||
@@ -133,20 +143,26 @@
|
||||
<el-link type="warning" @click="vechile(scope.row)">{{ scope.row.code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<el-table-column prop="status" label="组盘状态">
|
||||
<template slot-scope="scope">
|
||||
{{ statusEnum.label.FORM_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="vehicle_code" label="托盘" show-overflow-tooltip />
|
||||
<el-table-column prop="source_form_type" label="源单号" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip />
|
||||
<el-table-column prop="prd_ppbom_no" label="单据编号" :min-width="flexWidth('prd_ppbom_no',crud.data,'单据编号')" show-overflow-tooltip />
|
||||
<el-table-column prop="material_code" :min-width="flexWidth('material_code',crud.data,'物料编码')" label="物料编码" show-overflow-tooltip />
|
||||
<el-table-column prop="qty" label="数量" show-overflow-tooltip />
|
||||
<el-table-column prop="frozen_qty" label="冻结数量" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" :min-width="flexWidth('pcsn',crud.data,'批次号')" label="批次号" show-overflow-tooltip />
|
||||
<el-table-column prop="material_status" :min-width="flexWidth('material_status',crud.data,'二楼物料状态')" label="二楼物料状态" show-overflow-tooltip />
|
||||
<el-table-column prop="remark1" :min-width="flexWidth('remark1',crud.data,'二楼出库进度')" label="二楼出库进度" show-overflow-tooltip />
|
||||
<el-table-column prop="source_form_type" label="源单号" width="110px" show-overflow-tooltip />
|
||||
<el-table-column prop="source_form_id" label="源单id" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="create_time" label="组盘时间" />
|
||||
<el-table-column prop="create_name" label="组盘人" />
|
||||
<el-table-column v-for="(item, index) in cols" :key="item.value" :label="item.lable">
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column v-for="(item, index) in cols" :key="item.value" :label="item.lable">-->
|
||||
<!-- <template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button icon="el-icon-edit" type="text" size="mini" @click="editStatus(scope.row)">编辑状态</el-button>
|
||||
|
||||
@@ -52,6 +52,12 @@ export function getParentFormTypesByDesc(desc) {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function getTypes() {
|
||||
return request({
|
||||
url: 'api/pda/inStorage/order',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getSonFormData(id) {
|
||||
return request({
|
||||
@@ -68,4 +74,4 @@ export function confirm(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getFormType, getParentFormTypes, getParentFormTypesByDesc, getSonFormData, syncFeedBack, confirm }
|
||||
export default { add, edit, del, getFormType, getParentFormTypes, getParentFormTypesByDesc, getTypes, getSonFormData, syncFeedBack, confirm }
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
clearable
|
||||
@input="handleSearchInput('status')"
|
||||
@change="crud.toQuery()"
|
||||
>
|
||||
<el-option
|
||||
@@ -45,6 +46,18 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据编号">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
clearable
|
||||
style="width: 250px"
|
||||
size="mini"
|
||||
placeholder="请输入单据编号"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('bill_code')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.mater"
|
||||
@@ -54,6 +67,7 @@
|
||||
placeholder="请输入物料编码"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('mater')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
@@ -64,6 +78,7 @@
|
||||
placeholder="请输入批次"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('pcsn')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期" prop="analyseData">
|
||||
@@ -82,6 +97,7 @@
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-button class="filter-item" type="success" icon="el-icon-delete" size="mini" @click="delQueryItem">清空条件</el-button>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -105,7 +121,7 @@
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="!currentRow"
|
||||
@click="confirm"
|
||||
@click="confirm('80')"
|
||||
>
|
||||
处理完成
|
||||
</el-button>
|
||||
@@ -122,24 +138,24 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="表单类型" prop="form_type">
|
||||
<el-input v-model="form.form_type" style="width: 150px;" />
|
||||
<el-input v-model="form.form_type" style="width: 150px;" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="实例" prop="proc_inst_id">
|
||||
<el-input v-model="form.proc_inst_id" style="width: 150px;" />
|
||||
<el-input v-model="form.proc_inst_id" style="width: 150px;" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="源单id" prop="source_form_id">
|
||||
<el-input v-model="form.source_form_id" style="width: 150px;" />
|
||||
<el-input v-model="form.source_form_id" style="width: 150px;" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="源单类型" prop="source_form_type">
|
||||
<el-input v-model="form.source_form_type" style="width: 150px;" />
|
||||
<el-input v-model="form.source_form_type" style="width: 150px;" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -149,6 +165,21 @@
|
||||
<el-input v-model="form.pcsn" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量" prop="qty">
|
||||
<el-input v-model="form.qty" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单据编号" prop="source_form_date">
|
||||
<el-input v-model="form.source_form_date" style="width: 150px;" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<el-input v-model="form.material_code" style="width: 150px;" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="互传数据" prop="form_data">
|
||||
<el-input v-model="form.form_data" type="textarea" :formatter="jsonFormat" style="width: 430px;" />
|
||||
@@ -189,7 +220,38 @@
|
||||
<span v-else>{{ scope.row.code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="source_form_date" label="单据编号" show-overflow-tooltip width="130" />
|
||||
<el-table-column
|
||||
prop="material_code"
|
||||
label="物料编码"
|
||||
show-overflow-tooltip
|
||||
:min-width="flexWidth('material_code',crud.data,'物料编码')"
|
||||
/>
|
||||
<!-- <el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120" />-->
|
||||
|
||||
<el-table-column
|
||||
prop="material_name"
|
||||
label="物料名称"
|
||||
:min-width="flexWidth('material_name',crud.data,'物料名称')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="pcsn"
|
||||
label="批次"
|
||||
show-overflow-tooltip
|
||||
:min-width="flexWidth('pcsn',crud.data,'批次')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="qty"
|
||||
label="回传数量"
|
||||
show-overflow-tooltip
|
||||
:min-width="flexWidth('qty',crud.data,'回传数量')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="sto_qty"
|
||||
label="物料总数量"
|
||||
show-overflow-tooltip
|
||||
:min-width="flexWidth('sto_qty',crud.data,'物料总数量')"
|
||||
/>
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in formStatus">
|
||||
@@ -197,21 +259,19 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120" />-->
|
||||
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
prop="material_code"
|
||||
label="物料编码"
|
||||
prop="assign_qty"
|
||||
label="生产总报工数量"
|
||||
show-overflow-tooltip
|
||||
:min-width="flexWidth('material_code',crud.data,'物料编码')"
|
||||
:min-width="flexWidth('assign_qty',crud.data,'生产总报工数量')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="material_name"
|
||||
label="物料名称"
|
||||
:min-width="flexWidth('material_name',crud.data,'物料名称')"
|
||||
prop="actual_qty"
|
||||
label="WMS已回传总数量"
|
||||
show-overflow-tooltip
|
||||
:min-width="flexWidth('actual_qty',crud.data,'WMS已回传总数量')"
|
||||
/>
|
||||
<!-- <el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120" />-->
|
||||
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip :min-width="flexWidth('pcsn',crud.data,'批次')" />
|
||||
<!-- <el-table-column prop="unit_id" label="单位" show-overflow-tooltip width="120" />-->
|
||||
|
||||
<!-- <el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120" />-->
|
||||
@@ -220,6 +280,8 @@
|
||||
<el-table-column label="ERP回传数据" show-overflow-tooltip width="210">
|
||||
<template slot-scope="scope">{{ scope.row.form_data }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="source_form_type" label="源单类型" show-overflow-tooltip width="130" />
|
||||
<el-table-column prop="source_form_id" label="源单编码" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120" />
|
||||
@@ -236,7 +298,7 @@
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="scope.row.is_modify === '0'"
|
||||
:disabled-dle="scope.row.is_modify === '0'"
|
||||
:disabled-dle="true"
|
||||
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
||||
/>
|
||||
</template>
|
||||
@@ -338,8 +400,33 @@ export default {
|
||||
this.getFromTypes()
|
||||
},
|
||||
mounted() {
|
||||
this.query.status = localStorage.getItem('searchQuery_status4') || ''
|
||||
this.query.bill_code = localStorage.getItem('searchQuery_bill_code4') || ''
|
||||
this.query.mater = localStorage.getItem('searchQuery_mater4') || ''
|
||||
this.query.pcsn = localStorage.getItem('searchQuery_pcsn4') || ''
|
||||
},
|
||||
methods: {
|
||||
handleSearchInput(queryKey) {
|
||||
if (this.query[queryKey]) {
|
||||
// 只有当输入框不为空时,才保存到 localStorage
|
||||
localStorage.setItem(`searchQuery_${queryKey + '4'}`, this.query[queryKey])
|
||||
} else {
|
||||
// 清空时,移除对应的查询条件
|
||||
localStorage.removeItem(`searchQuery_${queryKey + '4'}`)
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
delQueryItem() {
|
||||
localStorage.removeItem('searchQuery_status4')
|
||||
localStorage.removeItem('searchQuery_bill_code4')
|
||||
localStorage.removeItem('searchQuery_mater4')
|
||||
localStorage.removeItem('searchQuery_pcsn4')
|
||||
this.query.status = ''
|
||||
this.query.bill_code = ''
|
||||
this.query.mater = ''
|
||||
this.query.pcsn = ''
|
||||
this.crud.toQuery()
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.query.datepick) {
|
||||
this.query.start_time = this.query.datepick[0]
|
||||
@@ -420,14 +507,15 @@ export default {
|
||||
},
|
||||
handleDtlCurrentChange(val) {
|
||||
this.currentRow = val
|
||||
}, confirm() {
|
||||
}, confirm(status) {
|
||||
if (this.currentRow.length === 0) {
|
||||
this.crud.notify('请选择一行单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const ids = this.currentRow.map(row => row.id)
|
||||
const param = {
|
||||
data: ids
|
||||
data: ids,
|
||||
status: status
|
||||
}
|
||||
crudFormData.confirm(param).then(res => {
|
||||
this.crud.notify('单据处理成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120" />
|
||||
<!-- <el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120" />-->
|
||||
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip />
|
||||
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120" />
|
||||
|
||||
@@ -87,7 +87,8 @@
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
/>RECSPPM202504230003
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
@@ -97,7 +98,8 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</el-form>2
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
|
||||
@@ -100,6 +100,13 @@
|
||||
<el-table-column prop="vehicle_code" label="载具" align="center" />
|
||||
<el-table-column prop="stor_code" label="仓库编号" align="center" />
|
||||
<el-table-column prop="struct_code" label="分配仓位" align="center" />
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in formStatus">
|
||||
<span v-if="item.value === scope.row.status">{{ item.label }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" show-overflow-tooltip width="150" :label="item.lable">
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
@@ -176,7 +183,22 @@ export default {
|
||||
storlist: [],
|
||||
currentdtl: null,
|
||||
currentDis: {},
|
||||
form: {}
|
||||
form: {},
|
||||
formStatus: [
|
||||
{
|
||||
value: '10',
|
||||
label: '生成'
|
||||
},
|
||||
{
|
||||
value: '20',
|
||||
label: '执行中'
|
||||
},
|
||||
{
|
||||
value: '80',
|
||||
label: '完成'
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="单据号"
|
||||
@input="handleSearchInput('source_form_code')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分配载具">
|
||||
@@ -34,6 +35,7 @@
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="分配载具"
|
||||
@input="handleSearchInput('vehicles')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细物料">
|
||||
@@ -42,6 +44,7 @@
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="物料编码或名称"
|
||||
@input="handleSearchInput('material')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型">
|
||||
@@ -96,6 +99,7 @@
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-button class="filter-item" type="success" icon="el-icon-delete" size="mini" @click="delQueryItem">清空条件</el-button>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -134,6 +138,17 @@
|
||||
>
|
||||
强制取消
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
:disabled="confirm_flag"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="confirmMst"
|
||||
>
|
||||
处理完成
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
@@ -204,6 +219,7 @@ import AddDialog from '@/views/wms/stor_manage/out/AddDialog'
|
||||
import TaskDialog from '@/views/wms/stor_manage/out/TaskDialog'
|
||||
import ViewDialog from '@/views/wms/stor_manage/out/ViewDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
import crudFormData from '@/views/wms/pm_manage/feedback_data/formData'
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
@@ -268,16 +284,46 @@ export default {
|
||||
'user'
|
||||
])
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
mounted:
|
||||
function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
this.query.source_form_code = localStorage.getItem('searchQuery_source_form_code3') || ''
|
||||
this.query.vehicles = localStorage.getItem('searchQuery_vehicles3') || ''
|
||||
this.query.material = localStorage.getItem('searchQuery_material3') || ''
|
||||
},
|
||||
created() {
|
||||
this.$set(this.query, 'form_query', {})
|
||||
},
|
||||
methods: {
|
||||
handleSearchInput(queryKey) {
|
||||
if (this.query[queryKey]) {
|
||||
// 只有当输入框不为空时,才保存到 localStorage
|
||||
localStorage.setItem(`searchQuery_${queryKey + '3'}`, this.query[queryKey])
|
||||
} else {
|
||||
// 清空时,移除对应的查询条件
|
||||
localStorage.removeItem(`searchQuery_${queryKey + '3'}`)
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
delQueryItem() {
|
||||
localStorage.removeItem('searchQuery_source_form_code3')
|
||||
localStorage.removeItem('searchQuery_vehicles3')
|
||||
localStorage.removeItem('searchQuery_material3')
|
||||
this.query.source_form_code = ''
|
||||
this.query.vehicles = ''
|
||||
this.query.material = ''
|
||||
this.query.createTime = null
|
||||
this.crud.toQuery()
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.setDefaultDate()
|
||||
// formstruc.getHeader('st_ivt_iostorinv_out').then(res => {
|
||||
// this.cols = res
|
||||
// })
|
||||
},
|
||||
setDefaultDate() {
|
||||
const now = new Date()
|
||||
const lastWeek = new Date()
|
||||
@@ -293,12 +339,6 @@ export default {
|
||||
this.query.start_time = start_time
|
||||
this.query.end_time = end_time
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.setDefaultDate()
|
||||
formstruc.getHeader('st_ivt_iostorinv_out').then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.beforeToEdit](row) {
|
||||
this.$refs.editDialog.setForm(row)
|
||||
},
|
||||
@@ -345,6 +385,16 @@ export default {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
confirmMst() {
|
||||
if (!this.currentRow) {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudProductOut.confirmMst(this.currentRow.id).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.dis_flag = true
|
||||
|
||||
@@ -77,10 +77,18 @@ export function getVehicleTask(data) {
|
||||
|
||||
export function cancelMst(id) {
|
||||
return request({
|
||||
url: "/api/stIvtIostorinvOut/cancelMst/" + id,
|
||||
url: '/api/stIvtIostorinvOut/cancelMst/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmMst(id) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinvOut/confirmMst/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
@@ -92,5 +100,6 @@ export default {
|
||||
divDis,
|
||||
cancelMst,
|
||||
taskOpen,
|
||||
getVehicleTask
|
||||
getVehicleTask,
|
||||
confirmMst
|
||||
}
|
||||
|
||||
@@ -18,6 +18,19 @@
|
||||
placeholder="请输入仓位信息"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('search')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input
|
||||
v-model="query.material_name"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
size="mini"
|
||||
placeholder="请输入物料名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('material_name')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
@@ -29,8 +42,10 @@
|
||||
placeholder="请输入物料编码"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('material_code')"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="载具编码">
|
||||
<el-input
|
||||
v-model="query.vehicle_code"
|
||||
@@ -40,6 +55,7 @@
|
||||
placeholder="请输入载具编码"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('vehicle_code')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
@@ -51,8 +67,43 @@
|
||||
placeholder="请输入批次信息"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('pcsn')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型">
|
||||
<el-select
|
||||
v-model="query.task_type"
|
||||
multiple
|
||||
style="width: 360px"
|
||||
placeholder="任务类型"
|
||||
class="filter-item"
|
||||
clearable
|
||||
@change="handTaskStatus"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.TASK_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="变动类型" label-width="50">
|
||||
<el-select
|
||||
v-model="query.is_growth"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 180px;"
|
||||
@input="handleSearchInput('is_growth')"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option label="入库" value="1" />
|
||||
<el-option label="出库" value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="变动日期" prop="analyseData">
|
||||
<el-date-picker
|
||||
v-model="query.datepick"
|
||||
@@ -62,8 +113,11 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
/>
|
||||
<el-button class="filter-item" type="success" icon="el-icon-delete" size="mini" @click="delQueryItem">
|
||||
清空条件
|
||||
</el-button>
|
||||
<rrOperation />
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
@@ -84,6 +138,7 @@
|
||||
<el-table-column prop="qty" label="总库存" min-width="150" show-tooltip-when-overflow />
|
||||
<el-table-column prop="frozen_qty" label="冻结库存" show-tooltip-when-overflow />
|
||||
<el-table-column prop="change_qty" label="变动库存" show-tooltip-when-overflow />
|
||||
<el-table-column prop="counts" label="累计变动数量" min-width="110" show-tooltip-when-overflow />
|
||||
<el-table-column prop="growth" label="变动类型" width="150" show-tooltip-when-overflow>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.growth === true ? '入库' : '出库' }}
|
||||
@@ -98,7 +153,6 @@
|
||||
<el-table-column prop="unit_name" label="单位" show-tooltip-when-overflow />
|
||||
<el-table-column prop="vehicle_form_data" label="物料扩展信息" width="300" show-tooltip-when-overflow />
|
||||
<el-table-column prop="source_form_type" label="单据编号" show-tooltip-when-overflow />
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="操作"-->
|
||||
<!-- fixed="right"-->
|
||||
@@ -124,6 +178,7 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudFormData, { getTypes } from '@/views/wms/pm_manage/feedback_data/formData'
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
@@ -155,6 +210,8 @@ export default {
|
||||
add: false,
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
},
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
crudMethod: { ...curdStructIvtFlow }
|
||||
@@ -168,7 +225,41 @@ export default {
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.query.search = localStorage.getItem('searchQuery_search1') || ''
|
||||
this.query.material_name = localStorage.getItem('searchQuery_material_name1') || ''
|
||||
this.query.material_code = localStorage.getItem('searchQuery_material_code1') || ''
|
||||
this.query.vehicle_code = localStorage.getItem('searchQuery_vehicle_code1') || ''
|
||||
this.query.pcsn = localStorage.getItem('searchQuery_pcsn1') || ''
|
||||
this.query.is_growth = localStorage.getItem('searchQuery_is_growth1') || ''
|
||||
this.getTypes()
|
||||
},
|
||||
methods: {
|
||||
handleSearchInput(queryKey) {
|
||||
if (this.query[queryKey]) {
|
||||
// 只有当输入框不为空时,才保存到 localStorage
|
||||
localStorage.setItem(`searchQuery_${queryKey + '1'}`, this.query[queryKey])
|
||||
} else {
|
||||
// 清空时,移除对应的查询条件
|
||||
localStorage.removeItem(`searchQuery_${queryKey + '1'}`)
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
delQueryItem() {
|
||||
localStorage.removeItem('searchQuery_search1')
|
||||
localStorage.removeItem('searchQuery_material_name1')
|
||||
localStorage.removeItem('searchQuery_material_code1')
|
||||
localStorage.removeItem('searchQuery_vehicle_code1')
|
||||
localStorage.removeItem('searchQuery_pcsn1')
|
||||
localStorage.removeItem('searchQuery_is_growth1')
|
||||
this.query.search = ''
|
||||
this.query.material_name = ''
|
||||
this.query.material_code = ''
|
||||
this.query.vehicle_code = ''
|
||||
this.query.pcsn = ''
|
||||
this.query.is_growth = ''
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.query.datepick) {
|
||||
@@ -180,6 +271,11 @@ export default {
|
||||
this.query.start_time = ''
|
||||
this.query.end_time = ''
|
||||
}
|
||||
},
|
||||
getTypes() {
|
||||
crudFormData.getTypes().then((res) => {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
placeholder="请输入仓位信息"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('search')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料信息">
|
||||
@@ -44,6 +45,7 @@
|
||||
placeholder="请输入物料信息"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('material')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
@@ -54,6 +56,7 @@
|
||||
placeholder="请输入批次"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('pcsn')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具编码">
|
||||
@@ -64,6 +67,7 @@
|
||||
placeholder="请输入载具编码"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@input="handleSearchInput('vehicle_code')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库日期" prop="analyseData">
|
||||
@@ -77,16 +81,22 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-s-operation"
|
||||
@click="downloadMethod"
|
||||
>
|
||||
导出库存
|
||||
</el-button>
|
||||
</el-form>
|
||||
<el-button class="filter-item" type="danger" icon="el-icon-unlock" size="mini" @click="unlock">
|
||||
库存解锁
|
||||
</el-button>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-s-operation"
|
||||
@click="downloadMethod"
|
||||
>
|
||||
导出库存
|
||||
</el-button>
|
||||
<el-button class="filter-item" type="success" icon="el-icon-delete" size="mini" @click="delQueryItem">
|
||||
清空条件
|
||||
</el-button>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
@@ -107,9 +117,9 @@
|
||||
<el-table-column prop="pcsn" label="批次" min-width="150" show-tooltip-when-overflow />
|
||||
<el-table-column prop="qty" label="库位库存" show-tooltip-when-overflow />
|
||||
<el-table-column prop="frozen_qty" label="冻结库存" show-tooltip-when-overflow />
|
||||
<el-table-column prop="counts" label="物料总库存"min-width="90" show-tooltip-when-overflow />
|
||||
<el-table-column prop="erpCounts" label="ERP实时库存" min-width="90"show-tooltip-when-overflow />
|
||||
<el-table-column prop="differCount" label="立库-ERP库存差异" min-width="120"show-tooltip-when-overflow />
|
||||
<el-table-column prop="counts" label="物料总库存" min-width="90" show-tooltip-when-overflow />
|
||||
<el-table-column prop="erpCounts" label="ERP实时库存" min-width="90" show-tooltip-when-overflow />
|
||||
<el-table-column prop="differCount" label="立库-ERP库存差异" min-width="120" show-tooltip-when-overflow />
|
||||
<el-table-column prop="unit_id" label="单位" show-tooltip-when-overflow>
|
||||
<template slot-scope="scope">{{ tableEnum.label.bm_measure_unit[scope.row.unit_id] }}</template>
|
||||
</el-table-column>
|
||||
@@ -143,6 +153,8 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import structattr from './structattr'
|
||||
import { downloadFile, downloadFile2 } from '@/utils/index'
|
||||
import crudFormData from '@/views/wms/pm_manage/feedback_data/formData'
|
||||
import crudbucketrecord from '@/views/wms/md_manage/group_dick/groupdick'
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
@@ -169,7 +181,7 @@ export default {
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '库存变动记录',
|
||||
title: '库存查询',
|
||||
url: 'api/structattr/getStructIvt',
|
||||
optShow: {
|
||||
add: false,
|
||||
@@ -187,7 +199,35 @@ export default {
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.query.vehicle_code = localStorage.getItem('searchQuery_vehicle_code') || ''
|
||||
this.query.pcsn = localStorage.getItem('searchQuery_pcsn') || ''
|
||||
this.query.search = localStorage.getItem('searchQuery_search') || ''
|
||||
this.query.material = localStorage.getItem('searchQuery_material') || ''
|
||||
this.getTypes()
|
||||
},
|
||||
methods: {
|
||||
handleSearchInput(queryKey) {
|
||||
if (this.query[queryKey]) {
|
||||
// 只有当输入框不为空时,才保存到 localStorage
|
||||
localStorage.setItem(`searchQuery_${queryKey}`, this.query[queryKey])
|
||||
} else {
|
||||
// 清空时,移除对应的查询条件
|
||||
localStorage.removeItem(`searchQuery_${queryKey}`)
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
delQueryItem() {
|
||||
localStorage.removeItem('searchQuery_vehicle_code')
|
||||
localStorage.removeItem('searchQuery_pcsn')
|
||||
localStorage.removeItem('searchQuery_search')
|
||||
localStorage.removeItem('searchQuery_material')
|
||||
this.query.search = ''
|
||||
this.query.material = ''
|
||||
this.query.vehicle_code = ''
|
||||
this.query.pcsn = ''
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.query.datepick) {
|
||||
@@ -223,6 +263,26 @@ export default {
|
||||
document.body.removeChild(link)
|
||||
this.crud.notify('导出成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
getTypes() {
|
||||
crudFormData.getTypes().then((res) => {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
unlock() {
|
||||
debugger
|
||||
if (this.crud.selections.length === 0) {
|
||||
this.crud.notify('请选择一个载具', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.crud.selections.length > 1) {
|
||||
this.crud.notify('请确认只选择一个载具', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
structattr.unlock(JSON.stringify({ 'vehicle_code': this.crud.selections[0].vehicle_code })).then(res => {
|
||||
this.crud.notify('载具库存解锁成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,10 +109,18 @@ export function exportFile(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function unlock(data) {
|
||||
return request({
|
||||
url: '/api/structattr/unlock',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
unlock,
|
||||
del,
|
||||
getVehicleTask,
|
||||
getIosInvDtl,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="载具编号" label-width="120px">
|
||||
<el-form-item label="载具编号" label-width="120px">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
@@ -41,10 +41,10 @@
|
||||
<template v-for="(col,index) in cols" v-if="hideShowDialog">
|
||||
<el-form-item label="col.lable">
|
||||
<label slot="label">{{ col.lable }}:</label>
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px"/>
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<rrOperation :crud="crud"/>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
@@ -91,13 +91,24 @@
|
||||
作业下发
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="!currentRow"
|
||||
@click="confirm"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="!currentRow"
|
||||
@click="confirm('10')"
|
||||
>
|
||||
重新处理
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="!currentRow"
|
||||
@click="confirm('80')"
|
||||
>
|
||||
处理完成
|
||||
</el-button>
|
||||
@@ -114,20 +125,20 @@
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
@select="handleSelectionChange"
|
||||
:data="crud.data"
|
||||
@select="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-link v-if="scope.row.hasChildren" type="warning" @click="toView(scope.row)">{{
|
||||
scope.row.code
|
||||
}}
|
||||
scope.row.code
|
||||
}}
|
||||
</el-link>
|
||||
<span v-else>{{ scope.row.code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in statusEnum.FORM_STATUS">
|
||||
@@ -135,16 +146,16 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120" />
|
||||
<!-- <el-table-column prop="qty" label="物料数量" show-overflow-tooltip />-->
|
||||
<!-- <el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120" />-->
|
||||
<!-- <el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120" />-->
|
||||
<!-- <el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120" />-->
|
||||
<!-- <el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120" />-->
|
||||
<!-- <el-table-column prop="unit_id" label="单位" show-overflow-tooltip width="120" />-->
|
||||
<el-table-column prop="biz_code" label="业务单据编码" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="biz_date" label="业务单据时间" show-overflow-tooltip width="130"/>
|
||||
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="biz_code" label="业务单据编码" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="biz_date" label="业务单据时间" show-overflow-tooltip width="130" />
|
||||
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120" />
|
||||
<el-table-column
|
||||
v-for="(item, index) in cols"
|
||||
:key="item.value"
|
||||
@@ -154,8 +165,8 @@
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间" width="150"/>
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="create_time" label="创建时间" width="150" />
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例" show-overflow-tooltip width="120" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="120px"
|
||||
@@ -184,17 +195,17 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
<pagination />
|
||||
</div>
|
||||
<ViewDialog ref="viewDialog"/>
|
||||
<EditDialog ref="editDialog" @AddChanged="querytable"/>
|
||||
<TaskDialog ref="taskDis" @AddChanged="querytable"/>
|
||||
<ViewDialog ref="viewDialog" />
|
||||
<EditDialog ref="editDialog" @AddChanged="querytable" />
|
||||
<TaskDialog ref="taskDis" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudFormData from './formData'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
@@ -205,7 +216,6 @@ import EditDialog from './EditDialog'
|
||||
import TaskDialog from './TaskDialog'
|
||||
import crudPick from './pick'
|
||||
|
||||
|
||||
// import UploadDialog from './UploadDialog'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -230,7 +240,7 @@ const defaultForm = {
|
||||
export default {
|
||||
name: 'FormData',
|
||||
statusEnums: ['FORM_STATUS'],
|
||||
components: {pagination, crudOperation, rrOperation, udOperation, ViewDialog, TaskDialog, EditDialog},
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, ViewDialog, TaskDialog, EditDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -238,7 +248,7 @@ export default {
|
||||
url: 'api/pmFormData',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
crudMethod: {...crudFormData},
|
||||
crudMethod: { ...crudFormData },
|
||||
optShow: {
|
||||
add: false,
|
||||
reset: true
|
||||
@@ -288,7 +298,6 @@ export default {
|
||||
}
|
||||
const dafult = this.$el.getElementsByClassName('dafult')
|
||||
for (let a = 0; a < dafult.length; a++) {
|
||||
|
||||
dafult[a].click()
|
||||
}
|
||||
}
|
||||
@@ -318,14 +327,14 @@ export default {
|
||||
this.currentRow = null
|
||||
} else {
|
||||
this.currentRow = val[0]
|
||||
if (this.currentRow.status == '10' || this.currentRow.status == '13'){
|
||||
if (this.currentRow.status == '10' || this.currentRow.status == '13') {
|
||||
this.dis_flag = false
|
||||
}else {
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
}
|
||||
if (this.currentRow.status == '13'){
|
||||
if (this.currentRow.status == '13') {
|
||||
this.task_flag = false
|
||||
}else {
|
||||
} else {
|
||||
this.task_flag = true
|
||||
}
|
||||
}
|
||||
@@ -348,16 +357,17 @@ export default {
|
||||
this.crud.toQuery()
|
||||
this.dis_flag = true
|
||||
this.task_flag = true
|
||||
}, confirm() {
|
||||
}, confirm(itemStatus) {
|
||||
if (this.currentRow.length === 0) {
|
||||
this.crud.notify('请选择一行单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const ids = Array.isArray(this.currentRow)
|
||||
? this.currentRow.map(row => row.id)
|
||||
: [this.currentRow.id];
|
||||
? this.currentRow.map(row => row.id)
|
||||
: [this.currentRow.id]
|
||||
const param = {
|
||||
data: ids
|
||||
data: ids,
|
||||
status: itemStatus
|
||||
}
|
||||
crudPick.confirm(param).then(res => {
|
||||
this.crud.notify('单据处理成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
|
||||
Reference in New Issue
Block a user