|
|
@@ -19,6 +19,7 @@
|
|
|
"
|
|
|
:planId="currentPlans.id"
|
|
|
:info="currentPlans"
|
|
|
+ :workOrderInfo="workOrderInfo"
|
|
|
@done="setWorkOrderIdAndStatus"
|
|
|
/>
|
|
|
<!-- 1 报工 -->
|
|
|
@@ -31,9 +32,10 @@
|
|
|
<!-- 2 执行中 3 完成展示详情-->
|
|
|
<workOrderDetails
|
|
|
v-if="
|
|
|
- currentPlans.status == 3 || currentPlans.status == 2
|
|
|
+ (currentPlans.status == 3 || currentPlans.status == 2)
|
|
|
"
|
|
|
- :workOrderId="currentPlanRecords.id"
|
|
|
+ :workOrderId="currentPlans.matchedRecords[0].id"
|
|
|
+ :workOrderInfo="workOrderInfo"
|
|
|
></workOrderDetails>
|
|
|
</div>
|
|
|
|
|
|
@@ -83,6 +85,12 @@
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
+ props: {
|
|
|
+ workOrderInfo: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {}
|
|
|
+ }
|
|
|
+ },
|
|
|
components: {
|
|
|
signingUpWork,
|
|
|
workOrderDetails,
|
|
|
@@ -110,13 +118,9 @@
|
|
|
// 当前计划工单信息
|
|
|
currentPlanRecords() {
|
|
|
if (this.currentPlans && this.currentPlans.matchedRecords) {
|
|
|
- console.log('this.currentPlans.matchedRecords', this.currentPlans.matchedRecords[this.activeIndex]);
|
|
|
return this.currentPlans.matchedRecords?.[0] || {};
|
|
|
}
|
|
|
return {};
|
|
|
- },
|
|
|
- orderLength() {
|
|
|
- return this.currentPlans.status == 0 || this.currentPlans.status == 4 ? this.rulesInfo.plans.length : this.currentPlans.matchedRecords.length;
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -146,9 +150,11 @@
|
|
|
this.rulesInfo.plans[this.activeIndex].status = status;
|
|
|
},
|
|
|
setWorkOrderIdAndStatus(workOrderId) {
|
|
|
- // console.log('workOrderId', workOrderId);
|
|
|
- this.rulesInfo.plans[this.activeIndex].matchedRecords[0].id =
|
|
|
- workOrderId;
|
|
|
+ const currentPlan = this.rulesInfo.plans[this.activeIndex];
|
|
|
+
|
|
|
+ this.$set(currentPlan.matchedRecords, 0, {
|
|
|
+ id: workOrderId,
|
|
|
+ });
|
|
|
this.setStatus(2);
|
|
|
}
|
|
|
}
|