This commit is contained in:
xiaofajia 2024-11-27 15:39:12 +08:00
commit 7d9f7e6005
5 changed files with 104 additions and 34 deletions

View File

@ -1,10 +1,10 @@
// 应用全局配置
module.exports = {
// baseUrl: 'https://www.nuoyunr.com',
baseUrl: 'https://www.nuoyunr.com',
// baseUrl: 'http://124.222.105.7:48080',
// baseUrl: 'http://192.168.1.4:48080',
// baseUrl: "http://localhost:48080",
baseUrl: 'http://rbmz58.natappfree.cc',
// baseUrl: "http://rzqhb7.natappfree.cc",
imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
baseImageUrl: 'https://www.nuoyunr.com/minio/',
shareUrl: 'https://www.lighting-it.cn/share?inviteId=',
@ -15,7 +15,7 @@ module.exports = {
// 应用名称
name: "智修小助手",
// 应用版本
version: "1.5",
version: "1.6",
// 应用logo
logo: "/static/logo.png'",
// 官方网站

View File

@ -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">

View File

@ -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>

View File

@ -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>

View File

@ -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: '',