代码更新
This commit is contained in:
421
nladmin-ui/src/views/wms/pdm/order/slittingplan/index.vue
Normal file
421
nladmin-ui/src/views/wms/pdm/order/slittingplan/index.vue
Normal file
@@ -0,0 +1,421 @@
|
||||
<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="11 0px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="订单类型">
|
||||
<el-select
|
||||
v-model="query.order_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 250px"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.order_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产区域">
|
||||
<el-select
|
||||
v-model="query.product_area"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 250px"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 250px"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="机台编码">
|
||||
<el-input
|
||||
v-model="query.resource_name"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="机台编码"
|
||||
style="width: 250px"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="母卷号">
|
||||
<el-input
|
||||
v-model="query.parent_container_name"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="母卷号"
|
||||
style="width: 250px"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="子卷号">
|
||||
<el-input
|
||||
v-model="query.container_name"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="母卷号"
|
||||
style="width: 250px"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</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']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length < 1"
|
||||
@click="upMaterFinish"
|
||||
>
|
||||
上料完成
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length < 1"
|
||||
@click="caseFinish"
|
||||
>
|
||||
套管完成
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length < 1"
|
||||
@click="sendFinish"
|
||||
>
|
||||
配送完成
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length < 1"
|
||||
@click="compelFinish"
|
||||
>
|
||||
强制完成
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="子卷号" prop="container_name">
|
||||
<el-input v-model="form.container_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品编码" prop="product_name">
|
||||
<el-input v-model="form.product_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品描述" prop="description">
|
||||
<el-input v-model="form.description" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分切机台编码" prop="resource_name">
|
||||
<el-input v-model="form.resource_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="纸筒物料编码">
|
||||
<el-input v-model="form.paper_tube_material" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="纸筒物料描述">
|
||||
<el-input v-model="form.paper_tube_description" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="FRP管物料编码">
|
||||
<el-input v-model="form.FRP_material" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="FRP管物料描述">
|
||||
<el-input v-model="form.FRP_description" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="FRP管规格">
|
||||
<el-input v-model="form.FRP_model" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="子卷幅宽" prop="split_breadth">
|
||||
<el-input v-model="form.split_breadth" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="子卷理论长度" prop="split_height">
|
||||
<el-input v-model="form.split_height" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="子卷理论重量" prop="split_weight">
|
||||
<el-input v-model="form.split_weight" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="workorder_id" label="分切计划标识" />
|
||||
<el-table-column prop="status" label="状态" :formatter="formatStatusName"/>
|
||||
<el-table-column prop="order_type" label="订单类型" :formatter="formatTypeName"/>
|
||||
<el-table-column prop="mfg_order_name" label="订单号" show-overflow-tooltip/>
|
||||
<el-table-column prop="container_name" label="子卷号" />
|
||||
<el-table-column prop="parent_container_name" label="母卷号" />
|
||||
<el-table-column prop="ware_house" label="来源位置" :formatter="formatHouseName" width="120px" />
|
||||
<el-table-column prop="restruct_container_name" label="改制来源子卷号" width="120px"/>
|
||||
<el-table-column prop="package_box_sn" label="改制来源子卷木箱号" width="150px" />
|
||||
<el-table-column prop="resource_name" label="机台编码" />
|
||||
<el-table-column prop="product_name" label="产品编码" />
|
||||
<el-table-column prop="product_area" label="生产区域" />
|
||||
<el-table-column prop="split_group" label="分切组" />
|
||||
<el-table-column prop="manufacture_sort" label="生产顺序" />
|
||||
<el-table-column prop="manufacture_date" label="生产日期" width="120px" />
|
||||
<el-table-column prop="split_breadth" label="子卷幅宽" />
|
||||
<el-table-column prop="split_height" label="子卷理论长度" width="120px" />
|
||||
<el-table-column prop="split_weight" label="子卷理论重量" width="120px" />
|
||||
<el-table-column prop="paper_tube_or_frp" label="管件类型" :formatter="formatTubeName" />
|
||||
<el-table-column prop="paper_tube_material" label="纸筒物料编码" width="120px" />
|
||||
<el-table-column prop="paper_tube_description" label="纸筒物料描述" width="120px" />
|
||||
<el-table-column prop="paper_tube_model" label="纸筒规格" />
|
||||
<el-table-column prop="frp_material" label="FRP管物料编码" width="120px" />
|
||||
<el-table-column prop="frp_description" label="FRP管物料描述" width="120px" />
|
||||
<el-table-column prop="frp_model" label="FRP管规格" width="100px" />
|
||||
<el-table-column prop="is_parent_ok" label="母卷上料完成" width="100px" :formatter="formatParentName" />
|
||||
<el-table-column prop="is_child_tz_ok" label="子卷套轴完成" width="100px" :formatter="formatChildName" />
|
||||
<el-table-column prop="is_child_ps_ok" label="子卷配送完成" width="100px" :formatter="formatChildPsName" />
|
||||
<el-table-column prop="start_time" label="开始时间" width="150px" />
|
||||
<el-table-column prop="end_time" label="结束时间" width="150px" />
|
||||
<!-- <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudSlittingproductionplan from '@/views/wms/pdm/order/slittingplan/slittingproductionplan'
|
||||
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 = {
|
||||
workorder_id: null,
|
||||
order_type: null,
|
||||
container_name: null,
|
||||
product_name: null,
|
||||
description: null,
|
||||
parent_container_name: null,
|
||||
restruct_container_name: null,
|
||||
package_box_sn: null,
|
||||
ware_house: null,
|
||||
resource_name: null,
|
||||
split_group: null,
|
||||
manufacture_sort: null,
|
||||
mfg_order_name: null,
|
||||
manufacture_date: null,
|
||||
paper_tube_or_FRP: null,
|
||||
paper_tube_material: null,
|
||||
paper_tube_description: null,
|
||||
paper_tube_model: null,
|
||||
FRP_material: null,
|
||||
FRP_description: null,
|
||||
FRP_model: null,
|
||||
split_breadth: null,
|
||||
split_height: null,
|
||||
split_weight: null,
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
status: null,
|
||||
remark: 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,
|
||||
is_parent_ok: null,
|
||||
is_child_tz_ok: null,
|
||||
is_child_ps_ok: null,
|
||||
qzzno: null
|
||||
}
|
||||
export default {
|
||||
name: 'Slittingproductionplan',
|
||||
dicts: ['product_area', 'order_type', 'product_status', 'IS_OR_NOT', 'ware_house', 'paper_tube_or_frp'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '分切计划',
|
||||
url: 'api/slittingproductionplan',
|
||||
idField: 'workorder_id',
|
||||
sort: 'workorder_id,desc',
|
||||
crudMethod: { ...crudSlittingproductionplan },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
rules: {
|
||||
order_type: [
|
||||
{ required: true, message: '分切订单类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
container_name: [
|
||||
{ required: true, message: '子卷号不能为空', trigger: 'blur' }
|
||||
],
|
||||
product_name: [
|
||||
{ required: true, message: '产品编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
description: [
|
||||
{ required: true, message: '产品描述不能为空', trigger: 'blur' }
|
||||
],
|
||||
ware_house: [
|
||||
{ required: true, message: '来源卷位置不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
upMaterFinish() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = {
|
||||
'data': _selectData
|
||||
}
|
||||
crudSlittingproductionplan.upMaterFinish(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
caseFinish() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = {
|
||||
'data': _selectData
|
||||
}
|
||||
crudSlittingproductionplan.caseFinish(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
sendFinish() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = {
|
||||
'data': _selectData
|
||||
}
|
||||
crudSlittingproductionplan.sendFinish(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
compelFinish() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = {
|
||||
'data': _selectData
|
||||
}
|
||||
crudSlittingproductionplan.compelFinish(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
formatStatusName(row) {
|
||||
return this.dict.label.product_status[row.status]
|
||||
},
|
||||
formatTypeName(row) {
|
||||
return this.dict.label.order_type[row.order_type]
|
||||
},
|
||||
formatHouseName(row) {
|
||||
return this.dict.label.ware_house[row.ware_house]
|
||||
},
|
||||
formatTubeName(row) {
|
||||
return this.dict.label.paper_tube_or_frp[row.paper_tube_or_frp]
|
||||
},
|
||||
formatParentName(row) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_parent_ok]
|
||||
},
|
||||
formatChildName(row) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_child_tz_ok]
|
||||
},
|
||||
formatChildPsName(row) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_child_ps_ok]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,59 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/slittingproductionplan',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/slittingproductionplan/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/slittingproductionplan',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function upMaterFinish(data) {
|
||||
return request({
|
||||
url: 'api/slittingproductionplan/upMaterFinish',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function caseFinish(data) {
|
||||
return request({
|
||||
url: 'api/slittingproductionplan/caseFinish',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sendFinish(data) {
|
||||
return request({
|
||||
url: 'api/slittingproductionplan/sendFinish',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function compelFinish(data) {
|
||||
return request({
|
||||
url: 'api/slittingproductionplan/compelFinish',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, compelFinish }
|
||||
Reference in New Issue
Block a user