Browse Source

2022-05-30 取消工单

master
rui_li 4 years ago
parent
commit
3b1bac9d79
  1. 4
      src/api/shopOrder/shopOrder.js
  2. 36
      src/views/modules/shopOrder/shopOrder/shopOrder.vue

4
src/api/shopOrder/shopOrder.js

@ -43,3 +43,7 @@ export const getShopOrderDetail = data => createAPI(`/shopOrder/getShopOrderDeta
export const getOrderInfo = data => createAPI(`/shopOrder/getOrderInfo`,'post',data) export const getOrderInfo = data => createAPI(`/shopOrder/getOrderInfo`,'post',data)
// 获取 shoporder sap sobom 信息 // 获取 shoporder sap sobom 信息
export const getShopOrderSapSOBOM = data => createAPI(`/shopOrder/getShopOrderSapSOBOM`,'post',data) export const getShopOrderSapSOBOM = data => createAPI(`/shopOrder/getShopOrderSapSOBOM`,'post',data)
//取消shopOrder
export const cancelShopOrderBun = data => createAPI(`/shopOrder/cancelShopOrderBun`,'post',data)

36
src/views/modules/shopOrder/shopOrder/shopOrder.vue

@ -37,6 +37,8 @@
<el-button @click="deleteData" type="primary" style="margin-left: 2px;margin-top: 0px">{{ '删除' }}</el-button> <el-button @click="deleteData" type="primary" style="margin-left: 2px;margin-top: 0px">{{ '删除' }}</el-button>
<el-button @click="printOrder()" type="primary" style="margin-left: 2px;margin-top: 0px">{{ '打印' }} <el-button @click="printOrder()" type="primary" style="margin-left: 2px;margin-top: 0px">{{ '打印' }}
</el-button> </el-button>
<el-button @click="warnCancelOrderConfirm()" type="primary" style="margin-left: 2px;margin-top: 0px">{{ '取消' }}
</el-button>
</el-form> </el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 10px;"> <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 10px;">
<el-form-item :label="'订单类型:'"> <el-form-item :label="'订单类型:'">
@ -475,7 +477,8 @@ import {
saveShopOrderData, saveShopOrderData,
getShopOrderDetail, getShopOrderDetail,
getOrderInfo, getOrderInfo,
getShopOrderSapSOBOM
getShopOrderSapSOBOM,
cancelShopOrderBun,
} from "@/api/shopOrder/shopOrder.js" } from "@/api/shopOrder/shopOrder.js"
import Chooselist from '@/views/modules/common/Chooselist' import Chooselist from '@/views/modules/common/Chooselist'
@ -1865,6 +1868,37 @@ export default {
console.log("操作成功!") console.log("操作成功!")
} }
}, },
//
warnCancelOrderConfirm() {
//
if (!this.modelData.orderNo) {
return this.$message.warning('请先选择订单')
}
//
this.$confirm('确实要取消该生产订单吗?', '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
}).then(() => {
//sfdcRolls
this.cancelShopOrder();
});
},
/*执行取消工单的操作*/
cancelShopOrder(){
//
cancelShopOrderBun(this.modelData).then(({data}) => {
//
if(data.code == 200){
this.$message.success(data.msg);
}else{
this.$message.error(data.msg);
}
})
},
getBaseData(val) { getBaseData(val) {
if (this.tagNo === 16) { if (this.tagNo === 16) {
this.updateData.orderType = val.OrderType this.updateData.orderType = val.OrderType

Loading…
Cancel
Save