库存配置,批次查看
This commit is contained in:
parent
a7f7503897
commit
1e7c41ee81
|
|
@ -106,6 +106,38 @@ export function getStockMaterialListApi(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 货品批次详情-入库批次列表
|
||||||
|
export function getMaterialInStockBatchApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims/into-inventory/warehouse/materials',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data,
|
||||||
|
params:{
|
||||||
|
pageNum:data.pageNum,
|
||||||
|
pageSize:data.pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 配置库存数量(最大最小)
|
||||||
|
export function editStockMaterialApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims/inventory/edit',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data,
|
||||||
|
params:{
|
||||||
|
pageNum:data.pageNum,
|
||||||
|
pageSize:data.pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -------------入库管理---------------
|
// -------------入库管理---------------
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,22 @@ export const constantRoutes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{//供应链-库存管理-入库新增详情
|
||||||
|
path: '/foodManage/stockManage',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
redirect: 'noredirect',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'batchStockDetail',
|
||||||
|
component: () => import('@/views/foodManage/stockManage/totalStock/batchStockDetail'),
|
||||||
|
name: 'BatchStockDetail',
|
||||||
|
meta: { title: '批次详情', icon: '' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{//供应链-库存管理-入库新增详情
|
{//供应链-库存管理-入库新增详情
|
||||||
path: '/foodManage/stockManage',
|
path: '/foodManage/stockManage',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
<el-form-item label="关键字" prop="searchValue">
|
|
||||||
<el-input v-model="queryParams.searchValue" placeholder="请输入领料单号,标题" maxlength="20" clearable style="width: 240px"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="领料日期">
|
<el-form-item label="领料日期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="dateRange"
|
||||||
|
|
@ -18,20 +15,24 @@
|
||||||
:picker-options="pickerOptions" >
|
:picker-options="pickerOptions" >
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="关键字" prop="searchValue">
|
||||||
|
<el-input v-model="queryParams.searchValue" placeholder="请输入领料单号,标题" maxlength="20" clearable style="width: 240px"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="提交状态" prop="commitStatus">
|
<el-form-item label="提交状态" prop="commitStatus">
|
||||||
<el-select v-model="queryParams.commitStatus" placeholder="请选择提交状态" style="width: 240px;">
|
<el-select v-model="queryParams.commitStatus" placeholder="请选择提交状态" style="width: 240px;">
|
||||||
<el-option label="待提交" :value="1"></el-option>
|
<el-option label="待提交" :value="1"></el-option>
|
||||||
<el-option label="已提交" :value="2"></el-option>
|
<el-option label="已提交" :value="2"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审批状态" prop="approveStatus">
|
<!-- <el-form-item label="审批状态" prop="approveStatus">
|
||||||
<el-select v-model="queryParams.approveStatus" placeholder="请选择审批状态" style="width: 240px;">
|
<el-select v-model="queryParams.approveStatus" placeholder="请选择审批状态" style="width: 240px;">
|
||||||
<el-option label="待审批" :value="1"></el-option>
|
<el-option label="待审批" :value="1"></el-option>
|
||||||
<el-option label="审批中" :value="2"></el-option>
|
<el-option label="审批中" :value="2"></el-option>
|
||||||
<el-option label="审批同意" :value="3"></el-option>
|
<el-option label="审批同意" :value="3"></el-option>
|
||||||
<el-option label="审批拒绝" :value="4"></el-option>
|
<el-option label="审批拒绝" :value="4"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
|
<br>
|
||||||
<el-form-item label="所属区域" prop="areaId">
|
<el-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="queryParams.areaId"
|
<el-cascader v-model="queryParams.areaId"
|
||||||
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||||
|
|
@ -142,7 +143,7 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete" v-if="scope.row.commitStatus==1"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
<el-form-item label="关键字" prop="searchValue">
|
|
||||||
<el-input v-model="queryParams.searchValue" placeholder="请输入退货单编号" maxlength="20" clearable style="width: 240px"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="退货日期">
|
<el-form-item label="退货日期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="dateRange"
|
||||||
|
|
@ -18,6 +15,10 @@
|
||||||
:picker-options="pickerOptions" >
|
:picker-options="pickerOptions" >
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="关键字" prop="searchValue">
|
||||||
|
<el-input v-model="queryParams.searchValue" placeholder="请输入退货单编号" maxlength="20" clearable style="width: 240px"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="送货供应商" prop="supplierId">
|
<el-form-item label="送货供应商" prop="supplierId">
|
||||||
<el-select v-model="queryParams.supplierId" placeholder="请选择供应商" style="width: 240px;">
|
<el-select v-model="queryParams.supplierId" placeholder="请选择供应商" style="width: 240px;">
|
||||||
<el-option v-for="item in supplierOptions"
|
<el-option v-for="item in supplierOptions"
|
||||||
|
|
@ -119,7 +120,7 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete" v-if="scope.row.commitStatus==1"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,297 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
|
<el-form-item label="入库时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRange"
|
||||||
|
type="datetimerange"
|
||||||
|
align="right"
|
||||||
|
unlink-panels
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
format="yyyy-MM-dd HH:mm:ss" style="width: 400px"
|
||||||
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
|
:picker-options="pickerOptions" >
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="入库单号" prop="intoCode">
|
||||||
|
<el-input v-model="queryParams.intoCode" placeholder="请输入入库单号" maxlength="20" clearable style="width: 240px"/>
|
||||||
|
</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"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="tableListData" height="800">
|
||||||
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="货品编码" align="center" prop="materialCode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="入库单号" align="center" prop="intoCode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="入库数量" align="center" prop="totalNum" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="入库时间" align="center" prop="intoDate" :show-overflow-tooltip="true" width="150"/>
|
||||||
|
<el-table-column label="保质期" align="center" prop="expireTime" :show-overflow-tooltip="true" width="150"/>
|
||||||
|
<el-table-column label="总价(元)" align="center" prop="totalAmount" :show-overflow-tooltip="true" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (scope.row.totalAmount/100).toFixed(2) }}</span>
|
||||||
|
</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>
|
||||||
|
<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 { getMaterialInStockBatchApi } from "@/api/foodManage/stockManage";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "BatchStockDetail",
|
||||||
|
dicts: [],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
loadingBtn: false,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
//表格数据
|
||||||
|
tableListData: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
pageJson:{},
|
||||||
|
treeAreaOptions:[],//区域树
|
||||||
|
wareHouseOptions:[],//仓库下拉选
|
||||||
|
dateRange:this.defaultDateRange(),
|
||||||
|
pickerOptions: {
|
||||||
|
shortcuts: [{
|
||||||
|
text: '最近一周',
|
||||||
|
onClick(picker) {
|
||||||
|
const start = new Date();
|
||||||
|
const end = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
text: '最近一个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const start = new Date();
|
||||||
|
const end = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
text: '最近三个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const start = new Date();
|
||||||
|
const end = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
// canteenName: [
|
||||||
|
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||||
|
// ],
|
||||||
|
// dictType: [
|
||||||
|
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||||
|
// ]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if(this.$route.query.pageJson){
|
||||||
|
this.pageJson = JSON.parse(this.$route.query.pageJson)
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.dateRange = this.defaultDateRange()
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 查询列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
let param = {
|
||||||
|
"pageNum": this.queryParams.pageNum,
|
||||||
|
"pageSize": this.queryParams.pageSize,
|
||||||
|
"intoCode": this.queryParams.intoCode,
|
||||||
|
"warehouseId": this.pageJson.warehouseId,
|
||||||
|
"materialId": this.pageJson.materialId
|
||||||
|
}
|
||||||
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
|
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
||||||
|
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
||||||
|
}else{
|
||||||
|
param.startDateTime=undefined;
|
||||||
|
param.endDateTime=undefined;
|
||||||
|
}
|
||||||
|
getMaterialInStockBatchApi(param).then(response => {
|
||||||
|
this.tableListData = response.rows;
|
||||||
|
this.total = Number(response.total);
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.$router.push({ path: "/foodManage/stockManage/warehouseInEdit" });
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleView(row) {
|
||||||
|
this.$router.push({ path: "/foodManage/stockManage/warehouseInDetail",query: {pageJson:JSON.stringify(row)} });
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.$router.push({ path: "/foodManage/stockManage/warehouseInEdit",query: {pageJson:JSON.stringify(row)} });
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.dictId != undefined) {
|
||||||
|
// updateType(this.form).then(response => {
|
||||||
|
// this.$modal.msgSuccess("修改成功");
|
||||||
|
// this.open = false;
|
||||||
|
// this.getList();
|
||||||
|
// });
|
||||||
|
} else {
|
||||||
|
// addType(this.form).then(response => {
|
||||||
|
// this.$modal.msgSuccess("新增成功");
|
||||||
|
// this.open = false;
|
||||||
|
// this.getList();
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
// this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
|
// return delWarehouseInApi({intoIds:[row.intoId]});
|
||||||
|
// }).then(() => {
|
||||||
|
// this.getList();
|
||||||
|
// this.$modal.msgSuccess("删除成功");
|
||||||
|
// }).catch(() => {});
|
||||||
|
},
|
||||||
|
// 提交按钮
|
||||||
|
confirmSubmit(row){
|
||||||
|
// let param = Object.assign({},row);
|
||||||
|
// this.loadingBtn=true
|
||||||
|
// param.status=2
|
||||||
|
// editPurchaseOrderApi(param).then((response) => {
|
||||||
|
// this.$modal.msgSuccess("提交成功");
|
||||||
|
// this.getList()
|
||||||
|
// this.loadingBtn=false
|
||||||
|
// }).catch(() => {
|
||||||
|
// this.loadingBtn=false
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
defaultDateRange() {
|
||||||
|
const end = new Date(new Date().toLocaleDateString());
|
||||||
|
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
|
||||||
|
const start = new Date((new Date().toLocaleDateString()));
|
||||||
|
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
|
||||||
|
this.start = parseInt(start.getTime() / 1000)
|
||||||
|
this.end = parseInt(end.getTime() / 1000)
|
||||||
|
return [start, end]
|
||||||
|
},
|
||||||
|
//日期
|
||||||
|
formatDate(date) {
|
||||||
|
// 格式化为 YYYY-MM-DD
|
||||||
|
date = new Date(date)
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
||||||
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
},
|
||||||
|
//日期时间
|
||||||
|
formatDateTime(date) {
|
||||||
|
// 格式化为 YYYY-MM-DD
|
||||||
|
date = new Date(date)
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
||||||
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
|
const hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
||||||
|
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||||
|
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||||
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -69,23 +69,39 @@
|
||||||
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
|
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="条码" align="center" prop="barCode" :show-overflow-tooltip="true" width="120"/>
|
|
||||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="库存数量" align="center" prop="materialNum" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="当前库存数" align="center" prop="materialNum" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="库存金额" align="center" prop="totalPrice" :show-overflow-tooltip="true" width="120">
|
<!-- <el-table-column label="库存金额" align="center" prop="totalPrice" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.totalPrice/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.totalPrice/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
|
<el-table-column label="最小库存" align="center" prop="minNum" :show-overflow-tooltip="true" width="120"/>
|
||||||
|
<el-table-column label="最大库存" align="center" prop="maxNum" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="库存状态" align="center" prop="inventoryStatus" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="库存状态" align="center" prop="inventoryStatus" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.inventoryStatus==1">正常</span>
|
<span v-if="scope.row.inventoryStatus==1">正常</span>
|
||||||
<span v-if="scope.row.inventoryStatus==2">不足</span>
|
<span v-if="scope.row.inventoryStatus==2">即将缺货</span>
|
||||||
<span v-if="scope.row.inventoryStatus==3">超额</span>
|
<span v-if="scope.row.inventoryStatus==3">超额</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总库存数" align="center" prop="totalNum" :show-overflow-tooltip="true" width="120"/>
|
<!-- <el-table-column label="总库存数" align="center" prop="totalNum" :show-overflow-tooltip="true" width="120"/> -->
|
||||||
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>配置库存</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
>批次详情</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|
@ -97,26 +113,36 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="最小库存:" prop="minNum">
|
||||||
|
<el-input
|
||||||
|
v-model="form.minNum"
|
||||||
|
type="text" clearable
|
||||||
|
placeholder="请输入最小库存"
|
||||||
|
maxlength="7" @input="(v)=>(form.minNum=v.replace(/[^\d]/g,''))"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最大库存:" prop="maxNum">
|
||||||
|
<el-input v-model="form.maxNum"
|
||||||
|
type="text" clearable
|
||||||
|
placeholder="请输入最大库存"
|
||||||
|
maxlength="7" @input="(v)=>(form.maxNum=v.replace(/[^\d]/g,''))"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog> -->
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||||
// import { supplierQualificationWarningPageApi } from "@/api/foodManage/supplierManage";
|
// import { supplierQualificationWarningPageApi } from "@/api/foodManage/supplierManage";
|
||||||
import { drpWareHousePageApi,systemMaterialTreeApi,getStockMaterialListApi } from "@/api/foodManage/stockManage";
|
import { drpWareHousePageApi,systemMaterialTreeApi,getStockMaterialListApi,editStockMaterialApi } from "@/api/foodManage/stockManage";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -157,13 +183,13 @@ export default {
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: { //最小库存 minNum 最大库存 maxNum
|
||||||
// canteenName: [
|
minNum: [
|
||||||
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
{ required: true, message: "最小库存不能为空", trigger: "blur" }
|
||||||
// ],
|
],
|
||||||
// dictType: [
|
maxNum: [
|
||||||
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
{ required: true, message: "最大库存不能为空", trigger: "blur" }
|
||||||
// ]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -235,7 +261,17 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 配置库存按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
this.form = Object.assign({}, row)
|
||||||
|
this.open = true;
|
||||||
|
this.title = "配置库存";
|
||||||
|
},
|
||||||
|
/**批次详情按钮操作 */
|
||||||
|
handleView(row){
|
||||||
|
this.$router.push({ path: "/foodManage/stockManage/batchStockDetail",query: {pageJson:JSON.stringify(row)} });
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
|
@ -250,19 +286,11 @@ export default {
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.dictId != undefined) {
|
editStockMaterialApi(this.form).then(response => {
|
||||||
// updateType(this.form).then(response => {
|
this.$modal.msgSuccess("修改成功");
|
||||||
// this.$modal.msgSuccess("修改成功");
|
this.open = false;
|
||||||
// this.open = false;
|
this.getList();
|
||||||
// this.getList();
|
});
|
||||||
// });
|
|
||||||
} else {
|
|
||||||
// addType(this.form).then(response => {
|
|
||||||
// this.$modal.msgSuccess("新增成功");
|
|
||||||
// this.open = false;
|
|
||||||
// this.getList();
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete" v-if="scope.row.status==1"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -247,6 +247,7 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getAreaTreeData();
|
this.getAreaTreeData();
|
||||||
|
this.getWareHouseData()
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete" v-if="scope.row.status==1"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue