diff --git a/components/orderCard.vue b/components/orderCard.vue
index 9667edb..8517283 100644
--- a/components/orderCard.vue
+++ b/components/orderCard.vue
@@ -71,7 +71,7 @@
作废
- 添加项目
+ 修改项目
diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue
index 1886d41..695a4c8 100644
--- a/pages-home/home/home.vue
+++ b/pages-home/home/home.vue
@@ -111,6 +111,11 @@
+
+
+
+
-
- 单据类型
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/pages-order/choosePeople/choosePeople.vue b/pages-order/choosePeople/choosePeople.vue
index cc74230..9c92769 100644
--- a/pages-order/choosePeople/choosePeople.vue
+++ b/pages-order/choosePeople/choosePeople.vue
@@ -285,7 +285,7 @@ export default {
}else if (this.type == 'xs') {
if (this.checkedUserId == '' && this.checkedUserName == '') {
uni.showToast({
- title: '请选择销售人员!',
+ title: '请选择服务顾问!',
icon: 'none'
})
} else {
@@ -302,7 +302,7 @@ export default {
data: param
}).then((res) => {
uni.showToast({
- title: '选择销售人员成功!',
+ title: '选择服务顾问成功!',
icon: 'none'
})
setTimeout(() => {
diff --git a/pages-order/orderDetail/orderDetail.vue b/pages-order/orderDetail/orderDetail.vue
index ab503a1..19371da 100644
--- a/pages-order/orderDetail/orderDetail.vue
+++ b/pages-order/orderDetail/orderDetail.vue
@@ -28,7 +28,7 @@
@@ -119,8 +119,8 @@
维修项目
-
-
+
+
{{ item.itemName }}
¥{{ item.itemMoney }}
@@ -146,7 +146,7 @@
- 销售人员
+ 服务顾问
{{item.saleName || ""}}
@@ -156,7 +156,7 @@
-
+
@@ -206,12 +206,12 @@
维修进度记录表
-
-
-
-
-
-
+
+ 待维修
+ 维修中
+ 已完成
+
+
@@ -321,7 +321,7 @@ import {bus} from "@/utils/eventBus";
import request from '@/utils/request';
import upload from '@/utils/upload'
import {getOrderStatusText,formatDate,formatTimestamp,getDictTextByCodeAndValue,saveTicketsRecords} from "@/utils/utils";
-import {getUserInfo,setJSONData,setStorageWithExpiry,getStorageWithExpiry} from '@/utils/auth'
+import {getUserInfo,setJSONData,getJSONData,setStorageWithExpiry,getStorageWithExpiry} from '@/utils/auth'
import config from '@/config'
export default {
components: {
@@ -375,16 +375,31 @@ export default {
//是否是通知客户取车操作,默认都不是
ifCallCus:false,
//维修项目进度记录表
- tableData:[],
- active: 1,
+ // tableData:[],
+ active: -1,
+ doingActive: -1,
+ //维修项目进度记录表
list2: [],
//通知客户取车联系人对象
callServiceInfo:{
name:"",
tel:""
},
+ //删除的项目id
+ delProjId:[],
};
},
+ watch: {
+// demo 是要深度监听的值
+ ticketInfo: {
+ handler(newVal, oldVal) {
+ console.log(newVal, "有变化");
+ setJSONData("projects",newVal.projects)
+ },
+ // 开启深度监听
+ deep: true
+ }
+ },
onLoad(data) {
this.loginUser = getUserInfo()
this.canSeeMoney = !this.loginUser.roleCodes.includes('repair_staff');
@@ -406,6 +421,16 @@ export default {
this.waresByTicket()
},
methods: {
+ /**
+ * 删除项目
+ */
+ delProj(id,index){
+ this.delProjId.push(id)
+ //从缓存中移除
+ this.$nextTick(()=>{
+ this.ticketInfo.projects.splice(index,1)
+ })
+ },
/**
* 监听输入框
*/
@@ -424,6 +449,7 @@ export default {
item.itemMoney = item.itemPrice*item.itemCount*item.itemDiscount
}
})
+ // setJSONData("projects",this.ticketInfo.projects)
console.log(item,"item")
},
/**
@@ -487,7 +513,7 @@ export default {
request({
url: '/admin-api/repair/titem/updateRepairItem',
method: 'PUT',
- data:this.ticketInfo.projects
+ data:{"itemList":this.ticketInfo.projects,"delProjIdList":this.delProjId,"ticketId":this.ticketId}
}).then((res) => {
if(res.code==200){
uni.showToast({
@@ -832,9 +858,12 @@ export default {
let thisObj = res.data[i]
thisObj.title = thisObj.itemName
if(thisObj.itemStatus=='03'){
- //这个项目已处理完毕,维修完成的项目设置为这个
+ //这个项目已处理完毕,
endIndex = i
thisObj.desc = formatTimestamp(thisObj.updateTime)
+ }else if(thisObj.itemStatus=='02'){
+ //正在处理中
+ this.doingActive = i
}
this.list2.push(thisObj)
}
@@ -885,6 +914,23 @@ export default {
item.createTime = formatTimestamp(item.createTime)
})
}
+ //从缓存中获取项目的信息替换掉
+ let projects = getJSONData("projects")
+ let projectMap = new Map();
+ if(projects){
+ //转key value形式
+ projects.map((item)=>{
+ projectMap.set(item.id,item)
+ })
+ resultObj.projects = resultObj.projects.map((item)=>{
+ if(projectMap.has(item.id)){
+ console.log(projectMap.get(item.id))
+ return projectMap.get(item.id)
+ }else{
+ return item
+ }
+ })
+ }
this.$nextTick(()=>{
this.ticketInfo = resultObj
//判断当前角色及工单状态显示操作按钮
@@ -1193,6 +1239,7 @@ export default {
gap: 20rpx;
.tushi-box{
+ font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
@@ -1275,7 +1322,12 @@ export default {
padding: 0 20rpx;
background: #F2F2F7;
border-radius: 4rpx 4rpx 4rpx 4rpx;
-
+ position: relative;
+ .del-proj-box{
+ position: absolute;
+ top: -10px;
+ right: -10px;
+ }
.projEditLine1 {
display: flex;
align-items: center;
diff --git a/uni_modules/uni-steps/components/uni-steps/uni-steps.vue b/uni_modules/uni-steps/components/uni-steps/uni-steps.vue
index 11fb29c..6117006 100644
--- a/uni_modules/uni-steps/components/uni-steps/uni-steps.vue
+++ b/uni_modules/uni-steps/components/uni-steps/uni-steps.vue
@@ -4,10 +4,27 @@
- {{item.title}}
+ {{item.title}}
{{item.desc}}
+
+
+
+
+
+
+
+
+
+ 发送给客户
+ 发送给客户
+
+
+
@@ -17,12 +34,18 @@
:class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--before':'uni-steps__row-line--before']"
:style="{backgroundColor:index<=active&&index!==0?activeColor:index===0?'transparent':deactiveColor}">
-
-
-
+
+
+
+
+
+ {{index+1}}
+
+ :style="{backgroundColor:index<=active?activeColor:deactiveColor}" >
+ {{index+1}}
+
@@ -44,7 +67,7 @@
* @property {String} activeColor 选中状态的颜色
* @property {Array} options 数据源,格式为:[{title:'xxx',desc:'xxx'},{title:'xxx',desc:'xxx'}]
*/
-
+ import config from '@/config'
export default {
name: 'UniSteps',
props: {
@@ -53,6 +76,11 @@
type: String,
default: 'row'
},
+ canOpenCus: {
+ // 是否可以操作发送给客户
+ type: Boolean,
+ default: false
+ },
activeColor: {
// 激活状态颜色
type: String,
@@ -63,10 +91,20 @@
type: String,
default: '#B7BDC6'
},
+ doingColor: {
+ // 进行中颜色
+ type: String,
+ default: '#E8A321'
+ },
active: {
- // 当前步骤
+ // 当前已经处理完的步骤
type: Number,
- default: 0
+ default: -1
+ },
+ doingActive: {
+ // 当前正在处理的步骤
+ type: Number,
+ default: -1
},
activeIcon: {
// 当前步骤
@@ -83,6 +121,7 @@
data() {
return {
heightArr: [],
+ imgUrlPrex:config.baseImageUrl,
}
},
mounted() {
@@ -95,6 +134,14 @@
}).exec()
}
},
+ methods:{
+ prviewImage(itemList,index){
+ this.$emit("prviewImage",itemList,index)
+ },
+ sendCusImgManage(itemList){
+ this.$emit("sendCusImgManage",itemList)
+ },
+ }
}
@@ -164,15 +211,15 @@
}
.uni-steps__row-title {
- font-size: 14px;
- line-height: 16px;
+ font-size: 28rpx;
+ line-height: 32rpx;
text-align: center;
}
.uni-steps__column-title {
- font-size: 18px;
+ font-size: 28rpx;
text-align: left;
- line-height: 24px;
+ line-height: 32rpx;
}
.uni-steps__row-desc {
@@ -182,9 +229,9 @@
}
.uni-steps__column-desc {
- font-size: 16px;
+ font-size: 25rpx;
text-align: left;
- line-height: 20px;
+ line-height: 32rpx;
}
.uni-steps__row-container {
@@ -253,16 +300,17 @@
}
.uni-steps__row-circle {
- width: 15px;
- height: 15px;
+ width: 20px;
+ height: 20px;
border-radius: 50%;
background-color: #B7BDC6;
margin: 0px 3px;
}
.uni-steps__column-circle {
- width: 15px;
- height: 15px;
+ width: 20px;
+ height: 20px;
+ text-align: center;
border-radius: 50%;
background-color: #B7BDC6;
margin: 4px 0px 5px 0px;
@@ -277,4 +325,31 @@
line-height: 14px;
margin: 2px 0px;
}
+ .projImg {
+ width: 100%;
+ display: grid;
+ grid-template-columns: repeat(auto-fill, 120rpx);
+ justify-content: space-between;
+ gap: 20rpx;
+ padding: 20rpx 0;
+
+ .projImgItem {
+ width: 120rpx;
+ height: 120rpx;
+ background-color: #efefef;
+ }
+ }
+
+ .projSend {
+ display: flex;
+ align-items: center;
+ font-weight: 500;
+ font-size: 28rpx;
+ column-gap: 8rpx;
+ }
+ .projIcon{
+ width: 28rpx;
+ height: 28rpx;
+ }
+