各种页面校验功能补充优化

This commit is contained in:
Chopper
2021-09-24 18:19:09 +08:00
parent 20042786aa
commit 7ebb5e21d2
13 changed files with 179 additions and 137 deletions

View File

@@ -107,20 +107,23 @@ export default {
{
title: "库存",
key: "quantity",
minWidth: 80,
},
{
title: "添加时间",
key: "createTime",
width: 170,
minWidth: 100,
},
{
title: "店铺名称",
key: "storeName",
minWidth: 100,
tooltip: true,
},
{
title: "佣金金额",
key: "commission",
minWidth: 100,
sortable: false,
render: (h, params) => {
return h(
@@ -134,7 +137,7 @@ export default {
key: "action",
align: "center",
fixed: "right",
width: 150,
minWidth: 100,
render: (h, params) => {
return h("div", [
h(

View File

@@ -21,7 +21,7 @@
/>
</Form-item>
<Form-item label="店铺名称">
<Select v-model="searchForm.shopId" placeholder="请选择" @on-query-change="searchChange" filterable
<Select v-model="searchForm.storeId" placeholder="请选择" @on-query-change="searchChange" filterable
clearable style="width: 150px">
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.storeName }}</Option>
</Select>
@@ -91,17 +91,19 @@
{
title: "订单编号",
key: "orderSn",
minWidth: 100,
minWidth: 180,
fixed: "left",
tooltip: true
},
{
title: '商品信息',
slot: 'goodsMsg',
minWidth: 120
minWidth: 150
},
{
title: "退款金额",
key: "returnMoney",
minWidth:80,
sortable: false,
render: (h, params) => {
if(params.row.sellBackRebate == null){
@@ -114,23 +116,24 @@
{
title: "分销商",
key: "distributionName",
tooltip: true
tooltip: true,
minWidth:80,
},
{
title: "店铺名称",
key: "storeName",
minWidth:80,
tooltip: true
},
{
title: "状态",
slot: "distributionOrderStatus",
width: 120,
minWidth:80,
},
{
title: "佣金金额",
key: "rebateGrade",
width: 120,
minWidth:80,
sortable: false,
render: (h, params) => {
if(params.row.rebate == null){
@@ -142,9 +145,10 @@
}
},
{
fixed: "right",
title: "创建时间",
key: "createTime",
width: 180,
minWidth:100,
sortable: false,
}
],

View File

@@ -1,20 +1,20 @@
<template>
<div style="background-color: #fff;">
<Form ref="form" :model="form" :label-width="120" style="padding: 10px;">
<Form ref="form" :model="form" :rules="formRule" :label-width="120" style="padding: 10px;">
<Divider orientation="left">分销设置</Divider>
<FormItem label="是否开启分销" prop="distribution">
<FormItem label="是否开启分销" prop="isOpen">
<i-switch size="large" v-model="form.isOpen" :true-value="true" :false-value="false">
<span slot="open">开启</span>
<span slot="close">关闭</span>
</i-switch>
</FormItem>
<FormItem label="分销关系绑定天数" prop="distributionDay">
<InputNumber :min="1" style="width:100px;" v-model="form.distributionDay"></InputNumber>
<InputNumber :min="1" :max="365" style="width:100px;" v-model="form.distributionDay"></InputNumber>
</FormItem>
<FormItem label="分销结算天数" prop="cashDay">
<InputNumber :min="1" style="width:100px;" v-model="form.cashDay"></InputNumber>
<InputNumber :min="1" :max="365" style="width:100px;" v-model="form.cashDay"></InputNumber>
</FormItem>
<FormItem>
<Button type="primary" @click="submit">保存</Button>
@@ -25,15 +25,27 @@
<script>
import { setSetting, getSetting } from "@/api/index";
import { regular } from "@/utils";
export default {
name: "distributionSetting",
data() {
return {
form: {
// 添加或编辑表单对象初始化数据
isOpen: "",
isOpen: true,
distributionDay: 0, //分销关系绑定天数
cashDay: 0, //分销结算天数
},
formRule: {
isOpen: [
regular.REQUIRED
],
distributionDay: [
regular.REQUIRED
],
cashDay: [
regular.REQUIRED
],
}
};
},