Authored by huangyCode

Merge branch 'develop' of http://git.yoho.cn/fe/xianyu-ufo-app-web into develop

... ... @@ -64,9 +64,9 @@
<Button class="more">查看更多</Button>
</li>
</ul>
<div class="actions-wrapper">
<Button>不接受</Button>
<Button>接受,请发货</Button>
<div class="actions-wrapper" v-if="miniFaultConfirm.showBtn">
<Button @click="flawRejectDialog">不接受</Button>
<Button @click="flawAcceptDialog">接受,请发货</Button>
</div>
</div>
</template>
... ... @@ -78,14 +78,14 @@
</template>
<script>
import { createNamespacedHelpers } from "vuex";
import TimeLine from "./components/time-line";
import { expressTypeEnum } from "constants/logistics-constants";
import CountDown from "./components/count-down";
import { Button } from "cube-ui";
import Clipboard from "clipboard";
import { createNamespacedHelpers } from 'vuex';
import TimeLine from './components/time-line';
import { expressTypeEnum } from 'constants/logistics-constants';
import CountDown from './components/count-down';
import { Button } from 'cube-ui';
import Clipboard from 'clipboard';
const STORE_PATH = "order/logisticsInfo";
const STORE_PATH = 'order/logisticsInfo';
const { mapActions, mapState } = createNamespacedHelpers(STORE_PATH);
... ... @@ -96,27 +96,31 @@ export default {
Button
},
computed: {
...mapState(["logisticInfo"]),
...mapState(['logisticInfo']),
platformName() {
const { expressType: type } = this.logisticInfo;
return expressTypeEnum[type];
},
stageImgUrl() {
const { stage } = this.logisticInfo;
return stage
? require(`../../statics/image/order/logistics_progress_${stage}@3x.png`)
: "";
return stage ?
require(`../../statics/image/order/logistics_progress_${stage}@3x.png`) :
'';
},
detailList() {
const {
// 物流信息
expressInfoDetailTitle = "",
expressInfoDetailTitle = '',
expressInfoDetailList = [],
// 鉴定信息
judgeExpressInfoDetailTitle = "",
judgeExpressInfoDetailTitle = '',
judgeExpressInfoDetailList = [],
// 卖家物流信息
supplementExpressInfoDetailTitle = "",
supplementExpressInfoDetailTitle = '',
supplementExpressInfoDetailList = []
} = this.logisticInfo;
... ... @@ -138,7 +142,86 @@ export default {
return store.dispatch(`${STORE_PATH}/fetchLogisticInfo`, router.params);
},
methods: {
...mapActions(["fetchLogisticInfo"])
...mapActions([
'fetchLogisticInfo',
'flawReject',
'flawAccept'
]),
flawAcceptDialog() {
this.$createDialog({
type: 'confirm',
title: '',
content: '您确定接受瑕疵吗?',
confirmBtn: {
text: '接受',
active: true,
disabled: false,
href: 'javascript:;',
},
cancelBtn: {
text: '我再想想',
active: false,
disabled: false,
href: 'javascript:;'
},
onConfirm: () => {
const params = this.$route.params
const {code} = params;
const that = this;
this.flawAccept({
orderCode: code
}).then(() => {
that.fetchLogisticInfo(params);
});
},
onCancel: () => {
}
}).show();
},
flawRejectDialog() {
this.$createDialog({
type: 'confirm',
title: '',
content: '您确定不接受瑕疵吗?',
confirmBtn: {
text: '拒绝',
active: true,
disabled: false,
href: 'javascript:;',
},
cancelBtn: {
text: '我再想想',
active: false,
disabled: false,
href: 'javascript:;'
},
onConfirm: () => {
const params = this.$route.params
const {code} = params;
const that=this
this.flawReject({
orderCode: code
}).then(() => {
that.fetchLogisticInfo(params);
});
},
onCancel: () => {
}
}).show();
}
},
activated() {
this.copyBtn = new Clipboard(this.$refs.copy, {
... ... @@ -146,10 +229,10 @@ export default {
return this.logisticInfo.wayBillCode;
}
});
this.copyBtn.on("success", () => {
this.copyBtn.on('success', () => {
this.$createToast({
txt: "复制成功",
type: "txt"
txt: '复制成功',
type: 'txt'
}).show();
});
}
... ... @@ -294,4 +377,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -27,6 +27,17 @@ export default function() {
commit('initData', res.data);
}
},
async flawReject({commit}, {orderCode} = {}) {
return this.$api.get('/api/order/flawreject', {
orderCode
})
},
async flawAccept({commit}, {orderCode} = {}) {
return this.$api.get('/api/order/flawaccept', {
orderCode
})
}
},
};
}
... ...
... ... @@ -372,4 +372,22 @@ module.exports = {
depotNum: { type: Number, require: true }, // 鉴定中心id
},
},
//瑕疵接受
'/api/order/flawaccept': {
ufo: true,
auth: true,
api: 'ufo.buyer.miniFaultAccept',
params: {
orderCode: { type: String, require: true }, // 订单编号
}
},
//瑕疵拒绝
'/api/order/flawreject': {
ufo: true,
auth: true,
api: 'ufo.buyer.miniFaultReject',
params: {
orderCode: { type: String, require: true }, // 订单编号
}
}
};
... ...
{
"name": "xianyu-ufo-app-web",
"version": "0.0.2-beta-8",
"version": "0.0.2-beta-9",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ...