| | |
| | | <template #right-icon v-else class="chuany-flex"> |
| | | <template class="" v-if="item.workPrice&&!item.showEdit"> |
| | | <up-text type="error" |
| | | :text="item.workerType==0?`${item.workPrice}元/小时`:`${item.workPrice}元/件` " |
| | | :text="detailItem.workerType==0?`${item.workPrice}元/小时`:`${item.workPrice}元/件` " |
| | | size='14'></up-text> |
| | | <up-icon name="edit-pen" @click='isShow(item)'></up-icon> |
| | | </template> |
| | |
| | | }) |
| | | } |
| | | const manageOrder = (item) => { |
| | | |
| | | let obj = { |
| | | orderId: item.id |
| | | } |
| | | isLoading.value = true |
| | | if (item.isEn) { |
| | | $api.deleteOrder(obj).then(res => { |
| | | if (res.code == 1) { |
| | | $util.showToast({ |
| | | title: '下架成功!' |
| | | }) |
| | | getOrder(orderIdVal) |
| | | } else { |
| | | $util.showToast({ |
| | | title: res.error |
| | | }) |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认下架该工作吗?下架后将删除相关数据!', |
| | | success: function(res) { |
| | | if (res.confirm) { |
| | | // 执行确认后的操作 |
| | | isLoading.value = true |
| | | $api.deleteOrder(obj).then(req => { |
| | | if (req.code == 1) { |
| | | $util.showToast({ |
| | | title: '下架成功!' |
| | | }) |
| | | getOrder(orderIdVal) |
| | | } else { |
| | | $util.showToast({ |
| | | title: req.error |
| | | }) |
| | | } |
| | | isLoading.value = false |
| | | }) |
| | | } else { |
| | | // 执行取消后的操作 |
| | | } |
| | | } |
| | | isLoading.value = false |
| | | }) |
| | | } else { |
| | | item.OldId = item.id |
| | | item.id = 0 |
| | | $api.saveOrder(item).then(res => { |
| | | if (res.code == 1) { |
| | | $util.showToast({ |