diff --git a/pages/index/index.vue b/pages/index/index.vue
index 0f012e3..e57a2e3 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -137,18 +137,18 @@
查看详情
-
-
-
-
- 转维修
-
-
-
-
-
- 查看详情
-
+
+
+
+
+ 转维修
+
+
+
+
+
+ 查看详情
+
@@ -214,6 +214,65 @@
@confirm="confirms">
+ {toRepairShow=false}">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {pinpaiShow=false}">
+ {fuwuShow=false}">
@@ -229,6 +288,15 @@
export default {
data() {
return {
+ orderData: {},
+ brandList: [],
+ staffList:[],
+ toRepairShow: false,
+ pinpaiShow: false,
+ fuwuShow: false,
+ formData:{
+ brandAndModel:[]
+ },
msgSocket: this.$msgSocket,
id: '',
value5: '',
@@ -304,6 +372,9 @@
setTimeout(() => {
this.msgInfo()
}, 2000);
+
+ this.getBrandList()
+ this.getStaffList()
},
watch: {
msgSocket(newVal, oldVal) {
@@ -334,25 +405,80 @@
components: {
tabBar,
},
- methods: {
- GOrepair(item){
- let data ={
- id: item.id
- }
- request({
- url: '/app/rescueInfo/toRepair',
- method: 'post',
- params: data
- }).then((res) => {
- if (res.code == 200) {
- uni.showToast({
- title: '操作成功'
- })
- this.singleList = []
- this.driverRescuePage()
- }
- })
+ methods: {
+ showRepair(item){
+ this.orderData = item
+ if(this.orderData.connectionName){
+ this.formData.name = this.orderData.connectionName
+ }
+ if(this.orderData.connectionPhone){
+ this.formData.phone = this.orderData.connectionPhone
+ }
+ this.toRepairShow = true
},
+ getBrandList(){
+ let data = {
+ pageSize: 1000,
+ pageNum: 1,
+ }
+ request({
+ url: '/base/carBrand/page',
+ method: 'get',
+ params: data
+ }).then((res) => {
+ console.log('list', res);
+ if (res.code == 200) {
+ this.brandList = res.data.records
+ }
+ })
+ },
+ getStaffList(){
+ let data = {
+ pageSize: 1000,
+ pageNum: 1,
+ }
+ request({
+ url: '/company/staff/list',
+ method: 'get',
+ params: data
+ }).then((res) => {
+ console.log('list', res);
+ if (res.code == 200) {
+ this.staffList = res.data
+ }
+ })
+ },
+ toRepair(){
+ let data = JSON.parse(JSON.stringify(this.formData))
+ data.id = this.orderData.id
+ console.log(data,'data');
+ request({
+ url: '/app/rescueInfo/toRepair',
+ method: 'post',
+ params: data
+ }).then((res) => {
+ if (res.code == 200) {
+ uni.showToast({
+ title: '操作成功'
+ })
+ this.toRepairShow = false
+ this.singleList = []
+ this.driverRescuePage()
+ }
+ })
+ },
+ onPinpaiConfirm(e){
+ console.log(e)
+ this.formData.brandName = e.value[0].brandName
+ this.formData.brandAndModel[0] = e.value[0].id
+ this.pinpaiShow = false
+ },
+ onFuwuConfirm(e){
+ this.formData.adviserName = e.value[0].name
+ this.formData.adviserId = e.value[0].id
+ this.formData.userId = e.value[0].userId
+ this.fuwuShow = false
+ },
jyPushStart() {
// 暂时只有安卓支持
jyJPush.registerSDKCallBack(sdkCallBack => {