Browse Source

MES——> 日任务开工状态更新

master
gaojs 7 months ago
parent
commit
530b9fec9c
  1. 4
      src/api/mes/workScheduling/index.ts
  2. 22
      src/pages/mes/workScheduling/workScheduling.vue

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

@ -36,6 +36,10 @@ export function getWorkSchedulingInfo(number) {
return http.get('/mes/workScheduling/get?id=' + number)
}
export function updateWorkScheduling(params) {
return http.post('/mes/workScheduling/update-status', params)
}
export function getWorkSchedulingDetail(number) {
return http.get('/mes/work-scheduling-detail/get-info?schedulingCode=' + number)
}

22
src/pages/mes/workScheduling/workScheduling.vue

@ -60,7 +60,7 @@
<u-button type="primary" @click="openInspectItem(item)">齐套检查</u-button>
</view>
<view v-if="item.status==0" >
<u-button type="primary" @click="开工(item)">开工</u-button>
<u-button type="primary" @click="kaigong(item)">开工</u-button>
</view>
<view v-if="item.status==1" >
<u-button type="success" size="mini" @click="callBasicItem(item)" class="btn">叫料</u-button>
@ -221,11 +221,31 @@ function openBomInspect(item, index) {
proxy.$tab.navigateTo(`/pages/mes/workScheduling/bomInspect?planNoDay=${item.planNoDay}`)
}
//
function openInspectItem(item, index) {
const objString = JSON.stringify(item);
proxy.$tab.navigateTo(`/pages/mes/workScheduling/inspectionItems?obj=${objString}`)
}
//
function kaigong(item){
proxy.$modal.confirm("是否确认提交").then(()=>{
proxy.$modal.loading('加载中')
item.status = '1'
const objString = JSON.stringify(item);
workSchedulingListApi.updateWorkScheduling(objString).then((res) => {
proxy.$modal.showToast('成功')
tabsChange(2);
loading.value = false
proxy.$modal.closeLoading()
}).catch(() => {
proxy.$modal.closeLoading()
loading.value = false
})
})
}
//
function tabsChange(index) {
current.value = index

Loading…
Cancel
Save