|
@@ -7,21 +7,46 @@
|
|
|
<navigator class="item" v-for="item in list" :key="item.sa_workorderid"
|
|
<navigator class="item" v-for="item in list" :key="item.sa_workorderid"
|
|
|
:url="'/pages/workOrder/detail?id=' + item.sa_workorderid" hover-class="navigator-hover">
|
|
:url="'/pages/workOrder/detail?id=' + item.sa_workorderid" hover-class="navigator-hover">
|
|
|
<view class="head">
|
|
<view class="head">
|
|
|
- <view class="tag" :style="{
|
|
|
|
|
- 'background': { '安装': '#E8F8D5', '维修': '#FFE2E5', '清洁': '#E2EBFF', '清洗': '#E2EBFF' }[item.type] || '#F0F0F0',
|
|
|
|
|
- 'color': { '安装': '#4B8E00', '维修': '#B00016', '清洁': '#2A5AD9', '清洗': '#2A5AD9' }[item.type] || '#333333'
|
|
|
|
|
- }">
|
|
|
|
|
- {{ item.type }}
|
|
|
|
|
|
|
+ <view style="display: flex;">
|
|
|
|
|
+ <view class="tag" :style="{
|
|
|
|
|
+ 'color': { '待接单': '#3874F6', '待开始': '#3874F6', '待服务': '#F56C6C', '进行中': '#67C23A', '提交': '#171919', '已完工': '#171919' }[item.status] || '#999999',
|
|
|
|
|
+ 'background': {
|
|
|
|
|
+ '待接单': '#E6F0FF',
|
|
|
|
|
+ '待开始': '#E6F0FF',
|
|
|
|
|
+ '待服务': '#FFECEF',
|
|
|
|
|
+ '进行中': '#F0F9EB',
|
|
|
|
|
+ '提交': '#F7F7F7',
|
|
|
|
|
+ '已完工': '#F7F7F7' // 与提交共用浅灰背景
|
|
|
|
|
+ }[item.status] || '#F5F5F5',
|
|
|
|
|
+ marginRight: '20rpx',
|
|
|
|
|
+ }">
|
|
|
|
|
+ {{ item.status }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="tag" :style="{
|
|
|
|
|
+ 'background': { '安装': '#E8F8D5', '维修': '#FFE2E5', '清洁': '#E2EBFF', '清洗': '#E2EBFF' }[item.type] || '#F0F0F0',
|
|
|
|
|
+ 'color': { '安装': '#4B8E00', '维修': '#B00016', '清洁': '#2A5AD9', '清洗': '#2A5AD9' }[item.type] || '#333333'
|
|
|
|
|
+ }">
|
|
|
|
|
+ {{ item.type }}
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="time">
|
|
<view class="time">
|
|
|
{{ item.createdate }}
|
|
{{ item.createdate }}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="address">
|
|
<view class="address">
|
|
|
- {{ item.address }}
|
|
|
|
|
|
|
+ 产品:{{ item.itemname }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="address">
|
|
|
|
|
+ 型号:{{ item.model }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="address">
|
|
|
|
|
+ 备注:{{ item.remarks || '--' }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="address">
|
|
|
|
|
+ 地址:{{ item.address }}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="user">
|
|
<view class="user">
|
|
|
- {{ item.customername + ' ' + item.customerphonenumber }}
|
|
|
|
|
|
|
+ 现场联系人:{{ item.scenecontact + ' ' + item.scenecontactphonenumber }}
|
|
|
</view>
|
|
</view>
|
|
|
<view v-if="content.where.status != '已完工'" class="but-box" @click.stop>
|
|
<view v-if="content.where.status != '已完工'" class="but-box" @click.stop>
|
|
|
<view class="but-box-item">
|
|
<view class="but-box-item">
|
|
@@ -29,7 +54,7 @@
|
|
|
'background-color': '#FFFFFF',
|
|
'background-color': '#FFFFFF',
|
|
|
'color': '#3874F6',
|
|
'color': '#3874F6',
|
|
|
height: '70rpx',
|
|
height: '70rpx',
|
|
|
- }" frontIcon="icon-bodadianhua1" text="电话" :phonenumber="item.customerphonenumber" />
|
|
|
|
|
|
|
+ }" frontIcon="icon-bodadianhua1" text="电话" :phonenumber="item.scenecontactphonenumber" />
|
|
|
</view>
|
|
</view>
|
|
|
<view v-if="content.where.status == '待接单'" class="but-box-item" @click="openModel(item)">
|
|
<view v-if="content.where.status == '待接单'" class="but-box-item" @click="openModel(item)">
|
|
|
<My-button :customStyle="{
|
|
<My-button :customStyle="{
|
|
@@ -175,22 +200,18 @@ function getBadge() {
|
|
|
})
|
|
})
|
|
|
)
|
|
)
|
|
|
).then(res => {
|
|
).then(res => {
|
|
|
- let total = 0, name = '', i = 1;
|
|
|
|
|
|
|
+ let changeCurrent = false;
|
|
|
res.forEach((v, index) => {
|
|
res.forEach((v, index) => {
|
|
|
let value = v.code !== 0 ? v.total : 0
|
|
let value = v.code !== 0 ? v.total : 0
|
|
|
tabList.value[index].badge = {
|
|
tabList.value[index].badge = {
|
|
|
value
|
|
value
|
|
|
}
|
|
}
|
|
|
- if (value == 0) {
|
|
|
|
|
- total++
|
|
|
|
|
- } else {
|
|
|
|
|
- name = tabList.value[index].name
|
|
|
|
|
- i = index;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (tabList.value[index].name == '进行中' && value == 0) changeCurrent = true;
|
|
|
})
|
|
})
|
|
|
- if (total == 2 && current.value != i) {
|
|
|
|
|
- content.where.status = name;
|
|
|
|
|
- current.value = i;
|
|
|
|
|
|
|
+ if (changeCurrent) {
|
|
|
|
|
+ let index = tabList.value.findIndex(v => v.badge.value > 0);
|
|
|
|
|
+ current.value = index == -1 ? 0 : index;
|
|
|
|
|
+ content.where.status = tabList.value[current.value].value || tabList.value[current.value].name;
|
|
|
getList(true);
|
|
getList(true);
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|