This commit is contained in:
zxx 2023-06-25 01:19:21 +08:00
commit 5c221cdc1b
1 changed files with 41 additions and 6 deletions

View File

@ -34,10 +34,10 @@
<a-button @click="pageSearch">
<a-icon type="search" />
</a-button>
<a-button :disabled="!nextId" @click="pageNext">
<a-button @click="pageNext">
<a-icon type="left" />
</a-button>
<a-button :disabled="!prevId" @click="pagePrev">
<a-button @click="pagePrev">
<a-icon type="right" />
</a-button>
</a-button-group>
@ -447,6 +447,10 @@ export default {
},
getDataId_BigInt() {
let dataId = this.getDataId();
if(!dataId) return 0;
if(typeof(dataId) == "object"){
return dataId;
}
return this.$mk.toBigInt(dataId);
},
@ -630,12 +634,43 @@ export default {
},
pageNext() {
this.dataId = this.nextId;
this.pageInit();
this.$mk.post({
url: `${BASE_URL.BASE_URL}/MesProductionOrder/v1/mes/production/order/switch`,
data: {
id: this.getDataId_BigInt(),
next: 1
},
useBigInt: true
}).then(a => {
if (a.code == "200") {
this.dataId = a.data.mes_production_order_detail_response.mes_production_order.id;
this.pageInit();
}
else {
this.$mk.error(a.msg);
}
});
},
pagePrev() {
this.dataId = this.prevId;
this.pageInit();
this.$mk.post({
url: `${BASE_URL.BASE_URL}/MesProductionOrder/v1/mes/production/order/switch`,
data: {
id: this.getDataId_BigInt(),
next: 0
},
useBigInt: true
}).then(a => {
if (a.code == "200") {
this.dataId = a.data.mes_production_order_detail_response.mes_production_order.id;
this.pageInit();
}
else {
this.$mk.error(a.msg);
}
});
},
pageApproved() {
let dataId = this.getDataId();