Commit 1d6cc928 authored by 吴志坤's avatar 吴志坤

draw

parent 584b2985
import request from '@/utils/request' import request from '@/utils/request'
import { id } from 'html-webpack-plugin/lib/chunksorter'
// 查询基础信息列表 // 查询基础信息列表
export function listWbApply(query) { export function listWbApply(query) {
return request({ return request({
...@@ -33,3 +34,11 @@ export function batchAddition(data) { ...@@ -33,3 +34,11 @@ export function batchAddition(data) {
} }
}) })
} }
// 根据id查询基础信息接口
export function detail(id) {
return request({
url: '/wbapply/detail/' + id,
method: 'get'
})
}
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="pstatus">
<el-select <el-select
v-model="queryParams.pstatus" v-model="queryParams.pstatus"
placeholder="请选择状态" placeholder="请选择状态"
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
:value="dict.dictValue" :value="dict.dictValue"
/> />
</el-select> </el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" style="padding: 8px 7px;" icon="el-icon-search" size="small" @click="handleQuery">查询</el-button> <el-button type="primary" style="padding: 8px 7px;" icon="el-icon-search" size="small" @click="handleQuery">查询</el-button>
<el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button> <el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
...@@ -187,7 +189,8 @@ ...@@ -187,7 +189,8 @@
</el-row> </el-row>
</el-form> </el-form>
<el-table v-loading="loadingDetail" border :data="detailApplyList" @selection-change="handleSelectionChange"> <!-- apply详情-->
<el-table v-if="applyStatus === '1'" v-loading="loadingDetail" border :data="applyList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<el-table-column label="pn" prop="pn"> <el-table-column label="pn" prop="pn">
...@@ -232,43 +235,41 @@ ...@@ -232,43 +235,41 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <!-- <pagination-->
v-show="totalDetail>0" <!-- v-show="totalDetail>0"-->
:total="totalDetail" <!-- :total="totalDetail"-->
:page.sync="queryParams.page" <!-- :page.sync="queryParams.page"-->
:limit.sync="queryParams.rows" <!-- :limit.sync="queryParams.rows"-->
@pagination="getDeviceList" <!-- @pagination="getDeviceList"-->
/> <!-- />-->
</el-dialog> </el-dialog>
<!-- TODO: 处理 --> <!-- TODO: 处理 -->
<el-dialog :title="title" :visible.sync="openHandle" width="1200px" append-to-body> <el-dialog :title="title" :visible.sync="openHandle" width="1200px" append-to-body>
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryFormWarehouse" style="padding: 0 0 0 10px" :model="queryParamsDetail" :inline="true">
<el-form-item label="pn" prop="pn"> <el-form-item label="pn" prop="pn">
<el-input <el-input
v-model="queryParams.pn" v-model="queryParamsDetail.pn"
placeholder="请输入pn" placeholder="请输入pn"
clearable clearable
:maxlength="30" :maxlength="30"
size="small" size="small"
style="width: 150px" style="width: 150px"
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="phd" prop="phdStr"> <el-form-item label="lot" prop="lot">
<el-input <el-input
v-model="queryParams.phdStr" v-model="queryParamsDetail.lot"
placeholder="请输入phd" placeholder="请输入lot"
clearable clearable
size="small" size="small"
style="width: 150px" style="width: 150px"
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="prank" prop="prankStr"> <el-form-item label="plocation" prop="plocation">
<el-input <el-input
v-model="queryParams.prankStr" v-model="queryParamsDetail.plocation"
placeholder="请输入prank" placeholder="请输入plocation"
clearable clearable
size="small" size="small"
style="width: 150px" style="width: 150px"
...@@ -276,8 +277,8 @@ ...@@ -276,8 +277,8 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" style="padding: 8px 7px;" icon="el-icon-search" size="small" @click="handleQueryDetail">查询</el-button> <el-button type="primary" style="padding: 8px 7px;" icon="el-icon-search" size="small" @click="handleQueryWarehouse">查询</el-button>
<el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQueryDetail">重置</el-button> <el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQueryWarehouse">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -344,13 +345,14 @@ ...@@ -344,13 +345,14 @@
</div> </div>
</template> </template>
<script> <script>
import { listWbApply, deleteLogical, detailList, batchAddition } from '@/api/equipment/draw' import { listWbApply, deleteLogical, detailList, batchAddition, detail } from '@/api/equipment/draw'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { title } from '@/settings'
export default { export default {
name: 'Role', name: 'Role',
data() { data() {
return { return {
totalApplyDetail: 0,
applyList: [],
canceList: [], canceList: [],
applyId: '', applyId: '',
multipleSelection: [], multipleSelection: [],
...@@ -432,7 +434,7 @@ export default { ...@@ -432,7 +434,7 @@ export default {
ptype: 1, ptype: 1,
delFlag: 0 delFlag: 0
}, },
// 查询apply_detail的参数 // 查询warehouse的参数
queryParamsDetail: { queryParamsDetail: {
page: 1, page: 1,
rows: 10, rows: 10,
...@@ -448,7 +450,9 @@ export default { ...@@ -448,7 +450,9 @@ export default {
children: 'children', children: 'children',
label: 'label' label: 'label'
}, },
deptOptions: [] deptOptions: [],
// 判断状态显示表单
applyStatus: ''
} }
}, },
/** 路由离开前存储筛选条件*/ /** 路由离开前存储筛选条件*/
...@@ -474,6 +478,7 @@ export default { ...@@ -474,6 +478,7 @@ export default {
}, },
methods: { methods: {
handleCance() { handleCance() {
this.loadingDetail = true
console.log('multipleSelection', this.multipleSelection) console.log('multipleSelection', this.multipleSelection)
if (this.multipleSelection.length === 0) { if (this.multipleSelection.length === 0) {
this.$message.warning('请至少选择一个要处理的设备') this.$message.warning('请至少选择一个要处理的设备')
...@@ -495,14 +500,20 @@ export default { ...@@ -495,14 +500,20 @@ export default {
}) })
console.log('canceList', this.canceList) console.log('canceList', this.canceList)
batchAddition(this.canceList).then(res => { batchAddition(this.canceList).then(res => {
console.log('res',res) console.log('res', res)
if (res.code === 200) {
this.loadingDetail = false
this.openHandle = false
this.$message.success('操作成功')
this.getList()
}
}) })
} }
}, },
/** 查询apply_detail列表 */ /** 查询warehouse列表 */
getDeviceList() { getDeviceList() {
this.loadingDetail = true this.loadingDetail = true
detailList(this.queryParams).then(res => { detailList(this.queryParamsDetail).then(res => {
res.rows.createDate = parseTime(res.rows.createDate, '{y}-{m}-{d}') res.rows.createDate = parseTime(res.rows.createDate, '{y}-{m}-{d}')
this.totalDetail = res.total this.totalDetail = res.total
this.detailApplyList = res.rows this.detailApplyList = res.rows
...@@ -523,11 +534,20 @@ export default { ...@@ -523,11 +534,20 @@ export default {
}, },
// 获取所选行详情信息 // 获取所选行详情信息
handleDetail(row) { handleDetail(row) {
const id = row.businessId
this.openDetails = true
this.singleDetails = row this.singleDetails = row
this.title = '详情' this.title = '详情'
this.openDetails = !this.openDetails detail(id).then(res => {
console.log('res', res)
res.data.createDate = parseTime(res.data.createDate, '{y}-{m}-{d}')
// this.totalApplyDetail = res.total
this.applyList = res.data.wbApplyDetailList
this.applyStatus = res.data.pstatus
this.loadingDetail = false
})
}, },
/** 查询基础信息列表 */ /** 查询apply列表 */
getList() { getList() {
this.loading = true this.loading = true
listWbApply(this.queryParams).then( listWbApply(this.queryParams).then(
...@@ -573,6 +593,11 @@ export default { ...@@ -573,6 +593,11 @@ export default {
} }
this.resetForm('form') this.resetForm('form')
}, },
// warehouse查询
handleQueryWarehouse() {
this.queryParamsDetail.page = 1
this.getDeviceList()
},
/** 查询按钮操作 */ /** 查询按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.page = 1 this.queryParams.page = 1
...@@ -584,6 +609,11 @@ export default { ...@@ -584,6 +609,11 @@ export default {
this.resetForm('queryForm') this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
}, },
// warehouse的重置按钮
resetQueryWarehouse() {
this.resetForm('queryFormWarehouse')
this.handleQueryWarehouse()
},
// 多选框选中数据 // 多选框选中数据
handleSelectionChange: function(selection) { handleSelectionChange: function(selection) {
this.multipleSelection = selection this.multipleSelection = selection
......
This diff is collapsed.
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