merge:合并二期代码到当前分支
This commit is contained in:
@@ -178,6 +178,53 @@
|
||||
</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-column label="操作">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.result==false && scope.row.url"
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-position"
|
||||
@click.native.prevent="syncMes(scope.row)"
|
||||
>同步</el-button>
|
||||
</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"
|
||||
@@ -749,6 +796,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,
|
||||
@@ -788,7 +837,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() {
|
||||
@@ -803,6 +852,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dtlVisible: false,
|
||||
childrenList: [],
|
||||
permission: {
|
||||
add: ['admin', 'sub:add'],
|
||||
edit: ['admin', 'sub:edit'],
|
||||
@@ -892,10 +943,28 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit](row) {
|
||||
this.$delete(row.form, 'status')
|
||||
return true
|
||||
toView(data) {
|
||||
crudPastivtquery.subRecord(data).then(res => {
|
||||
if (res) {
|
||||
this.dtlVisible = true
|
||||
this.childrenList = res
|
||||
}
|
||||
})
|
||||
},
|
||||
async syncMes(row) {
|
||||
const url = 'http://10.1.3.36:8081/' + row.url
|
||||
const response = await fetch(url, {
|
||||
method: 'POST', // *GET, POST, PUT, DELETE, etc.
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: row.param // body 数据类型必须与“Content-Type”头匹配
|
||||
})
|
||||
const data = await response.json()
|
||||
window.alert(JSON.stringify(data))
|
||||
},
|
||||
|
||||
initQuery() {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
|
||||
Reference in New Issue
Block a user