From 749cd3b365ed2746e50566108a4d303bdf2cec72 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 20 Nov 2024 14:54:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E7=BB=91=E5=AE=9A=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=88=9D=E6=AD=A5=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 9 +- src/pages/login/index.vue | 1 - src/pages/new-purchase/bind/details.vue | 254 ++++++++++++++++++ src/pages/new-purchase/bind/index.vue | 265 +++++++++++++------ src/pages/picking/outbound/code-outbound.vue | 72 +++-- src/pages/picking/outbound/index.vue | 12 +- src/services/index.js | 1 - src/services/new-purchase/bind.js | 22 ++ src/styles/reset.css | 2 +- 9 files changed, 520 insertions(+), 118 deletions(-) create mode 100644 src/pages/new-purchase/bind/details.vue create mode 100644 src/services/new-purchase/bind.js diff --git a/src/pages.json b/src/pages.json index e760154..a6f1f03 100644 --- a/src/pages.json +++ b/src/pages.json @@ -37,13 +37,20 @@ "navigationBarTitleText": "新购验收" } }, - // 绑定 + // 新购绑定 { "path": "pages/new-purchase/bind/index", "style": { "navigationBarTitleText": "新购绑定" } }, + // 详情 + { + "path": "pages/new-purchase/bind/details", + "style": { + "navigationBarTitleText": "新购绑定详情" + } + }, // 入库 { "path": "pages/new-purchase/entry/index", diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index cf3dd4c..4999908 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -40,7 +40,6 @@ const loginForm = reactive({ // 登录按钮 const onHandleLogin = async () => { const res = await appLoginAPI(loginForm) - console.log(res) if (res.code === 200) { // 1. 获取 token 并存储 memberStore.setToken(res.data.access_token) diff --git a/src/pages/new-purchase/bind/details.vue b/src/pages/new-purchase/bind/details.vue new file mode 100644 index 0000000..097cc9e --- /dev/null +++ b/src/pages/new-purchase/bind/details.vue @@ -0,0 +1,254 @@ + + + + + diff --git a/src/pages/new-purchase/bind/index.vue b/src/pages/new-purchase/bind/index.vue index 58f9a88..f76b58b 100644 --- a/src/pages/new-purchase/bind/index.vue +++ b/src/pages/new-purchase/bind/index.vue @@ -1,6 +1,6 @@ diff --git a/src/pages/picking/outbound/code-outbound.vue b/src/pages/picking/outbound/code-outbound.vue index a2b3bef..4818c95 100644 --- a/src/pages/picking/outbound/code-outbound.vue +++ b/src/pages/picking/outbound/code-outbound.vue @@ -3,26 +3,26 @@ - 领料单位: - + 领料单位: + {{ queryParams.leaseUnit }} - 领料工程: - + 领料工程: + {{ queryParams.leaseProject }} - 当前出库物资: - 当前出库物资: + {{ queryParams.maTypeName }} - 待出库数量: - + 待出库数量: + {{ maxNum }} @@ -32,13 +32,13 @@ 出库方式: - 编码识别 + 编码识别 - 编码识别 + 编码识别 - 二维码识别 + 二维码识别 @@ -50,7 +50,7 @@ - + @@ -72,8 +72,8 @@ - 物资类型: - + 物资类型: + {{ item.materialName }} @@ -92,20 +92,26 @@ - 规格型号: - + 规格型号: + {{ item.materialModel }} - 设备状态: - + 设备编码: + + {{ item.maCode }} + + + + 设备状态: + {{ item.statusName }} - 设备数量: - + 设备数量: + 1 @@ -124,6 +130,7 @@ import { ref, computed } from 'vue' import { getCodeDeviceListAPI, setOutboundNumAPI } from '@/services/picking/outbound.js' import { onBackPress } from '@dcloudio/uni-app' +import { debounce } from 'lodash-es' const query = defineProps() // 获取上级页面传递的路由参数 const queryParams = JSON.parse(query.queryParams) const codeDeviceList = ref([]) @@ -135,6 +142,7 @@ const queryCodeParams = ref({ pageSize: 10, typeId: queryParams.typeId, maStatus: 1, + maCode: '', }) // 计算出库最大数量 @@ -148,7 +156,7 @@ const maxNum = computed(() => { // 获取编码列表 const getCodeDeviceListData = async () => { - // console.log('queryCodeParams', queryCodeParams) + console.log('queryCodeParams', queryCodeParams.value) const res = await getCodeDeviceListAPI(queryCodeParams.value) codeDeviceList.value.push(...res.rows) @@ -161,20 +169,36 @@ const getCodeDeviceListData = async () => { } getCodeDeviceListData() +// 编码识别按钮 +const onCodeIdentify = () => { + console.log('编码识别--') + + // 只允许通过相机扫码 + uni.scanCode({ + onlyFromCamera: true, + scanType: ['qrCode', 'pdf417'], + success: function (res) { + console.log('条码类型:' + res.scanType) + console.log('条码内容:' + res.result) + }, + }) +} + // 编码搜索按钮 const onCodeSearch = () => { + queryCodeParams.value.pageNum = 1 codeDeviceList.value = [] getCodeDeviceListData() } // 滚动触底事件 -const onScrollTolower = () => { - console.log('滚动触底--') +const onScrollTolower = debounce(() => { + // console.log('滚动触底--') if (total.value > codeDeviceList.value.length) { queryCodeParams.value.pageNum++ getCodeDeviceListData() } -} +}, 500) // 判断数据是否加载完毕 const finish = computed(() => { diff --git a/src/pages/picking/outbound/index.vue b/src/pages/picking/outbound/index.vue index 10c8fb8..237e15c 100644 --- a/src/pages/picking/outbound/index.vue +++ b/src/pages/picking/outbound/index.vue @@ -156,23 +156,25 @@ const getTableList = async (isTap = false) => { } } -// 页面加载完毕 -onLoad(() => { - getTableList() -}) +// // 页面加载完毕 +// onLoad(() => { +// getTableList() +// }) onShow(() => { tableList.value = [] + total.value = 0 getTableList() }) // 滚动触底事件 const onScrollTolower = debounce(() => { + console.log('触底事件') if (total.value > tableList.value.length) { queryParams.value.pageNum++ getTableList() } -}) +}, 500) // tap 栏切换 const changeTab = (index) => { diff --git a/src/services/index.js b/src/services/index.js index fe5103b..bd11949 100644 --- a/src/services/index.js +++ b/src/services/index.js @@ -4,7 +4,6 @@ import { http } from '@/utils/http' * 登录接口 */ export const appLoginAPI = (data) => { - console.log('999') return http({ method: 'POST', url: '/auth/login', diff --git a/src/services/new-purchase/bind.js b/src/services/new-purchase/bind.js new file mode 100644 index 0000000..8d5e8d0 --- /dev/null +++ b/src/services/new-purchase/bind.js @@ -0,0 +1,22 @@ +import { http } from '@/utils/http' + +/** + * 新购绑定 ---- 列表查询 + */ +export const getPurchaseBindListAPI = (data) => { + return http({ + method: 'GET', + url: '/material/purchase_check_info/list', + data, + }) +} +/** + * 新购绑定 ---- 列表查询 + */ +export const getPurchaseBindDetailsAPI = (data) => { + return http({ + method: 'GET', + url: '/material/purchase_check_info/getInfo', + data, + }) +} diff --git a/src/styles/reset.css b/src/styles/reset.css index b7d2330..fbac1c2 100644 --- a/src/styles/reset.css +++ b/src/styles/reset.css @@ -121,5 +121,5 @@ a:hover { page { /* height: 100%; */ - font-size: 16px; + font-size: 28rpx; }