Commit 708e082e by Sxy

fix: 计算相差月

parent 873c8cd4
...@@ -107,14 +107,12 @@ const addCusAccApplyInfo = async (deliverData, pobj) => { ...@@ -107,14 +107,12 @@ const addCusAccApplyInfo = async (deliverData, pobj) => {
customerName: deliverData.delivery_info.companyName, customerName: deliverData.delivery_info.companyName,
phoneNumber: deliverData.delivery_info.contactsPhone, phoneNumber: deliverData.delivery_info.contactsPhone,
valueAddedTax: valueAddedTax[pobj.taxpayerType], valueAddedTax: valueAddedTax[pobj.taxpayerType],
serviceTime: moment(deliverData.delivery_info.serviceEndTime).diff(moment(deliverData.delivery_info.serviceStartTime), 'months').toString(), serviceTime: Math.round(moment(deliverData.delivery_info.serviceEndTime).diff(moment(deliverData.delivery_info.serviceStartTime), 'months', true)).toString(),
initPeriod: parseInt(moment(deliverData.delivery_info.serviceStartTime).format('YYYYMMDD')), initPeriod: parseInt(moment(deliverData.delivery_info.serviceStartTime).format('YYYYMMDD')),
companyId: pobj.supplier companyId: pobj.supplier
} }
await postToFtBySign('/cusAccApplyInfo/addCusAccApplyInfo', reqData); await postToFtBySign('/cusAccApplyInfo/addCusAccApplyInfo', reqData);
} }
// console.log(moment("2021-05-31").diff(moment("2020-06-01"), 'months', true).toString())
module.exports = { module.exports = {
postToFtBySign, postToFtBySign,
addCusAccApplyInfo, addCusAccApplyInfo,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment