diff --git a/src/pages/Middle/Mold/MoldProductionOrder/ComponentDetail.vue b/src/pages/Middle/Mold/MoldProductionOrder/ComponentDetail.vue
index 6b19b13..dedb634 100644
--- a/src/pages/Middle/Mold/MoldProductionOrder/ComponentDetail.vue
+++ b/src/pages/Middle/Mold/MoldProductionOrder/ComponentDetail.vue
@@ -88,9 +88,9 @@
发料
-
+
{{ $mk.getDateString(row.send_time) }}
-
撤销
+
撤销
@@ -102,7 +102,7 @@
完成
{{ $mk.getDateString(row.complete_time) }}
-
撤销
+
撤销
@@ -400,7 +400,7 @@ export default {
this.detailsData2[i].department_detail = row.department_detail;
-
+
}
}
});
@@ -408,9 +408,9 @@ export default {
}
}
- setTimeout(()=>{
+ setTimeout(() => {
this.detailsData2 = JSON.parse(JSON.stringify(this.detailsData2));
- },500);
+ }, 500);
},
@@ -457,52 +457,74 @@ export default {
return this.$mk.toBigInt(dataId);
},
pageComplete(row) {
- this.$mk.post({
- url: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/reporting`,
- data: {
- id:this.$mk.toBigInt( row.id)
- },
- useBigInt: true,
- }).then(a => {
- if (a.code == 200) {
- this.$mk.success("操作成功");
- this.$emit("reloadData");
+
+ this.$mk.confirm('您确定完成吗?').then(type => {
+ if (type == 'confirm') {
+ this.$mk.post({
+ url: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/reporting`,
+ data: {
+ id: this.$mk.toBigInt(row.id)
+ },
+ useBigInt: true,
+ }).then(a => {
+ if (a.code == 200) {
+ this.$mk.success("操作成功");
+ this.$emit("reloadData");
+ }
+ });
}
});
+
+
},
- pageDone(row,isUndo) {
- this.$mk.post({
- url: isUndo ?
- `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/CancelReporting`:
- `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/Reporting`,
- data: {
- id: this.$mk.toBigInt( row.id)
- },
- useBigInt: true,
- }).then(a => {
- if (a.code == 200) {
- this.$mk.success("操作成功");
- this.$emit("reloadData");
+ pageDone(row, isUndo) {
+
+
+ this.$mk.confirm(!isUndo ? '您确定要报工吗?' : '您确定撤销吗?').then(type => {
+ if (type == 'confirm') {
+ this.$mk.post({
+ url: isUndo ?
+ `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/CancelReporting` :
+ `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/Reporting`,
+ data: {
+ id: this.$mk.toBigInt(row.id)
+ },
+ useBigInt: true,
+ }).then(a => {
+ if (a.code == 200) {
+ this.$mk.success("操作成功");
+ this.$emit("reloadData");
+ }
+ });
}
});
+
+
},
- pageSend(row,isUndo) {
- this.$mk.post({
- url: isUndo ?
- `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/CancelSendMaterial`:
- `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/SendMaterial`,
- data: {
- id:this.$mk.toBigInt( row.id)
- },
- useBigInt: true,
- }).then(a => {
- if (a.code == 200) {
- this.$mk.success("操作成功");
- this.$emit("reloadData");
+ pageSend(row, isUndo) {
+
+ this.$mk.confirm(!isUndo ? '您确定要发料吗?' : '您确定撤销吗?').then(type => {
+ if (type == 'confirm') {
+ this.$mk.post({
+ url: isUndo ?
+ `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/CancelSendMaterial` :
+ `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/SendMaterial`,
+ data: {
+ id: this.$mk.toBigInt(row.id)
+ },
+ useBigInt: true,
+ }).then(a => {
+ if (a.code == 200) {
+ this.$mk.success("操作成功");
+ this.$emit("reloadData");
+ }
+ });
}
});
+
+
},
pageAdd(row) {
diff --git a/src/pages/Middle/Mold/Touch/Reporting.vue b/src/pages/Middle/Mold/Touch/Reporting.vue
index ecb2204..270750d 100644
--- a/src/pages/Middle/Mold/Touch/Reporting.vue
+++ b/src/pages/Middle/Mold/Touch/Reporting.vue
@@ -37,9 +37,14 @@
发料
+
撤销发料
-
报工
+
+
撤销报工
+
@@ -122,7 +127,7 @@ export default {
currentId: 0,
detailsData: [],
detailsData3: [],
- current_mold_production_order_component_processes:[],
+ current_mold_production_order_component_processes: [],
formOptions2: {
data: {
},
@@ -346,6 +351,8 @@ export default {
this.tableDataOrders = JSON.parse(JSON.stringify(a.data.mold_production_order || []));
this.allDetailsData = JSON.parse(JSON.stringify(a.data.mold_production_order_component_processes || []));
+
+
}).catch((a) => {
this.loading = false
this.$mk.error(a.data.msg);
@@ -384,7 +391,7 @@ export default {
if (v.types == "mold_production_order_component_processes") {
this.loadVehicle({ id: v.id });
}
-
+
setTimeout(() => {
const $pulldown = this.$refs.pulldownRef
if ($pulldown) {
@@ -438,18 +445,18 @@ export default {
});
},
loadProcesses({ id }) {
- let ds = this.detailsData || [];
- if(ds.filter(a=>a.process_id.toString() == id.toString()).length){
- return;
- }
+ let ds = this.detailsData || [];
+ if (ds.filter(a => a.process_id.toString() == id.toString()).length) {
+ return;
+ }
- this.current_mold_production_order_component_processes.forEach(item=>{
-
- if(item.process_id.toString() == id.toString()){
+ this.current_mold_production_order_component_processes.forEach(item => {
+
+ if (item.process_id.toString() == id.toString()) {
ds.push(item);
}
- })
- this.detailsData = ds;
+ })
+ this.detailsData = ds;
},
loadProductionOrder({ id }) {
@@ -473,15 +480,17 @@ export default {
this.formOptions2.data = data2
this.formOptions3.data = data3
- this.current_mold_production_order_component_processes = row.mold_production_order_component_processes;
+ this.current_mold_production_order_component_processes = row.mold_production_order_component_processes;
this.detailsData = [];
+
+ //this.detailsData = JSON.parse(JSON.stringify(row.mold_production_order_component_processes || []));
});
},
loadVehicle({ id }) {
-
+
this.loading = true
this.$mk.get({
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/getVehicle/${process.env.VUE_APP_BEID}/${process.env.VUE_APP_PTYID}/${process.env.VUE_APP_COMPANY_ID}/0/${process.env.VUE_APP_APPTOKEN}/${process.env.VUE_APP_COMPANYTOKEN}/${id}`,
@@ -547,65 +556,85 @@ export default {
},
- pageReport(item) {
+ pageReport(item, isUndo) {
+ this.$mk.confirm(!isUndo ? '您确定要报工吗?' : '您确定撤销吗?').then(type => {
+ if (type == 'confirm') {
- this.$mk.post({
- url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/create`,
- loading: "报工中...",
- data: {
- "ptyid": parseInt(process.env.VUE_APP_PTYID),
- "project_token": process.env.VUE_APP_APPTOKEN,
- "store_id": 0,
- "beid": parseInt(process.env.VUE_APP_BEID),
- "company_token": process.env.VUE_APP_COMPANYTOKEN,
- "id": this.$mk.toBigInt(item.id),
- "company_id": parseInt(process.env.VUE_APP_COMPANY_ID)
- },
- useBigInt: true,
- }).then(a => {
- console.log(a)
- if (a.code == 200) {
- this.$mk.success("报工成功");
+ this.$mk.post({
+ url:
+ isUndo ?
+ `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/cancel` :
+ `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/create`,
- this.loadProductionOrder({ id: this.currentId });
+ loading: "操作中...",
+ data: {
+ "ptyid": parseInt(process.env.VUE_APP_PTYID),
+ "project_token": process.env.VUE_APP_APPTOKEN,
+ "store_id": 0,
+ "beid": parseInt(process.env.VUE_APP_BEID),
+ "company_token": process.env.VUE_APP_COMPANYTOKEN,
+ "id": this.$mk.toBigInt(item.id),
+ "company_id": parseInt(process.env.VUE_APP_COMPANY_ID)
+ },
+ useBigInt: true,
+ }).then(a => {
+ console.log(a)
+ if (a.code == 200) {
+ this.$mk.success("操作成功");
- } else {
+ this.loadProductionOrder({ id: this.currentId });
+
+ } else {
+
+ this.$mk.error(a.msg || a.message);
+ }
+
+ });
- this.$mk.error(a.msg || a.message);
}
-
});
+
+
},
- pageSend(item) {
+ pageSend(item, isUndo) {
console.log(item)
- this.$mk.post({
- url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/sendMaterial`,
- loading: "发料中...",
- data: {
- "ptyid": parseInt(process.env.VUE_APP_PTYID),
- "project_token": process.env.VUE_APP_APPTOKEN,
- "store_id": 0,
- "beid": parseInt(process.env.VUE_APP_BEID),
- "company_token": process.env.VUE_APP_COMPANYTOKEN,
- "id": this.$mk.toBigInt(item.id),
- "company_id": parseInt(process.env.VUE_APP_COMPANY_ID)
- },
- useBigInt: true,
- }).then(a => {
- console.log(a)
- if (a.code == 200) {
- this.$mk.success("发料成功");
- this.loadProductionOrder({ id: this.currentId });
+ this.$mk.confirm(!isUndo ? '您确定要发料吗?' : '您确定撤销吗?').then(type => {
+ if (type == 'confirm') {
+ this.$mk.post({
+ url: isUndo ?
+ `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/cancelSendMaterial` :
+ `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/sendMaterial`,
+ loading: "操作中...",
+ data: {
+ "ptyid": parseInt(process.env.VUE_APP_PTYID),
+ "project_token": process.env.VUE_APP_APPTOKEN,
+ "store_id": 0,
+ "beid": parseInt(process.env.VUE_APP_BEID),
+ "company_token": process.env.VUE_APP_COMPANYTOKEN,
+ "id": this.$mk.toBigInt(item.id),
+ "company_id": parseInt(process.env.VUE_APP_COMPANY_ID)
+ },
+ useBigInt: true,
+ }).then(a => {
+ console.log(a)
+ if (a.code == 200) {
+ this.$mk.success("操作成功");
- } else {
+ this.loadProductionOrder({ id: this.currentId });
- this.$mk.error(a.msg || a.message);
+ } else {
+
+ this.$mk.error(a.msg || a.message);
+ }
+
+ });
}
-
});
+
+
},