采购计划生成采购订单3
This commit is contained in:
parent
47e858fe33
commit
f13d6e4f7a
|
|
@ -150,12 +150,12 @@
|
||||||
icon="el-icon-edit" v-if="scope.row.orderStatus==2"
|
icon="el-icon-edit" v-if="scope.row.orderStatus==2"
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
<!-- <el-button
|
<el-button
|
||||||
size="mini" v-if="scope.row.orderStatus==1"
|
size="mini"
|
||||||
type="text" :disabled="loadingBtn"
|
type="text"
|
||||||
icon="el-icon-top"
|
icon="el-icon-edit" v-if="scope.row.orderStatus==2"
|
||||||
@click="confirmSubmit(scope.row)"
|
@click="handlePurchaseInspection(scope.row)"
|
||||||
>提交</el-button> -->
|
>生成采购验货</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
|
@ -194,7 +194,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,editPurchaseOrderApi,delPurchaseOrderApi } from "@/api/foodManage/purchaseManage";
|
import { purchaseOrderPageApi,getPurchaseOrderInfoApi,delPurchaseOrderApi } from "@/api/foodManage/purchaseManage";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -397,18 +397,57 @@ export default {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
// 提交按钮
|
handlePurchaseInspection(row){
|
||||||
confirmSubmit(row){
|
//获取订单详情
|
||||||
let param = Object.assign({},row);
|
getPurchaseOrderInfoApi({orderGoodsId:row.orderGoodsId}).then((response) => {
|
||||||
this.loadingBtn=true
|
var orderGoodsDetailList = response.data.orderGoodsDetailList
|
||||||
param.orderStatus=2
|
console.log(orderGoodsDetailList)
|
||||||
editPurchaseOrderApi(param).then((response) => {
|
console.log(row)
|
||||||
this.$modal.msgSuccess("提交成功");
|
this.$modal.confirm('是否确认生成采购验货?').then(function() {
|
||||||
this.getList()
|
let param = {
|
||||||
this.loadingBtn=false
|
status:1,
|
||||||
}).catch(() => {
|
relateOrderGoodsId:row.orderGoodsCode,
|
||||||
this.loadingBtn=false
|
deliveryDate:null,
|
||||||
|
areaId:row.areaId,
|
||||||
|
deliveryWarehouseId:row.warehouseId,
|
||||||
|
deliverySupplierId:row.supplierId,
|
||||||
|
deliveryMan:null,
|
||||||
|
deliveryPhone:null,
|
||||||
|
inspectDate:null,
|
||||||
|
inspector:null,
|
||||||
|
inspectGoodsDetails: [],
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
// return addPurchaseOrderApi(param);//新增采购订单
|
||||||
|
}).then((res) => {
|
||||||
|
this.getList();
|
||||||
|
this.$router.push({ path: "/foodManage/purchaseManage/inspectionEdit",query: {purchaseInspectionRowData:JSON.stringify(res.data)} });
|
||||||
|
}).catch(() => {});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
defaultDateRange() {
|
defaultDateRange() {
|
||||||
const end = new Date(new Date().toLocaleDateString());
|
const end = new Date(new Date().toLocaleDateString());
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.status==2"
|
icon="el-icon-edit" v-if="scope.row.status==2"
|
||||||
@click="handlePurchaseOrder(scope.row)"
|
@click="handlePurchaseOrder(scope.row)"
|
||||||
>生成采购计划</el-button>
|
>生成采购订单</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
|
@ -362,7 +362,7 @@ export default {
|
||||||
var purchasePlanDetailList = response.data.purchasePlanDetailList
|
var purchasePlanDetailList = response.data.purchasePlanDetailList
|
||||||
this.$modal.confirm('是否确认生成采购订单?').then(function() {
|
this.$modal.confirm('是否确认生成采购订单?').then(function() {
|
||||||
let param = {
|
let param = {
|
||||||
orderTitle:"采购计划单生成采购订单",
|
orderTitle:"采购计划生成采购订单",
|
||||||
purchasePlanCode:row.planCode,
|
purchasePlanCode:row.planCode,
|
||||||
requestArrivalTime:null,
|
requestArrivalTime:null,
|
||||||
warehouseId:null,
|
warehouseId:null,
|
||||||
|
|
@ -374,7 +374,7 @@ export default {
|
||||||
totalNum: 0,
|
totalNum: 0,
|
||||||
orderStatus: 1,
|
orderStatus: 1,
|
||||||
orderGoodsDetailList: [],
|
orderGoodsDetailList: [],
|
||||||
remark:"采购计划单生成采购订单",
|
remark:"采购计划生成采购订单",
|
||||||
}
|
}
|
||||||
purchasePlanDetailList.forEach(item=>{
|
purchasePlanDetailList.forEach(item=>{
|
||||||
let obj = Object.assign({}, item)
|
let obj = Object.assign({}, item)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue