Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-repair-app
This commit is contained in:
commit
47c9d3b46b
@ -259,11 +259,11 @@ export default {
|
|||||||
|
|
||||||
.order-body {
|
.order-body {
|
||||||
.carNum {
|
.carNum {
|
||||||
margin: 20rpx 0;
|
margin: 10rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.carModel {
|
.carModel {
|
||||||
margin: 20rpx 0;
|
margin: 10rpx 0;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #858BA0;
|
color: #858BA0;
|
||||||
@ -330,7 +330,7 @@ export default {
|
|||||||
color: #858BA0;
|
color: #858BA0;
|
||||||
|
|
||||||
& > view {
|
& > view {
|
||||||
margin: 30rpx 0;
|
margin: 10rpx 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,7 +338,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
column-gap: 10rpx;
|
//column-gap: 10rpx;
|
||||||
padding-bottom: 30rpx;
|
padding-bottom: 30rpx;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
@ -346,7 +346,7 @@ export default {
|
|||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||||
border: 2rpx solid #0174F6;
|
border: 2rpx solid #0174F6;
|
||||||
|
margin: 0 2rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -14,7 +14,7 @@ module.exports = {
|
|||||||
// 应用名称
|
// 应用名称
|
||||||
name: "智修小助手",
|
name: "智修小助手",
|
||||||
// 应用版本
|
// 应用版本
|
||||||
version: "1.3",
|
version: "1.5",
|
||||||
// 应用logo
|
// 应用logo
|
||||||
logo: "/static/logo.png'",
|
logo: "/static/logo.png'",
|
||||||
// 官方网站
|
// 官方网站
|
||||||
|
@ -39,7 +39,8 @@
|
|||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
|
@ -644,9 +644,35 @@ export default {
|
|||||||
* 添加车辆和客户信息
|
* 添加车辆和客户信息
|
||||||
*/
|
*/
|
||||||
addCarUserInfo(){
|
addCarUserInfo(){
|
||||||
uni.navigateTo({
|
if(this.userInfo){
|
||||||
url: `/pages/myCar/addCarUser`
|
//已查出客户信息
|
||||||
})
|
uni.navigateTo({
|
||||||
|
url: '/pages/myCar/addCarUser?userInfo='+JSON.stringify(this.userInfo)
|
||||||
|
})
|
||||||
|
}else if(this.phone != ''){
|
||||||
|
//输入了内容
|
||||||
|
const params = {
|
||||||
|
phoneOrCar: this.phone
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: '/admin-api/base/custom/page',
|
||||||
|
method: 'GET',
|
||||||
|
params: params
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data.records.length > 0) {
|
||||||
|
this.userInfo = res.data.records[0]
|
||||||
|
//跳转添加客户车辆信息页
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/myCar/addCarUser?userInfo='+JSON.stringify(this.userInfo)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
//没输入,直接加
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/myCar/addCarUser`
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
editUserInfo(userInfo) {
|
editUserInfo(userInfo) {
|
||||||
if (this.phone == '') return uni.showToast({
|
if (this.phone == '') return uni.showToast({
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<view class="carTitle">车辆信息</view>
|
<view class="carTitle">车辆信息</view>
|
||||||
<view class="carDetail">
|
<view class="carDetail">
|
||||||
<view class="carHeader">
|
<view class="carHeader">
|
||||||
<image v-show="ticketInfo.carInfo.logoImg" :src="imgUrlPrex + ticketInfo.carInfo.logoImg" class="carImage" mode="aspectFill"></image>
|
<image v-show="ticketInfo.carInfo.logoImg" :src="imgUrlPrex + ticketInfo.carInfo.logoImg" class="carImage" mode="aspectFit"></image>
|
||||||
<view class="carHeaderRight">
|
<view class="carHeaderRight">
|
||||||
<text class="carNumber">{{ ticketInfo.carNo }}</text>
|
<text class="carNumber">{{ ticketInfo.carNo }}</text>
|
||||||
<text class="carType">{{ ticketInfo.carBrandName+" " }} <text v-if="ticketInfo.carInfo && ticketInfo.carInfo.carModel"> - {{ticketInfo.carInfo.carModel}}</text></text>
|
<text class="carType">{{ ticketInfo.carBrandName+" " }} <text v-if="ticketInfo.carInfo && ticketInfo.carInfo.carModel"> - {{ticketInfo.carInfo.carModel}}</text></text>
|
||||||
@ -127,11 +127,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="projBaseInfo" v-if="(loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')) && isDetail == '0'" >
|
<view class="projBaseInfo" v-if="(loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')) && isDetail == '0'" >
|
||||||
<!-- 可编辑-->
|
<!-- 可编辑-->
|
||||||
<view v-if="canSeeMoney">售价:<input @input="onKeyInput('sj',item)" style="background: white;padding: 0 10rpx" type="decimal" placeholder="请输入售价" v-model="item.itemPrice" /></view>
|
<view v-if="canSeeMoney">售价:<input class="edit-proj-input" @input="onKeyInput('sj',item)" type="decimal" placeholder="请输入售价" v-model="item.itemPrice" /></view>
|
||||||
<view>数量:<input @input="onKeyInput('sl',item)" style="background: white;padding: 0 10rpx" type="number" placeholder="请输入数量" v-model="item.itemCount" /></view>
|
<view>数量:<input class="edit-proj-input" @input="onKeyInput('sl',item)" type="number" placeholder="请输入数量" v-model="item.itemCount" /></view>
|
||||||
<!-- <view>单位:{{ item.itemUnit}}</view>-->
|
<!-- <view>单位:{{ item.itemUnit}}</view>-->
|
||||||
<view v-if="canSeeMoney">折扣:<input @input="onKeyInput('zk',item)" style="background: white;padding: 0 10rpx" type="decimal" placeholder="请输入折扣(0-1)" v-model="item.itemDiscount" /></view>
|
<view v-if="canSeeMoney">折扣:<input class="edit-proj-input" @input="onKeyInput('zk',item)" type="decimal" placeholder="请输入折扣(0-1)" v-model="item.itemDiscount" /></view>
|
||||||
<view v-if="canSeeMoney">金额:<input type="number" disabled placeholder="请输入售价" v-model="item.itemMoney" /></view>
|
<view v-if="canSeeMoney">金额:<input type="number" disabled placeholder="请输入售价" v-model="item.itemMoney" /></view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="projBaseInfo" >
|
<view v-else class="projBaseInfo" >
|
||||||
<!-- 只读 -->
|
<!-- 只读 -->
|
||||||
@ -186,14 +186,14 @@
|
|||||||
<view class="projTitle">维修配件 <view class="dl-ifcus" v-if="canOpenCus"><text>是否开放给客户</text><switch :checked="ticketInfo.partShow == '1'" style="transform:scale(0.7)" @change="toPartShow" /></view></view>
|
<view class="projTitle">维修配件 <view class="dl-ifcus" v-if="canOpenCus"><text>是否开放给客户</text><switch :checked="ticketInfo.partShow == '1'" style="transform:scale(0.7)" @change="toPartShow" /></view></view>
|
||||||
<view class="projList">
|
<view class="projList">
|
||||||
<uni-collapse ref="collapse" >
|
<uni-collapse ref="collapse" >
|
||||||
<uni-collapse-item v-for="groupItem in ticketInfo.waresGroupList" :key="groupItem.groupId" :title="groupItem.groupName+'(合计:'+groupItem.nums+'个配件,'+groupItem.totalAmount+'元)'" >
|
<uni-collapse-item v-for="(groupItem,groupIndex) in ticketInfo.waresGroupList" :key="groupItem.groupId" :title="groupItem.groupName+'('+groupItem.nums+'类配件,合计:'+groupItem.totalAmount+'元)'" >
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<template>
|
<template>
|
||||||
<view v-for="item in groupItem.wares" :key="item.id" class="projEditItem">
|
<view v-for="(item,index) in groupItem.wares" :key="item.id" class="projEditItem">
|
||||||
<view v-if="loginUser.roleCodes.includes('repair_warehouse') && isDetail == '0'">
|
<view v-if="loginUser.roleCodes.includes('repair_warehouse') && isDetail == '0'">
|
||||||
<view class="projEditLine1">
|
<view class="projEditLine1">
|
||||||
<text>{{ item.itemName }}</text>
|
<text>{{ item.itemName }}</text>
|
||||||
<text v-if="canSeeMoney" class="projAmount">¥{{ item.itemMoney }}</text>
|
<text class="projAmount"><text v-if="canSeeMoney">¥{{ item.itemMoney }}</text><uni-icons @click="delWares(item,groupIndex,index)" type="trash" size="25" style="color: #0174F6"></uni-icons></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="projBaseInfo" >
|
<view class="projBaseInfo" >
|
||||||
<view v-if="canSeeMoney">售价:<input @input="onKeyInput('sj',item)" style="background: white;padding: 0 10rpx" type="decimal" placeholder="请输入售价" v-model="item.itemPrice" /></view>
|
<view v-if="canSeeMoney">售价:<input @input="onKeyInput('sj',item)" style="background: white;padding: 0 10rpx" type="decimal" placeholder="请输入售价" v-model="item.itemPrice" /></view>
|
||||||
@ -398,7 +398,7 @@ export default {
|
|||||||
name:"",
|
name:"",
|
||||||
tel:""
|
tel:""
|
||||||
},
|
},
|
||||||
//删除的项目id
|
//删除的项目id、配件id
|
||||||
delProjId:[],
|
delProjId:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -449,11 +449,30 @@ export default {
|
|||||||
*/
|
*/
|
||||||
delProj(id,index){
|
delProj(id,index){
|
||||||
this.delProjId.push(id)
|
this.delProjId.push(id)
|
||||||
//从缓存中移除
|
//从列表中移除
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.ticketInfo.projects.splice(index,1)
|
this.ticketInfo.projects.splice(index,1)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 删除配件
|
||||||
|
*/
|
||||||
|
delWares(item,groupIndex,itemIndex){
|
||||||
|
this.delProjId.push(item.id)
|
||||||
|
//从列表中移除
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.ticketInfo.waresGroupList[groupIndex].wares.splice(itemIndex,1)
|
||||||
|
if(this.ticketInfo.waresGroupList[groupIndex].wares.length==0){
|
||||||
|
this.ticketInfo.waresGroupList.splice(groupIndex,1)
|
||||||
|
}else{
|
||||||
|
//重新计算总价格数量
|
||||||
|
let groupItem = this.ticketInfo.waresGroupList[groupIndex]
|
||||||
|
groupItem.nums = groupItem.nums-1
|
||||||
|
groupItem.totalAmount = groupItem.totalAmount-item.itemMoney
|
||||||
|
this.ticketInfo.waresGroupList[groupIndex]=groupItem
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 监听输入框
|
* 监听输入框
|
||||||
*/
|
*/
|
||||||
@ -1039,6 +1058,23 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
resultObj.projects =newProArray
|
resultObj.projects =newProArray
|
||||||
|
|
||||||
|
// //新的配件分组list
|
||||||
|
// let newWaresGroupList = []
|
||||||
|
// //有删除的配件,需要比对删掉
|
||||||
|
// resultObj.waresGroupList.map((groupItem)=>{
|
||||||
|
// let newWaresList = []
|
||||||
|
// groupItem.wares.map((item)=>{
|
||||||
|
// if(this.delProjId.indexOf(item.id)==-1){
|
||||||
|
// newWaresList.push(item)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// if(newWaresList.length>0){
|
||||||
|
// groupItem.wares = newWaresList
|
||||||
|
// newWaresGroupList.push(groupItem)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// resultObj.projects =newWaresGroupList
|
||||||
}
|
}
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.ticketInfo = resultObj
|
this.ticketInfo = resultObj
|
||||||
@ -1258,7 +1294,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
column-gap: 14rpx;
|
column-gap: 14rpx;
|
||||||
padding: 40rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
background: #FFFBF3;
|
background: #FFFBF3;
|
||||||
border-radius: 8rpx 8rpx 0rpx 0rpx;
|
border-radius: 8rpx 8rpx 0rpx 0rpx;
|
||||||
border-top: 8rpx solid #E8A321;
|
border-top: 8rpx solid #E8A321;
|
||||||
@ -1301,7 +1337,7 @@ export default {
|
|||||||
.carImage {
|
.carImage {
|
||||||
width: 192rpx;
|
width: 192rpx;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
background: #F2F2F7;
|
//background: #F2F2F7;
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1342,7 +1378,7 @@ export default {
|
|||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 20rpx;
|
//gap: 20rpx;
|
||||||
|
|
||||||
.tushi-box{
|
.tushi-box{
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@ -1360,6 +1396,7 @@ export default {
|
|||||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||||
border: 2rpx solid #DDDDDD;
|
border: 2rpx solid #DDDDDD;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
|
||||||
.projTop {
|
.projTop {
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
@ -1425,6 +1462,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.projEditItem {
|
.projEditItem {
|
||||||
|
margin-bottom: 17rpx;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
background: #F2F2F7;
|
background: #F2F2F7;
|
||||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||||
@ -1434,6 +1472,11 @@ export default {
|
|||||||
top: -10px;
|
top: -10px;
|
||||||
right: -10px;
|
right: -10px;
|
||||||
}
|
}
|
||||||
|
.del-wares-box{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
.projEditLine1 {
|
.projEditLine1 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -1443,7 +1486,7 @@ export default {
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|
||||||
padding: 30rpx 0;
|
padding: 15rpx 0;
|
||||||
|
|
||||||
.projAmount {
|
.projAmount {
|
||||||
color: #0174F6;
|
color: #0174F6;
|
||||||
@ -1460,7 +1503,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.projEditFoot {
|
.projEditFoot {
|
||||||
padding: 30rpx 0;
|
padding: 10rpx 0;
|
||||||
border-top: 1px solid #DDDDDD;
|
border-top: 1px solid #DDDDDD;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1542,7 +1585,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.projFoot, .userFoot, .carFoot {
|
.projFoot, .userFoot, .carFoot {
|
||||||
padding: 30rpx;
|
padding: 20rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #0174F6;
|
color: #0174F6;
|
||||||
@ -1585,5 +1628,12 @@ export default {
|
|||||||
color: #333333;
|
color: #333333;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edit-proj-input{
|
||||||
|
background: white;
|
||||||
|
width: 90%;
|
||||||
|
padding: 3rpx 5rpx;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -202,8 +202,15 @@ export default {
|
|||||||
natureIndex: 0,
|
natureIndex: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(data) {
|
||||||
// 没有数据 需要赋值一下初始化
|
// 没有数据 需要赋值一下初始化
|
||||||
|
if(data && data.hasOwnProperty("userInfo")){
|
||||||
|
let thisUserInfoObj = JSON.parse(data.userInfo)
|
||||||
|
console.log("thisUserInfoObj",thisUserInfoObj)
|
||||||
|
this.userInfo.cusName = thisUserInfoObj.cusName
|
||||||
|
this.userInfo.sex = thisUserInfoObj.sex
|
||||||
|
this.userInfo.phoneNumber = thisUserInfoObj.phoneNumber
|
||||||
|
}
|
||||||
this.bo1 = false;
|
this.bo1 = false;
|
||||||
this.bo2 = true;
|
this.bo2 = true;
|
||||||
this.pageTitle = '添加车辆信息'
|
this.pageTitle = '添加车辆信息'
|
||||||
|
Loading…
Reference in New Issue
Block a user