Browse Source

feat: update 叫料补料修改

master
TengXF 6 months ago
parent
commit
f4fb2a56e7
  1. 5
      src/api/mes/workScheduling/index.ts
  2. 110
      src/pages/mes/workScheduling/workScheduling.vue

5
src/api/mes/workScheduling/index.ts

@ -108,6 +108,11 @@ export function receiveBasicItem(data) {
return http.post('/mes/item-request-main/receiveBasicItem', data)
}
//领料
export function receiveItem(data) {
return http.post('/mes/item-request-main/receiveItem', data)
}
//补料
export function addBasicItem(data) {
return http.post('/mes/', data)

110
src/pages/mes/workScheduling/workScheduling.vue

@ -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,
@ -551,6 +515,28 @@
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) {
proxy.$tab.navigateTo(`/pages/mes/workScheduling/callMaterial?obj=${JSON.stringify(item)}`)

Loading…
Cancel
Save