盘点差异,入库联查字段修改,历史单据作业查询
This commit is contained in:
44
ruoyi-ui/src/api/check/difference.js
Normal file
44
ruoyi-ui/src/api/check/difference.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询盘点差异列表
|
||||
export function listDifference(query) {
|
||||
return request({
|
||||
url: '/check/difference/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘点差异详细
|
||||
export function getDifference(checkGuid) {
|
||||
return request({
|
||||
url: '/check/difference/' + checkGuid,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增盘点差异
|
||||
export function addDifference(data) {
|
||||
return request({
|
||||
url: '/check/difference',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改盘点差异
|
||||
export function updateDifference(data) {
|
||||
return request({
|
||||
url: '/check/difference',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除盘点差异
|
||||
export function delDifference(checkGuid) {
|
||||
return request({
|
||||
url: '/check/difference/' + checkGuid,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -42,3 +42,11 @@ export function delStockInDetail(stockinDetailId) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function barcodePrinting(data) {
|
||||
return request({
|
||||
url: '/in/stockInDetail/barcodePrinting',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
295
ruoyi-ui/src/views/check/create/index.vue
Normal file
295
ruoyi-ui/src/views/check/create/index.vue
Normal file
@@ -0,0 +1,295 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 主表信息录入 -->
|
||||
<el-form :model="formData" ref="formRef" size="small" :inline="true" label-width="68px" :rules="rules">
|
||||
<el-form-item label="仓库" prop="warehouseId" required>
|
||||
<el-select v-model="formData.warehouseId" placeholder="请选择仓库" clearable>
|
||||
<el-option
|
||||
v-for="dict in warehouseOptions"
|
||||
:key="dict.warehouseId"
|
||||
:label="dict.warehouseName"
|
||||
:value="dict.warehouseId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户" prop="customerNo" required>
|
||||
<el-input
|
||||
v-model="formData.customerNo"
|
||||
placeholder="请输入客户编号"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型" prop="outType" required>
|
||||
<el-select v-model="formData.outType" placeholder="请选择单据类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.out_bill_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="warning" icon="el-icon-refresh" size="mini" @click="reset">重置</el-button>
|
||||
<el-button type="success" icon="el-icon-check" size="mini" @click="handleSave">保存单据</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="mb8">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleSelectMaterials">选择物资</el-button>
|
||||
<el-button type="info" icon="el-icon-refresh-right" size="mini" @click="handleReload">重新建单</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 物资明细表格 -->
|
||||
<el-table v-loading="loading" :data="materialList">
|
||||
<el-table-column label="物资编号" align="center" prop="productId" />
|
||||
<el-table-column label="物资名称" align="center" prop="productName" />
|
||||
<el-table-column label="批号" align="center" prop="lotNo" />
|
||||
<el-table-column label="数量" align="center" prop="quantity">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.quantity" :min="1" size="mini" @change="handleQuantityChange(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 选择物资弹窗 -->
|
||||
<el-dialog title="选择物资" :visible.sync="materialDialog" width="800px" append-to-body>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="物资编码" prop="productId">
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
placeholder="请输入物资编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称" prop="productName">
|
||||
<el-input
|
||||
v-model="queryParams.productName"
|
||||
placeholder="请输入物资名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批号" prop="lotNo">
|
||||
<el-input
|
||||
v-model="queryParams.lotNo"
|
||||
placeholder="请输入批号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="仓库" prop="warehouseId">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入仓库"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="materialLoading" :data="materialOptions" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="物资编码" align="center" prop="productId" />
|
||||
<el-table-column label="物资名称" align="center" prop="productName" />
|
||||
<el-table-column label="批号" align="center" prop="lotNo" />
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<!-- <el-table-column label="仓库" align="center" prop="warehouseId" /> -->
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmSelectMaterials">确 定</el-button>
|
||||
<el-button @click="cancelSelectMaterials">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listProductAndStock,saveOutStock } from "@/api/out/outStockout";
|
||||
import {listWarehouse} from "@/api/bas/warehouse";
|
||||
|
||||
export default {
|
||||
name: "AddOutStock",
|
||||
dicts: ['out_bill_type', 'bill_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
materialLoading: false,
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
warehouseId: [
|
||||
{ required: true, message: "请选择仓库", trigger: "change" }
|
||||
],
|
||||
customerNo: [
|
||||
{ required: true, message: "请输入客户编号", trigger: "blur" }
|
||||
],
|
||||
billType: [
|
||||
{ required: true, message: "请选择单据类型", trigger: "change" }
|
||||
]
|
||||
},
|
||||
// 主表数据
|
||||
formData: {
|
||||
warehouseId: null,
|
||||
customerNo: null,
|
||||
outType: null
|
||||
},
|
||||
// 仓库选项
|
||||
warehouseOptions: [],
|
||||
// 物资明细列表
|
||||
materialList: [],
|
||||
// 选择物资弹窗
|
||||
materialDialog: false,
|
||||
// 物资选项数据
|
||||
materialOptions: [],
|
||||
// 已选择的物资
|
||||
selectedMaterials: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
onlyIdentity: null,
|
||||
productId: null,
|
||||
lotNo: null,
|
||||
productName: null,
|
||||
quantity: null,
|
||||
warehouseId: null
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getWarehouseOptions();
|
||||
},
|
||||
methods: {
|
||||
/** 获取仓库选项 */
|
||||
getWarehouseOptions() {
|
||||
|
||||
listWarehouse().then(response => {
|
||||
this.warehouseOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 打开选择物资弹窗 */
|
||||
handleSelectMaterials() {
|
||||
this.materialDialog = true;
|
||||
this.getMaterialList();
|
||||
},
|
||||
/** 获取物资列表 */
|
||||
getMaterialList() {
|
||||
this.materialLoading = true;
|
||||
listProductAndStock(this.queryParams).then(response => {
|
||||
this.materialOptions = response.rows;
|
||||
this.materialLoading = false;
|
||||
});
|
||||
},
|
||||
/** 物资选择变更 */
|
||||
handleSelectionChange(selection) {
|
||||
this.selectedMaterials = selection;
|
||||
},
|
||||
/** 确认选择物资 */
|
||||
confirmSelectMaterials() {
|
||||
if (this.selectedMaterials.length === 0) {
|
||||
this.$modal.msgError("请选择物资");
|
||||
return;
|
||||
}
|
||||
// 过滤掉已经存在的物资
|
||||
const newMaterials = this.selectedMaterials.filter(item => {
|
||||
return !this.materialList.some(existing => existing.onlyIdentity === item.onlyIdentity);
|
||||
});
|
||||
|
||||
if (newMaterials.length === 0) {
|
||||
this.$modal.msgWarning("所选物资已存在,请重新选择");
|
||||
return;
|
||||
}
|
||||
|
||||
this.materialList = this.materialList.concat(
|
||||
newMaterials.map(item => ({
|
||||
productId: item.productId,
|
||||
productName: item.productName,
|
||||
quantity: item.quantity,
|
||||
quantityOrignal: item.quantity,
|
||||
lotNo: item.lotNo,
|
||||
onlyIdentity: item.onlyIdentity
|
||||
}))
|
||||
);
|
||||
this.materialDialog = false;
|
||||
this.selectedMaterials = [];
|
||||
},
|
||||
/** 取消选择物资 */
|
||||
cancelSelectMaterials() {
|
||||
this.selectedMaterials = [];
|
||||
this.materialDialog = false;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getMaterialList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 删除物资 */
|
||||
handleDelete(index) {
|
||||
this.materialList.splice(index, 1);
|
||||
},
|
||||
/** 数量变更 */
|
||||
handleQuantityChange(row) {
|
||||
// 如果没有初始数量,则设置初始数量
|
||||
|
||||
// 如果修改后的数量大于初始数量,给出提示并重置为当前值
|
||||
if (row.quantity > row.quantityOrignal) {
|
||||
this.$modal.msgError("数量不能大于库存数量");
|
||||
row.quantity = row.quantityOrignal;
|
||||
}
|
||||
},
|
||||
/** 保存单据 */
|
||||
handleSave() {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.materialList.length === 0) {
|
||||
this.$modal.msgError("请选择物资");
|
||||
return;
|
||||
}
|
||||
const data = {
|
||||
outStockout: this.formData,
|
||||
detailList: this.materialList
|
||||
};
|
||||
// 这里需要调用保存接口
|
||||
saveOutStock(data).then(response => {
|
||||
console.log(response)
|
||||
this.$modal.msgSuccess("单据"+response.msg+"保存成功");
|
||||
this.$tab.refreshPage(this.$route);
|
||||
// this.reset();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 重置数据 */
|
||||
reset() {
|
||||
this.formData = {
|
||||
warehouseId: null,
|
||||
customerNo: null,
|
||||
outType: null
|
||||
};
|
||||
this.materialList = [];
|
||||
},
|
||||
/** 重新建单 */
|
||||
handleReload() {
|
||||
this.$tab.refreshPage(this.$route);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
389
ruoyi-ui/src/views/check/difference/index.vue
Normal file
389
ruoyi-ui/src/views/check/difference/index.vue
Normal file
@@ -0,0 +1,389 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="盘点单据id" prop="checkStockDetailId">
|
||||
<el-input
|
||||
v-model="queryParams.checkStockDetailId"
|
||||
placeholder="请输入盘点单据id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存id" prop="stockId">
|
||||
<el-input
|
||||
v-model="queryParams.stockId"
|
||||
placeholder="请输入库存id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘" prop="trayCode">
|
||||
<el-input
|
||||
v-model="queryParams.trayCode"
|
||||
placeholder="请输入托盘"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="货位id" prop="cargoSpaceId">
|
||||
<el-input
|
||||
v-model="queryParams.cargoSpaceId"
|
||||
placeholder="请输入货位id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料id" prop="productId">
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
placeholder="请输入物料id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号" prop="lotNo">
|
||||
<el-input
|
||||
v-model="queryParams.lotNo"
|
||||
placeholder="请输入批次号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="供应商" prop="supplier">
|
||||
<el-input
|
||||
v-model="queryParams.supplier"
|
||||
placeholder="请输入供应商"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户" prop="customer">
|
||||
<el-input
|
||||
v-model="queryParams.customer"
|
||||
placeholder="请输入客户"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="原值" prop="oldQuantity">
|
||||
<el-input
|
||||
v-model="queryParams.oldQuantity"
|
||||
placeholder="请输入原值"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="新值" prop="newQuantity">
|
||||
<el-input
|
||||
v-model="queryParams.newQuantity"
|
||||
placeholder="请输入新值"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="物料guid" prop="productGuid">
|
||||
<el-input
|
||||
v-model="queryParams.productGuid"
|
||||
placeholder="请输入物料guid"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['check:difference:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['check:difference:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['check:difference:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['check:difference:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="differenceList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="盘点id" align="center" prop="checkGuid" />
|
||||
<el-table-column label="盘点单据id" align="center" prop="checkStockDetailId" />
|
||||
<el-table-column label="库存id" align="center" prop="stockId" />
|
||||
<el-table-column label="托盘" align="center" prop="trayCode" />
|
||||
<el-table-column label="货位id" align="center" prop="cargoSpaceId" />
|
||||
<el-table-column label="物料id" align="center" prop="productId" />
|
||||
<el-table-column label="批次号" align="center" prop="lotNo" />
|
||||
<el-table-column label="供应商" align="center" prop="supplier" />
|
||||
<el-table-column label="客户" align="center" prop="customer" />
|
||||
<el-table-column label="原值" align="center" prop="oldQuantity" />
|
||||
<el-table-column label="新值" align="center" prop="newQuantity" />
|
||||
<el-table-column label="操作方式" align="center" prop="recordType" />
|
||||
<el-table-column label="物料guid" align="center" prop="productGuid" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['check:difference:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['check:difference:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改盘点差异对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="盘点单据id" prop="checkStockDetailId">
|
||||
<el-input v-model="form.checkStockDetailId" placeholder="请输入盘点单据id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库存id" prop="stockId">
|
||||
<el-input v-model="form.stockId" placeholder="请输入库存id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘" prop="trayCode">
|
||||
<el-input v-model="form.trayCode" placeholder="请输入托盘" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货位id" prop="cargoSpaceId">
|
||||
<el-input v-model="form.cargoSpaceId" placeholder="请输入货位id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料id" prop="productId">
|
||||
<el-input v-model="form.productId" placeholder="请输入物料id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号" prop="lotNo">
|
||||
<el-input v-model="form.lotNo" placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplier">
|
||||
<el-input v-model="form.supplier" placeholder="请输入供应商" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户" prop="customer">
|
||||
<el-input v-model="form.customer" placeholder="请输入客户" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原值" prop="oldQuantity">
|
||||
<el-input v-model="form.oldQuantity" placeholder="请输入原值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="新值" prop="newQuantity">
|
||||
<el-input v-model="form.newQuantity" placeholder="请输入新值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料guid" prop="productGuid">
|
||||
<el-input v-model="form.productGuid" placeholder="请输入物料guid" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDifference, getDifference, delDifference, addDifference, updateDifference } from "@/api/check/difference"
|
||||
|
||||
export default {
|
||||
name: "Difference",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 盘点差异表格数据
|
||||
differenceList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
checkStockDetailId: null,
|
||||
stockId: null,
|
||||
trayCode: null,
|
||||
cargoSpaceId: null,
|
||||
productId: null,
|
||||
lotNo: null,
|
||||
supplier: null,
|
||||
customer: null,
|
||||
oldQuantity: null,
|
||||
newQuantity: null,
|
||||
recordType: null,
|
||||
productGuid: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询盘点差异列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listDifference(this.queryParams).then(response => {
|
||||
this.differenceList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
checkGuid: null,
|
||||
checkStockDetailId: null,
|
||||
stockId: null,
|
||||
trayCode: null,
|
||||
cargoSpaceId: null,
|
||||
productId: null,
|
||||
lotNo: null,
|
||||
supplier: null,
|
||||
customer: null,
|
||||
oldQuantity: null,
|
||||
newQuantity: null,
|
||||
recordType: null,
|
||||
createTime: null,
|
||||
productGuid: null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.checkGuid)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = "添加盘点差异"
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const checkGuid = row.checkGuid || this.ids
|
||||
getDifference(checkGuid).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = "修改盘点差异"
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.checkGuid != null) {
|
||||
updateDifference(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addDifference(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const checkGuids = row.checkGuid || this.ids
|
||||
this.$modal.confirm('是否确认删除盘点差异编号为"' + checkGuids + '"的数据项?').then(function() {
|
||||
return delDifference(checkGuids)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('check/difference/export', {
|
||||
...this.queryParams
|
||||
}, `difference_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -263,7 +263,7 @@
|
||||
<el-table-column label="任务号" align="center" prop="taskNo" />
|
||||
<el-table-column label="供应商" align="center" prop="supplierName" key="supplierId" value="supplierName" />
|
||||
<!-- <el-table-column label="客户ID" align="center" prop="customerId" />-->
|
||||
<el-table-column label="部门ID" align="center" prop="departmentId" />
|
||||
<el-table-column label="部门" align="center" prop="departmentName" />
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="巷道ID" align="center" prop="roadwayId" />
|
||||
<el-table-column label="货位" align="center" prop="cargoSpaceName" />
|
||||
@@ -389,7 +389,7 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
jobId: null,
|
||||
status: 1,
|
||||
status: '1',
|
||||
onLineType: null,
|
||||
taskNo: null,
|
||||
supplierId: null,
|
||||
@@ -404,7 +404,7 @@ export default {
|
||||
workshopId: null,
|
||||
priority: null,
|
||||
executionPhase: null,
|
||||
inOrOut: null,
|
||||
inOrOut: '1',
|
||||
createTime: null,
|
||||
startTime: null,
|
||||
finishTime: null,
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
<el-select v-model="form.supplierId" :placeholder="$t('receiveStockinAdd.selectSupplier')">
|
||||
<el-option
|
||||
v-for="item in supplierOptions"
|
||||
:key="item.supplierNo"
|
||||
:key="item.id"
|
||||
:label="item.simpleName"
|
||||
:value="item.id"
|
||||
:value="item.supplierNo"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -120,7 +120,7 @@
|
||||
icon="el-icon-delete"
|
||||
@click="handleDeleteProduct(scope.$index)"
|
||||
>{{ $t('receiveStockinAdd.delete') }}</el-button>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -193,6 +193,7 @@ import {addStockin} from "@/api/receive/stockin";
|
||||
import {listBasProduct} from "@/api/bas/BasProduct";
|
||||
import {listBasSupplier} from "@/api/bas/BasSupplier";
|
||||
import { getToken } from "@/utils/auth"
|
||||
import {listWarehouse} from "@/api/bas/warehouse"
|
||||
|
||||
|
||||
export default {
|
||||
@@ -221,10 +222,7 @@ export default {
|
||||
|
||||
},
|
||||
// 仓库选项
|
||||
warehouseOptions: [
|
||||
{warehouseId: 1, warehouseName: "主仓库"},
|
||||
{warehouseId: 2, warehouseName: "次仓库"}
|
||||
],
|
||||
warehouseOptions: [],
|
||||
// 供应商选项
|
||||
supplierOptions: [],
|
||||
// 物料列表
|
||||
@@ -266,7 +264,7 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
//this.getWarehouseList();
|
||||
this.getWarehouseList();
|
||||
this.getSupplierList();
|
||||
console.log(this.supplierOptions)
|
||||
},
|
||||
|
||||
@@ -125,12 +125,34 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="warehouseId">
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入仓库"
|
||||
placeholder="请选择仓库"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in warehouseOptions"
|
||||
:key="item.warehouseId"
|
||||
:label="item.warehouseName"
|
||||
:value="item.warehouseId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择单据状态"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in statusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@@ -194,9 +216,13 @@
|
||||
<el-table-column label="入库订单ID" align="center" prop="stockinId"/>
|
||||
<el-table-column label="入库类型" align="center" prop="inType"/>
|
||||
<el-table-column label="建立时间" align="center" prop="createDate"/>
|
||||
<el-table-column label="创建人" align="center" prop="createManId"/>
|
||||
<el-table-column label="单据状态" align="center" prop="status"/>
|
||||
<el-table-column label="仓库ID" align="center" prop="warehouseId"/>
|
||||
<el-table-column label="创建人" align="center" prop="createManName"/>
|
||||
<el-table-column label="单据状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="statusOptions" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" prop="warehouseName"/>
|
||||
<!-- <el-table-column label="备用字段5" align="center" prop="spare5" />
|
||||
<el-table-column label="备用字段4" align="center" prop="spare4" />
|
||||
<el-table-column label="备用字段3" align="center" prop="spare3" />-->
|
||||
@@ -205,10 +231,10 @@
|
||||
<el-table-column label="备用字段1" align="center" prop="spare1" />-->
|
||||
<el-table-column label="erp单号" align="center" prop="erpBill"/>
|
||||
<el-table-column label="单据来源" align="center" prop="stockSource"/>
|
||||
<el-table-column label="部门编码" align="center" prop="departmentNo"/>
|
||||
<el-table-column label="部门" align="center" prop="departmentName"/>
|
||||
<!-- <el-table-column label="客户编码" align="center" prop="customerNo"/>-->
|
||||
<el-table-column label="班组编码" align="center" prop="classNo"/>
|
||||
<el-table-column label="供应商编码" align="center" prop="supplierNo"/>
|
||||
<el-table-column label="供应商" align="center" prop="supplierName"/>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -289,7 +315,11 @@
|
||||
<el-table-column label="实际数量(箱)" align="center" prop="assignNumX" />
|
||||
<el-table-column label="实际数量(件)" align="center" prop="assignNumJ" />-->
|
||||
<!-- <el-table-column label="入库日期" align="center" prop="printDate"/>-->
|
||||
<el-table-column label="单据状态" align="center" prop="stockStatus"/>
|
||||
<el-table-column label="单据状态" align="center" prop="stockStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="statusOptions" :value="scope.row.stockStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="供应商编码" align="center" prop="supplierId"/>-->
|
||||
<!-- <el-table-column label="客户编码" align="center" prop="customerId"/>-->
|
||||
<el-table-column label="单位" align="center" prop="unit"/>
|
||||
@@ -336,11 +366,18 @@
|
||||
<script>
|
||||
import {listStockin, getStockin, delStockin, addStockin, updateStockin, createStockin} from "@/api/receive/stockin"
|
||||
import {listStockInDetail, delStockInDetail,qualityInspection} from "@/api/receive/stockInDetail"
|
||||
import {listWarehouse} from "@/api/bas/warehouse"
|
||||
import { getDicts } from "@/api/system/dict/data"
|
||||
|
||||
export default {
|
||||
name: "Stockin",
|
||||
dicts: ['receive_bill_status'],
|
||||
data() {
|
||||
return {
|
||||
// 仓库选项列表
|
||||
warehouseOptions: [],
|
||||
// 单据状态字典
|
||||
statusOptions: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
detailLoading: true,
|
||||
@@ -372,7 +409,7 @@ export default {
|
||||
inType: null,
|
||||
createDate: null,
|
||||
createManId: null,
|
||||
status: null,
|
||||
status: '0',
|
||||
warehouseId: null,
|
||||
spare5: null,
|
||||
spare4: null,
|
||||
@@ -413,6 +450,8 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getWarehouseList()
|
||||
this.getDictList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询收货单据列表 */
|
||||
@@ -506,6 +545,7 @@ export default {
|
||||
getDetailList(stockinId) {
|
||||
this.detailLoading = true;
|
||||
this.queryDetailParams.stockinId = stockinId;
|
||||
this.queryDetailParams.status = this.queryParams.status;
|
||||
listStockInDetail(this.queryDetailParams).then(response => {
|
||||
this.stockInDetailList = response.rows;
|
||||
this.detailTotal = response.total;
|
||||
@@ -573,6 +613,22 @@ export default {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
/** 获取字典数据 */
|
||||
getDictList() {
|
||||
getDicts("receive_bill_status").then(response => {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
},
|
||||
/** 获取仓库列表 */
|
||||
getWarehouseList() {
|
||||
listWarehouse().then(response => {
|
||||
this.warehouseOptions = response.rows;
|
||||
if (this.warehouseOptions.length > 0) {
|
||||
this.queryParams.warehouseId = this.warehouseOptions[0].warehouseId;
|
||||
this.handleQuery();
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -9,16 +9,43 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="入库类型" prop="inType">
|
||||
<el-select v-model="queryParams.inType" placeholder="请选择入库类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.in_bill_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库类型" prop="inType">
|
||||
<el-select v-model="queryParams.inType" placeholder="请选择入库类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.in_bill_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.in_bill_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="仓库ID" prop="warehouseId">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入仓库ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="供应商编码" prop="supplierNo">
|
||||
<el-input
|
||||
v-model="queryParams.supplierNo"
|
||||
placeholder="请输入供应商编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!--
|
||||
<el-form-item label="建立时间" prop="createDate">
|
||||
<el-input
|
||||
v-model="queryParams.createDate"
|
||||
@@ -95,14 +122,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商编码" prop="supplierNo">
|
||||
<el-input
|
||||
v-model="queryParams.supplierNo"
|
||||
placeholder="请输入供应商编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
-->
|
||||
<!-- <el-form-item label="备用字段1" prop="spare1">
|
||||
<el-input
|
||||
v-model="queryParams.spare1"
|
||||
@@ -203,6 +223,7 @@
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
:disabled="detailMultiple"
|
||||
@click="handleBarcodePrinting"
|
||||
v-hasPermi="['in:stockIn:barcodePrinting']"
|
||||
>打印条码
|
||||
@@ -222,13 +243,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="建立时间" align="center" prop="createDate"/>
|
||||
<el-table-column label="创建人" align="center" prop="createManId"/>
|
||||
<el-table-column label="创建人" align="center" prop="createManName"/>
|
||||
<el-table-column label="单据状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.in_bill_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库ID" align="center" prop="warehouseId"/>
|
||||
<el-table-column label="仓库" align="center" prop="warehouseName"/>
|
||||
<el-table-column label=" 完成日期" align="center" prop="finishDate"/>
|
||||
<el-table-column label="erp单号" align="center" prop="erpBill"/>
|
||||
<el-table-column label="单据来源" align="center" prop="stockSource">
|
||||
@@ -236,10 +257,10 @@
|
||||
<dict-tag :options="dict.type.bill_resource" :value="scope.row.stockSource"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部门编码" align="center" prop="departmentNo"/>
|
||||
<el-table-column label="部门" align="center" prop="departmentName"/>
|
||||
<!-- <el-table-column label="客户编码" align="center" prop="customerNo" />-->
|
||||
<el-table-column label="班组编码" align="center" prop="classNo"/>
|
||||
<el-table-column label="供应商编码" align="center" prop="supplierNo"/>
|
||||
<el-table-column label="供应商" align="center" prop="supplierName"/>
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" />
|
||||
<el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
<el-table-column label="备用字段4" align="center" prop="spare4" />
|
||||
@@ -273,8 +294,8 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<el-table v-loading="detailLoading" :data="stockInDetailList">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<el-table v-loading="detailLoading" :data="stockInDetailList" @selection-change="handleDetailSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="子单ID" align="center" prop="stockinDetailId"/>
|
||||
<!-- <el-table-column label="主单GUID" align="center" prop="stockinGuid" />-->
|
||||
<el-table-column label="主单ID" align="center" prop="stockinId"/>
|
||||
@@ -358,12 +379,16 @@ export default {
|
||||
detailLoading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
detailIds: [],
|
||||
// 主表选中的数据
|
||||
stockInListSelected: [],
|
||||
stockInDetailListSelected: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
detailSingle: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
detailMultiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
@@ -385,7 +410,7 @@ export default {
|
||||
inType: null,
|
||||
createDate: null,
|
||||
createManId: null,
|
||||
status: null,
|
||||
status: '1',
|
||||
warehouseId: null,
|
||||
finishDate: null,
|
||||
erpBill: null,
|
||||
@@ -493,6 +518,12 @@ export default {
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleDetailSelectionChange(selection){
|
||||
this.detailIds = selection.map(item => item.stockinDetailId)
|
||||
this.stockInDetailListSelected = selection
|
||||
this.detailSingle = selection.length !== 1
|
||||
this.detailMultiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
@@ -565,7 +596,12 @@ export default {
|
||||
},
|
||||
/** 打印条码按钮操作 */
|
||||
handleBarcodePrinting(row){
|
||||
barcodePrinting(row.stockinGuid).then(response => {
|
||||
const stockInId = row.stockinDetailId ||this.detailIds;
|
||||
//console.log(stockInId)
|
||||
var data = {
|
||||
"stockinIdList": stockInId
|
||||
}
|
||||
barcodePrinting(data).then(response => {
|
||||
this.$modal.msgSuccess("打印成功")
|
||||
this.getList()
|
||||
})
|
||||
@@ -611,6 +647,7 @@ export default {
|
||||
getDetailList(stockinId) {
|
||||
this.detailLoading = true;
|
||||
this.queryDetailParams.stockinId = stockinId;
|
||||
this.queryDetailParams.status = this.queryParams.status;
|
||||
listStockInDetail(this.queryDetailParams).then(response => {
|
||||
this.stockInDetailList = response.rows;
|
||||
this.detailTotal = response.total;
|
||||
|
||||
Reference in New Issue
Block a user