Commit 2c442f86 authored by jack_liu's avatar jack_liu

two

parent a0bf6575
...@@ -12,24 +12,25 @@ export function getlist(queryParams) { ...@@ -12,24 +12,25 @@ export function getlist(queryParams) {
}) })
} }
/* TODO: 用来查询单项出入库记录的废弃详情信息 */ // TODO: 用来进行工序库的出入库记录的 分页+时间+普通字段的查询
export function findSingleLogDetail(singleLogIdAndPn) { export function getDictList(queryParams) {
return request({ return request({
url: '/wbchemistrylog/detail', url: '/ysgxpn/querySysDictDatas',
method: 'post', method: 'get',
data: singleLogIdAndPn, params: queryParams,
headers: { headers: {
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
} }
}) })
} }
/* TODO: 用来导出表单信息 */ export function submit(queryParams) {
export function exportInventoryRecord(params) {
return request({ return request({
url: '/wbchemistrylog/export', url: '/ysgxpn/insert',
method: 'get', method: 'post',
params, data: queryParams,
responseType: 'blob' headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
}) })
} }
<template> <template>
<div class="app-container"> <div class="app-container" style="padding-top: 60px;">
<el-form
<div style="width: 60%; margin-left: 80px; padding-left: 8.6%">
<el-form
ref="queryForm" ref="queryForm"
style="padding: 0 0 0 10px"
:model="queryParams" :model="queryParams"
:inline="true" :inline="true"
label-width="60px"
> >
<el-form-item label="" prop="ptype"> <el-form-item style="flex-basis: 50%" prop="ptype">
<el-input <el-input
v-model="queryParams.ptype" v-model="queryParams.ptype"
placeholder="请输入" placeholder="请输入工序"
clearable clearable
:maxlength="30" :maxlength="100"
size="small" size="small"
style="width: 225px" style="width: 350px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> >
</el-form-item> <template slot="prepend">工序</template></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
...@@ -28,93 +31,118 @@ ...@@ -28,93 +31,118 @@
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 这里是列表了,注意,这是分割线 -->
<!-- 这里是列表了,注意,这是分割线 -->
<!-- 这里是列表了,注意,这是分割线 -->
<!-- 这里是列表了,注意,这是分割线 -->
<!-- 这里是列表了,注意,这是分割线 -->
<div class="placeholder" />
<div style="padding: 5px 10px">
<div class="mb12 font-small-bold">工序对照列表</div>
<el-table <el-table
:gutter="40"
v-loading="loading" v-loading="loading"
border border
ref="multipleTable" ref="dictTable"
:data="simulateProcessList" row-key="index"
@selection-change="handleSelectionChange" :data="dictList"
@selection-change="handleDictSelectionChange"
> >
<el-table-column type="selection" width="50px" /> <el-table-column
<el-table-column type="index" label="序号" width="50" /> :reserve-selection="true"
type="selection"
width="50px"
/>
<el-table-column type="index" label="序号" width="100" />
<el-table-column <el-table-column
label="工序" label="工序"
prop="ptype" prop="dictLabel"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.ptype || '-' }} {{ scope.row.dictLabel || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="工序代码" label="工序代码"
prop="pgx" prop="dictValue"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.pgx || '-' }} {{ scope.row.dictValue || '-' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<el-button style="float: right" type="primary" @click="onSubmit" <el-form label-width="80px">
>提交</el-button <el-row style="padding-left: 8.6%; padding-top: 1%">
> <el-col :span="12">
<el-form-item style="flex-basis: 50%">
<el-button type="primary" @click="onSubmit">提交</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div> </div>
</template> </template>
<script> <script>
import { getlist } from '@/api/production/gxpn' import { getDictList, submit } from '@/api/production/gxpn'
export default { export default {
name: 'Role', name: 'Role',
data() { data() {
return { return {
// TODO: 模拟测试数据 dictList: [],
simulateProcessList: [],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
multipleSelection: [], multipleSelection: [],
dictSelection: [],
queryParams: { queryParams: {
pgx: undefined, ptype: ''
ptype: undefined
} }
} }
}, },
created() { created() {
this.getListToGx() this.getDictList()
}, },
methods: { methods: {
/** 查询列表 */ getDictList() {
getListToGx() { getDictList({
this.loading = true dictLabel: this.queryParams.ptype
getlist(this.queryParams).then(res => { }).then(res => {
console.log(res.data) this.dictList = res.data
this.simulateProcessList = res.data
this.loading = false this.loading = false
}) })
}, },
//提交按钮 //提交按钮
onSubmit() { onSubmit() {
console.log(this.dictSelection)
submit(this.dictSelection).then(res => {
if (res.code === 200) {
this.$message.success('提交成功')
this.$refs.dictTable.clearSelection()
this.queryParams.ptype = ''
}
})
}, },
//查询 //查询
handleQuery() { handleQuery() {
this.getListToGx() this.$refs.dictTable.clearSelection()
if (this.queryParams.ptype == '') {
return
}
getDictList({
dictLabel: this.queryParams.ptype
}).then(res => {
const dictList = res.data
this.dictList.forEach(row => {
dictList.forEach(item => {
if (row.businessId === item.businessId) {
this.$refs.dictTable.toggleRowSelection(row, true)
}
})
})
})
},
handleDictSelectionChange(val) {
this.dictSelection = val
} }
},
handleSelectionChange(val) {
this.multipleSelection = val
} }
} }
</script> </script>
...@@ -143,4 +171,15 @@ export default { ...@@ -143,4 +171,15 @@ export default {
height: 12em; height: 12em;
width: 4px; width: 4px;
} }
.info {
height: 100px;
display: flex;
align-items: center;
justify-content: center;
.title {
color: #333;
font-weight: 700;
font-size: 16px;
}
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment