From 08c69bdb0e4f759585995085c386179ebe0bff1b Mon Sep 17 00:00:00 2001
From: zhc077 <565291854>
Date: Mon, 16 Jan 2023 15:36:41 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E4=BC=98=E5=8C=96=201.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/productplan/ZyProductPlanList.vue | 67 ++++++++++++++-----
.../productplan/modules/ZyProductPlanForm.vue | 64 +++++++++++-------
.../controller/ZyProductPlanController.java | 11 ++-
.../productplan/entity/ZyProductPlan.java | 4 +-
4 files changed, 103 insertions(+), 43 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
index 38b9e64d..a4c2a0f4 100644
--- a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
+++ b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
@@ -109,13 +109,26 @@
@change="handleTableChange">
- 编辑
+ 编辑
+
+
+
+
+
+ handleDelete(record.id)">
+ 删除
+
- handleDelete(record.id)">
- 删除
-
+
+
+ 撤销
+ 撤销
+
+
+ 管理
- 生产计划排位图
+
+ 查看排位图
@@ -131,7 +144,7 @@ import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyProductPlanModal from './modules/ZyProductPlanModal'
-import {getAction} from "@api/manage";
+import {getAction, putAction, httpAction, postAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
@@ -182,7 +195,7 @@ export default {
{
title: '车间负责人',
align: "center",
- dataIndex: 'responsiblePerson'
+ dataIndex: 'responsiblePerson_dictText'
},
// {
// title: '班组编号',
@@ -204,16 +217,7 @@ export default {
width: 150,
align: "center",
dataIndex: 'workTime',
- // customRender: function (text) {
- // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
- // }
},
- /*{
- title: '创建时间', width:150,
- dataIndex: 'createTime',
- align:"center",
- // sorter:true
- },*/
{
title: '生产时长',
align: "center",
@@ -234,7 +238,7 @@ export default {
{
title: '审核人',
align: "center",
- dataIndex: 'auditBy'
+ dataIndex: 'auditBy_dictText'
},
{
title: '审核时间',
@@ -257,6 +261,7 @@ export default {
url: {
list: "/org.jeecg.modules.productplan/zyProductPlan/list",
paiweitu: "/org.jeecg.modules.productplan/zyProductPlan/paiweitu",
+ updateStatus: "/org.jeecg.modules.productplan/zyProductPlan/edit",
delete: "/org.jeecg.modules.productplan/zyProductPlan/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyProductPlan/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.productplan/zyProductPlan/exportXls",
@@ -276,6 +281,34 @@ export default {
// },
},
methods: {
+ jumpPage1(record) {
+ this.$router.push({
+ path: '/team/StationMachineList',
+ query: { // 路由携带参数
+ 'plan': record.id,
+ // 'stationName': record.stationName,
+ // 'stationNum': record.stationNum,
+ // 'departName': record.departName,
+ },
+ });
+ },
+ chexiao(record) {
+ let parma = {
+ "id": record.id,
+ "status": '8',
+ }
+ putAction(this.url.updateStatus, parma).then((res) => {
+ if (res.success) {
+ this.$message.success("操作成功");
+ this.loadData();
+ } else {
+ this.$message.warning(res.message)
+ }
+ }).finally(() => {
+ this.loading = false
+ })
+ },
+
getPaiWeiTu(record) {
// alert(JSON.stringify(record));
getAction(this.url.paiweitu, record).then((res) => {
diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue
index f4b0f230..418bcb36 100644
--- a/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue
+++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue
@@ -29,11 +29,13 @@
prop="responsiblePerson">
-
-
+
+
+ placeholder="请选择车间负责人"
+ :dict-code="departManger"
+ :disabled="model.workshopId==null"/>
@@ -49,7 +51,7 @@
@@ -73,8 +75,11 @@
-
+
+
+
@@ -113,14 +118,16 @@ export default {
},
data() {
return {
+ departManger: "sys_user,realname,username",
+ auditByVal: "sys_user,realname,username",
groupxVal: "groupx,group_name,id",
- groupxVal2: "sys_user,realname,id",
+ teamLeaderVal: "sys_user,realname,username",
model: {
- workTime: new Date(),
- status:0,
- auditBy:66,
- auditTimr: new Date(),
- speedUp:0,
+ workTime: '',
+ status: 0,
+ auditTimr: '',
+ speedUp: 0,
+ auditBy: 'admin',
},
labelCol: {
xs: {span: 24},
@@ -169,30 +176,39 @@ export default {
// this.getNowDate(); //调用函数
},
methods: {
- departSelected() {
+ // 车间选定
+ // 1,查询车间负责人(查询所属当前车间用户)
+ // 2,查询班组(查询所属当前车间班组)
+ getGroupxValChange() {
+ this.departManger = "sys_user,realname,username,id in (select user_id from sys_user_depart where dep_id='" + this.model.workshopId + "')";
+ this.groupxVal = "groupx,group_name,id,depart_id='" + this.model.workshopId + "'";
+ this.auditByVal = "sys_user,realname,username,id in (select user_id from sys_user_depart where dep_id='" + this.model.workshopId + "')";
+ },
+ //班组选定,组长自动填充
+ getEnterprisesManagerValChange() {
+ // this.teamLeaderVal = "sys_user,realname,id,id=(select enterprises_manager from groupx where id='" + this.model.teamId + "')";
let that = this;
let param = {
- "id": that.model.workshopId,
+ "id": that.model.teamId,
}
// alert(param.toString());
getAction(that.url.groupxList, param).then((res) => {
if (res.success) {
// console.log("----------" + JSON.stringify(res.result.records))
- let phone = JSON.stringify(res.result.records[0].enterprisesNanager);
- that.model = Object.assign(that.model, {'mobile': phone});
+ let enterprisesManager = JSON.stringify(res.result.records[0].enterprisesManager_dictText);
+ // enterprisesManager.replace('"',"")
+ enterprisesManager = enterprisesManager.substring(1, enterprisesManager.length - 1);
+
+ that.model = Object.assign(that.model, {'teamLeader': enterprisesManager});
this.$forceUpdate();
}
});
- },
- getGroupxValChange() {
- this.groupxVal = "groupx,group_name,id,depart_id='" + this.model.workshopId + "'";
- this.departSelected();
- },
- getEnterprisesManagerValChange() {
- this.groupxVal2 = "sys_user,realname,id,id=(select enterprises_manager from groupx where id='" + this.model.teamId + "')";
+
},
add() {
this.edit(this.modelDefault);
+ this.getNowDate();
+ // console.log(this.model.workTime);
},
edit(record) {
this.model = Object.assign({}, record);
@@ -256,6 +272,8 @@ export default {
seconds = "0" + seconds;
}
this.model.workTime = year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds;
+ this.model.auditTimr = year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds;
+
},
},
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java
index 4723bc78..0abd3303 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java
@@ -17,7 +17,9 @@ import org.jeecg.modules.productplan.entity.ZyProductPlan;
import org.jeecg.modules.productplan.entity.vo.PaiWeiTuVo;
import org.jeecg.modules.productplan.service.IZyProductPlanService;
import org.jeecg.modules.system.entity.SysDepart;
+import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService;
+import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.service.IZyProductService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -48,6 +50,9 @@ public class ZyProductPlanController extends JeecgController queryPageList(ZyProductPlan zyProductPlan,
@@ -83,7 +88,7 @@ public class ZyProductPlanController extends JeecgController add(@RequestBody ZyProductPlan zyProductPlan) {
@@ -95,6 +100,8 @@ public class ZyProductPlanController extends JeecgController().eq(SysUser::getRealname, zyProductPlan.getTeamLeader()));
+ zyProductPlan.setTeamLeader(sysUser.getUsername());
zyProductPlanService.save(zyProductPlan);
//TODO 更新work_order表work_order_status为“1” (不能为其新增生产计划)
return Result.OK("添加成功!");
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java
index 46fa78b4..6a41c7a9 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java
@@ -85,6 +85,7 @@ public class ZyProductPlan implements Serializable {
*/
@Excel(name = "车间负责人", width = 15)
@ApiModelProperty(value = "车间负责人")
+ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
private String responsiblePerson;
/**
* 班组
@@ -98,7 +99,7 @@ public class ZyProductPlan implements Serializable {
*/
@Excel(name = "组长", width = 15)
@ApiModelProperty(value = "组长")
- @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
+ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
private String teamLeader;
/**
* 生产开始时间
@@ -133,6 +134,7 @@ public class ZyProductPlan implements Serializable {
*/
@Excel(name = "审核人", width = 15)
@ApiModelProperty(value = "审核人")
+ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
private String auditBy;
/**
* 审核时间
From 286f1671263d79a6dd4b5ec1025c4755f1d46f25 Mon Sep 17 00:00:00 2001
From: lenovo <123>
Date: Mon, 16 Jan 2023 16:49:59 +0800
Subject: [PATCH 2/2] =?UTF-8?q?2023-1-16=E5=B7=A5=E5=BA=8F=E8=AF=A6?=
=?UTF-8?q?=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/ZyProcessAccessoriesList.vue | 14 +++++---
.../process/modules/ZyProcessActionList.vue | 12 +++++--
.../process/modules/ZyProcessFabricList.vue | 12 +++++--
.../views/process/modules/ZyProcessForm.vue | 36 ++++++++++++++++---
.../pdaccessories/ProductAccessoriesList.vue | 5 +--
.../product/pdfabric/ProductFabricList.vue | 7 ++--
.../product/pdmachine/ProductMachineList.vue | 5 +--
.../ProductOperationtoolList.vue | 9 ++---
8 files changed, 74 insertions(+), 26 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessAccessoriesList.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessAccessoriesList.vue
index bed9aef8..5bd49a89 100644
--- a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessAccessoriesList.vue
+++ b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessAccessoriesList.vue
@@ -79,9 +79,9 @@
-
+ 详情
-
+
@@ -94,7 +94,7 @@
-
+
@@ -105,12 +105,13 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProcessAccessoriesModal from './ZyProcessAccessoriesModal'
-
+ import ZyAccessoriesFormDetail from '@/views/erp/accessories/modules/ZyAccessoriesFormDetail'
export default {
name: 'ZyProcessAccessoriesList',
mixins:[JeecgListMixin, mixinDevice],
components: {
- ZyProcessAccessoriesModal
+ ZyProcessAccessoriesModal,
+ ZyAccessoriesFormDetail
},
data () {
return {
@@ -205,6 +206,9 @@
fieldList.push({type:'popup',value:'processId',text:'工序表id', popup:{code:'',field:'',orgFields:'',destFields:''}})
fieldList.push({type:'popup',value:'accessoriesId',text:'辅料表id', popup:{code:'',field:'',orgFields:'',destFields:''}})
this.superFieldList = fieldList
+ },
+ handleDetail(id){
+ this.$refs.ZyAccessoriesFormDetail.showModal(id)
}
}
}
diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessActionList.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessActionList.vue
index e652faba..dc7b3123 100644
--- a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessActionList.vue
+++ b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessActionList.vue
@@ -80,8 +80,8 @@
-
-
+ 详情
+
@@ -98,6 +98,7 @@
+
@@ -107,6 +108,7 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProcessActionModal from './ZyProcessActionModal'
+ import ZyClothActionFormDetail from './ZyClothActionFormDetail'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import {getAction} from "@api/manage";
@@ -114,7 +116,8 @@
name: 'ZyProcessActionList',
mixins:[JeecgListMixin, mixinDevice],
components: {
- ZyProcessActionModal
+ ZyProcessActionModal,
+ ZyClothActionFormDetail
},
data () {
return {
@@ -237,6 +240,9 @@
fieldList.push({type:'string',value:'processId',text:'工序id',dictCode:'zy_process,process_name,id'})
fieldList.push({type:'string',value:'actionId',text:'动作id',dictCode:'zy_cloth_action,descr,nums'})
this.superFieldList = fieldList
+ },
+ handleDetail(id){
+ this.$refs.ZyClothActionFormDetail.showModal(id)
}
}
}
diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessFabricList.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessFabricList.vue
index db8a05bd..33b75a1c 100644
--- a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessFabricList.vue
+++ b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessFabricList.vue
@@ -85,8 +85,9 @@
+ 详情
-
+
@@ -100,6 +101,7 @@
+
@@ -110,12 +112,14 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProcessFabricModal from './ZyProcessFabricModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+ import ZyFabricFormDetailModel from '@/views/erp/fabric/modules/ZyFabricFormDetailModel'
export default {
name: 'ZyProcessFabricList',
mixins:[JeecgListMixin, mixinDevice],
components: {
- ZyProcessFabricModal
+ ZyProcessFabricModal,
+ ZyFabricFormDetailModel
},
data () {
return {
@@ -209,6 +213,10 @@
fieldList.push({type:'string',value:'processId',text:'工序',dictCode:'zy_process,process_name,id'})
fieldList.push({type:'string',value:'fabricId',text:'面料',dictCode:'zy_fabric,name,id'})
this.superFieldList = fieldList
+ },
+ handleDetail(id,name){
+ this.$refs.ZyFabricFormDetailModel.showModal(id,name)
+ // this.$children[0].showModal(id)
}
}
}
diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue
index 61122e2f..934ae5f2 100644
--- a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue
+++ b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue
@@ -42,7 +42,7 @@
-
+
@@ -78,12 +78,12 @@
-
+
-
+
@@ -93,7 +93,7 @@
-
+
@@ -108,7 +108,7 @@
-
+
@@ -265,9 +265,35 @@
},
confirmLoading: false,
validatorRules: {
+ processTime:[
+ {
+ pattern: /^\d+$/,message:'请输入正整数'
+ },
+ ],
+ manualWide:[
+ {
+ pattern: /^\d+$/,message:'请输入正整数'
+ },
+ ],
+ machineWide:[
+ {
+ pattern: /^\d+$/,message:'请输入正整数'
+ },
+ ],
+ bundleWide:[
+ {
+ pattern: /^\d+$/,message:'请输入正整数'
+ },
+ ],
fabricNum: [
{ required: true, message: '请输入面料代码!'},
],
+ enterpriseId: [
+ { required: true, message: '请选择企业!'},
+ ],
+ typeId: [
+ { required: true, message: '请选择款式!'},
+ ],
price:[{
pattern: /^\d*\.?\d+$/,message:'请输入正数'
},],
diff --git a/ant-design-vue-jeecg/src/views/product/pdaccessories/ProductAccessoriesList.vue b/ant-design-vue-jeecg/src/views/product/pdaccessories/ProductAccessoriesList.vue
index 0b68e93d..1a0de3d8 100644
--- a/ant-design-vue-jeecg/src/views/product/pdaccessories/ProductAccessoriesList.vue
+++ b/ant-design-vue-jeecg/src/views/product/pdaccessories/ProductAccessoriesList.vue
@@ -1,6 +1,6 @@
- {{biaoTi}}
+ {{biaoTi}}
@@ -178,6 +178,7 @@
},
dictOptions:{},
superFieldList:[],
+ loadRouteType:false,
}
},
created() {
@@ -209,7 +210,7 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
- this.biaoTi = this.$route.query.styleNames+"产品辅料管理";
+ this.biaoTi = this.$route.query.productName+"产品辅料管理";
console.log("***********")
this.loadRouteType = true;
}
diff --git a/ant-design-vue-jeecg/src/views/product/pdfabric/ProductFabricList.vue b/ant-design-vue-jeecg/src/views/product/pdfabric/ProductFabricList.vue
index 6bb3c4de..a0b2f6d1 100644
--- a/ant-design-vue-jeecg/src/views/product/pdfabric/ProductFabricList.vue
+++ b/ant-design-vue-jeecg/src/views/product/pdfabric/ProductFabricList.vue
@@ -1,6 +1,6 @@
- {{biaoTi}}
+ {{biaoTi}}
@@ -172,6 +172,7 @@
},
dictOptions:{},
superFieldList:[],
+ loadRouteType:false,
}
},
created() {
@@ -203,8 +204,8 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
- this.biaoTi = this.$route.query.styleNames+"产品面料管理";
- console.log("***********")
+ this.biaoTi = this.$route.query.productName+"产品面料管理";
+ console.log("***********想看看")
this.loadRouteType = true;
}
},
diff --git a/ant-design-vue-jeecg/src/views/product/pdmachine/ProductMachineList.vue b/ant-design-vue-jeecg/src/views/product/pdmachine/ProductMachineList.vue
index 995ca46e..d86dd01c 100644
--- a/ant-design-vue-jeecg/src/views/product/pdmachine/ProductMachineList.vue
+++ b/ant-design-vue-jeecg/src/views/product/pdmachine/ProductMachineList.vue
@@ -1,6 +1,6 @@
- {{biaoTi}}
+ {{biaoTi}}
@@ -174,6 +174,7 @@
},
dictOptions:{},
superFieldList:[],
+ loadRouteType:false
}
},
created() {
@@ -222,7 +223,7 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
- this.biaoTi = this.$route.query.styleNames+"产品设备管理";
+ this.biaoTi = this.$route.query.productName+"产品设备管理";
console.log("***********")
this.loadRouteType = true;
}
diff --git a/ant-design-vue-jeecg/src/views/product/pdoperationtool/ProductOperationtoolList.vue b/ant-design-vue-jeecg/src/views/product/pdoperationtool/ProductOperationtoolList.vue
index cc6c08e4..c28d076b 100644
--- a/ant-design-vue-jeecg/src/views/product/pdoperationtool/ProductOperationtoolList.vue
+++ b/ant-design-vue-jeecg/src/views/product/pdoperationtool/ProductOperationtoolList.vue
@@ -1,13 +1,13 @@
- {{biaoTi}}
+ {{biaoTi}}
-
-
+
+
@@ -174,6 +174,7 @@
},
dictOptions:{},
superFieldList:[],
+ loadRouteType:false,
}
},
created() {
@@ -222,7 +223,7 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
- this.biaoTi = this.$route.query.styleNames+"产品工具管理";
+ this.biaoTi = this.$route.query.productName+"产品工具管理";
console.log("***********")
this.loadRouteType = true;
}