更新
This commit is contained in:
parent
e65c24c01a
commit
aba60965c7
@ -36,12 +36,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="ipt">
|
<view class="ipt">
|
||||||
<u--input placeholder="输入报价数量" :readonly="tabIndex==2" v-model="item.nums"
|
<u--input placeholder="输入报价数量" :readonly="tabIndex==2" v-model="item.nums"
|
||||||
style="background-color:#F6F6F6;border: none;"></u--input>
|
style="background-color:#F6F6F6;border: none;" type="number" @blur="blur1(item)"></u--input>
|
||||||
<view style="width: 10rpx;">
|
<view style="width: 10rpx;">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<u--input style="background-color: #F6F6F6;border: none;" placeholder="输入产品报价" @blur="priceBlur(index)"
|
<u--input style="background-color: #F6F6F6;border: none;" placeholder="输入产品报价" @blur="blur2(item)"
|
||||||
:readonly="tabIndex==2" v-model="item.price"></u--input>
|
:readonly="tabIndex==2" v-model="item.price" type="number"></u--input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="status-png" v-if="tabIndex==2">
|
<view class="status-png" v-if="tabIndex==2">
|
||||||
@ -69,10 +68,10 @@
|
|||||||
</u-empty>
|
</u-empty>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="submit-btn" v-if="tabIndex==1">
|
<view class="submit-btn" v-show="tabIndex==1 && lists.length > 0">
|
||||||
<u-button shape='circle' color='#20B128' @click="submit" text="提交"></u-button>
|
<u-button shape='circle' color='#20B128' @click="submit" text="提交"></u-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-btn" v-if="tabIndex==2">
|
<view class="submit-btn" v-show="tabIndex==2 && deliveryBtnShow">
|
||||||
<u-button shape='circle' color='#20B128' @click="showDeliver" text="立即发货"></u-button>
|
<u-button shape='circle' color='#20B128' @click="showDeliver" text="立即发货"></u-button>
|
||||||
</view>
|
</view>
|
||||||
<uni-popup ref="deliver" type="center" @click.stop="">
|
<uni-popup ref="deliver" type="center" @click.stop="">
|
||||||
@ -81,7 +80,7 @@
|
|||||||
<u--form labelPosition="left" style="width: 100%;" labelWidth="auto" :model="model1" :rules="rules"
|
<u--form labelPosition="left" style="width: 100%;" labelWidth="auto" :model="model1" :rules="rules"
|
||||||
ref="uForm">
|
ref="uForm">
|
||||||
<u-form-item label="配送方式" borderBottom>
|
<u-form-item label="配送方式" borderBottom>
|
||||||
<u-radio-group v-model="model_type" placement="row" @change="model1.delivery_name='';model1.delivery_id=''">
|
<u-radio-group v-model="model_type" placement="row" @change="model1.delivery_name='';model1.delivery_id=''" activeColor="#20B128">
|
||||||
<u-radio label="自己配送" :name="2" style="margin-right: 20rpx;"></u-radio>
|
<u-radio label="自己配送" :name="2" style="margin-right: 20rpx;"></u-radio>
|
||||||
<u-radio label="快递配送" :name="1"></u-radio>
|
<u-radio label="快递配送" :name="1"></u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
@ -140,6 +139,7 @@
|
|||||||
ybj: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/274ad202405111523222891.png',
|
ybj: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/274ad202405111523222891.png',
|
||||||
model_type: 2,
|
model_type: 2,
|
||||||
deliveryNameShow: false,
|
deliveryNameShow: false,
|
||||||
|
deliveryBtnShow: false,
|
||||||
model1: {
|
model1: {
|
||||||
delivery_name: "",
|
delivery_name: "",
|
||||||
delivery_id: "",
|
delivery_id: "",
|
||||||
@ -167,6 +167,14 @@
|
|||||||
url
|
url
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
blur1(item){
|
||||||
|
if(item.nums<0) item.nums=0;
|
||||||
|
if(item.nums>item.need_num) item.nums=item.need_num;
|
||||||
|
},
|
||||||
|
blur2(item){
|
||||||
|
if(item.price<0) item.price=0;
|
||||||
|
item.price = (+item.price).toFixed(2)
|
||||||
|
},
|
||||||
getTabsPosi() {
|
getTabsPosi() {
|
||||||
const {
|
const {
|
||||||
windowWidth
|
windowWidth
|
||||||
@ -180,7 +188,8 @@
|
|||||||
type: type || this.tabIndex,
|
type: type || this.tabIndex,
|
||||||
date: this.date
|
date: this.date
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.lists = res.data.lists
|
this.lists = res.data.lists;
|
||||||
|
this.deliveryBtnShow = res.data.extend.delivery ? true : false;
|
||||||
this.lists.forEach(item => {
|
this.lists.forEach(item => {
|
||||||
if (!(+item.nums)) {
|
if (!(+item.nums)) {
|
||||||
item.nums = ''
|
item.nums = ''
|
||||||
@ -208,6 +217,7 @@
|
|||||||
this.lists.filter(item => {
|
this.lists.filter(item => {
|
||||||
return (+item.price && +item.nums)
|
return (+item.price && +item.nums)
|
||||||
}).map(item => {
|
}).map(item => {
|
||||||
|
if(item.nums > item.need_num) item.nums = item.need_num;
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
nums: item.nums,
|
nums: item.nums,
|
||||||
@ -229,7 +239,7 @@
|
|||||||
this.$refs.uForm.validate().then(res=>{
|
this.$refs.uForm.validate().then(res=>{
|
||||||
OpurchaseclassExpressApi({
|
OpurchaseclassExpressApi({
|
||||||
...this.model1,
|
...this.model1,
|
||||||
date: this.date
|
// date: this.date
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.getLists(2);
|
this.getLists(2);
|
||||||
this.$refs.deliver.close();
|
this.$refs.deliver.close();
|
||||||
@ -372,7 +382,6 @@
|
|||||||
|
|
||||||
.deliver {
|
.deliver {
|
||||||
width: 600rpx;
|
width: 600rpx;
|
||||||
height: 500rpx;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user