From 600f118b64cc4f0e83544f23c89d084f610b4dc7 Mon Sep 17 00:00:00 2001
From: zhangxuanming <2260476558@qq.com>
Date: Thu, 6 Feb 2025 11:35:56 +0800
Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=BD=A6=E9=97=B4=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE=E4=B8=AD=E7=9A=84=E8=B4=9F=E8=B4=A3=E4=BA=BA=E6=94=B9?=
=?UTF-8?q?=E4=B8=BA=E5=BC=B9=E5=87=BA=E6=A1=86=E9=80=89=E6=8B=A9=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E3=80=82=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=96=B0=E7=89=A9?=
=?UTF-8?q?=E6=96=99=E8=AF=A6=E6=83=85=E9=A1=B5=EF=BC=88form.vue=EF=BC=89?=
=?UTF-8?q?=E4=B8=AD=E7=9A=84=E6=89=B9=E6=AC=A1=E4=BF=A1=E6=81=AF=E3=80=82?=
=?UTF-8?q?=E9=83=A8=E9=97=A8=E7=AE=A1=E7=90=86=E5=89=8D=E7=AB=AF=E6=94=AF?=
=?UTF-8?q?=E6=8C=81=E7=BC=96=E8=BE=91=E7=BC=96=E7=A0=81=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/mes/md/mditem/form.vue | 7 ++-
src/views/mes/md/workshop/index.vue | 75 ++++++++++++++++++++++++++++-
src/views/system/dept/index.vue | 34 +++++++++++++
3 files changed, 113 insertions(+), 3 deletions(-)
diff --git a/src/views/mes/md/mditem/form.vue b/src/views/mes/md/mditem/form.vue
index 7142e14..0ee920d 100644
--- a/src/views/mes/md/mditem/form.vue
+++ b/src/views/mes/md/mditem/form.vue
@@ -156,7 +156,9 @@
-
+
+
+
@@ -174,6 +176,7 @@ import BarcodeImg from "@/components/barcodeImg/index.vue";
import SIPTab from "@/views/mes/md/mditem/components/sip.vue";
import ItemBom from "@/views/mes/md/mditem/components/itembom.vue";
import Treeselect from "@riophae/vue-treeselect";
+import BatchConfig from "./components/batch.vue";
import {genCode} from "@/api/system/autocode/rule";
import {listAllUnitmeasure} from "@/api/mes/md/unitmeasure";
import {treeselect} from "@/api/mes/md/itemtype";
@@ -181,7 +184,7 @@ import {getMdItem} from "@/api/mes/md/mdItem";
export default {
name: "itemForm",
- components: {ItemBom, SIPTab, Treeselect, BarcodeImg, SOPTab},
+ components: {ItemBom, SIPTab, Treeselect, BarcodeImg, SOPTab, BatchConfig},
dicts: ['sys_yes_no','mes_item_product'],
data() {
return {
diff --git a/src/views/mes/md/workshop/index.vue b/src/views/mes/md/workshop/index.vue
index 59aea96..e680529 100644
--- a/src/views/mes/md/workshop/index.vue
+++ b/src/views/mes/md/workshop/index.vue
@@ -146,7 +146,7 @@
-
+
@@ -188,6 +188,40 @@
取 消
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.createTime) }}
+
+
+
+
+
+
+
@@ -196,16 +230,22 @@ import { listWorkshop, getWorkshop, delWorkshop, addWorkshop, updateWorkshop } f
import {genCode} from "@/api/system/autocode/rule"
import BarcodeImg from "@/components/barcodeImg/index.vue"
import {getBarcodeUrl} from "@/api/mes/wm/barcode";
+import {listUser} from "@/api/system/user";
export default {
components:{BarcodeImg},
name: "Workshop",
dicts: ['sys_yes_no'],
data() {
return {
+ userTotal: 0,
+ userTitle: '用户选择',
+ userOpen: false,
autoGenFlag:false,
optType: undefined,
// 遮罩层
loading: true,
+ // 用户数据
+ userList: [],
// 选中数组
ids: [],
// 非单个禁用
@@ -260,6 +300,10 @@ export default {
remark: [
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
]
+ },
+ userQuery: {
+ pageNum: 1,
+ pageSize: 10,
}
};
},
@@ -267,6 +311,35 @@ export default {
this.getList();
},
methods: {
+ cacelUser(row) {
+ this.$refs.singleTable.setCurrentRow(row);
+ this.userOpen = false
+ },
+ /** 选择用户 */
+ handleCurrentChange(val) {
+ if (val) {
+ this.form.charge = val.nickName
+ this.form.chargeId = val.userId
+ this.cacelUser()
+ }
+ },
+ /** 点击负责人输入框 */
+ handleCharge() {
+ this.userOpen = true
+ this.userQuery.pageNum = 1
+ this.userQuery.pageSize = 10
+ this.getUserList()
+ },
+ /** 查询用户列表 */
+ getUserList() {
+ this.loading = true;
+ listUser(this.userQuery, this.dateRange).then(response => {
+ this.userList = response.rows;
+ this.userTotal = response.total;
+ this.loading = false;
+ }
+ );
+ },
/** 查询车间列表 */
getList() {
this.loading = true;
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 9d2ea8b..704a780 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -100,6 +100,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -162,6 +178,7 @@
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {genCode} from "@/api/system/autocode/rule";
export default {
name: "Dept",
@@ -169,6 +186,8 @@ export default {
components: { Treeselect },
data() {
return {
+ //自动生成部门编码标识
+ autoGenFlag: false,
// 遮罩层
loading: true,
// 显示搜索条件
@@ -200,6 +219,9 @@ export default {
deptName: [
{ required: true, message: "部门名称不能为空", trigger: "blur" }
],
+ deptCode: [
+ { required: true, message: "部门编码不能为空", trigger: "blur" }
+ ],
orderNum: [
{ required: true, message: "显示排序不能为空", trigger: "blur" }
],
@@ -224,6 +246,16 @@ export default {
this.getList();
},
methods: {
+ //自动生成部门编码
+ handleAutoGenChange(autoGenFlag){
+ if(autoGenFlag){
+ genCode('DEPT_CODE').then(response =>{
+ this.form.deptCode = response;
+ });
+ }else{
+ this.form.deptCode = null;
+ }
+ },
/** 查询部门列表 */
getList() {
this.loading = true;
@@ -253,6 +285,7 @@ export default {
// 表单重置
reset() {
this.form = {
+ deptCode: undefined,
deptId: undefined,
parentId: undefined,
deptName: undefined,
@@ -262,6 +295,7 @@ export default {
email: undefined,
status: "0"
};
+ this.autoGenFlag = false;
this.resetForm("form");
},
/** 搜索按钮操作 */