Merge remote-tracking branch 'origin/main'

main
zk 1 month ago
commit abfbf54d8a

@ -38,7 +38,7 @@ public class CommonServices {
grantTypeMap.put("OrderNumber", params -> orderNumber(params)); // 订单编号 grantTypeMap.put("OrderNumber", params -> orderNumber(params)); // 订单编号
grantTypeMap.put("ProductionPlan", params -> productionPlan(params)); // 生产计划 grantTypeMap.put("ProductionPlan", params -> productionPlan(params)); // 生产计划
grantTypeMap.put("ProductionSchedulingNumber", params -> productionSchedulingNumber(params)); // 排产编号 grantTypeMap.put("ProductionSchedulingNumber", params -> productionSchedulingNumber(params)); // 排产编号
grantTypeMap.put("ProductionOrderNumber", params -> productionOrderNumber(params)); // 排产单号 grantTypeMap.put("ProductionOrderNumber", params -> productionOrderNumber(params)); // 报工单号
grantTypeMap.put("PurchaseNumber", params -> purchaseNumber(params)); // 采购编号 grantTypeMap.put("PurchaseNumber", params -> purchaseNumber(params)); // 采购编号
Function<Map<String, Object>,String> result = grantTypeMap.get(type); Function<Map<String, Object>,String> result = grantTypeMap.get(type);

@ -66,7 +66,7 @@ public class SwaggerProvider {
String groupName = this.magicResourceService.getGroupName(info.getGroupId()) String groupName = this.magicResourceService.getGroupName(info.getGroupId())
.replace("/", "-").replace("小程序端API-", ""); .replace("/", "-").replace("小程序端API-", "");
String requestPath = PathUtils.replaceSlash(this.prefix + this.magicResourceService.getGroupPath(info.getGroupId()) + "/" + info.getPath()); String requestPath = PathUtils.replaceSlash(this.prefix + this.magicResourceService.getGroupPath(info.getGroupId()) + "/" + info.getPath());
Pattern p = Pattern.compile("^/api/(?!test).*"); Pattern p = Pattern.compile("^/web/(?!test).*");
Matcher m = p.matcher(requestPath); Matcher m = p.matcher(requestPath);
if (!m.find()) continue; if (!m.find()) continue;
SwaggerEntity.Path path = new SwaggerEntity.Path(info.getId()); SwaggerEntity.Path path = new SwaggerEntity.Path(info.getId());

@ -5,7 +5,7 @@
"groupId" : "06bb1cef20924ed8887b1c3ae8a91d3a", "groupId" : "06bb1cef20924ed8887b1c3ae8a91d3a",
"name" : "列表", "name" : "列表",
"createTime" : null, "createTime" : null,
"updateTime" : 1726815371252, "updateTime" : 1729824397433,
"lock" : null, "lock" : null,
"createBy" : null, "createBy" : null,
"updateBy" : null, "updateBy" : null,
@ -46,7 +46,18 @@
"responseBodyDefinition" : null "responseBodyDefinition" : null
} }
================================ ================================
// 销售订单编号,挤压编号,报工单号,型材型号,当前工序,报工日期
sales_order_code
schedule_number
report_number
current_process
report_date
String salesOrderCode = body.salesOrderCode;
String scheduleNumber = body.scheduleNumber;
String reportNumber = body.reportNumber; String reportNumber = body.reportNumber;
String currentProcess = body.currentProcess;
String reportDate = body.reportDate; String reportDate = body.reportDate;
var sql = """ var sql = """
@ -64,11 +75,16 @@ production_weight,
scrap_number, scrap_number,
scrap_reason, scrap_reason,
frame_number, frame_number,
is_completed is_completed,
sales_order_code,
schedule_number
from mini_process_report from mini_process_report
where 1 = 1 where 1 = 1
-- and next_process is null -- and next_process is null
?{salesOrderCode != null and salesOrderCode != '', and sales_order_code like concat('%', #{salesOrderCode}, '%')}
?{scheduleNumber != null and scheduleNumber != '', and schedule_number like concat('%', #{scheduleNumber}, '%')}
?{reportNumber != null and reportNumber != '', and report_number like concat('%', #{reportNumber}, '%')} ?{reportNumber != null and reportNumber != '', and report_number like concat('%', #{reportNumber}, '%')}
?{currentProcess != null and currentProcess != '', and current_process = #{currentProcess}}
?{reportDate != null and reportDate != '', and date_format(report_date, '%Y-%m-%d') = #{reportDate}} ?{reportDate != null and reportDate != '', and date_format(report_date, '%Y-%m-%d') = #{reportDate}}
-- group by report_number -- group by report_number
""" """

@ -5,7 +5,7 @@
"groupId" : "a170047f79ab4cb1b892edc5cccd823e", "groupId" : "a170047f79ab4cb1b892edc5cccd823e",
"name" : "新增", "name" : "新增",
"createTime" : null, "createTime" : null,
"updateTime" : 1729160792624, "updateTime" : 1729825162357,
"lock" : null, "lock" : null,
"createBy" : null, "createBy" : null,
"updateBy" : null, "updateBy" : null,
@ -25,10 +25,10 @@
"expression" : null, "expression" : null,
"children" : null "children" : null
} ], } ],
"requestBody" : "", "requestBody" : "{\r\n \"materials\": [\r\n {\r\n \"salesOrderCode\": \"20241020001C\",\r\n \"materialCode\": \"A03H-001\",\r\n \"materialName\": \"两头料已加图2\",\r\n \"profileModel\": \"A03H\",\r\n \"weight\": 0.499,\r\n \"specification\": \"47*29.5\",\r\n \"thickness\": 1,\r\n \"piecesBundle\": 140,\r\n \"materialCategory\": \"004\",\r\n \"defaultLength\": null,\r\n \"packagingMethod\": null,\r\n \"source\": \"source1\",\r\n \"unit\": \"支\",\r\n \"orderLength\": 1.97,\r\n \"orderTotalQuantity\": 100,\r\n \"surfaceMethod\": \"Y00007\",\r\n \"theoreticalWeightPerPiece\": 0.983,\r\n \"theoreticalWeight\": 0,\r\n \"packingQuantity\": null,\r\n \"deliveryDate\": \"2024-11-21 00:00:00\",\r\n \"customerMaterialCode\": null,\r\n \"producedPieces\": 0,\r\n \"producedLength\": 0,\r\n \"priceWithTax\": null,\r\n \"amountWithTax\": null,\r\n \"remark\": null,\r\n \"shipmentsedNumber\": 0,\r\n \"returnedNumber\": null,\r\n \"unitPrice\": 0,\r\n \"orderNo\": \"33012\",\r\n \"existingInventory\": 1,\r\n \"actualWeight\": 239,\r\n \"customerId\": null,\r\n \"warehouse\": null,\r\n \"customerName\": null,\r\n \"shipmentQuantity\": 1,\r\n \"pieces\": 140,\r\n \"undeliveredQuantity\": 100\r\n }\r\n ],\r\n \"orderInfo\": {\r\n \"documentNumber\": \"ces\",\r\n \"shipmentDate\": \"2024-10-25\",\r\n \"customerId\": \"C00002\",\r\n \"shipmentInspectionReport\": \"cs\",\r\n \"remarks\": \"测试\"\r\n }\r\n}",
"headers" : [ { "headers" : [ {
"name" : "authorization", "name" : "authorization",
"value" : null, "value" : "5E34C0D7EA601026B93C26119C7E1AD50FF4301C7ED4F6D71B9389266C4D0154EA305F5647F993754318DA0ED39E8450",
"description" : "登录token", "description" : "登录token",
"required" : false, "required" : false,
"dataType" : "String", "dataType" : "String",

@ -5,7 +5,7 @@
"groupId" : "447d969bf99243f188b84289aff1ba91", "groupId" : "447d969bf99243f188b84289aff1ba91",
"name" : "测试token", "name" : "测试token",
"createTime" : null, "createTime" : null,
"updateTime" : 1722826729086, "updateTime" : 1729650958697,
"lock" : null, "lock" : null,
"createBy" : null, "createBy" : null,
"updateBy" : null, "updateBy" : null,
@ -28,7 +28,7 @@
"requestBody" : "", "requestBody" : "",
"headers" : [ ], "headers" : [ ],
"paths" : [ ], "paths" : [ ],
"responseBody" : null, "responseBody" : "{\n \"code\": 0,\n \"data\": {\n \"token\": \"5E34C0D7EA601026B93C26119C7E1AD5BFD0EE445CC2CCC8BCF8F8565A8AF9D250A9A70E3579385B6FCD1148027C97D7\",\n \"userId\": \"1\"\n },\n \"message\": \"success\"\n}",
"description" : null, "description" : null,
"requestBodyDefinition" : null, "requestBodyDefinition" : null,
"responseBodyDefinition" : null "responseBodyDefinition" : null

@ -1,60 +1,123 @@
<template> <template>
<el-container style="position: relative;"> <el-container style="position: relative">
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="page_add"></el-button> <el-button
type="primary"
icon="el-icon-plus"
@click="page_add"
></el-button>
</div> </div>
<div class="right-panel-search"> <div class="right-panel-search">
<!-- 销售订单编号挤压编号报工单号型材型号当前工序报工日期 -->
<el-input
v-model="search.salesOrderCode"
placeholder="销售单号"
clearable
>
</el-input>
<el-input
v-model="search.scheduleNumber"
placeholder="挤压编号"
clearable
>
</el-input>
<el-input <el-input
v-model="search.reportNumber" v-model="search.reportNumber"
placeholder="报工单号" placeholder="报工单号"
clearable> clearable
>
</el-input> </el-input>
<dicselect v-model="search.currentProcess" :item="currentProcessItem">
</dicselect>
<el-date-picker <el-date-picker
v-model="search.date" v-model="search.reportDate"
type="date" type="date"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
placeholder="日期" placeholder="报工日期"
style="width: 600px" style="width: 600px"
></el-date-picker> ></el-date-picker>
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button> <el-button
type="primary"
icon="el-icon-search"
@click="upsearch"
></el-button>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" :column="column" :remoteFilter="config.remoteFilter" row-key="" @selection-change="selectionChange"> <scTable
ref="table"
:apiObj="apiObj"
:column="column"
:remoteFilter="config.remoteFilter"
row-key=""
@selection-change="selectionChange"
>
<!-- <el-table-column type="selection" width="50"></el-table-column> --> <!-- <el-table-column type="selection" width="50"></el-table-column> -->
<el-table-column label="操作" fixed="right" align="center" width="120" v-if="config.option"> <el-table-column
label="操作"
fixed="right"
align="center"
width="120"
v-if="config.option"
>
<template #default="scope"> <template #default="scope">
<el-button type="text" size="medium" @click="show_info(scope.row, scope.$index)" v-if="config.option.edit"></el-button> <el-button
<el-button type="text" size="medium" @click="table_edit(scope.row, scope.$index)" v-if="config.option.edit && scope.row.isCompleted != '1'"></el-button> type="text"
size="medium"
@click="show_info(scope.row, scope.$index)"
v-if="config.option.edit"
>查看</el-button
>
<el-button
type="text"
size="medium"
@click="table_edit(scope.row, scope.$index)"
v-if="config.option.edit && scope.row.isCompleted != '1'"
>完成</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
<save-page ref="savePage" v-if="dialog.savePage" @closed="dialog.savePage = false" @success="handleSuccess"></save-page> <save-page
ref="savePage"
v-if="dialog.savePage"
@closed="dialog.savePage = false"
@success="handleSuccess"
></save-page>
</el-container> </el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSuccess" @closed="dialog.save=false"></save-dialog> <save-dialog
<info-dialog v-if="dialog.info" ref="infoDialog" @closed="dialog.info=false"></info-dialog> v-if="dialog.save"
ref="saveDialog"
@success="handleSuccess"
@closed="dialog.save = false"
></save-dialog>
<info-dialog
v-if="dialog.info"
ref="infoDialog"
@closed="dialog.info = false"
></info-dialog>
</template> </template>
<script> <script>
import saveDialog from './save' import saveDialog from "./save";
import module from './module' import module from "./module";
import config from "@/config" import config from "@/config";
import savePage from './savePage' import savePage from "./savePage";
import infoDialog from './info' import infoDialog from "./info";
import dicselect from "@/components/scForm/items/dicselect";
export default { export default {
components: { components: {
saveDialog, saveDialog,
savePage, savePage,
infoDialog infoDialog,
dicselect,
}, },
data() { data() {
return { return {
@ -63,40 +126,41 @@ export default {
info: false, info: false,
product: false, product: false,
finish: false, finish: false,
savePage: false savePage: false,
}, },
loading:false, loading: false,
file:"", file: "",
search: { search: {
reportNumber:"", reportNumber: "",
date:"" date: "",
}, },
apiObj:this.$API[module.name][module.list], apiObj: this.$API[module.name][module.list],
selection: [], selection: [],
config: module.config, config: module.config,
options: module.options, options: module.options,
column: module.column column: module.column,
currentProcessItem: {
options: { group: "working", placeholder: "当前工序" },
} }
};
}, },
mounted(){ mounted() {},
},
methods: { methods: {
// //
importExcel(){ importExcel() {
this.dialog.importExcel = true this.dialog.importExcel = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.importExcelDialog.open() this.$refs.importExcelDialog.open();
}) });
}, },
// //
handleReset(){ handleReset() {
console.log('handleReset method called'); console.log("handleReset method called");
// 1. // 1.
this.search = {}; this.search = {};
var search = { var search = {
email: "" email: "",
}; // {} }; // {}
// 2. // 2.
@ -106,79 +170,81 @@ export default {
} }
}, },
// //
add(){ add() {
this.dialog.save = true this.dialog.save = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.saveDialog.open('add', this.list) this.$refs.saveDialog.open("add", this.list);
}) });
}, },
page_add() { page_add() {
this.dialog.savePage = true this.dialog.savePage = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.savePage.open('add') this.$refs.savePage.open("add");
}) });
}, },
// //
finish(row){ finish(row) {
this.dialog.finish = true this.dialog.finish = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.finishDialog.open('add', this.list).setData(row) this.$refs.finishDialog.open("add", this.list).setData(row);
}) });
}, },
// //
table_edit(row){ table_edit(row) {
this.dialog.save = true this.dialog.save = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.saveDialog.open('edit', this.list).setData(row) this.$refs.saveDialog.open("edit", this.list).setData(row);
// this.$refs.saveDialog.open('edit', this.list).setData(row) // this.$refs.saveDialog.open('edit', this.list).setData(row)
}) });
}, },
show_info(row){ show_info(row) {
this.dialog.info = true this.dialog.info = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.infoDialog.open().setData(row) this.$refs.infoDialog.open().setData(row);
}) });
}, },
// //
async table_del(row, index){ async table_del(row, index) {
var reqData = {id: row[this.config.preId?this.config.preId:"id"]} var reqData = { id: row[this.config.preId ? this.config.preId : "id"] };
var res = await this.$API[module.name][module.del].http(reqData); var res = await this.$API[module.name][module.del].http(reqData);
if(res.code == 0){ if (res.code == 0) {
// OR / // OR /
this.$refs.table.upData(); this.$refs.table.upData();
this.$message.success("删除成功"); this.$message.success("删除成功");
}else{ } else {
this.$alert(res.message, "提示", {type: 'error'}) this.$alert(res.message, "提示", { type: "error" });
} }
}, },
// //
async batch_del(){ async batch_del() {
this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?`, '提示', { this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?`, "提示", {
type: 'warning' type: "warning",
}).then(async () => { })
.then(async () => {
const loading = this.$loading(); const loading = this.$loading();
console.log(this.selection) console.log(this.selection);
var idArr = []; var idArr = [];
this.selection.forEach(item => { this.selection.forEach((item) => {
idArr.push(item[this.config.preId?this.config.preId:"id"]) idArr.push(item[this.config.preId ? this.config.preId : "id"]);
}) });
var reqData = {ids: idArr.join(",")} var reqData = { ids: idArr.join(",") };
var res = await this.$API[module.name][module.del].http(reqData); var res = await this.$API[module.name][module.del].http(reqData);
if(res.code == 0){ if (res.code == 0) {
// OR / // OR /
this.$refs.table.refresh(); this.$refs.table.refresh();
this.$message.success("删除成功"); this.$message.success("删除成功");
}else{ } else {
this.$alert(res.message, "提示", {type: 'error'}) this.$alert(res.message, "提示", { type: "error" });
} }
loading.close(); loading.close();
}).catch(() => {
this.$message.success("操作失败")
}) })
.catch(() => {
this.$message.success("操作失败");
});
}, },
// //
selectionChange(selection){ selectionChange(selection) {
this.selection = selection; this.selection = selection;
}, },
filterChange(obj) { filterChange(obj) {
@ -186,20 +252,20 @@ export default {
this.upsearch(); this.upsearch();
}, },
// //
upsearch(){ upsearch() {
this.$refs.table.upData(this.search); this.$refs.table.upData(this.search);
}, },
// //
handleSuccess(data, mode){ handleSuccess(data, mode) {
this.$refs.table.upData() this.$refs.table.upData();
}, },
} },
} };
</script> </script>
<style> <style>
.upload { .upload {
color: #409EFF; color: #409eff;
background: #ecf5ff; background: #ecf5ff;
min-height: 32px; min-height: 32px;
padding: 9px 15px; padding: 9px 15px;
@ -211,5 +277,4 @@ export default {
.sc-upload-uploader { .sc-upload-uploader {
border: none !important; border: none !important;
} }
</style> </style>

Loading…
Cancel
Save