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

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

@ -112,7 +112,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="销售订单号" align="center" prop="saleorderCode" > <el-table-column label="销售订单号" align="center" prop="saleorderCode" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@ -175,7 +175,7 @@
<el-dialog :title="relateTitle" :visible.sync="relateOpen" append-to-body> <el-dialog :title="relateTitle" :visible.sync="relateOpen" append-to-body>
<el-table v-loading="relateLoading" :data="relateSaleOrderList"> <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="物料ID" align="center" prop="materialId" v-if="false"/>
<el-table-column label="物料编码" align="center" prop="materialCode"/> <el-table-column label="物料编码" align="center" prop="materialCode"/>
<el-table-column label="物料名称" align="center" prop="materialName"/> <el-table-column label="物料名称" align="center" prop="materialName"/>
@ -206,7 +206,7 @@
<el-form-item label="ERP订单明细ID" prop="fentryId"> <el-form-item label="ERP订单明细ID" prop="fentryId">
<el-input v-model="form.fentryId" placeholder="请输入ERP订单明细ID" /> <el-input v-model="form.fentryId" placeholder="请输入ERP订单明细ID" />
</el-form-item> </el-form-item>
<el-form-item label="销售订单号" prop="saleorderCode"> <el-form-item label="销售订单号" prop="saleorderCode">
<el-input v-model="form.saleorderCode" placeholder="请输入销售订单编号" /> <el-input v-model="form.saleorderCode" placeholder="请输入销售订单编号" />
</el-form-item> </el-form-item>
<el-form-item label="销售订单行号" prop="saleorderLinenumber"> <el-form-item label="销售订单行号" prop="saleorderLinenumber">

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

@ -74,18 +74,6 @@
</el-form-item> </el-form-item>
</el-form> </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 v-loading="loading" :data="purchaseOrderList" @selection-change="handleSelectionChange">
<el-table-column label="采购订单ID" align="center" prop="purchaseOrderId"/> <el-table-column label="采购订单ID" align="center" prop="purchaseOrderId"/>

@ -193,20 +193,14 @@
v-hasPermi="['mes:saleOrder:bind']" v-hasPermi="['mes:saleOrder:bind']"
v-if="scope.row.saleOrderClassfication==='1'" v-if="scope.row.saleOrderClassfication==='1'"
>绑定</el-button> >绑定</el-button>
<!-- <el-button--> <el-button
<!-- size="mini"--> size="mini"
<!-- type="text"--> type="text"
<!-- icon="el-icon-edit"--> icon="el-icon-info"
<!-- @click="handleUpdate(scope.row)"--> @click="handleSaleOrderRelates(scope.row)"
<!-- v-hasPermi="['mes:saleOrder:edit']"--> v-hasPermi="['mes:saleOrder:list']"
<!-- >修改</el-button>--> v-if="scope.row.saleOrderClassfication==='2'"
<!-- <el-button--> >详情</el-button>
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['mes:saleOrder:remove']"-->
<!-- >删除</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -340,14 +334,34 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </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> </div>
</template> </template>
<script> <script>
import { listSaleOrder, getSaleOrder, delSaleOrder, addSaleOrder, updateSaleOrder } from "@/api/mes/saleOrder"; import { listSaleOrder, getSaleOrder, delSaleOrder, addSaleOrder, updateSaleOrder } from "@/api/mes/saleOrder";
import saleOrderRelates from "@/views/mes/saleOrder/saleOrderRelates.vue";
export default { export default {
name: "SaleOrder", 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'], dicts: ['document_status', 'is_release','mes_sale_order_is_release','mes_sale_order_classfication'],
data() { data() {
return { return {
@ -435,6 +449,8 @@ export default {
{ key: 26, label: `更新人`, visible: false }, { key: 26, label: `更新人`, visible: false },
{ key: 27, label: `更新时间`, visible: false }, { key: 27, label: `更新时间`, visible: false },
], ],
dialogVisible: false,
saleOrderRelatesData: {},
}; };
}, },
created() { created() {
@ -567,6 +583,14 @@ export default {
this.download('mes/saleOrder/export', { this.download('mes/saleOrder/export', {
...this.queryParams ...this.queryParams
}, `saleOrder_${new Date().getTime()}.xlsx`) }, `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