退货单新增修改
This commit is contained in:
parent
8d1e157bd2
commit
5d0aaf05ae
|
|
@ -34,6 +34,22 @@ export function getStockMaterialListApi(data) {
|
|||
pageSize:data.pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 货品批次详情-入库批次列表
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//查询供应商列表 isPaging 0不分页 2分页
|
||||
|
|
|
|||
|
|
@ -71,14 +71,13 @@
|
|||
<span v-if="scope.row.salesMode==2">称重</span>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column label="单价(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
</template>
|
||||
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="当前可退库存" align="center" prop="materialNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="当前可退数量" align="center" prop="purNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="小计(元)" align="center" prop="totalPrice" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.totalPrice/100).toFixed(2) }}</span>
|
||||
<span>{{ scope.row.refundNum*scope.row.unitPrice }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退货数量" align="center" prop="refundNum" :show-overflow-tooltip="true">
|
||||
|
|
@ -126,7 +125,7 @@
|
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="tableListData" ref="multipleTable1" height="520" :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange2">
|
||||
<el-table v-loading="loading" :data="tableListData" ref="multipleTable1" height="520" :row-key="(row)=>{return row.intoDetailId}" @selection-change="handleSelectionChange2">
|
||||
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" />
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -137,10 +136,16 @@
|
|||
<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="size" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column label="货品库存" align="center" prop="materialNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="unitName" :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">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="过期时间" align="center" prop="expireTime" :show-overflow-tooltip="true" width="140"/>
|
||||
<el-table-column label="批次单号" align="center" prop="intoCode" :show-overflow-tooltip="true" width="180"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
|
|
@ -161,7 +166,7 @@
|
|||
<script>
|
||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||
import { systemMaterialTreeApi,getStockMaterialListApi,supplierPageApi,drpWareHousePageApi } from "@/api/foodManage/returnManage";
|
||||
import { systemMaterialTreeApi,getMaterialInStockBatchApi,supplierPageApi,drpWareHousePageApi } from "@/api/foodManage/returnManage";
|
||||
import { getReturnMaterialInfoApi,addReturnMaterialApi,editReturnMaterialApi } from "@/api/foodManage/returnManage";
|
||||
|
||||
export default {
|
||||
|
|
@ -265,9 +270,9 @@ export default {
|
|||
getReturnMaterialInfoApi(param).then((response) => {
|
||||
this.baseInfo = this.returnRowData;
|
||||
this.materialList = response.rows;
|
||||
// this.materialList.forEach(item=>{
|
||||
// this.$set(item,"singlePrice",Number(item.singlePrice)/100)
|
||||
// })
|
||||
this.materialList.forEach(item=>{
|
||||
this.$set(item,"unitPrice",Number(item.unitPrice)/100)
|
||||
})
|
||||
supplierPageApi({ isPaging:1,areaIdList:[this.baseInfo.areaId] }).then((response) => {
|
||||
this.supplierOptions = response.rows||[];
|
||||
this.$set(this.baseInfo,'supplierId',this.baseInfo.supplierId)
|
||||
|
|
@ -338,14 +343,14 @@ export default {
|
|||
},
|
||||
//添加货品
|
||||
addMaterial(){
|
||||
if(this.baseInfo.areaId!=undefined||this.baseInfo.refundWarehouseId!=undefined){
|
||||
if(this.baseInfo.areaId!=undefined||this.baseInfo.refundWarehouseId!=undefined||this.baseInfo.supplierId!=undefined){
|
||||
this.openDialog=true
|
||||
this.resetQuery()
|
||||
setTimeout(()=>{
|
||||
this.$refs.multipleTable1.clearSelection()
|
||||
},300)
|
||||
}else{
|
||||
this.$modal.msgError("请先选择区域,仓库");
|
||||
this.$modal.msgError("请先选择区域,供应商,仓库");
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
|
@ -363,14 +368,14 @@ export default {
|
|||
this.loading = true;
|
||||
let param = {
|
||||
"pageSize": this.queryParams.pageSize,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"areaId": this.baseInfo.areaId,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"warehouseId": this.baseInfo.refundWarehouseId,
|
||||
"supplierId": this.baseInfo.supplierId,
|
||||
"materialName": this.queryParams.materialName,
|
||||
"materialCode": this.queryParams.materialCode,
|
||||
"materialTypeIds": this.queryParams.materialTypeIds,
|
||||
}
|
||||
getStockMaterialListApi(param).then(response => {
|
||||
getMaterialInStockBatchApi(param).then(response => {
|
||||
this.tableListData = response.rows;
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
|
|
@ -380,13 +385,18 @@ export default {
|
|||
this.batchChosenMaterial = selection;
|
||||
this.batchChosenMaterial.forEach(item=>{
|
||||
this.$set(item,"refundNum",0)
|
||||
// this.$set(item,"singlePrice",item.unitPrice/100)
|
||||
this.$set(item,"unitPrice",item.unitPrice)
|
||||
})
|
||||
},
|
||||
confirmChosen(){
|
||||
if(this.batchChosenMaterial.length>0){
|
||||
this.loading = true
|
||||
this.materialList = this.batchChosenMaterial;
|
||||
this.loading = true
|
||||
this.materialList = []
|
||||
this.batchChosenMaterial.forEach(item=>{
|
||||
let obj = Object.assign({}, item)
|
||||
obj.unitPrice = item.unitPrice/100;
|
||||
this.materialList.push(obj)
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.loading = false
|
||||
this.openDialog=false
|
||||
|
|
@ -409,9 +419,9 @@ export default {
|
|||
this.noMaterial = true
|
||||
}else{
|
||||
let obj = Object.assign({}, item)
|
||||
// obj.singlePrice = Number(obj.singlePrice)*100
|
||||
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.refundNum))
|
||||
// param.refundTotalAmount = param.refundTotalAmount+obj.totalPrice;
|
||||
obj.unitPrice = Number(obj.unitPrice)*100
|
||||
obj.totalPrice = (Number(obj.unitPrice)*Number(obj.refundNum))
|
||||
param.refundTotalAmount = param.refundTotalAmount+obj.totalPrice;
|
||||
param.refundTotalNum = param.refundTotalNum+Number(obj.refundNum)
|
||||
param.detailList.push(obj)
|
||||
}
|
||||
|
|
@ -458,9 +468,9 @@ export default {
|
|||
this.noMaterial = true
|
||||
}else{
|
||||
let obj = Object.assign({}, item)
|
||||
// obj.singlePrice = Number(obj.singlePrice)*100
|
||||
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.refundNum))
|
||||
// param.refundTotalAmount = param.refundTotalAmount+obj.totalPrice;
|
||||
obj.unitPrice = Number(obj.unitPrice)*100
|
||||
obj.totalPrice = (Number(obj.unitPrice)*Number(obj.refundNum))
|
||||
param.refundTotalAmount = param.refundTotalAmount+obj.totalPrice;
|
||||
param.refundTotalNum = param.refundTotalNum+Number(obj.refundNum)
|
||||
param.detailList.push(obj)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ export default {
|
|||
//查询查询食堂下拉结构
|
||||
getWarehouseInInfoApi(param).then((response) => {
|
||||
this.baseInfo = response.data;
|
||||
this.materialList = this.baseInfo.imsIntoInventoryDetailVOList;
|
||||
this.materialList = this.baseInfo.imsIntoInventoryDetailVOList;
|
||||
// this.$set(this.baseInfo,'areaId',Number(response.data.areaId))
|
||||
this.materialList.forEach(item=>{
|
||||
this.$set(item,"unitPrice",Number(item.unitPrice)/100)
|
||||
|
|
|
|||
Loading…
Reference in New Issue