Commit 34204a25 by liang ce

文案修改

parent 34317d5b
...@@ -126,7 +126,6 @@ export default { ...@@ -126,7 +126,6 @@ export default {
}) })
}, },
changeData (record, index) { changeData (record, index) {
console.log(record, index)
let saveProductCategoryData = { let saveProductCategoryData = {
orgId: localStorage.getItem('orgId'), orgId: localStorage.getItem('orgId'),
productCategoryId: this.categoryName, productCategoryId: this.categoryName,
...@@ -171,6 +170,12 @@ export default { ...@@ -171,6 +170,12 @@ export default {
// 创建菜单 // 创建菜单
saveProductCategory () { saveProductCategory () {
let that = this let that = this
let reg = '^[0-9]*$'
debugger
if (!/^[0-9]*$/.test(this.sort)) {
this.$message.error('排序值为数字')
return false
}
if (this.productCategoryName === '') { if (this.productCategoryName === '') {
this.$message.error('分类名称不能为空') this.$message.error('分类名称不能为空')
} else if (this.sort === '') { } else if (this.sort === '') {
......
...@@ -293,7 +293,7 @@ export default { ...@@ -293,7 +293,7 @@ export default {
.mingPayOrderDetailItem{ .mingPayOrderDetailItem{
display: flex; display: flex;
width: 190px; width: 190px;
margin: 8px 0; margin: 15px 0;
} }
.mingPayOrderDetailItem > div:nth-of-type(1){ .mingPayOrderDetailItem > div:nth-of-type(1){
width: 40px; width: 40px;
...@@ -316,16 +316,20 @@ export default { ...@@ -316,16 +316,20 @@ export default {
text-overflow:ellipsis;/* 超出部分显示省略号 */ text-overflow:ellipsis;/* 超出部分显示省略号 */
white-space: nowrap;/*规定段落中的文本不进行换行 */ white-space: nowrap;/*规定段落中的文本不进行换行 */
width: 80px;/*需要配合宽度来使用*/ width: 80px;/*需要配合宽度来使用*/
color: black;
} }
.mingPayOrderDetailItem > div:nth-of-type(2) div:nth-of-type(2){ .mingPayOrderDetailItem > div:nth-of-type(2) div:nth-of-type(2){
overflow: hidden;/*超出部分隐藏*/ overflow: hidden;/*超出部分隐藏*/
text-overflow:ellipsis;/* 超出部分显示省略号 */ text-overflow:ellipsis;/* 超出部分显示省略号 */
white-space: nowrap;/*规定段落中的文本不进行换行 */ white-space: nowrap;/*规定段落中的文本不进行换行 */
width: 80px;/*需要配合宽度来使用*/ width: 80px;/*需要配合宽度来使用*/
color: #868686;
font-size: 12px;
} }
.mingPayOrderDetailItem > div:nth-of-type(3){ .mingPayOrderDetailItem > div:nth-of-type(3){
height: 40px; height: 40px;
text-align: right; text-align: right;
flex: 1; flex: 1;
color: black;
} }
</style> </style>
...@@ -254,6 +254,15 @@ export default { ...@@ -254,6 +254,15 @@ export default {
}) })
}, },
saveProduct () { saveProduct () {
const temp = /^\d+\.?\d{0,2}$/
if (!temp.test(this.addProduct.productPrice) || parseFloat(this.addProduct.productPrice) > 1000) {
this.$message.error('请输入正确的数字金额,最多保留小数点后两位')
return
}
if (!/^[0-9]*$/.test(this.addProduct.sort)) {
this.$message.error('排序值为数字')
return false
}
if (!this.addProduct.uploadSuccess || !this.addProduct.productName || !this.addProduct.productPrice || !this.addProduct.productIcon || !this.addProduct.sort) { if (!this.addProduct.uploadSuccess || !this.addProduct.productName || !this.addProduct.productPrice || !this.addProduct.productIcon || !this.addProduct.sort) {
this.$message.error('请完整填写栏目') this.$message.error('请完整填写栏目')
return false return false
......
...@@ -10,9 +10,7 @@ ...@@ -10,9 +10,7 @@
</div> </div>
<a-table :columns="columns" :dataSource="cashierManagementList" size="default" rowKey="id" :pagination="pagination" @change="handleTableChange"> <a-table :columns="columns" :dataSource="cashierManagementList" size="default" rowKey="id" :pagination="pagination" @change="handleTableChange">
<span slot="name">成员</span> <span slot="name">成员</span>
<span slot="createDate" slot-scope="createDate"> <span slot="createDate"></span>
{{ mwUtils.timeToStr(createDate) }}
</span>
<span slot="action" slot-scope="text, record, index"> <span slot="action" slot-scope="text, record, index">
<a v-if="record.status === '0'" href="javascript:;" @click="showModel(record, text, index)">删除</a> <a v-if="record.status === '0'" href="javascript:;" @click="showModel(record, text, index)">删除</a>
<a v-else href="javascript:;" style="color:#cccccc">已删除</a> <a v-else href="javascript:;" style="color:#cccccc">已删除</a>
...@@ -24,7 +22,6 @@ ...@@ -24,7 +22,6 @@
<script> <script>
import { config } from './../../../api/config.js' import { config } from './../../../api/config.js'
import { $http } from './../../../api/axios.js' import { $http } from './../../../api/axios.js'
import { mwUtils } from './../../../lib/utils.js'
export default { export default {
name: 'cashierManagement', name: 'cashierManagement',
data () { data () {
...@@ -44,8 +41,7 @@ export default { ...@@ -44,8 +41,7 @@ export default {
dataIndex: 'name' dataIndex: 'name'
}, { }, {
title: '时间', title: '时间',
dataIndex: 'createDate', dataIndex: 'createDate'
scopedSlots: { customRender: 'createDate' }
}, { }, {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
......
...@@ -10,9 +10,7 @@ ...@@ -10,9 +10,7 @@
</div> </div>
<a-table :columns="columns" :dataSource="cashierManagementList" size="default" rowKey="id" :pagination="pagination" @change="handleTableChange"> <a-table :columns="columns" :dataSource="cashierManagementList" size="default" rowKey="id" :pagination="pagination" @change="handleTableChange">
<span slot="name">成员</span> <span slot="name">成员</span>
<span slot="createDate" slot-scope="createDate"> <span slot="createDate">时间</span>
{{ mwUtils.timeToStr(createDate) }}
</span>
<span slot="action" slot-scope="text, record, index"> <span slot="action" slot-scope="text, record, index">
<a v-if="record.status === '0'" href="javascript:;" @click="showModel(record, text, index)">删除</a> <a v-if="record.status === '0'" href="javascript:;" @click="showModel(record, text, index)">删除</a>
<a v-else href="javascript:;" style="color:#cccccc">已删除</a> <a v-else href="javascript:;" style="color:#cccccc">已删除</a>
...@@ -24,7 +22,6 @@ ...@@ -24,7 +22,6 @@
<script> <script>
import { config } from './../../../api/config.js' import { config } from './../../../api/config.js'
import { $http } from './../../../api/axios.js' import { $http } from './../../../api/axios.js'
import { mwUtils } from './../../../lib/utils.js'
export default { export default {
name: 'cashierManagement', name: 'cashierManagement',
data () { data () {
...@@ -44,8 +41,7 @@ export default { ...@@ -44,8 +41,7 @@ export default {
dataIndex: 'name' dataIndex: 'name'
}, { }, {
title: '时间', title: '时间',
dataIndex: 'createDate', dataIndex: 'createDate'
scopedSlots: { customRender: 'createDate' }
}, { }, {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
......
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
<span slot="endTime" slot-scope="endTime"> <span slot="endTime" slot-scope="endTime">
{{ timeToStr(endTime) }} {{ timeToStr(endTime) }}
</span> </span>
<span slot="createTime" slot-scope="createTime"> <span slot="createTime"></span>
{{ timeToStr(createTime) }}
</span>
</a-table> </a-table>
</div> </div>
</template> </template>
...@@ -41,8 +39,7 @@ export default { ...@@ -41,8 +39,7 @@ export default {
scopedSlots: { customRender: 'endTime' } scopedSlots: { customRender: 'endTime' }
}, { }, {
title: '创建日期', title: '创建日期',
dataIndex: 'createTime', dataIndex: 'createTime'
scopedSlots: { customRender: 'createTime' }
}], }],
pagination: { pagination: {
current: 1, current: 1,
......
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