Commit f598e606 by Wyh Committed by 宁斌

6.05 自取製作完成

parent 7db7fc6d
...@@ -322,6 +322,8 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() { ...@@ -322,6 +322,8 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
// if (data.order_type == 2) { // if (data.order_type == 2) {
// 是外賣 // 是外賣
if (status == 3) { if (status == 3) {
//指派送貨,自取是製作完成
if (data.order_type == 2) {
if (orderDetails.data!![0].isDelete != 0) { if (orderDetails.data!![0].isDelete != 0) {
if (deliveryBean != null && deliveryBean!!.data.isNotEmpty()) { if (deliveryBean != null && deliveryBean!!.data.isNotEmpty()) {
selectorDelivery(listener, context, data, status, isPush) selectorDelivery(listener, context, data, status, isPush)
...@@ -332,6 +334,12 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() { ...@@ -332,6 +334,12 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
//第三方的單,執行重印功能 //第三方的單,執行重印功能
printOrder(orderDetails, data, context, listener) printOrder(orderDetails, data, context, listener)
} }
} else {
//自取
repository.gsUpdateOrderStatus(data.Id.toString(), status, data.order_type, 1, "", "", "", "0", "", 1, 0).apply {
listener.invoke(code == "1")
}
}
} else if (status == 4) { } else if (status == 4) {
//結賬,彈窗確認是否結賬 //結賬,彈窗確認是否結賬
if (orderDetails.data!![0].isDelete == 0) { if (orderDetails.data!![0].isDelete == 0) {
...@@ -599,12 +607,12 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() { ...@@ -599,12 +607,12 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
}) })
} }
fun getCancelReason(restaurantId: String, type: String){ fun getCancelReason(restaurantId: String, type: String) {
launch({ launch({
repository.getCancelReason(restaurantId, type).apply { repository.getCancelReason(restaurantId, type).apply {
} }
},{ }, {
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment