| | |
| | | <up-tag class="button-layout__item c-m-l-18" text="拒绝" size="mini" type="error" |
| | | @click="selectBtn(item,false)"></up-tag> |
| | | </template> |
| | | <!-- <template #right-icon v-else class="chuany-flex"> |
| | | <up-text type="success" v-if="item.isSelected" text="已录用" size='14'></up-text> |
| | | <up-text type="error" v-else text="已拒绝" size='14'></up-text> --> |
| | | <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}元/件` " |
| | | size='14'></up-text> |
| | | <up-icon name="edit-pen" @click='isShow(item)'></up-icon> |
| | | </template> |
| | | <up-input v-model="item.workPrice" border="none" v-else type="digit"> |
| | | <template #suffix> |
| | | <up-button @tap="saveWorkPrice(item)" text="保存" type="success" |
| | | form-type="submit" size="mini"></up-button> |
| | | </template> |
| | | <!-- <template #suffix v-else> |
| | | <up-icon name="edit-pen" @click='isShow'></up-icon> |
| | | </template> --> |
| | | </up-input> |
| | | <!-- <up-text type="error" v-else text="已拒绝" size='14'></up-text> --> |
| | | <!-- <up-tag class="button-layout__item" text="录用" size="mini" type="success" |
| | | @click="selectBtn(item,true)"></up-tag> |
| | | <up-tag class="button-layout__item c-m-l-18" text="拒绝" size="mini" type="error" |
| | | @click="selectBtn(item,false)"></up-tag> --> |
| | | <!-- </template> --> |
| | | </template> |
| | | </up-cell> |
| | | </up-list-item> |
| | | <!-- <up-list-item> |
| | |
| | | let selectVal = ref(false) |
| | | let orderIdVal = ref('') |
| | | let isLoading = ref(false) |
| | | let showEdit = ref(false) |
| | | onLoad((option) => { |
| | | let { |
| | | orderid |
| | |
| | | const click = () => { |
| | | |
| | | } |
| | | const isShow = (item) => { |
| | | item.showEdit = true |
| | | } |
| | | const saveWorkPrice = (item) => { |
| | | let obj = { |
| | | orderBiddingId: item.id, |
| | | workPrice: item.workPrice |
| | | } |
| | | console.log(item, obj); |
| | | if (!item.workPrice) { |
| | | $util.showToast({ |
| | | title: "请输入工价!", |
| | | icon: "success" |
| | | }) |
| | | return |
| | | } |
| | | $api.saveWorkPrice(obj).then(res => { |
| | | if (res.code == 1) { |
| | | $util.showToast({ |
| | | title: "工价保存成功!", |
| | | icon: "success" |
| | | }) |
| | | getOrder(orderIdVal) |
| | | item.showEdit = false |
| | | } else { |
| | | $util.showToast({ |
| | | title: res.error |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | let modalShow = ref(false) |
| | | let content = ref('') |
| | | const toView = (item) => { |
| | |
| | | }) |
| | | } |
| | | const toWorkerDetail = (item) => { |
| | | $db.set('toudiItem', JSON.stringify(item)) |
| | | $db.set('toudiItem',item) |
| | | uni.navigateTo({ |
| | | url: `/pages/worker/worker?workerid=${item.workerUserId}` |
| | | }) |
| | |
| | | const getOrder = (orderid) => { |
| | | $api.getOrder(orderid).then(res => { |
| | | if (res.code == 1) { |
| | | res.data.orderBidding.forEach(item => { |
| | | item.showEdit = false |
| | | }) |
| | | detailItem.value = res.data |
| | | } |
| | | }) |