提交 3554609e authored 作者: 刘旭's avatar 刘旭

修改价格名称

上级 4b9f06b7
...@@ -19,15 +19,18 @@ ...@@ -19,15 +19,18 @@
<view v-for="(item, index) in quotationData?.items" class="item"> <view v-for="(item, index) in quotationData?.items" class="item">
<h4>{{ item.goodsName }}</h4> <h4>{{ item.goodsName }}</h4>
<view style="display: flex; flex-direction: row; align-items: center; margin-bottom: 10rpx;"> <view style="display: flex; flex-direction: row; align-items: center; margin-bottom: 10rpx;">
<text>重新设置单价:</text> <text>重新设置含税单价:</text>
<input v-model="item.price" type="number" height="50" placeholder="请输入单价" style="width: 200rpx;" <input v-model="item.priceTex" type="number" height="50" placeholder="请输入单价" style="width: 200rpx;"
@blur="priceBlur($event, index)" @focus="priceFocus" /> @blur="priceBlur($event, index)" @focus="priceFocus" />
</view> </view>
<view style="margin-bottom: 10rpx; display: flex; justify-content: space-between;"> <view style="margin-bottom: 10rpx; display: flex; justify-content: space-between;">
<view class=""> <view class="">
<view style="margin-bottom: 10rpx;"> <view style="margin-bottom: 10rpx;">
当前金额:¥{{ item.totalPrice.toFixed(2) }} 单价:¥{{ Number(item.price).toFixed(2) }}
</view> </view>
<!-- <view style="margin-bottom: 10rpx;">
当前金额:¥{{ item.totalPrice.toFixed(2) }}
</view> -->
<view>当前含税金额:¥{{ item.totalPriceTex.toFixed(2) }}</view> <view>当前含税金额:¥{{ item.totalPriceTex.toFixed(2) }}</view>
</view> </view>
<u-number-box v-model="item.number" :input-width="60" :input-height="30" :min="1" :index="index" <u-number-box v-model="item.number" :input-width="60" :input-height="30" :min="1" :index="index"
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
<view style="display: flex; flex-direction: column;"> <view style="display: flex; flex-direction: column;">
<view <view
style="display: flex; flex-direction: row; align-items: center; margin-bottom: 10rpx;"> style="display: flex; flex-direction: row; align-items: center; margin-bottom: 10rpx;">
<text>设置单价:</text> <text>设置含税单价:</text>
<!-- <u-input ref="inputRef" type="number" height="50" style="width: 200rpx;" /> --> <!-- <u-input ref="inputRef" type="number" height="50" style="width: 200rpx;" /> -->
<input type="number" placeholder="请输入单价" v-model="item.unitPrice" <input type="number" placeholder="请输入含税单价" v-model="item.taxUnitPrice"
@focus="onPriceFocus" @blur="priceCheck($event, index)" @focus="onPriceFocus" @blur="priceCheck($event, index)"
style="width: 200rpx;"> style="width: 200rpx;">
</view> </view>
...@@ -32,20 +32,11 @@ ...@@ -32,20 +32,11 @@
height="50" placeholder="合同报价" style="width: 200rpx;" /> height="50" placeholder="合同报价" style="width: 200rpx;" />
</view> </view>
<view style="margin-bottom: 10rpx;"> <view style="margin-bottom: 10rpx;">
金额:¥{{ 单价:¥{{ item.unitPrice ? Number(item.unitPrice).toFixed(2) : 0.00 }}
item.unitPrice
? (Number(item.unitPrice) * item.number).toFixed(2)
: 0
}}
</view> </view>
<view style="margin-bottom: 10rpx;"> <view style="margin-bottom: 10rpx;">
含税金额:¥{{ 含税总金额:¥{{ Number(item.taxUnitPrice) * item.number ? Number(item.taxUnitPrice) *
item.unitPrice item.number : 0.00
? (
Number(item.unitPrice) * item.number +
Number(item.unitPrice) * item.number * tax * 0.01
).toFixed(2)
: 0
}} }}
</view> </view>
</view> </view>
...@@ -317,7 +308,7 @@ let priceCheck = (data: any, index: number) => { ...@@ -317,7 +308,7 @@ let priceCheck = (data: any, index: number) => {
if (!val) return if (!val) return
if (val <= 0) if (val <= 0)
nextTick(() => { nextTick(() => {
detailData.value[index].unitPrice = '' detailData.value[index].taxUnitPrice = ''
uni.showToast({ uni.showToast({
title: '不能为负数', title: '不能为负数',
icon: 'none' icon: 'none'
...@@ -333,6 +324,8 @@ let priceCheck = (data: any, index: number) => { ...@@ -333,6 +324,8 @@ let priceCheck = (data: any, index: number) => {
} }
let submit = () => { let submit = () => {
console.log(detailData.value, 'detailData.value');
// 保证单价必填 // 保证单价必填
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
let flag = true let flag = true
...@@ -489,19 +482,6 @@ let initQuotaionData = (id: number) => { ...@@ -489,19 +482,6 @@ let initQuotaionData = (id: number) => {
}) })
}) })
detailData.value = quotationData.value.items detailData.value = quotationData.value.items
// console.log(quotationData.value.items, 'quotationData.value');
// 从quotationData获取 在detailData中添加 合同报价字段
// if (quotationData.value) {
// detailData.value.map((detail: any) => {
// detail.unitPrice = undefined
// quotationData.value.items.map((item: any) => {
// if (item.goodsName == detail.goodsName) {
// detail.contractQuotation = item.contractQuotation
// }
// })
// })
// } else initQuotation(orderId.value)
} }
}) })
} else { } else {
......
...@@ -62,7 +62,7 @@ let orderId = ref(); ...@@ -62,7 +62,7 @@ let orderId = ref();
onLoad((options: any) => { onLoad((options: any) => {
type.value = options.type; type.value = options.type;
orderId.value = options.orderId; orderId.value = options.orderId;
console.log(type.value, 'type.value'); // console.log(type.value, 'type.value');
initOrderData(options.orderId); initOrderData(options.orderId);
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论