mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化出库bug
This commit is contained in:
parent
26c19332b8
commit
a441eb3e11
8
app.js
8
app.js
@ -36,11 +36,11 @@ let opts = {
|
|||||||
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||||
|
|
||||||
|
|
||||||
app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||||
app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
|
//app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||||
|
|
||||||
//app.use('/callComponent',proxy('http://127.0.0.1:8012',opts));
|
app.use('/callComponent',proxy('http://127.0.0.1:8012',opts));
|
||||||
//app.use('/app',proxy('http://127.0.0.1:8012',opts));
|
app.use('/app',proxy('http://127.0.0.1:8012',opts));
|
||||||
|
|
||||||
//app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
|
//app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
|
||||||
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
|
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
userName: '',
|
userName: '',
|
||||||
currentUserId:vc.getData('/nav/getUserInfo').userId,
|
currentUserId:vc.getData('/nav/getUserInfo').userId,
|
||||||
conditions: {
|
conditions: {
|
||||||
AuditOrdersId: '',
|
AuditOpenShopsId: '',
|
||||||
userName: '',
|
userName: '',
|
||||||
auditLink: '',
|
auditLink: '',
|
||||||
},
|
},
|
||||||
@ -23,24 +23,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
_initMethod: function () {
|
_initMethod: function () {
|
||||||
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
|
vc.component._listAuditOpenShops(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
$that._loadStepStaff();
|
$that._loadStepStaff();
|
||||||
},
|
},
|
||||||
_initEvent: function () {
|
_initEvent: function () {
|
||||||
|
|
||||||
vc.on('myAuditOrders', 'listAuditOrders', function (_param) {
|
vc.on('myAuditOpenShops', 'listAuditOpenShops', function (_param) {
|
||||||
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
|
vc.component._listAuditOpenShops(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
});
|
});
|
||||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||||
vc.component._listAuditOrders(_currentPage, DEFAULT_ROWS);
|
vc.component._listAuditOpenShops(_currentPage, DEFAULT_ROWS);
|
||||||
});
|
});
|
||||||
|
|
||||||
vc.on('myAuditOrders','notifyAudit',function(_auditInfo){
|
vc.on('myAuditOpenShops','notifyAudit',function(_auditInfo){
|
||||||
vc.component._auditOrderInfo(_auditInfo);
|
vc.component._auditOrderInfo(_auditInfo);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
_listAuditOrders: function (_page, _rows) {
|
_listAuditOpenShops: function (_page, _rows) {
|
||||||
|
|
||||||
vc.component.auditOpenShopInfo.conditions.page = _page;
|
vc.component.auditOpenShopInfo.conditions.page = _page;
|
||||||
vc.component.auditOpenShopInfo.conditions.row = _rows;
|
vc.component.auditOpenShopInfo.conditions.row = _rows;
|
||||||
@ -49,8 +49,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
//发送get请求
|
//发送get请求
|
||||||
vc.http.get('myAuditOrders',
|
vc.http.apiGet('/shop/queryNeedAuditShop',
|
||||||
'list',
|
|
||||||
param,
|
param,
|
||||||
function (json, res) {
|
function (json, res) {
|
||||||
var _auditOpenShopInfo = JSON.parse(json);
|
var _auditOpenShopInfo = JSON.parse(json);
|
||||||
@ -66,12 +65,12 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_openAuditOrderModel: function (_auditOrder) {
|
_openAuditOpenShopModel: function (_auditOrder) {
|
||||||
vc.component.auditOpenShopInfo.orderInfo = _auditOrder;
|
vc.component.auditOpenShopInfo.orderInfo = _auditOrder;
|
||||||
vc.emit('audit','openAuditModal',{});
|
vc.emit('audit','openAuditModal',{});
|
||||||
},
|
},
|
||||||
_queryAuditOrdersMethod: function () {
|
_queryAuditOpenShopsMethod: function () {
|
||||||
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
|
vc.component._listAuditOpenShops(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
},
|
},
|
||||||
_openDetailPurchaseApplyModel:function(_purchaseApply){
|
_openDetailPurchaseApplyModel:function(_purchaseApply){
|
||||||
vc.jumpToPage("/admin.html#/pages/common/purchaseApplyDetail?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType);
|
vc.jumpToPage("/admin.html#/pages/common/purchaseApplyDetail?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType);
|
||||||
@ -82,7 +81,7 @@
|
|||||||
_auditInfo.taskId = vc.component.auditOpenShopInfo.orderInfo.taskId;
|
_auditInfo.taskId = vc.component.auditOpenShopInfo.orderInfo.taskId;
|
||||||
_auditInfo.applyOrderId = vc.component.auditOpenShopInfo.orderInfo.applyOrderId;
|
_auditInfo.applyOrderId = vc.component.auditOpenShopInfo.orderInfo.applyOrderId;
|
||||||
//发送get请求
|
//发送get请求
|
||||||
vc.http.post('myAuditOrders',
|
vc.http.post('myAuditOpenShops',
|
||||||
'audit',
|
'audit',
|
||||||
JSON.stringify(_auditInfo),
|
JSON.stringify(_auditInfo),
|
||||||
{
|
{
|
||||||
@ -90,37 +89,13 @@
|
|||||||
},
|
},
|
||||||
function (json, res) {
|
function (json, res) {
|
||||||
vc.toast("处理成功");
|
vc.toast("处理成功");
|
||||||
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
|
vc.component._listAuditOpenShops(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
}, function (errInfo, error) {
|
|
||||||
console.log('请求失败处理');
|
|
||||||
vc.toast("处理失败:" + errInfo);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
_finishAuditOrder:function(_auditOrder){
|
|
||||||
let _auditInfo = {
|
|
||||||
taskId: _auditOrder.taskId,
|
|
||||||
applyOrderId: _auditOrder.applyOrderId,
|
|
||||||
state:'1200',
|
|
||||||
remark:'处理结束'
|
|
||||||
};
|
|
||||||
//发送get请求
|
|
||||||
vc.http.post('myAuditOrders',
|
|
||||||
'audit',
|
|
||||||
JSON.stringify(_auditInfo),
|
|
||||||
{
|
|
||||||
emulateJSON: true
|
|
||||||
},
|
|
||||||
function (json, res) {
|
|
||||||
vc.toast("处理成功");
|
|
||||||
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
||||||
}, function (errInfo, error) {
|
}, function (errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
vc.toast("处理失败:" + errInfo);
|
vc.toast("处理失败:" + errInfo);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})(window.vc);
|
})(window.vc);
|
||||||
|
|||||||
@ -87,8 +87,9 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('item',item);
|
let _purchaseQuantity = parseFloat(item.purchaseQuantity).toFixed(2);
|
||||||
if (item.purchaseQuantity > item.stock) {
|
let _stock = parseFloat(item.stock).toFixed(2)
|
||||||
|
if (_purchaseQuantity > _stock) {
|
||||||
vc.toast('库存不足');
|
vc.toast('库存不足');
|
||||||
_flag = false;
|
_flag = false;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user