库存盘点
This commit is contained in:
parent
574236d09f
commit
7aac6332c3
|
|
@ -1,5 +1,5 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
//----------仓库管理---------
|
||||||
// 分页查询 仓库-列表
|
// 分页查询 仓库-列表
|
||||||
export function getWareHousePageApi(data) {
|
export function getWareHousePageApi(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
@ -11,8 +11,7 @@ export function getWareHousePageApi(data) {
|
||||||
params:data
|
params:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 仓库-下拉数据
|
||||||
// 仓库
|
|
||||||
export function drpWareHousePageApi(data) {
|
export function drpWareHousePageApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/ims_warehouse_info/listAll',
|
url: '/smart-canteen/ims_warehouse_info/listAll',
|
||||||
|
|
@ -23,7 +22,6 @@ export function drpWareHousePageApi(data) {
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 仓库新增
|
// 仓库新增
|
||||||
export function addWareHouseApi(data) {
|
export function addWareHouseApi(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
@ -35,8 +33,7 @@ export function addWareHouseApi(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 仓库修改
|
||||||
// 仓库新增
|
|
||||||
export function editWareHouseApi(data) {
|
export function editWareHouseApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/ims_warehouse_info/edit',
|
url: '/smart-canteen/ims_warehouse_info/edit',
|
||||||
|
|
@ -47,7 +44,6 @@ export function editWareHouseApi(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 仓库删除
|
// 仓库删除
|
||||||
export function delWareHouseApi(data) {
|
export function delWareHouseApi(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
@ -56,7 +52,6 @@ export function delWareHouseApi(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 原料类别树
|
// 原料类别树
|
||||||
export function systemMaterialTreeApi(data) {
|
export function systemMaterialTreeApi(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
@ -261,7 +256,94 @@ export function delWarehouseOutApi(data) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// -------------库存盘点---------------
|
||||||
|
//查询库存盘点列表
|
||||||
|
export function checkInventoryPageApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_check_inventory/list',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取盘点库存原料
|
||||||
|
export function getCheckInventoryMaterialPageApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_check_inventory/list/check/inventory/material',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取库存盘点详细信息
|
||||||
|
export function getCheckInventoryInfoApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_check_inventory/detail',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增库存盘点-保存
|
||||||
|
export function addCheckInventorySaveApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_check_inventory/add/save',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增库存盘点-提交
|
||||||
|
export function addCheckInventoryCommitApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_check_inventory/add/commit',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//修改库存盘点-保存
|
||||||
|
export function editCheckInventorySaveApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_check_inventory/edit/save',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改库存盘点-提交
|
||||||
|
export function editCheckInventoryCommitApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_check_inventory/edit/commit',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除库存盘点
|
||||||
|
export function delCheckInventoryApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_check_inventory/remove',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
<div style="padding: 10px;background: #E5EBF6;min-height: 830px;">
|
<div style="padding: 10px;background: #E5EBF6;min-height: 830px;">
|
||||||
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
|
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
|
||||||
<el-form :model="baseInfo" ref="baseInfo" :rules="baseRules" size="medium" :inline="true" label-width="110px">
|
<el-form :model="baseInfo" ref="baseInfo" :rules="baseRules" size="medium" :inline="true" label-width="110px">
|
||||||
<el-form-item label="盘点单号" prop="countCode">
|
<el-form-item label="盘点单号" prop="checkCode">
|
||||||
<el-input v-model="baseInfo.countCode" placeholder="盘点单号自动生成" disabled maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="baseInfo.checkCode" placeholder="盘点单号自动生成" disabled maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属区域" prop="areaId">
|
<el-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="baseInfo.areaId"
|
<el-cascader v-model="baseInfo.areaId"
|
||||||
|
|
@ -24,23 +24,23 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="盘点员" prop="">
|
<el-form-item label="盘点员" prop="firstCheckUser">
|
||||||
<el-input v-model="baseInfo.countCode" placeholder="盘点员" maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="baseInfo.firstCheckUser" placeholder="盘点员" maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="盘点开始时间" prop="countStartDate">
|
<el-form-item label="盘点开始时间" prop="firstCheckDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="baseInfo.countStartDate"
|
v-model="baseInfo.firstCheckDate"
|
||||||
type="datetime" align="right"
|
type="datetime" align="right"
|
||||||
format="yyyy-MM-dd HH:mm:ss" style="width: 240px;"
|
format="yyyy-MM-dd HH:mm:ss" style="width: 240px;"
|
||||||
:picker-options="pickerOptions" @change="baseInfo.countStartDate=formatDateTime(baseInfo.countStartDate)">
|
:picker-options="pickerOptions" @change="baseInfo.firstCheckDate=formatDateTime(baseInfo.firstCheckDate)">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="盘点结束时间" prop="countEndDate">
|
<el-form-item label="盘点结束时间" prop="secondCheckDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="baseInfo.countEndDate"
|
v-model="baseInfo.secondCheckDate"
|
||||||
type="datetime" align="right"
|
type="datetime" align="right"
|
||||||
format="yyyy-MM-dd HH:mm:ss" style="width: 240px;"
|
format="yyyy-MM-dd HH:mm:ss" style="width: 240px;"
|
||||||
:picker-options="pickerOptions" @change="baseInfo.countEndDate=formatDateTime(baseInfo.countEndDate)">
|
:picker-options="pickerOptions" @change="baseInfo.secondCheckDate=formatDateTime(baseInfo.secondCheckDate)">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="备注" prop="remark">
|
<!-- <el-form-item label="备注" prop="remark">
|
||||||
|
|
@ -71,40 +71,40 @@
|
||||||
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true">
|
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批次号" align="center" prop="intoCode" :show-overflow-tooltip="true" width="200"/>
|
<el-table-column label="批次号" align="center" prop="intoCode" :show-overflow-tooltip="true" width="200"/>
|
||||||
<el-table-column label="账面数" align="center" prop="inventoryNum" :show-overflow-tooltip="true" />
|
<el-table-column label="账面数" align="center" prop="bookNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
<el-table-column label="单价(元)" align="center" prop="price" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.unitPrice/100).toFixed(2)||"" }}</span>
|
<span>{{ (scope.row.price/100).toFixed(2)||"" }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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.inventoryNum*(scope.row.unitPrice/100) }}</span>
|
<span>{{ scope.row.bookNum*(scope.row.price/100) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="实盘总额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="实盘总额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.countNum*(scope.row.unitPrice/100) }}</span>
|
<span>{{ scope.row.actualNum*(scope.row.price/100) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="差异数" align="center" prop="" :show-overflow-tooltip="true">
|
<el-table-column label="差异数" align="center" prop="" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.inventoryNum-scope.row.countNum }}</span>
|
<span>{{ scope.row.actualNum-scope.row.bookNum }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="差异总额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="差异总额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (Number(scope.row.countNum)-Number(scope.row.inventoryNum))*scope.row.unitPrice/100 }}</span>
|
<span>{{ (Number(scope.row.actualNum)-Number(scope.row.bookNum))*scope.row.price/100 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="实盘数量" align="center" prop="countNum" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="实盘数量" align="center" prop="actualNum" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model.number="scope.row.countNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.countNum=v.replace(/[^\d]/g,''))"/>
|
<el-input v-model.number="scope.row.actualNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.actualNum=v.replace(/[^\d]/g,''))"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="差异原因" align="center" prop="refundReason" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="差异原因" align="center" prop="differReason" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.refundReason" placeholder="请输入" maxlength="20" clearable/>
|
<el-input v-model="scope.row.differReason" placeholder="请输入" maxlength="20" clearable/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -142,7 +142,7 @@
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-loading="loading" :data="tableListData" ref="multipleTable1" height="520" :row-key="(row)=>{return row.intoDetailId}" @selection-change="handleSelectionChange2">
|
<el-table v-loading="loading" :data="tableListData" ref="multipleTable1" height="520" :row-key="(row)=>{return row.inventoryId}" @selection-change="handleSelectionChange2">
|
||||||
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" />
|
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" />
|
||||||
<el-table-column label="序号" align="center" width="80" type="index">
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -154,15 +154,15 @@
|
||||||
<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="materialTypeName" :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="unitName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="批次号" align="center" prop="intoCode" :show-overflow-tooltip="true" width="200"/>
|
<!-- <el-table-column label="批次号" align="center" prop="intoCode" :show-overflow-tooltip="true" width="200"/> -->
|
||||||
<el-table-column label="入库时间" align="center" prop="intoDate" :show-overflow-tooltip="true" />
|
<!-- <el-table-column label="入库时间" align="center" prop="intoDate" :show-overflow-tooltip="true" /> -->
|
||||||
<el-table-column label="入库数量" align="center" prop="purNum" :show-overflow-tooltip="true" />
|
<el-table-column label="入库数量" align="center" prop="purNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="单价" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
<el-table-column label="单价" align="center" prop="price" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.price/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="货品库存" align="center" prop="inventoryNum" :show-overflow-tooltip="true" />
|
<el-table-column label="货品库存" align="center" prop="bookNum" :show-overflow-tooltip="true" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
|
|
@ -184,7 +184,7 @@
|
||||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||||
import { systemMaterialTreeApi,getMaterialInStockBatchApi,drpWareHousePageApi,supplierPageApi } from "@/api/foodManage/stockManage";
|
import { systemMaterialTreeApi,getMaterialInStockBatchApi,drpWareHousePageApi,supplierPageApi } from "@/api/foodManage/stockManage";
|
||||||
import { getWarehouseInInfoApi,addWarehouseInApi,editWarehouseInApi } from "@/api/foodManage/stockManage";
|
import { getCheckInventoryInfoApi,addCheckInventorySaveApi,addCheckInventoryCommitApi,getCheckInventoryMaterialPageApi,editCheckInventorySaveApi,editCheckInventoryCommitApi } from "@/api/foodManage/stockManage";
|
||||||
export default {
|
export default {
|
||||||
name: "InventoryCountEdit",
|
name: "InventoryCountEdit",
|
||||||
dicts: [],
|
dicts: [],
|
||||||
|
|
@ -212,10 +212,10 @@ export default {
|
||||||
supplierId: [
|
supplierId: [
|
||||||
{ required: true, message: "供应商不能为空", trigger: "change" }
|
{ required: true, message: "供应商不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
countStartDate: [
|
firstCheckDate: [
|
||||||
{ required: true, message: "盘点开始时间不能为空", trigger: "change" }
|
{ required: true, message: "盘点开始时间不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
countEndDate: [
|
secondCheckDate: [
|
||||||
{ required: true, message: "盘点结束时间不能为空", trigger: "change" }
|
{ required: true, message: "盘点结束时间不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
warehouseId: [
|
warehouseId: [
|
||||||
|
|
@ -290,15 +290,16 @@ export default {
|
||||||
getContractInfo(){
|
getContractInfo(){
|
||||||
console.log(this.countRowData)
|
console.log(this.countRowData)
|
||||||
let param = {
|
let param = {
|
||||||
intoId:this.countRowData.intoId
|
checkId:this.countRowData.checkId
|
||||||
}
|
}
|
||||||
//查询查询食堂下拉结构
|
//查询查询食堂下拉结构
|
||||||
getWarehouseInInfoApi(param).then((response) => {
|
getCheckInventoryInfoApi(param).then((response) => {
|
||||||
this.baseInfo = response.data;
|
this.baseInfo = response.data;
|
||||||
this.materialList = this.baseInfo.imsIntoInventoryDetailVOList;
|
this.$set(this.baseInfo,"firstCheckUser",this.baseInfo.firstCheckUserName)
|
||||||
|
this.materialList = this.baseInfo.detailList;
|
||||||
// this.$set(this.baseInfo,'areaId',Number(response.data.areaId))
|
// this.$set(this.baseInfo,'areaId',Number(response.data.areaId))
|
||||||
// this.materialList.forEach(item=>{
|
// this.materialList.forEach(item=>{
|
||||||
// this.$set(item,"unitPrice",Number(item.unitPrice)/100)
|
// this.$set(item,"price",Number(item.price)/100)
|
||||||
// })
|
// })
|
||||||
drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => {
|
drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => {
|
||||||
this.wareHouseOptions = response.rows||[];
|
this.wareHouseOptions = response.rows||[];
|
||||||
|
|
@ -395,21 +396,22 @@ export default {
|
||||||
let param = {
|
let param = {
|
||||||
"pageSize": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"pageNum": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
|
"checkWay": 1,
|
||||||
"warehouseId": this.baseInfo.warehouseId,
|
"warehouseId": this.baseInfo.warehouseId,
|
||||||
"materialName": this.queryParams.materialName,
|
// "materialName": this.queryParams.materialName,
|
||||||
"materialCode": this.queryParams.materialCode,
|
// "materialCode": this.queryParams.materialCode,
|
||||||
"materialTypeIds": this.queryParams.materialTypeIds,
|
"categoryIds": this.queryParams.materialTypeIds,
|
||||||
}
|
}
|
||||||
getMaterialInStockBatchApi(param).then(response => {
|
getCheckInventoryMaterialPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.data;
|
||||||
this.total = Number(response.total);
|
// this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSelectionChange2(selection) {
|
handleSelectionChange2(selection) {
|
||||||
this.batchChosenMaterial = selection;
|
this.batchChosenMaterial = selection;
|
||||||
this.batchChosenMaterial.forEach(item=>{
|
this.batchChosenMaterial.forEach(item=>{
|
||||||
this.$set(item,"countNum",item.inventoryNum)
|
this.$set(item,"actualNum",item.bookNum)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
confirmChosen(){
|
confirmChosen(){
|
||||||
|
|
@ -438,24 +440,22 @@ export default {
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.countStartDate = this.formatDateTime(this.baseInfo.countStartDate)
|
param.firstCheckDate = this.formatDateTime(this.baseInfo.firstCheckDate)
|
||||||
param.countEndDate = this.formatDateTime(this.baseInfo.countEndDate)
|
param.secondCheckDate = this.formatDateTime(this.baseInfo.secondCheckDate)
|
||||||
param.totalAmount=0
|
param.checkWay = 1
|
||||||
param.totalNum=0
|
param.inspectUser = "1"
|
||||||
param.status=1
|
param.detailList = [];
|
||||||
param.imsIntoInventoryDetailAddList = []
|
|
||||||
this.noMaterial = false;
|
this.noMaterial = false;
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
this.materialList.forEach(item=>{
|
this.materialList.forEach(item=>{
|
||||||
if(item.countNum==0){
|
if(item.actualNum==0){
|
||||||
this.noMaterial = true
|
this.noMaterial = true
|
||||||
}else{
|
}else{
|
||||||
let obj = Object.assign({}, item)
|
let obj = Object.assign({}, item)
|
||||||
// obj.unitPrice = Number(obj.unitPrice)*100
|
obj.differNum = Number(obj.actualNum)-Number(obj.bookNum)
|
||||||
obj.totalPrice = (Number(obj.unitPrice)*Number(obj.countNum))
|
obj.differAmount = (Number(obj.actualNum)-Number(obj.bookNum))*obj.price;
|
||||||
param.totalAmount = param.totalAmount+obj.totalPrice;
|
obj.actualAmount = Number(obj.actualNum)*(obj.price)
|
||||||
param.totalNum = param.totalNum+Number(obj.countNum)
|
param.detailList.push(obj)
|
||||||
param.imsIntoInventoryDetailAddList.push(obj)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -471,8 +471,8 @@ export default {
|
||||||
this.$modal.msgError("请添加货品!");
|
this.$modal.msgError("请添加货品!");
|
||||||
}else{
|
}else{
|
||||||
this.loadingBtn=true;
|
this.loadingBtn=true;
|
||||||
if (this.baseInfo.intoId != undefined) {
|
if (this.baseInfo.checkId != undefined) {
|
||||||
editWarehouseInApi(param).then((response) => {
|
editCheckInventorySaveApi(param).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
this.jumpList()
|
this.jumpList()
|
||||||
|
|
@ -480,7 +480,7 @@ export default {
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addWarehouseInApi(param).then((response) => {
|
addCheckInventorySaveApi(param).then((response) => {
|
||||||
this.$modal.msgSuccess("保存成功");
|
this.$modal.msgSuccess("保存成功");
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
this.jumpList()
|
this.jumpList()
|
||||||
|
|
@ -499,24 +499,22 @@ export default {
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.countStartDate = this.formatDateTime(this.baseInfo.countStartDate)
|
param.firstCheckDate = this.formatDateTime(this.baseInfo.firstCheckDate)
|
||||||
param.countEndDate = this.formatDateTime(this.baseInfo.countEndDate)
|
param.secondCheckDate = this.formatDateTime(this.baseInfo.secondCheckDate)
|
||||||
param.totalAmount=0
|
param.checkWay = 1
|
||||||
param.totalNum=0
|
param.inspectUser = "1"
|
||||||
param.status=2
|
param.detailList = [];
|
||||||
param.imsIntoInventoryDetailAddList = []
|
|
||||||
this.noMaterial = false;
|
this.noMaterial = false;
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
this.materialList.forEach(item=>{
|
this.materialList.forEach(item=>{
|
||||||
if(item.countNum==0){
|
if(item.actualNum==0){
|
||||||
this.noMaterial = true
|
this.noMaterial = true
|
||||||
}else{
|
}else{
|
||||||
let obj = Object.assign({}, item)
|
let obj = Object.assign({}, item)
|
||||||
// obj.unitPrice = Number(obj.unitPrice)*100
|
obj.differNum = Number(obj.actualNum)-Number(obj.bookNum)
|
||||||
obj.totalPrice = (Number(obj.unitPrice)*Number(obj.countNum))
|
obj.differAmount = (Number(obj.actualNum)-Number(obj.bookNum))*obj.price;
|
||||||
param.totalAmount = param.totalAmount+obj.totalPrice;
|
obj.actualAmount = Number(obj.actualNum)*(obj.price)
|
||||||
param.totalNum = param.totalNum+Number(obj.countNum)
|
param.detailList.push(obj)
|
||||||
param.imsIntoInventoryDetailAddList.push(obj)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -532,8 +530,8 @@ export default {
|
||||||
this.$modal.msgError("请添加货品!");
|
this.$modal.msgError("请添加货品!");
|
||||||
}else{
|
}else{
|
||||||
this.loadingBtn=true;
|
this.loadingBtn=true;
|
||||||
if (this.baseInfo.intoId != undefined) {
|
if (this.baseInfo.checkId != undefined) {
|
||||||
editWarehouseInApi(param).then((response) => {
|
editCheckInventoryCommitApi(param).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
this.jumpList()
|
this.jumpList()
|
||||||
|
|
@ -541,7 +539,7 @@ export default {
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addWarehouseInApi(param).then((response) => {
|
addCheckInventoryCommitApi(param).then((response) => {
|
||||||
this.$modal.msgSuccess("保存成功");
|
this.$modal.msgSuccess("保存成功");
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
this.jumpList()
|
this.jumpList()
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
:picker-options="pickerOptions" >
|
:picker-options="pickerOptions" >
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="盘点单号" prop="countCode">
|
<el-form-item label="盘点单号" prop="checkCode">
|
||||||
<el-input v-model="queryParams.countCode" placeholder="请输入盘点单号" maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="queryParams.checkCode" placeholder="请输入盘点单号" maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属区域" prop="areaId">
|
<el-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="queryParams.areaId"
|
<el-cascader v-model="queryParams.areaId"
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
}" clearable @change="handleAreaChange">
|
}" clearable @change="handleAreaChange">
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="货品仓库" prop="warehouseId">
|
<!-- <el-form-item label="货品仓库" prop="warehouseId">
|
||||||
<el-select v-model="queryParams.warehouseId" clearable placeholder="请选择货品仓库" style="width: 100%;">
|
<el-select v-model="queryParams.warehouseId" clearable placeholder="请选择货品仓库" style="width: 100%;">
|
||||||
<el-option v-for="item in wareHouseOptions"
|
<el-option v-for="item in wareHouseOptions"
|
||||||
:key="item.warehouseId"
|
:key="item.warehouseId"
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
:value="item.warehouseId"
|
:value="item.warehouseId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
|
@ -62,17 +62,17 @@
|
||||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="盘点单号" align="center" prop="" :show-overflow-tooltip="true" />
|
<el-table-column label="盘点单号" align="center" prop="checkCode" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
|
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
|
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="盘点员" align="center" prop="createBy" :show-overflow-tooltip="true" />
|
<el-table-column label="盘点员" align="center" prop="firstCheckUser" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="盘点开始时间" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
<el-table-column label="盘点开始时间" align="center" prop="firstCheckDate" :show-overflow-tooltip="true" width="150"/>
|
||||||
<el-table-column label="盘点结束时间" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
<el-table-column label="盘点结束时间" align="center" prop="secondCheckDate" :show-overflow-tooltip="true" width="150"/>
|
||||||
<el-table-column label="差异总数" align="center" prop="totalNum" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="差异总数" align="center" prop="" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="差异总额(元)" align="center" prop="totalAmount" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="差异总额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
<span>{{ (scope.row.totalAmount/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.totalAmount/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="操作人" align="center" prop="createBy" :show-overflow-tooltip="true" width="120"/>
|
<!-- <el-table-column label="操作人" align="center" prop="createBy" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="操作时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="150"/> -->
|
<el-table-column label="操作时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="150"/> -->
|
||||||
|
|
@ -128,7 +128,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||||
import { drpWareHousePageApi } from "@/api/foodManage/stockManage";
|
import { drpWareHousePageApi } from "@/api/foodManage/stockManage";
|
||||||
import { warehouseInPageApi,delWarehouseInApi } from "@/api/foodManage/stockManage";
|
import { checkInventoryPageApi,delCheckInventoryApi } from "@/api/foodManage/stockManage";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -241,7 +241,7 @@ export default {
|
||||||
let param = {
|
let param = {
|
||||||
"pageNum": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"pageSize": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"countCode": this.queryParams.countCode,
|
"checkCode": this.queryParams.checkCode,
|
||||||
"areaId": this.queryParams.areaId,
|
"areaId": this.queryParams.areaId,
|
||||||
"warehouseId": this.queryParams.warehouseId,
|
"warehouseId": this.queryParams.warehouseId,
|
||||||
"status": this.queryParams.status,
|
"status": this.queryParams.status,
|
||||||
|
|
@ -254,7 +254,7 @@ export default {
|
||||||
param.startDateTime=undefined;
|
param.startDateTime=undefined;
|
||||||
param.endDateTime=undefined;
|
param.endDateTime=undefined;
|
||||||
}
|
}
|
||||||
warehouseInPageApi(param).then(response => {
|
checkInventoryPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
this.total = Number(response.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
@ -305,7 +305,7 @@ export default {
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
return delWarehouseInApi({intoIds:[row.intoId]});
|
return delCheckInventoryApi({checkIds:[row.checkId]});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue