From 36c30539edf5e0b90b47964eddfc0febd4f42d0b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=94=A1=E7=8E=B2?=
<8702040+cai-ling@user.noreply.gitee.com>
Date: Fri, 22 Nov 2024 16:26:54 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E6=8D=AE=E5=87=BA=E5=BA=93=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 8 ++
pages/outbound/bill-list.vue | 128 +++++++++++++++++++++++
pages/outbound/bill-out-store.vue | 163 ++++++++++++++----------------
utils/getData2.js | 60 +++++++++++
4 files changed, 271 insertions(+), 88 deletions(-)
create mode 100644 pages/outbound/bill-list.vue
diff --git a/pages.json b/pages.json
index d361eb2..97ed336 100644
--- a/pages.json
+++ b/pages.json
@@ -225,6 +225,14 @@
,{
"path" : "pages/outbound/bill-out-store",
"style" :
+ {
+ "navigationStyle": "custom"
+ }
+
+ }
+ ,{
+ "path" : "pages/outbound/bill-list",
+ "style" :
{
"navigationStyle": "custom",
"enablePullDownRefresh": true,
diff --git a/pages/outbound/bill-list.vue b/pages/outbound/bill-list.vue
new file mode 100644
index 0000000..75933bc
--- /dev/null
+++ b/pages/outbound/bill-list.vue
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+ | 单据编码 |
+ 单据类型 |
+ 备注 |
+ 创建时间 |
+ 创建人 |
+ 物料编码 |
+ 申请数量 |
+ 计划数量 |
+ 已分配数量 |
+ 单位 |
+ 批次号 |
+
+
+
+
+ | {{e.code}} |
+ {{e.form_type}} |
+ {{e.remark}} |
+ {{e.create_time}} |
+ {{e.create_name}} |
+ {{e.material_code}} |
+ {{e.qty}} |
+ {{e.plan_qty}} |
+ {{e.assign_qty}} |
+ {{e.unit_id}} |
+ {{e.pcsn}} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/outbound/bill-out-store.vue b/pages/outbound/bill-out-store.vue
index 347faa8..80a448a 100644
--- a/pages/outbound/bill-out-store.vue
+++ b/pages/outbound/bill-out-store.vue
@@ -13,65 +13,80 @@
-
+
+
+ 单据编码
+ {{currentData.code}}
+ 单据类型
+ {{currentData.form_type}}
+
+
+ 备注
+ {{currentData.remark}}
+ 创建时间
+ {{currentData.create_time}}
+
+
+ 创建人
+ {{currentData.create_name}}
+ 物料编码
+ {{currentData.material_code}}
+
+
+ 申请数量
+ {{currentData.qty}}
+ 计划数量
+ {{currentData.plan_qty}}
+
+
+ 已分配数量
+ {{currentData.assign_qty}}
+ 单位
+ {{currentData.unit_id}}
+
+
+ 批次号
+ {{currentData.pcsn}}
+ 创建时间
+ {{currentData.create_time}}
+
+
+
-
-
-
-
-
-
+
@@ -90,20 +105,8 @@
title: '',
options: [],
index: '',
- dataList: [],
- pkId: '',
- pkObj: {},
- disabled: false,
- reload: false,
- status: 'more',
- contentText: {
- contentdown: '查看更多',
- contentrefresh: '加载中',
- contentnomore: '没有更多'
- },
- totalCount: 0,
- pageNum: 1,
- pageSize: 10
+ currentData: {},
+ disabled: false
};
},
onLoad (options) {
@@ -112,6 +115,15 @@
created () {
this._outStorageOrder()
},
+ onShow () {
+ if (this.$store.getters.publicObj !== '') {
+ this.currentData = this.$store.getters.publicObj
+ this.currentData.children.map(el => {
+ this.$set(el, 'assign_qty', el.qty)
+ })
+ this.$store.dispatch('setPublicObj', '')
+ }
+ },
methods: {
/** 下拉框*/
async _outStorageOrder () {
@@ -121,58 +133,28 @@
selectChange (e) {
this.index = e
if (e) {
- this.searchList()
+ uni.navigateTo({
+ url: '/pages/outbound/bill-list?title=单据列表&id=' + e
+ })
}
},
- searchList () {
- this.dataList = []
- this.pageNum = 1
- this._outStorageOrderList()
- },
- async _outStorageOrderList () {
- let res = await outStorageOrderList(this.pageNum + '', this.pageSize + '', this.index)
- if (res.code === '200') {
- this.totalCount = res.totalElements
- if (res.totalElements > 0) {
- const dataMap = res.content
- this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
- this.reload = false
- } else {
- this.dataList = []
- }
- if (this.totalCount == this.dataList.length) {
- this.reload = false
- this.status = 'noMore'
- }
+ handleBlur (e) {
+ if (e.assign_qty < 0 || e.assign_qty > e.qty) {
+ e.assign_qty = e.qty
}
},
- onReachBottom () {
- if (this.totalCount > this.dataList.length) {
- this.status = 'loading'
- setTimeout(() => {
- this.pageNum++
- this._outStorageOrderList()
- }, 1000)
- } else { //停止加载
- this.status = 'noMore'
- }
- },
- toChek (e) {
- this.pkId = this.pkId === e.code ? '' : e.code
- this.pkObj = this.pkId === e.code ? e : {}
- },
toEmpty () {
this.index = ''
- this.dataList = []
+ this.currentData = {}
},
async _outStorageConfirm () {
this.disabled = true
- if (!this.pkId) {
+ if (JSON.stringify(this.currentData) === '{}') {
this.disabled = false
return
}
try {
- let res = await outStorageConfirm(this.pkObj)
+ let res = await outStorageConfirm(this.currentData)
this.disabled = false
uni.showToast({
title: res.msg,
@@ -185,3 +167,8 @@
}
}
+
+
\ No newline at end of file
diff --git a/utils/getData2.js b/utils/getData2.js
index e41e96a..7492a88 100644
--- a/utils/getData2.js
+++ b/utils/getData2.js
@@ -143,10 +143,70 @@ export const outStorageOrder = () => request({
method: 'GET',
url:'api/pda/outStorage/order'
})
+// export const outStorageOrder = () => {
+// let res = [{value: '1', text: 'a'}]
+// return res
+// }
export const outStorageOrderList = (page, size, type) => request({
method: 'GET',
url:'api/pda/outStorage/orderList?page=' + page + '&size=' + size + '&form_type=' + type
})
+// export const outStorageOrderList = (page, size, type) => {
+// let res = {
+// "totalElements": 10,
+// "content": [
+// {
+// "code": "22984980",
+// "form_type": "单据类型",
+// "remark": "备注",
+// "create_time": "创建时间",
+// "create_name": "创建人",
+// "material_code": "物料编码",
+// "qty": 0.0,
+// "plan_qty": 0.0,
+// "assign_qty": 0.0,
+// "unit_id": "单位",
+// "pcsn": "批次",
+// "children": [
+// {
+// "id": "",
+// "code": "bbb",
+// "proc_inst_id": "",
+// "source_form_id": "",
+// "source_form_type": "",
+// "source_form_date": "",
+// "form_type": "",
+// "status": "",
+// "remark": "",
+// "create_time": "",
+// "create_name": "",
+// "material_id": "",
+// "material_name": "物料名称",
+// "material_code": "物料编码",
+// "material_spec": "物料类型",
+// "single_weight": "",
+// "qty": 10.0,
+// "plan_qty": 0.0,
+// "assign_qty": 0.0,
+// "unit_id": "单位",
+// "pcsn": "批次",
+// "vehicle_code": "",
+// "vehicle_id": "",
+// "form_data": {
+// "": {}
+// },
+// "parent_id": "",
+// "HasChildren": "public static final Boolean FALSE = new Boolean(false);"
+// }
+// ]
+// }
+// ],
+// "data": {},
+// "code": "200",
+// "msg": ""
+// }
+// return res
+// }
export const outStorageConfirm = (obj) => request({
url:'api/pda/outStorage/confirm',
data: obj