提交 0efafa05 authored 作者: 刘旭's avatar 刘旭

优化

上级 9d05c45d
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
height="50" height="50"
placeholder="请输入单价" placeholder="请输入单价"
style="width: 200rpx;" style="width: 200rpx;"
@input="priceCheck($event, index)"
/> />
</view> </view>
<view <view
...@@ -50,7 +51,7 @@ ...@@ -50,7 +51,7 @@
type="number" type="number"
:disabled="true" :disabled="true"
height="50" height="50"
placeholder="" placeholder="合同报价"
style="width: 200rpx;" style="width: 200rpx;"
/> />
</view> </view>
...@@ -171,7 +172,7 @@ ...@@ -171,7 +172,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, getCurrentInstance, ComponentInternalInstance, computed } from 'vue'; import { ref, getCurrentInstance, ComponentInternalInstance, computed, nextTick } from 'vue';
import { fillQuotation, quotationInit, quotationOrder } from '@/api/cart'; import { fillQuotation, quotationInit, quotationOrder } from '@/api/cart';
import { onLoad, onReady } from '@dcloudio/uni-app'; import { onLoad, onReady } from '@dcloudio/uni-app';
import { orderDetail, getTax } from '@/api/index'; import { orderDetail, getTax } from '@/api/index';
...@@ -328,6 +329,15 @@ let taxTotlePirce = computed(() => { ...@@ -328,6 +329,15 @@ let taxTotlePirce = computed(() => {
return Number(taxTotlePic).toFixed(2); return Number(taxTotlePic).toFixed(2);
}); });
// 单价不可以为负数
let priceCheck = (val: any, index: number) => {
if(val <= 0) {
nextTick(() => {
detailData.value[index].unitPrice = ''
})
}
}
let submit = () => { let submit = () => {
// 保证单价必填 // 保证单价必填
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论