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 @@
+
+
+
+
+
+ 物资名称:
+
+ {{ queryParams.maTypeName }}
+
+
+
+ 物资规格:
+
+ {{ queryParams.typeName }}
+
+
+
+ 到货数量:
+ {{ queryParams.purchaseNum }}
+
+
+
+ 待绑定数量:
+
+ {{ waitBindNum }}
+
+
+
+
+
+
+
+
+
+ *
+ 前缀
+
+
+
+
+
+
+
+
+ 绑定
+
+
+
+ OCR绑定
+
+
+
+
+
+
+
+ *
+ 后缀
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 填充
+
+
+
+
+
+
+ {{ index + 1 }}
+
+
+ 编码
+
+
+
+
+
+
+
+ 出厂编码
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
-
+
+
{
data,
})
}
+/**
+ * 新购绑定 ---- 列表查询
+ */
+export const setBindCodingAPI = (data) => {
+ return http({
+ method: 'POST',
+ url: '/material/purchase/bind/bind',
+ data,
+ })
+}
diff --git a/src/styles/reset.css b/src/styles/reset.css
index fbac1c2..1253a9e 100644
--- a/src/styles/reset.css
+++ b/src/styles/reset.css
@@ -122,4 +122,5 @@ a:hover {
page {
/* height: 100%; */
font-size: 28rpx;
+ background-color: #e8f5fb;
}
diff --git a/src/utils/http.js b/src/utils/http.js
index 6369cf9..5fa1b78 100644
--- a/src/utils/http.js
+++ b/src/utils/http.js
@@ -6,7 +6,8 @@ import { useMemberStore } from '@/stores'
* baseURL 设置请求ip地址和端口
*/
const ENV = process.env.NODE_ENV
-export const baseURL = ENV === 'development' ? 'http://192.168.2.246:18080' : '***'
+// export const baseURL = ENV === 'development' ? 'http://192.168.2.246:18080' : '***'
+export const baseURL = ENV === 'development' ? '/api' : '***'
/**
* httpInterceptor 分别拦截 request 和 uploadFile 请求
*/
@@ -65,12 +66,12 @@ export const http = (options) => {
url: '/pages/login/index',
})
reject(res)
- } else if (res.data.code === 500) {
- uni.showToast({
- icon: 'none',
- title: `${res.data.msg}`,
- })
- }
+ } else if (res.data.code === 500) {
+ uni.showToast({
+ icon: 'none',
+ title: `${res.data.msg}`,
+ })
+ }
} else if (res.statusCode === 401) {
// 2. 401 表示token过期 去往登录页重新登录
const memberStore = useMemberStore()
diff --git a/vite.config.js b/vite.config.js
index 6516918..c58975b 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -21,7 +21,7 @@ export default defineConfig({
// 在此处编写代理规则
'/api': {
// target: 'http://192.168.2.76:18080',
- target: 'http://localhost:18080',
+ target: 'http://192.168.2.246:18080',
changeOrigin: true,
rewrite: (path) => {
return path.replace(/\/api/, '')