|
@@ -1701,12 +1701,9 @@ import "element-ui/lib/theme-chalk/index.css";
|
|
|
import Cookies from "js-cookie";
|
|
|
import {
|
|
|
GetDataByName,
|
|
|
- postJson,
|
|
|
- GetDataByNames,
|
|
|
checkButtons,
|
|
|
PostDataByName,
|
|
|
ExecDataByConfig,
|
|
|
- GetAccount,
|
|
|
transData,
|
|
|
handleWechatPushOfWorkOrder,
|
|
|
} from "@/api/common";
|
|
@@ -1806,10 +1803,12 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
goodsList: [],
|
|
|
+ roleEmpList:[],
|
|
|
createProductionOrderParm: {},
|
|
|
createProductionOrderWorkParm: {},
|
|
|
editProductionOrderGoodsCountParn: {},
|
|
|
getEmployeesSelectParm: { name: "getEmployeesSelect" },
|
|
|
+ getEmployeesRoleParm: { name: "getuserbyrole" , parammaps: {"name":"生产人员"} },
|
|
|
getProductionOrderProcessParm: {
|
|
|
name: "getProductionOrderProcess",
|
|
|
parammaps: {},
|
|
@@ -1946,7 +1945,7 @@ export default {
|
|
|
ProductionWorkOrderFillout
|
|
|
);
|
|
|
this.isProductionWorkOrderFillout = isProductionWorkOrderFillout;
|
|
|
- console.log(this.isProductionWorkOrderFillout);
|
|
|
+ // console.log(this.isProductionWorkOrderFillout);
|
|
|
|
|
|
const ProductionWorkOrderComplete =
|
|
|
"productManagement:productionWorkOrder:complete";
|
|
@@ -2009,8 +2008,7 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
handleGetProductionOrderProcessExcel() {
|
|
|
- console.log(this.getProductionOrderProcessParm);
|
|
|
-
|
|
|
+ // console.log(this.getProductionOrderProcessParm);
|
|
|
if (
|
|
|
this.getProductionOrderProcessParm.parammaps.inputDatetime2 !==
|
|
|
undefined &&
|
|
@@ -2172,6 +2170,20 @@ export default {
|
|
|
PostDataByName(this.completeProductionParm).then((response) => {
|
|
|
if (response.msg !== "fail") {
|
|
|
this.get_production_work_order();
|
|
|
+ for (let i = 0; i < this.roleEmpList.length; i++) {
|
|
|
+ var send_weixin_data1 = {
|
|
|
+ name: "getRemindData",
|
|
|
+ parammaps: {
|
|
|
+ userId: this.roleEmpList[i].id,
|
|
|
+ remindId: 85,
|
|
|
+ remindTypeName: "生产工单",
|
|
|
+ rowId: row.id,
|
|
|
+ },
|
|
|
+ };
|
|
|
+ handleWechatPushOfWorkOrder(send_weixin_data1, 85).catch((error) => {
|
|
|
+ console.error("微信推送失败:", error);
|
|
|
+ });
|
|
|
+ }
|
|
|
this.$notify({
|
|
|
title: "成功",
|
|
|
message: "完成计划",
|
|
@@ -2196,6 +2208,20 @@ export default {
|
|
|
(response) => {
|
|
|
if (response.msg !== "fail") {
|
|
|
this.get_production_work_order();
|
|
|
+ for (let i = 0; i < this.roleEmpList.length; i++) {
|
|
|
+ var send_weixin_data1 = {
|
|
|
+ name: "getRemindData",
|
|
|
+ parammaps: {
|
|
|
+ userId: this.roleEmpList[i].id,
|
|
|
+ remindId: 83,
|
|
|
+ remindTypeName: "生产工单",
|
|
|
+ rowId: row.id,
|
|
|
+ },
|
|
|
+ };
|
|
|
+ handleWechatPushOfWorkOrder(send_weixin_data1, 83).catch((error) => {
|
|
|
+ console.error("微信推送失败:", error);
|
|
|
+ });
|
|
|
+ }
|
|
|
this.$notify({
|
|
|
title: "成功",
|
|
|
message: "开始生产",
|
|
@@ -2223,14 +2249,12 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleProcessRecordsDel(row) {
|
|
|
- console.log(row);
|
|
|
this.processRecordsListAdd = this.processRecordsListAdd.filter(
|
|
|
(item) => item.id !== row.id
|
|
|
);
|
|
|
},
|
|
|
|
|
|
handleEditProcessRecordsDel(row) {
|
|
|
- console.log(row);
|
|
|
this.processRecordsList = this.processRecordsList.filter(
|
|
|
(item) => item.id !== row.id
|
|
|
);
|
|
@@ -2388,11 +2412,9 @@ export default {
|
|
|
},
|
|
|
handleMenuSelect(index) {
|
|
|
this.activeMenuItem = index; // 更新选中的菜单项
|
|
|
- console.log(this.activeMenuItem);
|
|
|
},
|
|
|
form_search() {},
|
|
|
changeAll() {
|
|
|
- console.log(this.radioAll);
|
|
|
this.getProductionWorkOrder.parammaps.radioAll = this.radioAll;
|
|
|
this.get_production_work_order();
|
|
|
},
|
|
@@ -2406,7 +2428,6 @@ export default {
|
|
|
this.isOrderTakingData.accepterName = Cookies.get("employename");
|
|
|
},
|
|
|
handleOrderTakingById(row) {
|
|
|
- console.log(row);
|
|
|
this.dialogTitle = "确认反馈";
|
|
|
this.isOrderTaking = true;
|
|
|
this.isOrderTakingData.acceptTime = this.getDefaultDate();
|
|
@@ -2455,7 +2476,6 @@ export default {
|
|
|
this.isFillInDailyData.days_diff = row.days_diff;
|
|
|
this.isFillInDailyData.estimatedCompletionTime =
|
|
|
row.estimatedCompletionTime;
|
|
|
- console.log(row);
|
|
|
this.getProductionOrderGoodsFillOutParm.parammaps.id = row.id;
|
|
|
this.getProductionOrderGoodsFillOutParm.parammaps.empId =
|
|
|
Cookies.get("employeid");
|
|
@@ -2480,6 +2500,7 @@ export default {
|
|
|
},
|
|
|
handleTurnDown(row) {
|
|
|
this.isFillInDailyData.id = row.id;
|
|
|
+ this.isFillInDailyData.ordererId = row.ordererId;
|
|
|
this.dialogTitle = "关单 ";
|
|
|
this.isTurnDown = true;
|
|
|
},
|
|
@@ -2491,12 +2512,24 @@ export default {
|
|
|
this.isFillInDailyData.rejectedReason;
|
|
|
this.editProductionOrderRejectedParm.parammaps.accepterId =
|
|
|
Cookies.get("employeid");
|
|
|
- console.log(this.isFillInDailyData);
|
|
|
PostDataByName(this.editProductionOrderRejectedParm).then((response) => {
|
|
|
if (response.msg !== "fail") {
|
|
|
this.get_production_work_order();
|
|
|
this.isTurnDown = false;
|
|
|
|
|
|
+ var send_weixin_data1 = {
|
|
|
+ name: "getRemindData",
|
|
|
+ parammaps: {
|
|
|
+ userId: this.isFillInDailyData.ordererId,
|
|
|
+ remindId: 84,
|
|
|
+ remindTypeName: "生产工单",
|
|
|
+ rowId: this.isFillInDailyData.id,
|
|
|
+ },
|
|
|
+ };
|
|
|
+ handleWechatPushOfWorkOrder(send_weixin_data1, 84).catch((error) => {
|
|
|
+ console.error("微信推送失败:", error);
|
|
|
+ });
|
|
|
+
|
|
|
this.$notify({
|
|
|
title: "成功",
|
|
|
message: "驳回成功",
|
|
@@ -2513,7 +2546,6 @@ export default {
|
|
|
this.isTurnDown = false;
|
|
|
},
|
|
|
saveFillInDailyCancel(row) {
|
|
|
- console.log(this.productionOrderGoodsList);
|
|
|
if (
|
|
|
this.productionOrderGoodsList &&
|
|
|
this.productionOrderGoodsList.length > 0
|
|
@@ -2591,6 +2623,7 @@ export default {
|
|
|
PostDataByName(this.delProductionWorkOrder).then((response) => {
|
|
|
if (response.msg !== "fail") {
|
|
|
this.get_production_work_order();
|
|
|
+
|
|
|
this.$notify({
|
|
|
title: "成功",
|
|
|
message: "删除成功",
|
|
@@ -2614,6 +2647,21 @@ export default {
|
|
|
PostDataByName(this.delProductionWorkOrder).then((response) => {
|
|
|
if (response.msg !== "fail") {
|
|
|
this.get_production_work_order();
|
|
|
+
|
|
|
+ var send_weixin_data1 = {
|
|
|
+ name: "getRemindData",
|
|
|
+ parammaps: {
|
|
|
+ userId: row.ordererId,
|
|
|
+ remindId: 86,
|
|
|
+ remindTypeName: "生产工单",
|
|
|
+ rowId: this.isFillInDailyData.id,
|
|
|
+ },
|
|
|
+ };
|
|
|
+ handleWechatPushOfWorkOrder(send_weixin_data1, 84).catch((error) => {
|
|
|
+ console.error("微信推送失败:", error);
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
this.$notify({
|
|
|
title: "成功",
|
|
|
message: "删除成功",
|
|
@@ -2631,14 +2679,12 @@ export default {
|
|
|
this.isOrderTaking = false;
|
|
|
},
|
|
|
handleDel(row) {
|
|
|
- console.log(this.listAdd);
|
|
|
MessageBox.confirm("设备名称:" + row.goodsName, "确认删除?", {
|
|
|
confirmButtonText: "确认",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
}).then(() => {
|
|
|
for (var i = 0; i < this.listAdd.length; i++) {
|
|
|
- console.log(this.listAdd[i]);
|
|
|
if (this.listAdd[i].id === row.id) {
|
|
|
var listAddIndex = this.listAdd.indexOf(this.listAdd[i]);
|
|
|
}
|
|
@@ -2650,14 +2696,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleEditDel(row) {
|
|
|
- console.log(this.productionOrderGoodsList);
|
|
|
+
|
|
|
MessageBox.confirm("设备名称:" + row.goodsName, "确认删除?", {
|
|
|
confirmButtonText: "确认",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
}).then(() => {
|
|
|
for (var i = 0; i < this.productionOrderGoodsList.length; i++) {
|
|
|
- console.log(this.productionOrderGoodsList[i]);
|
|
|
if (this.productionOrderGoodsList[i].id === row.id) {
|
|
|
var listAddIndex = this.productionOrderGoodsList.indexOf(
|
|
|
this.productionOrderGoodsList[i]
|
|
@@ -2709,12 +2754,6 @@ export default {
|
|
|
(response) => {
|
|
|
if (response.data && response.data.list) {
|
|
|
this.processRecordsList = response.data.list;
|
|
|
-
|
|
|
- console.log("processRecordsList:", this.processRecordsList);
|
|
|
- console.log(
|
|
|
- "productionOrderGoodsList:",
|
|
|
- this.productionOrderGoodsList
|
|
|
- );
|
|
|
this.dialogTitle = "编辑";
|
|
|
|
|
|
this.formLabelAlign.id = row.id;
|
|
@@ -2870,8 +2909,6 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleEditAndOff() {
|
|
|
- console.log(this.productionOrderGoodsList.length);
|
|
|
- console.log(this.productionOrderGoodsList);
|
|
|
if (this.productionOrderGoodsList.length === 0) {
|
|
|
this.$notify({
|
|
|
title: "失败",
|
|
@@ -2928,7 +2965,7 @@ export default {
|
|
|
type: "e",
|
|
|
parammaps: {
|
|
|
productionOrderId: this.formLabelAlign.id,
|
|
|
- goodsId: "@insertProductionOrderGoods.id",
|
|
|
+ goodsId: "@insertProductionOrderGoods.goodsId",
|
|
|
priority: "@insertProductionOrderGoods.priority",
|
|
|
totalQuantity: "@insertProductionOrderGoods.totalQuantity",
|
|
|
},
|
|
@@ -3119,6 +3156,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ get_emp_role_data() {
|
|
|
+ GetDataByName(this.getEmployeesRoleParm).then((response) => {
|
|
|
+ if (response.data && response.data.list) {
|
|
|
+ this.roleEmpList = response.data.list;
|
|
|
+ } else {
|
|
|
+ this.roleEmpList = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getProductionOrderGoods(id) {
|
|
|
this.productionOrderGoodsList = [];
|
|
|
this.getProductionOrderGoodsParm.parammaps.id = id;
|
|
@@ -3200,16 +3246,16 @@ export default {
|
|
|
get_order_code() {
|
|
|
GetDataByName(this.getOrderCodeParm).then((response) => {
|
|
|
if (response.data && response.data.list) {
|
|
|
- console.log(response.data.list[0].generated_code);
|
|
|
+ // console.log(response.data.list[0].generated_code);
|
|
|
this.formLabelAlign.orderCode = response.data.list[0].generated_code;
|
|
|
- console.log(this.formLabelAlign.orderCode);
|
|
|
+ // console.log(this.formLabelAlign.orderCode);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
get_contract_pull() {
|
|
|
GetDataByName(this.getContractPullParm).then((response) => {
|
|
|
if (response.data && response.data.list) {
|
|
|
- console.log(response.data.list[0].generated_code);
|
|
|
+ // console.log(response.data.list[0].generated_code);
|
|
|
this.contractList = response.data.list;
|
|
|
}
|
|
|
});
|
|
@@ -3236,8 +3282,9 @@ export default {
|
|
|
created() {
|
|
|
this.get_contract_pull();
|
|
|
this.get_emp_data();
|
|
|
-
|
|
|
+
|
|
|
this.get_production_work_order();
|
|
|
+ this.get_emp_role_data();
|
|
|
},
|
|
|
};
|
|
|
</script>
|