|
|
@ -78,7 +78,9 @@ |
|
|
|
border-color='#fe8463' type="primary" shape='circle' /> |
|
|
|
<u-tag text="待开工" v-if="item.status==0" 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 && item.flagDo != 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 && item.flagDo == 1" bg-color='rgba(255,255,255,0)' color='#fe8463' |
|
|
|
border-color='#fe8463' type="primary" shape='circle' /> |
|
|
|
<u-tag text="待配料" v-if="item.status==2" bg-color='rgba(255,255,255,0)' color='#fe8463' |
|
|
|
border-color='#fe8463' type="primary" shape='circle' /> |
|
|
@ -102,7 +104,7 @@ |
|
|
|
<u-tr> |
|
|
|
<u-th>步骤</u-th> |
|
|
|
<u-th>编码</u-th> |
|
|
|
<u-th v-if="item.status==1 && item.flagDo != 1" >操作</u-th> |
|
|
|
<u-th v-if="item.status==1" >操作</u-th> |
|
|
|
</u-tr> |
|
|
|
<u-tr v-for="(detail, detailIndex) in item.detailDOList" :key="detailIndex" |
|
|
|
class="text"> |
|
|
@ -126,6 +128,9 @@ |
|
|
|
<u-td v-if="detail.status==3 && item.status==1 && item.flagDo != 1"> |
|
|
|
<u-button type="warning" class="tableBtn" >已报工</u-button> |
|
|
|
</u-td> |
|
|
|
<u-td v-if="item.status==1 && item.flagDo == 1"> |
|
|
|
<u-button type="warning" class="tableBtn" >待领料</u-button> |
|
|
|
</u-td> |
|
|
|
</u-tr> |
|
|
|
|
|
|
|
</u-table> |
|
|
@ -143,6 +148,8 @@ |
|
|
|
@click="callBasicItem(item)" class="btn">叫料</u-button> |
|
|
|
<u-button v-if="item.flagDo==0 && item.status==1 && item.workingNode != 'endNode'" type="error" size="mini" |
|
|
|
@click="addBasicItem(item)" class="btn">补料</u-button> |
|
|
|
<u-button v-if="item.flagDo == 1 && item.status == 1 " type="primary" size="mini" |
|
|
|
@click="goReceiveItem(item)" class="btn">领料</u-button> |
|
|
|
<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 && item.workingNode != 'endNode'" type="success" size="mini" |
|
|
@ -198,7 +205,7 @@ |
|
|
|
const { proxy } = getCurrentInstance() |
|
|
|
const current = ref(0) |
|
|
|
const status = ref('loadmore') //是否显示没有更多了 |
|
|
|
const falg = ref('') |
|
|
|
const flag = ref('') |
|
|
|
const list = ref([]) |
|
|
|
const searchValue = ref('') |
|
|
|
|
|
|
@ -251,7 +258,7 @@ |
|
|
|
}).catch(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
}) |
|
|
|
falg.value = 'view' |
|
|
|
flag.value = 'view' |
|
|
|
} |
|
|
|
|
|
|
|
function getTabsList() { |
|
|
@ -271,7 +278,7 @@ |
|
|
|
}).catch(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
}) |
|
|
|
falg.value = 'tab' |
|
|
|
flag.value = 'tab' |
|
|
|
} |
|
|
|
|
|
|
|
//查询待领料数据 |
|
|
@ -291,7 +298,7 @@ |
|
|
|
}).catch(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
}) |
|
|
|
falg.value = 'request' |
|
|
|
flag.value = 'request' |
|
|
|
} |
|
|
|
|
|
|
|
//离线登记处理 |
|
|
@ -307,7 +314,7 @@ |
|
|
|
|
|
|
|
//首次进页面触发 |
|
|
|
onShow(() => { |
|
|
|
falg.value == 'tab' |
|
|
|
flag.value == 'tab' |
|
|
|
status.value = 'loading' |
|
|
|
tabParams.value.flagDo = '' |
|
|
|
current.value = 0 |
|
|
@ -319,17 +326,17 @@ |
|
|
|
}) |
|
|
|
//滑动到底部展示 |
|
|
|
onReachBottom(() => { |
|
|
|
if (falg.value == 'tab') { |
|
|
|
if (flag.value == 'tab') { |
|
|
|
status.value = 'loading' |
|
|
|
getTabsList() |
|
|
|
} |
|
|
|
|
|
|
|
if (falg.value == 'view') { |
|
|
|
if (flag.value == 'view') { |
|
|
|
status.value = 'loading' |
|
|
|
getViewList() |
|
|
|
} |
|
|
|
|
|
|
|
if (falg.value == 'request') { |
|
|
|
if (flag.value == 'request') { |
|
|
|
status.value = 'loading' |
|
|
|
getRequestList() |
|
|
|
} |
|
|
@ -395,7 +402,7 @@ |
|
|
|
tabParams.value.flagDo = ''; |
|
|
|
current.value = index; |
|
|
|
tabParams.value.pageNo = 1; |
|
|
|
falg.value == 'tab' |
|
|
|
flag.value == 'tab' |
|
|
|
switch (index) { |
|
|
|
case 0: |
|
|
|
tabParams.value.status = ''; |
|
|
@ -411,7 +418,7 @@ |
|
|
|
tabParams.value.status = '1'; |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
falg.value == 'request' |
|
|
|
flag.value = 'request' |
|
|
|
list.value = []; |
|
|
|
status.value = 'loading'; |
|
|
|
tabParams.value.status = '0'; |
|
|
@ -450,42 +457,19 @@ |
|
|
|
processCode: 'QD_CY_01' |
|
|
|
}) |
|
|
|
|
|
|
|
async function searchTable() { |
|
|
|
// tabParams.value.planMasterCode = searchValue.value |
|
|
|
function searchTable() { |
|
|
|
list.value = [] |
|
|
|
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) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
if(flag.value == 'request'){ |
|
|
|
getRequestList() |
|
|
|
} |
|
|
|
if(flag.value == 'tab'){ |
|
|
|
getTabsList(); |
|
|
|
} |
|
|
|
} |
|
|
|
// 完工处理->验证 |
|
|
|
function finished(item) { |
|
|
|
submitFinish(item) |
|
|
|
// console.log(item) |
|
|
|
// nodeInfo.value.planDayCode = item.planMasterCode |
|
|
|
// nodeInfo.value.processCode = item.workingNode |
|
|
|
// workSchedulingListApi.getNodePosition(nodeInfo.value).then((res) => { |
|
|
|
// proxy.$modal.closeLoading() |
|
|
|
// if (res.data != null && res.data == "end") { |
|
|
|
// proxy.$modal.confirm('确定提交完工吗?').then(() => { |
|
|
|
// submitFinish(item) |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// _toast("当前不是最后工序,不允许完工") |
|
|
|
// // proxy.$modal.loading("当前不是最后工序,不允许完工") |
|
|
|
// // setTimeout(() => { |
|
|
|
// // proxy.$modal.closeLoading() |
|
|
|
// // }, 1000) |
|
|
|
// } |
|
|
|
// }).catch(() => { |
|
|
|
// proxy.$modal.closeLoading() |
|
|
|
// }) |
|
|
|
} |
|
|
|
// 完工处理->提交 |
|
|
|
function submitFinish(item) { |
|
|
@ -518,29 +502,9 @@ |
|
|
|
} |
|
|
|
const objString = JSON.stringify(getParams); |
|
|
|
proxy.$tab.navigateTo(`/pages/mes/workScheduling/waitReport?obj=${encodeURIComponent(objString)}`) |
|
|
|
// proxy.$modal.loading("加载中") |
|
|
|
// await workSchedulingApi.getConfigProcessWorker({ |
|
|
|
// planDayCode: item.planMasterCode, |
|
|
|
// processCode: item.workingNode, |
|
|
|
// schedulingCode: item.schedulingCode |
|
|
|
// }).then((res) => { |
|
|
|
// uni.setStorageSync("isLeader", res.data.leader) |
|
|
|
// if (res.data.persons.length == 0) { |
|
|
|
// _toast("没有可以报工项") |
|
|
|
// return |
|
|
|
// } |
|
|
|
// uni.setStorageSync("processReportList", res.data.persons) |
|
|
|
// uni.redirectTo({ |
|
|
|
// url: res.data.leader ? "/pages/mes/workScheduling/processReportPeopleCheck" : "/pages/mes/workScheduling/processReportForm" |
|
|
|
// }) |
|
|
|
// }).finally(() => { |
|
|
|
// proxy.$modal.closeLoading() |
|
|
|
// }) |
|
|
|
} |
|
|
|
//待质检页面跳转 |
|
|
|
function waitCheck(item){ |
|
|
|
// console.log(item) |
|
|
|
// proxy.$tab.navigateTo(`/pages/mes/workScheduling/waitQuality?obj=${JSON.stringify(item)}`) |
|
|
|
const getParams = { |
|
|
|
planNoDay:item.planNoDay, |
|
|
|
nodeCode:item.nodeCode, |
|
|
@ -550,6 +514,28 @@ |
|
|
|
const objString = JSON.stringify(getParams); |
|
|
|
proxy.$tab.navigateTo(`/pages/mes/workScheduling/waitQuality?obj=${encodeURIComponent(objString)}`) |
|
|
|
} |
|
|
|
|
|
|
|
//切换tab页面,跳转待配料 |
|
|
|
function goReceiveItem(item){ |
|
|
|
proxy.$modal.confirm('确定提交领料吗').then(() => { |
|
|
|
proxy.$modal.loading('处理中') |
|
|
|
workSchedulingListApi.receiveItem(item).then((res) => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
if (res.data) { |
|
|
|
// status.value = 'loadmore' |
|
|
|
tabParams.value.status = '1' |
|
|
|
tabParams.value.pageNo = 1 |
|
|
|
list.value = [] |
|
|
|
getTabsList(); |
|
|
|
} else { |
|
|
|
|
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
}) |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 叫料 |
|
|
|
function callBasicItem(item) { |
|
|
|