模具 发料完工增加确认框
This commit is contained in:
parent
637d61250b
commit
9e49b56978
|
|
@ -88,9 +88,9 @@
|
|||
<div v-if="getDataId()">
|
||||
<a-button v-if="!row.is_send" @click.stop="pageSend(row)" type="primary">发料</a-button>
|
||||
<div v-if="row.is_send">
|
||||
|
||||
|
||||
{{ $mk.getDateString(row.send_time) }}
|
||||
<a-button @click.stop="pageSend(row,true)" >撤销</a-button>
|
||||
<a-button v-if="!row.is_complete" @click.stop="pageSend(row, true)">撤销</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
<a-button v-if="!row.is_complete" @click.stop="pageDone(row)" type="primary">完成</a-button>
|
||||
<div v-if="row.is_complete">
|
||||
{{ $mk.getDateString(row.complete_time) }}
|
||||
<a-button @click.stop="pageDone(row,true)" >撤销</a-button>
|
||||
<a-button @click.stop="pageDone(row, true)">撤销</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -37,9 +37,14 @@
|
|||
</div>
|
||||
<div class="gx-item-col">
|
||||
<a-button type="primary" @click="pageSend(item)" v-if="item.is_send !== 1">发料</a-button>
|
||||
<a-button @click="pageSend(item, true)" v-else-if="!item.is_complete">撤销发料</a-button>
|
||||
|
||||
<a-button type="primary" @click="pageReport(item)"
|
||||
<a-button style="margin-left: 3px;" type="primary" @click="pageReport(item)"
|
||||
v-if="item.is_send && item.is_complete !== 1">报工</a-button>
|
||||
|
||||
<a-button style="margin-left: 3px;" @click="pageReport(item,true)"
|
||||
v-if="item.is_complete == 1">撤销报工</a-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-item-progress">
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue