change - add销售订单绑定采购订单功能

master
yinq 3 months ago
parent f5d7b210bd
commit ed972d121b

@ -145,4 +145,58 @@ public class MesPurchaseOrderController extends BaseController
{
return success(mesPurchaseOrderService.selectCheckedPurchaseOrderByPurchaseOrderId(purchaseOrderId));
}
/**
* List
* @param mesPurchaseOrder
* @return
*/
@RequiresPermissions("mes:purchaseOrder:bind")
@GetMapping("/unbindPurchaseOrderList")
public TableDataInfo unbindPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder)
{
startPage();
List<MesPurchaseOrder> list = mesPurchaseOrderService.unbindPurchaseOrderList(mesPurchaseOrder);
return getDataTable(list);
}
/**
* List
* @param mesPurchaseOrder
* @return
*/
@RequiresPermissions("mes:purchaseOrder:bind")
@GetMapping("/saleBindPurchaseOrderList")
public TableDataInfo saleBindPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder)
{
startPage();
List<MesPurchaseOrder> list = mesPurchaseOrderService.saleBindPurchaseOrderList(mesPurchaseOrder);
return getDataTable(list);
}
/**
*
* @param saleOrderId
* @param purchaseOrderIds
* @return
*/
@RequiresPermissions("mes:purchaseOrder:bind")
@Log(title = "采购订单信息", businessType = BusinessType.ALLOCATE)
@PutMapping("/saveSalesBindPurchase")
public AjaxResult saveSalesBindPurchase(Long saleOrderId, Long[] purchaseOrderIds) {
return success(mesPurchaseOrderService.saveSalesBindPurchase(saleOrderId, purchaseOrderIds));
}
/**
*
* @param orderBindIds
* @return
*/
@RequiresPermissions("mes:purchaseOrder:bind")
@Log(title = "采购订单信息", businessType = BusinessType.UNALLOCATE)
@PostMapping("/removeSalesBindPurchase")
public AjaxResult removeSalesBindPurchase(Long[] orderBindIds) {
return toAjax(mesPurchaseOrderService.removeSalesBindPurchase(orderBindIds));
}
}

@ -137,6 +137,39 @@ public class MesPurchaseOrder extends BaseEntity {
/**规格参数*/
private String specificationParameter;
/**物料规格*/
private String materialSpec;
/**销售订单主键*/
private Long saleOrderId;
/**采购销售订单绑定主键*/
private Long orderBindId;
public Long getSaleOrderId() {
return saleOrderId;
}
public void setSaleOrderId(Long saleOrderId) {
this.saleOrderId = saleOrderId;
}
public Long getOrderBindId() {
return orderBindId;
}
public void setOrderBindId(Long orderBindId) {
this.orderBindId = orderBindId;
}
public String getMaterialSpec() {
return materialSpec;
}
public void setMaterialSpec(String materialSpec) {
this.materialSpec = materialSpec;
}
public String getSpecificationParameter() {
return specificationParameter;
}

@ -87,4 +87,18 @@ public interface MesPurchaseOrderMapper
* @return
*/
public int deleteMesOrderBindByOrderBindIds(Long[] orderBindIds);
/**
*
* @param mesPurchaseOrder
* @return
*/
List<MesPurchaseOrder> unbindPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder);
/**
* List
* @param mesPurchaseOrder
* @return
*/
List<MesPurchaseOrder> saleBindPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder);
}

@ -76,4 +76,32 @@ public interface IMesPurchaseOrderService
*/
public MesPurchaseOrder selectCheckedPurchaseOrderByPurchaseOrderId(Long purchaseOrderId);
/**
*
* @param mesPurchaseOrder
* @return
*/
List<MesPurchaseOrder> unbindPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder);
/**
* List
* @param mesPurchaseOrder
* @return
*/
List<MesPurchaseOrder> saleBindPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder);
/**
*
* @param saleOrderId
* @param purchaseOrderIds
* @return
*/
public int saveSalesBindPurchase(Long saleOrderId, Long[] purchaseOrderIds);
/**
*
* @param orderBindIds
* @return
*/
public int removeSalesBindPurchase(Long[] orderBindIds);
}

