|
@@ -15,7 +15,8 @@
|
|
|
<uni-easyinput prefixIcon="search" v-model="searchVal" placeholder="请输入姓名" />
|
|
|
</view>
|
|
|
<button type="primary" @click="handleSearch" class="search-button">搜 索</button>
|
|
|
- <button type="primary" :disabled="workStatus==='1'?false:true" @click="handleRefresh" :class="workStatus==='1'?'refresh':'refresh active'">一键释放</button>
|
|
|
+ <button type="primary" v-if="s=='1'" :disabled="workStatus==='1'?false:true" @click="handleRefresh" :class="workStatus==='1'?'refresh':'refresh active'">{{ccc}}</button>
|
|
|
+ <button type="primary" v-else @click="handleRelease" :class="'refresh'">完成</button>
|
|
|
</view>
|
|
|
<view v-else class="history">
|
|
|
<view class="searchchoice">
|
|
@@ -82,7 +83,7 @@
|
|
|
@scrolltolower="loadMoreList"
|
|
|
>
|
|
|
<template v-for="(v,i) in orderList" :key="i">
|
|
|
- <orderCard v-if="v" :v="v" :work-Status="workStatus" :index="i" :c=tabActive class="order-card"
|
|
|
+ <orderCard v-if="v" :s="s" :v="v" :work-Status="workStatus" :index="i" :c=tabActive class="order-card"
|
|
|
@emit-select="emitSelect"
|
|
|
/>
|
|
|
</template>
|
|
@@ -165,6 +166,9 @@ const total = ref(0)
|
|
|
const pageSize = ref(10)
|
|
|
const status = ref('')
|
|
|
|
|
|
+const s = ref('1')
|
|
|
+const ccc = ref('一键释放')
|
|
|
+
|
|
|
const ids = ref([])
|
|
|
|
|
|
const today =ref({
|
|
@@ -298,13 +302,41 @@ const handleRefresh = async()=>{
|
|
|
// }})
|
|
|
|
|
|
// console.log('yijianshifang >orderList>>666',ids)
|
|
|
+ s.value = '0'
|
|
|
+ // ccc.value = '完成'
|
|
|
+ // const params = {
|
|
|
+ // token: uni.getStorageSync('token'),
|
|
|
+ // data:{ids:ids.value.toString()}
|
|
|
+ // }
|
|
|
+ // console.log('handleRefresh >params>>666',params)
|
|
|
+ // const {data:res} = await releaseOrder(params)
|
|
|
+
|
|
|
+ // if (res.code === 200) {
|
|
|
+ // if(ids.value.length>0){
|
|
|
+ // console.log('ids.value',ids.value)
|
|
|
+ // ids.value.forEach(x=>{
|
|
|
+ // console.log('orderList',orderList.value)
|
|
|
+ // const index = orderList.value.findIndex(y=>y.id == x)
|
|
|
+ // console.log('orderList index',index)
|
|
|
+ // if(index>-1){
|
|
|
+ // console.log('orderList',orderList.value)
|
|
|
+ // orderList.value.splice(index,1)
|
|
|
+ // console.log('orderList',orderList.value)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // ids.value = []
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+}
|
|
|
+
|
|
|
+const handleRelease = async()=>{
|
|
|
const params = {
|
|
|
token: uni.getStorageSync('token'),
|
|
|
data:{ids:ids.value.toString()}
|
|
|
}
|
|
|
console.log('handleRefresh >params>>666',params)
|
|
|
const {data:res} = await releaseOrder(params)
|
|
|
-
|
|
|
+
|
|
|
if (res.code === 200) {
|
|
|
if(ids.value.length>0){
|
|
|
console.log('ids.value',ids.value)
|