Merge remote-tracking branch 'origin/main'

main
zk 2 weeks ago
commit abfbf54d8a

@ -38,7 +38,7 @@ public class CommonServices {
grantTypeMap.put("OrderNumber", params -> orderNumber(params)); // 订单编号
grantTypeMap.put("ProductionPlan", params -> productionPlan(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)); // 采购编号
Function<Map<String, Object>,String> result = grantTypeMap.get(type);

@ -66,7 +66,7 @@ public class SwaggerProvider {
String groupName = this.magicResourceService.getGroupName(info.getGroupId())
.replace("/", "-").replace("小程序端API-", "");
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);
if (!m.find()) continue;
SwaggerEntity.Path path = new SwaggerEntity.Path(info.getId());

@ -5,7 +5,7 @@
"groupId" : "06bb1cef20924ed8887b1c3ae8a91d3a",
"name" : "列表",
"createTime" : null,
"updateTime" : 1726815371252,
"updateTime" : 1729824397433,
"lock" : null,
"createBy" : null,
"updateBy" : null,
@ -46,7 +46,18 @@
"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 currentProcess = body.currentProcess;
String reportDate = body.reportDate;
var sql = """
@ -64,11 +75,16 @@ production_weight,
scrap_number,
scrap_reason,
frame_number,
is_completed
is_completed,
sales_order_code,
schedule_number
from mini_process_report
where 1 = 1
-- 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}, '%')}
?{currentProcess != null and currentProcess != '', and current_process = #{currentProcess}}
?{reportDate != null and reportDate != '', and date_format(report_date, '%Y-%m-%d') = #{reportDate}}
-- group by report_number
"""

@ -5,7 +5,7 @@
"groupId" : "a170047f79ab4cb1b892edc5cccd823e",
"name" : "新增",
"createTime" : null,
"updateTime" : 1729160792624,
"updateTime" : 1729825162357,
"lock" : null,
"createBy" : null,
"updateBy" : null,
@ -25,10 +25,10 @@
"expression" : 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" : [ {
"name" : "authorization",
"value" : null,
"value" : "5E34C0D7EA601026B93C26119C7E1AD50FF4301C7ED4F6D71B9389266C4D0154EA305F5647F993754318DA0ED39E8450",
"description" : "登录token",
"required" : false,
"dataType" : "String",

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

@ -1,60 +1,123 @@
<template>
<el-container style="position: relative;">
<el-container style="position: relative">
<el-header>
<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 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
v-model="search.reportNumber"
placeholder="报工单号"
clearable>
clearable
>
</el-input>
<dicselect v-model="search.currentProcess" :item="currentProcessItem">
</dicselect>
<el-date-picker
v-model="search.date"
v-model="search.reportDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="日期"
placeholder="报工日期"
style="width: 600px"
></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>
</el-header>
<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 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">
<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>
<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>
</el-table-column>
</scTable>
</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>
<save-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>
<save-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>
<script>
import saveDialog from './save'
import module from './module'
import config from "@/config"
import savePage from './savePage'
import infoDialog from './info'
import saveDialog from "./save";
import module from "./module";
import config from "@/config";
import savePage from "./savePage";
import infoDialog from "./info";
import dicselect from "@/components/scForm/items/dicselect";
export default {
components: {
saveDialog,
savePage,
infoDialog
infoDialog,
dicselect,
},
data() {
return {
@ -63,40 +126,41 @@ export default {
info: false,
product: false,
finish: false,
savePage: false
savePage: false,
},
loading: false,
file: "",
search: {
reportNumber: "",
date:""
date: "",
},
apiObj: this.$API[module.name][module.list],
selection: [],
config: module.config,
options: module.options,
column: module.column
column: module.column,
currentProcessItem: {
options: { group: "working", placeholder: "当前工序" },
}
};
},
mounted(){
},
mounted() {},
methods: {
//
importExcel() {
this.dialog.importExcel = true
this.dialog.importExcel = true;
this.$nextTick(() => {
this.$refs.importExcelDialog.open()
})
this.$refs.importExcelDialog.open();
});
},
//
handleReset() {
console.log('handleReset method called');
console.log("handleReset method called");
// 1.
this.search = {};
var search = {
email: ""
email: "",
}; // {}
// 2.
@ -107,75 +171,77 @@ export default {
},
//
add() {
this.dialog.save = true
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open('add', this.list)
})
this.$refs.saveDialog.open("add", this.list);
});
},
page_add() {
this.dialog.savePage = true
this.dialog.savePage = true;
this.$nextTick(() => {
this.$refs.savePage.open('add')
})
this.$refs.savePage.open("add");
});
},
//
finish(row) {
this.dialog.finish = true
this.dialog.finish = true;
this.$nextTick(() => {
this.$refs.finishDialog.open('add', this.list).setData(row)
})
this.$refs.finishDialog.open("add", this.list).setData(row);
});
},
//
table_edit(row) {
this.dialog.save = true
this.dialog.save = true;
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)
})
});
},
show_info(row) {
this.dialog.info = true
this.dialog.info = true;
this.$nextTick(() => {
this.$refs.infoDialog.open().setData(row)
})
this.$refs.infoDialog.open().setData(row);
});
},
//
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);
if (res.code == 0) {
// OR /
this.$refs.table.upData();
this.$message.success("删除成功");
} else {
this.$alert(res.message, "提示", {type: 'error'})
this.$alert(res.message, "提示", { type: "error" });
}
},
//
async batch_del() {
this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?`, '提示', {
type: 'warning'
}).then(async () => {
this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?`, "提示", {
type: "warning",
})
.then(async () => {
const loading = this.$loading();
console.log(this.selection)
console.log(this.selection);
var idArr = [];
this.selection.forEach(item => {
idArr.push(item[this.config.preId?this.config.preId:"id"])
})
this.selection.forEach((item) => {
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);
if (res.code == 0) {
// OR /
this.$refs.table.refresh();
this.$message.success("删除成功");
} else {
this.$alert(res.message, "提示", {type: 'error'})
this.$alert(res.message, "提示", { type: "error" });
}
loading.close();
}).catch(() => {
this.$message.success("操作失败")
})
.catch(() => {
this.$message.success("操作失败");
});
},
//
selectionChange(selection) {
@ -191,15 +257,15 @@ export default {
},
//
handleSuccess(data, mode) {
this.$refs.table.upData()
this.$refs.table.upData();
},
}
}
},
};
</script>
<style>
.upload {
color: #409EFF;
color: #409eff;
background: #ecf5ff;
min-height: 32px;
padding: 9px 15px;
@ -211,5 +277,4 @@ export default {
.sc-upload-uploader {
border: none !important;
}
</style>

Loading…
Cancel
Save