bug修改
This commit is contained in:
parent
553de9032d
commit
a243788a27
|
|
@ -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',
|
||||
|
|
|
|||
13
pages.json
13
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": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
||||
<view class="health-form">
|
||||
<Navbar title="新增入库" :showRightText="false" :isBack="true" />
|
||||
<scroll-view style="width: 100%;height: 85vh;" scroll-y="true">
|
||||
<scroll-view style="width: 100%;height: calc(100vh - 80px);" scroll-y="true">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" style="margin-left: 20rpx;">
|
||||
<u-form-item label="入库单号:" labelWidth="180rpx">
|
||||
<u-form-item label="入库单号:" labelWidth="180rpx" style="height: 6vh">
|
||||
<u--input
|
||||
v-model.number="form.intoCode"
|
||||
placeholder="自动生成"
|
||||
|
|
@ -12,8 +12,7 @@
|
|||
type="number"
|
||||
></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="所属区域" prop="areaId" required labelWidth="180rpx">
|
||||
<u-form-item label="所属区域" prop="areaId" required labelWidth="180rpx" style="height: 6vh">
|
||||
<uni-data-select
|
||||
v-model="form.areaId"
|
||||
:localdata="selectors.areaId.options"
|
||||
|
|
@ -22,7 +21,7 @@
|
|||
@change="changeWarehouse"
|
||||
></uni-data-select>
|
||||
</u-form-item>
|
||||
<u-form-item label="货品仓库" prop="warehouseId" required labelWidth="180rpx">
|
||||
<u-form-item label="货品仓库" prop="warehouseId" required labelWidth="180rpx" style="height: 6vh">
|
||||
<uni-data-select
|
||||
v-model="form.warehouseId"
|
||||
:localdata="selectors.warehouseId.options"
|
||||
|
|
@ -30,7 +29,7 @@
|
|||
style="text-align: left;"
|
||||
></uni-data-select>
|
||||
</u-form-item>
|
||||
<u-form-item label="入库类型" prop="intoType" required labelWidth="180rpx">
|
||||
<u-form-item label="入库类型" prop="intoType" required labelWidth="180rpx" style="height: 6vh">
|
||||
<uni-data-select
|
||||
v-model="form.intoType"
|
||||
:localdata="selectors.intoType.options"
|
||||
|
|
@ -38,30 +37,28 @@
|
|||
style="text-align: left;"
|
||||
></uni-data-select>
|
||||
</u-form-item>
|
||||
<u-form-item label="入库人" prop="personEnter" required labelWidth="180rpx">
|
||||
<uni-data-select
|
||||
v-model="form.personEnter"
|
||||
:localdata="selectors.personEnter.options"
|
||||
placeholder="请选择入库人"
|
||||
style="text-align: left;"
|
||||
></uni-data-select>
|
||||
</u-form-item>
|
||||
<!-- <u-form-item label="入库人" prop="personEnter" required labelWidth="180rpx">-->
|
||||
<!-- <uni-data-select-->
|
||||
<!-- v-model="form.personEnter"-->
|
||||
<!-- :localdata="selectors.personEnter.options"-->
|
||||
<!-- placeholder="请选择入库人"-->
|
||||
<!-- style="text-align: left;"-->
|
||||
<!-- ></uni-data-select>-->
|
||||
<!-- </u-form-item>-->
|
||||
|
||||
<u-form-item label="备注说明" prop="remark" labelWidth="180rpx">
|
||||
<u-form-item label="备注说明" prop="remark" labelWidth="180rpx" style="height: 200rpx">
|
||||
<uni-easyinput type="textarea" v-model="form.remark" placeholder="请输入备注" maxlength="100" />
|
||||
</u-form-item>
|
||||
<u-form-item style="width: 100%;display: flex;flex-direction: row;justify-content: flex-end">
|
||||
<view @click="selectGoods"
|
||||
style="width: 200rpx;height: 110rpx;border-radius:8rpx;background: linear-gradient( 270deg, #7D97FF 0%, #4367F5 100%);display: flex;flex-direction: column;justify-content: center;align-items: center">
|
||||
<image src="/static/images/handheld/ic_select_goods.png"
|
||||
style="width: 20px;height: 20px;border-radius: 10px;"></image>
|
||||
<text style="color: #FFFFFF;font-size: 28rpx ">选择货品</text>
|
||||
</view>
|
||||
<view @click="selectDocument"
|
||||
style="width: 200rpx;height: 110rpx;margin-left: 20px;border-radius:8rpx;background: linear-gradient( 270deg, #FFB679 0%, #EF882E 100%);display: flex;flex-direction: column;justify-content: center;align-items: center">
|
||||
<image src="/static/images/handheld/ic_select_document.png"
|
||||
style="width: 20px;height: 20px;border-radius: 10px;"></image>
|
||||
<text style="color: #FFFFFF;font-size: 28rpx ">选择采购订单</text>
|
||||
<u-form-item style="width: 100%; padding: 20rpx 0;">
|
||||
<view class="button-group">
|
||||
<view @click="selectGoods" class="action-button" style="background: linear-gradient( 270deg, #7D97FF 0%, #4367F5 100%);width: 200rpx;">
|
||||
<image src="/static/images/handheld/ic_select_goods.png" class="button-icon"></image>
|
||||
<text class="button-text">选择货品</text>
|
||||
</view>
|
||||
<view @click="selectDocument" class="action-button" style="margin-left: 20rpx;background: linear-gradient( 270deg, #FFB679 0%, #EF882E 100%);width: 200rpx;">
|
||||
<image src="/static/images/handheld/ic_select_document.png" class="button-icon"></image>
|
||||
<text class="button-text">选择采购订单</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<scroll-view class="chronic-science" scroll-y="true">
|
||||
|
|
@ -85,17 +82,25 @@
|
|||
</view>
|
||||
<view style="width: 100%;display:flex;height: 30px">
|
||||
<view style="width: 50%;display: flex;align-items: center">
|
||||
<view class="scroll_title">计量单位:</view>
|
||||
<view class="scroll_title" style="width: 60%">计量单位:</view>
|
||||
<view class="scroll_content">{{ item.unitName }}</view>
|
||||
</view>
|
||||
<view style="width: 50%;display: flex;align-items: center">
|
||||
<view class="scroll_title">单价(元):</view>
|
||||
<view class="scroll_content">{{ item.unitPrice / 100 }}</view>
|
||||
<view class="scroll_title" style="width: 50%">单价(元):</view>
|
||||
<!-- <view class="scroll_content">{{ item.unitPrice / 100 }}</view>-->
|
||||
<view class="scroll_content">
|
||||
<uni-easyinput
|
||||
placeholder="输入单价"
|
||||
type="number"
|
||||
v-model="item.unitPrice"
|
||||
@blur="calculateTotal(item)"
|
||||
></uni-easyinput>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;display:flex;height: 50px">
|
||||
<view style="width: 100%;display: flex;align-items: center">
|
||||
<view class="scroll_title_input">供应商:</view>
|
||||
<view class="scroll_title_input"><i style="color:red;">*</i>供应商:</view>
|
||||
<view class="scroll_content_input">
|
||||
<uni-data-select
|
||||
v-model="item.supplierId"
|
||||
|
|
@ -108,16 +113,16 @@
|
|||
</view>
|
||||
<view style="width: 100%;display:flex;height: 50px">
|
||||
<view style="width: 100%;display: flex;align-items: center">
|
||||
<view class="scroll_title_input">数量:</view>
|
||||
<view class="scroll_title_input"><i style="color:red;">*</i>数量:</view>
|
||||
<view class="scroll_content_input">
|
||||
<uni-easyinput placeholder="输入数量" type="number" v-model="item.purNum" @blur="calculateTotal"></uni-easyinput>
|
||||
<uni-easyinput placeholder="输入数量" type="number" v-model="item.purNum" @blur="calculateTotal(item)"></uni-easyinput>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;display:flex;height: 50px">
|
||||
<view style="width: 100%;display: flex;align-items: center">
|
||||
<view class="scroll_title_input">生产日期:</view>
|
||||
<view class="scroll_content_input">
|
||||
<view class="scroll_title_input" style="width: 40%"><i style="color:red;">*</i>生产日期:</view>
|
||||
<view class="scroll_content_input" style="width: 60%">
|
||||
<view @click="openProductCalendar(item)">
|
||||
<uni-easyinput placeholder="选择生产日期" v-model="item.productDate"></uni-easyinput>
|
||||
</view>
|
||||
|
|
@ -126,8 +131,8 @@
|
|||
</view>
|
||||
<view style="width: 100%;display:flex;height: 50px">
|
||||
<view style="width: 100%;display: flex;align-items: center">
|
||||
<view class="scroll_title_input">保质截止日期:</view>
|
||||
<view class="scroll_content_input">
|
||||
<view class="scroll_title_input" style="width: 40%"><i style="color:red;">*</i>保质截止日期:</view>
|
||||
<view class="scroll_content_input" style="width: 60%">
|
||||
<view @click="openExpireCalendar(item)">
|
||||
<uni-easyinput placeholder="选择保质截止日期" v-model="item.expireTime"></uni-easyinput>
|
||||
</view>
|
||||
|
|
@ -138,31 +143,29 @@
|
|||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="submit-btn">
|
||||
<view class="checked">
|
||||
<checkbox-group @tap="checkAll">
|
||||
<checkbox :checked="allChecked" />
|
||||
</checkbox-group>
|
||||
<text class="check-all-text">全选</text>
|
||||
</view>
|
||||
<view class="total-info">
|
||||
<view class="total-item">
|
||||
<text class="total-label">合计:</text>
|
||||
<text class="total-value">¥{{ totalMoney }}</text>
|
||||
</view>
|
||||
<view class="total-item">
|
||||
<text class="total-label">总数量:</text>
|
||||
<text class="total-value">{{ totalNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-button class="action-btn delete-btn" text="删除" @click="del"></u-button>
|
||||
<u-button class="action-btn save-btn" text="保存" @click="handleSubmit"></u-button>
|
||||
</view>
|
||||
</u--form>
|
||||
</scroll-view>
|
||||
<view class="submit-btn">
|
||||
<view class="checked" style="width: 20%;display: flex;align-items: center;">
|
||||
<checkbox-group @tap="checkAll">
|
||||
<checkbox :checked="allChecked" />
|
||||
</checkbox-group>
|
||||
<text style="margin-left: 5px;">全选</text>
|
||||
</view>
|
||||
<view style="width: 30%;margin-top: 5rpx;font-weight: 600;display: flex;flex-direction: column">
|
||||
<view>
|
||||
<text style="font-size: 20rpx;color: #A69F9A;font-family: PingFang SC-Regular;">合计:</text>
|
||||
<text style="font-size: 32rpx;color: #FF6816;font-family: PingFang SC-Semibold;">¥{{ totalMoney }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text style="font-size: 20rpx;color: #A69F9A;font-family: PingFang SC-Regular;">总数量:</text>
|
||||
<text style="font-size: 32rpx;color: #FF6816;font-family: PingFang SC-Semibold;">{{ totalNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-button text="删除" @click="del"
|
||||
style="width: 150rpx;border-radius:8rpx;background: linear-gradient( 270deg, #F87665 0%, #E43D26 100%);color: white"></u-button>
|
||||
<u-button text="保存" @click="handleSubmit"
|
||||
style="width: 150rpx;border-radius:8rpx;background: linear-gradient( 270deg, #FFB679 0%, #EF882E 100%);color: white"></u-button>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
<u-action-sheet
|
||||
v-if="currentSelector"
|
||||
:show="selectorVisible"
|
||||
|
|
@ -248,7 +251,8 @@ export default {
|
|||
supplierId: null,
|
||||
supplierName: null
|
||||
},
|
||||
currentDateOption: -1
|
||||
currentDateOption: -1,
|
||||
isUploading: false,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -259,7 +263,7 @@ export default {
|
|||
item.checked = false // 初始化为未选中状态
|
||||
})
|
||||
this.form = options.form ? JSON.parse(decodeURIComponent(options.form)) : this.form
|
||||
console.log(this.form.areaId, '所属区域ID')
|
||||
console.log('form------',this.form)
|
||||
this.areaControlName = this.getDisplayName('areaId', this.form.areaId)
|
||||
this.calculateTotal()
|
||||
}
|
||||
|
|
@ -400,7 +404,7 @@ export default {
|
|||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/enterAndExit/enter/selectGoods?form=' + JSON.stringify(this.form)
|
||||
url: '/pages/enterAndExit/enter/selectGoods?form=' + JSON.stringify(this.form) + '&selectList=' + encodeURIComponent(JSON.stringify(this.imsIntoInventoryDetailVOList))
|
||||
})
|
||||
},
|
||||
selectDocument() {
|
||||
|
|
@ -414,31 +418,39 @@ export default {
|
|||
this.calculateTotal()
|
||||
},
|
||||
handleSubmit() {
|
||||
if (this.isUploading) return
|
||||
this.isUploading = true
|
||||
if (this.checkIsExist(this.form.areaId)) {
|
||||
this.isUploading = false
|
||||
uni.showToast({
|
||||
title: '请选择所属区域',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else if (this.checkIsExist(this.form.warehouseId)) {
|
||||
this.isUploading = false
|
||||
uni.showToast({
|
||||
title: '请选择货品仓库',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else if (this.checkIsExist(this.form.intoType)) {
|
||||
this.isUploading = false
|
||||
uni.showToast({
|
||||
title: '请选择入库类型',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else if (this.checkIsExist(this.form.personEnter)) {
|
||||
uni.showToast({
|
||||
title: '请选择入库人',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else if (this.imsIntoInventoryDetailVOList.length === 0) {
|
||||
}
|
||||
// else if (this.checkIsExist(this.form.personEnter)) {
|
||||
// uni.showToast({
|
||||
// title: '请选择入库人',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
else if (this.imsIntoInventoryDetailVOList.length === 0) {
|
||||
this.isUploading = false
|
||||
uni.showToast({
|
||||
title: '请选择入库货品',
|
||||
icon: 'none'
|
||||
|
|
@ -448,9 +460,20 @@ export default {
|
|||
var tf = false
|
||||
this.imsIntoInventoryDetailVOList.forEach(item => {
|
||||
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 {
|
|||
<style scoped lang="scss">
|
||||
page {
|
||||
//从上到下渐变
|
||||
min-height: 80vh;
|
||||
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: 70vh;
|
||||
height: 100vh;
|
||||
background-color: #F7F7F7;
|
||||
overflow-y: hidden;
|
||||
|
||||
.chronic-diseases {
|
||||
margin-top: 20rpx;
|
||||
|
|
@ -594,13 +657,69 @@ 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;
|
||||
|
|
@ -610,63 +729,40 @@ page {
|
|||
|
||||
.chronic-science {
|
||||
width: 100%;
|
||||
height: 34vh;
|
||||
height: 40vh;
|
||||
margin-bottom: 100rpx;
|
||||
}
|
||||
.scroll-view-item {
|
||||
margin-bottom: 20rpx;
|
||||
background: #fff;
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.scroll-view-item {
|
||||
width: 96%;
|
||||
background: #fff;
|
||||
margin-top: 10px;
|
||||
border-radius: 23rpx;
|
||||
.scroll-view-item_content {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: fit-content;
|
||||
justify-content: space-between;
|
||||
border: 0.1rpx solid #ececec;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0rpx 6rpx 10rpx 0rpx rgba(87, 87, 87, 0.14);
|
||||
.scroll-view-item_content {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.scroll_title {
|
||||
width: 50%;
|
||||
font-size: 28rpx;
|
||||
color: #0F274B;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-family: PingFang SC-Medium;
|
||||
}
|
||||
.scroll_title {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
width: 120rpx;
|
||||
}
|
||||
|
||||
.scroll_title_input {
|
||||
width: 30%;
|
||||
font-size: 28rpx;
|
||||
color: #0F274B;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-family: PingFang SC-Medium;
|
||||
}
|
||||
.scroll_content {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.scroll_content {
|
||||
width: 50%;
|
||||
font-size: 28rpx;
|
||||
color: #86817B;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-family: PingFang SC-Regular;
|
||||
}
|
||||
.scroll_title_input {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
width: 160rpx;
|
||||
}
|
||||
|
||||
.scroll_content_input {
|
||||
width: 70%;
|
||||
font-size: 28rpx;
|
||||
color: #86817B;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-family: PingFang SC-Regular;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scroll_content_input {
|
||||
flex: 1;
|
||||
}
|
||||
::v-deep .uni-scroll-view-content{
|
||||
max-height: 16vh!important;
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@
|
|||
<view
|
||||
style="width: 100%;height: 90%;display: flex;flex-direction: column;justify-content: space-between;padding: 10px;">
|
||||
<view style="width: 100%;height: 80rpx;display: flex;">
|
||||
<view style="width:85%;font-size:32rpx;font-weight: 600;color: #FF6816;font-family: PingFang SC-Semibold">
|
||||
<view style="width:80%;font-size:32rpx;font-weight: 600;color: #FF6816;font-family: PingFang SC-Semibold">
|
||||
{{ item.intoDate }}
|
||||
</view>
|
||||
<view style="width:15%;float: right;display: flex;align-items: center"
|
||||
<view style="width:20%;float: right;display: flex;align-items: center"
|
||||
@click="navigateTo(`/pages/enterAndExit/enter/recordDetail?intoId=${item.intoId}`)">
|
||||
<text style="font-size:28rpx;font-weight: 600;color: #3E34FF;font-family: PingFang SC-Regular">详情
|
||||
</text>
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@
|
|||
<text>{{ intoType[detailInfo.intoType] }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="title">
|
||||
<text>入 库 人:</text>
|
||||
</view>
|
||||
<view class="searchInput">
|
||||
<text>{{ detailInfo.createBy }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="row">-->
|
||||
<!-- <view class="title">-->
|
||||
<!-- <text>入 库 人:</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="searchInput">-->
|
||||
<!-- <text>{{ detailInfo.createBy }}</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view class="row">
|
||||
<view class="title">
|
||||
<text>入库时间:</text>
|
||||
|
|
|
|||
|
|
@ -142,8 +142,13 @@ export default {
|
|||
//调用详情接口
|
||||
const res = await getPurchaseOrderDetail(this.selectList[0].orderGoodsId)
|
||||
const orderGoodsDetailList = res.data.orderGoodsDetailList
|
||||
console.log("this.selectList[0],==========>", this.selectList[0])
|
||||
orderGoodsDetailList.forEach(item => {
|
||||
item.unitPrice = item.singlePrice
|
||||
console.log("item,==========>", item)
|
||||
item.unitPrice = item.singlePrice/100
|
||||
item.purNum = item.orderNum
|
||||
item.supplierId = this.selectList[0].supplierId
|
||||
this.form.remark = this.form.remark || ''
|
||||
})
|
||||
url += '?selectList=' + encodeURIComponent(JSON.stringify(orderGoodsDetailList)) + '&form=' + JSON.stringify(this.form)
|
||||
uni.navigateTo({
|
||||
|
|
|
|||
|
|
@ -1,52 +1,42 @@
|
|||
<template>
|
||||
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
||||
<view class="content"><!-- @touchmove="touchmoveMethod" -->
|
||||
<Navbar title="选择货品" :showRightText="false" :isBack="false" />
|
||||
<view style="width: 100%;height: 100%;">
|
||||
<view style="width: 100%;height: calc(100vh - 60px);">
|
||||
<view class="search-form">
|
||||
<uni-easyinput class="searchInput" placeholder="输入货品编码/名称" v-model="searchValue" suffixIcon="search"
|
||||
@iconClick="search"
|
||||
@keyup.enter.native="search"></uni-easyinput>
|
||||
</view>
|
||||
<u-table :th-style="{backgroundColor:'#3c94fd'}"
|
||||
style="height:100% ;width: 100%;position: relative;overflow-y: auto;border: 5rpx solid rgba(178,178,178,.4);border-radius: 15rpx;border-top: 0rpx;">
|
||||
<u-tr style="position: sticky;top: 0;z-index: 10;width: 100%;height: 50rpx;display: flex;">
|
||||
<!-- background: #afafaf-->
|
||||
<u-th style="color: white;flex: 0.5;display: flex;justify-content: space-around;align-items: center;">
|
||||
<checkbox-group @tap="checkAll" style="width: 25px;height: 25px">
|
||||
<checkbox :checked="allChecked" />
|
||||
</checkbox-group>
|
||||
</u-th>
|
||||
<u-th class="list_title">货品编码
|
||||
</u-th>
|
||||
<u-th class="list_title">货品名称
|
||||
</u-th>
|
||||
<u-th class="list_title">货品类别
|
||||
</u-th>
|
||||
<u-th class="list_title">计量单位
|
||||
</u-th>
|
||||
</u-tr>
|
||||
<!-- <view style="width: 97%;height: 1px;background: #c4c3c3;margin-left: 1.5%;"></view>-->
|
||||
<scroll-view class="chronic-science" style="height: 78vh;margin-top: 5px;" scroll-y="true"
|
||||
<uni-table ref="uniTable" :th-style="{backgroundColor:'#3c94fd'}" type="selection"
|
||||
@selection-change="selectChange" border stripe empty-text="暂无更多数据">
|
||||
<view class="tableHeader">
|
||||
<uni-tr style="display:flex;width: 100%">
|
||||
<uni-th align="center" style="width: 25vw;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;">货品编码</uni-th>
|
||||
<uni-th align="center" style="width: 25vw;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;">货品名称</uni-th>
|
||||
<uni-th align="center" style="width: 25vw;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;">货品类别</uni-th>
|
||||
<uni-th align="center" style="width: 25vw;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;">计量单位</uni-th>
|
||||
</uni-tr>
|
||||
</view>
|
||||
<scroll-view class="chronic-science" style="margin-top: 44px;overflow-y: auto;" scroll-y="true"
|
||||
@scrolltolower="onScrollTolower">
|
||||
<view v-for="(item,index) in tableList" :key="index">
|
||||
<u-tr style="height: 64rpx;"
|
||||
:style="{display: 'flex',flexDirection: 'row',justifyContent: 'space-between'}">
|
||||
<u-td style="flex: 0.5;display: flex;justify-content: space-around;align-items: center;">
|
||||
<checkbox-group style="width: 25px;height: 25px" @change="checkClick(item)">
|
||||
<checkbox :checked="item.checked" />
|
||||
</checkbox-group>
|
||||
</u-td>
|
||||
<u-td class="list_item">{{ item.materialCode }}</u-td>
|
||||
<u-td class="list_item">{{ item.materialName }}</u-td>
|
||||
<u-td class="list_item">{{ item.materialTypeName }}</u-td>
|
||||
<u-td class="list_item">{{ item.unitName }}</u-td>
|
||||
</u-tr>
|
||||
</view>
|
||||
<uni-tr style="height: 64rpx;width: 100%;max-width: 100vw;"
|
||||
:style="{display: 'flex',flexDirection: 'row',justifyContent: 'space-between'}"
|
||||
v-for="(item,index) in tableList" :key="index">
|
||||
<uni-td class="list_item">{{ item.materialCode }}</uni-td>
|
||||
<uni-td class="list_item">{{ item.materialName }}</uni-td>
|
||||
<uni-td class="list_item">{{ item.materialTypeName }}</uni-td>
|
||||
<uni-td class="list_item">{{ item.unitName }}</uni-td>
|
||||
</uni-tr>
|
||||
</scroll-view>
|
||||
</u-table>
|
||||
<u-button style="width:180rpx;height:70rpx;position: fixed;bottom: 20rpx;right: 10px;background: linear-gradient( 270deg, #FFB679 0%, #EF882E 100%);border: 0" type="primary"
|
||||
@click="navigateTo('/pages/enterAndExit/enter/add')">确认
|
||||
</u-button>
|
||||
</uni-table>
|
||||
<view style="width: 100%;background: #ffffff;padding: 20rpx 0;height: 100rpx;position: sticky;bottom: 0;z-index: 99;">
|
||||
<u-button
|
||||
style="width:180rpx;background: linear-gradient( 270deg, #FFB679 0%, #EF882E 100%);border: 0;position: fixed;bottom: 20rpx;right: 10px;height:70rpx"
|
||||
type="primary"
|
||||
@click="navigateTo('/pages/enterAndExit/enter/add')">确认
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -56,11 +46,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 { getGoodsApi } from '@/api/enterExit'
|
||||
import UniTable from '@/uni_modules/uni-table/components/uni-table/uni-table.vue'
|
||||
import UniTr from '@/uni_modules/uni-table/components/uni-tr/uni-tr.vue'
|
||||
import UniTh from '@/uni_modules/uni-table/components/uni-th/uni-th.vue'
|
||||
import UniTd from '@/uni_modules/uni-table/components/uni-td/uni-td.vue'
|
||||
|
||||
export default {
|
||||
components: { UniEasyinput, UButton },
|
||||
components: { UniTd, UniTh, UniTr, UniTable, UniEasyinput, UButton },
|
||||
data() {
|
||||
return {
|
||||
fontValue: uni.getStorageSync('fontSize') || 8,
|
||||
tableList: [],
|
||||
allChecked: false,
|
||||
searchValue: '',
|
||||
|
|
@ -74,8 +69,10 @@ export default {
|
|||
},
|
||||
onLoad(options) {
|
||||
console.log('options:', options)
|
||||
this.form = options.form ? JSON.parse(decodeURIComponent(options.form)) : this.form
|
||||
this.form = options.form ? JSON.parse(decodeURIComponent(options.form)) : this.form
|
||||
this.selectList = options.selectList ? JSON.parse(decodeURIComponent(options.selectList)) : []
|
||||
console.log('form:', this.form)
|
||||
console.log('selectList==========>?:', this.selectList)
|
||||
this.getList()
|
||||
},
|
||||
onShow() {
|
||||
|
|
@ -122,48 +119,44 @@ export default {
|
|||
this.tableList.map(item => {
|
||||
if (item.materialId === selectItem.materialId) {
|
||||
item.checked = true
|
||||
item.supplierId = selectItem.supplierId
|
||||
item.purNum = selectItem.purNum
|
||||
item.unitPrice = selectItem.unitPrice * 100 // 转换为分
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.uniTable) {
|
||||
this.tableList.forEach((item, index) => {
|
||||
if (item.checked) {
|
||||
this.$refs.uniTable.toggleRowSelection(index, true)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.warn('uniTable未挂载或setSelection方法不存在')
|
||||
}
|
||||
})
|
||||
console.log('tableList==============>:', this.tableList)
|
||||
this.status = this.total == this.tableList.length ? 'nomore' : 'loadmore'
|
||||
} catch (error) {
|
||||
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) {
|
||||
console.log(e.detail)
|
||||
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) {
|
||||
this.selectList.forEach(item => {
|
||||
item.unitPrice = item.unitPrice / 100
|
||||
})
|
||||
url += '?selectList=' + encodeURIComponent(JSON.stringify(this.selectList)) + '&form=' + JSON.stringify(this.form)
|
||||
uni.navigateTo({
|
||||
url
|
||||
|
|
@ -179,56 +172,35 @@ 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%;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
margin-top: 200rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
.search-form {
|
||||
display: flex;
|
||||
width: 98%;
|
||||
|
||||
.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;
|
||||
.searchInput {
|
||||
width: 300px;
|
||||
height: 40px;
|
||||
margin-left: 10px;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular;
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
margin-left: 10px;
|
||||
height: 35px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list_item {
|
||||
flex: 1;
|
||||
width: 25vw;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
|
@ -250,11 +222,36 @@ export default {
|
|||
color: #8f8f94;
|
||||
}
|
||||
|
||||
|
||||
::v-deep .u-checkbox {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
/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;
|
||||
}
|
||||
|
||||
/deep/ uni-checkbox .uni-checkbox-input {
|
||||
width: 25px;
|
||||
|
|
@ -276,5 +273,8 @@ export default {
|
|||
border-color: #ddd;
|
||||
}
|
||||
|
||||
/deep/ .uni-table {
|
||||
min-width: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
||||
<view class="health-form">
|
||||
<Navbar title="新增出库" :showRightText="false" :isBack="true" />
|
||||
<scroll-view style="width: 100%;height: 85vh;" scroll-y="true">
|
||||
<scroll-view style="width: 100%;height: calc(100vh - 80px);" scroll-y="true">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" style="margin-left: 20rpx;">
|
||||
<u-form-item label="出库单号:" labelWidth="180rpx">
|
||||
<u-form-item label="出库单号:" labelWidth="180rpx" style="height: 6vh">
|
||||
<u--input
|
||||
v-model.number="form.outCode"
|
||||
placeholder="自动生成"
|
||||
|
|
@ -12,8 +12,7 @@
|
|||
type="number"
|
||||
></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="所属区域" prop="areaId" required labelWidth="180rpx">
|
||||
<u-form-item label="所属区域" prop="areaId" required labelWidth="180rpx" style="height: 6vh">
|
||||
<uni-data-select
|
||||
v-model="form.areaId"
|
||||
:localdata="selectors.areaId.options"
|
||||
|
|
@ -22,7 +21,7 @@
|
|||
@change="changeWarehouse"
|
||||
></uni-data-select>
|
||||
</u-form-item>
|
||||
<u-form-item label="货品仓库" prop="warehouseId" required labelWidth="180rpx">
|
||||
<u-form-item label="货品仓库" prop="warehouseId" required labelWidth="180rpx" style="height: 6vh">
|
||||
<uni-data-select
|
||||
v-model="form.warehouseId"
|
||||
:localdata="selectors.warehouseId.options"
|
||||
|
|
@ -30,7 +29,7 @@
|
|||
style="text-align: left;"
|
||||
></uni-data-select>
|
||||
</u-form-item>
|
||||
<u-form-item label="出库类型" prop="outType" required labelWidth="180rpx">
|
||||
<u-form-item label="出库类型" prop="outType" required labelWidth="180rpx" style="height: 6vh">
|
||||
<uni-data-select
|
||||
v-model="form.outType"
|
||||
:localdata="selectors.outType.options"
|
||||
|
|
@ -38,7 +37,7 @@
|
|||
style="text-align: left;"
|
||||
></uni-data-select>
|
||||
</u-form-item>
|
||||
<u-form-item label="领料人" prop="fetchUserId" required labelWidth="180rpx">
|
||||
<u-form-item label="领料人" prop="fetchUserId" required labelWidth="180rpx" style="height: 6vh">
|
||||
<uni-data-select
|
||||
v-model="form.fetchUserId"
|
||||
:localdata="selectors.fetchUserId.options"
|
||||
|
|
@ -46,22 +45,19 @@
|
|||
style="text-align: left;"
|
||||
></uni-data-select>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="备注说明" prop="remark" labelWidth="180rpx">
|
||||
<u-form-item label="备注说明" prop="remark" labelWidth="180rpx" style="height: 200rpx">
|
||||
<uni-easyinput type="textarea" v-model="form.remark" placeholder="请输入备注" maxlength="100" />
|
||||
</u-form-item>
|
||||
<u-form-item style="width: 100%;display: flex;flex-direction: row;justify-content: flex-end">
|
||||
<view @click="selectGoods"
|
||||
style="width: 200rpx;height: 110rpx;border-radius:8rpx;background: linear-gradient( 270deg, #7D97FF 0%, #4367F5 100%);display: flex;flex-direction: column;justify-content: center;align-items: center">
|
||||
<image src="/static/images/handheld/ic_select_goods.png"
|
||||
style="width: 20px;height: 20px;border-radius: 10px;"></image>
|
||||
<text style="color: #FFFFFF;font-size: 28rpx ">选择货品</text>
|
||||
</view>
|
||||
<view @click="selectDocument"
|
||||
style="width: 200rpx;height: 110rpx;margin-left: 20px;border-radius:8rpx;background: linear-gradient( 270deg, #FFB679 0%, #EF882E 100%);display: flex;flex-direction: column;justify-content: center;align-items: center">
|
||||
<image src="/static/images/handheld/ic_select_document.png"
|
||||
style="width: 20px;height: 20px;border-radius: 10px;"></image>
|
||||
<text style="color: #FFFFFF;font-size: 28rpx ">选择领料单</text>
|
||||
<u-form-item style="width: 100%; padding: 20rpx 0;">
|
||||
<view class="button-group">
|
||||
<view @click="selectGoods" class="action-button" style="background: linear-gradient( 270deg, #7D97FF 0%, #4367F5 100%);width: 200rpx;">
|
||||
<image src="/static/images/handheld/ic_select_goods.png" class="button-icon"></image>
|
||||
<text class="button-text">选择货品</text>
|
||||
</view>
|
||||
<view @click="selectDocument" class="action-button" style="margin-left: 20rpx;background: linear-gradient( 270deg, #FFB679 0%, #EF882E 100%);width: 200rpx;">
|
||||
<image src="/static/images/handheld/ic_select_document.png" class="button-icon"></image>
|
||||
<text class="button-text">选择领料单</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<scroll-view class="chronic-science" scroll-y="true">
|
||||
|
|
@ -95,9 +91,10 @@
|
|||
</view>
|
||||
<view style="width: 100%;display:flex;height: 50px">
|
||||
<view style="width: 100%;display: flex;align-items: center">
|
||||
<view class="scroll_title_input">领取数量:</view>
|
||||
<view class="scroll_title_input"><i style="color:red;">*</i>领取数量:</view>
|
||||
<view class="scroll_content_input">
|
||||
<uni-easyinput placeholder="输入数量" type="number" v-model="item.fetchNum" @blur="calculateTotal"></uni-easyinput>
|
||||
<uni-easyinput placeholder="输入数量" type="number" v-model="item.fetchNum"
|
||||
@blur="calculateTotal(item)"></uni-easyinput>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -108,22 +105,20 @@
|
|||
</u--form>
|
||||
</scroll-view>
|
||||
<view class="submit-btn">
|
||||
<view class="checked" style="width: 20%;display: flex;align-items: center;">
|
||||
<view class="checked">
|
||||
<checkbox-group @tap="checkAll">
|
||||
<checkbox :checked="allChecked" />
|
||||
</checkbox-group>
|
||||
<text style="margin-left: 5px;">全选</text>
|
||||
<text class="check-all-text">全选</text>
|
||||
</view>
|
||||
<view style="width: 30%;margin-top: 12rpx;font-weight: 600;display: flex;flex-direction: column">
|
||||
<view>
|
||||
<text style="font-size: 25rpx;color: #A69F9A;font-family: PingFang SC-Regular;">总数量:</text>
|
||||
<text style="font-size: 32rpx;color: #FF6816;font-family: PingFang SC-Semibold;">{{ totalNum }}</text>
|
||||
<view class="total-info">
|
||||
<view class="total-item">
|
||||
<text class="total-label">总数量:</text>
|
||||
<text class="total-value">{{ totalNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-button text="删除" @click="del"
|
||||
style="width: 150rpx;border-radius:8rpx;background: linear-gradient( 270deg, #F87665 0%, #E43D26 100%);color: white"></u-button>
|
||||
<u-button text="保存" @click="handleSubmit"
|
||||
style="width: 150rpx;border-radius:8rpx;background: linear-gradient( 270deg, #FFB679 0%, #EF882E 100%);color: white"></u-button>
|
||||
<u-button class="action-btn delete-btn" text="删除" @click="del"></u-button>
|
||||
<u-button class="action-btn save-btn" text="保存" @click="handleSubmit"></u-button>
|
||||
</view>
|
||||
|
||||
<u-action-sheet
|
||||
|
|
@ -166,11 +161,12 @@ export default {
|
|||
warehouseId: { options: [], title: '请选择所属仓库' },
|
||||
fetchUserId: { options: [], title: '请选择领料人' },
|
||||
supplierId: { options: [], title: '请选择供应商' },
|
||||
outType: { options: [
|
||||
outType: {
|
||||
options: [
|
||||
{ name: '领取出库', text: '领取出库', value: '1' },
|
||||
{ name: '报损出库', text: '报损出库', value: '2' },
|
||||
{ name: '退货出库', text: '退货出库', value: '3' },
|
||||
{ name: '调拨出库', text: '调拨出库', value: '4' },
|
||||
{ name: '调拨出库', text: '调拨出库', value: '4' }
|
||||
], title: '请选择出库类型'
|
||||
}
|
||||
},
|
||||
|
|
@ -197,7 +193,8 @@ export default {
|
|||
supplierId: null,
|
||||
supplierName: null
|
||||
},
|
||||
currentDateOption: -1
|
||||
currentDateOption: -1,
|
||||
isUploading: false,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -208,7 +205,7 @@ export default {
|
|||
item.checked = false // 初始化为未选中状态
|
||||
})
|
||||
this.form = options.form ? JSON.parse(decodeURIComponent(options.form)) : this.form
|
||||
console.log(this.form.areaId, '所属区域ID')
|
||||
console.log('form------',this.form)
|
||||
this.areaControlName = this.getDisplayName('areaId', this.form.areaId)
|
||||
this.calculateTotal()
|
||||
}
|
||||
|
|
@ -323,11 +320,32 @@ export default {
|
|||
})
|
||||
return
|
||||
}
|
||||
if (!this.form.warehouseId) {
|
||||
uni.showToast({
|
||||
title: '请先选择所属仓库',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/enterAndExit/exit/selectGoods?form=' + JSON.stringify(this.form)
|
||||
})
|
||||
},
|
||||
selectDocument() {
|
||||
if (!this.form.areaId) {
|
||||
uni.showToast({
|
||||
title: '请先选择所属区域',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.form.warehouseId) {
|
||||
uni.showToast({
|
||||
title: '请先选择所属仓库',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/enterAndExit/exit/selectDocument?form=' + JSON.stringify(this.form)
|
||||
})
|
||||
|
|
@ -338,31 +356,38 @@ export default {
|
|||
this.calculateTotal()
|
||||
},
|
||||
handleSubmit() {
|
||||
if (this.isUploading) return
|
||||
this.isUploading = true
|
||||
if (this.checkIsExist(this.form.areaId)) {
|
||||
this.isUploading = false
|
||||
uni.showToast({
|
||||
title: '请选择所属区域',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else if (this.checkIsExist(this.form.warehouseId)) {
|
||||
this.isUploading = false
|
||||
uni.showToast({
|
||||
title: '请选择货品仓库',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else if (this.checkIsExist(this.form.outType)) {
|
||||
this.isUploading = false
|
||||
uni.showToast({
|
||||
title: '请选择出库类型',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else if (this.checkIsExist(this.form.fetchUserId)) {
|
||||
this.isUploading = false
|
||||
uni.showToast({
|
||||
title: '请选择领料人',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else if (this.imsOutInventoryDetailAddList.length === 0) {
|
||||
this.isUploading = false
|
||||
uni.showToast({
|
||||
title: '请选择出库货品',
|
||||
icon: 'none'
|
||||
|
|
@ -372,9 +397,11 @@ export default {
|
|||
var tf = false
|
||||
this.imsOutInventoryDetailAddList.forEach(item => {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@
|
|||
<view
|
||||
style="width: 100%;height: 90%;display: flex;flex-direction: column;justify-content: space-between;padding: 10px;">
|
||||
<view style="width: 100%;height: 80rpx;display: flex;">
|
||||
<view style="width:85%;font-size:32rpx;font-weight: 600;color: #FF6816;font-family: PingFang SC-Semibold">
|
||||
<view style="width:80%;font-size:32rpx;font-weight: 600;color: #FF6816;font-family: PingFang SC-Semibold">
|
||||
{{ item.outDate }}
|
||||
</view>
|
||||
<view style="width:15%;float: right;display: flex;align-items: center"
|
||||
<view style="width:20%;float: right;display: flex;align-items: center"
|
||||
@click="navigateTo(`/pages/enterAndExit/exit/recordDetail?outId=${item.outId}`)">
|
||||
<text style="font-size:28rpx;font-weight: 600;color: #3E34FF;font-family: PingFang SC-Regular">详情
|
||||
</text>
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -1,52 +1,41 @@
|
|||
<template>
|
||||
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
||||
<view class="content"><!-- @touchmove="touchmoveMethod" -->
|
||||
<Navbar title="选择货品" :showRightText="false" :isBack="false" />
|
||||
<view style="width: 100%;height: 100%;">
|
||||
<view style="width: 100%;height: calc(100vh - 60px);">
|
||||
<view class="search-form">
|
||||
<uni-easyinput class="searchInput" placeholder="输入货品编码/名称" v-model="searchValue" suffixIcon="search"
|
||||
@iconClick="search"
|
||||
@keyup.enter.native="search"></uni-easyinput>
|
||||
</view>
|
||||
<u-table :th-style="{backgroundColor:'#3c94fd'}"
|
||||
style="height:100% ;width: 100%;position: relative;overflow-y: auto;border: 5rpx solid rgba(178,178,178,.4);border-radius: 15rpx;border-top: 0rpx;">
|
||||
<u-tr style="position: sticky;top: 0;z-index: 10;width: 100%;height: 50rpx;display: flex;">
|
||||
<!-- background: #afafaf-->
|
||||
<u-th style="color: white;flex: 0.5;display: flex;justify-content: space-around;align-items: center;">
|
||||
<checkbox-group @tap="checkAll" style="width: 25px;height: 25px">
|
||||
<checkbox :checked="allChecked" />
|
||||
</checkbox-group>
|
||||
</u-th>
|
||||
<u-th class="list_title">货品编码
|
||||
</u-th>
|
||||
<u-th class="list_title">货品名称
|
||||
</u-th>
|
||||
<u-th class="list_title">货品类别
|
||||
</u-th>
|
||||
<u-th class="list_title">计量单位
|
||||
</u-th>
|
||||
</u-tr>
|
||||
<!-- <view style="width: 97%;height: 1px;background: #c4c3c3;margin-left: 1.5%;"></view>-->
|
||||
<scroll-view class="chronic-science" style="height: 78vh;margin-top: 5px;" scroll-y="true"
|
||||
<uni-table :th-style="{backgroundColor:'#3c94fd'}" type="selection" @selection-change="selectChange" border stripe empty-text="暂无更多数据">
|
||||
<view class="tableHeader">
|
||||
<uni-tr style="display:flex;width: 100%">
|
||||
<uni-th align="center" style="width: 25vw">货品编码</uni-th>
|
||||
<uni-th align="center" style="width: 25vw">货品名称</uni-th>
|
||||
<uni-th align="center" style="width: 25vw">货品类别</uni-th>
|
||||
<uni-th align="center" style="width: 25vw">计量单位</uni-th>
|
||||
</uni-tr>
|
||||
</view>
|
||||
<scroll-view class="chronic-science" style="margin-top: 44px;" scroll-y="true"
|
||||
@scrolltolower="onScrollTolower">
|
||||
<view v-for="(item,index) in tableList" :key="index">
|
||||
<u-tr style="height: 64rpx;"
|
||||
:style="{display: 'flex',flexDirection: 'row',justifyContent: 'space-between'}">
|
||||
<u-td style="flex: 0.5;display: flex;justify-content: space-around;align-items: center;">
|
||||
<checkbox-group style="width: 25px;height: 25px" @change="checkClick(item)">
|
||||
<checkbox :checked="item.checked" />
|
||||
</checkbox-group>
|
||||
</u-td>
|
||||
<u-td class="list_item">{{ item.materialCode }}</u-td>
|
||||
<u-td class="list_item">{{ item.materialName }}</u-td>
|
||||
<u-td class="list_item">{{ item.materialTypeName }}</u-td>
|
||||
<u-td class="list_item">{{ item.unitName }}</u-td>
|
||||
</u-tr>
|
||||
</view>
|
||||
<uni-tr style="height: 64rpx;width: 100%;max-width: 100vw;"
|
||||
:style="{display: 'flex',flexDirection: 'row',justifyContent: 'space-between'}"
|
||||
v-for="(item,index) in tableList" :key="index">
|
||||
<uni-td class="list_item">{{ item.materialCode }}</uni-td>
|
||||
<uni-td class="list_item">{{ item.materialName }}</uni-td>
|
||||
<uni-td class="list_item">{{ item.materialTypeName }}</uni-td>
|
||||
<uni-td class="list_item">{{ item.unitName }}</uni-td>
|
||||
</uni-tr>
|
||||
</scroll-view>
|
||||
</u-table>
|
||||
<u-button style="width:180rpx;height:70rpx;position: fixed;bottom: 20rpx;right: 10px;background: linear-gradient( 270deg, #FFB679 0%, #EF882E 100%);border: 0" type="primary"
|
||||
@click="navigateTo('/pages/enterAndExit/exit/add')">确认
|
||||
</u-button>
|
||||
</uni-table>
|
||||
<view style="width: 100%;background: #ffffff;padding: 20rpx 0;height: 100rpx;position: sticky;bottom: 0;z-index: 99;">
|
||||
<u-button
|
||||
style="width:180rpx;background: linear-gradient( 270deg, #FFB679 0%, #EF882E 100%);border: 0;position: fixed;bottom: 20rpx;right: 10px;height:70rpx"
|
||||
type="primary"
|
||||
@click="navigateTo('/pages/enterAndExit/exit/add')">确认
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -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;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<view class="scroll-view-item" v-for="(item,index) in tableList" :key="index">
|
||||
<view style="width: 100%;display: flex;align-items: center;height: 160px;justify-content: space-between;">
|
||||
<view style="width: 25%;height: 90%;display: flex;align-items: center;justify-content: center;">
|
||||
<image class="image" src="/static/images/handheld/ic_goods_img.jpg" mode="aspectFit"></image>
|
||||
<image class="image" :src="handleImage(item)" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view style="width: 75%;height: 90%;display: flex;flex-direction: column;justify-content: space-between;padding: 4px;margin-left: 10rpx;">
|
||||
<view style="width: 100%;font-size:35rpx;color: #FF6816;white-space: nowrap;overflow: hidden;text-overfloccw: ellipsis;height: 60px;">{{item.materialName}}</view>
|
||||
|
|
@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -93,6 +100,7 @@ page {
|
|||
//从上到下渐变
|
||||
min-height: 88vh;
|
||||
background-size: 100% 100%;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
<template>
|
||||
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
||||
<view class="content">
|
||||
<view style="width: 100%;height:30%;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||
<image class="logo" src="@//static/images/ic_user_photo.png" mode="aspectFit"></image>
|
||||
<text class="text_show">您好,{{username}}</text>
|
||||
</view>
|
||||
<view style="height: 70%;width: 100%;padding: 20rpx;display: flex;justify-content: center;">
|
||||
<u-button shape="circle" color="#FFB679"
|
||||
style="height: 72rpx;font-weight: bold;font-size: 28rpx;position: fixed;bottom:10%;width: 90%;" @click="logOut">退出登录
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import Cookies from 'js-cookie'
|
||||
import UButton from '@/uni_modules/uview-ui/components/u-button/u-button.vue'
|
||||
export default {
|
||||
components: { UButton },
|
||||
data() {
|
||||
return {
|
||||
fontValue: uni.getStorageSync('fontSize') || 8,
|
||||
username: Cookies.get('username')
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
logOut(){
|
||||
Cookies.remove('token')
|
||||
Cookies.remove('username')
|
||||
Cookies.remove('password')
|
||||
uni.removeStorageSync('token')
|
||||
uni.removeStorageSync('username')
|
||||
uni.removeStorageSync('password')
|
||||
uni.reLaunch({
|
||||
url: '/pages/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
background: #f9fbff;
|
||||
height: 95vh;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
|
||||
.logo {
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
margin-top: 200rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.text_show{
|
||||
font-family: PingFang SC-Medium;
|
||||
font-weight: bold;
|
||||
color: #453C37;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Loading…
Reference in New Issue