|
@ -78,7 +78,9 @@ |
|
|
border-color='#fe8463' type="primary" shape='circle' /> |
|
|
border-color='#fe8463' type="primary" shape='circle' /> |
|
|
<u-tag text="待开工" v-if="item.status==0" bg-color='rgba(255,255,255,0)' color='#fe8463' |
|
|
<u-tag text="待开工" v-if="item.status==0" 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==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' /> |
|
|
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' |
|
|
border-color='#fe8463' type="primary" shape='circle' /> |
|
|
border-color='#fe8463' type="primary" shape='circle' /> |
|
@ -102,7 +104,7 @@ |
|
|
<u-tr> |
|
|
<u-tr> |
|
|
<u-th>步骤</u-th> |
|
|
<u-th>步骤</u-th> |
|
|
<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> |
|
|
<u-tr v-for="(detail, detailIndex) in item.detailDOList" :key="detailIndex" |
|
|
<u-tr v-for="(detail, detailIndex) in item.detailDOList" :key="detailIndex" |
|
|
class="text"> |
|
|
class="text"> |
|
@ -126,6 +128,9 @@ |
|
|
<u-td v-if="detail.status==3 && item.status==1 && item.flagDo != 1"> |
|
|
<u-td v-if="detail.status==3 && item.status==1 && item.flagDo != 1"> |
|
|
<u-button type="warning" class="tableBtn" >已报工</u-button> |
|
|
<u-button type="warning" class="tableBtn" >已报工</u-button> |
|
|
</u-td> |
|
|
</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-tr> |
|
|
|
|
|
|
|
|
</u-table> |
|
|
</u-table> |
|
@ -143,6 +148,8 @@ |
|
|
@click="callBasicItem(item)" class="btn">叫料</u-button> |
|
|
@click="callBasicItem(item)" class="btn">叫料</u-button> |
|
|
<u-button v-if="item.flagDo==0 && item.status==1 && item.workingNode != 'endNode'" type="error" size="mini" |
|
|
<u-button v-if="item.flagDo==0 && item.status==1 && item.workingNode != 'endNode'" type="error" size="mini" |
|
|
@click="addBasicItem(item)" class="btn">补料</u-button> |
|
|
@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" |
|
|
<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 && item.workingNode != 'endNode'" type="success" size="mini" |
|
|
<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 { proxy } = getCurrentInstance() |
|
|
const current = ref(0) |
|
|
const current = ref(0) |
|
|
const status = ref('loadmore') //是否显示没有更多了 |
|
|
const status = ref('loadmore') //是否显示没有更多了 |
|
|
const falg = ref('') |
|
|
const flag = ref('') |
|
|
const list = ref([]) |
|
|
const list = ref([]) |
|
|
const searchValue = ref('') |
|
|
const searchValue = ref('') |
|
|
|
|
|
|
|
@ -251,7 +258,7 @@ |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
proxy.$modal.closeLoading() |
|
|
proxy.$modal.closeLoading() |
|
|
}) |
|
|
}) |
|
|
falg.value = 'view' |
|
|
flag.value = 'view' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function getTabsList() { |
|
|
function getTabsList() { |
|
@ -271,7 +278,7 @@ |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
proxy.$modal.closeLoading() |
|
|
proxy.$modal.closeLoading() |
|
|
}) |
|
|
}) |
|
|
falg.value = 'tab' |
|
|
flag.value = 'tab' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//查询待领料数据 |
|
|
//查询待领料数据 |
|
@ -291,7 +298,7 @@ |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
proxy.$modal.closeLoading() |
|
|
proxy.$modal.closeLoading() |
|
|
}) |
|
|
}) |
|
|
falg.value = 'request' |
|
|
flag.value = 'request' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//离线登记处理 |
|
|
//离线登记处理 |
|
@ -307,7 +314,7 @@ |
|
|
|
|
|
|
|
|
//首次进页面触发 |
|
|
//首次进页面触发 |
|
|
onShow(() => { |
|
|
onShow(() => { |
|
|
falg.value == 'tab' |
|
|
flag.value == 'tab' |
|
|
status.value = 'loading' |
|
|
status.value = 'loading' |
|
|
tabParams.value.flagDo = '' |
|
|
tabParams.value.flagDo = '' |
|
|
current.value = 0 |
|
|
current.value = 0 |
|
@ -319,17 +326,17 @@ |
|
|
}) |
|
|
}) |
|
|
//滑动到底部展示 |
|
|
//滑动到底部展示 |
|
|
onReachBottom(() => { |
|
|
onReachBottom(() => { |
|
|
if (falg.value == 'tab') { |
|
|
if (flag.value == 'tab') { |
|
|
status.value = 'loading' |
|
|
status.value = 'loading' |
|
|
getTabsList() |
|
|
getTabsList() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (falg.value == 'view') { |
|
|
if (flag.value == 'view') { |
|
|
status.value = 'loading' |
|
|
status.value = 'loading' |
|
|
getViewList() |
|
|
getViewList() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (falg.value == 'request') { |
|
|
if (flag.value == 'request') { |
|
|
status.value = 'loading' |
|
|
status.value = 'loading' |
|
|
getRequestList() |
|
|
getRequestList() |
|
|
} |
|
|
} |
|
@ -395,7 +402,7 @@ |
|
|
tabParams.value.flagDo = ''; |
|
|
tabParams.value.flagDo = ''; |
|
|
current.value = index; |
|
|
current.value = index; |
|
|
tabParams.value.pageNo = 1; |
|
|
tabParams.value.pageNo = 1; |
|
|
falg.value == 'tab' |
|
|
flag.value == 'tab' |
|
|
switch (index) { |
|
|
switch (index) { |
|
|
case 0: |
|
|
case 0: |
|
|
tabParams.value.status = ''; |
|
|
tabParams.value.status = ''; |
|
@ -411,7 +418,7 @@ |
|
|
tabParams.value.status = '1'; |
|
|
tabParams.value.status = '1'; |
|
|
break; |
|
|
break; |
|
|
case 4: |
|
|
case 4: |
|
|
falg.value == 'request' |
|
|
flag.value = 'request' |
|
|
list.value = []; |
|
|
list.value = []; |
|
|
status.value = 'loading'; |
|
|
status.value = 'loading'; |
|
|
tabParams.value.status = '0'; |
|
|
tabParams.value.status = '0'; |
|
@ -450,42 +457,19 @@ |
|
|
processCode: 'QD_CY_01' |
|
|
processCode: 'QD_CY_01' |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
async function searchTable() { |
|
|
function searchTable() { |
|
|
// tabParams.value.planMasterCode = searchValue.value |
|
|
|
|
|
list.value = [] |
|
|
list.value = [] |
|
|
tabParams.value.pageNo = 1 |
|
|
tabParams.value.pageNo = 1 |
|
|
getTabsList() |
|
|
if(flag.value == 'request'){ |
|
|
// list.value = [] |
|
|
getRequestList() |
|
|
// searchTableParams.value.planNoDay = this.searchValue |
|
|
} |
|
|
// console.log(searchTableParams.value) |
|
|
if(flag.value == 'tab'){ |
|
|
// await workSchedulingListApi.getWorkSchedulingPDAPage(searchTableParams.value).then((res) => { |
|
|
getTabsList(); |
|
|
// if (res.data.list.length > 0) { |
|
|
} |
|
|
// list.value = list.value.concat(res.data.list) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
} |
|
|
} |
|
|
// 完工处理->验证 |
|
|
// 完工处理->验证 |
|
|
function finished(item) { |
|
|
function finished(item) { |
|
|
submitFinish(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) { |
|
|
function submitFinish(item) { |
|
@ -518,29 +502,9 @@ |
|
|
} |
|
|
} |
|
|
const objString = JSON.stringify(getParams); |
|
|
const objString = JSON.stringify(getParams); |
|
|
proxy.$tab.navigateTo(`/pages/mes/workScheduling/waitReport?obj=${encodeURIComponent(objString)}`) |
|
|
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){ |
|
|
function waitCheck(item){ |
|
|
// console.log(item) |
|
|
|
|
|
// proxy.$tab.navigateTo(`/pages/mes/workScheduling/waitQuality?obj=${JSON.stringify(item)}`) |
|
|
|
|
|
const getParams = { |
|
|
const getParams = { |
|
|
planNoDay:item.planNoDay, |
|
|
planNoDay:item.planNoDay, |
|
|
nodeCode:item.nodeCode, |
|
|
nodeCode:item.nodeCode, |
|
@ -551,6 +515,28 @@ |
|
|
proxy.$tab.navigateTo(`/pages/mes/workScheduling/waitQuality?obj=${encodeURIComponent(objString)}`) |
|
|
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) { |
|
|
function callBasicItem(item) { |
|
|
proxy.$tab.navigateTo(`/pages/mes/workScheduling/callMaterial?obj=${JSON.stringify(item)}`) |
|
|
proxy.$tab.navigateTo(`/pages/mes/workScheduling/callMaterial?obj=${JSON.stringify(item)}`) |
|
|