...
|
...
|
@@ -98,8 +98,8 @@ const exchangeApply = (req, res, next) => { |
|
|
* 取消退货申请
|
|
|
*/
|
|
|
const cancelRefund = (req, res, next) => {
|
|
|
const id = req.body.id;
|
|
|
const uid = req.user.uid;
|
|
|
let id = req.body.id;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
returnsModel.getCancelRefund(id, uid).then(result => {
|
|
|
res.send(result);
|
...
|
...
|
@@ -110,14 +110,47 @@ const cancelRefund = (req, res, next) => { |
|
|
* 取消换货申请
|
|
|
*/
|
|
|
const cancelChange = (req, res, next) => {
|
|
|
const id = req.body.id;
|
|
|
const uid = req.user.uid;
|
|
|
let id = req.body.id;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
returnsModel.getCancelChange(id, uid).then(result => {
|
|
|
res.send(result);
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 我的退换货-设置快递单号
|
|
|
*/
|
|
|
const setExpressNumber = (req, res, next) => {
|
|
|
|
|
|
let uid = req.user.uid;
|
|
|
let id = req.body.id;
|
|
|
let isChange = req.body.isChange === 'false'? false: true;
|
|
|
let expressId = req.body.expressId;
|
|
|
let expressNumber = req.body.expressNumber;
|
|
|
let expressCompany = req.body.expressCompany;
|
|
|
|
|
|
|
|
|
console.log('uid'+uid);
|
|
|
console.log('id'+id);
|
|
|
console.log('isChange'+isChange);
|
|
|
console.log('expressId'+expressId);
|
|
|
console.log('expressNumber'+expressNumber);
|
|
|
console.log('expressCompany'+expressCompany);
|
|
|
|
|
|
returnsModel.setExpressNumber(id, expressId, expressNumber, uid, expressCompany, isChange).then(result => {
|
|
|
|
|
|
if(res.code && res.code == 201){
|
|
|
res.json({message:'请求失败'});
|
|
|
}
|
|
|
|
|
|
if (id || expressId || expressNumber || uid || expressCompany || isChange) {
|
|
|
res.send(result);
|
|
|
}
|
|
|
|
|
|
}).catch(next);
|
|
|
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
|
index,
|
...
|
...
|
@@ -127,5 +160,6 @@ module.exports = { |
|
|
exchangeApply,
|
|
|
exchangeDetail,
|
|
|
cancelRefund,
|
|
|
cancelChange
|
|
|
cancelChange,
|
|
|
setExpressNumber
|
|
|
}; |
...
|
...
|
|