add:子卷步序

This commit is contained in:
zhangzq
2025-04-18 09:49:09 +08:00
parent 4d9d432e4c
commit 19bade4b5f
15 changed files with 333 additions and 23 deletions

View File

@@ -178,6 +178,40 @@
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog
title="子卷步序信息"
append-to-body
:visible.sync="dtlVisible"
destroy-on-close
width="1000px"
>
<!--表格渲染-->
<el-table
:data="childrenList">
<el-table-column prop="container_name" label="子卷号" show-overflow-tooltip width="210px" />
<el-table-column prop="spec" label="步序" show-overflow-tooltip width="120">
<template slot-scope="scope">
{{ dict.label.subSpec[scope.row.spec] }}
</template>
</el-table-column>
<el-table-column prop="result" label="执行结果" show-overflow-tooltip width="120">
<template slot-scope="scope">
{{ scope.row.result.toString() }}
</template>
</el-table-column>
<el-table-column prop="param" label="执行参数" show-overflow-tooltip width="150"/>
<el-table-column prop="msg" label="备注" show-overflow-tooltip width="150"/>
<el-table-column prop="create_time" label="创建时间">
<template slot-scope="scope">
{{ new Date(scope.row.create_time).toLocaleString() }}
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<span slot="footer" class="dialog-footer">
<el-button @click="dtlVisible = false"> </el-button>
</span>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:before-close="crud.cancelCU"
@@ -445,7 +479,11 @@
prop="container_name"
label="子卷号"
:min-width="flexWidth('container_name',crud.data,'子卷号')"
/>
>
<template slot-scope="scope">
<el-link type="warning" @click="toView(scope.row.container_name)">{{ scope.row.container_name }}</el-link>
</template>
</el-table-column>
<el-table-column prop="product_name" label="产品编码" :min-width="flexWidth('product_name',crud.data,'产品描述')" />
<el-table-column
prop="product_description"
@@ -596,6 +634,8 @@ import pagination from '@crud/Pagination'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
import crudUserStor from "@/views/wms/basedata/st/userStor/userStor";
import crudPastivtquery from '@/views/wms/stat/pastivt/pastivtquery'
import { format } from 'date-fns';
const defaultForm = {
workorder_id: null,
@@ -635,7 +675,7 @@ const defaultForm = {
}
export default {
name: 'Subpackagerelation',
dicts: ['sub_package_relation', 'IS_OR_NOT'],
dicts: ['sub_package_relation', 'IS_OR_NOT', 'subSpec'],
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
@@ -650,6 +690,8 @@ export default {
},
data() {
return {
dtlVisible: false,
childrenList: [],
permission: {
add: ['admin', 'sub:add'],
edit: ['admin', 'sub:edit'],
@@ -739,6 +781,14 @@ export default {
[CRUD.HOOK.beforeRefresh]() {
return true
},
toView(data) {
crudPastivtquery.subRecord(data).then(res => {
if (res){
this.dtlVisible = true
this.childrenList = res;
}
})
},
initQuery() {
const end = new Date()
const start = new Date()

View File

@@ -24,4 +24,11 @@ export function edit(data) {
})
}
export default { add, edit, del }
export function subRecord(code) {
return request({
url: '/api/pdmProductSpec/subSpec/'+code,
method: 'get'
})
}
export default { add, edit, del, subRecord }