Commit 33aa2aef authored by kzy's avatar kzy

查询盘点

parent bc1379dd
......@@ -45,3 +45,10 @@ export function deleteByType(data){
method:'delete'
})
}
export function checkInventory(query) {
return request({
url: '/wbwarehouse/checkInventory/' + query,
method: 'get',
});
}
\ No newline at end of file
......@@ -37,6 +37,10 @@
<el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item>
<div style="float: right">
<el-form-item>
<el-button style="padding: 8px 7px;" :type="'warning'" :size="smallSize" icon="el-icon-view" @click="checkInventory">查看盘点 </el-button>
</el-form-item>
<el-form-item>
<el-button style="padding: 8px 7px;" :type="typePrimary" :size="smallSize" :icon="addIcon" @click="checkType">开始盘点 {{ check }} </el-button>
</el-form-item>
......@@ -49,26 +53,26 @@
</el-form>
<div class="placeholder" />
<div style="padding:5px 10px">
<div class="mb12 font-small-bold">设备管理列表</div>
<div class="mb12 font-small-bold">库存盘点列表</div>
<el-table v-loading="loading" border :data="equipmentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="80" />
<el-table-column label="pn" prop="pn" width="120">
<el-table-column label="pn" prop="pn" width="220">
<template slot-scope="scope">
{{ scope.row.pn || '-' }}
</template>
</el-table-column>
<el-table-column label="lot" prop="lot" width="120">
<el-table-column label="lot" prop="lot" width="220">
<template slot-scope="scope">
{{ scope.row.lot || '-' }}
</template>
</el-table-column>
<el-table-column label="位置" prop="plocation">
<el-table-column label="位置" prop="plocation" width="220">
<template slot-scope="scope">
{{ scope.row.plocation || '-' }}
</template>
</el-table-column>
<el-table-column label="厚度" prop="phd">
<el-table-column label="厚度" prop="phd" width="220">
<template slot-scope="scope">
{{ scope.row.phd || '-' }}
</template>
......@@ -78,9 +82,9 @@
{{ scope.row.createName || '-' }}
</template>
</el-table-column>
<el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createDate">
<el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="updateDate">
<template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
<span>{{ scope.row.updateDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="80px">
......@@ -202,14 +206,44 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label=" 操作时间:" prop="createDate">
<el-input v-model.trim="singleDetails.createDate" :readonly="true" />
<el-form-item label=" 操作时间:" prop="updateDate">
<el-input v-model.trim="singleDetails.updateDate" :readonly="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
<el-drawer
title="库存盘点列表"
:visible.sync="table"
direction="rtl"
size="50%"
>
<el-table v-loading="loading" border :data="tableList" @selection-change="handleSelectionChange" style="padding: 0 10px;">
<el-table-column label="pn" prop="pn" >
<template slot-scope="scope">
{{ scope.row.pn || '-' }}
</template>
</el-table-column>
<el-table-column label="lot" prop="lot" >
<template slot-scope="scope">
{{ scope.row.lot || '-' }}
</template>
</el-table-column>
<el-table-column label="位置" prop="plocation" >
<template slot-scope="scope">
{{ scope.row.plocation || '-' }}
</template>
</el-table-column>
<el-table-column label="厚度" prop="phd" >
<template slot-scope="scope">
{{ scope.row.phd || '-' }}
</template>
</el-table-column>
</el-table>
</el-drawer>
</div>
</template>
......@@ -223,7 +257,7 @@ import {
getRole,
updateRole
} from '@/api/system/role'
import { checkType, listCheck,addList,deleteByType} from '@/api/equipment/check'
import { checkType, listCheck,addList,deleteByType,checkInventory} from '@/api/equipment/check'
import {roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect} from '@/api/system/menu'
import {roleDeptTreeselect, treeselect as deptTreeselect} from '@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template'
......@@ -236,6 +270,8 @@ export default {
Ptype: '',
checkList: [],
},
table:false,
tableList:[],
// 选中的列表
selectList:[],
// TODO: 表单里的单项详情参数
......@@ -246,7 +282,7 @@ export default {
location: '',
thickness: '',
createBy: '',
createTime: ''
updateDate: ''
},
// 是否显示弹出层(数据详情)
openDetails: false,
......@@ -348,6 +384,31 @@ export default {
delFlag:0
},
// 表单参数
form: {
......@@ -394,6 +455,23 @@ export default {
// });
},
methods: {
checkInventory() {
this.$confirm('确认查询盘点吗?')
.then(_ => {
this.table = true
checkInventory(1)
.then(response => {
// 处理返回的数据
this.tableList = response.data
console.log(response);
})
.catch(error => {
// 处理请求错误
console.error(error);
});
done();
}).catch(_ => {});
},
// TODO: 获取所选行详情信息操作
handleDetail(row) {
this.singleDetails = this.formReset
......@@ -414,7 +492,7 @@ export default {
if (flag.data > 0 && flag.code === 200) {
this.$message.success("结束盘点成功");
} else {
this.$message.error("结束盘点失败");
this.$message.error("当前未开始盘点");
}
});
})
......
......@@ -37,6 +37,10 @@
<el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item>
<div style="float: right">
<el-form-item>
<el-button style="padding: 8px 7px;" :type="'warning'" :size="smallSize" icon="el-icon-view" @click="checkInventory">查看盘点 </el-button>
</el-form-item>
<el-form-item>
<el-button style="padding: 8px 7px;" :type="typePrimary" :size="smallSize" :icon="addIcon" @click="checkType">开始盘点 {{ check }} </el-button>
</el-form-item>
......@@ -48,26 +52,26 @@
</el-form>
<div class="placeholder" />
<div style="padding:5px 10px">
<div class="mb12 font-small-bold">设备管理列表</div>
<div class="mb12 font-small-bold">库存盘点列表</div>
<el-table v-loading="loading" border :data="equipmentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="80" />
<el-table-column label="pn" prop="pn" width="120">
<el-table-column label="pn" prop="pn" width="220">
<template slot-scope="scope">
{{ scope.row.pn || '-' }}
</template>
</el-table-column>
<el-table-column label="lot" prop="lot" width="120">
<el-table-column label="lot" prop="lot" width="220">
<template slot-scope="scope">
{{ scope.row.lot || '-' }}
</template>
</el-table-column>
<el-table-column label="plocation" prop="plocation">
<el-table-column label="plocation" prop="plocation" width="220">
<template slot-scope="scope">
{{ scope.row.plocation || '-' }}
</template>
</el-table-column>
<el-table-column label="厚度" prop="phd">
<el-table-column label="厚度" prop="phd" width="220">
<template slot-scope="scope">
{{ scope.row.phd || '-' }}
</template>
......@@ -77,9 +81,9 @@
{{ scope.row.createName || '-' }}
</template>
</el-table-column>
<el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createDate">
<el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="updateDate">
<template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
<span>{{ scope.row.updateDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="80px">
......@@ -201,14 +205,44 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label=" 操作时间:" prop="createDate">
<el-input v-model.trim="singleDetails.createDate" :readonly="true" />
<el-form-item label=" 操作时间:" prop="updateDate">
<el-input v-model.trim="singleDetails.updateDate" :readonly="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
<el-drawer
title="库存盘点列表"
:visible.sync="table"
direction="rtl"
size="50%"
>
<el-table v-loading="loading" border :data="tableList" @selection-change="handleSelectionChange" style="padding: 0 10px;">
<el-table-column label="pn" prop="pn" >
<template slot-scope="scope">
{{ scope.row.pn || '-' }}
</template>
</el-table-column>
<el-table-column label="lot" prop="lot" >
<template slot-scope="scope">
{{ scope.row.lot || '-' }}
</template>
</el-table-column>
<el-table-column label="位置" prop="plocation" >
<template slot-scope="scope">
{{ scope.row.plocation || '-' }}
</template>
</el-table-column>
<el-table-column label="厚度" prop="phd" >
<template slot-scope="scope">
{{ scope.row.phd || '-' }}
</template>
</el-table-column>
</el-table>
</el-drawer>
</div>
</template>
......@@ -224,7 +258,7 @@ import {
updateRole
} from '@/api/system/role'
import {listCheck } from '@/api/equipment/checkProcess'
import { checkType, addList,deleteByType} from '@/api/equipment/check'
import { checkType, addList,deleteByType,checkInventory} from '@/api/equipment/check'
import {roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect} from '@/api/system/menu'
import {roleDeptTreeselect, treeselect as deptTreeselect} from '@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template'
......@@ -240,8 +274,10 @@ export default {
location: '',
thickness: '',
createBy: '',
createTime: ''
updateDate: ''
},
table:false,
tableList:[],
// 是否显示弹出层(数据详情)
openDetails: false,
// // TODO: 模拟测试数据
......@@ -385,6 +421,23 @@ export default {
// });
},
methods: {
checkInventory() {
this.$confirm('确认查询盘点吗?')
.then(_ => {
this.table = true
checkInventory(2)
.then(response => {
// 处理返回的数据
this.tableList = response.data
console.log(response);
})
.catch(error => {
// 处理请求错误
console.error(error);
});
done();
}).catch(_ => {});
},
// TODO: 获取所选行详情信息操作
handleDetail(row) {
this.singleDetails = this.formReset
......@@ -405,7 +458,7 @@ export default {
if (flag.data > 0) {
this.$message.success("结束盘点成功");
} else {
this.$message.error("结束盘点失败");
this.$message.error("当前未开始盘点");
}
});
})
......
......@@ -51,26 +51,26 @@
</el-form>
<div class="placeholder" />
<div style="padding:5px 10px">
<div class="mb12 font-small-bold">设备管理列表</div>
<div class="mb12 font-small-bold">设备废弃列表</div>
<el-table v-loading="loading" border :data="equipmentList" @selection-change="handleSelectionChange">
<el-table-column type="index" label="序号" width="80" />
<el-table-column label="pn" prop="pn" width="120">
<el-table-column label="pn" prop="pn" width="220">
<template slot-scope="scope">
{{ scope.row.pn || '-' }}
</template>
</el-table-column>
<el-table-column label="lot" prop="lot" width="120">
<el-table-column label="lot" prop="lot" width="220">
<template slot-scope="scope">
{{ scope.row.lot || '-' }}
</template>
</el-table-column>
<el-table-column label="plocation" prop="plocation">
<el-table-column label="plocation" prop="plocation" width="220">
<template slot-scope="scope">
{{ scope.row.plocation || '-' }}
</template>
</el-table-column>
<el-table-column label="厚度" prop="phd">
<el-table-column label="厚度" prop="phd" width="220">
<template slot-scope="scope">
{{ scope.row.phd || '-' }}
</template>
......@@ -80,9 +80,9 @@
{{ scope.row.createName || '-' }}
</template>
</el-table-column>
<el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createDate">
<el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="updateDate">
<template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
<span>{{ scope.row.updateDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="150px">
......@@ -203,8 +203,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label=" 操作时间:" prop="createDate">
<el-input v-model.trim="singleDetails.createDate" :readonly="true" />
<el-form-item label=" 操作时间:" prop="updateDate">
<el-input v-model.trim="singleDetails.updateDate" :readonly="true" />
</el-form-item>
</el-col>
</el-row>
......@@ -289,7 +289,7 @@ export default {
location: '',
thickness: '',
createBy: '',
createTime: ''
updateDate: ''
},
// 是否显示弹出层(数据详情)
openDetails: false,
......@@ -471,7 +471,7 @@ export default {
handleDetail(row) {
this.singleDetails = this.formReset
this.singleDetails = row
this.title = '详情信息'
this.title = '废弃信息'
this.openDetails = !this.openDetails
},
handelTab(i, e) {
......
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