验货单修改
This commit is contained in:
parent
f13d6e4f7a
commit
ab6898af75
|
|
@ -59,11 +59,12 @@
|
|||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</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="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="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="deliveryMan" :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="deliveryTotalNum" :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">
|
||||
<span v-if="scope.row.status==1">待提交</span>
|
||||
<span v-if="scope.row.status==2">已提交</span>
|
||||
</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="contractPerson" :show-overflow-tooltip="true" width="120"/> -->
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
icon="el-icon-delete" v-if="scope.row.status==1"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -66,6 +66,18 @@
|
|||
<el-form-item label="详细地址" prop="supplyAddress">
|
||||
<el-input v-model="baseInfo.supplyAddress" placeholder="请输入详细地址" maxlength="20" clearable style="width: 240px"/>
|
||||
</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-radio-group v-model="baseInfo.payMoneyStyle" >
|
||||
<el-radio label="1" style="font-size: 14px;">一次性付款</el-radio>
|
||||
|
|
@ -217,7 +229,7 @@
|
|||
<script>
|
||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||
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";
|
||||
export default {
|
||||
name: "orderEdit",
|
||||
|
|
@ -226,6 +238,8 @@ export default {
|
|||
return {
|
||||
purchaseOrderRowData:{},//页面传参
|
||||
loading:false,
|
||||
loading2:false,
|
||||
contractOptions:[],
|
||||
loadingBtn:false,
|
||||
baseInfo: {
|
||||
orderTitle:undefined,
|
||||
|
|
@ -407,6 +421,25 @@ export default {
|
|||
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){
|
||||
//this.formatDate(e[0])
|
||||
|
|
|
|||
|
|
@ -103,40 +103,53 @@
|
|||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购订单号" align="center" prop="orderGoodsCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="采购订单标题" align="center" prop="orderTitle" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="提交状态" align="center" prop="orderStatus" :show-overflow-tooltip="true" width="100">
|
||||
<el-table-column label="合同编号" align="center" prop="contractCode" :show-overflow-tooltip="true" width="180"/>
|
||||
<el-table-column label="生产计划单号" align="center" prop="productPlanCodeList" :show-overflow-tooltip="true" width="180">
|
||||
<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">
|
||||
<span v-if="scope.row.orderStatus==1">待提交</span>
|
||||
<span v-if="scope.row.orderStatus==2">已提交</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="确认状态" align="center" prop="supplierConfirmStatus" :show-overflow-tooltip="true" width="100">
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="确认状态" align="center" prop="supplierConfirmStatus" :show-overflow-tooltip="true" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.supplierConfirmStatus==1">待确认</span>
|
||||
<span v-if="scope.row.supplierConfirmStatus==2">确认通过</span>
|
||||
<span v-if="scope.row.supplierConfirmStatus==3">已拒绝</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
|
||||
<el-table-column label="订单总金额(元)" align="center" prop="orderAmount" :show-overflow-tooltip="true" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.orderAmount/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</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="requestArrivalTime" :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="canteenName" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="所属档口" align="center" prop="stallName" :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="" :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" width="180" class-name="small-padding fixed-width">
|
||||
<el-table-column label="所属区域-食堂-档口" align="center" prop="" :show-overflow-tooltip="true" width="250">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.areaName }}-{{ scope.row.canteenName }}-{{ scope.row.stallName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="所属档口" align="center" prop="stallName" :show-overflow-tooltip="true" width="150"/> -->
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
|
@ -159,7 +172,7 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
icon="el-icon-delete" v-if="scope.row.orderStatus==1"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
|
|
@ -194,7 +207,7 @@
|
|||
<script>
|
||||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
||||
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 {
|
||||
name: "",
|
||||
|
|
@ -400,11 +413,10 @@ export default {
|
|||
handlePurchaseInspection(row){
|
||||
//获取订单详情
|
||||
getPurchaseOrderInfoApi({orderGoodsId:row.orderGoodsId}).then((response) => {
|
||||
var orderGoodsDetailList = response.data.orderGoodsDetailList
|
||||
console.log(orderGoodsDetailList)
|
||||
console.log(row)
|
||||
var orderGoodsDetailList = response.data.orderGoodsDetailList;
|
||||
var that = this
|
||||
this.$modal.confirm('是否确认生成采购验货?').then(function() {
|
||||
let param = {
|
||||
var param = {
|
||||
status:1,
|
||||
relateOrderGoodsId:row.orderGoodsCode,
|
||||
deliveryDate:null,
|
||||
|
|
@ -413,41 +425,31 @@ export default {
|
|||
deliverySupplierId:row.supplierId,
|
||||
deliveryMan:null,
|
||||
deliveryPhone:null,
|
||||
inspectDate:null,
|
||||
inspectDate:that.formatDateTime(row.requestArrivalTime),
|
||||
inspector:null,
|
||||
inspectGoodsDetails: [],
|
||||
deliveryTotalNum:0,
|
||||
inspectQualifiedNum:0,
|
||||
contractAttachment:"",
|
||||
remark:"采购订单生成采购验货",
|
||||
}
|
||||
param.deliveryTotalNum = 0;//送货总数量
|
||||
param.inspectQualifiedNum = 0;//验货合格总数量
|
||||
param.contractAttachment = ""
|
||||
orderGoodsDetailList.forEach(item=>{
|
||||
let obj = Object.assign({}, item)
|
||||
console.log(obj)
|
||||
obj.unitPrice = Number(item.singlePrice)
|
||||
// obj.orderNum = Number(item.purchaseNum)
|
||||
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.orderNum))
|
||||
// param.orderAmount = param.orderAmount+obj.totalPrice;
|
||||
// param.totalNum = param.totalNum+Number(obj.orderNum)
|
||||
// param.orderGoodsDetailList.push(obj)
|
||||
obj.deliveryNum = Number(item.orderNum)
|
||||
obj.qualifiedNum = Number(item.orderNum)
|
||||
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
|
||||
param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//验货合格总数量
|
||||
param.inspectGoodsDetails.push(obj)
|
||||
})
|
||||
// return addPurchaseOrderApi(param);//新增采购订单
|
||||
console.log(param)
|
||||
return addPurchaseInspectApi(param);//新增采购验货
|
||||
}).then((res) => {
|
||||
this.getList();
|
||||
this.$router.push({ path: "/foodManage/purchaseManage/inspectionEdit",query: {purchaseInspectionRowData:JSON.stringify(res.data)} });
|
||||
}).catch(() => {});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
defaultDateRange() {
|
||||
const end = new Date(new Date().toLocaleDateString());
|
||||
|
|
|
|||
|
|
@ -79,6 +79,13 @@
|
|||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</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="purchaseDate" :show-overflow-tooltip="true" />
|
||||
<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="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="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="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" width="180" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
|
@ -124,7 +131,7 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
icon="el-icon-delete" v-if="scope.row.status==1"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue