|
|
@ -2,8 +2,8 @@ |
|
|
|
<view class="container"> |
|
|
|
<view class="list"> |
|
|
|
<view> |
|
|
|
<u-search :show-action="true" v-model="searchValue" action-text="搜索" input-align="left" height="65" |
|
|
|
border-color=#5599FF @search="searchTable()"> |
|
|
|
<u-search :show-action="true" v-model="tabParams.planMasterCode" action-text="搜索" input-align="left" height="65" |
|
|
|
border-color=#5599FF @search="searchTable()" @custom="searchTable()" placeholder="请输入计划号"> |
|
|
|
</u-search> |
|
|
|
<u-tabs :list="list1" :is-scroll="true" active-color="#5599FF" v-model="current" |
|
|
|
@change="tabsChange"></u-tabs> |
|
|
@ -43,6 +43,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
<view v-if="current!=4" class="item" v-for="(item, index) in list" :key="index"> |
|
|
|
<view class="dec"> |
|
|
|
<view>ID 测试用:</view> |
|
|
|
<view>{{ item.id }}</view> |
|
|
|
</view> |
|
|
|
<view class="dec"> |
|
|
|
<view>计划号:</view> |
|
|
|
<view>{{ item.planMasterCode }}</view> |
|
|
@ -130,7 +134,7 @@ |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<u-button type="success" v-if="item.status==-1" size="mini" class="btn" |
|
|
|
@click="openInspectItem(item)">齐套检查</u-button> |
|
|
|
@click="openInspectItem(item)">待齐套</u-button> |
|
|
|
<u-button type="success" v-if="item.status==0" size="mini" class="btn" |
|
|
|
@click="kaigong(item)">开工</u-button> |
|
|
|
<u-button type="success" size="mini" @click="SOP(item)" class="btn" |
|
|
@ -139,9 +143,7 @@ |
|
|
|
@click="callBasicItem(item)" class="btn">叫料</u-button> |
|
|
|
<u-button v-if="item.flagDo==0 && item.status==1" type="error" size="mini" |
|
|
|
@click="addBasicItem(item)" class="btn">补料</u-button> |
|
|
|
<!-- <u-button v-if="(current==3||current==0) && item.status==1" type="success" size="mini" |
|
|
|
@click="finished(item)" class="btn">完工</u-button> --> |
|
|
|
<u-button v-if="item.status==1 && item.workingNode =='endNode'" type="success" size="mini" |
|
|
|
<u-button v-if="item.status==1 && item.workingNode =='endNode'" type="success" size="mini" |
|
|
|
@click="finished(item)" class="btn">完工</u-button> |
|
|
|
<u-button v-if="(current==3||current==0) && item.status==1" type="success" size="mini" |
|
|
|
style="background-color:#888888" |
|
|
@ -161,7 +163,6 @@ |
|
|
|
import { getCurrentInstance, ref } from "vue" |
|
|
|
|
|
|
|
import * as workSchedulingListApi from "@/api/mes/workScheduling/index.ts" |
|
|
|
import * as workSchedulingApi from "@/api/mes/workScheduling" |
|
|
|
import { _toast } from "@/utils/common" |
|
|
|
|
|
|
|
const list1 = ref([ |
|
|
@ -228,19 +229,37 @@ |
|
|
|
falg.value = 'view' |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getFormattedDate(date) { |
|
|
|
const year = date.getFullYear(); |
|
|
|
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要+1 |
|
|
|
const day = String(date.getDate()).padStart(2, '0'); |
|
|
|
return `${year}-${month}-${day}`; |
|
|
|
} |
|
|
|
|
|
|
|
const now = new Date(); |
|
|
|
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate()); |
|
|
|
const twoDaysAgo = new Date(today); |
|
|
|
twoDaysAgo.setDate(today.getDate() - 2); |
|
|
|
|
|
|
|
const tabParams = ref({ |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10, |
|
|
|
status: '', |
|
|
|
flag: null, |
|
|
|
flagDo: '' |
|
|
|
flagDo: '', |
|
|
|
planMasterCode:'', |
|
|
|
// createTime: [getFormattedDate(twoDaysAgo), getFormattedDate(today)] |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
async function getTabsList() { |
|
|
|
|
|
|
|
function getTabsList() { |
|
|
|
console.log(tabParams.value) |
|
|
|
if (status.value == 'nomore') return |
|
|
|
status.value = 'loading' |
|
|
|
proxy.$modal.loading('加载中') |
|
|
|
await workSchedulingListApi.getWorkSchedulingPDAPage(tabParams.value).then((res) => { |
|
|
|
workSchedulingListApi.getWorkSchedulingPDAPage(tabParams.value).then((res) => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
if (res.data.list.length > 0) { |
|
|
|
list.value = list.value.concat(res.data.list) |
|
|
@ -379,6 +398,7 @@ |
|
|
|
switch (index) { |
|
|
|
case 0: |
|
|
|
tabParams.value.status = ''; |
|
|
|
tabParams.value.planMasterCode = '' |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
tabParams.value.status = '-1'; |
|
|
@ -429,13 +449,19 @@ |
|
|
|
}) |
|
|
|
|
|
|
|
async function searchTable() { |
|
|
|
console.log(searchValue.value) |
|
|
|
// tabParams.value.planMasterCode = searchValue.value |
|
|
|
list.value = [] |
|
|
|
searchTableParams.value.planNoDay = this.searchValue |
|
|
|
await workSchedulingListApi.getWorkSchedulingPDAPage(searchTableParams.value).then((res) => { |
|
|
|
if (res.data.list.length > 0) { |
|
|
|
list.value = list.value.concat(res.data.list) |
|
|
|
} |
|
|
|
}) |
|
|
|
tabParams.value.pageNo = 1 |
|
|
|
getTabsList() |
|
|
|
// list.value = [] |
|
|
|
// searchTableParams.value.planNoDay = this.searchValue |
|
|
|
// console.log(searchTableParams.value) |
|
|
|
// await workSchedulingListApi.getWorkSchedulingPDAPage(searchTableParams.value).then((res) => { |
|
|
|
// if (res.data.list.length > 0) { |
|
|
|
// list.value = list.value.concat(res.data.list) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
} |
|
|
|
// 完工处理->验证 |
|
|
|
function finished(item) { |
|
|
|