|
@@ -125,12 +125,18 @@
|
|
|
'color': '#3874F6',
|
|
'color': '#3874F6',
|
|
|
}" frontIcon="icon-bodadianhua1" text="电话" :phonenumber="detail.customerphonenumber" />
|
|
}" frontIcon="icon-bodadianhua1" text="电话" :phonenumber="detail.customerphonenumber" />
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="but-box-item" @click="takeOrderShow = true">
|
|
|
|
|
|
|
+ <view class="but-box-item" v-if="detail.team.length" @click="takeOrderShow = true">
|
|
|
<My-button frontIcon="icon-jiedan" text="接单" />
|
|
<My-button frontIcon="icon-jiedan" text="接单" />
|
|
|
<up-modal negativeTop="100" :show="takeOrderShow" title="是否确认接单?" showCancelButton
|
|
<up-modal negativeTop="100" :show="takeOrderShow" title="是否确认接单?" showCancelButton
|
|
|
@confirm="takeOrders" @cancel="takeOrderShow = false" ref="uModal"
|
|
@confirm="takeOrders" @cancel="takeOrderShow = false" ref="uModal"
|
|
|
:asyncClose="true"></up-modal>
|
|
:asyncClose="true"></up-modal>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="but-box-item" v-else @click="takeOrderShow = true">
|
|
|
|
|
+ <My-button frontIcon="icon-jiedan" text="抢单" />
|
|
|
|
|
+ <up-modal negativeTop="100" :show="takeOrderShow" title="是否确认抢单?" showCancelButton
|
|
|
|
|
+ @confirm="snatchingOrders" @cancel="takeOrderShow = false" ref="uModal"
|
|
|
|
|
+ :asyncClose="true"></up-modal>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 底部按钮 -->
|
|
<!-- 底部按钮 -->
|
|
|
<view v-else-if="detail.status == '待开始'" class="but-box">
|
|
<view v-else-if="detail.status == '待开始'" class="but-box">
|
|
@@ -317,6 +323,32 @@ function takeOrders() {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function snatchingOrders() {
|
|
|
|
|
+ $Http.basic({
|
|
|
|
|
+ "id": "2025101710510903",
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "sa_workorderid": detail.sa_workorderid,
|
|
|
|
|
+ "projectlearders": [wx.getStorageSync('userMsg').userid],
|
|
|
|
|
+ ismanage: 0 // 用于避免多次抢单
|
|
|
|
|
+ },
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.code == 1) {
|
|
|
|
|
+ console.log("抢单结果", res)
|
|
|
|
|
+ takeOrderShow.value = false;
|
|
|
|
|
+ getDetail();
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '抢单成功',
|
|
|
|
|
+ icon: 'none'
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (res.msg) uni.showToast({
|
|
|
|
|
+ title: res.msg,
|
|
|
|
|
+ icon: 'none'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function toCMTips() {
|
|
function toCMTips() {
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
confirmText: '前去修改',
|
|
confirmText: '前去修改',
|