add
This commit is contained in:
parent
56668bb2e0
commit
dc02bca062
|
@ -20,111 +20,123 @@
|
||||||
</up-sticky>
|
</up-sticky>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<!-- 报价列表 -->
|
<!-- 报价列表 -->
|
||||||
<up-transition :show="showGoods1" mode="slide-left">
|
<view v-if="showGoods1">
|
||||||
<view class="" v-if="goodsList1.length>0">
|
<up-transition :show="showGoods1" mode="slide-left">
|
||||||
<view class="card" v-for="(item,index) in goodsList1" :key='index'>
|
<view class="" v-if="goodsList1.length>0">
|
||||||
<view class="head">
|
<view class="card" v-for="(item,index) in goodsList1" :key='index'>
|
||||||
<!-- <text> {{orer_sn}}</text> -->
|
<view class="head">
|
||||||
<!-- <text style="color: #989898;">{{time}}</text> -->
|
<!-- <text> {{orer_sn}}</text> -->
|
||||||
</view>
|
<!-- <text style="color: #989898;">{{time}}</text> -->
|
||||||
<view class="card-content">
|
|
||||||
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
|
|
||||||
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""></image>
|
|
||||||
<view class="status">
|
|
||||||
{{tabIndex==1?"未报价":"已报价" }}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="card-content-r">
|
<view class="card-content">
|
||||||
<view class="title ellipsis">
|
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
|
||||||
{{item.goods.name}}
|
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""></image>
|
||||||
|
<view class="status">
|
||||||
|
{{tabIndex==1?"未报价":"已报价" }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="need">
|
<view class="card-content-r">
|
||||||
需求量: {{item.need_num}}{{item.unit_name}}
|
<view class="title ellipsis">
|
||||||
</view>
|
{{item.goods.name}}
|
||||||
<view class="ipt">
|
</view>
|
||||||
<up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量"
|
<view class="need">
|
||||||
:readonly="tabIndex==2" v-model="item.nums"
|
需求量: {{item.need_num}}{{item.unit_name}}
|
||||||
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input>
|
</view>
|
||||||
<!-- <up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量" :readonly="tabIndex==2"
|
<view class="ipt">
|
||||||
v-model="item.num"
|
<up-input :placeholderStyle="{fontSize:'20rpx'}" placeholder="输入报价数量"
|
||||||
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input> -->
|
:readonly="tabIndex==2" v-model="item.nums"
|
||||||
<up-input placeholderStyle='fontSize:24rpx'
|
style="background-color:#F6F6F6;border: none;"></up-input>
|
||||||
style="background-color: #F6F6F6;border: none;" placeholder="点击数入产品报价"
|
<!-- <up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量" :readonly="tabIndex==2"
|
||||||
@blur="priceBlur(index)" :readonly="tabIndex==2"
|
|
||||||
v-model="item.price"></up-input>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="status-png" v-if="tabIndex==2">
|
|
||||||
<image :src="item.is_adopt?successPng:errPng" style="width: 108rpx; height: 84rpx;">
|
|
||||||
</image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="card-footer" v-if="item.nums &&item.price">
|
|
||||||
共{{item.nums}}{{item.unit_name}} 合计:<text
|
|
||||||
style="font-size: 28rpx;color: #FC452F;font-weight: 700;">¥{{item.nums*item.price}}</text>
|
|
||||||
</view>
|
|
||||||
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
|
|
||||||
</view>
|
|
||||||
<view class="submit-btn" v-if="tabIndex==1">
|
|
||||||
<up-button shape='circle' color='#20B128' @click="submit" text="提交"></up-button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
|
||||||
</up-empty>
|
|
||||||
<button @click="test2">叫我按钮</button>
|
|
||||||
</up-transition>
|
|
||||||
<!-- 报价记录 -->
|
|
||||||
<up-transition :show="showGoods2" mode="slide-right">
|
|
||||||
<view class="" v-if="goodsList2.length>0">
|
|
||||||
<view class="card" v-for="(item,index) in goodsList2" :key='index'>
|
|
||||||
<view class="head">
|
|
||||||
<!-- <text> {{orer_sn}}</text> -->
|
|
||||||
<!-- <text style="color: #989898;">{{time}}</text> -->
|
|
||||||
</view>
|
|
||||||
<view class="card-content">
|
|
||||||
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
|
|
||||||
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""></image>
|
|
||||||
<view class="status">
|
|
||||||
{{tabIndex==1?"未报价":"已报价" }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="card-content-r">
|
|
||||||
<view class="title ellipsis">
|
|
||||||
{{item.goods.name}}
|
|
||||||
</view>
|
|
||||||
<view class="need">
|
|
||||||
需求量: {{item.need_num}}{{item.unit_name}}
|
|
||||||
</view>
|
|
||||||
<view class="ipt">
|
|
||||||
<up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量"
|
|
||||||
:readonly="tabIndex==2" v-model="item.nums"
|
|
||||||
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input>
|
|
||||||
<!-- <up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量" :readonly="tabIndex==2"
|
|
||||||
v-model="item.num"
|
v-model="item.num"
|
||||||
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input> -->
|
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input> -->
|
||||||
<up-input placeholderStyle='fontSize:24rpx'
|
<view style="width: 10rpx;">
|
||||||
style="background-color: #F6F6F6;border: none;" placeholder="点击数入产品报价"
|
|
||||||
@blur="priceBlur(index)" :readonly="tabIndex==2"
|
</view>
|
||||||
v-model="item.price"></up-input>
|
<up-input :placeholderStyle="{fontSize:'20rpx'}"
|
||||||
|
style="background-color: #F6F6F6;border: none;" placeholder="输入产品报价"
|
||||||
|
@blur="priceBlur(index,goodsList1)" :readonly="tabIndex==2"
|
||||||
|
v-model="item.price"></up-input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="status-png" v-if="tabIndex==2">
|
||||||
|
<image :src="item.is_adopt?successPng:errPng" style="width: 108rpx; height: 84rpx;">
|
||||||
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="status-png" v-if="tabIndex==2">
|
<view class="card-footer" v-if="item.nums && item.price">
|
||||||
<image :src="item.is_adopt?successPng:errPng" style="width: 108rpx; height: 84rpx;">
|
共{{item.nums}}{{item.unit_name}} 合计:<text
|
||||||
</image>
|
style="font-size: 28rpx;color: #FC452F;font-weight: 700;">¥{{item.nums*item.price}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-footer" v-if="item.nums &&item.price">
|
|
||||||
共{{item.nums}}{{item.unit_name}} 合计:<text
|
|
||||||
style="font-size: 28rpx;color: #FC452F;font-weight: 700;">¥{{item.nums*item.price}}</text>
|
|
||||||
</view>
|
|
||||||
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
|
|
||||||
</view>
|
</view>
|
||||||
|
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||||||
|
</up-empty>
|
||||||
|
<!-- <button @click="test2">叫我按钮</button> -->
|
||||||
|
</up-transition>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 报价记录 -->
|
||||||
|
|
||||||
|
<view v-if="showGoods2">
|
||||||
|
<up-transition :show="showGoods2" mode="slide-right">
|
||||||
|
<view class="" v-if="goodsList2.length>0">
|
||||||
|
<view class="card" v-for="(item,index) in goodsList2" :key='index'>
|
||||||
|
<view class="head">
|
||||||
|
<!-- <text> {{orer_sn}}</text> -->
|
||||||
|
<!-- <text style="color: #989898;">{{time}}</text> -->
|
||||||
|
</view>
|
||||||
|
<view class="card-content">
|
||||||
|
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
|
||||||
|
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""></image>
|
||||||
|
<view class="status">
|
||||||
|
{{tabIndex==1?"未报价":"已报价" }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-content-r">
|
||||||
|
<view class="title ellipsis">
|
||||||
|
{{item.goods.name}}
|
||||||
|
</view>
|
||||||
|
<view class="need">
|
||||||
|
需求量: {{item.need_num}}{{item.unit_name}}
|
||||||
|
</view>
|
||||||
|
<view class="ipt">
|
||||||
|
<up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量"
|
||||||
|
:readonly="tabIndex==2" v-model="item.nums"
|
||||||
|
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input>
|
||||||
|
<!-- <up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量" :readonly="tabIndex==2"
|
||||||
|
v-model="item.num"
|
||||||
|
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input> -->
|
||||||
|
<up-input placeholderStyle='fontSize:24rpx'
|
||||||
|
style="background-color: #F6F6F6;border: none;" placeholder="点击数入产品报价"
|
||||||
|
@blur="priceBlur(index,goodsList2)" :readonly="tabIndex==2"
|
||||||
|
v-model="item.price"></up-input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="status-png" v-if="tabIndex==2">
|
||||||
|
<image :src="item.is_adopt?successPng:errPng" style="width: 108rpx; height: 84rpx;">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-footer" v-if="item.nums &&item.price">
|
||||||
|
共{{item.nums}}{{item.unit_name}} 合计:<text
|
||||||
|
style="font-size: 28rpx;color: #FC452F;font-weight: 700;">¥{{item.nums*item.price}}</text>
|
||||||
|
</view>
|
||||||
|
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<up-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
<up-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||||||
</up-empty>
|
</up-empty>
|
||||||
</up-transition>
|
</up-transition>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="submit-btn" v-if="tabIndex==1">
|
||||||
|
<up-button shape='circle' color='#20B128' @click="submit" text="提交"></up-button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -160,8 +172,8 @@
|
||||||
const tabsRight = ref(tabsLeft.value + (windowWidth / 2))
|
const tabsRight = ref(tabsLeft.value + (windowWidth / 2))
|
||||||
// tabsindex结束
|
// tabsindex结束
|
||||||
|
|
||||||
const priceBlur = (index) => {
|
const priceBlur = (index, goodsList) => {
|
||||||
goodsList.value[index].price = Number(goodsList.value[index].price).toFixed(2)
|
goodsList[index].price = Number(goodsList[index].price).toFixed(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 列表
|
// 列表
|
||||||
|
@ -208,7 +220,7 @@
|
||||||
getGoodsList(tabIndex.value)
|
getGoodsList(tabIndex.value)
|
||||||
// 列表结束
|
// 列表结束
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
let datas = goodsList.value.map(item => ({
|
let datas = goodsList1.value.map(item => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
nums: item.nums,
|
nums: item.nums,
|
||||||
price: item.price
|
price: item.price
|
||||||
|
@ -219,8 +231,6 @@
|
||||||
newData.push(item)
|
newData.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
let res = await OpurchaseGoodsOfferApi({
|
let res = await OpurchaseGoodsOfferApi({
|
||||||
data: newData
|
data: newData
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue