|
@@ -153,7 +153,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { onMounted, ref, getCurrentInstance } from 'vue'
|
|
|
-import { selectOrderDetail, upload, sendToUser } from "@/static/js/request.js"
|
|
|
+import { selectOrderDetail, upload, sendToUser, updateOrderStatus } from "@/static/js/request.js"
|
|
|
import { saveDepoly } from '@/static/js/api.js'
|
|
|
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
@@ -308,7 +308,7 @@ const editForm =ref({
|
|
|
userId:uni.getStorageSync('userId'),
|
|
|
comments:'',
|
|
|
weight:v.value.weight,
|
|
|
- coreId: v.value.preNo
|
|
|
+ coreId: v.value.id
|
|
|
})
|
|
|
onMounted(() => {
|
|
|
|
|
@@ -353,7 +353,8 @@ onLoad(async(options) => {
|
|
|
v.value.concentration = res.data.concentration
|
|
|
v.value.frequency = res.data.frequency
|
|
|
v.value.medicationTime = res.data.medicationTime
|
|
|
-
|
|
|
+ v.value.id = res.data.id
|
|
|
+ console.log('onLoad v.value.v.value.id', v.value.id)
|
|
|
v.value.disName = res.data.disName,
|
|
|
v.value.symName = res.data.symName,
|
|
|
v.value.preNo = res.data.preNo,
|
|
@@ -481,13 +482,20 @@ const handleSubmit = async()=>{
|
|
|
token: uni.getStorageSync('token'),
|
|
|
data: JSON.stringify({id:uni.getStorageSync('userId')})
|
|
|
})
|
|
|
+ const ret = await updateOrderStatus({
|
|
|
+ token: uni.getStorageSync('token'),
|
|
|
+ data: {
|
|
|
+ id:v.value.id,
|
|
|
+ status:'1',
|
|
|
+ }
|
|
|
+ })
|
|
|
uni.redirectTo({
|
|
|
url:"/pages/index/index"
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
// 弹窗提醒
|
|
|
- // console.log("handleSubmit proxy.$refs.alertDialog",proxy.$refs.alertDialog)
|
|
|
+ console.log("handleSubmit proxy.$refs.alertDialog",proxy.$refs.alertDialog)
|
|
|
proxy.$refs.alertDialog.open('center')
|
|
|
}
|
|
|
|
|
@@ -515,8 +523,15 @@ const dialogConfirm = async()=>{
|
|
|
url:"/pages/index/index"
|
|
|
})
|
|
|
}
|
|
|
-const dialogClose = ()=>{
|
|
|
+const dialogClose = async()=>{
|
|
|
console.log('dialogClose直接调用接口,不打印')
|
|
|
+ const ret = await updateOrderStatus({
|
|
|
+ token: uni.getStorageSync('token'),
|
|
|
+ data: {
|
|
|
+ id:v.value.id,
|
|
|
+ status:'1',
|
|
|
+ }
|
|
|
+ })
|
|
|
uni.redirectTo({
|
|
|
url:"/pages/index/index"
|
|
|
})
|