1
This commit is contained in:
parent
e3c9896438
commit
69879f4d1a
@ -74,7 +74,7 @@
|
||||
</view>
|
||||
<uni-collapse ref="collapse">
|
||||
<uni-collapse-item v-for="(groupItem, index) in repairList" :key="groupItem.groupId"
|
||||
:title="groupItem.groupName+'(合计:'+groupItem.nums+'个配件'">
|
||||
:title="groupItem.groupName+'(合计:'+groupItem.typeNums+'种'+groupItem.nums+'个配件'">
|
||||
<view class="content">
|
||||
<view @click="changeChoose(item)" v-for="item in groupItem.twItemList" :key="item.id" class="repairItem" >
|
||||
<view class="repairName">
|
||||
|
@ -23,7 +23,7 @@
|
||||
<view class="repairName">{{ item.name }}</view>
|
||||
<view class="repairBottom">
|
||||
<text class="repairDesc">单位:
|
||||
<text class="repairUnit">{{ item.unit }}</text>
|
||||
<text class="repairUnit">{{ item.unitText }}</text>
|
||||
</text>
|
||||
<view class="repairBtns">
|
||||
<u-icon name="minus-circle-fill" size="24" @click="delNum(item)"></u-icon>
|
||||
@ -33,17 +33,44 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-align: center" v-if="repairList.length==0">
|
||||
<image class="" src="@/static/images/nothing.png" ></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<text class="label">共选择:</text>
|
||||
<text class="repairNum">{{ repairCount }}个配件</text>
|
||||
<text class="label" @click="openChoosed">共选择:</text>
|
||||
<text class="repairNum" @click="openChoosed">{{ repairCount }}个配件</text>
|
||||
<view class="submit" v-if="ticketId" @click="submit">确认申请</view>
|
||||
<view class="submit" v-if="!ticketId" @click="addTwi">确认添加</view>
|
||||
<view class="submit" v-if="ticketId" @click="openUpload">拍照上传</view>
|
||||
</view>
|
||||
|
||||
<!-- 普通弹窗---打开已选配件 -->
|
||||
<uni-popup ref="waresPopup" background-color="#fff" :mask-click="false">
|
||||
<view class="popup-content" style="padding: 15px;">
|
||||
<view class="dl-avatar-box" style="height: 400px;overflow-y: scroll">
|
||||
<view v-for="(item, index) in selectedRepairList" :key="index" class="listItem">
|
||||
<view class="repairName">{{ item.name }}</view>
|
||||
<view class="repairBottom">
|
||||
<text class="repairDesc">单位:
|
||||
<text class="repairUnit">{{ item.unitText }}</text>
|
||||
</text>
|
||||
<view class="repairBtns">
|
||||
<u-icon name="minus-circle-fill" size="24" @click="delNum(item)"></u-icon>
|
||||
<text class="repairNum">{{ item.num }}</text>
|
||||
<u-icon color="#0174F6" name="plus-circle-fill" size="24"
|
||||
@click="addNum(item)"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-align: center" v-if="selectedRepairList.length==0">
|
||||
<image class="" src="@/static/images/nothing.png" ></image>
|
||||
</view>
|
||||
</view>
|
||||
<button type="primary" @click="closeWaresPopup">关闭</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<!-- 普通弹窗---拍照上传 -->
|
||||
<uni-popup ref="popup" background-color="#fff">
|
||||
<view class="popup-content" style="padding: 15px;">
|
||||
@ -83,9 +110,7 @@
|
||||
//所有配件
|
||||
repairList: [],
|
||||
//已选的配件
|
||||
selectedRepairList: [
|
||||
|
||||
],
|
||||
selectedRepairList: [],
|
||||
//搜索的配件名称
|
||||
searchName: '',
|
||||
//选中的分类ID
|
||||
@ -119,7 +144,20 @@
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
|
||||
closeWaresPopup(){
|
||||
this.$refs.waresPopup.close()
|
||||
//刷新数据列表
|
||||
this.chooseTab("")
|
||||
},
|
||||
/**
|
||||
* 打开已选择的配件弹出框
|
||||
*/
|
||||
openChoosed(){
|
||||
if(this.selectedRepairList.length==0){
|
||||
return
|
||||
}
|
||||
this.$refs.waresPopup.open("bottom")
|
||||
},
|
||||
addTwi(){
|
||||
if (!this.selectedRepairList || this.selectedRepairList.length === 0){
|
||||
uni.showToast({
|
||||
@ -238,6 +276,7 @@
|
||||
* 分页加载所有配件
|
||||
*/
|
||||
pageList() {
|
||||
let that = this
|
||||
let paramsObj = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize
|
||||
@ -258,8 +297,8 @@
|
||||
let thisDataList = res.data.records
|
||||
// 初始化数据
|
||||
thisDataList = thisDataList.map(m => {
|
||||
if (this.selectedRepairList && this.selectedRepairList.length > 0) {
|
||||
const find = this.selectedRepairList.find(f => f.id === m.id)
|
||||
if (that.selectedRepairList && that.selectedRepairList.length > 0) {
|
||||
const find = that.selectedRepairList.find(f => f.id === m.id)
|
||||
if (find) {
|
||||
m.num = find.num
|
||||
} else {
|
||||
@ -268,25 +307,21 @@
|
||||
} else {
|
||||
m.num = 0
|
||||
}
|
||||
//翻译单位
|
||||
getDictTextByCodeAndValue("repair_unit", m.unit).then(value => {
|
||||
m.unit = value
|
||||
}).catch(error => {
|
||||
m.unit = "未知"
|
||||
console.error(error);
|
||||
});
|
||||
return m
|
||||
})
|
||||
console.log(thisDataList,"thisDataList")
|
||||
//判断 如果获取的数据的页码不是第一页,就让之前赋值获取过的数组数据 concat连接 刚获取的第n页数据
|
||||
if (this.pageNo != 1) {
|
||||
this.repairList = this.repairList.concat(thisDataList)
|
||||
if (that.pageNo != 1) {
|
||||
that.repairList = that.repairList.concat(thisDataList)
|
||||
} else {
|
||||
this.repairList = thisDataList
|
||||
that.repairList = thisDataList
|
||||
}
|
||||
//将获取的总条数赋值
|
||||
this.total = res.data.total
|
||||
this.isTriggered = false
|
||||
}
|
||||
that.total = res.data.total
|
||||
that.isTriggered = false
|
||||
}else{
|
||||
that.isTriggered = false
|
||||
}
|
||||
})
|
||||
},
|
||||
addNum(repair) {
|
||||
@ -558,4 +593,39 @@
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
.listItem {
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 2rpx solid #DDDDDD;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.repairName {
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.repairBottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.repairDesc {
|
||||
font-size: 28rpx;
|
||||
color: #858BA0;
|
||||
}
|
||||
|
||||
.repairUnit {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.repairBtns {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -36,7 +36,7 @@
|
||||
</uni-collapse>
|
||||
<uni-collapse ref="collapse" v-else>
|
||||
<uni-collapse-item v-for="groupItem in repairList" :key="groupItem.groupId"
|
||||
:title="groupItem.groupName+'(合计'+groupItem.nums+'个配件)'">
|
||||
:title="groupItem.groupName+'(合计:'+groupItem.typeNums+'种'+groupItem.nums+'个配件'">
|
||||
<view class="content" >
|
||||
<view class="repairItem" v-for="(item, index) in groupItem.soiRespVOList" :key="index">
|
||||
<view class="repairName">{{ item.goodsName }}×{{ item.goodsCount }}{{ item.unitText }}</view>
|
||||
|
@ -22,9 +22,9 @@
|
||||
<view class="inputs" v-if="activeid == 0 || activeid == 2 ">
|
||||
<input type="password" v-model="wrod" placeholder="请输入密码">
|
||||
</view>
|
||||
<view class="wjworb" v-if="activeid == 0 || activeid == 2" @click="goforgot()">
|
||||
<view class="">忘记密码</view>
|
||||
</view>
|
||||
<!-- <view class="wjworb" v-if="activeid == 0 || activeid == 2" @click="goforgot()">-->
|
||||
<!-- <view class="">忘记密码</view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<view class="dl" @click="getlogin()">
|
||||
<text>登 录</text>
|
||||
@ -77,9 +77,9 @@
|
||||
qh: [{
|
||||
text: '密码登录'
|
||||
},
|
||||
{
|
||||
text: '验证码登录'
|
||||
},
|
||||
// {
|
||||
// text: '验证码登录'
|
||||
// },
|
||||
],
|
||||
qindex: false,
|
||||
tel: '',
|
||||
|
Loading…
Reference in New Issue
Block a user