Browse Source

feat: update 计划看板,工单任务增加终止操作,查看详情改为表格形式

master
TengXF 6 months ago
parent
commit
10fe36a8c4
  1. 4
      src/api/mes/orderDay/index.ts
  2. 99
      src/pages/mes/orderDayPlan/detail.vue
  3. 36
      src/pages/mes/orderDayPlan/orderDayPlan.vue
  4. 2
      src/pages/mes/workScheduling/workScheduling.vue

4
src/api/mes/orderDay/index.ts

@ -48,3 +48,7 @@ export function getBomInfoList(params) {
export function updateBomInfo(params) { export function updateBomInfo(params) {
return http.post('/mes/complete-inspect/update', params) return http.post('/mes/complete-inspect/update', params)
} }
export function planStop(params) {
return http.post('/mes/orderday/stopPlan/'+ params)
}

99
src/pages/mes/orderDayPlan/detail.vue

@ -1,6 +1,68 @@
<template> <template>
<view class="detail-container">
<view class="info">
<view class="title">
<view>日计划明细</view>
</view>
<view>
<u-table class="custom-table">
<u-tr >
<u-td >日计划号</u-td>
<u-td >{{ data.planNoDay }}</u-td>
</u-tr>
<u-tr>
<u-td >计划数量</u-td>
<u-td>{{ data.planCount }}</u-td>
</u-tr>
<u-tr>
<u-td>批次码</u-td>
<u-td>{{ data.batchCode }}</u-td>
</u-tr>
<u-tr>
<u-td>产品编码</u-td>
<u-td>{{ data.productCode }}</u-td>
</u-tr>
<u-tr>
<u-td>车间编码</u-td>
<u-td>{{ data.workroomCode }}</u-td>
</u-tr>
<u-tr>
<u-td>产线编码</u-td>
<u-td>{{ data.lineCode }}</u-td>
</u-tr>
<u-tr>
<u-td>工艺路线编码</u-td>
<u-td>{{ data.processrouteCode }}</u-td>
</u-tr>
<u-tr>
<u-td>BOM版本</u-td>
<u-td>{{ data.standardBom }}</u-td>
</u-tr>
<u-tr>
<u-td>工单模式</u-td>
<u-td v-if="data.workMode=='BATCH'">批量</u-td>
<u-td v-if="data.workMode=='SINGLE'">单个模式</u-td>
</u-tr>
<u-tr>
<u-td>计划日期</u-td>
<u-td>{{ `${$time.formatDate(data.planDate)}` }}</u-td>
</u-tr>
<u-tr>
<u-td>开始时间</u-td>
<u-td>{{ `${$time.formatDate(data.startTime)}` }}</u-td>
</u-tr>
<u-tr>
<u-td>结束时间</u-td>
<u-td>{{ `${$time.formatDate(data.endTime)}` }}</u-td>
</u-tr>
</u-table>
</view>
</view>
</view>
<!-- 详情 --> <!-- 详情 -->
<view class="detail-container"> <!-- <view class="detail-container">
<view class="info"> <view class="info">
<view class="title"> <view class="title">
<view>日计划明细</view> <view>日计划明细</view>
@ -66,21 +128,13 @@
<view>结束时间</view> <view>结束时间</view>
<view>{{ `${$time.formatDate(data.endTime)}` }}</view> <view>{{ `${$time.formatDate(data.endTime)}` }}</view>
</view> </view>
<view class="dec-item">
<view>齐套检查-Bom</view>
<view>{{ data.bomInspect }}</view>
</view>
</view> </view>
</view> </view>
<view class="footer" v-if="from == 3"> <view class="footer" v-if="from == 3">
<view class="btns">
<button class="reset" @click="reject">驳回</button>
<button class="sure" @click="agree" :loading='loading' :disabled='loading'>通过</button>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view> </view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view> </view> -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -94,10 +148,10 @@ import {
} from 'vue' } from 'vue'
import * as orderDayPlanListApi from '@/api/mes/orderDay/index.ts' import * as orderDayPlanListApi from '@/api/mes/orderDay/index.ts'
const {proxy} = getCurrentInstance()
const number = ref('') const number = ref('')
const data = ref({}) const data = ref({})
const loading = ref(false)
const from = ref()//13 const from = ref()//13
const type = ref() const type = ref()
@ -124,6 +178,27 @@ onShow(() => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.custom-table {
margin-left: auto;
margin-right: auto;
//margin-top: 20px;
border-collapse: collapse;
border: 0px solid black;
width: 100%;
}
.custom-table th,
// .custom-table td {
// border: 1px solid black;
// padding: 8px;
// text-align: center;
// }
.custom-table-td {
padding: 1px;
text-align: center;
}
.detail-container { .detail-container {
min-height: 100vh; min-height: 100vh;
background: white; background: white;

36
src/pages/mes/orderDayPlan/orderDayPlan.vue

@ -31,8 +31,6 @@
<view class="dec"> <view class="dec">
<view>状态</view> <view>状态</view>
<view> <view>
<!-- <u-tag text="待齐套" v-if="item.status==-1" bg-color='rgba(255,255,255,0)' color='#fe8463'
border-color='#fe8463' type="primary" shape='circle'/> -->
<u-tag text="待排产" v-if="item.status==1" bg-color='rgba(255,255,255,0)' color='#fe8463' <u-tag text="待排产" v-if="item.status==1" bg-color='rgba(255,255,255,0)' color='#fe8463'
border-color='#fe8463' type="primary" shape='circle'/> border-color='#fe8463' type="primary" shape='circle'/>
<u-tag text="已排产" v-if="item.status==2" bg-color='rgba(255,255,255,0)' color='#fe8463' <u-tag text="已排产" v-if="item.status==2" bg-color='rgba(255,255,255,0)' color='#fe8463'
@ -45,9 +43,9 @@
border-color='#fe8463' type="primary" shape='circle'/> border-color='#fe8463' type="primary" shape='circle'/>
</view> </view>
</view> </view>
<!-- <view v-if="item.status==-1" > <view>
<u-button type="primary" @click="openInspectItem(item)">齐套检查</u-button> <u-button type="error" v-if="item.status==2 || item.status==1" @click="stopPlan(item)">终止</u-button>
</view> --> </view>
</view> </view>
<view style="height: 94rpx;padding-top: 30rpx;"> <view style="height: 94rpx;padding-top: 30rpx;">
<u-loadmore :status="status" v-if="status != 'loadmore'" /> <u-loadmore :status="status" v-if="status != 'loadmore'" />
@ -134,6 +132,27 @@ const tabParams = ref({
flag: null flag: null
}) })
function stopPlan(item){
item.id = 100;
console.log(item)
proxy.$modal.confirm('确定提交终止吗').then(() => {
proxy.$modal.loading('处理中')
orderDayPlanListApi.planStop(item.id).then((res) => {
proxy.$modal.closeLoading()
if (res.data) {
list.value = []
status.value = 'loadmore'
getTabsList()
} else {
}
}).catch(() => {
proxy.$modal.closeLoading()
})
proxy.$modal.closeLoading()
})
}
function getTabsList() { function getTabsList() {
if (status.value == 'nomore') return if (status.value == 'nomore') return
status.value = 'loading' status.value = 'loading'
@ -299,4 +318,11 @@ async function searchTable() {
} }
} }
} }
.btn {
margin-left: 8px;
width: 55px;
height: 35px;
font-size: 17px
}
</style> </style>

2
src/pages/mes/workScheduling/workScheduling.vue

@ -104,7 +104,7 @@
class="text"> class="text">
<u-td>{{ detailIndex + 1 }}</u-td> <u-td>{{ detailIndex + 1 }}</u-td>
<u-td>{{ detail.nodeCode }}</u-td> <u-td>{{ detail.nodeCode }}</u-td>
<u-td v-if="detail.nodeCode==item.workingNode && item.status==1"> <u-td v-if="detail.nodeCode==item.workingNode && item.status==1 && detail.status==0">
<u-button type="success" @click="nodeCodeFinish(detail)" class="tableBtn" >待完成</u-button> <u-button type="success" @click="nodeCodeFinish(detail)" class="tableBtn" >待完成</u-button>
</u-td> </u-td>
<u-td v-if="detail.status==2 && item.status==1"> <u-td v-if="detail.status==2 && item.status==1">

Loading…
Cancel
Save