diff --git a/src/pages.json b/src/pages.json index 81ec629..1be53f3 100644 --- a/src/pages.json +++ b/src/pages.json @@ -44,13 +44,20 @@ "navigationBarTitleText": "新购绑定" } }, - // 详情 + // 1. 详情 { "path": "pages/new-purchase/bind/details", "style": { "navigationBarTitleText": "新购绑定详情" } }, + // 2. 编码绑定 + { + "path": "pages/new-purchase/bind/coding-bind", + "style": { + "navigationBarTitleText": "编码绑定" + } + }, // 入库 { "path": "pages/new-purchase/entry/index", @@ -132,7 +139,6 @@ "navigationBarTitleText": "退料数量" } } - ], "tabBar": { "color": "#2c2c2c", diff --git a/src/pages/new-purchase/bind/coding-bind.vue b/src/pages/new-purchase/bind/coding-bind.vue new file mode 100644 index 0000000..b3bcf8c --- /dev/null +++ b/src/pages/new-purchase/bind/coding-bind.vue @@ -0,0 +1,351 @@ + + + + + diff --git a/src/pages/new-purchase/bind/details.vue b/src/pages/new-purchase/bind/details.vue index 097cc9e..a33c750 100644 --- a/src/pages/new-purchase/bind/details.vue +++ b/src/pages/new-purchase/bind/details.vue @@ -13,84 +13,83 @@ - - - - {{ index + 1 }} - 物资名称: - - {{ item.maTypeName }} - - - - {{ index + 1 }} - 规格型号: - - {{ item.typeName }} - - - - {{ index + 1 }} - 物资数量: - - {{ item.purchaseNum }} - - - - {{ index + 1 }} - 已绑数量: - - {{ item.bindNum }} - - - - {{ index + 1 }} - 待绑数量: - - {{ item.checkNum - item.bindNum }} - - - - {{ index + 1 }} - 管理模式: - - - - - - - {{ index + 1 }} - 状态: - - - - - + + + + + + {{ index + 1 }} + 物资名称: + + {{ item.maTypeName }} + + + + {{ index + 1 }} + 规格型号: + + {{ item.typeName }} + + + + {{ index + 1 }} + 物资数量: + + {{ item.purchaseNum }} + + + + {{ index + 1 }} + 已绑数量: + + {{ item.bindNum }} + + + + {{ index + 1 }} + 待绑数量: + + {{ item.checkNum - item.bindNum }} + + + + {{ index + 1 }} + 管理模式: + + + + + + + {{ index + 1 }} + 状态: + + + + + + + @@ -103,6 +102,34 @@ import { onLoad } from '@dcloudio/uni-app' const detailsList = ref([]) const query = defineProps() // 获取上级页面传递的路由参数 +// 右滑按钮组 +const options = ref([ + { + text: '编码绑定', + style: { + backgroundColor: '#84c649', + color: '#fff', + fontSize: '30rpx', + }, + }, + { + text: '二维码绑定', + style: { + backgroundColor: '#65a1ff', + color: '#fff', + fontSize: '30rpx', + }, + }, + { + text: '驳回', + style: { + backgroundColor: '#ed6042', + color: '#fff', + fontSize: '30rpx', + }, + }, +]) + // 查询参数 const queryParams = ref({ pageNum: 1, @@ -114,70 +141,50 @@ const queryParams = ref({ // 领料单位,参数等信息 const leaseApplyInfo = ref({ - leaseUnit: '', // 领料单位 - leaseProject: '', // 领料工程 - maTypeName: '', // 物资类型 - typeName: '', // 规格型号 - unitName: '', // 单位 - storageNum: '', // 库存数量 - preNum: '', // 预领数量 - parentId: query.id, // 出库时所需参数 取列表 id - id: '', // 出库时所需参数 取详情接口 id - typeId: '', // 出库时所需参数 取详情接口 typeId - manageType: '', // 出库时所需参数 取详情接口 manageType + maTypeName: '', // 物资类型 + typeName: '', // 规格型号 + purchaseNum: '', // 到货数量 + bindNum: '', // 已绑数量 + checkNum: '', // 应绑数量 + typeId: '', // 出库时所需参数 取详情接口 typeId + taskId: query.taskId, // 出库时所需参数 取详情接口 taskId }) // 获取列表详情 const getOutboundDetailsData = async () => { console.log('queryParams参数', queryParams.value) const { data: res } = await getPurchaseBindDetailsAPI(queryParams.value) - // console.log('res详情', res) detailsList.value = res.purchaseCheckDetailsList - // leaseApplyInfo.value.leaseUnit = res.leaseApplyInfo.leaseUnit - // leaseApplyInfo.value.leaseProject = res.leaseApplyInfo.leaseProject - // console.log('详情数据', res) } -// 点击跳转出库页面 -const onCodingItem = (item) => { - // 解构所需要的数据 - const { - status, - manageType, - maTypeName, - typeName, - storageNum, - preNum, - alNum, - unitName, - id, - typeId, - } = item +// 右滑按钮事件 + +const onClick = (e, item) => { + const { maTypeName, typeName, purchaseNum, bindNum, checkNum, typeId } = item leaseApplyInfo.value.maTypeName = maTypeName leaseApplyInfo.value.typeName = typeName - leaseApplyInfo.value.unitName = unitName - leaseApplyInfo.value.storageNum = storageNum - leaseApplyInfo.value.preNum = preNum - leaseApplyInfo.value.alNum = alNum - leaseApplyInfo.value.id = id + leaseApplyInfo.value.purchaseNum = purchaseNum + leaseApplyInfo.value.bindNum = bindNum + leaseApplyInfo.value.checkNum = checkNum leaseApplyInfo.value.typeId = typeId - leaseApplyInfo.value.manageType = manageType - if (status == 2) { - uni.showToast({ title: '该物资已完成出库!', icon: 'none' }) - return - } - let codingUrl = '' - if (manageType === 0) { - codingUrl = '/pages/picking/outbound/code-outbound' // 编码出库 - } - if (manageType == 1) { - codingUrl = '/pages/picking/outbound/num-outbound' // 数量出库 - } + const { index } = e - // 把 leaseApplyInfo 领料信息转成 json 传递到下个页面 - uni.navigateTo({ url: `${codingUrl}?queryParams=${JSON.stringify(leaseApplyInfo.value)}` }) + // 1. 编码绑定 + if (index === 0) { + uni.navigateTo({ + url: `/pages/new-purchase/bind/coding-bind?queryParams=${JSON.stringify( + leaseApplyInfo.value, + )}`, + }) + } + // 2. 二维码绑定 + if (index === 1) { + } + // 3. 驳回 + if (index === 2) { + } } // 页面加载完毕 @@ -251,4 +258,9 @@ onUnmounted(() => { color: #666; padding: 20rpx 0; } + +::v-deep .uni-swipe_button { + writing-mode: vertical-rl; + padding: 0 18rpx; +} diff --git a/src/pages/new-purchase/bind/index.vue b/src/pages/new-purchase/bind/index.vue index f76b58b..116f0e0 100644 --- a/src/pages/new-purchase/bind/index.vue +++ b/src/pages/new-purchase/bind/index.vue @@ -1,7 +1,7 @@