diff --git a/changelog.md b/changelog.md index 99349560..81fa05e5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,20 @@ +## 3.1.2026071608 + +- feat: 新增功能 + - scScanner支持扫码枪(蓝牙/USB)输入,套壳环境保留原生扫码按钮 [caoqianming] + - 仓库数量汇总报表支持点击状态设定安全库存上下限并日期自动查询 [caoqianming] + - 物料档案增加安全库存上限, 新增仓库数量汇总报表页 [caoqianming] + - 新增大批直通良率统计页zt_batch_gx [caoqianming] +- fix: 问题修复 + - 上盘平磨合批弹窗总计不刷新,交接数量@change的countChanges方法未声明变量报错;总计改为computed计算属性,随handoverb自动汇总,并移除分散的手动累加与500ms定时重算 [caoqianming] + - zt_batch_gx展开行count_*字段后缀翻译为中文 [caoqianming] + - 出入库明细页单价/金额/合计改用后端返回的unit_price、price、total_price,修复前端浮点计算误差;库存导出总金额保留两位 [caoqianming] + - 客户页面删除接口调用错误,误用采购订单删除接口,并补充删除后刷新列表 [caoqianming] +- other: 其他变更 + - perf:生产领料/其他出库(bxerp+gz)改按仓库批次选择,生产入库批次下拉显示工段 [caoqianming] + - perf:销售发货明细表单改为按仓库批次选择并精简冗余字段 [caoqianming] + - style:仓库数量汇总报表页优化显示(KPI概览/对比图/网格/合计/安全库存预警) [caoqianming] + - refactor:仓库数量汇总报表页移至 statistics 目录 [caoqianming] ## 2.6.2025041413 - fix: 问题修复 - fmlog日志添加时,物料只展示来料未完成 [shijing] diff --git a/src/api/model/mtm.js b/src/api/model/mtm.js index f040f893..9cabf4f2 100644 --- a/src/api/model/mtm.js +++ b/src/api/model/mtm.js @@ -94,6 +94,15 @@ export default { ); }, }, + setSafe: { + name: "设置安全库存上下限", + req: async function (id, data) { + return await http.put( + `${config.API_URL}/mtm/material/${id}/set_safe/`, + data + ); + }, + }, update: { name: "更新", req: async function (id, data) { diff --git a/src/components/scScanner.vue b/src/components/scScanner.vue index ada5fa4e..2f03bc60 100644 --- a/src/components/scScanner.vue +++ b/src/components/scScanner.vue @@ -1,39 +1,65 @@ - - {{labeltext}} - + + + + + {{ labeltext }} + diff --git a/src/config/index.js b/src/config/index.js index cb121a62..cc04592b 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -6,7 +6,7 @@ const DEFAULT_CONFIG = { DASHBOARD_URL: "/dashboard", //版本号 - APP_VER: "3.1.2026031316", + APP_VER: "3.1.2026071608", //内核版本号 CORE_VER: "1.6.9", diff --git a/src/views/inm/helpso.vue b/src/views/inm/helpso.vue index 8c7ddb97..9660d897 100644 --- a/src/views/inm/helpso.vue +++ b/src/views/inm/helpso.vue @@ -214,7 +214,7 @@ export default { that.$API.inm.warehouse.batch.req({ page: 0, count__gte: 1, material__type__in: "40" }).then((res) => { res.forEach(item => { let data0 = []; - let total = Number(item.material_.unit_price)*Number(item.count); + let total = Math.round(Number(item.material_.unit_price)*Number(item.count)*100)/100; data0.push(item.update_time); data0.push(item.material_.number); data0.push(item.material_.name); diff --git a/src/views/inm/mio_form.vue b/src/views/inm/mio_form.vue index 03b23ae0..446f46f0 100644 --- a/src/views/inm/mio_form.vue +++ b/src/views/inm/mio_form.vue @@ -326,10 +326,17 @@ export default { // console.log('userOption',userOption); }); }, + //新增时清空表单,避免上次保存的数据残留(与mioitem_form一致,防v-if未及时重建时复用旧实例) + resetForm() { + this.form = { state: 10, inout_date: this.$TOOL.dateFormat2(new Date()) }; + }, //显示 open(mode = "add", type = "",htype="") { this.mode = mode; this.htype = htype; + if (mode == "add") { + this.resetForm(); + } this.form.type = type; this.init(); this.visible = true; diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue index 0e51f43f..a7a7c71b 100644 --- a/src/views/inm/mioitem.vue +++ b/src/views/inm/mioitem.vue @@ -104,15 +104,9 @@ {{scope.row.count}} - - - {{ scope.row.material_.unit_price }} - + - - {{ scope.row.count * Number(scope.row.material_.unit_price) }} - @@ -721,13 +715,9 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { } } if(index==7&&this.cate == 'helpso'&&this.project_code=='gx'){ - let sumsss = 0; - data.forEach((item)=>{ - if(item.count&&item.material_.unit_price&&item.material_.unit_price!==null){ - sumsss += Number(item.count)*Number(item.material_.unit_price); - } - }) - sums[index] =sumsss; + // 直接用后端汇总的单据总金额 + const total = this.mioObj ? this.mioObj.total_price : null; + sums[index] = total !== null && total !== undefined ? total : ''; } }); diff --git a/src/views/inm/mioitem_form.vue b/src/views/inm/mioitem_form.vue index 1f52f301..be5d19ae 100644 --- a/src/views/inm/mioitem_form.vue +++ b/src/views/inm/mioitem_form.vue @@ -19,28 +19,39 @@ - + - + {{ scope.row.full_name }} {{ scope.row.material_name }} + + + + + + + 批次号:{{ form.batch }} | 仓库:{{ selectObj&&selectObj.warehouse_name?selectObj.warehouse_name:'' }} | 可发数量:{{ batchcount }} + + + - - + {{ item.count }}{{ item.count }} | {{ item.mgroup_name }} @@ -84,7 +95,7 @@ /> - + - + - + + + + + + diff --git a/src/views/mtm/materials_form_gx.vue b/src/views/mtm/materials_form_gx.vue index 4b5b1463..d2aac6d5 100644 --- a/src/views/mtm/materials_form_gx.vue +++ b/src/views/mtm/materials_form_gx.vue @@ -122,13 +122,21 @@ - + + + + + + @@ -346,6 +354,7 @@ export default { that.form.process = data.process; that.form.tracking = data.tracking; that.form.count_safe = data.count_safe; + that.form.count_safe_upper = data.count_safe_upper; that.form.is_hidden = data.is_hidden; that.form.unit_price = data.unit_price; that.form.photo = data.photo; diff --git a/src/views/mtm/process_form.vue b/src/views/mtm/process_form.vue index 7d4fd8f4..405d00d0 100644 --- a/src/views/mtm/process_form.vue +++ b/src/views/mtm/process_form.vue @@ -98,7 +98,7 @@ - + diff --git a/src/views/sam/customer.vue b/src/views/sam/customer.vue index 2340760c..3b4c6bcb 100644 --- a/src/views/sam/customer.vue +++ b/src/views/sam/customer.vue @@ -121,8 +121,9 @@ this.$confirm(`确定删除吗?`, "提示", { type: "warning", }).then(() => { - this.$API.pum.order.delete.req(row.id).then((res) => { + this.$API.sam.customer.delete.req(row.id).then((res) => { this.$message.success("删除成功"); + this.$refs.table.refresh(); return res; }).catch((err) => { return err; diff --git a/src/views/statistics/material_wh_summary.vue b/src/views/statistics/material_wh_summary.vue new file mode 100644 index 00000000..53c10e8a --- /dev/null +++ b/src/views/statistics/material_wh_summary.vue @@ -0,0 +1,365 @@ + + + + + 周区间 + + 查询 + 分组维度: 物料型号(model) + + + + + + + + {{ k.label }} · 现有库存合计 + {{ fmtNum(k.total) }} + 覆盖 {{ k.count }} 个型号 + + + + + + + 各库/工段 现有库存量对比(按型号) + + + + + + + + 库存量 与 安全库存上下限(个人设定) + + + + + + + + + + {{ safeState(row).text }} + + + + + + + + + + 成品库周数据(入库=生产入库 / 出库=销售发货) + + + + + + + + + + + + 原料库(棒料)周数据 + + + + + + + + + + + + + 白玻 / 黑玻 周数据(外协以"外协%"工段判定) + + + + + + + + + + + + + + + + {{ safeDialog.block }} / {{ safeDialog.model }} + + + {{ fmtNum(safeDialog.stock) }} + + + + + + + + + + 取消 + 保存 + + + + + + + + + diff --git a/src/views/statistics/zt_batch_gx.vue b/src/views/statistics/zt_batch_gx.vue new file mode 100644 index 00000000..6687d05f --- /dev/null +++ b/src/views/statistics/zt_batch_gx.vue @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + 导出 + + + + + + + + {{ v }} + + + + + {{ scope.row.batch }} + + + {{ scope.row.material_start_name }} + + + {{ scope.row.data.直通_白料数 }} + + + {{ scope.row.data.直通_总合格数 }} + + + {{ scope.row.data.直通_良率 }} + + + {{ scope.row.data.直通_口径 }} + + + {{ subCount(scope.row) }} + + + {{ scope.row.data.直通_子批次 }} + + + {{ (scope.row.first_time || '').slice(0, 10) }} + + + {{ (scope.row.last_time || '').slice(0, 10) }} + + + + + + + + + + + + diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index 181057d6..5895118d 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -101,7 +101,6 @@ :step-strictly="true" style="width: 100%" placeholder="交接数量" - @change="countChanges($index)" > @@ -383,7 +382,6 @@ export default { route_code: "", project_code:'', materials:[], - totalCount: 0, deptID:'', bwIndex:0, checkedStatus:[], @@ -466,6 +464,11 @@ export default { that.getMgroupOptions(); }, computed: { + // 总计:始终等于各批次交接数量之和,随 handoverb 自动刷新 + totalCount() { + if (!this.form.handoverb || this.form.handoverb.length === 0) return 0; + return this.form.handoverb.reduce((sum, item) => sum + Number(item.count || 0), 0); + }, // 合批时源批次 state 均为 OK(10) 且 defect 不一致,才显示"清除缺陷"勾选 defectMismatch() { if (this.mtype !== 30) return false; @@ -490,11 +493,6 @@ export default { that.checkedStatus.splice(index,1); this.form.handoverb[this.bwIndex].handoverbw.splice(index,1); this.form.handoverb[this.bwIndex].count--; - let totalCount = 0; - that.form.handoverb.forEach((item)=>{ - totalCount += item.count; - }) - that.totalCount = totalCount; }, showbw(index){ let that = this; @@ -680,7 +678,6 @@ export default { delMaterial(index){ this.selectItems.splice(index,1); this.form.handoverb.splice(index,1); - this.countChange(); }, codeTextChange(text){ this.wm_in = text; @@ -701,12 +698,10 @@ export default { } that.form.handoverb = data?data:[]; if(data&&data!==''&&data.length>0){ - that.totalCount = 0; data.forEach((item,index)=>{ item.wm = item.id; that.checkedStatus.push(true) that.selectItems.push(item.id) - that.totalCount += Number(item.count); that.getWprList(item.wm,index); }) if(that.isFeiPinku){ @@ -720,7 +715,6 @@ export default { }, clearSelect(){ let that = this; - that.totalCount = 0; that.form.handoverb = []; }, materialChange() { @@ -735,7 +729,7 @@ export default { }); } that.form.new_batch = that.route_code=='shangpaipingmo'?that.form.new_batch:""; - let totalCount = 0,data = []; + let data = []; if(that.selectItems.length>0){ console.log('that.selectItems',that.selectItems) data = that.materialOptions.filter((item) => { @@ -783,10 +777,8 @@ export default { // 保留已扫板段的 handoverbw 和数量 item.handoverbw = scanned.handoverbw; item.count = scanned.count; - totalCount += Number(scanned.count); } else { item.count = item.count_canhandover; - totalCount += Number(item.count_canhandover); item.handoverbw = []; that.getWprList(item.id,index); } @@ -800,7 +792,6 @@ export default { return true; }); } - that.totalCount = totalCount; that.form.handoverb = data; }, getWprList(id,index){ @@ -830,28 +821,6 @@ export default { }else{ this.checkedStatus[index] = false; } - this.countChange(); - }, - countChange(){ - let that = this; - let totalCount = 0; - if(this.form.handoverb&&this.form.handoverb.length&&this.form.handoverb.length>0){ - this.form.handoverb.forEach(item=>{ - totalCount += Number(item.count); - }) - that.totalCount = totalCount; - }else{ - that.totalCount = 0; - } - }, - countChanges(index){ - if(this.form.handoverb[index]){}else{} - if(this.form.handoverb.length>0){ - this.form.handoverb.forEach(item=>{ - totalCount += item.count; - }) - that.totalCount = totalCount; - } }, //提交 submit() { @@ -910,7 +879,6 @@ export default { //表单注入数据 setData(data) { let that = this; - this.totalCount = data.count?data.count:data.handoverb.count; Object.assign(this.form, data); this.$API.system.user.list.req({ depts: data.send_dept, page: 0 }).then((res) => { that.userList = res; @@ -1154,9 +1122,6 @@ export default { } } } - setTimeout(() => { - this.countChange(); - }, 500); }, new_batch(){ let that = this; diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index 3b64422b..5224b448 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -60,7 +60,7 @@ - 合格B类不拆批 + 合格B类记为合格 - 合格B类不拆批 + 合格B类记为合格