...
|
...
|
@@ -119,20 +119,20 @@ |
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import LayoutApp from "../../../components/layout/layout-app";
|
|
|
import ScrollView from "../../../components/layout/scroll-view";
|
|
|
import ImgSize from "../../../components/img-size";
|
|
|
import { createNamespacedHelpers } from "vuex";
|
|
|
import InputUfo from "./components/input-ufo";
|
|
|
import { Checkbox } from "cube-ui";
|
|
|
import { get } from "lodash";
|
|
|
import Modal from "./components/modal";
|
|
|
import OrderCheck from "../components/confirm/agree";
|
|
|
|
|
|
const { mapState, mapActions } = createNamespacedHelpers("order/priceChange");
|
|
|
import LayoutApp from '../../../components/layout/layout-app';
|
|
|
import ScrollView from '../../../components/layout/scroll-view';
|
|
|
import ImgSize from '../../../components/img-size';
|
|
|
import { createNamespacedHelpers } from 'vuex';
|
|
|
import InputUfo from './components/input-ufo';
|
|
|
import { Checkbox } from 'cube-ui';
|
|
|
import { get } from 'lodash';
|
|
|
import Modal from './components/modal';
|
|
|
import OrderCheck from '../components/confirm/agree';
|
|
|
|
|
|
const { mapState, mapActions } = createNamespacedHelpers('order/priceChange');
|
|
|
// orderCode = 1233499619151
|
|
|
export default {
|
|
|
name: "noEntryDetail",
|
|
|
name: 'noEntryDetail',
|
|
|
components: {
|
|
|
OrderCheck,
|
|
|
Modal,
|
...
|
...
|
@@ -144,36 +144,36 @@ export default { |
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
title: "调价",
|
|
|
title: '调价',
|
|
|
agreementURL:
|
|
|
"https://activity.yoho.cn/feature/3187.html?share_id=5851&title=ufo-%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE",
|
|
|
'https://activity.yoho.cn/feature/3187.html?share_id=5851&title=ufo-%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE',
|
|
|
platformFeeModalVisible: false,
|
|
|
platformFee: {
|
|
|
amount: "-¥0",
|
|
|
appraiseFee: "¥0.00",
|
|
|
packageFee: "¥0.00",
|
|
|
serviceFee: "¥0.00",
|
|
|
goodsPaymentRatePercent: "0.00%",
|
|
|
payChannelPercentage: "0.00%"
|
|
|
amount: '-¥0',
|
|
|
appraiseFee: '¥0.00',
|
|
|
packageFee: '¥0.00',
|
|
|
serviceFee: '¥0.00',
|
|
|
goodsPaymentRatePercent: '0.00%',
|
|
|
payChannelPercentage: '0.00%'
|
|
|
},
|
|
|
bankTransferFee: "-¥0",
|
|
|
income: "¥0",
|
|
|
errorTip: "",
|
|
|
chgPrice: "",
|
|
|
bankTransferFee: '-¥0',
|
|
|
income: '¥0',
|
|
|
errorTip: '',
|
|
|
chgPrice: '',
|
|
|
calced: false,
|
|
|
earnestMoney: "¥0",
|
|
|
earnestMoney: '¥0',
|
|
|
// 保证金
|
|
|
earnestPrice: 0,
|
|
|
isAgree: false,
|
|
|
labelOption: {
|
|
|
label: "我已阅读并同意"
|
|
|
label: '我已阅读并同意'
|
|
|
},
|
|
|
time: 15000,
|
|
|
isStopScrollPrevent: false // 是否停止layout阻止滚动事件
|
|
|
};
|
|
|
},
|
|
|
asyncData({ store, router }) {
|
|
|
return store.dispatch("order/priceChange/fetchOrder", {
|
|
|
return store.dispatch('order/priceChange/fetchOrder', {
|
|
|
orderCode: router.params.orderCode
|
|
|
});
|
|
|
},
|
...
|
...
|
@@ -182,7 +182,7 @@ export default { |
|
|
// this.inputChange = debounce(this.onChange.bind(this), 500);
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(["noEntryOrderInfo"]),
|
|
|
...mapState(['noEntryOrderInfo']),
|
|
|
goodsInfo() {
|
|
|
return this.noEntryOrderInfo.goodsInfo || {};
|
|
|
},
|
...
|
...
|
@@ -194,37 +194,41 @@ export default { |
|
|
chgPrice() {
|
|
|
this.calced = false;
|
|
|
this.platformFee = {
|
|
|
amount: "-¥0",
|
|
|
appraiseFee: "¥0.00",
|
|
|
packageFee: "¥0.00",
|
|
|
serviceFee: "¥0.00",
|
|
|
goodsPaymentRatePercent: "0.00%",
|
|
|
payChannelPercentage: "0.00%"
|
|
|
amount: '-¥0',
|
|
|
appraiseFee: '¥0.00',
|
|
|
packageFee: '¥0.00',
|
|
|
serviceFee: '¥0.00',
|
|
|
goodsPaymentRatePercent: '0.00%',
|
|
|
payChannelPercentage: '0.00%'
|
|
|
};
|
|
|
this.bankTransferFee = "-¥0";
|
|
|
this.income = "¥0";
|
|
|
this.earnestMoney = "¥0";
|
|
|
this.bankTransferFee = '-¥0';
|
|
|
this.income = '¥0';
|
|
|
this.earnestMoney = '¥0';
|
|
|
this.earnestPrice = 0;
|
|
|
}
|
|
|
},
|
|
|
beforeRouteLeave(from, to, next) {
|
|
|
this.clearData();
|
|
|
next();
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions([
|
|
|
"fetchOrder",
|
|
|
"postNoEntryCalcPrice",
|
|
|
"postNoEntryChangePrice"
|
|
|
'fetchOrder',
|
|
|
'postNoEntryCalcPrice',
|
|
|
'postNoEntryChangePrice'
|
|
|
]),
|
|
|
checkPrice(price) {
|
|
|
let valid = false;
|
|
|
|
|
|
if (!price) {
|
|
|
this.errorTip = "没有价格";
|
|
|
this.errorTip = '没有价格';
|
|
|
return false;
|
|
|
} else if (!/^\d+$/.test(price)) {
|
|
|
this.errorTip = "价格只能为正整数";
|
|
|
this.errorTip = '价格只能为正整数';
|
|
|
} else if (!/9$/.test(price)) {
|
|
|
this.errorTip = "出售价格必须以9结尾";
|
|
|
this.errorTip = '出售价格必须以9结尾';
|
|
|
} else {
|
|
|
this.errorTip = "";
|
|
|
this.errorTip = '';
|
|
|
valid = true;
|
|
|
}
|
|
|
console.log(this.errorTip, valid);
|
...
|
...
|
@@ -234,15 +238,15 @@ export default { |
|
|
// 点击提交按钮
|
|
|
if (this.isAgree && this.calced) {
|
|
|
this.$createDialog({
|
|
|
type: "confirm",
|
|
|
content: "重新出售后本次出售保证金原路返回",
|
|
|
type: 'confirm',
|
|
|
content: '重新出售后本次出售保证金原路返回',
|
|
|
confirmBtn: {
|
|
|
text: "我再想想",
|
|
|
text: '我再想想',
|
|
|
active: true,
|
|
|
disabled: false
|
|
|
},
|
|
|
cancelBtn: {
|
|
|
text: "重新出售",
|
|
|
text: '重新出售',
|
|
|
active: false,
|
|
|
disabled: false
|
|
|
},
|
...
|
...
|
@@ -265,11 +269,11 @@ export default { |
|
|
console.log(result);
|
|
|
|
|
|
if (result && result.code === 200) {
|
|
|
this.platformFee = get(result, "data.platformFee", "");
|
|
|
this.bankTransferFee = get(result, "data.bankTransferFee", "");
|
|
|
this.income = "¥" + get(result, "data.income", "");
|
|
|
this.earnestMoney = "¥" + get(result, "data.earnestMoney", "");
|
|
|
this.earnestPrice = get(result, "data.earnestMoney", 0);
|
|
|
this.platformFee = get(result, 'data.platformFee', '');
|
|
|
this.bankTransferFee = get(result, 'data.bankTransferFee', '');
|
|
|
this.income = '¥' + get(result, 'data.income', '');
|
|
|
this.earnestMoney = '¥' + get(result, 'data.earnestMoney', '');
|
|
|
this.earnestPrice = get(result, 'data.earnestMoney', 0);
|
|
|
this.calced = true;
|
|
|
} else {
|
|
|
if (result.message) {
|
...
|
...
|
@@ -279,7 +283,7 @@ export default { |
|
|
|
|
|
this.$createToast({
|
|
|
txt: this.errorTip,
|
|
|
type: "txt"
|
|
|
type: 'txt'
|
|
|
}).show();
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -290,7 +294,7 @@ export default { |
|
|
} else {
|
|
|
this.$createToast({
|
|
|
txt: this.errorTip,
|
|
|
type: "txt"
|
|
|
type: 'txt'
|
|
|
}).show();
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -301,7 +305,7 @@ export default { |
|
|
|
|
|
showEarnestQuestion() {
|
|
|
// 跳转保证金说明页
|
|
|
console.log("showEarnest");
|
|
|
console.log('showEarnest');
|
|
|
this.$xianyu.goXianyuNewPage({ url: this.agreementURL });
|
|
|
},
|
|
|
|
...
|
...
|
@@ -323,14 +327,14 @@ export default { |
|
|
this.$createOrderPayType({
|
|
|
orderCode: result.data.orderCode,
|
|
|
price: parseFloat(`${earnestPrice}`).toFixed(2),
|
|
|
desc: "保证金",
|
|
|
desc: '保证金',
|
|
|
extra: JSON.stringify({
|
|
|
type: "sell",
|
|
|
type: 'sell',
|
|
|
back: {
|
|
|
name: "InSaleOrderList"
|
|
|
name: 'InSaleOrderList'
|
|
|
},
|
|
|
forward: {
|
|
|
name: "SellPayOk",
|
|
|
name: 'SellPayOk',
|
|
|
query: {
|
|
|
orderCode: result.data.orderCode
|
|
|
}
|
...
|
...
|
@@ -339,9 +343,9 @@ export default { |
|
|
onCloseAction() {
|
|
|
that.clearData();
|
|
|
that.$router.replace({
|
|
|
name: "sellOrderDetail",
|
|
|
name: 'sellOrderDetail',
|
|
|
params: {
|
|
|
owner: "sell",
|
|
|
owner: 'sell',
|
|
|
code: result.data.orderCode
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -349,8 +353,8 @@ export default { |
|
|
}).show();
|
|
|
} else {
|
|
|
this.$createToast({
|
|
|
txt: result.message || "调价失败",
|
|
|
type: "txt"
|
|
|
txt: result.message || '调价失败',
|
|
|
type: 'txt'
|
|
|
}).show();
|
|
|
}
|
|
|
|
...
|
...
|
@@ -361,25 +365,26 @@ export default { |
|
|
// console.log(this.$router);
|
|
|
this.platformFeeModalVisible = false;
|
|
|
this.platformFee = {
|
|
|
amount: "-¥0",
|
|
|
appraiseFee: "¥0.00",
|
|
|
packageFee: "¥0.00",
|
|
|
serviceFee: "¥0.00",
|
|
|
goodsPaymentRatePercent: "0.00%",
|
|
|
payChannelPercentage: "0.00%"
|
|
|
amount: '-¥0',
|
|
|
appraiseFee: '¥0.00',
|
|
|
packageFee: '¥0.00',
|
|
|
serviceFee: '¥0.00',
|
|
|
goodsPaymentRatePercent: '0.00%',
|
|
|
payChannelPercentage: '0.00%'
|
|
|
};
|
|
|
this.bankTransferFee = "-¥0";
|
|
|
this.income = "¥0";
|
|
|
this.errorTip = "";
|
|
|
this.chgPrice = "";
|
|
|
this.bankTransferFee = '-¥0';
|
|
|
this.income = '¥0';
|
|
|
this.errorTip = '';
|
|
|
this.chgPrice = '';
|
|
|
this.calced = false;
|
|
|
this.earnestMoney = "¥0";
|
|
|
this.earnestMoney = '¥0';
|
|
|
this.isAgree = false;
|
|
|
},
|
|
|
checkScroll(e) {
|
|
|
if (e.currentTarget.scrollTop > 0) {
|
|
|
this.isStopScrollPrevent = true;
|
|
|
} else {
|
|
|
e.stopPropagation();
|
|
|
this.isStopScrollPrevent = false;
|
|
|
}
|
|
|
}
|
...
|
...
|
|