-->
-
+
-
+
-
+
@@ -636,12 +636,13 @@ const scanStart = () => {
console.log('🚀 ~ success: ~ res:', res)
if (res.code === 200) {
if (res.data && res.data.recordList.length > 0) {
- codeDeviceList.value.push(...res.data.recordList)
+ codeDeviceList.value.unshift(...res.data.recordList)
// 去重
if (codeDeviceList.value.length > 0) {
const seen = new Set()
codeDeviceList.value = codeDeviceList.value.filter((item) => {
if (!item.maCode || seen.has(item.maCode)) {
+ uni.showToast({ title: '设备已添加', icon: 'none' })
return false
}
seen.add(item.maCode)
@@ -652,8 +653,9 @@ const scanStart = () => {
item.materialName = item.typeName
item.materialModel = item.typeModelName
item.outType = 2 // 出库方式 二维码
- item.checked = false // 默认未选中
+ item.checked = true // 默认未选中
})
+ allChecked.value = codeDeviceList.value.every((e) => e.checked)
}
} else {
uni.showToast({ title: res.data.msg, icon: 'none', duration: 1500 })
@@ -796,6 +798,17 @@ const ocrClick = () => {
border-radius: 20rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
margin-bottom: 24rpx;
+ .item-btn {
+ @media (min-width: 768px) {
+ width: 100px;
+ font-size: 15px;
+ }
+ // 针对手机(如宽度小于768px)设置不同的 padding-top
+ @media (max-width: 767px) {
+ width: 80px;
+ font-size: 14px;
+ }
+ }
// 表单样式
:deep(.uni-forms) {
diff --git a/src/pages/toolsLease/toolsLease.vue b/src/pages/toolsLease/toolsLease.vue
index 661c400..a569e3f 100644
--- a/src/pages/toolsLease/toolsLease.vue
+++ b/src/pages/toolsLease/toolsLease.vue
@@ -64,16 +64,16 @@
预领数量: {{ item.preCountNum || 0 }}
已领数量: {{ item.alNum || 0 }}
待领数量: {{ item.waitCountNum || 0 }}
-
- 状态:
+
+ 状态:
-
- 是否签名:
+
+
是否签名:
{
{ text: '编辑', style: { backgroundColor: '#2f8cf0' } },
{ text: '删除', style: { backgroundColor: '#ff4949' } },
]
+ if (opts.value.isOut) {
+ options[1].text = '出库'
+ }
console.log('🚀 ~ tableList.value=res.data.rows.map ~ item.taskStatus:', item.taskStatus)
// if (!opts.value.isOut && item.taskStatus != 4) {
// options = options.filter((option) => option.text !== '提交')
@@ -310,7 +313,7 @@ const onClickSwipe = async (e, item) => {
icon: 'none',
})
}
- } else if (e.content.text == '编辑') {
+ } else if (e.content.text == '出库' || e.content.text == '编辑') {
// 编辑
const params = JSON.stringify({
id: item.id,
diff --git a/src/pages/toolsLease/toolsLeaseAdd.vue b/src/pages/toolsLease/toolsLeaseAdd.vue
index b30b1ac..475f3b9 100644
--- a/src/pages/toolsLease/toolsLeaseAdd.vue
+++ b/src/pages/toolsLease/toolsLeaseAdd.vue
@@ -20,15 +20,22 @@
+
-
+ > -->
+
-
+
规格型号
在库数
在用数
+ 预领数
{{ opts.isOut ? '出库数' : '领用数' }}
操作
@@ -91,9 +112,10 @@
{{ item.storageNum }}
{{ item.useNum }}
+ {{ item.preNum }}
{{
- item.maCodeList.length == 0 ? '选择编码' : item.maCodeList.length
+ !item.maCodeList || item.maCodeList.length == 0 ? '选择编码' : item.maCodeList.length
}}
-
+
+
+ {{ '没有更多数据了~' }}
+