|
@@ -34,38 +34,19 @@
|
|
<text class="label">预上架金额</text>
|
|
<text class="label">预上架金额</text>
|
|
<text class="desc">¥ {{ item.totalPrice }}</text>
|
|
<text class="desc">¥ {{ item.totalPrice }}</text>
|
|
</view>
|
|
</view>
|
|
- <!-- <view class="item">
|
|
|
|
- <text class="label">利润</text>
|
|
|
|
- <text class="desc">50元</text>
|
|
|
|
- </view> -->
|
|
|
|
- <!-- <view class="item">
|
|
|
|
- <text class="label">上架金额</text>
|
|
|
|
- <text class="desc">¥ {{ resalePrice }}</text>
|
|
|
|
- </view> -->
|
|
|
|
- <view style="font-size: 12px;padding: 5px;height: 30px;line-height: 30px;">注:本次上架需扣除服务1点数</view>
|
|
|
|
|
|
+
|
|
|
|
+ <view style="font-size: 16px;padding: 5px;height: 80px;line-height: 30px;">注:本次上架需扣除服务1点数,
|
|
|
|
+ <view>剩余服务点数:<text style="font-weight: bold;">{{user.wallet}}</text><text
|
|
|
|
+ style="margin-left: 10px;color: blue" @click="toCharge">前往充值</text></view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <!-- <u-divider text="服务费明细"></u-divider>
|
|
|
|
- <view v-if="fee.totalFee>0">{{fee.title}}:{{fee.totalFee}}<span style="color: coral;margin-left: 5px;font-size: 16px;">元</span></view>
|
|
|
|
- <view class="box">
|
|
|
|
- <u-collapse v-for="(item,index) in fee.feeList" :key="index" :value="['1']">
|
|
|
|
- <u-collapse-item :title="item.name" class="cell_title" name="1">
|
|
|
|
- <view class="itm">1、系统服务费:{{ item.name }}</view>
|
|
|
|
- <view class="itm" v-if="item.feeType ==1">2、收费类型:按交易额收取</view>
|
|
|
|
- <view class="itm" v-if="item.feeType ==2">2、收费类型:按次收取</view>
|
|
|
|
- <view class="itm" v-if="item.feeType ==3">2、收费类型:按吨收取</view>
|
|
|
|
- <view class="itm" v-if="item.feeType ==1">3、收费%(按交易额收):<span style="color: coral;">{{ item.percent }} %</span></view>
|
|
|
|
- <view class="itm" v-if="item.feeType ==2">3、收费金额(按次收):<span style="color: coral;">{{ item.feeMoney }} 元</span></view>
|
|
|
|
- <view class="itm" v-if="item.feeType ==3">3、收费%(按吨收):<span style="color: coral;">{{ item.percent }} %</span></view>
|
|
|
|
- <view class="itm">4、当前订单收取金额:<span style="color: coral;">{{ item.feeMoney }} 元</span></view>
|
|
|
|
|
|
|
|
- </u-collapse-item>
|
|
|
|
- </u-collapse>
|
|
|
|
- </view> -->
|
|
|
|
</view>
|
|
</view>
|
|
<view class="mfooter" v-if="item.upStatus != 2">
|
|
<view class="mfooter" v-if="item.upStatus != 2">
|
|
<view class="flex">
|
|
<view class="flex">
|
|
<view class="f">
|
|
<view class="f">
|
|
- <button class="btn" @click="ok()">确定上架</button>
|
|
|
|
|
|
+ <button class="btn" @click="ok()" v-if="user.wallet>0">确定上架</button>
|
|
|
|
+ <button class="btn" style="color: firebrick;" @click="toCharge" v-else>前往充值</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -73,91 +54,115 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-export default {
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- item: {},
|
|
|
|
- resalePrice: '',
|
|
|
|
- weight: '',
|
|
|
|
- price: '',
|
|
|
|
- newRuleList: [],
|
|
|
|
- fee:{
|
|
|
|
- totalFee:0,
|
|
|
|
- feeList:[]
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- onLoad(e) {
|
|
|
|
- if (e.item) {
|
|
|
|
- this.item = JSON.parse(e.item);
|
|
|
|
- this.price = this.item.totalPrice;
|
|
|
|
- this.weight = this.item.totalWeight;
|
|
|
|
- //this.countPrice();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- fetchItemList(){
|
|
|
|
- this.http.request({
|
|
|
|
- url: '/level-two-server/app/TbOrders/fetchItemList',
|
|
|
|
- data: {id: this.item.id},
|
|
|
|
- success: res => {
|
|
|
|
- this.resalePrice = (res.data.data.sumPrice + 50).toFixed(2)
|
|
|
|
- this.newRuleList = res.data.data.newRuleList
|
|
|
|
|
|
+ export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ item: {},
|
|
|
|
+ resalePrice: '',
|
|
|
|
+ weight: '',
|
|
|
|
+ price: '',
|
|
|
|
+ user: {},
|
|
|
|
+ newRuleList: [],
|
|
|
|
+ fee: {
|
|
|
|
+ totalFee: 0,
|
|
|
|
+ feeList: []
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ };
|
|
},
|
|
},
|
|
- //费项合计
|
|
|
|
- countPrice(){
|
|
|
|
- this.http.request({
|
|
|
|
- url: '/level-two-server/app/TbOrders/countPrice',
|
|
|
|
- data: {id: this.item.id},
|
|
|
|
- success: res => {
|
|
|
|
- // this.resalePrice = (res.data.data.sumPrice + 50).toFixed(2)
|
|
|
|
- // this.newRuleList = res.data.data.newRuleList
|
|
|
|
- this.fee=res.data.data;
|
|
|
|
- this.resalePrice = (this.fee.totalFee + this.item.totalPrice).toFixed(2);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- ok() {
|
|
|
|
- let resalePrice=this.resalePrice;
|
|
|
|
- /* if(!resalePrice){
|
|
|
|
- uni.showToast({title: '请填写上架金额',icon:'error'});
|
|
|
|
- return;
|
|
|
|
|
|
+ onLoad(e) {
|
|
|
|
+ if (e.item) {
|
|
|
|
+ this.item = JSON.parse(e.item);
|
|
|
|
+ this.price = this.item.totalPrice;
|
|
|
|
+ this.weight = this.item.totalWeight;
|
|
|
|
+ this.user = this.getUser();
|
|
|
|
+ //this.countPrice();
|
|
}
|
|
}
|
|
- if(resalePrice<this.item.totalPrice){
|
|
|
|
- uni.showToast({title: '上架金额不能小于订单金额',icon:'error'});
|
|
|
|
- return;
|
|
|
|
- } */
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '确定上架?',
|
|
|
|
- success: res => {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- this.http.request({
|
|
|
|
- url: '/level-one-server/app/TbOrder/up',
|
|
|
|
- data: {id: this.item.id, upPrice: this.item.totalPrice},
|
|
|
|
- success: res => {
|
|
|
|
- uni.showToast({title: '提交成功'});
|
|
|
|
- uni.navigateBack();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ toCharge() {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/wallet/topup/edit'
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ fetchItemList() {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/level-two-server/app/TbOrders/fetchItemList',
|
|
|
|
+ data: {
|
|
|
|
+ id: this.item.id
|
|
|
|
+ },
|
|
|
|
+ success: res => {
|
|
|
|
+ this.resalePrice = (res.data.data.sumPrice + 50).toFixed(2)
|
|
|
|
+ this.newRuleList = res.data.data.newRuleList
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //费项合计
|
|
|
|
+ countPrice() {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/level-two-server/app/TbOrders/countPrice',
|
|
|
|
+ data: {
|
|
|
|
+ id: this.item.id
|
|
|
|
+ },
|
|
|
|
+ success: res => {
|
|
|
|
+ // this.resalePrice = (res.data.data.sumPrice + 50).toFixed(2)
|
|
|
|
+ // this.newRuleList = res.data.data.newRuleList
|
|
|
|
+ this.fee = res.data.data;
|
|
|
|
+ this.resalePrice = (this.fee.totalFee + this.item.totalPrice).toFixed(2);
|
|
}
|
|
}
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ ok() {
|
|
|
|
+ let resalePrice = this.resalePrice;
|
|
|
|
+ /* if(!resalePrice){
|
|
|
|
+ uni.showToast({title: '请填写上架金额',icon:'error'});
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ if(resalePrice<this.item.totalPrice){
|
|
|
|
+ uni.showToast({title: '上架金额不能小于订单金额',icon:'error'});
|
|
|
|
+ return;
|
|
|
|
+ } */
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '确定上架?',
|
|
|
|
+ success: res => {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ let that = this;
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/level-one-server/app/TbOrder/up',
|
|
|
|
+ data: {
|
|
|
|
+ id: this.item.id,
|
|
|
|
+ upPrice: this.item.totalPrice
|
|
|
|
+ },
|
|
|
|
+ success: res => {
|
|
|
|
+ let resp = res.data;
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: resp.data
|
|
|
|
+ });
|
|
|
|
+ if (resp.code == 200) {
|
|
|
|
+ let user = that.user;
|
|
|
|
+ user.wallet = user.wallet - resp.data;
|
|
|
|
+ uni.setStorageSync('info', user);
|
|
|
|
+ uni.navigateBack();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
-};
|
|
|
|
|
|
+ };
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
-page {
|
|
|
|
- background-color: $pg;
|
|
|
|
-}
|
|
|
|
-.item {
|
|
|
|
- input{
|
|
|
|
- margin-top: 0px!important;
|
|
|
|
- }
|
|
|
|
|
|
+ page {
|
|
|
|
+ background-color: $pg;
|
|
}
|
|
}
|
|
|
|
|
|
-</style>
|
|
|
|
|
|
+ .item {
|
|
|
|
+ input {
|
|
|
|
+ margin-top: 0px !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</style>
|