Authored by TaoHuang

add sell price by huangtao

... ... @@ -6,12 +6,13 @@
<div class="topContainer">
<!--<div class="topView">-->
<!--<div class="title"></div>-->
<!--</div>-->
<!--商品信息-->
<!--<div class="title"></div>-->
<!--</div>-->
<!--商品信息-->
<div class="productDetail">
<div class="productImageWrapper">
<ImageFormat class="image" :lazy="lazy" :src="originProductData.image" :width="136" :height="180"></ImageFormat>
<ImageFormat class="image" :lazy="lazy" :src="originProductData.image" :width="136"
:height="180"></ImageFormat>
</div>
<div class="productPrice">
<span class="size">{{sizeInfo}}</span>
... ... @@ -31,7 +32,8 @@
<span class="inputViewIcon">
¥
</span>
<Input ref="myinput" class="wordText" v-model="inputPrice" type="number" placeholder="定价需以9为结尾" @input="onTextChange"></Input>
<Input ref="myinput" class="wordText" v-model="inputPrice" type="number" placeholder="定价需以9为结尾"
@input="onTextChange"></Input>
</div>
<div>
... ... @@ -58,16 +60,16 @@
<div class="line"></div>
<div class="space"></div>
<order-address :data="addressInfo"></order-address>
<order-address :data="addressInfo"></order-address>
<div class="line"></div>
<div class="space"></div>
<!--<day-choose :chooseDay="chooseDay" :options="dayOptions" :choose="BUYER_ASK_SET_CHOOSEDAY"></day-choose>-->
<!--<day-choose :chooseDay="chooseDay" :options="dayOptions" :choose="BUYER_ASK_SET_CHOOSEDAY"></day-choose>-->
<div class="dayChoose" @click="showPicker">
<span class="leftText" >求购期限:</span>
<span class="leftText">求购期限:</span>
<div class="rightWrapper">
<span class="rightText">{{chooseDay || '7天'}}</span>
<i class="cubeic-arrow" ></i>
<i class="cubeic-arrow"></i>
</div>
</div>
... ... @@ -79,9 +81,10 @@
</div>
</cube-scroll>
<div class="bottomContainer">
<OrderAgree :value="isAgreeTerms" @input="isAgreeTerms = !isAgreeTerms" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree>
<OrderAgree :value="isAgreeTerms" @input="isAgreeTerms = !isAgreeTerms" class="agree-wrapper" :desc="agreeDesc"
:url="url"></OrderAgree>
<div class="btn-wrapper">
<YohoButton class="submit-btn" :txt="submitText" :disable="!isAgreeTerms" @click="submitClick"></YohoButton>
<YohoButton class="submit-btn" :txt="submitText" :disable="!isAgreeTerms" @click="submitClick"></YohoButton>
</div>
</div>
... ... @@ -90,12 +93,13 @@
<script>
import {Input, Button, Scroll} from 'cube-ui';
import { Input, Button, Scroll } from 'cube-ui';
import OrderAddress from './components/confirm/address';
import OrderAgree from './components/confirm/agree';
import { createNamespacedHelpers } from 'vuex';
import {debounce, get} from 'lodash';
const {mapState, mapActions, mapMutations, mapGetters} = createNamespacedHelpers(
import { debounce, get } from 'lodash';
const { mapState, mapActions, mapMutations, mapGetters } = createNamespacedHelpers(
'order/buyerAskOrder'
);
... ... @@ -116,7 +120,7 @@ export default {
url: 'https://activity.yoho.cn/feature/6775.html?nodownload=1',
agreeDesc: '有货买家协议',
submitText: '提交',
options: {pullDownRefresh: false}
options: { pullDownRefresh: false }
};
},
... ... @@ -147,22 +151,26 @@ export default {
},
beforeRouteEnter(to, from, next) {
next(vm => {
// 通过 `vm` 访问组件实例
if (from.name !== 'address') {
vm.inputPrice = '';
vm.BUYER_ASK_RESET_DATA();
}
});
},
activated() {
this.isActive = true;
},
deactivated() {
this.isActive = false;
},
mounted() {
this.BUYER_ASK_SET_STORAGEID(this.storageId);
this.fetchBuyerOrderCount({ tabType: 'buy'});
this.fetchBuyerOrderCount({ tabType: 'buy' });
this.fetchConfig();
this.$on('addressinfo', function(address) {
console.log(address);
... ... @@ -184,6 +192,9 @@ export default {
// },
addressInfo(val) {
if (!this.isActive) {
return;
}
if (this.inputPrice && val) {
this.computePrice();
... ... @@ -216,9 +227,9 @@ export default {
// if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) {
// this.showBuyDialog();
// } else {
this.computePrice();
this.computePrice();
// }
}, 500, {leading: false, trailing: true}),
}, 500, { leading: false, trailing: true }),
showToast() {
this.BUYER_ASK_SET_SHOWTOAST(false);
... ... @@ -306,17 +317,26 @@ export default {
this.showBuyDialog();
return;
}
this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id})
this.buyerPrePublish({
price: this.inputPrice,
storage_id: this.storageId,
address_id: this.addressInfo.address_id
})
.then((res) => {
if (res && res.code == 200) {
this.showDialog();
}
});
}, 500, {leading: false, trailing: true}),
}, 500, { leading: false, trailing: true }),
publishProduct() {
this.buyerPublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id, time_limit_id: this.chooseDayId}).then((res) => {
this.buyerPublish({
price: this.inputPrice,
storage_id: this.storageId,
address_id: this.addressInfo.address_id,
time_limit_id: this.chooseDayId
}).then((res) => {
if (res && res.code == 200) {
this.payOrder();
}
... ... @@ -329,7 +349,11 @@ export default {
console.log('inputPrice is null');
return;
}
this.buyerCompute({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id || '' });
this.buyerCompute({
price: this.inputPrice,
storage_id: this.storageId,
address_id: this.addressInfo.address_id || ''
});
},
payOrder() {
... ... @@ -419,6 +443,7 @@ export default {
justify-content: space-between;
flex-direction: row;
}
.body {
height: 100%;
/*position: relative;*/
... ... @@ -455,7 +480,7 @@ export default {
.productDetail {
display: flex;
flex-direction: row;
width: calc(100% - 40*2px);
width: calc(100% - 40 * 2px);
height: 120*2px;
margin-left: 20*2px;
align-items: center;
... ... @@ -480,7 +505,7 @@ export default {
.productPrice {
width: calc(100% - 120*2px - 10*2px);
width: calc(100% - 120 * 2px - 10 * 2px);
height: 120*2px;
margin-left: 10*2px;
justify-content: center;
... ... @@ -534,7 +559,7 @@ export default {
background-color: #f5f5f5;
}
.inputViewIcon{
.inputViewIcon {
line-height: 50*2px;
font-size: 20*2px;
color: #000;
... ... @@ -561,7 +586,7 @@ export default {
.tipHeaderText {
font-family: "PingFang SC";
font-size: 14*2px;
color:#000;
color: #000;
letter-spacing: 0;
//<!--margin-left: 20*2px;-->
margin-top: 15*2px;
... ... @@ -582,7 +607,7 @@ export default {
letter-spacing: 0px;
margin-top: 5*2px;
//<!--margin-left: 20*2px;-->
width: calc(100% - 40*2px);
width: calc(100% - 40 * 2px);
}
.space {
... ... @@ -673,7 +698,8 @@ export default {
border-top-left-radius: 15px !important;
border-top-right-radius: 15px !important;
}
.cube-input_active::after {
border-color: transparent!important; ;
border-color: transparent !important;;
}
</style>
... ...
... ... @@ -121,6 +121,7 @@ export default function() {
state.selectedCouponList = [];
state.selectedPromotion = null;
state.couponList = [];
state.address = null;
},
[Types.UPDATE_ORDER](state, { amount, couponInfo, couponList, promotionFormulaList, promotionList, promotionTips }) {
state.orderDetail.amount = amount;
... ...