多个可操作内容时只显示一个订单

This commit is contained in:
xiaofajia 2024-12-09 15:23:47 +08:00
parent 061e9dd9ba
commit 924df8f602
3 changed files with 61 additions and 12 deletions

View File

@ -6,14 +6,14 @@
<uni-icons type="left" size="18"></uni-icons> <uni-icons type="left" size="18"></uni-icons>
</view> </view>
<view class="t-title"> <view class="t-title">
<text>选择检测项目</text> <text>选择检测内容</text>
</view> </view>
<view class="t-you"></view> <view class="t-you"></view>
</view> </view>
<view class="cont_box"> <view class="cont_box">
<view class="title_"> <view class="title_">
可选检测项目 可选检测内容
</view> </view>
<view class="box_"> <view class="box_">
<view class="box_button " :class="{ 'box_button_x' :isItemSelected(item) }" <view class="box_button " :class="{ 'box_button_x' :isItemSelected(item) }"
@ -22,7 +22,7 @@
</view> </view>
<view class="title_"> <view class="title_">
已选检测项目 已选检测内容
</view> </view>
<view style="margin-bottom: 15px;" v-for="(item,index) in selectProject" :key="index"> <view style="margin-bottom: 15px;" v-for="(item,index) in selectProject" :key="index">
<view class="steps_"> <view class="steps_">

View File

@ -6,14 +6,14 @@
<uni-icons type="left" size="18"></uni-icons> <uni-icons type="left" size="18"></uni-icons>
</view> </view>
<view class="t-title"> <view class="t-title">
<text>选择检测项目</text> <text>选择检测内容</text>
</view> </view>
<view class="t-you"></view> <view class="t-you"></view>
</view> </view>
<view class="cont_box"> <view class="cont_box">
<view class="title_"> <view class="title_">
可选检测项目 可选检测内容
</view> </view>
<view class="box_"> <view class="box_">
<view class="box_button " :class="{ 'box_button_x' :isItemSelected(item) }" <view class="box_button " :class="{ 'box_button_x' :isItemSelected(item) }"
@ -22,7 +22,7 @@
</view> </view>
<view class="title_"> <view class="title_">
已选检测项目 已选检测内容
</view> </view>
<view style="margin-bottom: 15px;" v-for="(item,index) in selectProject" :key="index"> <view style="margin-bottom: 15px;" v-for="(item,index) in selectProject" :key="index">
<view class="steps_"> <view class="steps_">

View File

@ -39,7 +39,7 @@
<view class="top-left"> <view class="top-left">
<view class="dhei">{{ item.goodsName }}</view> <view class="dhei">{{ item.goodsName }}</view>
<text class="xhui">接待人{{ item.workerName }}</text> <text class="xhui">接待人{{ item.workerName }}</text>
<text class="xhui" style="margin-left: 50rpx;">检测项目{{ item.projectName }}</text> <text class="xhui" style="margin-left: 50rpx;">检测内容{{ item.projectName }}</text>
</view> </view>
<view @click="callUser(item.buyPhone)" class="top-right"> <view @click="callUser(item.buyPhone)" class="top-right">
<image src="../../static/detection/teel.png" mode=""></image> <image src="../../static/detection/teel.png" mode=""></image>
@ -73,7 +73,8 @@
</view> </view>
<view class="bottom-di"> <view class="bottom-di">
<view class="button-container"> <view class="button-container">
<u-button class="button" v-if="item.workNodeStatus === '0'" @click="orderTaking(item)" size="10">同意 <u-button class="button" v-if="item.workNodeStatus === '0'" @click="orderTakingBefore(item)" size="10">
开始检测
</u-button> </u-button>
<u-button class="button" v-if="item.workNodeStatus === '1'" @click="cancelAnOrder(item)" size="10"> <u-button class="button" v-if="item.workNodeStatus === '1'" @click="cancelAnOrder(item)" size="10">
取消接单 取消接单
@ -87,6 +88,11 @@
</view> </view>
</view> </view>
<view class="lanniu-container2">
<u-picker :show="show" :columns="chooseWorkNodes" @confirm="confirms" @cancel="cancels"
keyName="label"></u-picker>
</view>
<view class="lanniu-container" v-if="isExamine"> <view class="lanniu-container" v-if="isExamine">
<view class="lanniu" @click="gogogo"> <view class="lanniu" @click="gogogo">
<text>+ 添加线下订单</text> <text>+ 添加线下订单</text>
@ -98,7 +104,6 @@
<view style="width: 100%; height: 50px;"></view> <view style="width: 100%; height: 50px;"></view>
<tabBar :msg="msg"></tabBar> <tabBar :msg="msg"></tabBar>
</view> </view>
</template> </template>
@ -137,7 +142,13 @@ export default {
text: "已完成", text: "已完成",
value: "3", value: "3",
} }
] ],
chooseWorkNodes: [],
show: false,
takingData: {
workNodeId: null,
id: null
},
} }
}, },
onLoad() { onLoad() {
@ -171,6 +182,35 @@ export default {
tabBar, tabBar,
}, },
methods: { methods: {
confirms(e) {
this.takingData.workNodeId = e.value[0].value
this.show = false
this.orderTaking(this.takingData)
},
cancels() {
this.show = false
},
//
async orderTakingBefore(item) {
this.takingData = {
workNodeId: null,
id: item.id
}
let res = await request({
url: '/partnerOwn/partner/inspectionDetail',
method: 'get',
params: {
inspectionInfoId: item.id
}
})
this.chooseWorkNodes = [res.data.workNodes.map(i => {
return {
label: i.projectName,
value: i.id
}
})]
this.show = true
},
msgInfo() { msgInfo() {
console.log(this.msgSocket, 'msgSocket') console.log(this.msgSocket, 'msgSocket')
if (this.msgSocket) { if (this.msgSocket) {
@ -481,6 +521,7 @@ export default {
font-weight: 600; font-weight: 600;
color: #FF571A; color: #FF571A;
} }
.lanniu-container { .lanniu-container {
width: 90%; width: 90%;
position: fixed; position: fixed;
@ -490,7 +531,15 @@ export default {
justify-content: space-between; /* 控制子元素之间的间距,可以改为 center/space-around */ justify-content: space-between; /* 控制子元素之间的间距,可以改为 center/space-around */
transform: translate(-50%); transform: translate(-50%);
left: 50%; left: 50%;
z-index: 9999999999999999999999999999999999999999999999999999999; z-index: 999998;
}
.lanniu-container2 {
position: fixed;
display: flex;
align-items: center;
justify-content: space-between; /* 控制子元素之间的间距,可以改为 center/space-around */
z-index: 999999;
} }
.lanniu { .lanniu {