Commit f82ad59e by cwq0219

dayjs

1 parent 77598813
......@@ -28,6 +28,7 @@
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'classifyList',
data() {
......@@ -67,8 +68,9 @@ export default {
{
label: '创建日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
......
......@@ -28,6 +28,7 @@
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'orderManage',
data() {
......@@ -68,7 +69,7 @@ export default {
label: '创建日期',
prop: 'createdDate',
formatter: cellValue => {
return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
......
......@@ -28,6 +28,7 @@
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'orderShare',
data() {
......@@ -78,8 +79,9 @@ export default {
{
label: '创建日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
......@@ -125,7 +127,7 @@ export default {
},
mounted() {
this.getOptionsList('searchFormData',)
this.getOptionsList('searchFormData')
},
methods: {
......
......@@ -17,7 +17,7 @@
<!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="goodsImage" class="table-image" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage"/>
<img class="img-60" :src="scope.scope.goodsImage" />
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button>
......@@ -43,6 +43,7 @@
</template>
<script>
import * as dayjs from 'dayjs'
import shareDialog from './components/shareDialog'
export default {
name: 'productGroup',
......@@ -115,14 +116,14 @@ export default {
label: '浏览量(次)',
name: 'goodsStatistics',
formatter: cellValue => {
return cellValue.goodsStatistics ? (cellValue.goodsStatistics.viewAmount || '0') : '0'
return cellValue.goodsStatistics ? cellValue.goodsStatistics.viewAmount || '0' : '0'
}
},
{
label: '销量',
name: 'goodsStatistics',
formatter: cellValue => {
return cellValue.goodsStatistics ? (cellValue.goodsStatistics.saleAmount || '0') : '0'
return cellValue.goodsStatistics ? cellValue.goodsStatistics.saleAmount || '0' : '0'
}
},
{
......@@ -142,8 +143,9 @@ export default {
{
label: '创建日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
......@@ -157,13 +159,16 @@ export default {
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
goodsStatusList: [{
confId: '0',
confName: '已下架'
}, {
confId: '1',
confName: '已上架'
}]
goodsStatusList: [
{
confId: '0',
confName: '已下架'
},
{
confId: '1',
confName: '已上架'
}
]
}
}
},
......
......@@ -17,7 +17,7 @@
<!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage"/>
<img class="img-60" :src="scope.scope.goodsImage" />
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="!scope.scope.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
......@@ -46,6 +46,7 @@
</template>
<script>
import * as dayjs from 'dayjs'
import shareDialog from '../productGroup/components/shareDialog'
export default {
name: 'productGroup',
......@@ -118,14 +119,14 @@ export default {
label: '浏览量(次)',
name: 'goodsStatistics',
formatter: cellValue => {
return cellValue.goodsStatistics ? (cellValue.goodsStatistics.viewAmount || '0') : '0'
return cellValue.goodsStatistics ? cellValue.goodsStatistics.viewAmount || '0' : '0'
}
},
{
label: '销量',
name: 'goodsStatistics',
formatter: cellValue => {
return cellValue.goodsStatistics ? (cellValue.goodsStatistics.saleAmount || '0') : '0'
return cellValue.goodsStatistics ? cellValue.goodsStatistics.saleAmount || '0' : '0'
}
},
{
......@@ -145,8 +146,9 @@ export default {
{
label: '创建日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
......@@ -167,20 +169,26 @@ export default {
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
goodsStatusList: [{
confId: '0',
confName: '已下架'
}, {
confId: '1',
confName: '已上架'
}],
goodsSourceList: [{
confId: '1',
confName: '门店'
}, {
confId: '2',
confName: '带货'
}]
goodsStatusList: [
{
confId: '0',
confName: '已下架'
},
{
confId: '1',
confName: '已上架'
}
],
goodsSourceList: [
{
confId: '1',
confName: '门店'
},
{
confId: '2',
confName: '带货'
}
]
}
}
},
......@@ -239,9 +247,9 @@ export default {
},
// 下架通知
handleDwonNotice(row) {
this.$alert( '你带货的' + row.goodsName + '商品现已下架,下架原因:' + row.offReason, '商品下架通知', {
this.$alert('你带货的' + row.goodsName + '商品现已下架,下架原因:' + row.offReason, '商品下架通知', {
confirmButtonText: '确定',
callback: action => { }
callback: action => {}
})
},
handleUpOrDown(row) {
......
......@@ -30,6 +30,7 @@
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'takeGood',
data() {
......@@ -69,6 +70,7 @@ export default {
{
label: '商品名称',
prop: 'goodsName',
line: 2,
formatter: cellValue => {
return cellValue.goods.goodsName
}
......@@ -82,14 +84,15 @@ export default {
label: '供货价',
prop: 'supplyPrice',
formatter: cellValue => {
return (cellValue.supplyPrice / 100).toFixed(2)
return (cellValue.goods.supplyPrice / 100).toFixed(2)
}
},
{
label: '创建日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return new Date(cellValue.goods.createdDate).toLocaleDateString().replace(/\//g, '-')
return dayjs(cellValue.goods.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
......@@ -120,11 +123,12 @@ export default {
setTableFinishFun(table) {
this.tableParams.checkSelectVal = []
table.forEach(item => {
if (item.taked) {
this.tableParams.checkSelectVal.push(item.goodsId)
}
})
table &&
table.forEach(item => {
if (item.taked) {
this.tableParams.checkSelectVal.push(item.goodsId)
}
})
},
handleTakeGood() {
......
......@@ -30,6 +30,7 @@
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'zoneList',
data() {
......@@ -69,8 +70,9 @@ export default {
{
label: '创建日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!