模具 发料完工增加确认框
This commit is contained in:
parent
637d61250b
commit
9e49b56978
|
|
@ -88,9 +88,9 @@
|
||||||
<div v-if="getDataId()">
|
<div v-if="getDataId()">
|
||||||
<a-button v-if="!row.is_send" @click.stop="pageSend(row)" type="primary">发料</a-button>
|
<a-button v-if="!row.is_send" @click.stop="pageSend(row)" type="primary">发料</a-button>
|
||||||
<div v-if="row.is_send">
|
<div v-if="row.is_send">
|
||||||
|
|
||||||
{{ $mk.getDateString(row.send_time) }}
|
{{ $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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -102,7 +102,7 @@
|
||||||
<a-button v-if="!row.is_complete" @click.stop="pageDone(row)" type="primary">完成</a-button>
|
<a-button v-if="!row.is_complete" @click.stop="pageDone(row)" type="primary">完成</a-button>
|
||||||
<div v-if="row.is_complete">
|
<div v-if="row.is_complete">
|
||||||
{{ $mk.getDateString(row.complete_time) }}
|
{{ $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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -400,7 +400,7 @@ export default {
|
||||||
this.detailsData2[i].department_detail = row.department_detail;
|
this.detailsData2[i].department_detail = row.department_detail;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -408,9 +408,9 @@ export default {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
this.detailsData2 = JSON.parse(JSON.stringify(this.detailsData2));
|
this.detailsData2 = JSON.parse(JSON.stringify(this.detailsData2));
|
||||||
},500);
|
}, 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -457,52 +457,74 @@ export default {
|
||||||
return this.$mk.toBigInt(dataId);
|
return this.$mk.toBigInt(dataId);
|
||||||
},
|
},
|
||||||
pageComplete(row) {
|
pageComplete(row) {
|
||||||
this.$mk.post({
|
|
||||||
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/reporting`,
|
this.$mk.confirm('您确定完成吗?').then(type => {
|
||||||
data: {
|
if (type == 'confirm') {
|
||||||
id:this.$mk.toBigInt( row.id)
|
this.$mk.post({
|
||||||
},
|
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/reporting`,
|
||||||
useBigInt: true,
|
data: {
|
||||||
}).then(a => {
|
id: this.$mk.toBigInt(row.id)
|
||||||
if (a.code == 200) {
|
},
|
||||||
this.$mk.success("操作成功");
|
useBigInt: true,
|
||||||
this.$emit("reloadData");
|
}).then(a => {
|
||||||
|
if (a.code == 200) {
|
||||||
|
this.$mk.success("操作成功");
|
||||||
|
this.$emit("reloadData");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
pageDone(row,isUndo) {
|
pageDone(row, isUndo) {
|
||||||
this.$mk.post({
|
|
||||||
url: isUndo ?
|
|
||||||
`${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/CancelReporting`:
|
this.$mk.confirm(!isUndo ? '您确定要报工吗?' : '您确定撤销吗?').then(type => {
|
||||||
`${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/Reporting`,
|
if (type == 'confirm') {
|
||||||
data: {
|
this.$mk.post({
|
||||||
id: this.$mk.toBigInt( row.id)
|
url: isUndo ?
|
||||||
},
|
`${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/CancelReporting` :
|
||||||
useBigInt: true,
|
`${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/Reporting`,
|
||||||
}).then(a => {
|
data: {
|
||||||
if (a.code == 200) {
|
id: this.$mk.toBigInt(row.id)
|
||||||
this.$mk.success("操作成功");
|
},
|
||||||
this.$emit("reloadData");
|
useBigInt: true,
|
||||||
|
}).then(a => {
|
||||||
|
if (a.code == 200) {
|
||||||
|
this.$mk.success("操作成功");
|
||||||
|
this.$emit("reloadData");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
pageSend(row,isUndo) {
|
pageSend(row, isUndo) {
|
||||||
this.$mk.post({
|
|
||||||
url: isUndo ?
|
this.$mk.confirm(!isUndo ? '您确定要发料吗?' : '您确定撤销吗?').then(type => {
|
||||||
`${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/CancelSendMaterial`:
|
if (type == 'confirm') {
|
||||||
`${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/SendMaterial`,
|
this.$mk.post({
|
||||||
data: {
|
url: isUndo ?
|
||||||
id:this.$mk.toBigInt( row.id)
|
`${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/CancelSendMaterial` :
|
||||||
},
|
`${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/SendMaterial`,
|
||||||
useBigInt: true,
|
data: {
|
||||||
}).then(a => {
|
id: this.$mk.toBigInt(row.id)
|
||||||
if (a.code == 200) {
|
},
|
||||||
this.$mk.success("操作成功");
|
useBigInt: true,
|
||||||
this.$emit("reloadData");
|
}).then(a => {
|
||||||
|
if (a.code == 200) {
|
||||||
|
this.$mk.success("操作成功");
|
||||||
|
this.$emit("reloadData");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
pageAdd(row) {
|
pageAdd(row) {
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="gx-item-col">
|
<div class="gx-item-col">
|
||||||
<a-button type="primary" @click="pageSend(item)" v-if="item.is_send !== 1">发料</a-button>
|
<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>
|
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>
|
</div>
|
||||||
<div class="card-item-progress">
|
<div class="card-item-progress">
|
||||||
|
|
@ -122,7 +127,7 @@ export default {
|
||||||
currentId: 0,
|
currentId: 0,
|
||||||
detailsData: [],
|
detailsData: [],
|
||||||
detailsData3: [],
|
detailsData3: [],
|
||||||
current_mold_production_order_component_processes:[],
|
current_mold_production_order_component_processes: [],
|
||||||
formOptions2: {
|
formOptions2: {
|
||||||
data: {
|
data: {
|
||||||
},
|
},
|
||||||
|
|
@ -346,6 +351,8 @@ export default {
|
||||||
this.tableDataOrders = JSON.parse(JSON.stringify(a.data.mold_production_order || []));
|
this.tableDataOrders = JSON.parse(JSON.stringify(a.data.mold_production_order || []));
|
||||||
|
|
||||||
this.allDetailsData = JSON.parse(JSON.stringify(a.data.mold_production_order_component_processes || []));
|
this.allDetailsData = JSON.parse(JSON.stringify(a.data.mold_production_order_component_processes || []));
|
||||||
|
|
||||||
|
|
||||||
}).catch((a) => {
|
}).catch((a) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$mk.error(a.data.msg);
|
this.$mk.error(a.data.msg);
|
||||||
|
|
@ -384,7 +391,7 @@ export default {
|
||||||
if (v.types == "mold_production_order_component_processes") {
|
if (v.types == "mold_production_order_component_processes") {
|
||||||
this.loadVehicle({ id: v.id });
|
this.loadVehicle({ id: v.id });
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const $pulldown = this.$refs.pulldownRef
|
const $pulldown = this.$refs.pulldownRef
|
||||||
if ($pulldown) {
|
if ($pulldown) {
|
||||||
|
|
@ -438,18 +445,18 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadProcesses({ id }) {
|
loadProcesses({ id }) {
|
||||||
let ds = this.detailsData || [];
|
let ds = this.detailsData || [];
|
||||||
if(ds.filter(a=>a.process_id.toString() == id.toString()).length){
|
if (ds.filter(a => a.process_id.toString() == id.toString()).length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.current_mold_production_order_component_processes.forEach(item=>{
|
this.current_mold_production_order_component_processes.forEach(item => {
|
||||||
|
|
||||||
if(item.process_id.toString() == id.toString()){
|
if (item.process_id.toString() == id.toString()) {
|
||||||
ds.push(item);
|
ds.push(item);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.detailsData = ds;
|
this.detailsData = ds;
|
||||||
},
|
},
|
||||||
loadProductionOrder({ id }) {
|
loadProductionOrder({ id }) {
|
||||||
|
|
||||||
|
|
@ -473,15 +480,17 @@ export default {
|
||||||
|
|
||||||
this.formOptions2.data = data2
|
this.formOptions2.data = data2
|
||||||
this.formOptions3.data = data3
|
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 = [];
|
||||||
|
|
||||||
|
|
||||||
|
//this.detailsData = JSON.parse(JSON.stringify(row.mold_production_order_component_processes || []));
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
loadVehicle({ id }) {
|
loadVehicle({ id }) {
|
||||||
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.$mk.get({
|
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}`,
|
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({
|
this.$mk.post({
|
||||||
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/create`,
|
url:
|
||||||
loading: "报工中...",
|
isUndo ?
|
||||||
data: {
|
`${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/cancel` :
|
||||||
"ptyid": parseInt(process.env.VUE_APP_PTYID),
|
`${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/create`,
|
||||||
"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 });
|
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)
|
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