This commit is contained in:
caoqianming 2025-04-02 10:23:18 +08:00
commit b4915a8811
16 changed files with 383 additions and 48 deletions

24
changelog.md Normal file
View File

@ -0,0 +1,24 @@
## 2.6.2025040209
- feat: 新增功能
- 自动版本生成 [shijing]
- 车间领料库存必传id [caoqianming]
- 增加测点趋势图 [zty]
- enm/mpoint 计算中心增加测点趋势图 [zty]
- fix: 问题修复
- 根据路由判断显示领料qingxi入库chenpjiance [shijing]
- pad扫码组件接收按钮显示文案 [shijing]
- 光芯交接、日志、出入库时的扫码 [shijing]
- 光芯日志pad添加扫码功能 [shijing]
- 添加任务时选择产品 [shijing]
- 定义全局组件scDegra [shijing]
- 流程图组件抽取;成品库、工艺路线、工艺路线详情、工艺路线编辑时展示流程图 [shijing]
- 成品、车间物料和工艺路线添加deg图 [shijing]
- 工艺路线可修改 [shijing]
- mlogs已提交和未提交区分显示 [shijing]
- 其他入库时展示编号 [shijing]
- 玻纤子工序填写日志操作记录mloguser [shijing]
- 工序添加父级 [shijing]
- mlog结构日志中添加操作项并在列表里展示操作项及内容[shijing]
- 光芯放开车间库存检验 [shijing]
- 任务和出入库编号放开非必填 [shijing]

View File

@ -104,6 +104,31 @@ export default {
let mySvgWdith =document.getElementsByClassName("output")[0].getBoundingClientRect().width+150 ;
document.getElementById('mySvg').setAttribute("height", mySvgHeight);
document.getElementById('mySvg').setAttribute("width", mySvgWdith);
svg.selectAll("g.node").on("click", function(event, d) {
//
const node = d3.select(this);
const currentColor = node.select("rect").style("fill");
//
if (currentColor === "rgb(255, 255, 255)") { //
// svg.selectAll("g.node").forEach(item=>{
// item.select("rect").style("fill", "#fff");
// // d3.select(item).select("rect").style("fill", "#fff"); //
// });
node.select("rect").style("fill", "#f00"); //
} else {
node.select("rect").style("fill", "#fff"); //
}
//
onNodeClick(d);
});
//
function onNodeClick(nodeData) {
console.log("Node clicked:", nodeData);
this.$emit("nodeClick", nodeData);
//
}
}
})
},

View File

@ -1,12 +1,18 @@
<template>
<div>
<el-button type="primary" @click="scanCode" style="margin-left: 10px">扫码</el-button>
<el-button type="primary" @click="scanCode" style="margin-left:4px">{{labeltext}}</el-button>
</div>
</template>
<script>
export default {
props: {
labeltext: {
type: String,
default: "扫码",
}
},
data() {
return {
scannedResult: null, //

View File

@ -6,7 +6,7 @@ const DEFAULT_CONFIG = {
DASHBOARD_URL: "/dashboard",
//版本号
APP_VER: "2.0.12",
APP_VER: "2.6.2025040209",
//内核版本号
CORE_VER: "1.6.9",

View File

@ -62,6 +62,7 @@
<el-button type="default" @click="faceLogin">刷脸登录</el-button>
</div> -->
<!-- <div class="copyright">Copyright © 2024 {{ baseConfig.base_right }}</div> -->
<div class="version">VERSION @ {{ config_index.APP_VER }}</div>
</div>
</div>
</div>
@ -94,6 +95,7 @@
</template>
<script>
import config_index from "@/config"
import { Monitor } from '@element-plus/icons-vue'
import passwordForm from './components/passwordForm'
import phoneForm from './components/phoneForm'
@ -107,6 +109,7 @@ export default {
},
data() {
return {
config_index,
config: {
lang: this.$TOOL.data.get('APP_LANG') || this.$CONFIG.LANG,
dark: this.$TOOL.data.get('APP_DARK') || false
@ -401,6 +404,13 @@ export default {
top: 20px;
right: 20px;
}
.version {
position: absolute;
bottom: 30px;
left: 30px;
font-size: 16px;
color: #fff;
}
.copyright {
position: absolute;
bottom: 30px;

View File

@ -62,6 +62,11 @@
</el-table-column>
<el-table-column label="输出" prop="material_out_name">
</el-table-column>
<el-table-column label="追踪方式">
<template #default="scope">
<span>{{ tracking_[scope.row.material_out_tracking] }}</span>
</template>
</el-table-column>
<el-table-column label="出材率" prop="out_rate">
</el-table-column>
<el-table-column label="切分融合数量" prop="div_number">
@ -94,6 +99,10 @@ export default {
40: "进行中",
50: "已完成",
},
tracking_:{
10:"批次",
20:"单个",
},
form: {},
nodes:[],
edges:[],

View File

@ -23,7 +23,6 @@
style="width: 300px;margin-left: 10px;"
></el-input>
<scScanner @scanResult="formWminChange"></scScanner>
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
</el-form-item>
<el-form-item label="总计:">
{{ totalCount }}

View File

@ -2,10 +2,10 @@
<el-container>
<el-header>
<div class="left-panel">
<el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'" v-if="mgroupName=='清洗'">领料</el-button>
<el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'" v-if="route_code=='qingxi'">领料</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="table_add(40)">报废</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="batchConcat()">合批</el-button>
<el-button type="primary" @click="tomio('do_in')" v-auth="'mio.do'" v-if="mgroupName=='检测'">入库</el-button>
<el-button type="primary" @click="tomio('do_in')" v-auth="'mio.do'" v-if="route_code=='chenpjiance'">入库</el-button>
</div>
<div class="right-panel">
<el-select
@ -101,6 +101,10 @@
<el-link v-else :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link>
</template>
</el-table-column>
<el-table-column
label="备注"
prop="note"
></el-table-column>
<el-table-column
label="生产中"
prop="count_working"
@ -308,6 +312,7 @@ export default {
page:0,
wm: ""
},
route_code:"",
showBatch: "",
wmMaterial:'',
cate_type:'',
@ -326,6 +331,9 @@ export default {
};
},
mounted() {
let paths = this.$route.path;
let arr = paths.split("/");
this.route_code = arr[2];
this.getMgroupInfo();
},
methods: {

View File

@ -51,9 +51,9 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="物料扫码">
<el-form-item label="物料扫码" style="display: flex;">
<scScanner @scanResult="formWminChange"></scScanner>
<el-input ref="codeInput" v-model="wm_in" clearable @change="formWminChange(wm_in)"></el-input>
<el-input ref="codeInput" v-model="wm_in" clearable @change="formWminChange(wm_in)" style="width: 200px;margin-left: 4px;"></el-input>
</el-form-item>
<el-form-item label="使用数量" prop="count_use">
<el-input-number ref="codeInput" v-model="form.count_use" :min="0" clearable></el-input-number>

View File

@ -15,16 +15,23 @@
v-auth="'handover.create'"
v-if="mgroupName!=='切片'"
>返工</el-button>
<el-button
type="primary"
@click="printSetting"
>打印机</el-button>
<scScanner :labeltext="'交接扫码'" @scanResult="codeTextChange10"></scScanner>
<scScanner :labeltext="'返工扫码'" @scanResult="codeTextChange20"></scScanner>
<el-input
ref="codeInput"
v-model="codeText"
clearable
style="width: 150px;margin: 0 4px;"
placeholder="正常交接"
@keyup.enter="codeTextChange(10)"
@keyup.enter="codeTextChange10(codeText)"
></el-input>
<el-input
ref="codeInput"
v-model="codeText2"
clearable
placeholder="返工交接"
style="width: 150px;"
@keyup.enter="codeTextChange20(codeText2)"
></el-input>
</div>
<div class="right-panel">
@ -215,7 +222,7 @@
@closed="dialog.save = false"
>
</save-dialog>
<el-dialog title="打印机设置" v-model="setNameVisible" width="600px">
<!-- <el-dialog title="打印机设置" v-model="setNameVisible" width="600px">
<el-form label-width="100px">
<el-form-item label="打印机名称">
<el-input v-model="printer_name"></el-input>
@ -224,7 +231,7 @@
<el-footer>
<el-button type="primary" @click="savePrinter">保存</el-button>
</el-footer>
</el-dialog>
</el-dialog> -->
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="handoverItem" :tableData="handoverItem.handoverb" :type="'handover'" @closePrint="printVisible=false"/>
</el-dialog>
@ -291,9 +298,10 @@ export default {
mtask: "",
mlogId: "",
codeText:"",
codeText2:"",
printer_name: "",
printVisible:false,
setNameVisible: false,
// setNameVisible: false,
};
},
mounted() {
@ -305,9 +313,7 @@ export default {
that.$refs.table.refresh();
},
methods: {
printSetting(){
this.setNameVisible = true;
},
//
table_add(type) {
this.dialog.save = true;
@ -316,20 +322,22 @@ export default {
this.$refs.saveDialog.open("add",'',10);
});
},
codeTextChange(type){
codeTextChange10(codeText){
let that = this;
this.dialog.save = true;
this.type = type;
this.$nextTick(() => {
this.$refs.saveDialog.open("add",that.codeText,10);
that.type = 10;
that.codeText = codeText;
that.dialog.save = true;
that.$nextTick(() => {
that.$refs.saveDialog.open("add",codeText,10);
});
},
codeTextChange2(type){
codeTextChange20(codeText2){
let that = this;
this.type = 20;
that.codeText2 = codeText2;
this.dialog.save = true;
this.type = type;
this.$nextTick(() => {
this.$refs.saveDialog.open("add",that.codeText);
this.$refs.saveDialog.open("add",codeText2,20);
});
},
//
@ -405,12 +413,12 @@ export default {
that.handoverItem = row;
that.printVisible = true;
},
savePrinter() {
let that = this;
localStorage.setItem("printer_name", that.printer_name);
that.setNameVisible = false;
that.$message.success("打印机设置成功,请重新进行打印操作。");
},
// savePrinter() {
// let that = this;
// localStorage.setItem("printer_name", that.printer_name);
// that.setNameVisible = false;
// that.$message.success("");
// },
//
//
handleSaveSuccess(data, mode) {

View File

@ -16,7 +16,17 @@
<el-row>
<el-form-item label="交接物料">
<el-button type="primary" @click="addMaterial" v-if="mode!=='show'">手动添加</el-button>
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
<scScanner @scanResult="codeTextChange(10)"></scScanner>
</el-form-item>
<el-form-item label-width="0">
<el-input
ref="codeInput"
v-model="codeText"
clearable
placeholder="物料批次"
style="width: 200px;margin-left: 4px;"
@keyup.enter="codeTextChange(codeText)"
></el-input>
</el-form-item>
<el-form-item label="总计:">
{{ totalCount }}
@ -284,6 +294,7 @@ export default {
listParams:{},
totalCount: 0,
deptID:'',
codeText: "",
userList: [],
userList2: [],
mgroupOptions: [],
@ -580,21 +591,29 @@ export default {
let that = this;
that.scanVisible = true;
},
scanClose(data){
codeTextChange(data){
if(data==''||data==undefined||data==null){
return;
}
let that = this;
data = data.replace(' ','');
let id = data.split('#')[1];
console.log('id',id);
this.$API.cm.labelmat.item.req(id).then((res) => {
console.log('res',res);
let arr = that.form.handoverb.filter((item) => {
return item.batch == res.batch;
})
console.log('arr',arr);
if(arr.length>0){
that.$message.error("该批次已存在")
}else{
console.log('that.materialOptions',that.materialOptions);
that.materialOptions.forEach((item) => {
console.log('item',item);
console.log('item.batch',item.batch);
console.log('res.batch',res.batch);
console.log('item.batch == res.batch',item.batch == res.batch);
if(item.batch == res.batch){
let obj = {};
obj.wm = item.id;

View File

@ -6,6 +6,8 @@
<el-button type="primary" v-auth="'handover.create'" @click="table_add(20)">返修</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="table_add(40)">报废</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="batchConcat()">合批</el-button>
<scScanner :labeltext="'返修扫码'" @scanResult="codeTextChange20"></scScanner>
<scScanner :labeltext="'报废扫码'" @scanResult="codeTextChange40"></scScanner>
</div>
<div class="right-panel">
<el-select
@ -269,6 +271,8 @@ export default {
search: "",
material: "",
},
codeText2: "",
codeText4: "",
cate_type:'',
materialType: "wm",
changebatch:false,
@ -381,6 +385,24 @@ export default {
this.$refs.scrapDialog.open("add",handoverb,10);
});
},
codeTextChange20(codeText2){
let that = this;
that.type = 20;
that.codeText2 = codeText2;
that.dialog.scrap = true;
that.$nextTick(() => {
that.$refs.scrapDialog.open("add",codeText2,10);
});
},
codeTextChange40(codeText4){
let that = this;
that.type = 40;
that.codeText4 = codeText4;
that.dialog.scrap = true;
that.$nextTick(() => {
that.$refs.scrapDialog.open("add",codeText4,10);
});
},
handleScrapSuccess(){
this.dialog.scrap = false;
this.$refs.table.refresh();

View File

@ -6,6 +6,8 @@
<el-button type="primary" v-auth="'handover.create'" @click="table_add(20)">返修</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="table_add(40)">报废</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="batchConcat()">合批</el-button>
<scScanner :labeltext="'返修扫码'" @scanResult="codeTextChange20"></scScanner>
<scScanner :labeltext="'报废扫码'" @scanResult="codeTextChange40"></scScanner>
</div>
<div class="right-panel">
<el-select
@ -362,6 +364,24 @@ export default {
this.$refs.scrapDialog.open("add",handoverb,10);
});
},
codeTextChange20(codeText2){
let that = this;
that.type = 20;
that.codeText2 = codeText2;
that.dialog.scrap = true;
that.$nextTick(() => {
that.$refs.scrapDialog.open("add",codeText2,10);
});
},
codeTextChange40(codeText4){
let that = this;
that.type = 40;
that.codeText4 = codeText4;
that.dialog.scrap = true;
that.$nextTick(() => {
that.$refs.scrapDialog.open("add",codeText4,10);
});
},
batchConcat(){
this.changebatch = true;
let handoverb = [];

View File

@ -135,6 +135,15 @@
icon="el-icon-plus"
@click="table_add"
></el-button>
<scScanner @scanResult="codeTextChange"></scScanner>
<el-input
ref="codeInput"
v-model="codeText"
clearable
placeholder="物料扫码"
style="width:150px;margin-left: 4px;"
@keyup.enter="codeTextChange(codeText)"
></el-input>
</div>
</el-header>
<el-main>
@ -339,6 +348,7 @@ export default {
name: [{ required: true, message: "请输入" }],
},
mioId:null,
codeText:"",
routepack: "",
tableData:[],
userOption: [],//
@ -471,6 +481,13 @@ export default {
}
},
codeTextChange(codeText){
this.codeText = codeText;
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add",codeText);
});
},
table_add() {
this.dialog.save = true;
this.$nextTick(() => {

View File

@ -42,7 +42,7 @@
</el-form-item>
<el-form-item label="物料批次" v-else>
<el-select
v-model="form.batch"
v-model="selectBatch"
filterable
value-key="id"
@change="selectwmChange"
@ -51,7 +51,7 @@
v-for="item in wbatchOptions"
:key="item.id"
:label="item.batch"
:value="item"
:value="item.id"
>
<span style="display:inline-block;float: left;">{{item.material_.name}}|{{ item.batch }}</span>
<span
@ -64,7 +64,16 @@
>
</el-option>
</el-select>
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
<scScanner @scanResult="codeTextChange"></scScanner>
<el-input
ref="codeInput"
v-model="codeText"
clearable
placeholder="物料扫码"
style="width:150px;margin-left: 4px;"
@keyup.enter="codeTextChange(codeText)"
></el-input>
<!-- <scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog> -->
</el-form-item>
<el-form-item label="批次" v-if="cate == 'do_out'">
<el-select
@ -78,7 +87,7 @@
v-for="item in batchOptions"
:key="item.id"
:label="item.batch"
:value="item"
:value="item.id"
>
<span style="float: left">{{ item.batch }}</span>
<span
@ -91,9 +100,18 @@
>
</el-option>
</el-select>
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
<scScanner @scanResult="codeTextChange"></scScanner>
<el-input
ref="codeInput"
v-model="codeText"
clearable
placeholder="物料扫码"
style="width:150px;margin-left: 4px;"
@keyup.enter="codeTextChange(codeText)"
></el-input>
<!-- <scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog> -->
</el-form-item>
<el-form-item label="仓库">
<el-form-item label="仓库" prop="warehouse">
<el-select
v-model="form.warehouse"
clearable
@ -148,8 +166,10 @@ export default {
},
form: {},
rules: {
material: [{required: true,message: "请选择物料",trigger: "blur",},],
material: [{required: true,message: "请选择物料",trigger: "blur"}],
warehouse: [{required: true,message: "请选择物料入库仓库",trigger: "blur"}],
},
codeText: "",
visible: false,
isSaveing: false,
materialOptions: [],
@ -208,10 +228,22 @@ export default {
obj.page= 0;
obj.mgroupx= that.mgroupId;
obj.material__process= that.process;
if (that.mgroupId != null &&that.mgroupId != undefined &&that.mgroupId != "") {
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
that.wbatchOptions = res;
if(res.length>0&&that.codeText!==''){
that.codeTextChange(that.codeText);
// let arr = [];
// arr = res.filter(item => item.batch == that.codeText);
// if(arr.length>0){
// that.selectBatch = arr[0].id;
// that.form.batch = arr[0].batch;
// that.form.wm = arr[0].id;
// that.form.count = arr[0].count;
// }else{
// this.$message.warning("");
// }
}
});
}
},
@ -223,13 +255,76 @@ export default {
obj.material = that.form.material;
this.$API.inm.warehouse.batch.req(obj).then((res) => {
this.batchOptions = res;
if(res.length>0&&that.codeText!==''){
that.codeTextChange(that.codeText);
// let arr = [];
// arr = res.filter(item => item.batch == that.codeText);
// if(arr.length>0){
// that.form.material = arr[0].material
// that.selectBatch = arr[0].id;
// that.form.batch = arr[0].batch;
// that.form.warehouse = arr[0].warehouse;
// that.form.mb = arr[0].id;
// that.form.count = arr[0].count;
// }else{
// this.$message.warning("");
// }
}
});
},
scanClose(data){
codeTextChange(data){
let that = this;
if(data==''||data==undefined||data==null){
return;
}
data = data.replace(' ','');
let id = data.split('#')[1];
console.log('id',id);
that.form.batch = id;
this.$API.cm.labelmat.item.req(id).then((res) => {
console.log('res',res);
let arr = [];
if(this.cate == 'do_out'){//---
arr = this.batchOptions.filter(item => item.batch == res.batch);
}else{//----
arr = this.wbatchOptions.filter(item => item.batch == res.batch);
}
console.log('arr',arr);
if(arr.length>0){
that.form.material = arr[0].material;
that.selectBatch = arr[0].id;
that.form.batch = arr[0].batch;
that.form.count = arr[0].count;
if(this.cate == 'do_out'){
that.form.mb = arr[0].id;
that.form.warehouse = arr[0].warehouse;
}else{
that.form.wm = arr[0].id;
}
}else{
that.$message.error("该批次不存在")
}
})
// that.form.batch = id;
// let arr = [];
// if(this.cate == 'do_out'){//---
// arr = this.batchOptions.filter(item => item.batch == that.codeText);
// }else{//----
// arr = this.wbatchOptions.filter(item => item.batch == that.codeText);
// }
// console.log('arr',arr);
// if(arr.length>0){
// that.form.material = arr[0].material
// that.selectBatch = arr[0].id;
// that.form.batch = arr[0].batch;
// that.form.count = arr[0].count;
// if(this.cate == 'do_out'){
// that.form.mb = arr[0].id;
// that.form.warehouse = arr[0].warehouse;
// }else{
// that.form.wm = arr[0].id;
// }
// }else{
// this.$message.warning("");
// }
},
selectMaterialChange() {
this.getBatchOptions();
@ -249,6 +344,7 @@ export default {
//
selectwmChange(item){
let that = this;
that.form.batch = item.batch;
that.form.wm = item.id;
},
selectBatchClear() {
@ -256,8 +352,11 @@ export default {
this.form.warehouse = "";
},
//
open(mode = "add") {
open(mode = "add",codeText="") {
this.mode = mode;
if(codeText&&codeText!=''){
this.codeText = codeText;
}
this.visible = true;
return this;
},

69
update_changelog.sh Normal file
View File

@ -0,0 +1,69 @@
#!/bin/bash
# 设置默认版本号 (格式: 2.6.YYYYMMDDHH)
DEFAULT_VERSION="2.6.$(date '+%Y%m%d%H')"
# 获取参数 (起始tag)
TARGET_TAG="$1"
# 获取最后一个tag
LAST_TAG=$(git describe --abbrev=0 --tags 2>/dev/null)
# 确定版本范围
if [ -z "$TARGET_TAG" ]; then
if [ -z "$LAST_TAG" ]; then
echo "没有找到任何tag将从头开始生成"
RANGE=""
else
RANGE="$LAST_TAG..HEAD"
fi
else
RANGE="$TARGET_TAG..HEAD"
fi
# 初始化临时文件
TEMP_FILE=$(mktemp)
# 生成变更日志头
echo "## $DEFAULT_VERSION" > "$TEMP_FILE"
echo >> "$TEMP_FILE"
# 按类型分类提交记录
process_commits() {
local type="$1"
local header="$2"
local pattern="$3"
# 查找匹配类型的提交
git log $RANGE --no-merges --pretty=format:"%s | %an | %ad" --date=short | grep -E "$pattern" | while read -r line; do
COMMIT_MSG=$(echo "$line" | cut -d'|' -f1 | sed 's/^ *//;s/ *$//')
AUTHOR=$(echo "$line" | cut -d'|' -f2 | sed 's/^ *//;s/ *$//')
DATE=$(echo "$line" | cut -d'|' -f3 | sed 's/^ *//;s/ *$//')
# 如果是第一次找到该类型,先打印标题
if [ $printed_header -eq 0 ]; then
echo "- $header" >> "$TEMP_FILE"
printed_header=1
fi
# 打印提交信息(移除类型前缀)
CLEAN_MSG=$(echo "$COMMIT_MSG" | sed -E "s/^$type:\s*//i")
echo " - $CLEAN_MSG [$AUTHOR]" >> "$TEMP_FILE"
done
}
# 处理各类型提交(按优先级排序)
printed_header=0; process_commits "feat" "feat: 新增功能" "^[fF]eat"
printed_header=0; process_commits "fix" "fix: 问题修复" "^[fF]ix"
printed_header=0; process_commits "" "other: 其他变更" "^((?![fF]eat|[fF]ix).)*$"
# 合并到原文件
if [ -f changelog.md ]; then
cat "$TEMP_FILE" changelog.md > changelog.md.tmp && mv changelog.md.tmp changelog.md
rm "$TEMP_FILE"
else
mv "$TEMP_FILE" changelog.md
fi
echo "变更日志已更新到 changelog.md"
echo "当前版本号: $DEFAULT_VERSION (请手动修改)"