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;
/**
* 审核时间