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. 192
      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 comMessageRef = ref()
const jobDetailPopup = ref() const jobDetailPopup = ref()
onLoad((option) => { onLoad((option) => {
uni.setNavigationBarTitle({
title: `${option.title}详情`
})
id.value = option.id id.value = option.id
if (id.value != undefined) { if (id.value != undefined) {
// //

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save