| | |
| | | 客户名称:{{ currentTaskData.Order.customer || "" }} |
| | | </div> |
| | | <div class="title-item title-item-two"> |
| | | 货物描述: {{ currentTaskData.Order.orderAttr || "" }} |
| | | 通道: {{ channelNameConfig[currentTaskData.Channel] || "" }} |
| | | </div> |
| | | |
| | | <div class="title-item title-item-two"> |
| | |
| | | {{ item.Key }}:{{ item.Value || "" }} |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="process-err-tip" v-if="getProcessParamsErrMsg"> |
| | | <div class="tip-icon"> |
| | | <span class="el-icon-error color_error"></span> |
| | | </div> |
| | | <div class="tip-content"> |
| | | 提示: {{getProcessParamsErrMsg}} |
| | | </div> |
| | | </div> |
| | | <div class="process-box" v-if="showBtn === 2 || showBtn === 3"> |
| | |
| | | </template> |
| | | </div> |
| | | <!--左翻页按钮--> |
| | | <div v-show="showPreviousTaskBtn" class="paginator-btn previous" @click="previousTask"><</div> |
| | | <div v-show="showPreviousTaskBtn" class="paginator-btn previous" :class="{disabled:showBtn ===2 ||messageError}" @click="previousTask"><</div> |
| | | <!--右翻页按钮--> |
| | | <div v-show="showNextTaskBtn" class="paginator-btn next" @click="nextTask">></div> |
| | | <div v-show="showNextTaskBtn" class="paginator-btn next" :class="{disabled:showBtn ===2 ||messageError}" @click="nextTask">></div> |
| | | </div> |
| | | <div slot="footer" :class="messageError?'dialog-footer tac btn-error':'dialog-footer tac'" |
| | | style="overflow: hidden"> |
| | | <template v-if="messageError"> |
| | | <template v-if="messageError || getProcessParamsErrMsg"> |
| | | <div class="btn" v-if="messageError ==='下发成功!'||getProcessParamsErrMsg" @click="closeClick"> |
| | | <img src="../../public/close-btn.png"/> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import {getTaskInfo, sendProcessParams, startTask,} from "@/api/home"; // 产线 |
| | | import {channelNameConfig} from "@/common/constants"; |
| | | export default { |
| | | name: 'TaskControlModal', |
| | | components: {}, |
| | |
| | | isLoading: false, |
| | | second: 0, |
| | | secondTimer: null, |
| | | channelNameConfig: channelNameConfig |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | getCurrentTaskProduceParams(id) { |
| | | // const id = this.currentTaskData?.Procedure?.ID |
| | | if (id) { |
| | | this.currentProcessParams = [] |
| | | this.getProcessParamsErrMsg = "" |
| | | startTask({id}).then((res) => { |
| | | if (res.code === 200) { |
| | | this.currentProcessParams = res.data.Params ?? [] |
| | | this.getProcessParamsErrMsg ='' |
| | | } else { |
| | | this.currentProcessParams = [] |
| | | this.getProcessParamsErrMsg = res.msg ?? '获取工艺参数失败!'; |
| | | } |
| | | this.getInfo() |
| | | },err=>{ |
| | | console.error(err) |
| | | this.currentProcessParams = [] |
| | | this.getProcessParamsErrMsg = '获取工艺参数失败!' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 前翻页 |
| | | */ |
| | | previousTask() { |
| | | // 生产准备倒计时中和下发失败禁止翻页 |
| | | if (this.showBtn === 2 || this.messageError){ |
| | | return |
| | | } |
| | | if (this.currentTaskIndex - 1 >= 0) { |
| | | this.currentTaskIndex -= 1 |
| | | this.$nextTick(() => { |
| | |
| | | * 后翻页 |
| | | */ |
| | | nextTask() { |
| | | // 生产准备倒计时中和下发失败禁止翻页 |
| | | if (this.showBtn === 2 || this.messageError){ |
| | | return |
| | | } |
| | | if (this.currentTaskIndex + 1 <= this.taskList.length - 1) { |
| | | this.currentTaskIndex += 1 |
| | | this.$nextTick(() => { |
| | |
| | | if (this.currentTaskData?.Procedure?.ID && this.currentTaskData?.Procedure?.Status === 1) { |
| | | this.num = 0; |
| | | this.showBtn = 1; |
| | | this.show = true; |
| | | // this.show = true; |
| | | } else { |
| | | this.show = false; |
| | | } |
| | | if (this.getProcessParamsErrMsg) { |
| | | this.messageError = this.getProcessParamsErrMsg; |
| | | } |
| | | }, |
| | | getDateObj(date, fmt) { |
| | |
| | | &.next { |
| | | right: -60px; |
| | | padding-left: 4px; |
| | | |
| | | } |
| | | &.disabled{ |
| | | background-color: #cccccc; |
| | | opacity: 0.8; |
| | | cursor: not-allowed; |
| | | } |
| | | } |
| | | |
| | |
| | | color: #ffffffaa; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | } |
| | | .process-err-tip{ |
| | | box-sizing: border-box; |
| | | padding-top: 10px; |
| | | height: 160px; |
| | | width: 100%; |
| | | .tip-icon{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | height: 70px; |
| | | .el-icon-error{ |
| | | font-size: 70px; |
| | | } |
| | | } |
| | | .tip-content{ |
| | | height: 70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #fff; |
| | | font-size: 17px; |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | </style> |