feat(servicing): 更新订单相关功能和界面
- 添加推送服务以支持消息推送 - 优化电子签名功能,修复相关问题 - 更新订单状态处理逻辑 -重构部分代码以提高可维护性 - 调整界面样式,优化用户体验
This commit is contained in:
@ -27,7 +27,7 @@ class MainActivity : ComponentActivity() {
|
||||
.fillMaxSize()
|
||||
.clickable {
|
||||
val uri =
|
||||
"zd.assist://app?taskCode=ZD250429100095&driverName=宋志领&driverPhone=17630035658&rescueVehicle=沪88888".toUri()
|
||||
"zd.assist://app?taskCode=ZD250512100030&driverName=宋志领&driverPhone=17630035658&rescueVehicle=沪88888".toUri()
|
||||
val intent = Intent(Intent.ACTION_VIEW, uri)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ publishing {
|
||||
release(MavenPublication) {
|
||||
groupId = 'io.github.szl9'
|
||||
artifactId = 'zd_servicing'
|
||||
version = "1.0.1.9.9.57"
|
||||
version = "1.0.1.9.9.63"
|
||||
|
||||
pom {
|
||||
packaging = "aar"
|
||||
|
@ -197,6 +197,12 @@
|
||||
android:exported="false"
|
||||
android:theme="@style/Theme.Dealer" />
|
||||
|
||||
|
||||
<service
|
||||
android:name="com.za.service.jpush.PushService"
|
||||
android:enabled="true"
|
||||
android:exported="false" />
|
||||
|
||||
<service
|
||||
android:name="cn.jpush.android.service.PushService"
|
||||
android:enabled="true"
|
||||
|
@ -40,6 +40,7 @@ data class PhotoTemplateInfo(
|
||||
val lat : Float? = null,
|
||||
val lng : Float? = null,
|
||||
val address : String? = null,
|
||||
val showPingAnGiveUpPhoto: Int?=null,//值==1的时候并且符合到达现场取消就展示,其他不展示
|
||||
) {
|
||||
fun convertPhotoStatusStr(status : Int) : String {
|
||||
return when (status) {
|
||||
|
@ -11,7 +11,7 @@ import com.za.room.db.GlobalRoom
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
object RoomHelper {
|
||||
const val VERSION: Int = 38
|
||||
const val VERSION: Int = 39
|
||||
private lateinit var mContext: Context
|
||||
var db: GlobalRoom? = null
|
||||
|
||||
|
@ -7,6 +7,7 @@ import android.content.res.Configuration;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.os.BaseBundle;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
@ -116,7 +117,7 @@ public class GridPaintActivity extends BaseActivity implements View.OnClickListe
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
setThemeColor(PenConfig.THEME_COLOR);
|
||||
setThemeColor(Color.parseColor("#FF3D4B7C"));
|
||||
mPenCircleView.setOutBorderColor(PenConfig.THEME_COLOR);
|
||||
|
||||
mClearView.setEnabled(false);
|
||||
@ -303,6 +304,7 @@ public class GridPaintActivity extends BaseActivity implements View.OnClickListe
|
||||
mHandler.obtainMessage(MSG_SAVE_FAILED).sendToTarget();
|
||||
}
|
||||
bm.recycle();
|
||||
bm=null;
|
||||
}).start();
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.za.common.log.LogUtil;
|
||||
import com.za.signature.config.PenConfig;
|
||||
|
||||
import java.io.File;
|
||||
@ -216,15 +217,15 @@ public class BitmapUtil {
|
||||
fos.flush();
|
||||
return file.getAbsolutePath();
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
LogUtil.INSTANCE.print("saveImage", e);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
LogUtil.INSTANCE.print("saveImage1", e);
|
||||
} finally {
|
||||
if (fos != null) {
|
||||
try {
|
||||
fos.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
LogUtil.INSTANCE.print("saveImage2", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ import com.za.bean.request.RefuseOrderRequest
|
||||
import com.za.common.GlobalData
|
||||
import com.za.common.log.LogUtil
|
||||
import com.za.common.util.DeviceUtil
|
||||
import com.za.common.util.ImageUtil
|
||||
import com.za.net.BaseObserver
|
||||
import com.za.net.RetrofitHelper
|
||||
import com.za.service.location.ZdLocationManager
|
||||
@ -77,7 +78,7 @@ class NewOrderVm : BaseVm<NewOrderVm.Action, NewOrderVm.UiState>() {
|
||||
|
||||
if (jpushBean?.distLat != null && jpushBean.distLat != 0.0 && jpushBean.distLng != null && jpushBean.distLng != 0.0) {
|
||||
val startMarkers = MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.sv_dist_map))
|
||||
.icon(ImageUtil.vectorToBitmap(ActivityUtils.getTopActivity(), R.drawable.sv_map_dist))
|
||||
.position(LatLng(jpushBean.distLat, jpushBean.distLng))
|
||||
.title(jpushBean.distAddress)
|
||||
.snippet("目的地")
|
||||
|
@ -100,7 +100,7 @@ class ReportFloatingManager : Service() {
|
||||
|
||||
// 设置应用图标
|
||||
floatingView?.findViewById<ImageView>(R.id.floating_image)
|
||||
?.setImageResource(R.mipmap.ic_customer)
|
||||
?.setImageResource(R.drawable.sv_order_report)
|
||||
|
||||
windowManager?.addView(floatingView, params)
|
||||
animateWindowAppear()
|
||||
|
@ -24,11 +24,11 @@ import java.io.File
|
||||
class EleSignVm : IServicingVm<EleSignVm.Action, EleSignVm.UiState>() {
|
||||
private val _uiState = MutableStateFlow(UiState())
|
||||
val uiState get() = _uiState
|
||||
override fun updateState(uiState: UiState) {
|
||||
override fun updateState(uiState : UiState) {
|
||||
_uiState.value = uiState
|
||||
}
|
||||
|
||||
override fun dispatch(action: Action) {
|
||||
override fun dispatch(action : Action) {
|
||||
when (action) {
|
||||
is Action.Init -> init()
|
||||
is Action.UpdateState -> updateState(action.uiState)
|
||||
@ -40,40 +40,38 @@ class EleSignVm : IServicingVm<EleSignVm.Action, EleSignVm.UiState>() {
|
||||
|
||||
|
||||
private fun uploadOffline() {
|
||||
val eleWorkOrderBean = RoomHelper.db?.eleWorkOrderDao()?.getEleWorkOrder(getCurrentOrder()?.taskId
|
||||
?: 0)
|
||||
val eleWorkOrderBean =
|
||||
RoomHelper.db?.eleWorkOrderDao()?.getEleWorkOrder(getCurrentOrder()?.taskId ?: 0)
|
||||
if (eleWorkOrderBean == null) {
|
||||
ToastUtils.showLong("数据获取失败,请返回首页重试!")
|
||||
return
|
||||
}
|
||||
|
||||
if (uiState.value.eleWorkOrderBean?.serverCustomSignPath.isNullOrBlank()) {
|
||||
val signOfflineUpdateTaskBean = OfflineUpdateTaskBean(
|
||||
imageLocalPath = uiState.value.eleWorkOrderBean?.localCustomSignPath,
|
||||
val signOfflineUpdateTaskBean =
|
||||
OfflineUpdateTaskBean(imageLocalPath = uiState.value.eleWorkOrderBean?.localCustomSignPath,
|
||||
taskId = getCurrentOrder()?.taskId,
|
||||
taskCode = getCurrentOrder()?.taskCode,
|
||||
offlineTitle = "电子工单-客户签名照片",
|
||||
offlineType = 5
|
||||
)
|
||||
offlineType = 5)
|
||||
insertOfflineTask(signOfflineUpdateTaskBean)
|
||||
}
|
||||
|
||||
|
||||
val offlineUpdateTaskBean = OfflineUpdateTaskBean(
|
||||
taskId = getCurrentOrder()?.taskId,
|
||||
val offlineUpdateTaskBean = OfflineUpdateTaskBean(taskId = getCurrentOrder()?.taskId,
|
||||
taskCode = getCurrentOrder()?.taskCode,
|
||||
customerSignPath = uiState.value.eleWorkOrderBean?.serverCustomSignPath,
|
||||
offlineTitle = "电子工单-车况检查表",
|
||||
offlineType = 3,
|
||||
eleState = 2,
|
||||
userOrderId = getCurrentOrder()?.userOrderId
|
||||
)
|
||||
userOrderId = getCurrentOrder()?.userOrderId)
|
||||
insertOfflineTask(offlineUpdateTaskBean)
|
||||
updateCurrentEleWorkOrder(eleWorkOrderBean.copy(orderWorkStatus = 2))
|
||||
updateState(uiState.value.copy(goNextPage = UpdateTaskBean(getCurrentOrder()?.taskState), orderInfo = getCurrentOrder()))
|
||||
updateState(uiState.value.copy(goNextPage = UpdateTaskBean(getCurrentOrder()?.taskState),
|
||||
orderInfo = getCurrentOrder()))
|
||||
}
|
||||
|
||||
private fun uploadSignature(path: String) {
|
||||
private fun uploadSignature(path : String) {
|
||||
LoadingManager.showLoading()
|
||||
val eleWorkOrderBean = uiState.value.eleWorkOrderBean?.copy(localCustomSignPath = path)
|
||||
if (eleWorkOrderBean != null) {
|
||||
@ -81,8 +79,7 @@ class EleSignVm : IServicingVm<EleSignVm.Action, EleSignVm.UiState>() {
|
||||
updateState(uiState.value.copy(eleWorkOrderBean = eleWorkOrderBean))
|
||||
LogUtil.print("uploadSignature success", eleWorkOrderBean.toJson() ?: "")
|
||||
}
|
||||
CommonMethod.uploadImage(File(path),
|
||||
success = {
|
||||
CommonMethod.uploadImage(File(path), success = {
|
||||
LoadingManager.hideLoading()
|
||||
if (eleWorkOrderBean != null) {
|
||||
val temp = eleWorkOrderBean.copy(serverCustomSignPath = it)
|
||||
@ -90,16 +87,15 @@ class EleSignVm : IServicingVm<EleSignVm.Action, EleSignVm.UiState>() {
|
||||
updateState(uiState.value.copy(eleWorkOrderBean = temp))
|
||||
LogUtil.print("uploadSignature success", temp.toJson() ?: "")
|
||||
}
|
||||
},
|
||||
failed = {
|
||||
}, failed = {
|
||||
LoadingManager.hideLoading()
|
||||
LogUtil.print("uploadSignature", "failed==$it")
|
||||
})
|
||||
}
|
||||
|
||||
private fun upload() {
|
||||
val eleWorkOrderBean = RoomHelper.db?.eleWorkOrderDao()?.getEleWorkOrder(getCurrentOrder()?.taskId
|
||||
?: 0)
|
||||
val eleWorkOrderBean =
|
||||
RoomHelper.db?.eleWorkOrderDao()?.getEleWorkOrder(getCurrentOrder()?.taskId ?: 0)
|
||||
if (eleWorkOrderBean == null) {
|
||||
ToastUtils.showLong("数据获取失败,请返回首页重试!")
|
||||
return
|
||||
@ -110,35 +106,33 @@ class EleSignVm : IServicingVm<EleSignVm.Action, EleSignVm.UiState>() {
|
||||
return
|
||||
}
|
||||
|
||||
if (getCurrentOrderOfflineTask() != null) {
|
||||
if (! getCurrentOrderOfflineTask().isNullOrEmpty()) {
|
||||
uploadOffline()
|
||||
return
|
||||
}
|
||||
|
||||
if (!uiState.value.eleWorkOrderBean?.localCustomSignPath.isNullOrBlank() && uiState.value.eleWorkOrderBean?.serverCustomSignPath.isNullOrBlank()) {
|
||||
updateState(uiState.value.copy(showOfflineDialog = true))
|
||||
if (! uiState.value.eleWorkOrderBean?.localCustomSignPath.isNullOrBlank() && uiState.value.eleWorkOrderBean?.serverCustomSignPath.isNullOrBlank()) {
|
||||
showTipDialog("请先上传签名!")
|
||||
return
|
||||
}
|
||||
|
||||
val saveEleOrderRequest = SaveEleOrderRequest(
|
||||
state = 2,
|
||||
val saveEleOrderRequest = SaveEleOrderRequest(state = 2,
|
||||
userOrderId = getCurrentOrder()?.userOrderId,
|
||||
taskOrderId = getCurrentOrder()?.taskId,
|
||||
customerSignPath = uiState.value.eleWorkOrderBean?.serverCustomSignPath
|
||||
)
|
||||
customerSignPath = uiState.value.eleWorkOrderBean?.serverCustomSignPath)
|
||||
|
||||
LoadingManager.showLoading()
|
||||
RetrofitHelper.getDefaultService().saveElectronOrder(saveEleOrderRequest)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(object : BaseObserver<String>() {
|
||||
override fun doSuccess(it: String?) {
|
||||
override fun doSuccess(it : String?) {
|
||||
LoadingManager.hideLoading()
|
||||
updateCurrentEleWorkOrder(eleWorkOrderBean.copy(orderWorkStatus = 2))
|
||||
updateState(uiState.value.copy(goNextPage = UpdateTaskBean(getCurrentOrder()?.taskState), orderInfo = getCurrentOrder()))
|
||||
updateState(uiState.value.copy(goNextPage = UpdateTaskBean(getCurrentOrder()?.taskState),
|
||||
orderInfo = getCurrentOrder()))
|
||||
}
|
||||
|
||||
override fun doFailure(code: Int, msg: String?) {
|
||||
override fun doFailure(code : Int, msg : String?) {
|
||||
LoadingManager.hideLoading()
|
||||
ToastUtils.showShort(msg)
|
||||
if (code == Const.NetWorkException) {
|
||||
@ -151,15 +145,15 @@ class EleSignVm : IServicingVm<EleSignVm.Action, EleSignVm.UiState>() {
|
||||
|
||||
private fun init() {
|
||||
LoadingManager.showLoading()
|
||||
CommonMethod.queryElectronOrder(getCurrentOrder(),
|
||||
success = {
|
||||
CommonMethod.queryElectronOrder(getCurrentOrder(), success = {
|
||||
LoadingManager.hideLoading()
|
||||
val photoList = RoomHelper.db?.eleCarDamagePhotoDao()?.getEleCarDamagePhotos(getCurrentOrder()?.taskId
|
||||
?: 0)
|
||||
updateState(uiState.value.copy(eleWorkOrderBean = it, damagePhoto = photoList, orderInfo = getCurrentOrder()))
|
||||
val photoList = RoomHelper.db?.eleCarDamagePhotoDao()
|
||||
?.getEleCarDamagePhotos(getCurrentOrder()?.taskId ?: 0)
|
||||
updateState(uiState.value.copy(eleWorkOrderBean = it,
|
||||
damagePhoto = photoList,
|
||||
orderInfo = getCurrentOrder()))
|
||||
LogUtil.print("电子表单更新车辆损伤照片", "eleWorkOrderBean==${it.toJson()}")
|
||||
},
|
||||
failed = {
|
||||
}, failed = {
|
||||
LoadingManager.hideLoading()
|
||||
ToastUtils.showShort("数据加载异常,请返回重试!")
|
||||
})
|
||||
@ -167,19 +161,19 @@ class EleSignVm : IServicingVm<EleSignVm.Action, EleSignVm.UiState>() {
|
||||
|
||||
sealed class Action {
|
||||
data object Init : Action()
|
||||
data class UpdateState(val uiState: UiState) : Action()
|
||||
data class UpdateState(val uiState : UiState) : Action()
|
||||
data object Upload : Action()
|
||||
data object UploadOffline : Action()
|
||||
data class UploadSignature(val path: String) : Action()
|
||||
data class UploadSignature(val path : String) : Action()
|
||||
}
|
||||
|
||||
data class UiState(
|
||||
val orderInfo: OrderInfo? = null,
|
||||
val eleWorkOrderBean: EleWorkOrderBean? = null,
|
||||
val goNextPage: UpdateTaskBean? = null,
|
||||
val isGoNextPageDialog: Boolean? = null,
|
||||
val showCallPhoneDialog: Boolean? = null,
|
||||
val showOfflineDialog: Boolean? = null,
|
||||
val damagePhoto: List<EleCarDamagePhotoBean>? = null,
|
||||
val orderInfo : OrderInfo? = null,
|
||||
val eleWorkOrderBean : EleWorkOrderBean? = null,
|
||||
val goNextPage : UpdateTaskBean? = null,
|
||||
val isGoNextPageDialog : Boolean? = null,
|
||||
val showCallPhoneDialog : Boolean? = null,
|
||||
val showOfflineDialog : Boolean? = null,
|
||||
val damagePhoto : List<EleCarDamagePhotoBean>? = null,
|
||||
)
|
||||
}
|
@ -65,6 +65,7 @@ import com.za.ext.finish
|
||||
import com.za.ext.goNextPage
|
||||
import com.za.servicing.R
|
||||
import com.za.ui.servicing.view.InServicingHeadView
|
||||
import com.za.ui.servicing.view.ServiceOperation
|
||||
|
||||
class GoAccidentSiteActivity : BaseActivity() {
|
||||
@Composable
|
||||
@ -354,7 +355,7 @@ fun GoAccidentSiteScreen(vm : GoAccidentSiteVm = viewModel()) {
|
||||
if (order.distLat != null && order.distLat != 0.0 && order.distLng != null && order.distLng != 0.0) {
|
||||
mapView.map.addMarker(MarkerOptions().position(LatLng(order.distLat !!,
|
||||
order.distLng !!)).title("目的地")
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.sv_dist_map))
|
||||
.icon(ImageUtil.vectorToBitmap(context, R.drawable.sv_map_dist))
|
||||
.anchor(0.5f, 0.5f))
|
||||
}
|
||||
}
|
||||
@ -385,6 +386,8 @@ fun GoAccidentSiteScreen(vm : GoAccidentSiteVm = viewModel()) {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
ServiceOperation(orderInfo = uiState.value.orderInfo)
|
||||
}
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ import com.amap.api.services.route.DriveRouteResult
|
||||
import com.amap.api.services.route.RideRouteResult
|
||||
import com.amap.api.services.route.RouteSearch
|
||||
import com.amap.api.services.route.WalkRouteResult
|
||||
import com.blankj.utilcode.util.ActivityUtils
|
||||
import com.blankj.utilcode.util.ToastUtils
|
||||
import com.za.base.Const
|
||||
import com.za.base.IServicingVm
|
||||
@ -20,6 +21,7 @@ import com.za.bean.request.UpdateTaskBean
|
||||
import com.za.bean.request.UpdateTaskRequest
|
||||
import com.za.common.GlobalData
|
||||
import com.za.common.log.LogUtil
|
||||
import com.za.common.util.ImageUtil
|
||||
import com.za.ext.getNextStatus
|
||||
import com.za.ext.toJson
|
||||
import com.za.net.CommonMethod
|
||||
@ -152,7 +154,7 @@ class GoAccidentSiteVm : IServicingVm<GoAccidentSiteVm.Action, GoAccidentSiteVm.
|
||||
|
||||
if (orderInfo?.distLat != null && orderInfo.distLat != 0.0 && orderInfo.distLng != null && orderInfo.distLng != 0.0) {
|
||||
val startMarkers =
|
||||
MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.mipmap.sv_dist_map))
|
||||
MarkerOptions().icon(ImageUtil.vectorToBitmap(ActivityUtils.getTopActivity(), R.drawable.sv_map_dist))
|
||||
.position(LatLng(orderInfo.distLat !!, orderInfo.distLng !!)).visible(true)
|
||||
markers.add(startMarkers)
|
||||
}
|
||||
|
@ -68,6 +68,7 @@ import com.za.ext.finish
|
||||
import com.za.ext.goNextPage
|
||||
import com.za.servicing.R
|
||||
import com.za.ui.servicing.view.InServicingHeadView
|
||||
import com.za.ui.servicing.view.ServiceOperation
|
||||
|
||||
class GoToDestinationActivity : BaseActivity() {
|
||||
@Composable
|
||||
@ -402,7 +403,7 @@ fun GoToDestinationScreen(vm : GoToDestinationVm = viewModel()) {
|
||||
if (order.distLat != null && order.distLat != 0.0 && order.distLng != null && order.distLng != 0.0) {
|
||||
mapView.map.addMarker(MarkerOptions().position(LatLng(order.distLat !!,
|
||||
order.distLng !!)).title("目的地")
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.sv_dist_map))
|
||||
.icon(ImageUtil.vectorToBitmap(context, R.drawable.sv_map_dist))
|
||||
.anchor(0.5f, 0.5f))
|
||||
}
|
||||
}
|
||||
@ -434,6 +435,8 @@ fun GoToDestinationScreen(vm : GoToDestinationVm = viewModel()) {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
ServiceOperation(orderInfo = uiState.value.orderInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,8 @@ import com.amap.api.services.route.DriveRouteResult
|
||||
import com.amap.api.services.route.RideRouteResult
|
||||
import com.amap.api.services.route.RouteSearch
|
||||
import com.amap.api.services.route.WalkRouteResult
|
||||
import com.blankj.utilcode.util.ActivityUtils
|
||||
import com.za.common.util.ImageUtil
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.update
|
||||
@ -245,7 +247,7 @@ class GoToDestinationVm : IServicingVm<GoToDestinationVm.Action, GoToDestination
|
||||
|
||||
if (orderInfo?.distLat != null && orderInfo.distLat != 0.0 && orderInfo.distLng != null && orderInfo.distLng != 0.0) {
|
||||
val startMarkers =
|
||||
MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.mipmap.sv_dist_map))
|
||||
MarkerOptions().icon(ImageUtil.vectorToBitmap(ActivityUtils.getTopActivity(), R.drawable.sv_map_dist))
|
||||
.position(LatLng(orderInfo.distLat !!, orderInfo.distLng !!)).visible(true)
|
||||
markers.add(startMarkers)
|
||||
}
|
||||
|
@ -39,15 +39,17 @@ import com.za.base.theme.bgColor
|
||||
import com.za.base.theme.black5
|
||||
import com.za.base.theme.headBgColor
|
||||
import com.za.base.view.ChoiceMapDialog
|
||||
import com.za.base.view.CommonButton
|
||||
import com.za.base.view.CommonDialog
|
||||
import com.za.bean.db.order.OrderInfo
|
||||
import com.za.ext.callPhone
|
||||
import com.za.ext.convertToFlowName
|
||||
import com.za.ext.copy
|
||||
import com.za.servicing.R
|
||||
import com.za.ui.servicing.order_give_up.OrderGiveUpActivity
|
||||
|
||||
@Composable
|
||||
fun OrderDetailItemScreen(orderInfo: OrderInfo?) {
|
||||
fun OrderDetailItemScreen(orderInfo : OrderInfo?) {
|
||||
Column(modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.verticalScroll(state = rememberScrollState())
|
||||
@ -59,7 +61,7 @@ fun OrderDetailItemScreen(orderInfo: OrderInfo?) {
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun OrderDetailBaseInformationView(orderInfo: OrderInfo?) {
|
||||
private fun OrderDetailBaseInformationView(orderInfo : OrderInfo?) {
|
||||
val context = LocalContext.current
|
||||
val titleSize = 12.sp
|
||||
val titleColor = Color(0xFF7A7A7A)
|
||||
@ -70,12 +72,15 @@ private fun OrderDetailBaseInformationView(orderInfo: OrderInfo?) {
|
||||
CommonDialog(title = "联系客户",
|
||||
message = orderInfo?.customerName,
|
||||
confirmText = "拨打电话",
|
||||
cancelText = "取消", confirm = {
|
||||
cancelText = "取消",
|
||||
confirm = {
|
||||
showCallPhoneDialog = false
|
||||
context.callPhone(orderInfo?.customerPhone)
|
||||
}, cancel = {
|
||||
},
|
||||
cancel = {
|
||||
showCallPhoneDialog = false
|
||||
}, dismiss = {
|
||||
},
|
||||
dismiss = {
|
||||
showCallPhoneDialog = false
|
||||
})
|
||||
}
|
||||
@ -83,32 +88,59 @@ private fun OrderDetailBaseInformationView(orderInfo: OrderInfo?) {
|
||||
Column(modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(color = Color.White, shape = RoundedCornerShape(4.dp))
|
||||
.padding(10.dp), verticalArrangement = Arrangement.Top) {
|
||||
.padding(10.dp),
|
||||
verticalArrangement = Arrangement.Top) {
|
||||
Box(contentAlignment = Alignment.CenterStart) {
|
||||
Text(text = "基本信息", color = Color.Black, fontWeight = FontWeight.Medium, fontSize = 16.sp)
|
||||
Text(text = "基本信息",
|
||||
color = Color.Black,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 16.sp)
|
||||
}
|
||||
HorizontalDivider(color = black5, modifier = Modifier.padding(vertical = 10.dp))
|
||||
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(text = "合同名称", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "合同名称",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.orderSource}", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = "${orderInfo?.orderSource}",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(text = "结算类型", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "结算类型",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.settleTypeStr}", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = "${orderInfo?.settleTypeStr}",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(text = "工单编号", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "工单编号",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.taskCode}", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = "${orderInfo?.taskCode}",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
AsyncImage(model = R.drawable.sv_copy, contentDescription = "", modifier = Modifier
|
||||
AsyncImage(model = R.drawable.sv_copy,
|
||||
contentDescription = "",
|
||||
modifier = Modifier
|
||||
.size(15.dp)
|
||||
.clickable {
|
||||
orderInfo?.taskCode?.copy(context = context)
|
||||
@ -117,31 +149,56 @@ private fun OrderDetailBaseInformationView(orderInfo: OrderInfo?) {
|
||||
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(text = "客户姓名", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "客户姓名",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.customerName}",
|
||||
color = headBgColor,
|
||||
textDecoration = TextDecoration.Underline,
|
||||
fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.clickable {
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.clickable {
|
||||
showCallPhoneDialog = true
|
||||
})
|
||||
Icon(imageVector = Icons.Default.Call, contentDescription = "", tint = headBgColor, modifier = Modifier.size(10.dp))
|
||||
Icon(imageVector = Icons.Default.Call,
|
||||
contentDescription = "",
|
||||
tint = headBgColor,
|
||||
modifier = Modifier.size(10.dp))
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(text = "客户车牌号", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "客户车牌号",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.carNo}", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = "${orderInfo?.carNo}",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
AsyncImage(model = R.drawable.sv_copy, contentDescription = "", modifier = Modifier.size(15.dp))
|
||||
AsyncImage(model = R.drawable.sv_copy,
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(15.dp))
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(text = "车型", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "车型",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.carModel}", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = "${orderInfo?.carModel}",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,10 +207,11 @@ private fun OrderDetailBaseInformationView(orderInfo: OrderInfo?) {
|
||||
|
||||
|
||||
@Composable
|
||||
private fun OrderDetailServiceInformationView(orderInfo: OrderInfo?) {
|
||||
private fun OrderDetailServiceInformationView(orderInfo : OrderInfo?) {
|
||||
val titleSize = 12.sp
|
||||
val titleColor = Color(0xFF7A7A7A)
|
||||
val contentColor = Color.Black
|
||||
val context = LocalContext.current
|
||||
|
||||
// 1 事发地 2 目的地
|
||||
var showChoiceMapDialog by remember { mutableStateOf<Int?>(null) }
|
||||
@ -170,74 +228,138 @@ private fun OrderDetailServiceInformationView(orderInfo: OrderInfo?) {
|
||||
Column(modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(color = Color.White, shape = RoundedCornerShape(4.dp))
|
||||
.padding(10.dp), verticalArrangement = Arrangement.Top) {
|
||||
.padding(10.dp),
|
||||
verticalArrangement = Arrangement.Top) {
|
||||
Box(contentAlignment = Alignment.CenterStart) {
|
||||
Text(text = "服务信息", color = Color.Black, fontWeight = FontWeight.Medium, fontSize = 16.sp)
|
||||
Text(text = "服务信息",
|
||||
color = Color.Black,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 16.sp)
|
||||
}
|
||||
HorizontalDivider(color = black5, modifier = Modifier.padding(vertical = 10.dp))
|
||||
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(text = "服务类型", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "服务类型",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.serviceTypeName}", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = "${orderInfo?.serviceTypeName}",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(text = "车辆位于", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "车辆位于",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.addressProperty}", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = "${orderInfo?.addressProperty}",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.Top) {
|
||||
Text(text = "事发地", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "事发地",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.address}",
|
||||
color = headBgColor,
|
||||
textDecoration = TextDecoration.Underline,
|
||||
fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.clickable { showChoiceMapDialog = 1 })
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.clickable { showChoiceMapDialog = 1 })
|
||||
}
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.Top) {
|
||||
Text(text = "事发地备注", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "事发地备注",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.addressRemark}", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = "${orderInfo?.addressRemark}",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
|
||||
if (!orderInfo?.distAddress.isNullOrBlank()) {
|
||||
if (! orderInfo?.distAddress.isNullOrBlank()) {
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.Top) {
|
||||
Text(text = "目的地", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "目的地",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.distAddress}",
|
||||
color = headBgColor,
|
||||
textDecoration = TextDecoration.Underline,
|
||||
fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.clickable { showChoiceMapDialog = 2 })
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.clickable { showChoiceMapDialog = 2 })
|
||||
}
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.Top) {
|
||||
Text(text = "目的地备注", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "目的地备注",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.distAddressRemark}", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = "${orderInfo?.distAddressRemark}",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(text = "订单状态", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "订单状态",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = "${orderInfo?.convertToFlowName()}", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = "${orderInfo?.convertToFlowName()}",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(text = "备注", color = titleColor, fontSize = titleSize, fontWeight = FontWeight.Medium, modifier = Modifier.width(75.dp))
|
||||
Text(text = "备注",
|
||||
color = titleColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.width(75.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(text = orderInfo?.importantTip
|
||||
?: "", color = contentColor, fontSize = titleSize, fontWeight = FontWeight.Medium)
|
||||
Text(text = orderInfo?.importantTip ?: "",
|
||||
color = contentColor,
|
||||
fontSize = titleSize,
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
|
||||
CommonButton(text = "客户放弃") {
|
||||
OrderGiveUpActivity.goOrderGiveUpActivity(context,
|
||||
orderInfo = orderInfo,
|
||||
userOrderId = orderInfo?.userOrderId,
|
||||
giveUpType = 0)
|
||||
}
|
||||
|
||||
}
|
@ -1,73 +1,91 @@
|
||||
package com.za.ui.servicing.in_servicing_setting
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.horizontalScroll
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.pager.HorizontalPager
|
||||
import androidx.compose.foundation.pager.rememberPagerState
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.HorizontalDivider
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.za.base.theme.headBgColor
|
||||
import com.za.base.theme.white80
|
||||
import com.za.base.view.HeadView
|
||||
import com.za.bean.db.order.OrderInfo
|
||||
import com.za.ext.finish
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@Composable
|
||||
fun OrderDetailScreen(orderInfo: OrderInfo?) {
|
||||
fun OrderDetailScreen(orderInfo : OrderInfo?) {
|
||||
val context = LocalContext.current
|
||||
// val titleList = listOf("订单详情", "案件照片")
|
||||
val titleList = listOf("订单详情")
|
||||
val titleList = listOf("订单详情", "案件要求")
|
||||
val pagerState = rememberPagerState(initialPage = 0, pageCount = { titleList.size })
|
||||
val scope = rememberCoroutineScope()
|
||||
Scaffold(topBar = {
|
||||
HeadView(title = "案件信息", onBack = { context.finish() })
|
||||
HeadView(title = "订单信息", onBack = { context.finish() })
|
||||
}) {
|
||||
Column(modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(it)) {
|
||||
Row(modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.horizontalScroll(state = rememberScrollState())
|
||||
.height(30.dp)
|
||||
.background(color = headBgColor),
|
||||
verticalAlignment = Alignment.CenterVertically) {
|
||||
for (i in 0 until pagerState.pageCount) {
|
||||
if (pagerState.currentPage == i) {
|
||||
Column(modifier = Modifier.weight(1f),
|
||||
verticalArrangement = Arrangement.Center,
|
||||
horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Text(text = titleList[i], color = Color.White)
|
||||
HorizontalDivider(thickness = 0.dp,
|
||||
modifier = Modifier
|
||||
.width(25.dp)
|
||||
.height(3.dp)
|
||||
.background(color = Color.White,
|
||||
shape = RoundedCornerShape(8.dp)))
|
||||
}
|
||||
} else {
|
||||
Box(modifier = Modifier
|
||||
.weight(1f)
|
||||
.clickable {
|
||||
scope.launch {
|
||||
pagerState.animateScrollToPage(page = i)
|
||||
}
|
||||
}, contentAlignment = Alignment.Center) {
|
||||
Text(text = titleList[i], color = white80)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Row(modifier = Modifier
|
||||
// .fillMaxWidth()
|
||||
// .horizontalScroll(state = rememberScrollState())
|
||||
// .height(30.dp)
|
||||
// .background(color = headBgColor), verticalAlignment = Alignment.CenterVertically) {
|
||||
// for (i in 0 until pagerState.pageCount) {
|
||||
// if (pagerState.currentPage == i) {
|
||||
// Column(modifier = Modifier
|
||||
// .weight(1f),
|
||||
// verticalArrangement = Arrangement.Center,
|
||||
// horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
// Text(text = titleList[i], color = Color.White)
|
||||
// HorizontalDivider(thickness = 0.dp,
|
||||
// modifier = Modifier
|
||||
// .width(25.dp)
|
||||
// .height(3.dp)
|
||||
// .background(color = Color.White, shape = RoundedCornerShape(8.dp)))
|
||||
// }
|
||||
// } else {
|
||||
// Box(modifier = Modifier
|
||||
// .weight(1f)
|
||||
// .clickable {
|
||||
// scope.launch {
|
||||
// pagerState.animateScrollToPage(page = i)
|
||||
// }
|
||||
// }, contentAlignment = Alignment.Center) {
|
||||
// Text(text = titleList[i], color = white80)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
HorizontalPager(state = pagerState, modifier = Modifier
|
||||
HorizontalPager(state = pagerState,
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(10.dp), verticalAlignment = Alignment.CenterVertically) {
|
||||
.padding(10.dp),
|
||||
verticalAlignment = Alignment.CenterVertically) {
|
||||
when (pagerState.currentPage) {
|
||||
0 -> OrderDetailItemScreen(orderInfo = orderInfo)
|
||||
1 -> OrderPhotoScreen(orderInfo = orderInfo)
|
||||
1 -> OrderRequirementsScreen(orderInfo = orderInfo)
|
||||
2 -> OrderSettleScreen(orderInfo = orderInfo)
|
||||
3 -> OrderEleScreen(orderInfo = orderInfo)
|
||||
4 -> OrderTriceScreen(orderInfo = orderInfo)
|
||||
|
@ -18,26 +18,18 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import coil.compose.AsyncImage
|
||||
import com.za.base.theme.black5
|
||||
import com.za.base.theme.black65
|
||||
import com.za.base.view.HeadView
|
||||
import com.za.bean.db.order.OrderInfo
|
||||
import com.za.ext.finish
|
||||
import com.za.servicing.R
|
||||
|
||||
@Composable
|
||||
fun OrderRequirementsScreen(orderInfo: OrderInfo?) {
|
||||
val context = LocalContext.current
|
||||
Scaffold(topBar = {
|
||||
HeadView(title = "案件要求", onBack = {
|
||||
context.finish()
|
||||
})
|
||||
}) {
|
||||
fun OrderRequirementsScreen(orderInfo : OrderInfo?) {
|
||||
Scaffold {
|
||||
Column(modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.verticalScroll(state = rememberScrollState())
|
||||
@ -46,7 +38,7 @@ fun OrderRequirementsScreen(orderInfo: OrderInfo?) {
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
OrderRequirementsItemView(title = "特殊提醒", content = orderInfo?.otherNotes)
|
||||
OrderRequirementsItemView(title = "收费标准", content = orderInfo?.feeStandard)
|
||||
if (!orderInfo?.carModel.isNullOrBlank()) {
|
||||
if (! orderInfo?.carModel.isNullOrBlank()) {
|
||||
CarModeView(orderInfo = orderInfo)
|
||||
}
|
||||
OrderRequirementsItemView(title = "救援要求", content = orderInfo?.taskNotes)
|
||||
@ -57,79 +49,55 @@ fun OrderRequirementsScreen(orderInfo: OrderInfo?) {
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun OrderRequirementsItemView(title: String?, content: String?) {
|
||||
private fun OrderRequirementsItemView(title : String?, content : String?) {
|
||||
Column(modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 12.dp)) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
AsyncImage(
|
||||
model = R.drawable.sv_warn_red,
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
AsyncImage(model = R.drawable.sv_warn_red,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(16.dp)
|
||||
)
|
||||
modifier = Modifier.size(16.dp))
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
Text(
|
||||
text = title ?: "",
|
||||
Text(text = title ?: "",
|
||||
color = Color.Black,
|
||||
fontSize = 15.sp,
|
||||
fontWeight = FontWeight.Medium
|
||||
)
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
Text(
|
||||
text = content?.replace("<br/>", "\n\n") ?: "无",
|
||||
Text(text = content?.replace("<br/>", "\n\n") ?: "无",
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.Normal,
|
||||
color = black65,
|
||||
lineHeight = 20.sp,
|
||||
modifier = Modifier.padding(start = 24.dp)
|
||||
)
|
||||
modifier = Modifier.padding(start = 24.dp))
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
HorizontalDivider(
|
||||
color = black5,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
HorizontalDivider(color = black5, modifier = Modifier.fillMaxWidth())
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun CarModeView(orderInfo: OrderInfo?) {
|
||||
private fun CarModeView(orderInfo : OrderInfo?) {
|
||||
Column(modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 12.dp)) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
AsyncImage(
|
||||
model = R.drawable.sv_warn_red,
|
||||
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
AsyncImage(model = R.drawable.sv_warn_red,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(16.dp)
|
||||
)
|
||||
modifier = Modifier.size(16.dp))
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
Text(
|
||||
text = "车型 ${orderInfo?.carModel}",
|
||||
Text(text = "车型 ${orderInfo?.carModel}",
|
||||
color = Color.Black,
|
||||
fontSize = 15.sp,
|
||||
fontWeight = FontWeight.Medium
|
||||
)
|
||||
fontWeight = FontWeight.Medium)
|
||||
if (orderInfo?.linkToDocs == true) {
|
||||
Spacer(modifier = Modifier.width(12.dp))
|
||||
Text(
|
||||
text = "点击查看相关资料",
|
||||
Text(text = "点击查看相关资料",
|
||||
color = Color(0xFFffa500),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.Medium
|
||||
)
|
||||
fontWeight = FontWeight.Medium)
|
||||
}
|
||||
}
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
HorizontalDivider(
|
||||
color = black5,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
HorizontalDivider(color = black5, modifier = Modifier.fillMaxWidth())
|
||||
}
|
||||
}
|
@ -8,6 +8,6 @@ class ServicePeopleConfirmActivity : BaseActivity() {
|
||||
|
||||
@Composable
|
||||
override fun ContentView() {
|
||||
ServicePeopleConfirmScreen()
|
||||
ServicePeopleConfirmScreen(onBack = { this.finish() })
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.za.ui.servicing.inservice_people_confirm
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.compose.foundation.background
|
||||
@ -37,14 +38,14 @@ import com.za.base.view.CommonDialog
|
||||
import com.za.base.view.HeadView
|
||||
import com.za.common.GlobalData
|
||||
import com.za.common.log.LogUtil
|
||||
import com.za.ext.finish
|
||||
import com.za.ext.goNextPage
|
||||
import com.za.servicing.R
|
||||
import com.za.ui.camera.ZdCameraXActivity
|
||||
|
||||
@Composable
|
||||
fun ServicePeopleConfirmScreen(vm : InServicePeopleConfirmVm = viewModel(),
|
||||
success : () -> Unit = {}) {
|
||||
success : () -> Unit = {},
|
||||
onBack : () -> Unit) {
|
||||
val context = LocalContext.current
|
||||
val uiState = vm.uiState.collectAsStateWithLifecycle()
|
||||
val getResult =
|
||||
@ -60,6 +61,11 @@ fun ServicePeopleConfirmScreen(vm : InServicePeopleConfirmVm = viewModel(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BackHandler {
|
||||
onBack()
|
||||
}
|
||||
|
||||
if (uiState.value.compareResult == true) {
|
||||
vm.updateState(uiState.value.copy(compareResult = null))
|
||||
if (GlobalData.isMaster) {
|
||||
@ -93,7 +99,7 @@ fun ServicePeopleConfirmScreen(vm : InServicePeopleConfirmVm = viewModel(),
|
||||
})
|
||||
}
|
||||
|
||||
Scaffold(topBar = { HeadView(title = "身份验证", onBack = { context.finish() }) }) {
|
||||
Scaffold(topBar = { HeadView(title = "身份验证", onBack = onBack) }) {
|
||||
Column(modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(color = Color.White)
|
||||
|
@ -208,15 +208,16 @@ class ConfirmEleVm : IServicingVm<ConfirmEleVm.Action, ConfirmEleVm.UiState>() {
|
||||
return
|
||||
}
|
||||
|
||||
if (! getCurrentOrderOfflineTask().isNullOrEmpty()) {
|
||||
uploadOffline()
|
||||
return
|
||||
}
|
||||
|
||||
if (eleWorkOrderBean.localAcceptCarSignPath.isNullOrBlank() || eleWorkOrderBean.localServicePeopleSignPath.isNullOrBlank()) {
|
||||
showTipDialog("请先上传签名!")
|
||||
return
|
||||
}
|
||||
|
||||
if (! getCurrentOrderOfflineTask().isNullOrEmpty()) {
|
||||
uploadOffline()
|
||||
return
|
||||
}
|
||||
LoadingManager.showLoading()
|
||||
ZdLocationManager.getSingleLocation(success = {
|
||||
LoadingManager.hideLoading()
|
||||
|
@ -15,6 +15,7 @@ import com.za.bean.request.UpdatePhotoRequest
|
||||
import com.za.bean.request.UploadPhotoBean
|
||||
import com.za.common.GlobalData
|
||||
import com.za.common.log.LogUtil
|
||||
import com.za.ext.toJson
|
||||
import com.za.net.BaseObserver
|
||||
import com.za.net.CommonMethod
|
||||
import com.za.net.RetrofitHelper
|
||||
@ -28,11 +29,11 @@ import java.io.File
|
||||
class OrderGiveUpVm : BaseVm<OrderGiveUpVm.Action, OrderGiveUpVm.UiState>() {
|
||||
private val _uiState = MutableStateFlow(UiState())
|
||||
val uiState get() = _uiState
|
||||
override fun updateState(uiState: UiState) {
|
||||
override fun updateState(uiState : UiState) {
|
||||
_uiState.value = uiState
|
||||
}
|
||||
|
||||
override fun dispatch(action: Action) {
|
||||
override fun dispatch(action : Action) {
|
||||
when (action) {
|
||||
is Action.Init -> init()
|
||||
is Action.UpdateTask -> {
|
||||
@ -49,7 +50,7 @@ class OrderGiveUpVm : BaseVm<OrderGiveUpVm.Action, OrderGiveUpVm.UiState>() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun uploadSign(path: String?) {
|
||||
private fun uploadSign(path : String?) {
|
||||
if (path.isNullOrBlank()) {
|
||||
ToastUtils.showLong("照片路径为空,请重新签名!")
|
||||
return
|
||||
@ -60,9 +61,11 @@ class OrderGiveUpVm : BaseVm<OrderGiveUpVm.Action, OrderGiveUpVm.UiState>() {
|
||||
if (eleWorkOrderBean == null) {
|
||||
updateState(uiState.value.copy(serverServicePeopleSignPath = it))
|
||||
} else {
|
||||
val ele = eleWorkOrderBean.copy(serverServicePeopleSignPath = it, localServicePeopleSignPath = path)
|
||||
val ele = eleWorkOrderBean.copy(serverServicePeopleSignPath = it,
|
||||
localServicePeopleSignPath = path)
|
||||
RoomHelper.db?.eleWorkOrderDao()?.update(ele)
|
||||
updateState(uiState.value.copy(eleWorkOrderBean = ele, serverServicePeopleSignPath = it))
|
||||
updateState(uiState.value.copy(eleWorkOrderBean = ele,
|
||||
serverServicePeopleSignPath = it))
|
||||
}
|
||||
}, failed = {
|
||||
ToastUtils.showShort("签名上传失败,请重新签名")
|
||||
@ -70,8 +73,9 @@ class OrderGiveUpVm : BaseVm<OrderGiveUpVm.Action, OrderGiveUpVm.UiState>() {
|
||||
}
|
||||
|
||||
private fun updateTemplate() {
|
||||
val list = RoomHelper.db?.photoTemplateDao()?.getOrderPhotoTemplateFromTaskNodeAndTaskId(18100, uiState.value.orderInfo?.taskId
|
||||
?: 0)
|
||||
val list = RoomHelper.db?.photoTemplateDao()?.getOrderPhotoTemplateFromTaskNodeAndTaskId(
|
||||
18100,
|
||||
uiState.value.orderInfo?.taskId ?: 0)
|
||||
updateState(uiState.value.copy(photoTemplateList = list))
|
||||
}
|
||||
|
||||
@ -109,15 +113,14 @@ class OrderGiveUpVm : BaseVm<OrderGiveUpVm.Action, OrderGiveUpVm.UiState>() {
|
||||
picturePath = item.photoUploadPath,
|
||||
imgInfo = jsonObject.toJSONString())
|
||||
|
||||
RetrofitHelper.getDefaultService().addPhoto(request)
|
||||
.subscribeOn(Schedulers.io())
|
||||
RetrofitHelper.getDefaultService().addPhoto(request).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(object : BaseObserver<UploadPhotoBean>() {
|
||||
override fun doSuccess(it: UploadPhotoBean?) {
|
||||
override fun doSuccess(it : UploadPhotoBean?) {
|
||||
LoadingManager.hideLoading()
|
||||
}
|
||||
|
||||
override fun doFailure(code: Int, msg: String?) {
|
||||
override fun doFailure(code : Int, msg : String?) {
|
||||
LoadingManager.hideLoading()
|
||||
ToastUtils.showLong(msg)
|
||||
}
|
||||
@ -160,10 +163,9 @@ class OrderGiveUpVm : BaseVm<OrderGiveUpVm.Action, OrderGiveUpVm.UiState>() {
|
||||
}
|
||||
|
||||
LoadingManager.showLoading()
|
||||
ZdLocationManager.getSingleLocation(isNeedAddress = true,success = {
|
||||
ZdLocationManager.getSingleLocation(isNeedAddress = true, success = {
|
||||
LoadingManager.hideLoading()
|
||||
val taskRequest = GiveUpTaskRequest(
|
||||
taskId = GlobalData.currentOrder?.taskId,
|
||||
val taskRequest = GiveUpTaskRequest(taskId = GlobalData.currentOrder?.taskId,
|
||||
userId = GlobalData.driverInfoBean?.userId,
|
||||
vehicleId = GlobalData.driverInfoBean?.vehicleId,
|
||||
lat = it.latitude,
|
||||
@ -213,8 +215,7 @@ class OrderGiveUpVm : BaseVm<OrderGiveUpVm.Action, OrderGiveUpVm.UiState>() {
|
||||
LoadingManager.showLoading()
|
||||
ZdLocationManager.getSingleLocation(success = {
|
||||
LoadingManager.hideLoading()
|
||||
val taskRequest = GiveUpTaskRequest(
|
||||
taskId = GlobalData.currentOrder?.taskId,
|
||||
val taskRequest = GiveUpTaskRequest(taskId = GlobalData.currentOrder?.taskId,
|
||||
userId = GlobalData.driverInfoBean?.userId,
|
||||
vehicleId = GlobalData.driverInfoBean?.vehicleId,
|
||||
lat = it.latitude,
|
||||
@ -230,33 +231,33 @@ class OrderGiveUpVm : BaseVm<OrderGiveUpVm.Action, OrderGiveUpVm.UiState>() {
|
||||
}
|
||||
|
||||
|
||||
private fun uploadEleWorkOrder(success: () -> Unit) {
|
||||
private fun uploadEleWorkOrder(success : () -> Unit) {
|
||||
val eleWorkOrderBean = uiState.value.eleWorkOrderBean
|
||||
if (uiState.value.serverServicePeopleSignPath.isNullOrBlank()) {
|
||||
ToastUtils.showShort("请填写签名")
|
||||
return
|
||||
}
|
||||
LoadingManager.showLoading()
|
||||
val saveEleOrderRequest = SaveEleOrderRequest(
|
||||
taskOrderId = uiState.value.orderInfo?.taskId,
|
||||
val saveEleOrderRequest = SaveEleOrderRequest(taskOrderId = uiState.value.orderInfo?.taskId,
|
||||
userOrderId = uiState.value.orderInfo?.userOrderId,
|
||||
state = 3,
|
||||
hasSuccess = eleWorkOrderBean?.isSuccess,
|
||||
waitstaffSignPath = uiState.value.serverServicePeopleSignPath)
|
||||
RetrofitHelper.getDefaultService().saveElectronOrder(saveEleOrderRequest)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(object : BaseObserver<String>() {
|
||||
override fun doSuccess(it: String?) {
|
||||
override fun doSuccess(it : String?) {
|
||||
LoadingManager.hideLoading()
|
||||
if (eleWorkOrderBean != null) {
|
||||
RoomHelper.db?.eleWorkOrderDao()?.update(eleWorkOrderBean.copy(orderWorkStatus = 3))
|
||||
updateState(uiState.value.copy(eleWorkOrderBean = eleWorkOrderBean.copy(orderWorkStatus = 3)))
|
||||
RoomHelper.db?.eleWorkOrderDao()
|
||||
?.update(eleWorkOrderBean.copy(orderWorkStatus = 3))
|
||||
updateState(uiState.value.copy(eleWorkOrderBean = eleWorkOrderBean.copy(
|
||||
orderWorkStatus = 3)))
|
||||
}
|
||||
success()
|
||||
}
|
||||
|
||||
override fun doFailure(code: Int, msg: String?) {
|
||||
override fun doFailure(code : Int, msg : String?) {
|
||||
LoadingManager.hideLoading()
|
||||
LogUtil.print("订单放弃 失败", msg ?: "")
|
||||
}
|
||||
@ -264,20 +265,18 @@ class OrderGiveUpVm : BaseVm<OrderGiveUpVm.Action, OrderGiveUpVm.UiState>() {
|
||||
}
|
||||
|
||||
|
||||
private fun doGiveUpTask(request: GiveUpTaskRequest) {
|
||||
private fun doGiveUpTask(request : GiveUpTaskRequest) {
|
||||
LoadingManager.showLoading()
|
||||
RetrofitHelper.getDefaultService().giveUpTask(request)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(Schedulers.io())
|
||||
.subscribe(object : BaseObserver<String>() {
|
||||
override fun doSuccess(it: String?) {
|
||||
RetrofitHelper.getDefaultService().giveUpTask(request).subscribeOn(Schedulers.io())
|
||||
.observeOn(Schedulers.io()).subscribe(object : BaseObserver<String>() {
|
||||
override fun doSuccess(it : String?) {
|
||||
LoadingManager.hideLoading()
|
||||
updateState(uiState.value.copy(orderGiveUpSuccess = true))
|
||||
GlobalData.clearOrderCache(uiState.value.orderInfo?.taskId
|
||||
?: uiState.value.taskId ?: 0)
|
||||
}
|
||||
|
||||
override fun doFailure(code: Int, msg: String?) {
|
||||
override fun doFailure(code : Int, msg : String?) {
|
||||
LoadingManager.hideLoading()
|
||||
ToastUtils.showLong(msg)
|
||||
}
|
||||
@ -287,62 +286,82 @@ class OrderGiveUpVm : BaseVm<OrderGiveUpVm.Action, OrderGiveUpVm.UiState>() {
|
||||
// TODO("订单放弃的推送需要再加个 userOrderId的参数,否则,无法请求到照片模版")
|
||||
private fun init() {
|
||||
if (uiState.value.orderInfo != null) {
|
||||
val eleWorkOrderBean = RoomHelper.db?.eleWorkOrderDao()?.getEleWorkOrder(uiState.value.orderInfo?.taskId
|
||||
?: 0)
|
||||
val eleWorkOrderBean = RoomHelper.db?.eleWorkOrderDao()
|
||||
?.getEleWorkOrder(uiState.value.orderInfo?.taskId ?: 0)
|
||||
val photoTemplateList = RoomHelper.db?.photoTemplateDao()
|
||||
?.getOrderPhotoTemplateFromTaskNodeAndTaskId(18100, taskId = uiState.value.orderInfo?.taskId
|
||||
?: 0)
|
||||
?.getOrderPhotoTemplateFromTaskNodeAndTaskId(18100,
|
||||
taskId = uiState.value.orderInfo?.taskId ?: 0)
|
||||
if (photoTemplateList.isNullOrEmpty()) {
|
||||
CommonMethod.fetchPhotoTemplate(uiState.value.orderInfo,
|
||||
success = {
|
||||
val data = RoomHelper.db?.photoTemplateDao()?.getOrderPhotoTemplateFromTaskNode(18100,
|
||||
CommonMethod.fetchPhotoTemplate(uiState.value.orderInfo, success = {
|
||||
val data = RoomHelper.db?.photoTemplateDao()?.getOrderPhotoTemplateFromTaskNode(
|
||||
18100,
|
||||
uiState.value.orderInfo?.userOrderId ?: 0)
|
||||
updateState(uiState.value.copy(photoTemplateList = data, eleWorkOrderBean = eleWorkOrderBean))
|
||||
|
||||
updateState(uiState.value.copy(photoTemplateList = handlerData(data),
|
||||
eleWorkOrderBean = eleWorkOrderBean))
|
||||
}, failed = {
|
||||
ToastUtils.showShort(it)
|
||||
})
|
||||
} else {
|
||||
updateState(uiState.value.copy(photoTemplateList = photoTemplateList, eleWorkOrderBean = eleWorkOrderBean))
|
||||
updateState(uiState.value.copy(photoTemplateList = handlerData(photoTemplateList),
|
||||
eleWorkOrderBean = eleWorkOrderBean))
|
||||
}
|
||||
|
||||
LogUtil.print("订单放弃", "photoTemplateList==${photoTemplateList?.toJson()}")
|
||||
return
|
||||
}
|
||||
|
||||
val eleWorkOrderBean = RoomHelper.db?.eleWorkOrderDao()?.getEleWorkOrder(uiState.value.orderInfo?.taskId
|
||||
?: 0)
|
||||
val eleWorkOrderBean =
|
||||
RoomHelper.db?.eleWorkOrderDao()?.getEleWorkOrder(uiState.value.orderInfo?.taskId ?: 0)
|
||||
val photoTemplateList = RoomHelper.db?.photoTemplateDao()
|
||||
?.getOrderPhotoTemplateFromTaskNodeAndTaskId(18100, taskId = uiState.value.orderInfo?.taskId
|
||||
?: 0)
|
||||
?.getOrderPhotoTemplateFromTaskNodeAndTaskId(18100,
|
||||
taskId = uiState.value.orderInfo?.taskId ?: 0)
|
||||
if (photoTemplateList.isNullOrEmpty()) {
|
||||
CommonMethod.fetchPhotoTemplate(uiState.value.orderInfo,
|
||||
success = {
|
||||
val data = RoomHelper.db?.photoTemplateDao()?.getOrderPhotoTemplateFromTaskNodeAndTaskId(18100,
|
||||
uiState.value.taskId ?: 0)
|
||||
updateState(uiState.value.copy(photoTemplateList = data, eleWorkOrderBean = eleWorkOrderBean))
|
||||
CommonMethod.fetchPhotoTemplate(uiState.value.orderInfo, success = {
|
||||
val data = RoomHelper.db?.photoTemplateDao()
|
||||
?.getOrderPhotoTemplateFromTaskNodeAndTaskId(18100, uiState.value.taskId ?: 0)
|
||||
updateState(uiState.value.copy(photoTemplateList = handlerData(data),
|
||||
eleWorkOrderBean = eleWorkOrderBean))
|
||||
}, failed = {
|
||||
ToastUtils.showShort(it)
|
||||
})
|
||||
} else {
|
||||
updateState(uiState.value.copy(photoTemplateList = photoTemplateList, eleWorkOrderBean = eleWorkOrderBean))
|
||||
updateState(uiState.value.copy(photoTemplateList = handlerData(photoTemplateList),
|
||||
eleWorkOrderBean = eleWorkOrderBean))
|
||||
}
|
||||
|
||||
LogUtil.print("订单放弃", "photoTemplateList==${photoTemplateList?.toJson()}")
|
||||
|
||||
}
|
||||
|
||||
private fun handlerData(originDta : List<PhotoTemplateInfo>?) : List<PhotoTemplateInfo> {
|
||||
val list = arrayListOf<PhotoTemplateInfo>()
|
||||
originDta?.forEach {
|
||||
if (it.showPingAnGiveUpPhoto == 1) {
|
||||
if (uiState.value.orderInfo?.taskState == "VERIFY" || uiState.value.orderInfo?.taskState == "EXAMINE") {
|
||||
list.add(it)
|
||||
}
|
||||
} else {
|
||||
list.add(it)
|
||||
}
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
sealed class Action {
|
||||
data object Init : Action()
|
||||
data object UpdateTask : Action()
|
||||
data class UploadSign(val signPath: String?) : Action()
|
||||
data class UpdatePhotoTemplate(val photoTemplateInfo: PhotoTemplateInfo) : Action()
|
||||
data class UpdateState(val uiState: UiState) : Action()
|
||||
data class UploadSign(val signPath : String?) : Action()
|
||||
data class UpdatePhotoTemplate(val photoTemplateInfo : PhotoTemplateInfo) : Action()
|
||||
data class UpdateState(val uiState : UiState) : Action()
|
||||
}
|
||||
|
||||
data class UiState(
|
||||
val orderInfo: OrderInfo? = null,
|
||||
val taskId: Int? = null,
|
||||
val giveUpType: Int? = null,
|
||||
val serverServicePeopleSignPath: String? = null,
|
||||
val orderGiveUpSuccess: Boolean? = null,
|
||||
val isGoNextPageDialog: Boolean? = null,
|
||||
val eleWorkOrderBean: EleWorkOrderBean? = null,
|
||||
val photoTemplateList: List<PhotoTemplateInfo>? = null)
|
||||
data class UiState(val orderInfo : OrderInfo? = null,
|
||||
val taskId : Int? = null,
|
||||
val giveUpType : Int? = null,
|
||||
val serverServicePeopleSignPath : String? = null,
|
||||
val orderGiveUpSuccess : Boolean? = null,
|
||||
val isGoNextPageDialog : Boolean? = null,
|
||||
val eleWorkOrderBean : EleWorkOrderBean? = null,
|
||||
val photoTemplateList : List<PhotoTemplateInfo>? = null)
|
||||
}
|
@ -22,6 +22,7 @@ import androidx.compose.material3.TopAppBarDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.AbsoluteAlignment
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
@ -227,7 +228,11 @@ fun InServicingHeadView(title : String,
|
||||
actions = {
|
||||
Box(modifier = Modifier
|
||||
.size(39.dp)
|
||||
.clickable { showBottomSheetDialog.value = true }
|
||||
.clickable {
|
||||
OrderRequirementsActivity.goOrderRequirementsActivity(context,
|
||||
orderInfo,
|
||||
type = Const.InServiceSettingType.ORDER_DETAIL)
|
||||
}
|
||||
.padding(10.dp), contentAlignment = Alignment.Center) {
|
||||
AsyncImage(model = R.drawable.sv_setting,
|
||||
contentDescription = "",
|
||||
@ -239,6 +244,75 @@ fun InServicingHeadView(title : String,
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ServiceOperation(orderInfo : OrderInfo?) {
|
||||
val context = LocalContext.current
|
||||
val showNavigationDialog = remember { mutableStateOf(false) }
|
||||
val showCallPhoneDialog = remember { mutableStateOf(false) }
|
||||
val showCallServicePhoneDialog = remember { mutableStateOf(false) }
|
||||
|
||||
if (showNavigationDialog.value) {
|
||||
StartNavigationView(orderInfo = orderInfo, dismiss = { showNavigationDialog.value = false })
|
||||
}
|
||||
|
||||
if (showCallPhoneDialog.value) {
|
||||
CommonDialog(cancelText = "取消",
|
||||
confirmText = "确定",
|
||||
title = "是否联系客户?",
|
||||
cancelEnable = true,
|
||||
cancel = {
|
||||
showCallPhoneDialog.value = false
|
||||
},
|
||||
dismiss = { showCallPhoneDialog.value = false },
|
||||
confirm = {
|
||||
showCallPhoneDialog.value = false
|
||||
context.callPhone(orderInfo?.customerPhone)
|
||||
context.finish()
|
||||
})
|
||||
}
|
||||
|
||||
if (showCallServicePhoneDialog.value) {
|
||||
CommonDialog(cancelText = "取消",
|
||||
confirmText = "确定",
|
||||
title = "是否联系中道客服?",
|
||||
cancelEnable = true,
|
||||
cancel = {
|
||||
showCallServicePhoneDialog.value = false
|
||||
},
|
||||
dismiss = { showCallServicePhoneDialog.value = false },
|
||||
confirm = {
|
||||
showCallServicePhoneDialog.value = false
|
||||
context.callPhone(orderInfo?.hotline)
|
||||
context.finish()
|
||||
})
|
||||
}
|
||||
|
||||
Column(modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(10.dp),
|
||||
horizontalAlignment = AbsoluteAlignment.Right,
|
||||
verticalArrangement = Arrangement.Top) {
|
||||
Spacer(modifier = Modifier.height(2.dp))
|
||||
AsyncImage(model = R.drawable.sv_service_phone,
|
||||
contentDescription = "",
|
||||
modifier = Modifier
|
||||
.size(46.dp)
|
||||
.clickable { showCallServicePhoneDialog.value = true })
|
||||
Spacer(modifier = Modifier.height(2.dp))
|
||||
AsyncImage(model = R.drawable.sv_customer,
|
||||
contentDescription = "",
|
||||
modifier = Modifier
|
||||
.size(46.dp)
|
||||
.clickable { showCallPhoneDialog.value = true })
|
||||
Spacer(modifier = Modifier.height(2.dp))
|
||||
AsyncImage(model = R.drawable.sv_navigation,
|
||||
contentDescription = "",
|
||||
modifier = Modifier
|
||||
.size(46.dp)
|
||||
.clickable { showNavigationDialog.value = true })
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun StartNavigationView(orderInfo : OrderInfo?, dismiss : () -> Unit) {
|
||||
val context = LocalContext.current
|
||||
|
@ -32,6 +32,7 @@ import androidx.compose.material3.rememberStandardBottomSheetState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.DisposableEffect
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.AbsoluteAlignment
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.alpha
|
||||
@ -69,6 +70,7 @@ import com.za.ext.navigationActivity
|
||||
import com.za.servicing.R
|
||||
import com.za.ui.servicing.inservice_people_confirm.ServicePeopleConfirmActivity
|
||||
import com.za.ui.servicing.view.InServicingHeadView
|
||||
import com.za.ui.servicing.view.ServiceOperation
|
||||
|
||||
|
||||
class WaitToStartActivity : BaseActivity() {
|
||||
@ -334,9 +336,7 @@ fun WaitToStartScreen(vm : WaitToStartVm = viewModel()) {
|
||||
Box(modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(paddingValues)) {
|
||||
AndroidView(modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(bottom = 20.dp), factory = {
|
||||
AndroidView(modifier = Modifier.fillMaxSize(), factory = {
|
||||
AMapLocationClient.updatePrivacyShow(context, true, true)
|
||||
AMapLocationClient.updatePrivacyAgree(context, true)
|
||||
mapView.apply {
|
||||
@ -389,7 +389,7 @@ fun WaitToStartScreen(vm : WaitToStartVm = viewModel()) {
|
||||
if (order.distLat != null && order.distLat != 0.0 && order.distLng != null && order.distLng != 0.0 && GlobalData.currentLocation != null) {
|
||||
mapView.map.addMarker(MarkerOptions().position(LatLng(order.distLat !!,
|
||||
order.distLng !!)).title("目的地")
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.sv_dist_map))
|
||||
.icon(ImageUtil.vectorToBitmap(context, R.drawable.sv_map_dist))
|
||||
.anchor(0.5f, 0.5f))
|
||||
}
|
||||
}
|
||||
@ -425,7 +425,8 @@ fun WaitToStartScreen(vm : WaitToStartVm = viewModel()) {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
ServiceOperation(orderInfo = uiState.value.orderInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ import com.amap.api.services.route.DriveRouteResult
|
||||
import com.amap.api.services.route.RideRouteResult
|
||||
import com.amap.api.services.route.RouteSearch
|
||||
import com.amap.api.services.route.WalkRouteResult
|
||||
import com.blankj.utilcode.util.ActivityUtils
|
||||
import com.blankj.utilcode.util.ToastUtils
|
||||
import com.za.base.IServicingVm
|
||||
import com.za.base.view.LoadingManager
|
||||
@ -18,6 +19,7 @@ import com.za.bean.request.UpdateTaskBean
|
||||
import com.za.bean.request.UpdateTaskRequest
|
||||
import com.za.common.GlobalData
|
||||
import com.za.common.log.LogUtil
|
||||
import com.za.common.util.ImageUtil
|
||||
import com.za.ext.toJson
|
||||
import com.za.net.CommonMethod
|
||||
import com.za.service.location.ZdLocationManager
|
||||
@ -106,9 +108,9 @@ class WaitToStartVm : IServicingVm<WaitToStartVm.Action, WaitToStartVm.UiState>(
|
||||
|
||||
val destMarker =
|
||||
MarkerOptions().position(LatLng(orderInfo.distLat !!, orderInfo.distLng !!))
|
||||
.title(orderInfo.distAddress).snippet("目的地")
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.sv_dist_map))
|
||||
.anchor(0.5f, 0.5f).zIndex(2f).visible(true)
|
||||
.title(orderInfo.distAddress).snippet("目的地").icon(ImageUtil.vectorToBitmap(
|
||||
ActivityUtils.getTopActivity(),
|
||||
R.drawable.sv_map_dist)).anchor(0.5f, 0.5f).zIndex(2f).visible(true)
|
||||
|
||||
markers.add(destMarker)
|
||||
}
|
||||
@ -169,17 +171,16 @@ class WaitToStartVm : IServicingVm<WaitToStartVm.Action, WaitToStartVm.UiState>(
|
||||
|
||||
private var timerJob : Job? = null
|
||||
|
||||
private fun startTimer() {
|
||||
// timerJob?.cancel()
|
||||
// timerJob = viewModelScope.launch {
|
||||
// while (isActive) { // 计算从当前位置到目标点的距离和到达时间
|
||||
// val (distance, arrivalTime) = calculateRemainingDistance()
|
||||
// _uiState.update {
|
||||
// it.copy(remainingDistance = distance, estimatedArrivalTime = arrivalTime)
|
||||
// }
|
||||
// delay(1000) // 每秒更新一次
|
||||
// }
|
||||
// }
|
||||
private fun startTimer() { // timerJob?.cancel()
|
||||
// timerJob = viewModelScope.launch {
|
||||
// while (isActive) { // 计算从当前位置到目标点的距离和到达时间
|
||||
// val (distance, arrivalTime) = calculateRemainingDistance()
|
||||
// _uiState.update {
|
||||
// it.copy(remainingDistance = distance, estimatedArrivalTime = arrivalTime)
|
||||
// }
|
||||
// delay(1000) // 每秒更新一次
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private fun calculateRemainingDistance() : Pair<Float, String> {
|
||||
|
30
servicing/src/main/res/drawable/sv_customer.xml
Normal file
30
servicing/src/main/res/drawable/sv_customer.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="46dp"
|
||||
android:height="46dp"
|
||||
android:viewportWidth="46"
|
||||
android:viewportHeight="46">
|
||||
<path
|
||||
android:pathData="m9,3h28c3.324,0 6,2.676 6,6v28c0,3.324 -2.676,6 -6,6L9,43c-3.324,0 -6,-2.676 -6,-6v-28c0,-3.324 2.676,-6 6,-6z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#000000"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="m9,3h28c3.324,0 6,2.676 6,6v28c0,3.324 -2.676,6 -6,6L9,43c-3.324,0 -6,-2.676 -6,-6v-28c0,-3.324 2.676,-6 6,-6z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#fefffe"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="m15.674,28.883 l0.784,0.333q-0.247,0.306 -0.494,0.591h4.952v0.677q-0.892,1.037 -2.363,1.789 1.783,0.553 4.351,0.564 -0.29,0.419 -0.537,0.87 -2.874,-0.22 -4.77,-1.004 -2.084,0.838 -5.103,1.219 -0.183,-0.397 -0.451,-0.773 2.712,-0.274 4.608,-0.902 -1.031,-0.591 -1.67,-1.407 -0.806,0.773 -1.67,1.386 -0.236,-0.279 -0.559,-0.58 1.901,-1.3 2.922,-2.761zM14.02,33.986h7.004v3.416h-0.795v-0.451h-5.414v0.451h-0.795zM12.73,28.131h4.635q-0.29,-0.446 -0.704,-0.945l0.73,-0.462q0.43,0.494 0.892,1.096l-0.494,0.312h4.544v2.009h-0.795v-1.3h-8.014v1.289h-0.795zM20.229,34.673h-5.414v1.59h5.414zM19.777,30.495h-4.109q0.725,0.859 1.907,1.402 1.37,-0.585 2.202,-1.402zM27.684,27.208 L28.457,26.746q0.516,0.612 1.021,1.332l-0.526,0.333h4.007v4.759h-0.859v-0.559h-6.784q-0.145,3.094 -1.595,4.941 -0.29,-0.354 -0.623,-0.709 1.375,-1.676 1.375,-5.027v-3.405h4.098q-0.392,-0.602 -0.886,-1.203zM25.331,29.184v2.653h6.768v-2.653z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#606060"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M28.362,8.938C28.627,8.94 28.88,9.047 29.065,9.236L30.483,10.659C30.635,10.81 31.636,14.965 26.714,19.903C21.836,24.797 17.684,23.804 17.533,23.652L16.115,22.229C15.724,21.836 15.636,21.14 16.107,20.815L18.911,18.713C19.386,18.392 19.929,18.329 20.32,18.722L21.158,19.563C22.74,19.551 23.639,18.759 24.512,17.891L24.802,17.599C25.66,16.738 26.269,15.853 26.437,14.325L25.57,13.454C25.178,13.062 25.241,12.518 25.561,12.042L27.656,9.227C27.844,9.041 28.098,8.937 28.362,8.938ZM22.746,11.123C23.086,11.123 23.342,11.379 23.363,11.698C23.363,12.039 23.108,12.294 22.788,12.316C21.937,12.358 21.149,12.678 20.553,13.274C19.935,13.891 19.573,14.722 19.573,15.616C19.573,15.957 19.318,16.212 18.977,16.212C18.828,16.233 18.679,16.17 18.551,16.042C18.445,15.935 18.381,15.786 18.381,15.616C18.381,14.424 18.849,13.274 19.701,12.422C20.51,11.613 21.575,11.145 22.746,11.123ZM22.788,8.1C23.129,8.1 23.384,8.356 23.406,8.675C23.406,9.016 23.15,9.271 22.831,9.292C21.191,9.314 19.637,9.974 18.466,11.145C17.274,12.337 16.614,13.934 16.635,15.616C16.635,15.957 16.379,16.212 16.039,16.212C15.826,16.212 15.677,16.148 15.57,16.042C15.464,15.935 15.4,15.786 15.4,15.616C15.4,13.615 16.188,11.72 17.614,10.293C18.998,8.909 20.851,8.121 22.788,8.1Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#607182"
|
||||
android:fillType="nonZero"
|
||||
android:strokeColor="#00000000"/>
|
||||
</vector>
|
15
servicing/src/main/res/drawable/sv_map_dist.xml
Normal file
15
servicing/src/main/res/drawable/sv_map_dist.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M509.6,394.8m-294.7,0a294.7,294.7 0,1 0,589.4 0,294.7 294.7,0 1,0 -589.4,0Z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M799.9,592.9c0.8,-0.8 0.8,-1.5 1.5,-2.4l0.8,-0.8c71.8,-107.2 78.6,-245.2 17.9,-359 -60.8,-113.8 -179.3,-184.8 -308.2,-184.8 -193.4,0 -350.3,156.1 -350.3,349.5 -0.2,69.2 20.4,136.9 59.1,194.2l0.8,0.8c0.8,0.8 0.8,1.5 1.5,2.4l256.3,368.2c0,0.2 0.1,0.5 0.2,0.6 0.1,0.1 0.3,0.2 0.6,0.2v0.8c7.3,9.9 18.8,15.6 31.1,15.6 12.2,-0.1 23.7,-5.8 31.1,-15.6l0.8,-1.5L799.9,592.9zM511,127.5c147.5,0 268.1,120.6 268.1,268.1s-120.6,268.1 -268.1,268.1 -268.1,-120.6 -268.1,-268.1c0,-147.3 120.6,-268.1 268.1,-268.1zM511,127.5"
|
||||
android:fillColor="#EA5C5C"/>
|
||||
<path
|
||||
android:pathData="M326.4,542.8c-3.1,-12.3 2,-20.5 15.4,-24.6 36.9,-9.2 70.2,-21.5 100,-36.9 9.2,-3.1 17.4,-0.5 24.6,7.7 8.2,15.4 5.6,26.2 -7.7,32.3 -26.6,11.3 -60,23.6 -100,36.9 -18.4,4 -29.1,-1.1 -32.2,-15.5zM398.7,310.6h9.2c3.9,-5.3 8,-10.5 12.3,-15.4 5.1,-6.1 9.2,-11.3 12.3,-15.4 10.2,-12.3 22.1,-14.3 35.4,-6.1 9.2,10.2 10.2,20.5 3.1,30.7l-18.4,23.1c-26.6,36 -44.6,60 -53.8,72.2 -4.1,9.2 -1.6,13.3 7.7,12.3 3.1,1 8.2,0.5 15.4,-1.5 4.1,-1 7.7,-2 10.8,-3.1 11.3,-1 18.4,3.6 21.5,13.9 2,14.3 -3.1,23.1 -15.4,26.2 -12.6,4 -25.5,7.1 -38.5,9.2 -12.3,1 -23.6,1.5 -33.8,1.5 -18.4,2 -29.2,-2 -32.3,-12.3 -4.1,-7.2 -2.6,-18 4.6,-32.3 4.1,-9.2 12.7,-22.5 26.2,-39.9 7.2,-10.2 12.9,-18.4 17,-24.6h-29c-17.4,0 -25.6,-5.1 -24.6,-15.4 -1,-9.2 2.6,-21 10.8,-35.4 3.1,-4.1 11.3,-16.4 24.6,-36.9 13.4,-20.6 22.1,-33.3 26.1,-38.5 8.2,-12.3 19.5,-15.9 33.8,-10.8 11.3,7.2 14.3,15.9 9.2,26.2 -6.1,13.3 -19.5,33.8 -39.9,61.6 -4.1,4.1 -5.6,7.2 -4.6,9.2 0.7,1.9 4.3,2.4 10.5,1.4zM563.2,233.8h80c21.5,2 28.7,14.3 21.5,36.9 -11.3,39 -28.8,70.2 -52.3,93.9 17.5,15.1 37.2,27.5 58.5,36.9 16.4,9.2 22.1,20.5 17,33.8 -7.2,14.3 -20.5,15.9 -39.9,4.6 -25,-11.5 -48.4,-26.5 -69.3,-44.5 -31.7,24.6 -60.5,41.5 -86.1,50.7 -18.4,7.2 -29.7,3.6 -33.8,-10.8 -5.1,-13.3 0.5,-23.6 17,-30.7 26.4,-9.4 50.9,-23.6 72.2,-41.5 -11.4,-10.4 -21.2,-22.3 -29.2,-35.4 -2.5,2.7 -4.6,5.8 -6.1,9.2l-9.2,12.3c-10.2,11.3 -20.6,13.9 -30.8,7.7 -12.3,-7.2 -13.8,-18 -4.6,-32.3 22.8,-28 40.4,-59.7 52.3,-93.9 4.1,-13.3 12.7,-19 26.2,-17 11.3,3.2 16.8,9.8 16.8,20.1zM650.9,572.1c-46.2,-10.2 -94.3,-19.5 -144.6,-27.6 -16.4,-3.1 -22.5,-12.3 -18.4,-27.6 1,-13.3 10.2,-19 27.6,-17 69.7,12.3 116.4,21 139.9,26.2 14.3,3.1 21,11.7 20,26.2 -2,14.2 -10.2,20.9 -24.6,19.9zM601.7,487.5c-17.5,-7.3 -35.5,-13.4 -53.8,-18.4 -2.3,-0.6 -4.3,-1.6 -6.1,-3.1 -13.3,-2 -18.4,-10.2 -15.4,-24.6 2,-11.3 9.7,-16.4 23.1,-15.4 23.3,5.1 46.1,12.9 67.7,23.1 14.3,7.2 19.5,16.4 15.4,27.6 -5.2,14.3 -15.5,17.9 -30.8,10.7zM604.7,275.3h-56.9c-2.2,3.3 -3.6,6.9 -4.6,10.8 18.4,27.6 30.7,43.6 36.9,47.7 12.6,-14.2 23,-30.4 30.7,-47.7 1,-7.3 -1,-10.9 -6.1,-10.8zM604.7,275.3"
|
||||
android:fillColor="#EA5C5C"/>
|
||||
</vector>
|
@ -1,9 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="64dp"
|
||||
android:height="64dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
android:width="46dp"
|
||||
android:height="46dp"
|
||||
android:viewportWidth="46"
|
||||
android:viewportHeight="46">
|
||||
<path
|
||||
android:pathData="M850.3,173.6L596.4,826.5l-76.1,-276.5 -2.4,-8.7a48,48 0,0 0,-33.4 -33.5l-8.7,-2.4 -278.6,-77.7 653.2,-254.1M879.7,97c-5.8,0 -11.5,1 -17.1,3.2L127.1,386.3c-19,7.4 -31.1,26.1 -30.1,46.4 1,20.3 14.9,37.7 34.5,43.2l300.9,83.9a48,48 0,0 1,33.4 33.5l82.3,299c5.4,19.7 22.8,33.6 42.9,34.7l2.7,0.1c19.3,0 37,-12.1 44,-30.1l286.1,-735.5c6.8,-17.5 2.6,-37.3 -10.6,-50.6C904.1,101.8 892,97 879.7,97z"
|
||||
android:fillColor="#1296db"/>
|
||||
android:pathData="m9,3h28c3.324,0 6,2.676 6,6v28c0,3.324 -2.676,6 -6,6L9,43c-3.324,0 -6,-2.676 -6,-6v-28c0,-3.324 2.676,-6 6,-6z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#000000"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="m9,3h28c3.324,0 6,2.676 6,6v28c0,3.324 -2.676,6 -6,6L9,43c-3.324,0 -6,-2.676 -6,-6v-28c0,-3.324 2.676,-6 6,-6z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#fefffe"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="m15.008,31.623h5.629q0.87,0 0.999,-0.548 0.129,-0.451 0.236,-1.192 0.354,0.161 0.849,0.333 -0.161,0.73 -0.301,1.192 -0.279,0.967 -1.579,0.967h-6.005q-1.429,0 -1.429,-1.386v-3.609h7.713v3.266h-0.827v-0.365h-6.059v0.623q0,0.72 0.773,0.72zM12.161,33.47h7.498v-0.784h0.87v0.784h2.32v0.763h-2.32v1.751q0,1.278 -1.396,1.278 -0.526,0 -1.719,-0.011 -0.054,-0.397 -0.161,-0.924 0.988,0.075 1.633,0.075 0.773,0 0.773,-0.666v-1.504h-7.498zM14.234,28.121v1.418h6.059v-1.418zM14.181,34.824 L14.707,34.265q1.192,0.935 1.783,1.472l-0.623,0.634q-0.988,-0.945 -1.687,-1.547zM23.226,31.644h0.645v-3.62h1.112q0.14,-0.655 0.252,-1.235l0.784,0.14q-0.188,0.564 -0.36,1.096h1.606v8.153q0,1.085 -0.967,1.085 -0.612,0 -1.042,-0.032 -0.032,-0.312 -0.129,-0.741 0.548,0.075 0.988,0.075 0.419,0 0.419,-0.494v-3.695h-1.934v1.149q0,2.363 -0.881,3.835 -0.236,-0.312 -0.591,-0.602 0.741,-1.192 0.741,-3.309v-1.074h-0.645zM29.413,31.515q0,2.761 -0.269,3.824 -0.279,1.235 -1.053,2.116 -0.322,-0.408 -0.634,-0.72 0.688,-0.73 0.935,-1.826 0.247,-1.074 0.247,-3.212v-0.956h3.384v5.135q0,0.387 0.344,0.387h0.204q0.322,0 0.344,-0.58 0.043,-0.559 0.097,-1.848 0.397,0.183 0.849,0.354 -0.075,1.074 -0.14,1.815 -0.107,1.106 -0.999,1.106h-0.58q-0.892,0 -0.892,-1.053v-4.544zM26.534,28.754h-1.934v2.89h1.934zM27.651,28.529h5.865v0.795h-5.865zM24.923,33.32 L25.567,33.073q0.333,0.806 0.677,1.88l-0.666,0.247q-0.279,-0.956 -0.655,-1.88zM29.531,27.1 L30.251,26.767q0.419,0.677 0.741,1.3l-0.73,0.344q-0.322,-0.688 -0.73,-1.311zM24.923,29.582 L25.567,29.334q0.269,0.58 0.623,1.547l-0.666,0.247q-0.258,-0.838 -0.602,-1.547z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#606060"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M23.781,8.239C23.55,7.818 22.964,7.637 22.472,7.835C22.264,7.919 22.098,8.062 22,8.239L16.096,21.099C15.954,21.341 15.971,21.629 16.14,21.858C16.321,22.107 16.639,22.257 16.981,22.255C17.077,22.25 17.172,22.233 17.261,22.204L23.028,18.881L28.661,22.208L28.715,22.188C29.141,22.289 29.629,22.196 29.871,21.879C30.026,21.656 30.042,21.382 29.916,21.146L23.781,8.239Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#367EFF"
|
||||
android:fillType="nonZero"
|
||||
android:strokeColor="#00000000"/>
|
||||
</vector>
|
||||
|
48
servicing/src/main/res/drawable/sv_order_report.xml
Normal file
48
servicing/src/main/res/drawable/sv_order_report.xml
Normal file
@ -0,0 +1,48 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="46dp"
|
||||
android:height="46dp"
|
||||
android:viewportWidth="46"
|
||||
android:viewportHeight="46">
|
||||
<path
|
||||
android:pathData="m9,3h28c3.324,0 6,2.676 6,6v28c0,3.324 -2.676,6 -6,6H9C5.676,43 3,40.324 3,37V9C3,5.676 5.676,3 9,3Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#000000"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="m9,3h28c3.324,0 6,2.676 6,6v28c0,3.324 -2.676,6 -6,6H9C5.676,43 3,40.324 3,37V9C3,5.676 5.676,3 9,3Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#fefffe"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="m16.243,27.433h5.94q-0.054,1.096 -0.097,1.654 -0.075,1.332 -1.568,1.332 -0.623,0 -1.815,-0.021 -0.075,-0.408 -0.172,-0.859 1.182,0.107 1.891,0.107 0.806,0 0.859,-0.655 0.032,-0.344 0.043,-0.806h-4.243v3.072h5.167v0.741q-0.521,1.923 -1.746,3.244 0.983,0.8 2.369,1.278 -0.376,0.473 -0.623,0.795 -1.375,-0.661 -2.358,-1.504 -1.004,0.833 -2.315,1.59 -0.193,-0.322 -0.473,-0.73 1.268,-0.688 2.186,-1.439 -1.106,-1.241 -1.558,-3.223h-0.65v5.468h-0.838zM12.161,32.568q0.811,-0.226 1.568,-0.446v-2.326h-1.429v-0.741h1.429v-2.095h0.827v2.095h1.278v0.741h-1.278v2.073q0.65,-0.204 1.257,-0.408 0,0.516 0.021,0.838 -0.623,0.199 -1.278,0.414v3.4q0,1.16 -1.042,1.182 -0.43,0.011 -1.063,0 -0.064,-0.451 -0.14,-0.913 0.634,0.064 0.956,0.064 0.462,0 0.462,-0.526v-2.938q-0.714,0.231 -1.461,0.478zM21.378,32.009h-2.89q0.365,1.568 1.402,2.675 1.069,-1.123 1.488,-2.675zM24.676,32.396h7.648v5.006h-0.773v-0.473h-6.102v0.473h-0.773zM26.212,26.713 L27.018,27.057q-0.236,0.392 -0.51,0.773h5.817v0.72q-0.994,1.198 -2.675,2.089 1.778,0.596 4.243,0.725 -0.354,0.505 -0.602,0.902 -2.777,-0.333 -4.657,-1.144 -2.132,0.913 -5.151,1.434 -0.193,-0.376 -0.451,-0.773 2.664,-0.387 4.641,-1.144 -1.268,-0.736 -1.993,-1.751 -0.8,0.918 -1.81,1.767 -0.29,-0.322 -0.591,-0.591 1.923,-1.547 2.933,-3.352zM31.175,28.54h-4.818q0.865,1.031 2.272,1.697 1.515,-0.72 2.546,-1.697zM25.449,34.362h2.664v-1.321h-2.664zM31.551,33.041h-2.664v1.321h2.664zM28.887,36.285h2.664v-1.311h-2.664zM25.449,36.285h2.664v-1.311h-2.664z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#606060"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M23.064,21.341L24.973,23.182L24.917,23.222C24.856,23.262 24.794,23.295 24.73,23.322C24.634,23.37 24.494,23.428 24.31,23.496C24.126,23.565 23.933,23.631 23.731,23.696C23.53,23.761 23.339,23.817 23.158,23.865C22.977,23.913 22.842,23.944 22.753,23.957C22.569,23.978 22.446,23.95 22.385,23.875C22.323,23.8 22.306,23.674 22.333,23.496C22.347,23.401 22.379,23.263 22.431,23.082C22.482,22.901 22.537,22.713 22.595,22.518C22.653,22.324 22.709,22.144 22.764,21.981C22.818,21.817 22.863,21.704 22.897,21.643C22.938,21.547 22.984,21.46 23.035,21.381L23.064,21.341ZM27.885,16.481L29.8,18.406L27.598,20.608L26.779,21.438C26.505,21.704 26.26,21.948 26.041,22.17C25.919,22.294 25.809,22.406 25.71,22.505L23.75,20.617C23.855,20.51 23.974,20.391 24.105,20.26L24.853,19.512L25.683,18.683L27.885,16.481ZM29.826,15.001C29.925,15.004 30.02,15.019 30.112,15.047C30.205,15.074 30.285,15.105 30.353,15.139C30.496,15.214 30.655,15.345 30.829,15.533C31.003,15.721 31.138,15.917 31.234,16.122C31.261,16.183 31.283,16.255 31.3,16.337C31.317,16.419 31.326,16.504 31.326,16.593C31.326,16.682 31.309,16.771 31.275,16.859C31.241,16.948 31.186,17.034 31.111,17.116C31.029,17.197 30.956,17.269 30.891,17.331L30.8,17.418L30.722,17.494C30.667,17.549 30.616,17.597 30.568,17.638L28.653,15.723C28.735,15.647 28.832,15.557 28.945,15.451C29.057,15.345 29.151,15.262 29.226,15.2C29.322,15.125 29.421,15.072 29.523,15.041C29.626,15.011 29.727,14.997 29.826,15.001Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#607182"
|
||||
android:fillType="nonZero"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M28.75,14.251L28.75,9.75C28.75,8.829 28.004,8.083 27.083,8.083L16.667,8.083C15.746,8.083 15,8.829 15,9.75L15,22.25C15,23.171 15.746,23.917 16.667,23.917L20.917,23.917C21.046,23.917 21.186,23.834 21.258,23.671C21.247,23.637 21.601,22.651 22.321,20.713C26.607,16.434 28.75,14.28 28.75,14.251Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#607182"
|
||||
android:fillType="nonZero"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M21.875,17.417L18.125,17.417C17.779,17.417 17.5,17.082 17.5,16.667C17.5,16.252 17.779,15.917 18.125,15.917L21.875,15.917C22.221,15.917 22.5,16.252 22.5,16.667C22.5,17.082 22.221,17.417 21.875,17.417Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M18.125,12.917C17.779,12.917 17.5,12.582 17.5,12.167C17.5,11.752 17.779,11.417 18.125,11.417L25.208,11.417C25.554,11.417 25.833,11.752 25.833,12.167C25.833,12.582 25.554,12.917 25.208,12.917L18.125,12.917Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:strokeColor="#00000000"/>
|
||||
</vector>
|
36
servicing/src/main/res/drawable/sv_service_phone.xml
Normal file
36
servicing/src/main/res/drawable/sv_service_phone.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="46dp"
|
||||
android:height="46dp"
|
||||
android:viewportWidth="46"
|
||||
android:viewportHeight="46">
|
||||
<path
|
||||
android:pathData="m9,3h28c3.324,0 6,2.676 6,6v28c0,3.324 -2.676,6 -6,6L9,43C5.676,43 3,40.324 3,37L3,9c0,-3.324 2.676,-6 6,-6z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#000000"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="m9,3h28c3.324,0 6,2.676 6,6v28c0,3.324 -2.676,6 -6,6L9,43C5.676,43 3,40.324 3,37L3,9c0,-3.324 2.676,-6 6,-6z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#fefffe"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="m12.902,29.173h4.136v-2.342h0.924v2.342h4.179v4.898h-0.881v-0.58h-3.298v3.996h-0.924v-3.996h-3.255v0.58h-0.881zM21.26,29.968h-3.298v2.729h3.298zM13.783,32.697h3.255v-2.729h-3.255zM26.803,29.882h2.213l0.209,-0.935L26.19,28.948L26.19,28.239h2.02q-0.252,-0.36 -0.784,-0.999l0.623,-0.462q0.559,0.602 0.956,1.096l-0.489,0.365h1.977q0.467,-0.645 0.94,-1.429l0.816,0.419q-0.344,0.44 -0.822,1.01h2.283v0.709h-3.615l-0.274,0.935h3.104v5.854h-0.795v-0.397h-4.533v0.397h-0.795zM27.619,36.392 L30.219,36.424 33.86,36.338q-0.183,0.419 -0.354,0.827l-3.577,0.032 -2.385,-0.043q-1.805,-0.011 -2.675,-1.235 -0.312,0.247 -1.257,1.375l-0.462,-0.913q0.698,-0.623 1.354,-1.187v-3.733h-1.246v-0.784h2.063v4.7q0.779,0.967 2.299,1.015zM27.598,34.684h4.533v-0.967h-4.533zM27.598,33.083h4.533v-0.956h-4.533zM32.131,30.538h-4.533v0.956h4.533zM24.203,27.1q0.741,0.859 1.461,1.869l-0.752,0.516q-0.72,-1.117 -1.364,-1.912z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#606060"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M17.58,12.245l2.497,2.498l-1.665,1.665l-0.832,-0.833l1.148,-1.148l-1.665,-1.666l-2.813,2.814l4.162,4.161l4.995,-4.995l-2.498,-2.497l1.666,-1.665l0.832,0.832l-1.149,1.147l1.666,1.666l2.813,-2.814l-4.162,-4.162z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#607182"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M27.018,18.353L25.453,16.787L27.118,15.123L28.683,16.686L27.018,18.353ZM27.368,12.043L19.042,20.368L20.457,21.783L23.788,18.453L25.352,20.017L22.022,23.347L23.425,24.751L31.75,16.425L27.368,12.043Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#607182"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
</vector>
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="true"
|
||||
@ -19,7 +20,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center"
|
||||
android:text="请务必规范书写,否则造成的损失由您承担"
|
||||
android:text="请务必逐字正楷填写您的名字"
|
||||
android:textColor="@color/red"
|
||||
android:textSize="15.dp"
|
||||
android:textStyle="bold" />
|
||||
|
@ -8,5 +8,5 @@
|
||||
android:id="@+id/floating_image"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:src="@mipmap/ic_customer" />
|
||||
android:src="@drawable/sv_order_report" />
|
||||
</FrameLayout>
|
@ -2,9 +2,10 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:background="@color/background_bg"
|
||||
android:clipToPadding="true"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
@ -46,7 +47,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center"
|
||||
android:text="请务必规范书写,否则造成的损失由您承担"
|
||||
android:text="请务必逐字正楷填写您的名字"
|
||||
android:textColor="@color/red"
|
||||
android:textSize="15.dp"
|
||||
android:textStyle="bold" />
|
||||
@ -55,7 +56,6 @@
|
||||
android:id="@+id/bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/sign_bg_shape"
|
||||
android:gravity="center_horizontal"
|
||||
@ -72,8 +72,8 @@
|
||||
android:id="@+id/circle_container"
|
||||
android:layout_width="@dimen/sign_tool_icon_size"
|
||||
android:layout_height="@dimen/sign_tool_icon_size"
|
||||
android:visibility="gone"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.za.signature.view.CircleView
|
||||
android:id="@+id/pen_color"
|
||||
|
@ -95,7 +95,7 @@
|
||||
<color name="sign_pen_green">#0cba02</color>
|
||||
<color name="sign_pen_yellow">#f9d403</color>
|
||||
<color name="sign_pen_blue">#027de9</color>
|
||||
<color name="sign_toolbar_bg">#0c53ab</color>
|
||||
<color name="sign_toolbar_bg">#FF3D4B7C</color>
|
||||
<color name="sign_bg">#f5f5f5</color>
|
||||
|
||||
<color name="white_half_translate">#7fffffff</color>
|
||||
|
Reference in New Issue
Block a user