Browse Source

原料管理--标题2024/7/11 14:46:56

hella_vue3
zhang_li 3 months ago
parent
commit
973f959f3b
  1. 3
      src/pages/purchaseReturn/job/returnDetail.vue
  2. 10
      src/pages/purchaseReturn/job/returnJob.vue
  3. 14
      src/pages/purchaseReturn/record/returnRecord.vue
  4. 10
      src/pages/purchaseReturn/request/returnRequest.vue
  5. 88
      src/pages/purchaseReturn/request/returnRequestDetail.vue
  6. 3
      src/pages/putaway/job/putawayDetail.vue
  7. 11
      src/pages/putaway/job/putawayJob.vue
  8. 3
      src/pages/putaway/record/putawayRecord.vue
  9. 8
      src/pages/putaway/request/putawayRequest.vue

3
src/pages/purchaseReturn/job/returnDetail.vue

@ -74,6 +74,9 @@ const comScanLocation = ref()
const comMessageRef = ref()
const jobDetailPopup = ref()
onLoad((option) => {
uni.setNavigationBarTitle({
title: `${option.title}详情`
})
id.value = option.id
if (id.value != undefined) {
//

10
src/pages/purchaseReturn/job/returnJob.vue

@ -45,6 +45,7 @@ const todayTime = ref('')
const status = ref('1,2') //
const detailOptions = ref([])
const detailGiveupOptions = ref([])
const title = ref('')
const filter = ref()
const comMessageRef = ref()
const jobInfoPopup = ref()
@ -54,6 +55,9 @@ onShow(() => {
getList('refresh')
})
})
onLoad((option) => {
title.value = option.title
})
onReady(() => {
detailOptions.value = getDetailOption()
detailGiveupOptions.value = getDetailGiveupOption()
@ -127,7 +131,7 @@ const getList = (type) => {
const { list } = res.data
totalCount.value = res.data.total
updateTitle(`采购退货(${totalCount.value})`)
updateTitle(`${title.value}(${totalCount.value})`)
loadingType.value = 'loadmore'
if (list == null || list.length == 0) {
loadingType.value = 'nomore'
@ -141,13 +145,13 @@ const getList = (type) => {
uni.stopPullDownRefresh()
}
loadingType.value = ''
updateTitle('采购上架')
updateTitle(title.value)
uni.hideLoading()
showErrorMessage(error)
})
}
const openJobDetail = (item) => {
proxy.$tab.navigateTo(`./returnDetail?id=${item.masterId}&status=${item.status}`)
proxy.$tab.navigateTo(`./returnDetail?id=${item.masterId}&status=${item.status}&title=${title.value}`)
}
const showItemList = (itemList) => {
jobListPopup.value.openPopup(itemList)

14
src/pages/purchaseReturn/record/returnRecord.vue

@ -74,11 +74,15 @@ const scanFromLocationCode = ref()
const toLocationInfo = ref({})
onLoad((option) => {
fromType.value = option.fromType
if (fromType.value == 'requestType') {
updateTitle('采购退货申请')
} else {
updateTitle('采购退货记录')
}
// if (fromType.value == 'requestType') {
// updateTitle('退')
// } else {
// updateTitle('退')
// }
uni.setNavigationBarTitle({
title: option.title
})
const typeCode = 'PurchaseReturn'
getBusinessType(typeCode, (res) => {
if (res.success) {

10
src/pages/purchaseReturn/request/returnRequest.vue

@ -44,6 +44,7 @@ const addAgainOption = ref([])
const showOptions = ref([])
const fromType = ref('requestType')
const loadingType = ref('nomore')
const title = ref('')
const requestInfoPopupRef = ref()
const filter = ref()
@ -56,6 +57,9 @@ onReady(() => {
detailAndHandleOption.value = getDetailAndHandleOption()
detailAndAddAndCloseOption.value = getDetailAndAddAndCloseOption()
})
onLoad((option) => {
title.value = option.title
})
onReachBottom(() => {
//
if (loadingType.value == 'loading' || loadingType.value == 'nomore') {
@ -81,7 +85,7 @@ onNavigationBarButtonTap((e) => {
})
const openRequestDetail = (item) => {
uni.navigateTo({
url: `./returnRequestDetail?id=${item.masterId}&fromType=${fromType.value}`
url: `./returnRequestDetail?id=${item.masterId}&fromType=${fromType.value}&title=${title.value}`
})
}
const openRequestInfoPopup = (item) => {
@ -113,7 +117,7 @@ const getList = (type) => {
}
const { list } = res.data
totalCount.value = res.data.total
updateTitle(`采购上架申请(${totalCount.value})`)
updateTitle(`${title.value}(${totalCount.value})`)
loadingType.value = 'loadmore'
if (list == null || list.length == 0) {
loadingType.value = 'nomore'
@ -133,7 +137,7 @@ const getList = (type) => {
if (type === 'refresh') {
uni.stopPullDownRefresh()
}
updateTitle('采购上架申请')
updateTitle(title.value)
loadingType.value = ''
proxy.$modal.closeLoading()
showMessage(error)

88
src/pages/purchaseReturn/request/returnRequestDetail.vue

@ -1,21 +1,18 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class='page-header-box'>
<view class="page-header-box">
<view class="header_job_top">
<request-top :dataContent="requestContent"></request-top>
</view>
<view class="header_item">
供应商 : {{requestContent.supplierCode}}
</view>
<view class="header_item"> 供应商 : {{ requestContent.supplierCode }} </view>
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<com-request-detail-card :dataContent="item" @openDetail="openDetail">
</com-request-detail-card>
<com-request-detail-card :dataContent="item" @openDetail="openDetail"> </com-request-detail-card>
</view>
</view>
</scroll-view>
@ -26,33 +23,18 @@
</template>
<script setup lang="ts">
import {
ref,
getCurrentInstance,
onMounted
} from 'vue'
import {
onLoad,
onNavigationBarButtonTap,
onPullDownRefresh
} from '@dcloudio/uni-app'
import {
getPurchaseReturnRequestDetail,
} from '@/api/request2.js';
import {
goHome,
} from '@/common/basic.js';
import { ref, getCurrentInstance, onMounted } from 'vue'
import { onLoad, onNavigationBarButtonTap, onPullDownRefresh } from '@dcloudio/uni-app'
import { getPurchaseReturnRequestDetail } from '@/api/request2.js'
import {
getDataSource,
} from '@/common/detail.js';
import { goHome } from '@/common/basic.js'
import { getDataSource } from '@/common/detail.js'
import comRequestDetailCard from "@/mycomponents/detail/comRequestDetailCard.vue"
import comRequestDetailCard from '@/mycomponents/detail/comRequestDetailCard.vue'
import requestDetailInfoPopup from '@/pages/purchaseReturn/coms/requestDetailInfoPopup.vue'
import requestTop from "@/mycomponents/request/requestTop.vue"
import requestTop from '@/mycomponents/request/requestTop.vue'
const { proxy } = getCurrentInstance()
const id = ref('')
@ -62,56 +44,56 @@
const comMessageRef = ref()
const jobDetailPopup = ref()
onLoad((option) => {
id.value = option.id;
getDetail();
id.value = option.id
uni.setNavigationBarTitle({
title: `${option.title}详情`
})
getDetail()
})
//
onNavigationBarButtonTap((e) => {
if (e.index === 0) {
goHome();
goHome()
}
})
onPullDownRefresh(() => {
getDetail();
uni.stopPullDownRefresh();
getDetail()
uni.stopPullDownRefresh()
})
const getDetail = () => {
proxy.$modal.loading('加载中­....')
getPurchaseReturnRequestDetail(id.value).then(res => {
proxy.$modal.closeLoading();
getPurchaseReturnRequestDetail(id.value)
.then((res) => {
proxy.$modal.closeLoading()
if (res.data == null) {
showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
requestContent.value = res.data;
subList.value = res.data.subList;
subList.value.forEach(res => {
showMessage('未获取到详情')
} else if (res.data.subList.length > 0) {
requestContent.value = res.data
subList.value = res.data.subList
subList.value.forEach((res) => {
// res.fromLocationCode = res.toLocationCode
res.locationCode = res.fromLocationCode
})
detailSource.value = getDataSource(subList.value);
detailSource.value = getDataSource(subList.value)
} else {
showMessage('列表数据为0');
showMessage('列表数据为0')
}
}
}).catch(error => {
proxy.$modal.closeLoading();
})
.catch((error) => {
proxy.$modal.closeLoading()
showMessage(error)
})
}
const showMessage = (message) => {
comMessageRef.value.showMessage(message, res => {
comMessageRef.value.showMessage(message, (res) => {
if (res) {
}
});
})
}
const openDetail = (item) => {
jobDetailPopup.value.openPopup(item)
}
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

3
src/pages/putaway/job/putawayDetail.vue

@ -77,6 +77,9 @@ const scanPopup = ref()
const comScanLocation = ref()
const comMessageRef = ref()
onLoad((option) => {
uni.setNavigationBarTitle({
title: `${option.title}详情`
})
id.value = option.id
scanedPackingNumber.value = option.scaned || ''
if (id.value != undefined) {

11
src/pages/putaway/job/putawayJob.vue

@ -50,6 +50,7 @@ const todayTime = ref('')
const status = ref('1,2') //
const detailOptions = ref([])
const detailGiveupOptions = ref([])
const title = ref('')
const filter = ref()
const comMessageRef = ref()
const scanPopup = ref()
@ -60,7 +61,9 @@ onShow(() => {
getList('refresh')
})
})
onLoad((option) => {
title.value = option.title
})
onReady(() => {
detailOptions.value = getDetailOption()
detailGiveupOptions.value = getDetailGiveupOption()
@ -139,7 +142,7 @@ const getList = (type) => {
const { list } = res.data
totalCount.value = res.data.total
updateTitle(`采购上架(${totalCount.value})`)
updateTitle(`${title.value}(${totalCount.value})`)
loadingType.value = 'loadmore'
if (list == null || list.length == 0) {
loadingType.value = 'nomore'
@ -153,13 +156,13 @@ const getList = (type) => {
uni.stopPullDownRefresh()
}
loadingType.value = ''
updateTitle('采购上架')
updateTitle(title.value)
uni.hideLoading()
showErrorMessage(error)
})
}
const openJobDetail = (item) => {
proxy.$tab.navigateTo(`./putawayDetail?id=${item.masterId}&status=${item.status}`)
proxy.$tab.navigateTo(`./putawayDetail?id=${item.masterId}&status=${item.status}&title=${title.value}`)
}
const selectedItem = (item) => {

3
src/pages/putaway/record/putawayRecord.vue

@ -85,6 +85,9 @@ const managementList = ref([])
const toLocationCode = ref()
const toWarehouseCode = ref('')
onLoad((option) => {
uni.setNavigationBarTitle({
title: option.title
})
clear()
getBusinessType(businessTypeCode.value, (res) => {
if (res.success) {

8
src/pages/putaway/request/putawayRequest.vue

@ -43,9 +43,13 @@ const detailAndAddAndCloseOption = ref([])
const addAgainOption = ref([])
const showOptions = ref([])
const loadingType = ref('nomore')
const title = ref('')
const requestInfoPopupRef = ref()
const filter = ref()
const comMessageRef = ref()
onLoad((option) => {
title.value = option.title
})
onReady(() => {
detailOptions.value = getDetailOption()
addAgainOption.value = getAddAgainOption()
@ -112,7 +116,7 @@ const getList = (type) => {
const { list } = res.data
totalCount.value = res.data.total
updateTitle(`采购上架申请(${totalCount.value})`)
updateTitle(`${title.value}(${totalCount.value})`)
loadingType.value = 'loadmore'
if (list == null || list.length == 0) {
loadingType.value = 'nomore'
@ -133,7 +137,7 @@ const getList = (type) => {
if (type === 'refresh') {
uni.stopPullDownRefresh()
}
updateTitle('采购上架申请')
updateTitle(title.value)
loadingType.value = ''
proxy.$modal.closeLoading()
showMessage(error)

Loading…
Cancel
Save