唯一码图形对接以及退出登录

This commit is contained in:
zx
2026-03-24 11:38:41 +08:00
parent b648176e82
commit dde27ed688
12 changed files with 310 additions and 41 deletions

View File

@@ -33,8 +33,10 @@
<span v-if="item.remark">{{ item.remark }}</span>
<span v-else style="color: #999;">未填写</span>
</p>
<uv-image src="../../../static/qrcode.png" width="40rpx" height="40rpx"
style="margin-top:10rpx" />
<view @click.stop="getDetailInfo(item)">
<uv-image src="../../../static/qrcode.png" width="40rpx" height="40rpx"
style="margin-top:10rpx" />
</view>
</view>
</view>
</p>
@@ -44,26 +46,31 @@
</z-paging>
<view>
<!-- 提示窗示例 -->
<uni-popup ref="alertDialog" type="center">
<uni-popup-dialog type="error" v-if="isDialog" cancelText="取消" confirmText="确认" title="是否需要删除该唯一码?"
@confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
</uni-popup>
</view>
<!-- 唯一码图形显示弹窗 -->
<uv-modal ref="modalRef" :title="none" class="qrCodeModal":showConfirmButton="false">
<qr-code-modal :detail="materialList" />
</uv-modal>
</view>
</template>
<script setup>
import { ref } from 'vue';
import { getStatusName } from '../until';
import { getStatusName, getDetail } from '../until';
import { onShow } from "@dcloudio/uni-app";
import { getUniqueCodeList, delUniqueCode } from '@/api/uniqueCode'
import { getUniqueCodeList, delUniqueCode, detailUniqueCode } from '@/api/uniqueCode'
import QrCodeModal from './QrCodeModal.vue';
const queryParams = ref({
code:''
code: ''
})
const pagingRef = ref(null)
// 开关:唯一码图形
const modalRef = ref()
// 删除的数据
const delItem = ref(null)
// 删除弹框相关
@@ -71,7 +78,8 @@ const alertDialog = ref(null)
const isDialog = ref(false)
// 唯一码列表
const uniqueCodeList = ref([])
// 物料列表数组
const materialList = ref([])
// 列表:唯一码
const getMaterialList = () => {
getUniqueCodeList(queryParams.value).then(res => {
@@ -114,6 +122,17 @@ const dialogConfirm = () => {
dialogClose()
})
}
// 详情:唯一码
const getDetailInfo = (row) => {
detailUniqueCode({ id: row.id }).then((res) => {
if (res.code == 200) {
materialList.value = [{ ...res.data.material, ...getDetail(res.data.material.wornMaterial), qrCode: res.data.qrCode, code: res.data.code,qrCodeMark:res.data.remark }]
setTimeout(() => {
modalRef.value.open()
}, 300)
}
})
}
</script>
<style scoped lang="scss">
@@ -140,4 +159,11 @@ const dialogConfirm = () => {
font-size: 12px;
}
}
::v-deep.qrCodeModal {
.uv-modal__content {
display: block;
padding: 24rpx;
}
}
</style>