MES:
物料信息增加类型、辅料标识、自动出库标识、低值易耗品标识;完成相关的修改和查询功能开发
物料条码:功能完善
master
xins 5 months ago
parent 5a68da2092
commit 9fa5a228f1

@ -128,6 +128,15 @@ public class MesBaseMaterialInfo extends BaseEntity
/**申请标识(1是0否),代表是否需要申请才能出库*/
private String applyFlag;
/**自动出库标识(1是0否)*/
private String autoOutstockFlag;
/**辅料标识(1是0否)*/
private String accessoriesFlag;
/**低值易耗品标识(1是0否),用来分摊各销售订单使用的物料数量*/
private String lowValueConsumableFlag;
/** erp最后更新日期;对应FModifyDate */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "erp最后更新日期;对应FModifyDate", width = 30, dateFormat = "yyyy-MM-dd")
@ -140,6 +149,7 @@ public class MesBaseMaterialInfo extends BaseEntity
private String selectType;//3是选择实际生产的物料信息需要过滤是到511仓库的物料
public Long getPurchasePriceUnitId() {
return purchasePriceUnitId;
}
@ -398,6 +408,30 @@ public class MesBaseMaterialInfo extends BaseEntity
this.applyFlag = applyFlag;
}
public String getAutoOutstockFlag() {
return autoOutstockFlag;
}
public void setAutoOutstockFlag(String autoOutstockFlag) {
this.autoOutstockFlag = autoOutstockFlag;
}
public String getAccessoriesFlag() {
return accessoriesFlag;
}
public void setAccessoriesFlag(String accessoriesFlag) {
this.accessoriesFlag = accessoriesFlag;
}
public String getLowValueConsumableFlag() {
return lowValueConsumableFlag;
}
public void setLowValueConsumableFlag(String lowValueConsumableFlag) {
this.lowValueConsumableFlag = lowValueConsumableFlag;
}
public void setErpModifyDate(Date erpModifyDate)
{
this.erpModifyDate = erpModifyDate;

@ -41,6 +41,7 @@ public class MesProductOrderController extends BaseController {
@Autowired
private IMesSaleOrderService mesSaleOrderService;
/**
*
*/

@ -186,6 +186,16 @@ public class MesSaleOrder extends BaseEntity {
private List<MesPurchaseOrder> mesPurchaseOrderList;
/**
*
*/
private String relateFlag;
/**
*
*/
private String selectFlag;
public String getMaterialModel() {
return materialModel;
}
@ -426,6 +436,22 @@ public class MesSaleOrder extends BaseEntity {
this.mesPurchaseOrderList = mesPurchaseOrderList;
}
public String getRelateFlag() {
return relateFlag;
}
public void setRelateFlag(String relateFlag) {
this.relateFlag = relateFlag;
}
public String getSelectFlag() {
return selectFlag;
}
public void setSelectFlag(String selectFlag) {
this.selectFlag = selectFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -130,7 +130,7 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
MesProductOrder dbProductOrder = mesProductOrderMapper.selectMesProductOrderByProductOrderId(mesProductOrder.getProductOrderId());
if (!dbProductOrder.getOrderStatus().equals(MesConstants.UN_PUBLISH)) {
String orderStatusPrompt = MesConstants.ORDER_STATUS_PROMPT_MAP.get(dbProductOrder.getOrderStatus());
throw new ServiceException(String.format("此生产任务已经%s,不能修改!", orderStatusPrompt));
throw new ServiceException(String.format("此生产任务状态为%s,不能修改!", orderStatusPrompt));
}
//如果修改了前置任务,则开始时间不能小于前置任务的结束时间

@ -280,7 +280,7 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService {
String orderStatus = mesProductOrder.getOrderStatus();
if (!orderStatus.equals(MesConstants.BEGIN) && !orderStatus.equals(MesConstants.PUBLISHED) && !orderStatus.equals(MesConstants.PAUSE)) {
String orderStatusPrompt = MesConstants.ORDER_STATUS_PROMPT_MAP.get(orderStatus);
throw new ServiceException(String.format("此生产任务已经%s,不能派工!", orderStatusPrompt));
throw new ServiceException(String.format("此生产任务状态为%s,不能派工!", orderStatusPrompt));
}
BigDecimal dispatchedAmount = mesProductOrder.getDispatchAmount() == null ? BigDecimal.ZERO : mesProductOrder.getDispatchAmount();
@ -351,7 +351,7 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService {
mesProductOrder.setDispatchAmount(updateDispatchAmount);
mesProductOrder.setUpdateTime(currentDate);
mesProductOrder.setUpdateBy(userName);
mesProductOrderService.updateMesProductOrder(mesProductOrder);
mesProductOrderMapper.updateMesProductOrder(mesProductOrder);
return 1;
}

@ -39,6 +39,9 @@
<result property="erpModifyDate" column="erp_modify_date"/>
<result property="safeStockAmount" column="safe_stock_amount"/>
<result property="applyFlag" column="apply_flag"/>
<result property="autoOutstockFlag" column="auto_outstock_flag"/>
<result property="accessoriesFlag" column="accessories_flag"/>
<result property="lowValueConsumableFlag" column="low_value_consumable_flag"/>
<result property="warehouseId" column="warehouse_id"/>
<result property="purchasePriceUnitId" column="purchase_price_unit_id"/>
</resultMap>
@ -71,6 +74,10 @@
bmi.active_flag,
bmi.deleted_flag,
bmi.apply_flag,
bmi.material_classfication,
bmi.auto_outstock_flag,
bmi.accessories_flag,
bmi.low_value_consumable_flag,
bmi.remark,
bmi.create_by,
bmi.create_time,
@ -117,6 +124,13 @@
<if test="deletedFlag != null and deletedFlag != ''">and bmi.deleted_flag = #{deletedFlag}</if>
<if test="approveDate != null ">and bmi.approve_date = #{approveDate}</if>
<if test="erpModifyDate != null ">and bmi.erp_modify_date = #{erpModifyDate}</if>
<if test="materialClassfication != null and materialClassfication != ''">and bmi.material_classfication = #{materialClassfication}</if>
<if test="autoOutstockFlag != null and autoOutstockFlag != ''">and bmi.auto_outstock_flag = #{autoOutstockFlag}</if>
<if test="accessoriesFlag != null and accessoriesFlag != ''">and bmi.accessories_flag = #{accessoriesFlag}</if>
<if test="lowValueConsumableFlag != null and lowValueConsumableFlag != ''">and bmi.low_value_consumable_flag = #{lowValueConsumableFlag}</if>
<if test="selectType != null and selectType !=''">and exists (select 1 from wms_warehouse_material wwm where wwm.storage_type='1' and wwm.warehouse_id=511 and wwm.storage_id=bmi.material_id)</if>
</where>
</select>
@ -229,6 +243,9 @@
<if test="erpModifyDate != null">erp_modify_date = #{erpModifyDate},</if>
<if test="alwaysFlag != null">always_flag = #{alwaysFlag},</if>
<if test="batchAmount != null">batch_amount = #{batchAmount},</if>
<if test="autoOutstockFlag != null">auto_outstock_flag = #{autoOutstockFlag},</if>
<if test="accessoriesFlag != null">accessories_flag = #{accessoriesFlag},</if>
<if test="lowValueConsumableFlag != null">low_value_consumable_flag = #{lowValueConsumableFlag},</if>
</trim>
where material_id = #{materialId}
</update>

@ -375,7 +375,7 @@
AND (plan_begin_time &lt;= #{params.planEndTime} AND plan_end_time &gt;= #{params.planBeginTime})
</if>
</where>
order by mpo.plan_begin_time,order_status
order by mpo.product_order_id desc
</select>

@ -266,6 +266,9 @@
'%')</if>
<if test="isRelease != null and isRelease != ''">and mso.is_release = #{isRelease}</if>
<if test="saleOrderClassfication != null and saleOrderClassfication != ''">and mso.sale_order_classfication = #{saleOrderClassfication}</if>
<if test="relateFlag != null and relateFlag != ''">and exists (select 1 from mes_sale_order_relate msor where mso.sale_order_id = msor.relate_sale_order_id)</if>
<if test="selectFlag != null and selectFlag != ''">and not exists (select 1 from mes_sale_order_relate msor where mso.sale_order_id = msor.relate_sale_order_id)</if>
</where>
order by mso.erp_modify_date desc
</select>

@ -660,7 +660,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="submitLoading" @click="submitRelateForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button @click="cancelRelate"> </el-button>
</div>
</el-dialog>
@ -1314,8 +1314,16 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
const barcodeId = row.barcodeId;
if (row.singleFlag === this.SINGLE_FLAG.MERGE) {
this.resetRelate();
getBarcode(barcodeId).then(response => {
this.materialRelateForm = response.data
this.materialRelateForm.barcodeAmount=1;
this.materialRelateOpen = true;
this.materialRelateTitle = "修改合并原材料条码信息";
});
} else {
if (row.purchaseOrderId === 0) {
this.resetNoPurchase();
@ -1325,14 +1333,8 @@ export default {
}
const barcodeId = row.barcodeId;
getBarcode(barcodeId).then(response => {
this.open = true;
this.title = "修改原材料条码信息";
});
},
/** 提交按钮 */
submitForm() {

@ -1,6 +1,17 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label="类型" prop="materialClassfication">
<el-select v-model="queryParams.materialClassfication" placeholder="请选择类型" clearable>
<el-option
v-for="dict in dict.type.mes_material_classfication"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="物料编码" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
@ -44,6 +55,36 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="自动出库标识" prop="autoOutstockFlag">
<el-select v-model="queryParams.autoOutstockFlag" placeholder="请选择自动出库标识" clearable>
<el-option
v-for="dict in dict.type.mes_material_auto_outstock_flag"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="辅料标识" prop="accessoriesFlag">
<el-select v-model="queryParams.accessoriesFlag" placeholder="请选择辅料标识" clearable>
<el-option
v-for="dict in dict.type.mes_material_accessories_flag"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="易耗品标识" prop="lowValueConsumableFlag">
<el-select v-model="queryParams.lowValueConsumableFlag" placeholder="请选择易耗品标识" clearable>
<el-option
v-for="dict in dict.type.mes_material_low_value_consumable_flag"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="批次标识" prop="batchFlag">
<el-select v-model="queryParams.batchFlag" placeholder="请选择批次标识" clearable>
<el-option
@ -120,6 +161,11 @@
<el-table v-loading="loading" :data="materialinfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="类型" align="center" prop="materialClassfication">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_material_classfication" :value="scope.row.materialClassfication"/>
</template>
</el-table-column>
<el-table-column label="物料编码" align="center" prop="materialCode"/>
<el-table-column label="物料名称" align="center" prop="materialName"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"/>
@ -135,6 +181,21 @@
<dict-tag :options="dict.type.mes_material_bind_flag" :value="scope.row.alwaysFlag"/>
</template>
</el-table-column>
<el-table-column label="自动出库标识" align="center" prop="autoOutstockFlag">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_material_auto_outstock_flag" :value="scope.row.autoOutstockFlag"/>
</template>
</el-table-column>
<el-table-column label="辅料标识" align="center" prop="accessoriesFlag">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_material_accessories_flag" :value="scope.row.accessoriesFlag"/>
</template>
</el-table-column>
<el-table-column label="易耗品标识" align="center" prop="lowValueConsumableFlag">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_material_low_value_consumable_flag" :value="scope.row.lowValueConsumableFlag"/>
</template>
</el-table-column>
<el-table-column label="批次标识" align="center" prop="batchFlag">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_material_batch_flag" :value="scope.row.batchFlag"/>
@ -179,7 +240,7 @@
/>
<!-- 添加或修改物料信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="物料编码" prop="materialCode">
@ -191,66 +252,141 @@
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请输入物料名称" :disabled="true"/>
</el-form-item>
<el-form-item label="物料大类" prop="materialCategories">
<el-radio-group v-model="form.materialCategories">
<el-radio
v-for="dict in dict.type.material_categories"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="物料小类" prop="materialSubclass">-->
<!-- <el-input v-model="form.materialSubclass" placeholder="请输入物料小类" />-->
<!-- </el-form-item>-->
<el-form-item label="物料类型" prop="materialTypeId">
<!-- <el-input v-model="form.materialTypeId" placeholder="请输入物料类型"/>-->
<treeselect v-model="form.materialTypeId" :options="baseMaterialTypeOptions" :normalizer="normalizer"
placeholder="请选择物料类型"/>
</el-form-item>
<el-form-item label="常备物料" prop="alwaysFlag">
<el-radio-group v-model="form.alwaysFlag">
<el-radio
v-for="dict in dict.type.active_flag"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
<el-form-item label="物料规格" prop="materialSpec">
<el-input type="textarea" v-model="form.materialSpec" placeholder="请输入物料名称" :disabled="true"/>
</el-form-item>
<el-form-item label="批次标识" prop="batchFlag">
<el-radio-group v-model="form.batchFlag">
<el-radio
v-for="dict in dict.type.active_flag"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="物料大类" prop="materialCategories">
<el-select v-model="queryParams.materialCategories" placeholder="请选择物料大类" clearable>
<el-option
v-for="dict in dict.type.material_categories"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料类型" prop="materialTypeId">
<!-- <el-input v-model="form.materialTypeId" placeholder="请输入物料类型"/>-->
<treeselect v-model="form.materialTypeId" :options="baseMaterialTypeOptions" :normalizer="normalizer"
placeholder="请选择物料类型"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="常备物料" placeholder="请选择常备物料标识" prop="alwaysFlag">
<el-radio-group v-model="form.alwaysFlag">
<el-radio
v-for="dict in dict.type.active_flag"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="自动出库" placeholder="请选择自动出库标识" prop="autoOutstockFlag">
<el-radio-group v-model="form.autoOutstockFlag">
<el-radio
v-for="dict in dict.type.mes_material_auto_outstock_flag"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item placeholder="请选择辅料标识" label="辅料标识" prop="accessoriesFlag">
<el-radio-group v-model="form.accessoriesFlag">
<el-radio
v-for="dict in dict.type.mes_material_accessories_flag"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item placeholder="请选择易耗品标识" label="易耗品标识" prop="lowValueConsumableFlag">
<el-radio-group v-model="form.lowValueConsumableFlag">
<el-radio
v-for="dict in dict.type.mes_material_low_value_consumable_flag"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="批次标识" prop="batchFlag">
<el-radio-group v-model="form.batchFlag">
<el-radio
v-for="dict in dict.type.active_flag"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="批次数量" prop="batchAmount" v-if="form.batchFlag==='1'">
<el-input-number v-model="form.batchAmount" placeholder="请输入批次数量" :min="1" :max="10000000000"
style="width:180px"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="安全库存数量" prop="safeStockAmount">
<el-input-number v-model="form.safeStockAmount" placeholder="请输入安全库存数量" :min="1" :max="10000000000"
style="width:180px"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态" prop="activeFlag">
<el-radio-group v-model="form.activeFlag" :disabled="form.activeFlag !== '1'">
<el-radio
v-for="dict in dict.type.mes_material_status"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="批次数量" prop="batchAmount" v-if="form.batchFlag==='1'">
<el-input-number v-model="form.batchAmount" placeholder="请输入批次数量" :min="1" :max="10000000000"
style="width:300px"/>
</el-form-item>
<el-form-item label="安全库存数量" prop="safeStockAmount">
<el-input-number v-model="form.safeStockAmount" placeholder="请输入安全库存数量" :min="1" :max="10000000000"
style="width:260px"/>
</el-form-item>
<el-form-item label="状态" prop="activeFlag">
<el-radio-group v-model="form.activeFlag" :disabled="form.activeFlag !== '1'">
<el-radio
v-for="dict in dict.type.mes_material_status"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="form.remark" placeholder="请输入备注"/>
@ -282,7 +418,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Materialinfo",
dicts: ['active_flag', 'material_categories', 'mes_material_bind_flag', 'mes_material_batch_flag', 'mes_material_status'],
dicts: ['active_flag', 'material_categories', 'mes_material_bind_flag', 'mes_material_batch_flag', 'mes_material_status','mes_material_low_value_consumable_flag','mes_material_classfication','mes_material_auto_outstock_flag','mes_material_accessories_flag'],
components: {
Treeselect
},
@ -333,7 +469,11 @@ export default {
activeFlag: null,
deletedFlag: null,
approveDate: null,
erpModifyDate: null
erpModifyDate: null,
materialClassfication:null,
autoOutstockFlag:null,
accessoriesFlag: null,
lowValueConsumableFlag: null
},
//
form: {},
@ -405,7 +545,10 @@ export default {
updateBy: null,
updateTime: null,
approveDate: null,
erpModifyDate: null
erpModifyDate: null,
lowValueConsumableFlag:null,
accessoriesFlag:null,
autoOutstockFlag:null
};
this.resetForm("form");
},

@ -1,6 +1,17 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="类型" prop="saleOrderClassfication">
<el-select v-model="queryParams.saleOrderClassfication" placeholder="请选择类型" clearable>
<el-option
v-for="dict in dict.type.mes_sale_order_classfication"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="销售订单编号" prop="saleorderCode">
<el-input
v-model="queryParams.saleorderCode"
@ -9,22 +20,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="所属工厂" prop="factoryId">-->
<!-- <el-input-->
<!-- v-model="queryParams.factoryId"-->
<!-- placeholder="请输入所属工厂"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="所属产线" prop="prodlineId">-->
<!-- <el-input-->
<!-- v-model="queryParams.prodlineId"-->
<!-- placeholder="请输入所属产线"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="物料编码" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
@ -42,6 +37,15 @@
/>
</el-form-item>
<el-form-item label="物料规格" prop="materialSpec">
<el-input
v-model="queryParams.materialSpec"
placeholder="请输入物料规格"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -102,7 +106,24 @@
<el-table-column label="主键标识" align="center" prop="saleOrderId" v-if="columns[0].visible"/>
<el-table-column label="ERP主键" align="center" prop="erpId" v-if="columns[1].visible"/>
<el-table-column label="ERP订单明细ID" align="center" prop="fentryId" v-if="columns[2].visible"/>
<el-table-column label="销售订单编号" align="center" prop="saleorderCode" width="100" v-if="columns[3].visible"/>
<el-table-column label="类型" align="center" prop="saleOrderClassfication">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_sale_order_classfication" :value="scope.row.saleOrderClassfication"/>
</template>
</el-table-column>
<el-table-column label="销售订单编号" align="center" prop="saleorderCode" v-if="columns[3].visible">
<template slot-scope="scope">
<el-button
type="text"
class="wrap-text-button"
@mouseover="hover = true"
@mouseleave="hover = false"
@click="getRelateList(scope.row)">
{{ scope.row.saleorderCode }}
</el-button>
</template>
</el-table-column>
<el-table-column label="单据状态" align="center" prop="documentStatus" v-if="columns[5].visible" >
<template slot-scope="scope">
<dict-tag :options="dict.type.document_status" :value="scope.row.documentStatus"/>
@ -111,9 +132,9 @@
<el-table-column label="所属工厂" align="center" prop="factoryId" v-if="columns[6].visible"/>
<el-table-column label="所属产线" align="center" prop="prodlineId" v-if="columns[7].visible"/>
<el-table-column label="物料ID" align="center" prop="materialId" v-if="columns[8].visible"/>
<el-table-column label="物料编码" align="center" prop="materialCode" width="100" v-if="columns[9].visible"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="100" v-if="columns[10].visible"/>
<el-table-column label="物料组" align="center" prop="matkl" v-if="columns[11].visible"/>
<el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[9].visible"/>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[10].visible"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"/>
<el-table-column label="订单数量" align="center" prop="orderAmount" v-if="columns[12].visible"/>
<el-table-column label="完成数量" align="center" prop="completeAmount" v-if="columns[13].visible"/>
<el-table-column label="已发布数量" align="center" prop="releaseQty" v-if="columns[14].visible"/>
@ -132,26 +153,11 @@
<span>{{ parseTime(scope.row.erpModifyDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="计划交货日期" align="center" prop="planDeliveryDate" width="180" v-if="columns[18].visible">
<el-table-column label="计划交货日期" align="center" prop="planDeliveryDate" v-if="columns[18].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planDeliveryDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="计划开始日期" align="center" prop="beginDate" width="180" v-if="columns[19].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="计划结束日期" align="center" prop="endDate" width="180" v-if="columns[20].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="完成日期" align="center" prop="completeDate" width="180" v-if="columns[21].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.completeDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[23].visible"/>
</el-table>
@ -163,6 +169,30 @@
@pagination="getList"
/>
<el-dialog :title="relateTitle" :visible.sync="relateOpen" append-to-body>
<el-table v-loading="relateLoading" :data="relateSaleOrderList">
<el-table-column label="销售订单编号" align="center" prop="saleorderCode"/>
<el-table-column label="物料ID" align="center" prop="materialId" v-if="false"/>
<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="orderAmount"/>
<el-table-column label="计划交货日期" align="center" prop="planDeliveryDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planDeliveryDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="relateTotal>0"
:total="relateTotal"
:page.sync="relateQueryParams.pageNum"
:limit.sync="relateQueryParams.pageSize"
@pagination="getRelateList"
/>
</el-dialog>
<!-- 添加或修改销售订单信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
@ -293,7 +323,7 @@ import {getSaleOrders} from "@/api/mes/productOrder"
export default {
name: "SaleOrder",
dicts: ['document_status', 'is_release', 'active_flag'],
dicts: ['document_status', 'is_release', 'active_flag','mes_sale_order_classfication'],
data() {
return {
//
@ -310,6 +340,17 @@ export default {
total: 0,
//
saleOrderList: [],
relateTotal:0,
//
relateSaleOrderList:[],
//
relateLoading: true,
//
relateTitle: "",
//
relateOpen: false,
//
title: "",
//
@ -341,6 +382,11 @@ export default {
completeDate: null,
isFlag: null,
},
relateQueryParams: {
pageNum: 1,
pageSize: 10,
},
//
form: {},
//
@ -388,6 +434,8 @@ export default {
/** 查询销售订单信息列表 */
getList() {
this.loading = true;
this.queryParams.selectFlag = "1";
this.queryParams.relateFlag = null;
getSaleOrders(this.queryParams).then(response => {
this.saleOrderList = response.rows;
this.total = response.total;
@ -504,7 +552,29 @@ export default {
this.download('mes/saleOrder/export', {
...this.queryParams
}, `saleOrder_${new Date().getTime()}.xlsx`)
}
},
/** 查询销售订单信息列表 */
getRelateList() {
this.relateOpen = true;
this.relateTitle = "关联销售订单信息";
this.relateLoading = true;
this.relateQueryParams.selectFlag = null;
this.relateQueryParams.relateFlag = "1";
getSaleOrders(this.relateQueryParams).then(response => {
this.relateSaleOrderList = response.rows;
this.relateTotal = response.total;
this.relateLoading = false;
});
},
}
};
</script>
<style lang="less" scoped>
.wrap-text-button {
white-space: normal; /* 允许文本换行 */
word-break: break-all; /* 当需要时,允许在单词内换行 */
/* 可以根据需要调整按钮的宽度或其他样式 */
}
</style>

@ -417,7 +417,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" :loading="submitLoading"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -507,7 +507,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" :loading="submitLoading"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -656,6 +656,7 @@ export default {
},
//
form: {},
submitLoading:false,
//
rules: {
orderCode: [
@ -1143,6 +1144,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.submitLoading = true;
//
if (this.form.saleOrderFlag === '1' && this.form.saleAmount < this.form.planAmount) {
return this.$modal.msgError("计划数量不能大于销售数量!");
@ -1153,6 +1155,8 @@ export default {
this.open = false;
this.noOrderOpen = false;
this.getList();
}).finally(e => {
this.submitLoading = false;
});
} else {
addProductOrder(this.form).then(response => {
@ -1160,6 +1164,8 @@ export default {
this.open = false;
this.noOrderOpen = false;
this.getList();
}).finally(e => {
this.submitLoading = false;
});
}
}

Loading…
Cancel
Save