货品调拨接口对接

This commit is contained in:
zzyuan 2025-07-17 13:51:37 +08:00
parent 413985bb58
commit 3e2942ece5
5 changed files with 152 additions and 113 deletions

View File

@ -260,7 +260,7 @@ export function delWarehouseOutApi(data) {
//查询库存盘点列表 //查询库存盘点列表
export function checkInventoryPageApi(data) { export function checkInventoryPageApi(data) {
return request({ return request({
url: '/smart-canteen/ims_check_inventory/list', url: '/smart-canteen/ims_check_inventory/page',
method: 'get', method: 'get',
headers: { headers: {
//"merchant-id":"378915229716713472", //"merchant-id":"378915229716713472",
@ -347,6 +347,62 @@ export function delCheckInventoryApi(data) {
// -------------货品调拨---------------
//查询货品调拨列表
export function goodsTransferPageApi(data) {
return request({
url: '/smart-canteen/ims_goods_transfer/page',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params:data
})
}
//获取货品调拨详细信息
export function getGoodsTransferInfoApi(data) {
return request({
url: '/smart-canteen/ims_goods_transfer/info',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params:data
})
}
// 新增货品调拨-保存
export function addGoodsTransferSaveApi(data) {
return request({
url: '/smart-canteen/ims_goods_transfer/add/save',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 新增货品调拨-提交
export function addGoodsTransferCommitApi(data) {
return request({
url: '/smart-canteen/ims_goods_transfer/add/commit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 删除货品调拨
export function delGoodsTransferApi(data) {
return request({
url: '/smart-canteen/ims_goods_transfer/delete',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
}
})
}

View File

@ -4,16 +4,18 @@
<el-descriptions style="margin-bottom: 20px;" title="基本信息" :column="4" size="medium" border> <el-descriptions style="margin-bottom: 20px;" title="基本信息" :column="4" size="medium" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">调拨单号</template> <template slot="label">调拨单号</template>
{{baseInfo.transferCode}} {{baseInfo.goodsTransferCode}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">调拨时间</template> <template slot="label">调拨时间</template>
{{ baseInfo.outDate }} {{ }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">调拨状态</template> <template slot="label">调拨状态</template>
<span v-if="baseInfo.status==1">待调拨</span> <span v-if="baseInfo.transferStatus==0">草稿</span>
<span v-if="baseInfo.status==2">已调拨</span> <span v-if="baseInfo.transferStatus==2">待调拨</span>
<span v-if="baseInfo.transferStatus==4">已调拨</span>
<span v-if="baseInfo.transferStatus==5">调拨失败</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">所属区域</template> <template slot="label">所属区域</template>
@ -21,11 +23,11 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">调出仓库</template> <template slot="label">调出仓库</template>
{{ baseInfo.warehouseName }} {{ baseInfo.outWarehouseName }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">调入仓库</template> <template slot="label">调入仓库</template>
{{ baseInfo.warehouseName }} {{ baseInfo.intoWarehouseName }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label">备注</template> <template slot="label">备注</template>
@ -55,8 +57,8 @@
<span v-if="scope.row.salesMode==2">称重</span> <span v-if="scope.row.salesMode==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> <el-table-column label="当前可调库存" align="center" prop="fetchNum" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="调货数量" align="center" prop="fetchNum" :show-overflow-tooltip="true"></el-table-column> <el-table-column label="调货数量" align="center" prop="orderNum" :show-overflow-tooltip="true"></el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
@ -68,7 +70,7 @@
</template> </template>
<script> <script>
import { getWarehouseOutInfoApi } from "@/api/foodManage/stockManage"; import { getGoodsTransferInfoApi } from "@/api/foodManage/stockManage";
export default { export default {
name: "warehouseOutDetail", name: "warehouseOutDetail",
dicts: [], dicts: [],
@ -156,14 +158,13 @@ export default {
this.$router.replace({ path: "/foodManage/stockManage/goodsTransfer" }); // this.$router.replace({ path: "/foodManage/stockManage/goodsTransfer" }); //
}, },
getContractInfo(){ getContractInfo(){
console.log(this.transferRowData) let param = {
let param = { goodsTransferId:this.transferRowData.goodsTransferId
outId:this.transferRowData.outId
} }
// //
getWarehouseOutInfoApi(param).then((response) => { getGoodsTransferInfoApi(param).then((response) => {
this.baseInfo = response.data; this.baseInfo = response.data;
this.materialLis = this.baseInfo.imsOutInventoryDetailVOList; this.materialList = this.baseInfo.goodsAllocationDetailDTOList;
}); });
}, },
// //

View File

@ -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="transferCode"> <el-form-item label="调拨单号" prop="goodsTransferCode">
<el-input v-model="baseInfo.transferCode" placeholder="调拨单号自动生成" disabled maxlength="20" clearable style="width: 240px"/> <el-input v-model="baseInfo.goodsTransferCode" 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"
@ -15,8 +15,8 @@
}" @change="handleAreaChange"> }" @change="handleAreaChange">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="调出仓库" prop="warehouseId"> <el-form-item label="调出仓库" prop="outWarehouseId">
<el-select v-model="baseInfo.warehouseId" clearable placeholder="请选择货品仓库" style="width: 100%;"> <el-select v-model="baseInfo.outWarehouseId" 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"
:label="item.warehouseName" :label="item.warehouseName"
@ -24,8 +24,8 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="调入仓库" prop="warehouseId"> <el-form-item label="调入仓库" prop="intoWarehouseId">
<el-select v-model="baseInfo.warehouseId" clearable placeholder="请选择货品仓库" style="width: 100%;"> <el-select v-model="baseInfo.intoWarehouseId" 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"
:label="item.warehouseName" :label="item.warehouseName"
@ -59,10 +59,10 @@
<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="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="materialNum" :show-overflow-tooltip="true"/> <el-table-column label="当前可调库存" align="center" prop="fetchNum" :show-overflow-tooltip="true"/>
<el-table-column label="调货数量" align="center" prop="fetchNum" :show-overflow-tooltip="true"> <el-table-column label="调货数量" align="center" prop="orderNum" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model.number="scope.row.fetchNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.fetchNum=v.replace(/[^\d]/g,''))"/> <el-input v-model.number="scope.row.orderNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.orderNum=v.replace(/[^\d]/g,''))"/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -185,8 +185,8 @@
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,getStockMaterialListApi,drpWareHousePageApi } from "@/api/foodManage/stockManage"; import { systemMaterialTreeApi,getStockMaterialListApi,drpWareHousePageApi } from "@/api/foodManage/stockManage";
import { getWarehouseOutInfoApi,addWarehouseOutApi,editWarehouseOutApi } from "@/api/foodManage/stockManage"; import { getGoodsTransferInfoApi,addGoodsTransferSaveApi,addGoodsTransferCommitApi } from "@/api/foodManage/stockManage";
//warehouseOutPageApi getWarehouseOutInfoApi addWarehouseOutApi editWarehouseOutApi delWarehouseOutApi //addGoodsTransferSaveApi addGoodsTransferCommitApi editGoodsTransferSaveApi editGoodsTransferCommitApi
import { fetchMaterialPageApi } from "@/api/foodManage/pickManage"; import { fetchMaterialPageApi } from "@/api/foodManage/pickManage";
export default { export default {
name: "WarehouseOutEdit", name: "WarehouseOutEdit",
@ -215,10 +215,7 @@ export default {
supplierId: [ supplierId: [
{ required: true, message: "供应商不能为空", trigger: "change" } { required: true, message: "供应商不能为空", trigger: "change" }
], ],
outDate: [ outWarehouseId: [
{ required: true, message: "出库时间不能为空", trigger: "change" }
],
warehouseId: [
{ required: true, message: "货品仓库不能为空", trigger: "change" } { required: true, message: "货品仓库不能为空", trigger: "change" }
], ],
outType: [ outType: [
@ -286,18 +283,19 @@ export default {
getContractInfo(){ getContractInfo(){
console.log(this.transferRowData) console.log(this.transferRowData)
let param = { let param = {
outId:this.transferRowData.outId goodsTransferId:this.transferRowData.goodsTransferId
} }
// //
getWarehouseOutInfoApi(param).then((response) => { getGoodsTransferInfoApi(param).then((response) => {
this.baseInfo = response.data; this.baseInfo = response.data;
this.materialList = this.baseInfo.imsOutInventoryDetailVOList; this.materialList = this.baseInfo.goodsAllocationDetailDTOList;
// this.materialList.forEach(item=>{ // this.materialList.forEach(item=>{
// this.$set(item,"unitPrice",Number(item.unitPrice)/100) // this.$set(item,"unitPrice",Number(item.unitPrice)/100)
// }) // })
drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => { drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => {
this.wareHouseOptions = response.rows||[]; this.wareHouseOptions = response.rows||[];
this.$set(this.baseInfo,'warehouseId',this.baseInfo.warehouseId) this.$set(this.baseInfo,'outWarehouseId',this.baseInfo.outWarehouseId)
this.$set(this.baseInfo,'intoWarehouseId',this.baseInfo.intoWarehouseId)
}); });
}); });
}, },
@ -322,7 +320,8 @@ export default {
getWareHouseData() { getWareHouseData() {
drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => { drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => {
this.wareHouseOptions = response.rows||[]; this.wareHouseOptions = response.rows||[];
this.$set(this.baseInfo,'warehouseId',null) this.$set(this.baseInfo,'outWarehouseId',null)
this.$set(this.baseInfo,'intoWarehouseId',null)
}); });
}, },
/** 查询货品类别下拉树结构 */ /** 查询货品类别下拉树结构 */
@ -353,7 +352,7 @@ export default {
}, },
// //
addMaterial(){ addMaterial(){
if(this.baseInfo.areaId!=undefined||this.baseInfo.warehouseId!=undefined){ if(this.baseInfo.areaId!=undefined||this.baseInfo.outWarehouseId!=undefined){
this.openDialog=true this.openDialog=true
this.resetQuery() this.resetQuery()
setTimeout(()=>{ setTimeout(()=>{
@ -379,8 +378,7 @@ export default {
let param = { let param = {
"pageSize": this.queryParams.pageSize, "pageSize": this.queryParams.pageSize,
"pageNum": this.queryParams.pageNum, "pageNum": this.queryParams.pageNum,
"areaId": this.baseInfo.areaId, "warehouseId": this.baseInfo.outWarehouseId,
"warehouseId": this.baseInfo.warehouseId,
"materialName": this.queryParams.materialName, "materialName": this.queryParams.materialName,
"materialCode": this.queryParams.materialCode, "materialCode": this.queryParams.materialCode,
"materialTypeIds": this.queryParams.materialTypeIds, "materialTypeIds": this.queryParams.materialTypeIds,
@ -394,7 +392,8 @@ export default {
handleSelectionChange2(selection) { handleSelectionChange2(selection) {
this.batchChosenMaterial = selection; this.batchChosenMaterial = selection;
this.batchChosenMaterial.forEach(item=>{ this.batchChosenMaterial.forEach(item=>{
this.$set(item,"fetchNum",0) this.$set(item,"fetchNum",item.materialNum)
this.$set(item,"orderNum",0)
}) })
}, },
confirmChosen(){ confirmChosen(){
@ -412,25 +411,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.outDate = this.formatDateTime(this.baseInfo.outDate)
param.totalAmount=0
param.totalNum=0 param.totalNum=0
param.status=1 param.goodsAllocationDetailDTOList = []
param.imsOutInventoryDetailAddList = []
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.fetchNum==0){ if(item.orderNum==0){
this.noMaterial = true this.noMaterial = true
}else{ }else{
let obj = Object.assign({}, item) let obj = Object.assign({}, item)
param.totalNum = param.totalNum+Number(obj.fetchNum) param.totalNum = param.totalNum+Number(obj.orderNum)
param.imsOutInventoryDetailAddList.push(obj) param.goodsAllocationDetailDTOList.push(obj)
} }
}) })
} }
if(this.noMaterial){ if(this.noMaterial){
this.$modal.msgError("请输入单价和数量!"); this.$modal.msgError("请输入数量!");
}else{ }else{
this.noMaterial = true; this.noMaterial = true;
if(this.materialList.length>0){ if(this.materialList.length>0){
@ -441,8 +437,8 @@ export default {
this.$modal.msgError("请添加货品!"); this.$modal.msgError("请添加货品!");
}else{ }else{
this.loadingBtn=true; this.loadingBtn=true;
if (this.baseInfo.outId != undefined) { if (this.baseInfo.goodsTransferId != undefined) {
editWarehouseOutApi(param).then((response) => { addGoodsTransferSaveApi(param).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.loadingBtn=false this.loadingBtn=false
this.jumpList() this.jumpList()
@ -450,7 +446,7 @@ export default {
this.loadingBtn=false this.loadingBtn=false
}); });
} else { } else {
addWarehouseOutApi(param).then((response) => { addGoodsTransferSaveApi(param).then((response) => {
this.$modal.msgSuccess("保存成功"); this.$modal.msgSuccess("保存成功");
this.loadingBtn=false this.loadingBtn=false
this.jumpList() this.jumpList()
@ -468,21 +464,18 @@ export default {
confirmSubmit(){ confirmSubmit(){
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.outDate = this.formatDateTime(this.baseInfo.outDate)
param.totalAmount=0
param.totalNum=0 param.totalNum=0
param.status=2 param.goodsAllocationDetailDTOList = []
param.imsOutInventoryDetailAddList = []
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.fetchNum==0){ if(item.orderNum==0){
this.noMaterial = true this.noMaterial = true
}else{ }else{
let obj = Object.assign({}, item) let obj = Object.assign({}, item)
param.totalNum = param.totalNum+Number(obj.fetchNum) param.totalNum = param.totalNum+Number(obj.orderNum)
param.imsOutInventoryDetailAddList.push(obj) param.goodsAllocationDetailDTOList.push(obj)
} }
}) })
} }
@ -498,8 +491,8 @@ export default {
this.$modal.msgError("请添加货品!"); this.$modal.msgError("请添加货品!");
}else{ }else{
this.loadingBtn=true; this.loadingBtn=true;
if (this.baseInfo.outId != undefined) { if (this.baseInfo.goodsTransferId != undefined) {
editWarehouseOutApi(param).then((response) => { addGoodsTransferCommitApi(param).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.loadingBtn=false this.loadingBtn=false
this.jumpList() this.jumpList()
@ -507,7 +500,7 @@ export default {
this.loadingBtn=false this.loadingBtn=false
}); });
} else { } else {
addWarehouseOutApi(param).then((response) => { addGoodsTransferCommitApi(param).then((response) => {
this.$modal.msgSuccess("保存成功"); this.$modal.msgSuccess("保存成功");
this.loadingBtn=false this.loadingBtn=false
this.jumpList() this.jumpList()
@ -524,7 +517,7 @@ export default {
importMaterial(){ importMaterial(){
if(this.baseInfo.areaId!=undefined||this.baseInfo.warehouseId!=undefined){ if(this.baseInfo.areaId!=undefined||this.baseInfo.outWarehouseId!=undefined){
this.openImportDialog=true this.openImportDialog=true
this.resetQuery2() this.resetQuery2()
setTimeout(()=>{ setTimeout(()=>{
@ -551,7 +544,7 @@ export default {
"pageSize": this.queryParams2.pageSize, "pageSize": this.queryParams2.pageSize,
"pageNum": this.queryParams2.pageNum, "pageNum": this.queryParams2.pageNum,
"areaId": this.baseInfo.areaId, "areaId": this.baseInfo.areaId,
"warehouseId": this.baseInfo.warehouseId "outWarehouseId": this.baseInfo.outWarehouseId
} }
fetchMaterialPageApi(param).then(response => { fetchMaterialPageApi(param).then(response => {
this.tableListData2 = response.rows; this.tableListData2 = response.rows;

View File

@ -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="transferCode"> <el-form-item label="调拨单号" prop="goodsTransferCode">
<el-input v-model="queryParams.transferCode" placeholder="请输入调拨单号" maxlength="20" clearable style="width: 240px"/> <el-input v-model="queryParams.goodsTransferCode" 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,15 +28,6 @@
}" clearable @change="handleAreaChange"> }" clearable @change="handleAreaChange">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<!-- <el-form-item label="货品仓库" prop="warehouseId">
<el-select v-model="queryParams.warehouseId" clearable placeholder="请选择货品仓库" style="width: 100%;">
<el-option v-for="item in wareHouseOptions"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId"
></el-option>
</el-select>
</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,37 +53,37 @@
<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="transferCode" :show-overflow-tooltip="true" /> <el-table-column label="调拨单号" align="center" prop="goodsTransferCode" :show-overflow-tooltip="true" />
<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="outDate" :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="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="outWarehouseName" :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="intoWarehouseName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="调拨商品种类数量" align="center" prop="totalNum" :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="totalNum" :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="totalAmount" :show-overflow-tooltip="true" width="150"> <!-- <el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true" width="150">
<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" width="180" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" v-if="scope.row.status==1" icon="el-icon-edit" v-if="scope.row.transferStatus==0"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>编辑</el-button> >编辑</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" v-if="scope.row.status==2" icon="el-icon-edit"
@click="handleView(scope.row)" @click="handleView(scope.row)"
>详情</el-button> >详情</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" v-if="scope.row.status==1" icon="el-icon-delete" v-if="scope.row.transferStatus==0"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button> >删除</el-button>
</template> </template>
@ -127,8 +118,7 @@
<script> <script>
import { systemAreaTreeApi } from "@/api/base/stall"; import { systemAreaTreeApi } from "@/api/base/stall";
import { drpWareHousePageApi,systemMaterialTreeApi } from "@/api/foodManage/stockManage"; import { drpWareHousePageApi,systemMaterialTreeApi } from "@/api/foodManage/stockManage";
import { warehouseOutPageApi,delWarehouseOutApi } from "@/api/foodManage/stockManage"; import { goodsTransferPageApi,delGoodsTransferApi } from "@/api/foodManage/stockManage";
//warehouseOutPageApi getWarehouseOutInfoApi addWarehouseOutApi editWarehouseOutApi delWarehouseOutApi
export default { export default {
name: "", name: "",
@ -240,20 +230,19 @@ export default {
let param = { let param = {
"pageNum": this.queryParams.pageNum, "pageNum": this.queryParams.pageNum,
"pageSize": this.queryParams.pageSize, "pageSize": this.queryParams.pageSize,
"transferCode": this.queryParams.transferCode, "goodsTransferCode": this.queryParams.goodsTransferCode,
"areaId": this.queryParams.areaId, "areaId": this.queryParams.areaId,
"warehouseId": this.queryParams.warehouseId, // "warehouseId": this.queryParams.warehouseId,
"status": this.queryParams.status, // "outType": this.queryParams.outType
"outType": this.queryParams.outType
} }
if(this.dateRange&&this.dateRange.length>0){ if(this.dateRange&&this.dateRange.length>0){
param.startDateTime=this.formatDateTime(this.dateRange[0]) param.startTime=this.formatDateTime(this.dateRange[0])
param.endDateTime=this.formatDateTime(this.dateRange[1]) param.endTime=this.formatDateTime(this.dateRange[1])
}else{ }else{
param.startDateTime=undefined; param.startTime=undefined;
param.endDateTime=undefined; param.endTime=undefined;
} }
warehouseOutPageApi(param).then(response => { goodsTransferPageApi(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;
@ -304,7 +293,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal.confirm('是否确认删除数据项?').then(function() { this.$modal.confirm('是否确认删除数据项?').then(function() {
return delWarehouseOutApi({outIds:[row.outId]}); return delGoodsTransferApi({outIds:[row.outId]});
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");

View File

@ -243,16 +243,16 @@ export default {
"pageSize": this.queryParams.pageSize, "pageSize": this.queryParams.pageSize,
"checkCode": this.queryParams.checkCode, "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,
"intoType": this.queryParams.intoType // "intoType": this.queryParams.intoType
} }
if(this.dateRange&&this.dateRange.length>0){ if(this.dateRange&&this.dateRange.length>0){
param.startDateTime=this.formatDateTime(this.dateRange[0]) param.startTime=this.formatDateTime(this.dateRange[0])
param.endDateTime=this.formatDateTime(this.dateRange[1]) param.endTime=this.formatDateTime(this.dateRange[1])
}else{ }else{
param.startDateTime=undefined; param.startTime=undefined;
param.endDateTime=undefined; param.endTime=undefined;
} }
checkInventoryPageApi(param).then(response => { checkInventoryPageApi(param).then(response => {
this.tableListData = response.rows; this.tableListData = response.rows;