@ -1,6 +1,7 @@
package com.hw.mes.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -12,8 +13,10 @@ import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.mes.api.domain.MesBaseMaterialInfo;
import com.hw.mes.domain.MesOrderBind;
import com.hw.mes.domain.MesSaleOrder;
import com.hw.mes.mapper.MesBaseBarcodeInfoMapper;
import com.hw.mes.mapper.MesBaseMaterialInfoMapper;
import com.hw.mes.mapper.MesSaleOrderMapper;
import com.hw.mes.service.IMesBaseMaterialInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -39,6 +42,9 @@ public class MesPurchaseOrderServiceImpl implements IMesPurchaseOrderService {
@Autowired
private MesBaseBarcodeInfoMapper mesBaseBarcodeInfoMapper;
@Autowired
private MesSaleOrderMapper mesSaleOrderMapper;
/**
*
*
@ -208,5 +214,83 @@ public class MesPurchaseOrderServiceImpl implements IMesPurchaseOrderService {
return mesPurchaseOrder;
}
/**
*
* @param mesPurchaseOrder
* @return
*/
@Override
public List<MesPurchaseOrder> unbindPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder) {
return mesPurchaseOrderMapper.unbindPurchaseOrderList(mesPurchaseOrder);
}
/**
* List
* @param mesPurchaseOrder
* @return
*/
@Override
public List<MesPurchaseOrder> saleBindPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder) {
return mesPurchaseOrderMapper.saleBindPurchaseOrderList(mesPurchaseOrder);
}
/**
*
* @param saleOrderId
* @param purchaseOrderIds
* @return
*/
@Override
public int saveSalesBindPurchase(Long saleOrderId, Long[] purchaseOrderIds) {
List<MesOrderBind> orderBindList = new ArrayList<>();
if (StringUtils.isNull(saleOrderId)){
return 0;
}
MesSaleOrder mesSaleOrder = mesSaleOrderMapper.selectMesSaleOrderBySaleOrderId(saleOrderId);
String saleorderCode = mesSaleOrder.getSaleorderCode();
Long productId = mesSaleOrder.getMaterialId();
String productCode = mesSaleOrder.getMaterialCode();
String productName = mesSaleOrder.getMaterialName();
Date currentDate = new Date();
String userName = SecurityUtils.getUsername();
for (Long purchaseOrderId : purchaseOrderIds) {
MesOrderBind orderBind = new MesOrderBind();
MesPurchaseOrder mesPurchaseOrder = mesPurchaseOrderMapper.selectMesPurchaseOrderByPurchaseOrderId(purchaseOrderId);
Long materialId = mesPurchaseOrder.getMaterialId();
String materialCode = mesPurchaseOrder.getMaterialCode();
String materialName = mesPurchaseOrder.getMaterialName();
String poNo = mesPurchaseOrder.getPoNo();
BigDecimal orderAmount = mesPurchaseOrder.getOrderAmount();
orderBind.setSafeFlag(MesConstants.MES_ORDER_BIND_SAFE_FLAG_NO);
orderBind.setSaleOrderId(saleOrderId);
orderBind.setSaleOrderCode(saleorderCode);
orderBind.setProductId(productId);
orderBind.setProductCode(productCode);
orderBind.setProductName(productName);
orderBind.setPurchaseOrderId(purchaseOrderId);
orderBind.setMaterialId(materialId);
orderBind.setMaterialCode(materialCode);
orderBind.setMaterialName(materialName);
orderBind.setBindAmount(orderAmount);
orderBind.setPoNo(poNo);
orderBind.setCreateTime(currentDate);
orderBind.setCreateBy(userName);
orderBindList.add(orderBind);
}
return mesPurchaseOrderMapper.batchMesOrderBind(orderBindList);
}
/**
*
* @param orderBindIds
* @return
*/
@Override
public int removeSalesBindPurchase(Long[] orderBindIds) {
return mesPurchaseOrderMapper.deleteMesOrderBindByOrderBindIds(orderBindIds);
}
}

