|
@@ -47,9 +47,10 @@
|
|
|
</view>
|
|
|
</block>
|
|
|
<nodes :nodes="detail.nodes" @nodeClick="nodeClick" />
|
|
|
- <view style="height: 22vw;" />
|
|
|
+ <view :style="{ height: isShowBut ? '22vw' : '30px' }" />
|
|
|
</My_listbox>
|
|
|
- <but ref="but" :sa_workorderid="sa_workorderid" :status="detail.status" @onUpdate="getDetail" />
|
|
|
+ <but ref="but" :sa_workorderid="sa_workorderid" :status="detail.status" @onUpdate="getDetail"
|
|
|
+ @unShowBut="onUnShowBut" />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -67,6 +68,7 @@ export default {
|
|
|
status: "",
|
|
|
node: null,
|
|
|
},
|
|
|
+ isShowBut: true,
|
|
|
sa_workorderid: 0,
|
|
|
}
|
|
|
},
|
|
@@ -104,18 +106,30 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
nodeClick(node) {
|
|
|
- if (this.detail.status != '进行中') {
|
|
|
+ this.$Http.node = node;
|
|
|
+ if (['待接单', '待开始'].includes(this.detail.status)) {
|
|
|
if (this.detail.status == '待开始') this.node = node;
|
|
|
this.$refs.but.onClick(true)
|
|
|
- return
|
|
|
- } else {
|
|
|
-
|
|
|
- console.log("跳转", node)
|
|
|
-
|
|
|
-
|
|
|
+ } else if (['暂停', '作废', '已完成'].includes(this.detail.status)) {
|
|
|
+ // 3、暂停/作废/已完成的工单,点击工序详情可查询,不可编辑;
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/packageA/workOrder/setNode?readOnly=true'
|
|
|
+ });
|
|
|
+ } else if (this.detail.status == '进行中') {
|
|
|
+ // 2、已开始的工单(工单状态为进行中),点击工序进入工序详情,若工序未完成,可查询可编辑;已完成工序仅查询不可编辑
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/packageA/workOrder/setNode'
|
|
|
+ });
|
|
|
+ this.node = null;
|
|
|
}
|
|
|
+ },
|
|
|
+ onUnShowBut(e) {
|
|
|
+ this.isShowBut = e;
|
|
|
}
|
|
|
},
|
|
|
+ onUnload() {
|
|
|
+ delete this.$Http.node
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|