Merge branch 'master' of http://14.103.246.124:16000/bonus/bonus-material-app
This commit is contained in:
commit
7b3bd9f619
|
|
@ -211,7 +211,7 @@
|
||||||
{
|
{
|
||||||
"path": "pages/back/index",
|
"path": "pages/back/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "退料任务"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,13 @@
|
||||||
<view class="addBtn" @click="goAdd()">新增</view>
|
<view class="addBtn" @click="goAdd()">新增</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
<scroll-view
|
||||||
|
scroll-y
|
||||||
|
:scroll-top="scrollTop"
|
||||||
|
@scroll="onScroll"
|
||||||
|
@scrolltolower="onScrollTolower"
|
||||||
|
class="scroll-container"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="table-list-item"
|
class="table-list-item"
|
||||||
v-for="(item, index) in tableList"
|
v-for="(item, index) in tableList"
|
||||||
|
|
@ -178,6 +184,8 @@ import { ref, computed } from 'vue'
|
||||||
import { getBackList, submitBackApply, backApplyRemove } from '../../services/back.js'
|
import { getBackList, submitBackApply, backApplyRemove } from '../../services/back.js'
|
||||||
import { onShow } from '@dcloudio/uni-app'
|
import { onShow } from '@dcloudio/uni-app'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
|
|
||||||
|
const scrollTop = ref(0)
|
||||||
const total = ref(0) // 数据总量
|
const total = ref(0) // 数据总量
|
||||||
const active = ref(1) // tap索引
|
const active = ref(1) // tap索引
|
||||||
const tableList = ref([]) // 列表数据源
|
const tableList = ref([]) // 列表数据源
|
||||||
|
|
@ -335,6 +343,10 @@ const getTableList = async (isTap = false) => {
|
||||||
console.log('queryParams.value查询参数', queryParams.value)
|
console.log('queryParams.value查询参数', queryParams.value)
|
||||||
const res = await getBackList(queryParams.value)
|
const res = await getBackList(queryParams.value)
|
||||||
console.log('res列表数据', res)
|
console.log('res列表数据', res)
|
||||||
|
setTimeout(() => {
|
||||||
|
scrollTop.value = uni.getStorageSync('scrollTop') || 0
|
||||||
|
console.log('🚀 ~ scrollTop.value:', scrollTop.value)
|
||||||
|
}, 400)
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
if (isTap) {
|
if (isTap) {
|
||||||
tableList.value = res.data.rows
|
tableList.value = res.data.rows
|
||||||
|
|
@ -371,9 +383,20 @@ const onScrollTolower = debounce(() => {
|
||||||
getTableList()
|
getTableList()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let timer = null
|
||||||
|
const onScroll = (e) => {
|
||||||
|
if (timer) clearTimeout(timer)
|
||||||
|
timer = setTimeout(() => {
|
||||||
|
uni.setStorageSync('scrollTop', e.detail.scrollTop)
|
||||||
|
uni.setStorageSync('queryParams', JSON.stringify(queryParams.value))
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
//切换tab
|
//切换tab
|
||||||
const changeTab = (index) => {
|
const changeTab = (index) => {
|
||||||
active.value = index
|
active.value = index
|
||||||
|
uni.setStorageSync('scrollTop', 0)
|
||||||
|
uni.setStorageSync('activeTab', index)
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
queryParams.value.appTaskStatus = 0
|
queryParams.value.appTaskStatus = 0
|
||||||
} else if (index == 2) {
|
} else if (index == 2) {
|
||||||
|
|
@ -413,6 +436,10 @@ const leftClick = () => {
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
tableList.value = []
|
tableList.value = []
|
||||||
total.value = 0
|
total.value = 0
|
||||||
|
if (uni.getStorageSync('queryParams')) {
|
||||||
|
queryParams.value = JSON.parse(uni.getStorageSync('queryParams'))
|
||||||
|
}
|
||||||
|
active.value = uni.getStorageSync('activeTab') || 1
|
||||||
getTableList(true)
|
getTableList(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -154,10 +154,10 @@
|
||||||
</uni-table>
|
</uni-table>
|
||||||
|
|
||||||
<button v-if="opts.isOut" style="width: 100%; margin: 50px 0" type="primary" @click="submit(1)">
|
<button v-if="opts.isOut" style="width: 100%; margin: 50px 0" type="primary" @click="submit(1)">
|
||||||
出 库
|
提 交
|
||||||
</button>
|
</button>
|
||||||
<button v-else style="width: 100%; margin: 50px 0" type="primary" @click="submit(0)">
|
<button v-else style="width: 100%; margin: 50px 0" type="primary" @click="submit(0)">
|
||||||
保 存
|
提 交
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -262,6 +262,7 @@ const getDetailsById = async () => {
|
||||||
Object.assign(formData, res.data.leaseApplyInfo)
|
Object.assign(formData, res.data.leaseApplyInfo)
|
||||||
formData.projectId = res.data.leaseApplyInfo.proId
|
formData.projectId = res.data.leaseApplyInfo.proId
|
||||||
formData.proId = res.data.leaseApplyInfo.proId
|
formData.proId = res.data.leaseApplyInfo.proId
|
||||||
|
formData.relPhone = res.data.leaseApplyInfo.phone || res.data.leaseApplyInfo.relPhone || ''
|
||||||
getAgreementInfoById()
|
getAgreementInfoById()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('🚀 ~ getDetailsById ~ error:', error)
|
console.log('🚀 ~ getDetailsById ~ error:', error)
|
||||||
|
|
@ -527,6 +528,7 @@ const submit = (isOut) => {
|
||||||
.validate()
|
.validate()
|
||||||
.then(async (valid) => {
|
.then(async (valid) => {
|
||||||
formData.isOut = isOut
|
formData.isOut = isOut
|
||||||
|
formData.phone = formData.relPhone
|
||||||
formData.createBy = uni.getStorageSync('username') || ''
|
formData.createBy = uni.getStorageSync('username') || ''
|
||||||
console.log('🚀 ~ form.value.validate.then ~ valid:', valid)
|
console.log('🚀 ~ form.value.validate.then ~ valid:', valid)
|
||||||
if (tableData.value.length === 0) {
|
if (tableData.value.length === 0) {
|
||||||
|
|
@ -561,15 +563,17 @@ const submit = (isOut) => {
|
||||||
leaseApplyInfo: formData,
|
leaseApplyInfo: formData,
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ .then ~ params:', params)
|
console.log('🚀 ~ .then ~ params:', params)
|
||||||
|
if (isOut != 0) {
|
||||||
// 弹框确定
|
// 弹框确定
|
||||||
const res = await uni.showModal({
|
const resp = await uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '是否确认提交?',
|
content: '是否确认提交?',
|
||||||
confirmText: isOut == 0 ? '暂存' : '出库',
|
confirmText: '提交',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
})
|
})
|
||||||
console.log('🚀 ~ .then ~ res:', res)
|
console.log('🚀 ~ .confirm ~ resp:', resp)
|
||||||
if (!res.confirm) return
|
if (!resp.confirm) return
|
||||||
|
}
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '提交中...',
|
title: '提交中...',
|
||||||
mask: true, // 遮罩层
|
mask: true, // 遮罩层
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ const getTableList = async (isTap = false, isSearch = false) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
scrollTop.value = uni.getStorageSync('scrollTop') || 0
|
scrollTop.value = uni.getStorageSync('scrollTop') || 0
|
||||||
console.log('🚀 ~ scrollTop.value:', scrollTop.value)
|
console.log('🚀 ~ scrollTop.value:', scrollTop.value)
|
||||||
}, 300)
|
}, 400)
|
||||||
console.log('res列表数据', res)
|
console.log('res列表数据', res)
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
if (isTap) {
|
if (isTap) {
|
||||||
|
|
@ -255,6 +255,7 @@ onShow(() => {
|
||||||
if (uni.getStorageSync('queryParams')) {
|
if (uni.getStorageSync('queryParams')) {
|
||||||
queryParams.value = JSON.parse(uni.getStorageSync('queryParams'))
|
queryParams.value = JSON.parse(uni.getStorageSync('queryParams'))
|
||||||
}
|
}
|
||||||
|
active.value = uni.getStorageSync('activeTab') || 0
|
||||||
getTableList()
|
getTableList()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -285,8 +286,8 @@ const onScroll = (e) => {
|
||||||
|
|
||||||
// tap 栏切换
|
// tap 栏切换
|
||||||
const changeTab = (index) => {
|
const changeTab = (index) => {
|
||||||
uni.removeStorageSync('scrollTop')
|
uni.setStorageSync('scrollTop', 0)
|
||||||
uni.removeStorageSync('queryParams')
|
uni.setStorageSync('activeTab', index)
|
||||||
active.value = index
|
active.value = index
|
||||||
console.log('index', index)
|
console.log('index', index)
|
||||||
if (index == 2) {
|
if (index == 2) {
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container" v-else>
|
<scroll-view scroll-y :scroll-top="scrollTop" @scroll="onScroll" @scrolltolower="onScrollTolower" class="scroll-container" v-else>
|
||||||
<view
|
<view
|
||||||
class="table-list-item"
|
class="table-list-item"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
|
@ -192,6 +192,7 @@ import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { onBackPress } from '@dcloudio/uni-app'
|
import { onBackPress } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
|
const scrollTop = ref(0)
|
||||||
const opts = ref(null)
|
const opts = ref(null)
|
||||||
const total = ref(0) // 数据总量
|
const total = ref(0) // 数据总量
|
||||||
const active = ref(1) // tap索引
|
const active = ref(1) // tap索引
|
||||||
|
|
@ -270,6 +271,10 @@ const getTableList = async (isTap = false, isSearch = false) => {
|
||||||
} else {
|
} else {
|
||||||
res = await getPickingOutboundListAPI(queryParams.value)
|
res = await getPickingOutboundListAPI(queryParams.value)
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
scrollTop.value = uni.getStorageSync('scrollTop') || 0
|
||||||
|
console.log('🚀 ~ scrollTop.value:', scrollTop.value)
|
||||||
|
}, 400)
|
||||||
console.log('res列表数据', res)
|
console.log('res列表数据', res)
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
if (isTap) {
|
if (isTap) {
|
||||||
|
|
@ -311,6 +316,9 @@ onShow(() => {
|
||||||
queryParams.value.pageNum = 1
|
queryParams.value.pageNum = 1
|
||||||
tableList.value = []
|
tableList.value = []
|
||||||
total.value = 0
|
total.value = 0
|
||||||
|
if (uni.getStorageSync('queryParams')) {
|
||||||
|
queryParams.value = JSON.parse(uni.getStorageSync('queryParams'))
|
||||||
|
}
|
||||||
if (opts.value) {
|
if (opts.value) {
|
||||||
getTableList()
|
getTableList()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -327,6 +335,15 @@ const onScrollTolower = debounce(() => {
|
||||||
}
|
}
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
|
let timer = null
|
||||||
|
const onScroll = (e) => {
|
||||||
|
if (timer) clearTimeout(timer)
|
||||||
|
timer = setTimeout(() => {
|
||||||
|
uni.setStorageSync('scrollTop', e.detail.scrollTop)
|
||||||
|
uni.setStorageSync('queryParams', JSON.stringify(queryParams.value))
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
|
||||||
// tap 栏切换
|
// tap 栏切换
|
||||||
const changeTab = (index) => {
|
const changeTab = (index) => {
|
||||||
active.value = index
|
active.value = index
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@
|
||||||
<uni-forms-item label="规格型号:" name=" typeName">
|
<uni-forms-item label="规格型号:" name=" typeName">
|
||||||
<span style="height: 100%;display: flex;align-items: center;">{{ formData.typeName||"" }}</span>
|
<span style="height: 100%;display: flex;align-items: center;">{{ formData.typeName||"" }}</span>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="入库人:" name="createBy">
|
<uni-forms-item label="入库人:" name="auditBy">
|
||||||
<span style="height: 100%;display: flex;align-items: center;">{{ formData.createBy||"" }}</span>
|
<span style="height: 100%;display: flex;align-items: center;">{{ formData.auditBy||"" }}</span>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="入库时间:" name="createTime">
|
<uni-forms-item label="入库时间:" name="auditTime">
|
||||||
<span style="height: 100%;display: flex;align-items: center;">{{ formData.createTime||"" }}</span>
|
<span style="height: 100%;display: flex;align-items: center;">{{ formData.auditTime||"" }}</span>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -84,8 +84,8 @@ onLoad((options) => {
|
||||||
if(queryParams.value.manageType==1){
|
if(queryParams.value.manageType==1){
|
||||||
formData.value.maTypeName = queryParams.value.typeName
|
formData.value.maTypeName = queryParams.value.typeName
|
||||||
formData.value.typeName = queryParams.value.typeModelName
|
formData.value.typeName = queryParams.value.typeModelName
|
||||||
formData.value.createBy = queryParams.value.createBy
|
formData.value.auditBy = queryParams.value.auditBy
|
||||||
formData.value.createTime = queryParams.value.createTime
|
formData.value.auditTime = queryParams.value.auditTime
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -292,7 +292,7 @@ onLoad((options) => {
|
||||||
console.log(taskInfo.value)
|
console.log(taskInfo.value)
|
||||||
taskId.value = taskInfo.value.taskId
|
taskId.value = taskInfo.value.taskId
|
||||||
console.log(taskId.value)
|
console.log(taskId.value)
|
||||||
getDetailsData()
|
// getDetailsData()
|
||||||
// 监听出库完成事件 刷新列表
|
// 监听出库完成事件 刷新列表
|
||||||
uni.$on('onUpdate', () => {
|
uni.$on('onUpdate', () => {
|
||||||
// console.log('监听事件')
|
// console.log('监听事件')
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
|
|
||||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
<scroll-view scroll-y :scroll-top="scrollTop" @scroll="onScroll" @scrolltolower="onScrollTolower" class="scroll-container">
|
||||||
<view
|
<view
|
||||||
class="table-list-item"
|
class="table-list-item"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
|
@ -157,6 +157,7 @@ import { getRepairedList } from '@/services/repair/testedInBound.js'
|
||||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
|
|
||||||
|
const scrollTop = ref(0)
|
||||||
const total = ref(0) // 数据总量
|
const total = ref(0) // 数据总量
|
||||||
const active = ref(1) // tap索引
|
const active = ref(1) // tap索引
|
||||||
const tableList = ref([]) // 列表数据源
|
const tableList = ref([]) // 列表数据源
|
||||||
|
|
@ -242,6 +243,10 @@ const getTableList = async (isTap = false) => {
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
const res = await getRepairedList(queryParams.value)
|
const res = await getRepairedList(queryParams.value)
|
||||||
|
setTimeout(() => {
|
||||||
|
scrollTop.value = uni.getStorageSync('scrollTop') || 0
|
||||||
|
console.log('🚀 ~ scrollTop.value:', scrollTop.value)
|
||||||
|
}, 400)
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
if (isTap) {
|
if (isTap) {
|
||||||
tableList.value = res.data.rows
|
tableList.value = res.data.rows
|
||||||
|
|
@ -271,30 +276,38 @@ const getTableList = async (isTap = false) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 页面加载完毕
|
// 页面加载完毕
|
||||||
onLoad(() => {
|
onShow(() => {
|
||||||
// tableList.value = []
|
tableList.value = []
|
||||||
// total.value = 0
|
total.value = 0
|
||||||
|
if (uni.getStorageSync('queryParams')) {
|
||||||
|
queryParams.value = JSON.parse(uni.getStorageSync('queryParams'))
|
||||||
|
}
|
||||||
|
active.value = uni.getStorageSync('activeTab') || 1
|
||||||
getTableList()
|
getTableList()
|
||||||
})
|
})
|
||||||
|
|
||||||
// onShow(() => {
|
|
||||||
// tableList.value = []
|
|
||||||
// total.value = 0
|
|
||||||
// getTableList()
|
|
||||||
// })
|
|
||||||
|
|
||||||
// 滚动触底事件
|
// 滚动触底事件
|
||||||
const onScrollTolower = debounce(() => {
|
const onScrollTolower = debounce(() => {
|
||||||
console.log('触底事件')
|
console.log('触底事件')
|
||||||
if (total.value > tableList.value.length) {
|
if (total.value > tableList.value.length) {
|
||||||
queryParams.value.pageSize += 5
|
queryParams.value.pageSize += 10
|
||||||
getTableList()
|
getTableList()
|
||||||
}
|
}
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
|
let timer = null
|
||||||
|
const onScroll = (e) => {
|
||||||
|
if (timer) clearTimeout(timer)
|
||||||
|
timer = setTimeout(() => {
|
||||||
|
uni.setStorageSync('scrollTop', e.detail.scrollTop)
|
||||||
|
uni.setStorageSync('queryParams', JSON.stringify(queryParams.value))
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
// tap 栏切换
|
// tap 栏切换
|
||||||
const changeTab = (index) => {
|
const changeTab = (index) => {
|
||||||
active.value = index
|
active.value = index
|
||||||
|
uni.setStorageSync('scrollTop', 0)
|
||||||
|
uni.setStorageSync('activeTab', index)
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
queryParams.value.appTaskStatus = 0 // 查未完成的
|
queryParams.value.appTaskStatus = 0 // 查未完成的
|
||||||
queryParams.value.pageNum = 1
|
queryParams.value.pageNum = 1
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,7 @@ import { onShow,onLoad } from '@dcloudio/uni-app'
|
||||||
const urlPermissions = ref([])
|
const urlPermissions = ref([])
|
||||||
onShow((options) => {
|
onShow((options) => {
|
||||||
urlPermissions.value = uni.getStorageSync('urlPermissions')
|
urlPermissions.value = uni.getStorageSync('urlPermissions')
|
||||||
|
uni.removeStorageSync('activeTab')
|
||||||
uni.removeStorageSync('scrollTop')
|
uni.removeStorageSync('scrollTop')
|
||||||
uni.removeStorageSync('queryParams')
|
uni.removeStorageSync('queryParams')
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue