材料员确认+二维码组件优化
This commit is contained in:
parent
06eeb065d8
commit
5fa4b560a7
|
|
@ -31,6 +31,7 @@
|
|||
"sass": "^1.32.13",
|
||||
"sass-loader": "^16.0.3",
|
||||
"sm-crypto": "^0.3.13",
|
||||
"vconsole": "^3.15.1",
|
||||
"vue": "^3.5.13",
|
||||
"vue-i18n": "^9.14.1"
|
||||
},
|
||||
|
|
@ -6733,6 +6734,17 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/copy-text-to-clipboard": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz",
|
||||
"integrity": "sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/core-js": {
|
||||
"version": "3.42.0",
|
||||
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.42.0.tgz",
|
||||
|
|
@ -10112,6 +10124,11 @@
|
|||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/mutation-observer": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/mutation-observer/-/mutation-observer-1.0.3.tgz",
|
||||
"integrity": "sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA=="
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.11",
|
||||
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz",
|
||||
|
|
@ -12611,6 +12628,17 @@
|
|||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/vconsole": {
|
||||
"version": "3.15.1",
|
||||
"resolved": "https://registry.npmmirror.com/vconsole/-/vconsole-3.15.1.tgz",
|
||||
"integrity": "sha512-KH8XLdrq9T5YHJO/ixrjivHfmF2PC2CdVoK6RWZB4yftMykYIaXY1mxZYAic70vADM54kpMQF+dYmvl5NRNy1g==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.17.2",
|
||||
"copy-text-to-clipboard": "^3.0.1",
|
||||
"core-js": "^3.11.0",
|
||||
"mutation-observer": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.2.8",
|
||||
"resolved": "https://registry.npmmirror.com/vite/-/vite-5.2.8.tgz",
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@
|
|||
"sass": "^1.32.13",
|
||||
"sass-loader": "^16.0.3",
|
||||
"sm-crypto": "^0.3.13",
|
||||
"vconsole": "^3.15.1",
|
||||
"vue": "^3.5.13",
|
||||
"vue-i18n": "^9.14.1"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
import { createSSRApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import pinia from './stores/index'
|
||||
import VConsole from 'vconsole'
|
||||
|
||||
new VConsole()
|
||||
|
||||
import '@/styles/reset.css'
|
||||
import '@/styles/common.scss'
|
||||
|
|
|
|||
|
|
@ -821,10 +821,24 @@
|
|||
}
|
||||
},
|
||||
// 项目部授权书
|
||||
|
||||
// 材料员确认
|
||||
{
|
||||
"path": "pages/materialsStation/authorizeSignature/authorizeSignature",
|
||||
"path": "pages/materialsStation/materialClerkConfirms/materialClerkConfirms",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "材料员确认"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/materialsStation/materialClerkConfirms/detailsList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "材料员确认"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/materialsStation/materialClerkConfirms/confirmDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "材料员确认"
|
||||
}
|
||||
}
|
||||
// 材料站 end
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ const scanStart = async () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCode.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
qrCode.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
if (qrCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ const uploadImg = () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCode.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
qrCode.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
if (qrCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
keyWord.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
keyWord.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
if (keyWord.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,11 @@
|
|||
|
||||
<script setup>
|
||||
import { onMounted } from 'vue'
|
||||
import VConsole from 'vconsole'
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
new VConsole()
|
||||
}
|
||||
// 定义自定义事件
|
||||
const emit = defineEmits(['scanSuccess', 'scanError'])
|
||||
|
||||
|
|
@ -12,8 +17,29 @@ const emit = defineEmits(['scanSuccess', 'scanError'])
|
|||
const scanQrCode = () => {
|
||||
console.log('扫一扫')
|
||||
console.log('window对象', window)
|
||||
try {
|
||||
document.addEventListener('deviceready', () => {
|
||||
window.cordova.plugins.zxingScan.startScan(
|
||||
(successResult) => {
|
||||
console.log('🚀 ~ 二维码 ~ successResult:', successResult)
|
||||
emit('scanSuccess', successResult)
|
||||
},
|
||||
(error) => {
|
||||
console.log('🚀 ~ 二维码 ~ error:', error)
|
||||
emit('scanError', new Error(`扫描失败: ${error}`))
|
||||
},
|
||||
{
|
||||
isPlayBeep: true, //是否播放扫描声音
|
||||
isShake: true, //是否震动
|
||||
fullScreenScan: true, //是否全屏
|
||||
},
|
||||
)
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ scanQrCode ~ error:', error)
|
||||
}
|
||||
|
||||
document.addEventListener('deviceready', onDeviceReady.bind(this), false)
|
||||
// document.addEventListener('deviceready', onDeviceReady.bind(this), false)
|
||||
|
||||
function onDeviceReady() {
|
||||
// Cordova is now initialized. Have fun!
|
||||
|
|
|
|||
|
|
@ -13,7 +13,29 @@ const scanQrCode = () => {
|
|||
console.log('扫一扫')
|
||||
console.log('window对象', window)
|
||||
|
||||
document.addEventListener('deviceready', onDeviceReady.bind(this), false)
|
||||
try {
|
||||
document.addEventListener('deviceready', () => {
|
||||
window.cordova.plugins.zxingScan.startScan(
|
||||
(successResult) => {
|
||||
console.log('🚀 ~ 二维码 ~ successResult:', successResult)
|
||||
emit('scanSuccess', successResult)
|
||||
},
|
||||
(error) => {
|
||||
console.log('🚀 ~ 二维码 ~ error:', error)
|
||||
emit('scanError', new Error(`扫描失败: ${error}`))
|
||||
},
|
||||
{
|
||||
isPlayBeep: true, //是否播放扫描声音
|
||||
isShake: true, //是否震动
|
||||
fullScreenScan: true, //是否全屏
|
||||
},
|
||||
)
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ scanQrCode ~ error:', error)
|
||||
}
|
||||
|
||||
// document.addEventListener('deviceready', onDeviceReady.bind(this), false)
|
||||
|
||||
function onDeviceReady() {
|
||||
window.cordova.plugins.zxingScan.startScan(
|
||||
|
|
|
|||
|
|
@ -148,7 +148,9 @@ const scanStart = () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
console.log('🚀 ~ handleScanSuccess ~ result:', result)
|
||||
qrCodeScan.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
console.log('🚀 ~ handleScanSuccess ~ qrCodeScan.value:', qrCodeScan.value)
|
||||
if (qrCodeScan.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const onQrCode = () => {
|
|||
}
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCode.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
qrCode.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
if (qrCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ const isUsingList = ref([
|
|||
{ path: 'teamStore', name: '班组库存', src: 'teamStore', isShow: true },
|
||||
{ path: 'teamWarning', name: '班组预警', src: 'teamWarning', isShow: true },
|
||||
{ path: 'authorizeSignature', name: '项目部授权', src: 'authorizeSignature', isShow: true },
|
||||
{ path: 'materialClerkConfirms', name: '材料员确认', src: 'outStore', isShow: true },
|
||||
])
|
||||
|
||||
const userAgent = navigator.userAgent.toLowerCase()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,153 @@
|
|||
<template>
|
||||
<div class="content">
|
||||
<!-- 滚动列表 -->
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower">
|
||||
<div class="list" v-for="(item, index) in tableList" @click="handleDetails(item)">
|
||||
<div style="margin-right: 8px">{{ index + 1 }}.</div>
|
||||
<div class="item">
|
||||
<div>物资名称: {{ item.maTypeName }}</div>
|
||||
<div>规格型号: {{ item.typeName }}</div>
|
||||
<div>计量单位: {{ item.unitName }}</div>
|
||||
<div>出库数量: {{ item.outNum || 0 }}</div>
|
||||
<div>出库方式: {{ item.manageType == 1 ? '数量出库' : '编码出库' }}</div>
|
||||
<div>备注: {{ item.remark }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button v-if="opts.isConfirm == 1" type="primary" style="margin-top: 30px" @click="penPopup">
|
||||
确 认
|
||||
</button>
|
||||
</scroll-view>
|
||||
</div>
|
||||
|
||||
<!-- 填写备注的弹框 -->
|
||||
<uni-popup ref="popup" type="dialog">
|
||||
<view class="popup-content">
|
||||
<view class="popup-title">材料员确认</view>
|
||||
<uni-easyinput type="textarea" v-model="remark" placeholder="请输入备注..." autoHeight />
|
||||
<view class="popup-btns">
|
||||
<button type="default" @click="closePopup">取 消</button>
|
||||
<button type="primary" @click="confirmRemark">确 认</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { getLeaseRequestVoApi, confirmMaterialApi } from '@/services/materialsStation'
|
||||
|
||||
const opts = ref(null)
|
||||
const tableList = ref([])
|
||||
const total = ref(0)
|
||||
const remark = ref('')
|
||||
const popup = ref()
|
||||
const loading = ref(false)
|
||||
|
||||
const finish = computed(() => {
|
||||
if (total.value === tableList.value.length) return true
|
||||
})
|
||||
|
||||
onShow((opt) => {})
|
||||
|
||||
onLoad((opt) => {
|
||||
console.log('🚀 ~ onLoad ~ opt:', opt)
|
||||
opts.value = opt.params ? JSON.parse(opt.params) : {}
|
||||
console.log('🚀 ~ opts.value:', opts.value)
|
||||
getList()
|
||||
})
|
||||
|
||||
const onScrollTolower = () => {
|
||||
if (finish.value) return
|
||||
queryParams.pageSize += 10
|
||||
getList()
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
try {
|
||||
const res = await getLeaseRequestVoApi(opts.value)
|
||||
tableList.value = res.data.leaseApplyDetailsList
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getList ~ error:', error)
|
||||
}
|
||||
}
|
||||
const handleDetails = (item) => {
|
||||
console.log('🚀 ~ handleDetails ~ item:', item)
|
||||
}
|
||||
const penPopup = () => {
|
||||
popup.value.open()
|
||||
}
|
||||
const closePopup = () => {
|
||||
popup.value.close()
|
||||
}
|
||||
const confirmRemark = () => {
|
||||
console.log('opts:', opts.value)
|
||||
const params = {
|
||||
id: opts.value.id,
|
||||
leaseSignId: opts.value.leaseSignId,
|
||||
isConfirm: 2,
|
||||
confirmRemark: remark.value,
|
||||
}
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
// loading
|
||||
uni.showLoading({
|
||||
title: '提交中...',
|
||||
})
|
||||
confirmMaterialApi(params)
|
||||
.then((res) => {
|
||||
popup.value.close()
|
||||
uni.hideLoading()
|
||||
loading.value = false
|
||||
// 返回
|
||||
uni.navigateBack()
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('err:', err)
|
||||
loading.value = false
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
padding: 10px;
|
||||
height: calc(100vh - 147px);
|
||||
.query {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #f0a037;
|
||||
}
|
||||
|
||||
.list {
|
||||
min-height: 120px;
|
||||
margin-bottom: 10px;
|
||||
background: #fafafa;
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.popup-content {
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
width: 80vw;
|
||||
}
|
||||
.popup-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.popup-btns {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.popup-btns button {
|
||||
/* margin-left: 20rpx; */
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
<template>
|
||||
<div class="content">
|
||||
<!-- 滚动列表 -->
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower">
|
||||
<div class="list" v-for="(item, index) in tableList" @click="handleDetails(item)">
|
||||
<div style="margin-right: 8px">{{ index + 1 }}.</div>
|
||||
<div class="item">
|
||||
<div>类型名称: {{ item.maTypeNames }}</div>
|
||||
<div>已出库数量: {{ item.outNum || 0 }}</div>
|
||||
<div v-if="item.isConfirm == 2">确认人: {{ item.confirmPerson }}</div>
|
||||
<div v-if="item.isConfirm == 2">确认时间: {{ item.confirmTime }}</div>
|
||||
<div style="line-height: 1.8; display: flex; align-items: center">
|
||||
<span style="margin-right: 5px">确认状态:</span>
|
||||
<uni-tag
|
||||
:text="item.isConfirm == 2 ? '已确认' : '待确认'"
|
||||
:inverted="true"
|
||||
:type="item.isConfirm == 2 ? 'success' : 'error'"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="item.isConfirm == 2">确认备注: {{ item.remark }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: center; align-items: center; height: 50px">
|
||||
{{ '没有更多数据了~' }}
|
||||
</div>
|
||||
</scroll-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { ref } from 'vue'
|
||||
import { getInfoByIdApi } from '@/services/materialsStation'
|
||||
|
||||
const itemId = ref(null)
|
||||
const tableList = ref([])
|
||||
|
||||
onLoad((opt) => {
|
||||
console.log('🚀 ~ onLoad ~ opt:', opt)
|
||||
itemId.value = opt.id
|
||||
console.log('🚀 ~ itemId.value:', itemId.value)
|
||||
getList()
|
||||
})
|
||||
|
||||
const onScrollTolower = () => {
|
||||
// if (finish.value) return
|
||||
// getList()
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
try {
|
||||
const res = await getInfoByIdApi({ id: itemId.value })
|
||||
tableList.value = res.data
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getList ~ error:', error)
|
||||
}
|
||||
}
|
||||
const handleDetails = (item) => {
|
||||
console.log('🚀 ~ handleDetails ~ item:', item)
|
||||
const params = {
|
||||
id: itemId.value,
|
||||
leaseSignId: item.leaseSignId,
|
||||
publishTask: item.publishTask,
|
||||
isConfirm: item.isConfirm
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/materialsStation/materialClerkConfirms/confirmDetails?params=${JSON.stringify(params)}`,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
padding: 10px;
|
||||
height: calc(100vh - 147px);
|
||||
.query {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #f0a037;
|
||||
}
|
||||
|
||||
.list {
|
||||
min-height: 120px;
|
||||
margin-bottom: 10px;
|
||||
background: #fafafa;
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
<template>
|
||||
<div class="content">
|
||||
<div class="query">
|
||||
<uni-datetime-picker
|
||||
v-model="queryParams.range"
|
||||
type="daterange"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
/>
|
||||
<uni-easyinput
|
||||
errorMessage
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入内容"
|
||||
style="margin: 0 5px"
|
||||
/>
|
||||
<button size="mini" style="background-color: #f0a037; color: #fff" @click="getList">
|
||||
查询
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div style="width: 60%; margin: 10px auto">
|
||||
<uni-segmented-control
|
||||
:values="segment"
|
||||
:current="current"
|
||||
@clickItem="onClickItem"
|
||||
styleType="button"
|
||||
activeColor="#007aff"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 滚动列表 -->
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower">
|
||||
<div class="list" v-for="(item, index) in tableList" @click="handleDetails(item)">
|
||||
<div style="margin-right: 8px">{{ index + 1 }}.</div>
|
||||
<div class="item">
|
||||
<div>发布时间: {{ item.confirmTime }}</div>
|
||||
<div>租赁申请单号: {{ item.code || item.businessCode }}</div>
|
||||
<div>领料工器具: {{ item.maTypeNames }}</div>
|
||||
<div>领料单位: {{ item.unitName }}</div>
|
||||
<div>领料工程: {{ item.projectName }}</div>
|
||||
<div>发布数量: {{ item.preCountNum || 0 }}</div>
|
||||
<div>已出库数量: {{ item.alNum || 0 }}</div>
|
||||
<div style="line-height: 1.8; display: flex; align-items: center">
|
||||
<span style="margin-right: 5px">确认状态:</span>
|
||||
<uni-tag
|
||||
:text="item.isConfirm == 2 ? '已确认' : '待确认'"
|
||||
:inverted="true"
|
||||
:type="item.isConfirm == 2 ? 'success' : 'error'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: center; align-items: center; height: 50px">
|
||||
{{ finish ? '没有更多数据了~' : '正在加载...' }}
|
||||
</div>
|
||||
</scroll-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { getCompleteOutTaskListApi } from '@/services/materialsStation'
|
||||
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
range: [],
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
keyWord: '',
|
||||
isConfirm: 1,
|
||||
statusList: [3, 4, 5],
|
||||
})
|
||||
const segment = ref(['待确认', '已确认'])
|
||||
const current = ref(0)
|
||||
const tableList = ref([])
|
||||
const total = ref(0)
|
||||
const swipeRef = ref()
|
||||
|
||||
const finish = computed(() => {
|
||||
if (total.value === tableList.value.length) return true
|
||||
})
|
||||
|
||||
onShow((opt) => {
|
||||
console.log('🚀 ~ onLoad ~ opt:', opt)
|
||||
getList()
|
||||
})
|
||||
|
||||
const onScrollTolower = () => {
|
||||
if (finish.value) return
|
||||
queryParams.pageSize += 10
|
||||
getList()
|
||||
}
|
||||
|
||||
const onClickItem = (item) => {
|
||||
console.log('🚀 ~ onClickItem ~ item:', item, current.value)
|
||||
queryParams.isConfirm = item.currentIndex + 1
|
||||
getList()
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
queryParams.startTime = queryParams.range && queryParams.range[0]
|
||||
queryParams.endTime = queryParams.range && queryParams.range[1]
|
||||
try {
|
||||
const res = await getCompleteOutTaskListApi(queryParams)
|
||||
tableList.value = res.data.rows
|
||||
total.value = res.data.total
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getList ~ error:', error)
|
||||
}
|
||||
}
|
||||
const handleDetails = (item) => {
|
||||
console.log('🚀 ~ handleDetails ~ item:', item)
|
||||
uni.navigateTo({
|
||||
url: `/pages/materialsStation/materialClerkConfirms/detailsList?id=${item.id}`,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
padding: 10px;
|
||||
height: calc(100vh - 147px);
|
||||
.query {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #f0a037;
|
||||
}
|
||||
|
||||
.list {
|
||||
min-height: 120px;
|
||||
margin-bottom: 10px;
|
||||
background: #fafafa;
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -433,7 +433,7 @@ const handleRfid = () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
qrCodeScan.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
if (qrCodeScan.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ const handleCheck = (item) => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCode.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
qrCode.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
if (qrCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ const scanStart = () => {
|
|||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
formData.value.qrCode = ''
|
||||
formData.value.qrCode = result?.text.split('qrcode=')[1] || ''
|
||||
formData.value.qrCode = result?.data.split('qrcode=')[1] || ''
|
||||
if (formData.value.qrCode === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ const codeScan = async () => {
|
|||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCode.value = ''
|
||||
qrCode.value = result?.text.split('qrcode=')[1] || ''
|
||||
qrCode.value = result?.data.split('qrcode=')[1] || ''
|
||||
if (qrCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
@ -278,7 +278,7 @@ const boxScan = async () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccessBox = (result) => {
|
||||
boxCode.value = result?.text || ''
|
||||
boxCode.value = result?.data || ''
|
||||
if (boxCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ const rightClick = () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccessBox = (result) => {
|
||||
boxCode.value = result?.text || ''
|
||||
boxCode.value = result?.data || ''
|
||||
if (boxCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -414,7 +414,7 @@ const boxScan = async () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccessBox = (result) => {
|
||||
boxCode.value = result?.text || ''
|
||||
boxCode.value = result?.data || ''
|
||||
if (boxCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
@ -567,7 +567,9 @@ const scanStart = () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
console.log('🚀 ~ handleScanSuccess ~ result:', result)
|
||||
qrCodeScan.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
console.log('🚀 ~ handleScanSuccess ~ qrCodeScan.value:', qrCodeScan.value)
|
||||
if (qrCodeScan.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ const boxScan = async () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccessBox = (result) => {
|
||||
boxCode.value = result?.text || ''
|
||||
boxCode.value = result?.data || ''
|
||||
if (boxCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
@ -364,7 +364,7 @@ const scanStart = () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
qrCodeScan.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
if (qrCodeScan.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ const codeScan = async () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCode.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
qrCode.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
if (qrCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ const codeScan = () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
qrCode.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
qrCode.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
if (qrCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
@ -215,7 +215,7 @@ const boxScan = async () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccessBox = (result) => {
|
||||
boxCode.value = result?.text || ''
|
||||
boxCode.value = result?.data || ''
|
||||
if (boxCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ const scanStart = () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
formData.value.boxCode = result?.text || ''
|
||||
formData.value.boxCode = result?.data || ''
|
||||
if (formData.value.boxCode === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
}
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ const rightClick = () => {
|
|||
}
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccessBox = async (result) => {
|
||||
boxCode.value = result?.text || ''
|
||||
boxCode.value = result?.data || ''
|
||||
if (boxCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ const scanStart = async () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
searchValue.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||
searchValue.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||
if (searchValue.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ const scanStart = async () => {
|
|||
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccess = (result) => {
|
||||
const qrCode = result?.text || '';
|
||||
const qrCode = result?.data || '';
|
||||
if (qrCode === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ onMounted(() => {
|
|||
})
|
||||
// 处理扫描成功事件
|
||||
const handleScanSuccessBox = (result) => {
|
||||
boxCode.value = result?.text || ''
|
||||
boxCode.value = result?.data || ''
|
||||
if (boxCode.value === '') {
|
||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -309,3 +309,39 @@ export const getListByIdCardApi = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 材料员确认-列表
|
||||
export const getCompleteOutTaskListApi = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/lease_apply_info/getCompleteOutTaskList',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 确认详情列表
|
||||
export const getInfoByIdApi = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/lease_apply_info/getInfoById',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 确认详情
|
||||
export const getLeaseRequestVoApi = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/lease_apply_info/getLeaseRequestVo',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 材料员确认
|
||||
export const confirmMaterialApi = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material/lease_apply_info/confirmMaterial',
|
||||
data,
|
||||
})
|
||||
}
|
||||
Loading…
Reference in New Issue