Compare commits

...

2 Commits

Author SHA1 Message Date
wuxw
afb2d325e5 日期格式化bug 2025-08-05 16:56:32 +08:00
wuxw
9a7ff0d166 优化手工出厂优惠券核销bug 修复 2025-08-05 12:34:20 +08:00
2 changed files with 6 additions and 5 deletions

View File

@ -36,11 +36,11 @@ const formatDate = date => {
const getDate = function getDate(strDate) { const getDate = function getDate(strDate) {
var st = strDate; var st = strDate;
var a = st.split(" "); //这个根据你的字符串决定如果中间为T则改T var a = st.split(" "); // 分割日期和时间部分
var b = a[0].split("-"); var b = a[0].split("-"); // 分割年、月、日
var c = a[1].split(":"); var c = a[1].split(":"); // 分割时、分、秒
var date = new Date(b[0], b[1], b[2], c[0], c[1], c[2]); var date = new Date(b[0], b[1] - 1, b[2], c[0], c[1], c[2]); // 月份减1
return date; return date;
}; };
/** /**

View File

@ -158,6 +158,7 @@
_that.amount = _data[0].payCharge; _that.amount = _data[0].payCharge;
_that.inoutId = _data[0].inoutId; _that.inoutId = _data[0].inoutId;
_that.costMin = _data[0].hours + "时" + _data[0].min + "分"; _that.costMin = _data[0].hours + "时" + _data[0].min + "分";
_that.paId = _data[0].paId;
}); });
getIotOpenApi(this, { getIotOpenApi(this, {
@ -180,7 +181,7 @@
_changeCoupons: function(e) { _changeCoupons: function(e) {
let _that =this; let _that =this;
this.pccIds = e.detail.value; this.pccIds = e.detail.value;
if(!_pccIds || _pccIds.length<1){ if(!this.pccIds || this.pccIds.length<1){
this._queryCustomCarMoney(); this._queryCustomCarMoney();
return; return;
} }