Commit 2d482cfe authored by kzy's avatar kzy

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

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