|
@ -2,8 +2,8 @@ |
|
|
<view class="container"> |
|
|
<view class="container"> |
|
|
<view class="list"> |
|
|
<view class="list"> |
|
|
<view> |
|
|
<view> |
|
|
<u-search :show-action="true" v-model="searchValue" action-text="搜索" input-align="left" height="65" |
|
|
<u-search :show-action="true" v-model="tabParams.planMasterCode" action-text="搜索" input-align="left" height="65" |
|
|
border-color=#5599FF @search="searchTable()"> |
|
|
border-color=#5599FF @search="searchTable()" @custom="searchTable()" placeholder="请输入计划号"> |
|
|
</u-search> |
|
|
</u-search> |
|
|
<u-tabs :list="list1" :is-scroll="true" active-color="#5599FF" v-model="current" |
|
|
<u-tabs :list="list1" :is-scroll="true" active-color="#5599FF" v-model="current" |
|
|
@change="tabsChange"></u-tabs> |
|
|
@change="tabsChange"></u-tabs> |
|
@ -43,6 +43,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view v-if="current!=4" class="item" v-for="(item, index) in list" :key="index"> |
|
|
<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 class="dec"> |
|
|
<view>计划号:</view> |
|
|
<view>计划号:</view> |
|
|
<view>{{ item.planMasterCode }}</view> |
|
|
<view>{{ item.planMasterCode }}</view> |
|
@ -130,7 +134,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view> |
|
|
<view> |
|
|
<u-button type="success" v-if="item.status==-1" size="mini" class="btn" |
|
|
<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" |
|
|
<u-button type="success" v-if="item.status==0" size="mini" class="btn" |
|
|
@click="kaigong(item)">开工</u-button> |
|
|
@click="kaigong(item)">开工</u-button> |
|
|
<u-button type="success" size="mini" @click="SOP(item)" class="btn" |
|
|
<u-button type="success" size="mini" @click="SOP(item)" class="btn" |
|
@ -139,8 +143,6 @@ |
|
|
@click="callBasicItem(item)" class="btn">叫料</u-button> |
|
|
@click="callBasicItem(item)" class="btn">叫料</u-button> |
|
|
<u-button v-if="item.flagDo==0 && item.status==1" type="error" size="mini" |
|
|
<u-button v-if="item.flagDo==0 && item.status==1" type="error" size="mini" |
|
|
@click="addBasicItem(item)" class="btn">补料</u-button> |
|
|
@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> |
|
|
@click="finished(item)" class="btn">完工</u-button> |
|
|
<u-button v-if="(current==3||current==0) && item.status==1" type="success" size="mini" |
|
|
<u-button v-if="(current==3||current==0) && item.status==1" type="success" size="mini" |
|
@ -161,7 +163,6 @@ |
|
|
import { getCurrentInstance, ref } from "vue" |
|
|
import { getCurrentInstance, ref } from "vue" |
|
|
|
|
|
|
|
|
import * as workSchedulingListApi from "@/api/mes/workScheduling/index.ts" |
|
|
import * as workSchedulingListApi from "@/api/mes/workScheduling/index.ts" |
|
|
import * as workSchedulingApi from "@/api/mes/workScheduling" |
|
|
|
|
|
import { _toast } from "@/utils/common" |
|
|
import { _toast } from "@/utils/common" |
|
|
|
|
|
|
|
|
const list1 = ref([ |
|
|
const list1 = ref([ |
|
@ -228,19 +229,37 @@ |
|
|
falg.value = 'view' |
|
|
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({ |
|
|
const tabParams = ref({ |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|
pageSize: 10, |
|
|
pageSize: 10, |
|
|
status: '', |
|
|
status: '', |
|
|
flag: null, |
|
|
flag: null, |
|
|
flagDo: '' |
|
|
flagDo: '', |
|
|
|
|
|
planMasterCode:'', |
|
|
|
|
|
// createTime: [getFormattedDate(twoDaysAgo), getFormattedDate(today)] |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
async function getTabsList() { |
|
|
|
|
|
|
|
|
function getTabsList() { |
|
|
|
|
|
console.log(tabParams.value) |
|
|
if (status.value == 'nomore') return |
|
|
if (status.value == 'nomore') return |
|
|
status.value = 'loading' |
|
|
status.value = 'loading' |
|
|
proxy.$modal.loading('加载中') |
|
|
proxy.$modal.loading('加载中') |
|
|
await workSchedulingListApi.getWorkSchedulingPDAPage(tabParams.value).then((res) => { |
|
|
workSchedulingListApi.getWorkSchedulingPDAPage(tabParams.value).then((res) => { |
|
|
proxy.$modal.closeLoading() |
|
|
proxy.$modal.closeLoading() |
|
|
if (res.data.list.length > 0) { |
|
|
if (res.data.list.length > 0) { |
|
|
list.value = list.value.concat(res.data.list) |
|
|
list.value = list.value.concat(res.data.list) |
|
@ -379,6 +398,7 @@ |
|
|
switch (index) { |
|
|
switch (index) { |
|
|
case 0: |
|
|
case 0: |
|
|
tabParams.value.status = ''; |
|
|
tabParams.value.status = ''; |
|
|
|
|
|
tabParams.value.planMasterCode = '' |
|
|
break; |
|
|
break; |
|
|
case 1: |
|
|
case 1: |
|
|
tabParams.value.status = '-1'; |
|
|
tabParams.value.status = '-1'; |
|
@ -429,13 +449,19 @@ |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
async function searchTable() { |
|
|
async function searchTable() { |
|
|
|
|
|
console.log(searchValue.value) |
|
|
|
|
|
// tabParams.value.planMasterCode = searchValue.value |
|
|
list.value = [] |
|
|
list.value = [] |
|
|
searchTableParams.value.planNoDay = this.searchValue |
|
|
tabParams.value.pageNo = 1 |
|
|
await workSchedulingListApi.getWorkSchedulingPDAPage(searchTableParams.value).then((res) => { |
|
|
getTabsList() |
|
|
if (res.data.list.length > 0) { |
|
|
// list.value = [] |
|
|
list.value = list.value.concat(res.data.list) |
|
|
// 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) { |
|
|
function finished(item) { |
|
|