@ -37,6 +37,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="specificationParameter" column="specification_parameter" />
<result property="materialSpec" column="material_spec" />
<result property="orderBindId" column="order_bind_id" />
</resultMap>
<resultMap id="MesPurchaseOrderMesOrderBindResult" type="MesPurchaseOrder" extends="MesPurchaseOrderResult">
@ -216,4 +218,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{orderBindId}
</foreach>
</delete>
<select id="unbindPurchaseOrderList" parameterType="MesPurchaseOrder" resultMap="MesPurchaseOrderResult">
select mpo.purchase_order_id,
mpo.erp_id,
mpo.fentry_id,
mpo.po_no,
mpo.document_status,
mpo.material_id,
mpo.material_code,
mpo.material_name,
mbmi.material_spec,
mpo.order_amount,
mpo.aux_prop_id,
mpo.specification_parameter
from mes_purchase_order mpo
left join mes_base_material_info mbmi on mbmi.material_id = mpo.material_id
<where>
not exists(select 1 from mes_order_bind o where o.purchase_order_id = mpo.purchase_order_id and o.sale_order_id = #{saleOrderId})
<if test="poNo != null and poNo != ''"> and mpo.po_no = #{poNo}</if>
<if test="materialCode != null and materialCode != ''"> and mpo.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and mpo.material_name like concat('%', #{materialName}, '%')</if>
</where>
</select>
<select id="saleBindPurchaseOrderList" parameterType="MesPurchaseOrder" resultMap="MesPurchaseOrderResult">
select mpo.purchase_order_id,
mpo.erp_id,
mpo.fentry_id,
mpo.po_no,
mpo.document_status,
mpo.material_id,
mpo.material_code,
mpo.material_name,
mbmi.material_spec,
mpo.specification_parameter,
mpo.order_amount,
mob.order_bind_id
from mes_order_bind mob
left join mes_purchase_order mpo on mpo.purchase_order_id = mob.purchase_order_id
left join mes_base_material_info mbmi on mbmi.material_id = mpo.material_id
<where>
<if test="saleOrderId != null "> and mob.sale_order_id = #{saleOrderId}</if>
<if test="poNo != null and poNo != ''"> and mpo.po_no = #{poNo}</if>
<if test="materialCode != null and materialCode != ''"> and mpo.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and mpo.material_name like concat('%', #{materialName}, '%')</if>
</where>
</select>
</mapper>

@ -74,3 +74,38 @@ export function getCheckedPurchaseOrder(purchaseOrderId) {
method: 'get'
})
}
// 获取销售订单未绑定采购订单List
export function unbindPurchaseOrderList(query) {
return request({
url: '/mes/purchaseOrder/unbindPurchaseOrderList',
method: 'get',
params: query
})
}
// 获取销售订单已绑定采购订单List
export function saleBindPurchaseOrderList(query) {
return request({
url: '/mes/purchaseOrder/saleBindPurchaseOrderList',
method: 'get',
params: query
})
}
// 保存销售订单绑定采购订单列表
export function saveSalesBindPurchase(data) {
return request({
url: '/mes/purchaseOrder/saveSalesBindPurchase',
method: 'put',
params: data
})
}
// 删除销售订单绑定采购订单
export function removeSalesBindPurchase(data) {
return request({
url: '/mes/purchaseOrder/removeSalesBindPurchase',
method: 'post',
params: data
})
}

@ -225,6 +225,20 @@ export const dynamicRoutes = [
}
]
},
{
path: '/saleOrder/bindingPurchase',
component: Layout,
hidden: true,
permissions: ['mes:saleOrder:edit'],
children: [
{
path: 'index/:saleOrderId(\\d+)',
component: () => import('@/views/mes/saleOrder/bindingPurchase'),
name: 'BindingPurchase',
meta: { title: '销售订单绑定', activeMenu: '/mes/plan/saleOrder' }
}
]
},
{
path: '/system/wfProcessActivityAuth',
component: Layout,

@ -0,0 +1,347 @@
<template>
<div class="app-container">
<h4 class="form-header h4">销售订单信息</h4>
<el-form ref="saleOrderForm" :model="saleOrderForm" label-width="100px">
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="销售订单编号" prop="saleorderCode">
<el-input v-model="saleOrderForm.saleorderCode" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="销售物料规格" prop="materialModel">
<el-input v-model="saleOrderForm.materialModel" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="销售物料编号" prop="materialCode">
<el-input v-model="saleOrderForm.materialCode" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="销售物料名称" prop="materialName">
<el-input v-model="saleOrderForm.materialName" disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row>
<el-col :span="12">
<h4 class="form-header h4">已选采购订单</h4>
<el-form :model="allocatePurchaseOrderQueryParams" ref="allocateMaterialQueryForm" size="small" :inline="true"
v-show="showSearch"
label-width="68px">
<el-form-item label="订单编号" prop="poNo">
<el-input
v-model="allocatePurchaseOrderQueryParams.poNo"
placeholder="请输入物料编码"
style="width:140px;"
clearable
@keyup.enter.native="handleAllocateMaterialQuery"
/>
</el-form-item>
<el-form-item label="物料编码" prop="materialCode">
<el-input
v-model="allocatePurchaseOrderQueryParams.materialCode"
placeholder="请输入物料编码"
style="width:140px;"
clearable
@keyup.enter.native="handleAllocateMaterialQuery"
/>
</el-form-item>
<el-form-item label="物料名称" prop="materialName">
<el-input
v-model="allocatePurchaseOrderQueryParams.materialName"
placeholder="请输入物料名称"
style="width:140px;"
clearable
@keyup.enter.native="handleAllocateMaterialQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleAllocateMaterialQuery">
</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetAllocateMaterialQuery"></el-button>
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
@click="handleUnallocateBarCodes"
v-hasPermi="['mes:productOrder:bind']"
>删除
</el-button>
</el-form-item>
</el-form>
<el-table v-loading="allocateLoading" :data="allocatePurchaseOrderList"
@selection-change="handleAllocateMaterialSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="订单编号" align="center" prop="poNo"/>
<el-table-column label="物料编码" align="center" prop="materialCode"/>
<el-table-column label="物料名称" align="center" prop="materialName"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"/>
<el-table-column label="规格参数" align="center" prop="specificationParameter" :show-overflow-tooltip="true"/>
<el-table-column label="数量" align="center" prop="orderAmount"/>
</el-table>
<pagination
v-show="allocatePurchaseOrderTotal>0"
:total="allocatePurchaseOrderTotal"
:page.sync="allocatePurchaseOrderQueryParams.pageNum"
:limit.sync="allocatePurchaseOrderQueryParams.pageSize"
@pagination="getAllocatePurchaseOrderList"
/>
</el-col>
<el-col :span="12" >
<h4 class="form-header h4">可选采购订单</h4>
<el-form :model="purchaseOrderQueryParams" ref="materialQueryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="订单编号" prop="poNo">
<el-input
v-model="allocatePurchaseOrderQueryParams.poNo"
placeholder="请输入物料编码"
style="width:140px;"
clearable
@keyup.enter.native="handleAllocateMaterialQuery"
/>
</el-form-item>
<el-form-item label="物料编码" prop="materialCode">
<el-input
v-model="purchaseOrderQueryParams.materialCode"
placeholder="请输入物料编码"
style="width:140px;"
clearable
@keyup.enter.native="handlePurchaseOrderQuery"
/>
</el-form-item>
<el-form-item label="物料名称" prop="materialName">
<el-input
v-model="purchaseOrderQueryParams.materialName"
placeholder="请输入物料名称"
style="width:140px;"
clearable
@keyup.enter.native="handlePurchaseOrderQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handlePurchaseOrderQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetMaterialQuery"></el-button>
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
:disabled="allocateBarCodeBtnDisable"
@click="submitForm"
v-hasPermi="['mes:productOrder:bind']"
>保存
</el-button>
</el-form-item>
</el-form>
<el-table v-loading="selectableLoading" :data="purchaseOrderList"
@selection-change="handleMaterialSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="订单编号" align="center" prop="poNo"/>
<el-table-column label="物料编码" align="center" prop="materialCode"/>
<el-table-column label="物料名称" align="center" prop="materialName"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"/>
<el-table-column label="规格参数" align="center" prop="specificationParameter" :show-overflow-tooltip="true"/>
<el-table-column label="数量" align="center" prop="orderAmount"/>
</el-table>
<pagination
v-show="purchaseOrderTotal>0"
:total="purchaseOrderTotal"
:page.sync="purchaseOrderQueryParams.pageNum"
:limit.sync="purchaseOrderQueryParams.pageSize"
@pagination="getUnbindPurchaseOrderList"
/>
</el-col>
</el-row>
</div>
</template>
<script>
import {
removeSalesBindPurchase,
saleBindPurchaseOrderList,
saveSalesBindPurchase,
unbindPurchaseOrderList
} from "@/api/mes/purchaseOrder";
export default {
name: "BindingPurchase",
data() {
return {
//
allocateLoading: true,
//
selectableLoading: true,
//
orderBindIds: [],
//
barcodeInfos: [],
//ID
purchaseOrderIds: [],
//
allocateMaterialSingle: true,
//
allocateMaterialMultiple: true,
//
materialSingle: true,
//
materialMultiple: true,
//
showSearch: true,
//
allocatePurchaseOrderTotal: 0,
//
purchaseOrderTotal: 0,
//
allocatePurchaseOrderList: [],
//
purchaseOrderList: [],
// List
allocatePoNos: [],
//
saleOrderForm: {},
allocateBarCodeBtnDisable: true,
//
allocatePurchaseOrderQueryParams: {
pageNum: 1,
pageSize: 10,
saleOrderId: null,
materialCode: null,
materialName: null,
poNo: null,
},
//
purchaseOrderQueryParams: {
pageNum: 1,
pageSize: 10,
saleOrderId: null,
materialCode: null,
materialName: null,
poNo: null
},
};
},
created() {
this.allocateBarCodeBtnDisable = false;
const saleOrderId = this.$route.params && this.$route.params.saleOrderId;
let saleorderCode = this.$route.query && this.$route.query.saleorderCode;
this.purchaseOrderQueryParams.saleOrderId = saleOrderId;
// this.purchaseOrderQueryParams.saleorderCode = saleorderCode;
this.allocatePurchaseOrderQueryParams.saleOrderId = saleOrderId;
// this.allocatePurchaseOrderQueryParams.saleorderCode = saleorderCode;
this.saleOrderForm.saleorderCode = saleorderCode;
this.saleOrderForm.saleOrderId = saleOrderId;
this.saleOrderForm.materialCode = this.$route.query && this.$route.query.materialCode;
this.saleOrderForm.materialName = this.$route.query && this.$route.query.materialName;
this.saleOrderForm.materialModel = this.$route.query && this.$route.query.materialModel;
this.getAllocatePurchaseOrderList();
this.getUnbindPurchaseOrderList();
},
methods: {
/** 查询已选采购订单信息列表 */
getAllocatePurchaseOrderList() {
this.allocateLoading = true;
saleBindPurchaseOrderList(this.allocatePurchaseOrderQueryParams).then(response => {
this.allocatePurchaseOrderList = response.rows;
this.allocatePurchaseOrderTotal = response.total;
this.allocateLoading = false;
});
},
/** 查询可选采购订单信息列表 */
getUnbindPurchaseOrderList() {
this.selectableLoading = true;
unbindPurchaseOrderList(this.purchaseOrderQueryParams).then(response => {
this.purchaseOrderList = response.rows;
this.purchaseOrderTotal = response.total;
this.selectableLoading = false;
});
},
/** 已选采购订单搜索按钮操作 */
handleAllocateMaterialQuery() {
this.allocatePurchaseOrderQueryParams.pageNum = 1;
this.getAllocatePurchaseOrderList();
},
/** 已选采购订单重置按钮操作 */
resetAllocateMaterialQuery() {
this.resetForm("allocateMaterialQueryForm");
this.handleAllocateMaterialQuery();
},
/** 已选采购订单多选框选中数据 */
handleAllocateMaterialSelectionChange(selection) {
this.orderBindIds = selection.map(item => item.orderBindId)
this.allocatePoNos = selection.map(item => item.poNo)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 可选采购订单搜索按钮操作 */
handlePurchaseOrderQuery() {
this.purchaseOrderQueryParams.pageNum = 1;
this.getUnbindPurchaseOrderList();
},
/** 可选采购订单重置按钮操作 */
resetMaterialQuery() {
this.resetForm("materialQueryForm");
this.handlePurchaseOrderQuery();
},
//
handleMaterialSelectionChange(selection) {
this.purchaseOrderIds = selection.map(item => item.purchaseOrderId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleUnallocateBarCodes() {
const orderBindIds = this.orderBindIds.join(",");
const allocatePoNos = this.allocatePoNos;
const params = {
orderBindIds: orderBindIds
}
this.$modal.confirm('是否确认删除采购订单编号为"' + allocatePoNos + '"的数据项?').then(function () {
return removeSalesBindPurchase(params);
}).then(() => {
this.getAllocatePurchaseOrderList();
this.getUnbindPurchaseOrderList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 提交按钮 */
submitForm() {
this.allocateBarCodeBtnDisable = true;
const saleOrderId = this.saleOrderForm.saleOrderId;
const purchaseOrderIds = this.purchaseOrderIds.join(",");
saveSalesBindPurchase({
saleOrderId: saleOrderId,
purchaseOrderIds: purchaseOrderIds
}).then((response) => {
this.$modal.msgSuccess("保存成功");
this.selectBarCodeAllocationWarehouse();
this.getAllocatePurchaseOrderList();
this.allocateBarCodeBtnDisable = false;
}).catch(() => {
this.getAllocatePurchaseOrderList();
this.getUnbindPurchaseOrderList();
this.allocateBarCodeBtnDisable = false;
});
},
}
};
</script>

@ -149,24 +149,31 @@
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[23].visible"/>
<!--el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['mes:saleOrder:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:saleOrder:remove']"
>删除</el-button>
@click="handleBindingPurchase(scope.row)"
v-hasPermi="['mes:purchaseOrder:bind']"
>绑定</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['mes:saleOrder:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['mes:saleOrder:remove']"-->
<!-- >删除</el-button>-->
</template>
</el-table-column-->
</el-table-column>
</el-table>
<pagination
@ -437,6 +444,7 @@ export default {
beginDate: null,
endDate: null,
completeDate: null,
materialModel: null,
isFlag: null,
remark: null,
createBy: null,
@ -462,6 +470,15 @@ export default {
this.single = selection.length!==1
this.multiple = !selection.length
},
handleBindingPurchase(row){
const saleOrderId = row.saleOrderId;
const saleorderCode = row.saleorderCode;
const materialCode = row.materialCode;
const materialName = row.materialName;
const materialModel = row.materialModel;
const params = {saleorderCode: saleorderCode, materialCode: materialCode, materialName: materialName, materialModel: materialModel};
this.$tab.openPage("销售订单绑定[" + saleorderCode + "]", '/saleOrder/bindingPurchase/index/' + saleOrderId, params);
},
/** 新增按钮操作 */
handleAdd() {
this.reset();

Loading…
Cancel
Save