diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index 99eb428..6e4761a 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -316,6 +316,19 @@ export function getLast1Year(): [dayjs.ConfigType, dayjs.ConfigType] { return getDateRange(lastYearDay, yesterday) } +export const formatTime = (timestamp?: number) => { + if (!timestamp) return '-' + const d = new Date(timestamp) + const pad = (n: number) => n.toString().padStart(2, '0') + return `${d.getFullYear()}-${pad(d.getMonth()+1)}-${pad(d.getDate())} ` + + `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}` +} + +export const formatDate2 = (date: any) => { + if (!date) return '-' + return formatDate(new Date(date), 'YYYY-MM-DD') +} + /** * 获取指定日期的开始时间、截止时间 * @param beginDate 开始日期 diff --git a/src/views/erp/stock/in/index.vue b/src/views/erp/stock/in/index.vue index 9ba432a..cb3aae3 100644 --- a/src/views/erp/stock/in/index.vue +++ b/src/views/erp/stock/in/index.vue @@ -45,7 +45,7 @@
入库时间 - {{ dateFormatter2(item.inTime) }} + {{ formatDate2(item.inTime) }}
创建人 @@ -118,7 +118,7 @@ diff --git a/src/views/erp/stock/out/components/StockOutItemForm.vue b/src/views/erp/stock/out/components/StockOutItemForm.vue index fb96f47..dd80581 100644 --- a/src/views/erp/stock/out/components/StockOutItemForm.vue +++ b/src/views/erp/stock/out/components/StockOutItemForm.vue @@ -4,24 +4,41 @@ :model="formData" :rules="formRules" v-loading="formLoading" - label-width="0px" + label-position="top" :inline-message="true" :disabled="disabled" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + +
+
+ 合计数量 + {{ erpCountInputFormatter(summaryData.count) }} +
+
+ 合计金额 + {{ erpPriceInputFormatter(summaryData.totalPrice) }} +
+
+ - - + 添加出库产品 - +
+ + 添加出库产品 +
+ + diff --git a/src/views/erp/stock/out/index.vue b/src/views/erp/stock/out/index.vue index 953b79c..f722920 100644 --- a/src/views/erp/stock/out/index.vue +++ b/src/views/erp/stock/out/index.vue @@ -1,274 +1,148 @@ + +