You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.4 KiB
55 lines
1.4 KiB
6 months ago
|
<template>
|
||
|
<div class="submit-tow" @click.stop="markup()">请求涨价</div>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts" setup>
|
||
|
import { onMounted, reactive, ref, toRefs, watch ,defineProps} from 'vue'
|
||
|
import { useUserStore } from '@/stores/user'
|
||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||
|
import { merchantOffers } from '@/server/orderApi'
|
||
|
|
||
|
const userStore = useUserStore()
|
||
|
const porps = defineProps(['orderNo'])
|
||
|
// 涨价
|
||
|
const markup = () => {
|
||
|
ElMessageBox.prompt('请输入金额', 'Tip', {
|
||
|
confirmButtonText: '确认',
|
||
|
cancelButtonText: '取消',
|
||
|
inputPattern: /^(?!$)(?=^[0-9]{1,6}$)(?!^0+$)^[1-9][0-9]{0,4}$|100000$/,
|
||
|
inputErrorMessage: '请输入正确的金额',
|
||
|
})
|
||
|
.then(({ value }) => {
|
||
|
const data: any = {
|
||
|
merId: userStore.$state.userInfos.id,
|
||
|
offerAmount: value,
|
||
|
orderNo: porps.orderNo,
|
||
|
}
|
||
|
console.log(data)
|
||
|
merchantOffers(data)
|
||
|
ElMessage({
|
||
|
type: 'success',
|
||
|
message: `Your email is:${value}`,
|
||
|
})
|
||
|
})
|
||
|
.catch(() => {
|
||
|
// ElMessage({
|
||
|
// type: 'info',
|
||
|
// message: 'Input canceled',
|
||
|
// })
|
||
|
})
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss" scoped>
|
||
|
.submit-tow {
|
||
|
width: 0.5833rem;
|
||
|
height: 0.1667rem;
|
||
|
color: #ff94d4;
|
||
|
margin: 0 10px;
|
||
|
text-align: center;
|
||
|
line-height: 0.1667rem;
|
||
|
border: 1px solid #ff94d4;
|
||
|
// background: linear-gradient(90deg, #ff94d4 0%, #ffddbe 100%);
|
||
|
}
|
||
|
</style>
|