|
|
|
@ -2,7 +2,10 @@ |
|
|
|
<!-- 盘点差异处理 --> |
|
|
|
<!-- 盘点差异处理 --> |
|
|
|
<div class="app-container"> |
|
|
|
<div class="app-container"> |
|
|
|
<div class="search-box"> |
|
|
|
<div class="search-box"> |
|
|
|
<el-form :inline="true" :model="enterForm"> |
|
|
|
<el-form |
|
|
|
|
|
|
|
:inline="true" |
|
|
|
|
|
|
|
:model="enterForm" |
|
|
|
|
|
|
|
> |
|
|
|
<el-form-item label="单据编号"> |
|
|
|
<el-form-item label="单据编号"> |
|
|
|
<el-input |
|
|
|
<el-input |
|
|
|
v-model="enterForm.invOrderNo" |
|
|
|
v-model="enterForm.invOrderNo" |
|
|
|
@ -11,7 +14,10 @@ |
|
|
|
></el-input> |
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="操作员" prop="userName"> |
|
|
|
<el-form-item |
|
|
|
|
|
|
|
label="操作员" |
|
|
|
|
|
|
|
prop="userName" |
|
|
|
|
|
|
|
> |
|
|
|
<el-select |
|
|
|
<el-select |
|
|
|
v-model="enterForm.userName" |
|
|
|
v-model="enterForm.userName" |
|
|
|
filterable |
|
|
|
filterable |
|
|
|
@ -28,7 +34,10 @@ |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" @click="queryTable">搜索</el-button> |
|
|
|
<el-button |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="queryTable" |
|
|
|
|
|
|
|
>搜索</el-button> |
|
|
|
<el-button @click="resetQuery">重置</el-button> |
|
|
|
<el-button @click="resetQuery">重置</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
@ -36,7 +45,7 @@ |
|
|
|
<div class="opt-box"> |
|
|
|
<div class="opt-box"> |
|
|
|
<div class="opt-box-right"> |
|
|
|
<div class="opt-box-right"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<!-- <el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
type="primary" |
|
|
|
@click="calce" |
|
|
|
@click="calce" |
|
|
|
@ -51,14 +60,13 @@ |
|
|
|
:disabled="!handleSelect.length != 0" |
|
|
|
:disabled="!handleSelect.length != 0" |
|
|
|
>取消盘点</el-button |
|
|
|
>取消盘点</el-button |
|
|
|
> |
|
|
|
> |
|
|
|
</el-col> |
|
|
|
</el-col> --> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
type="primary" |
|
|
|
@click="quren" |
|
|
|
@click="quren" |
|
|
|
:disabled="!handleSelect.length != 0" |
|
|
|
:disabled="!handleSelect.length != 0" |
|
|
|
>盘点确认</el-button |
|
|
|
>盘点确认</el-button> |
|
|
|
> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -80,28 +88,23 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { tableConfig } from "./config.js"; |
|
|
|
import { tableConfig } from './config.js' |
|
|
|
import { Debounce, getDictLabel } from "@/utils/index"; |
|
|
|
import { Debounce, getDictLabel } from '@/utils/index' |
|
|
|
import { listUser } from "@/api/libraryManage/common"; |
|
|
|
import { listUser } from '@/api/libraryManage/common' |
|
|
|
import { |
|
|
|
import { differenceList, generatorCheckInv, confirm, cancel } from '@/api/libraryManage/inventory' |
|
|
|
differenceList, |
|
|
|
|
|
|
|
generatorCheckInv, |
|
|
|
|
|
|
|
confirm, |
|
|
|
|
|
|
|
cancel, |
|
|
|
|
|
|
|
} from "@/api/libraryManage/inventory"; |
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "Inventory", |
|
|
|
name: 'Inventory', |
|
|
|
dicts: ["goods_unit", "inv_type_dict"], |
|
|
|
dicts: ['goods_unit', 'inv_type_dict'], |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
...mapGetters(["user"]), |
|
|
|
...mapGetters(['user']) |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
options2: [], // 当前用户 |
|
|
|
options2: [], // 当前用户 |
|
|
|
enterForm: { |
|
|
|
enterForm: { |
|
|
|
invOrderNo: "", |
|
|
|
invOrderNo: '', |
|
|
|
userName: "", |
|
|
|
userName: '' |
|
|
|
}, |
|
|
|
}, |
|
|
|
tableData: [], |
|
|
|
tableData: [], |
|
|
|
handleSelect: [], |
|
|
|
handleSelect: [], |
|
|
|
@ -110,125 +113,121 @@ export default { |
|
|
|
paging: { |
|
|
|
paging: { |
|
|
|
page: 1, // 当前页 |
|
|
|
page: 1, // 当前页 |
|
|
|
size: 10, // 页面大小 |
|
|
|
size: 10, // 页面大小 |
|
|
|
total: 0, |
|
|
|
total: 0 |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() {}, |
|
|
|
mounted() {}, |
|
|
|
async created() { |
|
|
|
async created() { |
|
|
|
this.tableConfig = await this.getTableHeaderCom( |
|
|
|
this.tableConfig = await this.getTableHeaderCom('busin_inventory_different', tableConfig.call(this), 'configInventoryDifference') |
|
|
|
"busin_inventory_different", |
|
|
|
await this.getList() |
|
|
|
tableConfig.call(this), |
|
|
|
this.queryTable() |
|
|
|
"configInventoryDifference" |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
await this.getList(); |
|
|
|
|
|
|
|
this.queryTable(); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
/** 查询用户列表 */ |
|
|
|
/** 查询用户列表 */ |
|
|
|
async getList() { |
|
|
|
async getList() { |
|
|
|
listUser({}).then((response) => { |
|
|
|
listUser({}).then((response) => { |
|
|
|
this.options2 = response.data; |
|
|
|
this.options2 = response.data |
|
|
|
this.enterForm.userName = this.user.userName; |
|
|
|
this.enterForm.userName = this.user.userName |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 表格复选框选中 |
|
|
|
// 表格复选框选中 |
|
|
|
handleselection(val) { |
|
|
|
handleselection(val) { |
|
|
|
this.handleSelect = val.map((ele) => ele.id); |
|
|
|
this.handleSelect = val.map((ele) => ele.id) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 重置 |
|
|
|
// 重置 |
|
|
|
resetQuery() { |
|
|
|
resetQuery() { |
|
|
|
this.enterForm = {}; |
|
|
|
this.enterForm = {} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 表格的数据 |
|
|
|
// 表格的数据 |
|
|
|
queryTable() { |
|
|
|
queryTable() { |
|
|
|
this.loading = true; |
|
|
|
this.loading = true |
|
|
|
differenceList({ |
|
|
|
differenceList({ |
|
|
|
pageSize: this.paging.size, |
|
|
|
pageSize: this.paging.size, |
|
|
|
pageNum: this.paging.page, |
|
|
|
pageNum: this.paging.page, |
|
|
|
...this.enterForm, |
|
|
|
...this.enterForm |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then((response) => { |
|
|
|
.then((response) => { |
|
|
|
if (response.code === 200) { |
|
|
|
if (response.code === 200) { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
this.paging.total = response.total; |
|
|
|
this.paging.total = response.total |
|
|
|
this.tableData = response.rows; |
|
|
|
this.tableData = response.rows |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
.catch(() => { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 确认 |
|
|
|
// 确认 |
|
|
|
quren() { |
|
|
|
quren() { |
|
|
|
let obj = { |
|
|
|
let obj = { |
|
|
|
userName: this.enterForm.userName, |
|
|
|
userName: this.enterForm.userName, |
|
|
|
ids: this.handleSelect, |
|
|
|
ids: this.handleSelect |
|
|
|
}; |
|
|
|
} |
|
|
|
confirm(obj) |
|
|
|
confirm(obj) |
|
|
|
.then((response) => { |
|
|
|
.then((response) => { |
|
|
|
if (response.code === 200) { |
|
|
|
if (response.code === 200) { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
message: "操作成功!", |
|
|
|
message: '操作成功!', |
|
|
|
type: "success", |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
|
}) |
|
|
|
this.queryTable(); |
|
|
|
this.queryTable() |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
.catch(() => { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 生成复盘 |
|
|
|
// 生成复盘 |
|
|
|
calce() { |
|
|
|
calce() { |
|
|
|
let obj = { |
|
|
|
let obj = { |
|
|
|
userName: this.enterForm.userName, |
|
|
|
userName: this.enterForm.userName, |
|
|
|
ids: this.handleSelect, |
|
|
|
ids: this.handleSelect |
|
|
|
}; |
|
|
|
} |
|
|
|
generatorCheckInv(obj) |
|
|
|
generatorCheckInv(obj) |
|
|
|
.then((response) => { |
|
|
|
.then((response) => { |
|
|
|
if (response.code === 200) { |
|
|
|
if (response.code === 200) { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
message: "操作成功!", |
|
|
|
message: '操作成功!', |
|
|
|
type: "success", |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
|
}) |
|
|
|
this.queryTable(); |
|
|
|
this.queryTable() |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
.catch(() => { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 取消盘点 |
|
|
|
// 取消盘点 |
|
|
|
generateThePlan() { |
|
|
|
generateThePlan() { |
|
|
|
this.$confirm("是否确认删除所选明细?", "提示", { |
|
|
|
this.$confirm('是否确认删除所选明细?', '提示', { |
|
|
|
confirmButtonText: "确定", |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: "取消", |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: "warning", |
|
|
|
type: 'warning' |
|
|
|
}).then(async () => { |
|
|
|
}).then(async () => { |
|
|
|
this.remove(); |
|
|
|
this.remove() |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 取消盘点请求 |
|
|
|
// 取消盘点请求 |
|
|
|
remove() { |
|
|
|
remove() { |
|
|
|
cancel(this.handleSelect) |
|
|
|
cancel(this.handleSelect) |
|
|
|
.then((response) => { |
|
|
|
.then((response) => { |
|
|
|
if (response.code === 200) { |
|
|
|
if (response.code === 200) { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
message: "操作成功!", |
|
|
|
message: '操作成功!', |
|
|
|
type: "success", |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
|
}) |
|
|
|
this.queryTable(); |
|
|
|
this.queryTable() |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
.catch(() => { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped></style> |
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped></style> |
|
|
|
|