diff --git a/config.js b/config.js
index 430c987..8a17790 100644
--- a/config.js
+++ b/config.js
@@ -12,10 +12,10 @@ module.exports = {
// baseUrl: 'http://192.168.2.69:58080',//董高文
// baseUrl: 'http://192.168.0.176:48380',//董高文
// baseUrl: 'http://192.168.2.75:48380',//盛旭
- // #endif
+ // #endif
// #ifdef APP-PLUS
// baseUrl: 'http://192.168.2.47:58080',
- // baseUrl: 'http://192.168.0.244:38380',//测试
+ baseUrl: 'http://192.168.0.244:48380',//测试
// #endif
// baseUrl: 'http://localhost:8080',
uploadFileUrl: '/app/common/appUploadFile',
diff --git a/pages.json b/pages.json
index b571aeb..00d7d13 100644
--- a/pages.json
+++ b/pages.json
@@ -36,6 +36,13 @@
"navigationBarTitleText": "出库"
}
},
+ {
+ "path": "pages/enterAndExit/mine/index",
+ "style": {
+// "navigationStyle": "custom"
+ "navigationBarTitleText": "我的"
+ }
+ },
{
"path": "pages/enterAndExit/enter/recordDetail",
"style": {
@@ -110,6 +117,12 @@
"iconPath": "static/images/handheld/tabbar/ic_out.png",
"selectedIconPath": "static/images/handheld/tabbar/ic_out_select.png",
"text": ""
+ },
+ {
+ "pagePath": "pages/enterAndExit/mine/index",
+ "iconPath": "static/images/handheld/tabbar/ic_mine.png",
+ "selectedIconPath": "static/images/handheld/tabbar/ic_mine_select.png",
+ "text": ""
}
]
},
diff --git a/pages/enterAndExit/enter/add.vue b/pages/enterAndExit/enter/add.vue
index 99de33b..41f08d4 100644
--- a/pages/enterAndExit/enter/add.vue
+++ b/pages/enterAndExit/enter/add.vue
@@ -2,9 +2,9 @@
-
+
-
+
-
-
+
-
+
-
+
-
-
-
+
+
+
+
+
+
+
+
-
+
-
-
-
- 选择货品
-
-
-
- 选择采购订单
+
+
+
+
+ 选择货品
+
+
+
+ 选择采购订单
+
@@ -85,17 +82,25 @@
- 计量单位:
+ 计量单位:
{{ item.unitName }}
- 单价(元):
- {{ item.unitPrice / 100 }}
+ 单价(元):
+
+
+
+
- 供应商:
+ *供应商:
- 数量:
+ *数量:
-
+
- 生产日期:
-
+ *生产日期:
+
@@ -126,8 +131,8 @@
- 保质截止日期:
-
+ *保质截止日期:
+
@@ -138,31 +143,29 @@
+
+
+
+
+
+ 全选
+
+
+
+ 合计:
+ ¥{{ totalMoney }}
+
+
+ 总数量:
+ {{ totalNum }}
+
+
+
+
+
-
-
-
-
-
-
- 全选
-
-
-
- 合计:
- ¥{{ totalMoney }}
-
-
- 总数量:
- {{ totalNum }}
-
-
-
-
-
+
{
if (tf) {
+ this.isUploading = false
+ return
+ }
+ if (this.checkIsExist(item.supplierId)) {
+ this.isUploading = false
+ uni.showToast({
+ title: '请选择【' + item.materialName + '】的供应商',
+ icon: 'none'
+ })
+ tf = true
return
}
if (this.checkIsExist(item.purNum)) {
+ this.isUploading = false
uni.showToast({
title: '请输入货品:【' + item.materialName + '】的数量',
icon: 'none'
@@ -459,6 +482,7 @@ export default {
return
}
if (item.orderNum && item.orderNum > 0 && item.purNum > item.orderNum) {
+ this.isUploading = false
uni.showToast({
title: '货品:【' + item.materialName + '】的入库数量不能大于采购订单数量【'+item.orderNum+'】',
icon: 'none'
@@ -467,6 +491,7 @@ export default {
return
}
if (this.checkIsExist(item.productDate)) {
+ this.isUploading = false
uni.showToast({
title: '请选择货品:【' + item.materialName + '】的生产日期',
icon: 'none'
@@ -475,6 +500,7 @@ export default {
return
}
if (this.checkIsExist(item.expireTime)) {
+ this.isUploading = false
uni.showToast({
title: '请选择货品:【' + item.materialName + '】的保质截止日期',
icon: 'none'
@@ -484,6 +510,7 @@ export default {
}
//判断保质截止日期是否大于生产日期
if (new Date(item.expireTime) < new Date(item.productDate)) {
+ this.isUploading = false
uni.showToast({
title: '货品:【' + item.materialName + '】的保质截止日期不能小于生产日期',
icon: 'none'
@@ -517,6 +544,7 @@ export default {
this.$tab.reLaunch('/pages/enterAndExit/enter/index')
}, 1000)
}else {
+ this.isUploading = false
uni.$u.toast('入库失败,请稍后再试')
}
@@ -524,9 +552,14 @@ export default {
checkIsExist(param) {
return param == null || param === '' || param === undefined
},
- calculateTotal() {
+ calculateTotal(e) {
+ if (!e || typeof e.purNum === 'undefined' || typeof e.unitPrice === 'undefined') {
+ }else{
+ e.totalPrice = (e.unitPrice * e.purNum || 0).toFixed(0)
+ }
+
this.totalMoney = this.imsIntoInventoryDetailVOList.reduce((sum, item) => {
- return sum + (item.unitPrice * item.purNum / 100 || 0)
+ return sum + (item.unitPrice * item.purNum || 0)
}, 0).toFixed(2)
this.totalNum = this.imsIntoInventoryDetailVOList.reduce((sum, item) => {
return sum + (item.purNum ? parseFloat(item.purNum) : 0);
@@ -575,14 +608,44 @@ export default {
diff --git a/pages/enterAndExit/exit/add.vue b/pages/enterAndExit/exit/add.vue
index 5174e75..48e3af7 100644
--- a/pages/enterAndExit/exit/add.vue
+++ b/pages/enterAndExit/exit/add.vue
@@ -2,9 +2,9 @@
-
+
-
+
-
-
+
-
+
-
+
-
+
-
-
+
-
-
-
- 选择货品
-
-
-
- 选择领料单
+
+
+
+
+ 选择货品
+
+
+
+ 选择领料单
+
@@ -95,9 +91,10 @@
- 领取数量:
+ *领取数量:
-
+
@@ -108,22 +105,20 @@
-
+
- 全选
+ 全选
-
-
- 总数量:
- {{ totalNum }}
+
+
+ 总数量:
+ {{ totalNum }}
-
-
+
+
{
if (tf) {
+ this.isUploading = false
return
}
if (this.checkIsExist(item.fetchNum)) {
+ this.isUploading = false
uni.showToast({
title: '请输入货品:【' + item.materialName + '】的数量',
icon: 'none'
@@ -383,8 +410,9 @@ export default {
return
}
if (item.materialNum && item.materialNum > 0 && item.fetchNum > item.materialNum) {
+ this.isUploading = false
uni.showToast({
- title: '货品:【' + item.materialName + '】的出库数量不能大于库存数量【'+item.materialNum+'】',
+ title: '货品:【' + item.materialName + '】的出库数量不能大于库存数量【' + item.materialNum + '】',
icon: 'none'
})
tf = true
@@ -397,9 +425,9 @@ export default {
},
async uploadDate() {
- var list = this.imsOutInventoryDetailAddList;
- const now = new Date();
- const dateTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`;
+ var list = this.imsOutInventoryDetailAddList
+ const now = new Date()
+ const dateTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`
let param = {
...this.form,
imsOutInventoryDetailAddList: list,
@@ -413,19 +441,29 @@ export default {
setTimeout(() => {
this.$tab.reLaunch('/pages/enterAndExit/exit/index')
}, 1000)
- }else {
- uni.$u.toast('入库失败,请稍后再试')
+ } else {
+ this.isUploading = false
+ uni.$u.toast('出库失败,请稍后再试')
}
},
checkIsExist(param) {
return param == null || param === '' || param === undefined
},
- calculateTotal() {
+ calculateTotal(e) {
+ if (!e || typeof e.fetchNum === 'undefined') {
+ this.totalNum = 0
+ }else if(e.fetchNum && e.fetchNum < 0) {
+ uni.showToast({
+ title: '领取数量不能小于0',
+ icon: 'none'
+ })
+ e.fetchNum = undefined
+ }
this.totalNum = this.imsOutInventoryDetailAddList.reduce((sum, item) => {
- return sum + (item.fetchNum ? parseFloat(item.fetchNum) : 0);
- }, 0);
- },
+ return sum + (item.fetchNum ? parseFloat(item.fetchNum) : 0)
+ }, 0)
+ }
}
}
@@ -436,11 +474,41 @@ page {
min-height: 100vh;
background-size: 100% 100%;
}
+.u-form-item {
+ min-height: 80rpx !important;
+ padding: 20rpx 0 !important;
+}
+.button-group {
+ display: flex;
+ justify-content: space-around;
+ width: 100%;
+}
+.action-button {
+ width: 48%;
+ height: 110rpx;
+ border-radius: 8rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+.button-icon {
+ width: 40rpx;
+ height: 40rpx;
+ margin-bottom: 10rpx;
+}
+
+.button-text {
+ color: #FFFFFF;
+ font-size: 28rpx;
+}
.health-form {
padding: 20rpx;
height: 100vh;
background-color: #F7F7F7;
+ overflow-y: hidden;
.chronic-diseases {
margin-top: 20rpx;
@@ -452,13 +520,70 @@ page {
display: block;
}
}
-
- .submit-btn {
- margin-top: 40rpx;
- display: flex;
- }
}
+.submit-btn {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 20rpx;
+ background: #fff;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 100rpx;
+ box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.checked {
+ display: flex;
+ align-items: center;
+ width: 20%;
+}
+
+.check-all-text {
+ margin-left: 10rpx;
+ font-size: 26rpx;
+}
+
+.total-info {
+ width: 30%;
+}
+
+.total-item {
+ display: flex;
+ align-items: center;
+}
+
+.total-label {
+ font-size: 20rpx;
+ color: #A69F9A;
+}
+
+.total-value {
+ font-size: 28rpx;
+ color: #FF6816;
+ font-weight: bold;
+ margin-left: 10rpx;
+}
+
+.action-btn {
+ width: 150rpx !important;
+ height: 70rpx !important;
+ border-radius: 8rpx !important;
+ margin-left: 20rpx !important;
+}
+
+.delete-btn {
+ background: linear-gradient(270deg, #F87665 0%, #E43D26 100%) !important;
+ color: white !important;
+}
+
+.save-btn {
+ background: linear-gradient(270deg, #FFB679 0%, #EF882E 100%) !important;
+ color: white !important;
+}
.searchInput {
width: 80%;
height: 40px;
@@ -475,6 +600,7 @@ page {
background: #fff;
margin-top: 10px;
border-radius: 23rpx;
+
.scroll-view-item_content {
width: 100%;
display: flex;
@@ -526,9 +652,11 @@ page {
}
}
}
-::v-deep .uni-scroll-view-content{
- max-height: 16vh!important;
+
+::v-deep .uni-scroll-view-content {
+ max-height: 16vh !important;
}
+
::v-deep .u-form-item {
min-height: 100rpx;
diff --git a/pages/enterAndExit/exit/index.vue b/pages/enterAndExit/exit/index.vue
index 639e81c..7c7a8cc 100644
--- a/pages/enterAndExit/exit/index.vue
+++ b/pages/enterAndExit/exit/index.vue
@@ -12,10 +12,10 @@
-
+
{{ item.outDate }}
-
详情
diff --git a/pages/enterAndExit/exit/selectDocument.vue b/pages/enterAndExit/exit/selectDocument.vue
index 933bb14..7b5db4d 100644
--- a/pages/enterAndExit/exit/selectDocument.vue
+++ b/pages/enterAndExit/exit/selectDocument.vue
@@ -95,10 +95,11 @@ export default {
pageSize: this.pageSize,
materialName: this.searchValue,
areaId: this.form.areaId,
+ warehouseId: this.form.warehouseId,
}
var param = ""
if (this.form.areaId){
- param = "&areaId=" + this.form.areaId
+ param = "&areaId=" + this.form.areaId + "&warehouseId=" + this.form.warehouseId
}
try {
const res = await getMaterialRequisitionForm(params,param)
@@ -139,7 +140,7 @@ export default {
const orderGoodsDetailList = res.rows
orderGoodsDetailList.forEach(item => {
item.materialNum = item.fetchNum
- item.fetchNum = ''
+ this.form.remark = this.form.remark || ''
})
url += '?selectList=' + encodeURIComponent(JSON.stringify(orderGoodsDetailList)) + '&form=' + JSON.stringify(this.form)
uni.navigateTo({
diff --git a/pages/enterAndExit/exit/selectGoods.vue b/pages/enterAndExit/exit/selectGoods.vue
index be2a85e..7a2a28b 100644
--- a/pages/enterAndExit/exit/selectGoods.vue
+++ b/pages/enterAndExit/exit/selectGoods.vue
@@ -1,52 +1,41 @@
+
-
+
-
-
-
-
-
-
-
-
- 货品编码
-
- 货品名称
-
- 货品类别
-
- 计量单位
-
-
-
-
+
+
-
-
-
-
-
-
-
- {{ item.materialCode }}
- {{ item.materialName }}
- {{ item.materialTypeName }}
- {{ item.unitName }}
-
-
+
+ {{ item.materialCode }}
+ {{ item.materialName }}
+ {{ item.materialTypeName }}
+ {{ item.unitName }}
+
-
- 确认
-
+
+
+ 确认
+
+
@@ -56,11 +45,16 @@
import UButton from '@/uni_modules/uview-ui/components/u-button/u-button.vue'
import UniEasyinput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue'
import { getInBoundGoodsApi } from '@/api/enterExit'
+import UniTr from '@/uni_modules/uni-table/components/uni-tr/uni-tr.vue'
+import UniTd from '@/uni_modules/uni-table/components/uni-td/uni-td.vue'
+import UniTh from '@/uni_modules/uni-table/components/uni-th/uni-th.vue'
+import UniTable from '@/uni_modules/uni-table/components/uni-table/uni-table.vue'
export default {
- components: { UniEasyinput, UButton },
+ components: { UniTable, UniTh, UniTd, UniTr, UniEasyinput, UButton },
data() {
return {
+ fontValue: uni.getStorageSync('fontSize') || 8,
tableList: [],
allChecked: false,
searchValue: '',
@@ -101,6 +95,7 @@ export default {
pageNum: this.pageNum,
pageSize: this.pageSize,
areaId: this.form.areaId,
+ warehouseId: this.form.warehouseId,
materialName: this.searchValue
}
try {
@@ -127,38 +122,16 @@ export default {
console.log(error)
}
},
- // 单个商品的选择
- checkClick(item) {
- item.checked = !item.checked
- if (!item.checked) {
- this.allChecked = false
- } else {
- // 判断每一个商品是否是被选择的状态
- const goods = this.tableList.every(item => {
- return item.checked === true
- })
- if (goods) {
- this.allChecked = true
- } else {
- this.allChecked = false
+ selectChange(e){
+ let arr = []
+ this.selectList = []
+ let selectedIndex = []
+ selectedIndex = e.detail.index
+ selectedIndex.forEach(i => {
+ if (!this.selectList.some(item => item.materialId === this.tableList[i].materialId)) {
+ this.selectList.push(this.tableList[i])
}
- }
- this.selectList = this.tableList.filter(item => item.checked)
- console.log('Selected items:', this.selectList)
- },
- checkAll() {
- this.allChecked = !this.allChecked
- if (this.allChecked) {
- this.tableList.map(item => {
- item.checked = true
- })
- } else {
- this.tableList.map(item => {
- item.checked = false
- })
- }
- this.selectList = this.tableList.filter(item => item.checked)
- console.log('Selected items:', this.selectList)
+ })
},
navigateTo(url) {
url += '?selectList=' + encodeURIComponent(JSON.stringify(this.selectList)) + '&form=' + JSON.stringify(this.form)
@@ -176,56 +149,34 @@ export default {
width: 100%;
}
-.search-form {
- display: flex;
- width: 98%;
- margin-top: 10px;
-
- .searchInput {
- width: 300px;
- height: 40px;
- margin-left: 10px;
- font-size: 28rpx;
- font-family: PingFang SC-Regular;
- }
-
- .searchBtn {
- margin-left: 10px;
- height: 35px;
- }
-}
-
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
- height: 100%;
+ height: 100vh;
width: 100%;
-}
+ .search-form {
+ display: flex;
+ width: 98%;
-.logo {
- height: 200rpx;
- width: 200rpx;
- margin-top: 200rpx;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 50rpx;
-}
+ .searchInput {
+ width: 300px;
+ height: 40px;
+ margin-left: 10px;
+ font-size: 28rpx;
+ font-family: PingFang SC-Regular;
+ }
-.list_title {
- color: black;
- flex: 1;
- display: flex;
- justify-content: space-around;
- align-items: center;
- font-family: PingFang SC-Medium;
- font-weight: 500;
- color: #A69F9A;
-}
+ .searchBtn {
+ margin-left: 10px;
+ height: 35px;
+ }
+ }
+}
.list_item {
- flex: 1;
+ width: 25vw;
display: flex;
justify-content: space-around;
align-items: center;
@@ -246,7 +197,32 @@ export default {
font-size: 36rpx;
color: #8f8f94;
}
+/deep/ .tableHeader {
+ font-weight: bold;
+ color: #333;
+ background: #f8f8f8;
+ z-index: 20;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ max-width: 100vw;
+}
+/deep/ .uni-table-td[data-v-321f8e79] {
+ display: flex;
+ padding: 12px 10px;
+ font-size: 14px;
+ border-bottom: 1px #EBEEF5 solid;
+ font-weight: 400;
+ color: #606266;
+ line-height: 23px;
+ box-sizing: border-box;
+}
+
+/deep/ .tr-table--border[data-v-c2c83a8e] {
+ border-right: 1px #ebeef5 solid;
+ display: flex;
+}
::v-deep .u-checkbox {
margin-bottom: 16rpx;
@@ -272,6 +248,8 @@ export default {
/deep/ uni-checkbox .uni-checkbox-input:hover {
border-color: #ddd;
}
-
+/deep/.uni-table{
+ min-width: 0 !important;
+}
diff --git a/pages/enterAndExit/goods/index.vue b/pages/enterAndExit/goods/index.vue
index cfb3c67..3de3d5e 100644
--- a/pages/enterAndExit/goods/index.vue
+++ b/pages/enterAndExit/goods/index.vue
@@ -8,7 +8,7 @@
-
+
{{item.materialName}}
@@ -84,6 +84,13 @@ export default {
console.log(error)
}
},
+ handleImage(item) {
+ if (item.materialImage) {
+ return item.materialImage
+ } else {
+ return '/static/images/handheld/ic_goods_img.jpg'
+ }
+ }
}
}
@@ -93,6 +100,7 @@ page {
//从上到下渐变
min-height: 88vh;
background-size: 100% 100%;
+ overflow-y: hidden;
}
.content {
diff --git a/pages/enterAndExit/mine/index.vue b/pages/enterAndExit/mine/index.vue
new file mode 100644
index 0000000..d05bfa3
--- /dev/null
+++ b/pages/enterAndExit/mine/index.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+ 您好,{{username}}
+
+
+ 退出登录
+
+
+
+
+
+
+
+
diff --git a/static/images/handheld/tabbar/ic_mine.png b/static/images/handheld/tabbar/ic_mine.png
new file mode 100644
index 0000000..6f830c5
Binary files /dev/null and b/static/images/handheld/tabbar/ic_mine.png differ
diff --git a/static/images/handheld/tabbar/ic_mine_select.png b/static/images/handheld/tabbar/ic_mine_select.png
new file mode 100644
index 0000000..1dd9062
Binary files /dev/null and b/static/images/handheld/tabbar/ic_mine_select.png differ
diff --git a/static/images/ic_user_photo.png b/static/images/ic_user_photo.png
new file mode 100644
index 0000000..4d0c916
Binary files /dev/null and b/static/images/ic_user_photo.png differ