验货单修改

This commit is contained in:
zzyuan 2025-07-16 18:07:57 +08:00
parent f13d6e4f7a
commit ab6898af75
4 changed files with 102 additions and 60 deletions

View File

@ -59,11 +59,12 @@
<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="inspectGoodsCode" :show-overflow-tooltip="true" width="120"/> <el-table-column label="验货单编号" align="center" prop="inspectGoodsCode" :show-overflow-tooltip="true" width="180"/>
<!-- <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="inspectDate" :show-overflow-tooltip="true"/> <el-table-column label="验货日期" align="center" prop="inspectDate" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="关联采购订单号" align="center" prop="relateOrderGoodsId" :show-overflow-tooltip="true" width="180"/>
<el-table-column label="验货人" align="center" prop="inspector" :show-overflow-tooltip="true"/> <el-table-column label="验货人" align="center" prop="inspector" :show-overflow-tooltip="true"/>
<el-table-column label="送货单号" align="center" prop="relateDeliveryGoodsId" :show-overflow-tooltip="true"/> <!-- <el-table-column label="送货单号" align="center" prop="relateDeliveryGoodsId" :show-overflow-tooltip="true"/> -->
<el-table-column label="送货供应商" align="center" prop="deliverySupplierName" :show-overflow-tooltip="true"/> <el-table-column label="送货供应商" align="center" prop="deliverySupplierName" :show-overflow-tooltip="true"/>
<el-table-column label="送货人" align="center" prop="deliveryMan" :show-overflow-tooltip="true"/> <el-table-column label="送货人" align="center" prop="deliveryMan" :show-overflow-tooltip="true"/>
<el-table-column label="送货人电话" align="center" prop="deliveryPhone" :show-overflow-tooltip="true"/> <el-table-column label="送货人电话" align="center" prop="deliveryPhone" :show-overflow-tooltip="true"/>
@ -71,13 +72,12 @@
<el-table-column label="送货日期" align="center" prop="deliveryDate" :show-overflow-tooltip="true"/> <el-table-column label="送货日期" align="center" prop="deliveryDate" :show-overflow-tooltip="true"/>
<el-table-column label="送货总数量" align="center" prop="deliveryTotalNum" :show-overflow-tooltip="true"/> <el-table-column label="送货总数量" align="center" prop="deliveryTotalNum" :show-overflow-tooltip="true"/>
<el-table-column label="合格总数量" align="center" prop="inspectQualifiedNum" :show-overflow-tooltip="true"/> <el-table-column label="合格总数量" align="center" prop="inspectQualifiedNum" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="提交状态" align="center" prop="status" :show-overflow-tooltip="true" width="100">
<el-table-column label="提交状态" align="center" prop="status" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status==1">待提交</span> <span v-if="scope.row.status==1">待提交</span>
<span v-if="scope.row.status==2">已提交</span> <span v-if="scope.row.status==2">已提交</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"/>
<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"/> -->
<!-- <el-table-column label="负责人" align="center" prop="contractPerson" :show-overflow-tooltip="true" width="120"/> --> <!-- <el-table-column label="负责人" align="center" prop="contractPerson" :show-overflow-tooltip="true" width="120"/> -->
@ -106,7 +106,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>

View File

