Commit 2d482cfe authored by kzy's avatar kzy

修复了工序库中库存盘点的奇异bug

parent 31e7dc39
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" style="padding: 8px 7px;" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button> <el-button type="primary" style="padding: 8px 7px;" size="small" icon="el-icon-search" @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>
</el-form-item> </el-form-item>
<div style="float: right"> <div style="float: right">
<el-form-item> <el-form-item>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
{{ scope.row.lot || '-' }} {{ scope.row.lot || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="位置" prop="plocation" width="220"> <el-table-column label="plocation" prop="plocation" width="220">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.plocation || '-' }} {{ scope.row.plocation || '-' }}
</template> </template>
...@@ -384,31 +384,6 @@ export default { ...@@ -384,31 +384,6 @@ export default {
delFlag:0 delFlag:0
}, },
// 表单参数 // 表单参数
form: { form: {
...@@ -534,6 +509,7 @@ export default { ...@@ -534,6 +509,7 @@ export default {
}); });
}, },
handelTab(i, e) { handelTab(i, e) {
const that = this const that = this
if (!that.$refs['input' + i]) { if (!that.$refs['input' + i]) {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" style="padding: 8px 7px;" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button> <el-button type="primary" style="padding: 8px 7px;" size="small" icon="el-icon-search" @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>
</el-form-item> </el-form-item>
<div style="float: right"> <div style="float: right">
<el-form-item> <el-form-item>
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<el-form-item> <el-form-item>
<el-button style="padding: 8px 7px;" type="danger" :size="smallSize" @click="deleteByType" icon="el-icon-minus">结束盘点 {{ check }}</el-button> <el-button style="padding: 8px 7px;" type="danger" :size="smallSize" @click="deleteByType" icon="el-icon-minus">结束盘点 {{ check }}</el-button>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<div class="placeholder" /> <div class="placeholder" />
...@@ -98,8 +99,8 @@ ...@@ -98,8 +99,8 @@
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.page"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.rows"
@pagination="getList" @pagination="getList"
/> />
...@@ -146,7 +147,7 @@ ...@@ -146,7 +147,7 @@
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- TODO: 单项详情信息表单配置 --> <!-- 弹出框。。。。。。。。。。。。。。。。。。。。。。。 -->
<el-dialog class="aboutSingleDetails" :title="title" :visible.sync="openDetails" width="700px" append-to-body> <el-dialog class="aboutSingleDetails" :title="title" :visible.sync="openDetails" width="700px" append-to-body>
<el-form ref="formDetails" :model="singleDetails" size="small" label-width="90px"> <el-form ref="formDetails" :model="singleDetails" size="small" label-width="90px">
<el-row> <el-row>
...@@ -254,11 +255,9 @@ import { ...@@ -254,11 +255,9 @@ import {
delRole, delRole,
exportRole, exportRole,
getRole, getRole,
listRole,
updateRole updateRole
} from '@/api/system/role' } from '@/api/system/role'
import {listCheck } from '@/api/equipment/checkProcess' import { checkType, listCheck,addList,deleteByType,checkInventory} from '@/api/equipment/check'
import { checkType, addList,deleteByType,checkInventory} from '@/api/equipment/check'
import {roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect} from '@/api/system/menu' import {roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect} from '@/api/system/menu'
import {roleDeptTreeselect, treeselect as deptTreeselect} from '@/api/system/dept' import {roleDeptTreeselect, treeselect as deptTreeselect} from '@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template' // import { getRolesByInsId } from '../../../api/businessManage/template'
...@@ -266,6 +265,15 @@ export default { ...@@ -266,6 +265,15 @@ export default {
name: 'Role', name: 'Role',
data() { data() {
return { return {
// 需要盘点的list
checkFrom: {
Ptype: '',
checkList: [],
},
table:false,
tableList:[],
// 选中的列表
selectList:[],
// TODO: 表单里的单项详情参数 // TODO: 表单里的单项详情参数
singleDetails: { singleDetails: {
equipmentName: '', equipmentName: '',
...@@ -276,13 +284,10 @@ export default { ...@@ -276,13 +284,10 @@ export default {
createBy: '', createBy: '',
updateDate: '' updateDate: ''
}, },
table:false,
tableList:[],
// 是否显示弹出层(数据详情) // 是否显示弹出层(数据详情)
openDetails: false, openDetails: false,
// // TODO: 模拟测试数据 // // TODO: 模拟测试数据
equipmentList: [], // equipmentList: [{ equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '002', lot: 'xxx', location: '位置02', thickness: '70', createBy: '操作员02', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }],
selectList: [],
// check: '开始盘点', // check: '开始盘点',
typeParent: 'text', typeParent: 'text',
typePrimary: 'primary', typePrimary: 'primary',
...@@ -371,9 +376,13 @@ export default { ...@@ -371,9 +376,13 @@ export default {
queryParams: { queryParams: {
page: 1, page: 1,
rows: 10, rows: 10,
roleName: undefined,
roleKey: undefined,
flag: undefined,
ptype: 2, ptype: 2,
pstatus:0, pstatus:0,
delFlag:0 delFlag:0
}, },
// 表单参数 // 表单参数
form: { form: {
...@@ -466,25 +475,25 @@ export default { ...@@ -466,25 +475,25 @@ export default {
// 用户点击取消按钮时执行的回调函数,可以忽略这里的实现 // 用户点击取消按钮时执行的回调函数,可以忽略这里的实现
}); });
}, },
checkType() { checkType() {
// 添加二次确认对话框 checkType(2).then(total => {
this.$confirm("确认要盘点吗?", "提示", { if (total.data !== 0) {
confirmButtonText: "确定", this.$message.error("请先结束盘点");
cancelButtonText: "取消", } else {
type: "warning", let data = [];
}) if (this.selectList.length === 0) {
.then(() => { data = this.equipmentList;
// 用户点击确定按钮时执行的回调函数 } else {
checkType(2).then(total => { data = this.selectList;
if (total.data !== 0) { }
this.$message.error("请先结束盘点"); // 添加二次确认对话框
} else { this.$confirm("确认要进行盘点吗?", "提示", {
let data = []; confirmButtonText: "确定",
if (this.selectList.length === 0) { cancelButtonText: "取消",
data = this.equipmentList; type: "warning",
} else { })
data = this.selectList; .then(() => {
} // 用户点击确定按钮时执行的回调函数
addList(data).then(flag => { addList(data).then(flag => {
if (flag.data.influence > 0) { if (flag.data.influence > 0) {
this.$message.success("盘点成功"); this.$message.success("盘点成功");
...@@ -492,13 +501,15 @@ checkType() { ...@@ -492,13 +501,15 @@ checkType() {
this.$message.error("盘点失败"); this.$message.error("盘点失败");
} }
}); });
} })
}); .catch(() => {
}) // 用户点击取消按钮时执行的回调函数,可以忽略这里的实现
.catch(() => { });
// 用户点击取消按钮时执行的回调函数,可以忽略这里的实现 }
}); });
}, },
handelTab(i, e) { handelTab(i, e) {
const that = this const that = this
if (!that.$refs['input' + i]) { if (!that.$refs['input' + i]) {
...@@ -668,6 +679,7 @@ checkType() { ...@@ -668,6 +679,7 @@ checkType() {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.roleId) this.ids = selection.map(item => item.roleId)
this.selectList = selection
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
......
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