订单完成按钮操作

This commit is contained in:
zzyuan 2025-10-22 17:50:57 +08:00
parent 27a032af9f
commit 268b3f852b
2 changed files with 26 additions and 2 deletions

View File

@ -445,7 +445,16 @@ export function delPurchaseOrderApi(data) {
})
}
export function finishPurchaseOrderApi(data) {
return request({
url: '/smart-canteen/ims_order_goods/finishOrder',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// -------------采购验货---------------

View File

@ -162,6 +162,12 @@
icon="el-icon-edit" v-if="scope.row.orderStatus==1||scope.row.orderStatus==2"
@click="handleUpdate(scope.row)"
>编辑</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit" v-if="scope.row.orderStatus==3"
@click="handleFinish(scope.row)"
>订单完成</el-button>
<el-button
size="mini"
type="text"
@ -212,7 +218,7 @@
<script>
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
import { supplierPageApi } from "@/api/foodManage/purchaseManage";
import { purchaseOrderPageApi,getPurchaseOrderInfoApi,delPurchaseOrderApi,addPurchaseInspectApi } from "@/api/foodManage/purchaseManage";
import { purchaseOrderPageApi,getPurchaseOrderInfoApi,delPurchaseOrderApi,finishPurchaseOrderApi,addPurchaseInspectApi } from "@/api/foodManage/purchaseManage";
export default {
name: "",
@ -381,6 +387,15 @@ export default {
handleUpdate(row) {
this.$router.push({ path: "/foodManage/purchaseManage/orderEdit",query: {purchaseOrderRowData:JSON.stringify(row)} });
},
//
handleFinish(row) {
this.$modal.confirm('是否确认该订单已完成?').then(function() {
return finishPurchaseOrderApi({orderGoodsId:row.orderGoodsId});
}).then(() => {
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {});
},
//
cancel() {
this.open = false;