@ -66,6 +66,18 @@
<el-form-item label="详细地址" prop="supplyAddress"> <el-form-item label="详细地址" prop="supplyAddress">
<el-input v-model="baseInfo.supplyAddress" placeholder="请输入详细地址" maxlength="20" clearable style="width: 240px"/> <el-input v-model="baseInfo.supplyAddress" placeholder="请输入详细地址" maxlength="20" clearable style="width: 240px"/>
</el-form-item> </el-form-item>
<el-form-item label="采购合同" prop="contractCode">
<el-select v-model="baseInfo.contractCode" filterable remote
reserve-keyword placeholder="请查询并选择采购合同" style="width: 240px;margin-right: 10px;"
:remote-method="remoteMethod" :loading="loading2" >
<el-option v-for="lab in contractOptions"
:key="lab.contractCode"
:label="lab.contractTitle"
:value="lab.contractCode">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="付款方式" prop="payMoneyStyle"> <el-form-item label="付款方式" prop="payMoneyStyle">
<el-radio-group v-model="baseInfo.payMoneyStyle" > <el-radio-group v-model="baseInfo.payMoneyStyle" >
<el-radio label="1" style="font-size: 14px;">一次性付款</el-radio> <el-radio label="1" style="font-size: 14px;">一次性付款</el-radio>
@ -217,7 +229,7 @@
<script> <script>
import { imgUpLoadTwo } from '@/api/system/upload' import { imgUpLoadTwo } from '@/api/system/upload'
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall"; import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi,drpWareHousePageApi } from "@/api/foodManage/purchaseManage"; import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi,drpWareHousePageApi,purchaseContractPageApi } from "@/api/foodManage/purchaseManage";
import { getPurchaseOrderInfoApi,addPurchaseOrderApi,editPurchaseOrderApi } from "@/api/foodManage/purchaseManage"; import { getPurchaseOrderInfoApi,addPurchaseOrderApi,editPurchaseOrderApi } from "@/api/foodManage/purchaseManage";
export default { export default {
name: "orderEdit", name: "orderEdit",
@ -226,6 +238,8 @@ export default {
return { return {
purchaseOrderRowData:{},// purchaseOrderRowData:{},//
loading:false, loading:false,
loading2:false,
contractOptions:[],
loadingBtn:false, loadingBtn:false,
baseInfo: { baseInfo: {
orderTitle:undefined, orderTitle:undefined,
@ -407,6 +421,25 @@ export default {
this.materialTreeOptions = response.data; this.materialTreeOptions = response.data;
}); });
}, },
//-
remoteMethod(query) {
if (query !== '') {
this.loading2 = true;
setTimeout(() => {
this.loading2 = false;
let param = {
pageNum: 1,
searchValue: query,
pageSize: 20
}
purchaseContractPageApi(param).then(response => {
this.contractOptions = response.rows;
});
}, 200);
} else {
this.contractOptions = [];
}
},
// //
changeDateRange(e){ changeDateRange(e){
//this.formatDate(e[0]) //this.formatDate(e[0])

View File

@ -103,40 +103,53 @@
<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="orderGoodsCode" :show-overflow-tooltip="true" /> <el-table-column label="合同编号" align="center" prop="contractCode" :show-overflow-tooltip="true" width="180"/>
<el-table-column label="采购订单标题" align="center" prop="orderTitle" :show-overflow-tooltip="true" /> <el-table-column label="生产计划单号" align="center" prop="productPlanCodeList" :show-overflow-tooltip="true" width="180">
<el-table-column label="提交状态" align="center" prop="orderStatus" :show-overflow-tooltip="true" width="100"> <template slot-scope="scope">
<div v-if="scope.row.productPlanCodeList">
<div v-for="(item,index) in scope.row.productPlanCodeList" :key="index">{{ item }}</div>
</div>
</template>
</el-table-column>
<el-table-column label="采购计划单号" align="center" prop="purchasePlanCodeList" :show-overflow-tooltip="true" width="180">
<template slot-scope="scope">
<div v-if="scope.row.purchasePlanCodeList">
<div v-for="(item,index) in scope.row.purchasePlanCodeList" :key="index">{{ item }}</div>
</div>
</template>
</el-table-column>
<el-table-column label="采购订单号" align="center" prop="orderGoodsCode" :show-overflow-tooltip="true" width="180"/>
<el-table-column label="采购订单标题" align="center" prop="orderTitle" :show-overflow-tooltip="true" width="180"/>
<!-- <el-table-column label="提交状态" align="center" prop="orderStatus" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.orderStatus==1">待提交</span> <span v-if="scope.row.orderStatus==1">待提交</span>
<span v-if="scope.row.orderStatus==2">已提交</span> <span v-if="scope.row.orderStatus==2">已提交</span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="确认状态" align="center" prop="supplierConfirmStatus" :show-overflow-tooltip="true" width="100"> <!-- <el-table-column label="确认状态" align="center" prop="supplierConfirmStatus" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.supplierConfirmStatus==1">待确认</span> <span v-if="scope.row.supplierConfirmStatus==1">待确认</span>
<span v-if="scope.row.supplierConfirmStatus==2">确认通过</span> <span v-if="scope.row.supplierConfirmStatus==2">确认通过</span>
<span v-if="scope.row.supplierConfirmStatus==3">已拒绝</span> <span v-if="scope.row.supplierConfirmStatus==3">已拒绝</span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="订单总金额(元)" align="center" prop="orderAmount" :show-overflow-tooltip="true" width="120"> <el-table-column label="订单总金额(元)" align="center" prop="orderAmount" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ (scope.row.orderAmount/100).toFixed(2) }}</span> <span>{{ (scope.row.orderAmount/100).toFixed(2) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="货品数量" align="center" prop="totalNum" :show-overflow-tooltip="true" width="100"/> <el-table-column label="货品数量" align="center" prop="totalNum" :show-overflow-tooltip="true" width="100"/>
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120"/> <el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="交货日期" align="center" prop="requestArrivalTime" :show-overflow-tooltip="true" width="150"/> <el-table-column label="交货日期" align="center" prop="requestArrivalTime" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="所属区域-食堂-档口" align="center" prop="" :show-overflow-tooltip="true" width="250">
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/> <template slot-scope="scope">
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="120"/> <span>{{ scope.row.areaName }}-{{ scope.row.canteenName }}-{{ scope.row.stallName }}</span>
<el-table-column label="所属档口" align="center" prop="stallName" :show-overflow-tooltip="true" width="120"/> </template>
<!-- <el-table-column label="审批人" align="center" prop="" :show-overflow-tooltip="true" width="120"/> </el-table-column>
<el-table-column label="审批完成时间" align="center" prop="" :show-overflow-tooltip="true" width="120"/> --> <!-- <el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150"/>
<!-- <el-table-column label="负责人" align="center" prop="contractPerson" :show-overflow-tooltip="true" width="120"/> --> <el-table-column label="所属档口" align="center" prop="stallName" :show-overflow-tooltip="true" width="150"/> -->
<!-- <el-table-column label="制表人" align="center" prop="" :show-overflow-tooltip="true" width="120"/> <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
<el-table-column label="制表时间" align="center" prop="" :show-overflow-tooltip="true" width="120"/> -->
<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"
@ -159,7 +172,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.orderStatus==1"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button> >删除</el-button>
</template> </template>
@ -194,7 +207,7 @@
<script> <script>
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall"; import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
import { supplierPageApi } from "@/api/foodManage/purchaseManage"; import { supplierPageApi } from "@/api/foodManage/purchaseManage";
import { purchaseOrderPageApi,getPurchaseOrderInfoApi,delPurchaseOrderApi } from "@/api/foodManage/purchaseManage"; import { purchaseOrderPageApi,getPurchaseOrderInfoApi,delPurchaseOrderApi,addPurchaseInspectApi } from "@/api/foodManage/purchaseManage";
export default { export default {
name: "", name: "",
@ -400,11 +413,10 @@ export default {
handlePurchaseInspection(row){ handlePurchaseInspection(row){
// //
getPurchaseOrderInfoApi({orderGoodsId:row.orderGoodsId}).then((response) => { getPurchaseOrderInfoApi({orderGoodsId:row.orderGoodsId}).then((response) => {
var orderGoodsDetailList = response.data.orderGoodsDetailList var orderGoodsDetailList = response.data.orderGoodsDetailList;
console.log(orderGoodsDetailList) var that = this
console.log(row)
this.$modal.confirm('是否确认生成采购验货?').then(function() { this.$modal.confirm('是否确认生成采购验货?').then(function() {
let param = { var param = {
status:1, status:1,
relateOrderGoodsId:row.orderGoodsCode, relateOrderGoodsId:row.orderGoodsCode,
deliveryDate:null, deliveryDate:null,
@ -413,41 +425,31 @@ export default {
deliverySupplierId:row.supplierId, deliverySupplierId:row.supplierId,
deliveryMan:null, deliveryMan:null,
deliveryPhone:null, deliveryPhone:null,
inspectDate:null, inspectDate:that.formatDateTime(row.requestArrivalTime),
inspector:null, inspector:null,
inspectGoodsDetails: [], inspectGoodsDetails: [],
deliveryTotalNum:0,
inspectQualifiedNum:0,
contractAttachment:"",
remark:"采购订单生成采购验货", remark:"采购订单生成采购验货",
} }
param.deliveryTotalNum = 0;//
param.inspectQualifiedNum = 0;//
param.contractAttachment = ""
orderGoodsDetailList.forEach(item=>{ orderGoodsDetailList.forEach(item=>{
let obj = Object.assign({}, item) let obj = Object.assign({}, item)
console.log(obj) console.log(obj)
obj.unitPrice = Number(item.singlePrice) obj.unitPrice = Number(item.singlePrice)
// obj.orderNum = Number(item.purchaseNum) obj.deliveryNum = Number(item.orderNum)
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.orderNum)) obj.qualifiedNum = Number(item.orderNum)
// param.orderAmount = param.orderAmount+obj.totalPrice; param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//
// param.totalNum = param.totalNum+Number(obj.orderNum) param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//
// param.orderGoodsDetailList.push(obj) param.inspectGoodsDetails.push(obj)
}) })
// return addPurchaseOrderApi(param);// console.log(param)
return addPurchaseInspectApi(param);//
}).then((res) => { }).then((res) => {
this.getList(); this.getList();
this.$router.push({ path: "/foodManage/purchaseManage/inspectionEdit",query: {purchaseInspectionRowData:JSON.stringify(res.data)} }); this.$router.push({ path: "/foodManage/purchaseManage/inspectionEdit",query: {purchaseInspectionRowData:JSON.stringify(res.data)} });
}).catch(() => {}); }).catch(() => {});
}); });
}, },
defaultDateRange() { defaultDateRange() {
const end = new Date(new Date().toLocaleDateString()); const end = new Date(new Date().toLocaleDateString());

View File

@ -79,6 +79,13 @@
<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="ifBreakDown" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="!scope.row.ifBreakDown"></span>
<span v-if="scope.row.ifBreakDown"></span>
</template>
</el-table-column>
<el-table-column label="生产计划单号" align="center" prop="productionPlanId" :show-overflow-tooltip="true" />
<el-table-column label="采购计划单号" align="center" prop="planCode" :show-overflow-tooltip="true" /> <el-table-column label="采购计划单号" align="center" prop="planCode" :show-overflow-tooltip="true" />
<el-table-column label="采购计划时间" align="center" prop="purchaseDate" :show-overflow-tooltip="true" /> <el-table-column label="采购计划时间" align="center" prop="purchaseDate" :show-overflow-tooltip="true" />
<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"/>
@ -99,8 +106,8 @@
<!-- <el-table-column label="审批人" align="center" prop="approveBy" :show-overflow-tooltip="true" width="120"/> <!-- <el-table-column label="审批人" align="center" prop="approveBy" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="审批完成时间" align="center" prop="approveTime" :show-overflow-tooltip="true" width="120"/> <el-table-column label="审批完成时间" align="center" prop="approveTime" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="负责人" align="center" prop="contractPerson" :show-overflow-tooltip="true" width="120"/>--> <el-table-column label="负责人" align="center" prop="contractPerson" :show-overflow-tooltip="true" width="120"/>-->
<el-table-column label="制表人" align="center" prop="createBy" :show-overflow-tooltip="true" width="100"/> <!-- <el-table-column label="制表人" align="center" prop="createBy" :show-overflow-tooltip="true" width="100"/>
<el-table-column label="制表时间" align="center" prop="createTime" :show-overflow-tooltip="true" /> <el-table-column label="制表时间" align="center" prop="createTime" :show-overflow-tooltip="true" /> -->
<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
@ -124,7 +131,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>