MES:
虚拟销售订单可以查看合并的销售订单信息
master
xs 3 months ago
parent 55b1f87ce7
commit a232c48df4

@ -325,9 +325,9 @@ public class MesImportImpl implements IMesImportService {
Long parentBomId = 0L;
String parentBomDesc = productMaterial.getMaterialName();
finishedProductNameList.add(productMaterial.getMaterialName());
if (productBomList.size() > 0) {
MesRaiseCapitalBom mesMaterialBom = productBomList.get(0);
throw new ServiceException(mesMaterialBom.getMaterialName() + "已存在!" + "任务编号:" + mesMaterialBom.getTaskCode());
// if (productBomList.size() > 0) {
// MesRaiseCapitalBom mesMaterialBom = productBomList.get(0);
// throw new ServiceException(mesMaterialBom.getMaterialName() + "已存在!" + "任务编号:" + mesMaterialBom.getTaskCode());
// parentBomId = mesMaterialBom.getRaiseCapitalId();
// MesRaiseCapitalBom materialBom = new MesRaiseCapitalBom();
// materialBom.setParentId(mesMaterialBom.getRaiseCapitalId());
@ -335,19 +335,19 @@ public class MesImportImpl implements IMesImportService {
// for (MesRaiseCapitalBom bom : mesMaterialBoms) {
// mesRaiseCapitalBomService.deleteMesRaiseCapitalBomByRaiseCapitalId(bom.getRaiseCapitalId());
// }
} else {
MesRaiseCapitalBom materialBom = new MesRaiseCapitalBom();
materialBom.setTaskCode(taskCode);
materialBom.setMaterialId(productMaterial.getMaterialId());
materialBom.setMaterialName(productMaterial.getMaterialName());
materialBom.setMaterialBomDesc(productMaterial.getMaterialName());
materialBom.setParentId(0L);
materialBom.setActiveFlag("1");
materialBom.setStandardAmount(new BigDecimal(1));
materialBom.setErpMaterialId(productMaterial.getErpId());
mesRaiseCapitalBomService.insertMesRaiseCapitalBom(materialBom);
parentBomId = materialBom.getRaiseCapitalId();
}
// } else {
MesRaiseCapitalBom parentMaterialBom = new MesRaiseCapitalBom();
parentMaterialBom.setTaskCode(taskCode);
parentMaterialBom.setMaterialId(productMaterial.getMaterialId());
parentMaterialBom.setMaterialName(productMaterial.getMaterialName());
parentMaterialBom.setMaterialBomDesc(productMaterial.getMaterialName());
parentMaterialBom.setParentId(0L);
parentMaterialBom.setActiveFlag("1");
parentMaterialBom.setStandardAmount(new BigDecimal(1));
parentMaterialBom.setErpMaterialId(productMaterial.getErpId());
mesRaiseCapitalBomService.insertMesRaiseCapitalBom(parentMaterialBom);
parentBomId = parentMaterialBom.getRaiseCapitalId();
// }
ArrayList<MesRaiseCapitalBom> bomList = new ArrayList<>();
while (true) {
@ -356,9 +356,20 @@ public class MesImportImpl implements IMesImportService {
}
Row rowC = sheet.getRow(i);
Cell numberCell = rowC.getCell(0);
if (StringUtils.isNull(numberCell) || numberCell.getCellType() != NUMERIC) {
if (StringUtils.isNull(numberCell)) {
break;
} else {
if (numberCell.getCellType() != NUMERIC && numberCell.getCellType() != STRING) {
break;
}
// if (numberCell.getCellType() == NUMERIC) {
// System.out.println("----nnu"+numberCell.getNumericCellValue());
// double numericCellValue = numberCell.getNumericCellValue();
// } else if (numberCell.getCellType() == STRING) {
// System.out.println("----sss"+numberCell.getStringCellValue());
// }
}
Cell materialCodeCell = rowC.getCell(1);
String materialCode = null;
if (materialCodeCell.getCellType() == NUMERIC) {

@ -112,7 +112,7 @@
</template>
</el-table-column>
<el-table-column label="销售订单号" align="center" prop="saleorderCode" >
<el-table-column label="销售订单号" align="center" prop="saleorderCode" >
<template slot-scope="scope">
<el-button
type="text"
@ -175,7 +175,7 @@
<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="销售订单号" 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"/>
@ -206,7 +206,7 @@
<el-form-item label="ERP订单明细ID" prop="fentryId">
<el-input v-model="form.fentryId" placeholder="请输入ERP订单明细ID" />
</el-form-item>
<el-form-item label="销售订单号" prop="saleorderCode">
<el-form-item label="销售订单号" prop="saleorderCode">
<el-input v-model="form.saleorderCode" placeholder="请输入销售订单编号" />
</el-form-item>
<el-form-item label="销售订单行号" prop="saleorderLinenumber">

@ -77,7 +77,7 @@
size="mini"
@click="handleImport"
v-hasPermi="['mes:purchaseApplyProcess:import']"
>提资单BOM导入
>提资单导入
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
@ -172,8 +172,8 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="purchaseAbnormalFlow(ANOMALY_FLAG.NO)">BOM</el-button>
<el-button type="warning" @click="purchaseAbnormalFlow(ANOMALY_FLAG.YES)"></el-button>
<el-button type="primary" :submitLading="submitLoading" @click="purchaseAbnormalFlow(ANOMALY_FLAG.NO)">BOM</el-button>
<el-button type="warning" :submitLading="submitLoading" @click="purchaseAbnormalFlow(ANOMALY_FLAG.YES)"></el-button>
</div>
</el-dialog>
@ -220,7 +220,7 @@
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button type="primary" :loading="submitLoading" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
@ -315,6 +315,7 @@ export default {
//
url: process.env.VUE_APP_BASE_API + "/mes/import/raiseCapitalImportData"
},
submitLoading:false,
//
title: "",
detailInfoTitle: "采购申请流程明细",
@ -437,6 +438,7 @@ export default {
handleImport() {
this.upload.title = "BOM导入";
this.upload.open = true;
this.submitLoading = false;
},
//
handleFileUploadProgress(event, file, fileList) {
@ -449,9 +451,11 @@ export default {
this.$refs.upload.clearFiles();
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", {dangerouslyUseHTMLString: true});
this.getList();
this.submitLoading = false;
},
//
submitFileForm() {
this.submitLoading = true;
this.$refs.upload.submit();
},
/** 提交按钮 */
@ -488,7 +492,16 @@ export default {
},
/** 申请流程-采购处理 */
purchaseAbnormalFlow(anomalyFlag){
this.submitLoading = true;
this.form.currentAnomalyFlag = anomalyFlag
if(anomalyFlag === this.ANOMALY_FLAG.YES){
if(!this.form.remark || this.form.remark===null ||this.form.remark===''){
this.$modal.msgWarning("请输入备注");
this.submitLoading = false;
return;
}
}
purchaseAbnormalFlowApi(this.form).then(response => {
if (anomalyFlag === this.ANOMALY_FLAG.YES){
this.$modal.msgSuccess("通知技术人员修改成功!");
@ -497,6 +510,8 @@ export default {
}
this.open = false;
this.getList();
}).finally(e =>{
this.submitLoading = false;
});
},
/** 申请流程-技术处理对话框 */
@ -513,6 +528,15 @@ export default {
/** 申请流程-技术处理 */
technicalProcessingFlow(anomalyFlag){
this.form.currentAnomalyFlag = anomalyFlag
this.submitLoading = true;
if(anomalyFlag === this.ANOMALY_FLAG.YES){
if(!this.form.remark || this.form.remark===null ||this.form.remark===''){
this.$modal.msgWarning("请输入备注");
this.submitLoading = false;
return;
}
}
technicalProcessingFlowApi(this.form).then(response => {
if (anomalyFlag === this.ANOMALY_FLAG.YES){
this.$modal.msgSuccess("通知ERP人员成功");
@ -521,6 +545,8 @@ export default {
}
this.technicalOpen = false;
this.getList();
}).finally(e =>{
this.submitLoading = false;
});
},
/** 申请流程-明细信息 */

@ -74,18 +74,6 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
>采购申请单导入
</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="purchaseOrderList" @selection-change="handleSelectionChange">
<el-table-column label="采购订单ID" align="center" prop="purchaseOrderId"/>

@ -193,20 +193,14 @@
v-hasPermi="['mes:saleOrder:bind']"
v-if="scope.row.saleOrderClassfication==='1'"
>绑定</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>-->
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="handleSaleOrderRelates(scope.row)"
v-hasPermi="['mes:saleOrder:list']"
v-if="scope.row.saleOrderClassfication==='2'"
>详情</el-button>
</template>
</el-table-column>
</el-table>
@ -340,14 +334,34 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 关联销售订单信息对话框 -->
<el-dialog title="关联合并的销售订单信息" :visible.sync="dialogVisible" append-to-body>
<sale-order-relates ref="saleOrderRelatesRef" :defineData="saleOrderRelatesData"
v-if="dialogVisible"></sale-order-relates>
</el-dialog>
</div>
</template>
<script>
import { listSaleOrder, getSaleOrder, delSaleOrder, addSaleOrder, updateSaleOrder } from "@/api/mes/saleOrder";
import saleOrderRelates from "@/views/mes/saleOrder/saleOrderRelates.vue";
export default {
name: "SaleOrder",
components: {
'sale-order-relates': saleOrderRelates,
},
provide() {
return {
closeDialog: this.closeDialog,
}
},
dicts: ['document_status', 'is_release','mes_sale_order_is_release','mes_sale_order_classfication'],
data() {
return {
@ -435,6 +449,8 @@ export default {
{ key: 26, label: `更新人`, visible: false },
{ key: 27, label: `更新时间`, visible: false },
],
dialogVisible: false,
saleOrderRelatesData: {},
};
},
created() {
@ -567,6 +583,14 @@ export default {
this.download('mes/saleOrder/export', {
...this.queryParams
}, `saleOrder_${new Date().getTime()}.xlsx`)
},
handleSaleOrderRelates(row){
this.saleOrderRelatesData = {
saleOrderId: row.saleOrderId,
}
this.dialogVisible = true
}
}
};

@ -0,0 +1,83 @@
<template>
<div class="app-container">
<el-table v-loading="loading" :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="total>0"
:total="total"
:page.sync="relateQueryParams.pageNum"
:limit.sync="relateQueryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listSaleOrder } from "@/api/mes/saleOrder";
export default {
name: "SaleOrderRelates",
props: {
defineData: {
type: Object,
default: {}
}
},
inject: ['closeDialog'],
data() {
return {
//
loading: true,
//
total: 0,
relateSaleOrderList:[],
//
relateQueryParams: {
pageNum: 1,
pageSize: 10,
},
};
},
created() {
this.getData();
},
methods: {
getData() {
if (this.defineData.saleOrderId) {
this.getList();
}
},
/** 查询销售订单信息列表 */
getList() {
this.loading = true;
this.relateQueryParams.selectFlag = null;
this.relateQueryParams.relateFlag = "1";
this.relateQueryParams.virtualSaleOrderId = this.defineData.saleOrderId;
listSaleOrder(this.relateQueryParams).then(response => {
this.relateSaleOrderList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
}
};
</script>
Loading…
Cancel
Save