容器明细子页面界面功能调整
This commit is contained in:
@@ -79,8 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productTypeQuantity != null">product_type_quantity = #{productTypeQuantity},</if>
|
||||
<if test="capacity != null">capacity = #{capacity},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<!-- <if test="updateTime != null">update_time = #{updateTime},</if>-->
|
||||
GETDATE(),
|
||||
<if test="updateTime != null">update_time = GETDATE(),</if>
|
||||
<if test="operationMan != null">operation_man = #{operationMan},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
|
||||
@@ -50,3 +50,5 @@ export function getPortNames() {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -162,6 +162,21 @@ export const dynamicRoutes = [
|
||||
meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// @@@ 容器管理明细
|
||||
{
|
||||
path: '/bas/containerDetails',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['bas:containerDetails:query'],
|
||||
children: [
|
||||
{
|
||||
path: 'index/:containerId(\\d+)',
|
||||
component: () => import('@/views/bas/containerDetails/index'),
|
||||
name: 'ContainerDetails',
|
||||
meta: { title: '容器物料明细', activeMenu: '/bas/containerDetails' }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -99,6 +99,13 @@
|
||||
<el-table-column label="操作人" align="center" prop="operationMan" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleDetails(scope.row)"
|
||||
v-hasPermi="['bas:container:edit']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@@ -129,7 +136,7 @@
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="容器编号" prop="containerId">
|
||||
<el-input v-model="form.containerId" placeholder="请输入容器编号" />
|
||||
<el-input v-model="form.containerId" placeholder="请输入容器编号" :disabled="!containerIdIsEnabled"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位名称" prop="portName">
|
||||
<el-select v-model="form.portName" placeholder="请选择点位名称" clearable>
|
||||
@@ -163,6 +170,12 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 容器管理详细 -->
|
||||
<el-dialog title="容器管理详细" :visible.sync="openView" width="700px" append-to-body>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -193,6 +206,8 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否显示详细弹出层
|
||||
openView: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -210,7 +225,9 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
// 弹出框容器编号是否可编辑
|
||||
containerIdIsEnabled: true,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -285,6 +302,7 @@ export default {
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.containerIdIsEnabled = true
|
||||
this.open = true
|
||||
this.title = "添加容器管理"
|
||||
},
|
||||
@@ -294,10 +312,21 @@ export default {
|
||||
const containerId = row.containerId || this.ids
|
||||
getContainer(containerId).then(response => {
|
||||
this.form = response.data
|
||||
this.containerIdIsEnabled = false
|
||||
this.open = true
|
||||
this.title = "修改容器管理"
|
||||
})
|
||||
},
|
||||
/** 详情按钮操作 */
|
||||
handleDetails(row){
|
||||
const containerId = row.containerId
|
||||
// this.$router.push("/bas/containerDetails/index/" + containerId)
|
||||
this.$router.push({
|
||||
name: 'ContainerDetails',
|
||||
params: { containerId: containerId }
|
||||
})
|
||||
// console.log(containerId)
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
@@ -310,7 +339,7 @@ export default {
|
||||
})
|
||||
} else {
|
||||
//@@@
|
||||
this.form.productTypeQuantity = 'Type-01';
|
||||
this.form.productTypeQuantity = '3';
|
||||
this.form.capacity = 10;
|
||||
addContainer(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<!-- <el-form-item label="单位" prop="unit">
|
||||
<el-input
|
||||
v-model="queryParams.unit"
|
||||
placeholder="请输入单位"
|
||||
@@ -64,7 +64,7 @@
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -105,29 +105,37 @@
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['bas:containerDetails:export']"
|
||||
>导出</el-button>
|
||||
>导出</el-button> -->
|
||||
<!-- 【关闭】按钮 -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-close"
|
||||
size="mini"
|
||||
@click="handleClose"
|
||||
>关闭</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="containerDetailsList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="id" />
|
||||
<el-table-column label="序号" align="center" prop="id" />
|
||||
<el-table-column label="容器编号" align="center" prop="containerId" />
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<!-- <el-table-column label="数量" align="center" prop="quantity" /> -->
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="备用" align="center" prop="spare1" />
|
||||
<!-- <el-table-column label="备用" align="center" prop="spare1" />
|
||||
<el-table-column label="备用" align="center" prop="spare2" />
|
||||
<el-table-column label="备用" align="center" prop="spare3" />
|
||||
<el-table-column label="备用" align="center" prop="spare3" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -160,7 +168,7 @@
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="容器编号" prop="containerId">
|
||||
<el-input v-model="form.containerId" placeholder="请输入容器编号" />
|
||||
<el-input v-model="form.containerId" placeholder="请输入容器编号" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="productId">
|
||||
<el-input v-model="form.productId" placeholder="请输入物料编码" />
|
||||
@@ -174,7 +182,7 @@
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备用" prop="spare1">
|
||||
<!-- <el-form-item label="备用" prop="spare1">
|
||||
<el-input v-model="form.spare1" placeholder="请输入备用" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备用" prop="spare2">
|
||||
@@ -182,7 +190,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="备用" prop="spare3">
|
||||
<el-input v-model="form.spare3" placeholder="请输入备用" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -234,7 +242,9 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
// 容器明细中的容器编号是否可更改
|
||||
containerIdIsEnabled: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -242,10 +252,22 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/** 查询容器物料明细列表 */
|
||||
// getList() {
|
||||
// this.loading = true
|
||||
// listContainerDetails(this.queryParams).then(response => {
|
||||
// this.containerDetailsList = response.rows
|
||||
// this.total = response.total
|
||||
// this.loading = false
|
||||
// })
|
||||
// },
|
||||
/** @@@ 查询某个容器物料明细列表 */
|
||||
getList() {
|
||||
const containerId = this.$route.params.containerId
|
||||
this.loading = true
|
||||
listContainerDetails(this.queryParams).then(response => {
|
||||
this.containerDetailsList = response.rows
|
||||
// console.log('1111111111111111111111')
|
||||
// console.log(response)
|
||||
this.containerDetailsList = response.rows.filter(item => item.containerId === containerId)
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
@@ -270,6 +292,11 @@ export default {
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
// 返回按钮
|
||||
handleClose() {
|
||||
const obj = { path: "/bas/container" }
|
||||
this.$tab.closeOpenPage(obj)
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
@@ -289,6 +316,7 @@ export default {
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.form.containerId = this.$route.params.containerId
|
||||
this.open = true
|
||||
this.title = "添加容器物料明细"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user