表单列表修改
This commit is contained in:
parent
d45c3e80fe
commit
bf13d95f7b
|
|
@ -2,8 +2,17 @@
|
||||||
<div class="page-body">
|
<div class="page-body">
|
||||||
|
|
||||||
<vxe-form :data="options.formOptions.data" ref="xForm" :title-width="options.formOptions.titleWidth"
|
<vxe-form :data="options.formOptions.data" ref="xForm" :title-width="options.formOptions.titleWidth"
|
||||||
:title-align="options.formOptions.titleAlign" :rules="options.formOptions.rules" :items="options.formOptions.items"
|
:title-align="options.formOptions.titleAlign" :rules="options.formOptions.rules"
|
||||||
titleColon>
|
titleColon>
|
||||||
|
<vxe-form-item v-for="(item,index) in options.formOptions.items" :title="item.title" :field="item.field" :span="item.span" :key="index" :item-render="item.itemRender">
|
||||||
|
<div v-if="item.isTitle" class="Htitle">
|
||||||
|
<div class="left-line"></div>
|
||||||
|
<p class="Htitle-p">
|
||||||
|
{{ item.Htitle }}
|
||||||
|
</p>
|
||||||
|
<div class="right-line"></div>
|
||||||
|
</div>
|
||||||
|
</vxe-form-item>
|
||||||
</vxe-form>
|
</vxe-form>
|
||||||
|
|
||||||
<div class="footerbar">
|
<div class="footerbar">
|
||||||
|
|
@ -194,6 +203,7 @@ export default {
|
||||||
|
|
||||||
.footerbar {
|
.footerbar {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.imagePanel {
|
.imagePanel {
|
||||||
|
|
@ -206,4 +216,16 @@ export default {
|
||||||
height: 80px;
|
height: 80px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.Htitle{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #122ed1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 10px;
|
||||||
|
.Htitle-p{margin-bottom: 0;margin: 0 10px;}
|
||||||
|
.left-line{width: 40px;height: 1px;background-color:#122ed1;}
|
||||||
|
.right-line{flex-grow: 1;height: 1px;background-color:#122ed1;}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<basic-page-edit :desc="desc" :dataId="getDataId()" :options="pageOptions"></basic-page-edit>
|
<basic-page-edit :dataId="getDataId()" :options="pageOptions"></basic-page-edit>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -102,14 +102,14 @@ export default {
|
||||||
total_count: 0,
|
total_count: 0,
|
||||||
last_time: "",
|
last_time: "",
|
||||||
remark: "",
|
remark: "",
|
||||||
status: 0,
|
status: 1,
|
||||||
total_balance: 0,
|
total_balance: 0,
|
||||||
total_amount: 0,
|
total_amount: 0,
|
||||||
create_uid: 0,
|
create_uid: 0,
|
||||||
update_uid: 0,
|
update_uid: 0,
|
||||||
},
|
},
|
||||||
// 标题宽度
|
// 标题宽度
|
||||||
titleWidth: 150,
|
titleWidth: 125,
|
||||||
// 标题对齐方式
|
// 标题对齐方式
|
||||||
titleAlign: 'right',
|
titleAlign: 'right',
|
||||||
|
|
||||||
|
|
@ -164,21 +164,22 @@ export default {
|
||||||
// 表单项
|
// 表单项
|
||||||
items: [
|
items: [
|
||||||
// =============================== 表单项 自动生成 Start ===============================
|
// =============================== 表单项 自动生成 Start ===============================
|
||||||
|
{field:'',title:'',span:24,isTitle:true,Htitle:'客户/供应商信息',itemRender:{}},//分割线
|
||||||
{field: 'code', title: '编码', span: 12, itemRender: {name: '$input'}},
|
{field: 'code', title: '编码', span: 12, itemRender: {name: '$input'}},
|
||||||
{field: 'name', title: '名称', span: 12, itemRender: {name: '$input'}},
|
{field: 'name', title: '名称', span: 12, itemRender: {name: '$input'}},
|
||||||
|
{field: 'type', title: '类型', span: 6, itemRender: { name: '$select', props: { options:[{value:"0",label:"客户"},{value:"1",label:"供应商"}] } }},
|
||||||
|
{field: 'level', title: '等级', span: 6, itemRender: {name: '$input',props: {type: "number"},}},
|
||||||
|
{field: 'source', title: '来源', span: 6, itemRender: {name: '$input'}},
|
||||||
|
{field: 'industry', title: '行业', span: 6, itemRender: {name: '$input'}},
|
||||||
|
{field: 'area', title: '区域', span: 6, itemRender: {name: '$input'}},
|
||||||
|
{field: 'contact', title: '联系人', span: 6, itemRender: {name: '$input'}},
|
||||||
|
{field: 'contact_phone', title: '联系人电话', span: 6, itemRender: {name: '$input',props: {type: "number"},}},
|
||||||
|
{field: 'contact_position', title: '联系人职位', span: 6, itemRender: {name: '$input'}},
|
||||||
|
{field: 'address', title: '地址', span: 24, itemRender: {name: '$input'}},
|
||||||
{field: 'description', title: '描述', span: 24, itemRender: {name: '$input'}},
|
{field: 'description', title: '描述', span: 24, itemRender: {name: '$input'}},
|
||||||
{field: 'type', title: '客户类型', span: 6, itemRender: {name: '$input'}},
|
{field: 'remark', title: '备注', span: 24, itemRender: {name: '$input'}},
|
||||||
{field: 'level', title: '客户等级', span: 6, itemRender: {name: '$input'}},
|
{field: 'status', title: '状态', span: 12, itemRender: { name: '$switch', props: { openLabel: '启用', openValue: 1, closeValue: 0, closeLabel: '禁用' } }},
|
||||||
{field: 'source', title: '客户来源', span: 6, itemRender: {name: '$input'}},
|
|
||||||
{field: 'industry', title: '客户行业', span: 6, itemRender: {name: '$input'}},
|
|
||||||
{field: 'area', title: '客户区域', span: 6, itemRender: {name: '$input'}},
|
|
||||||
{field: 'contact', title: '客户联系人', span: 6, itemRender: {name: '$input'}},
|
|
||||||
{field: 'contact_phone', title: '客户联系人电话', span: 6, itemRender: {name: '$input'}},
|
|
||||||
{field: 'contact_position', title: '客户联系人职位', span: 6, itemRender: {name: '$input'}},
|
|
||||||
{field: 'address', title: '客户地址', span: 24, itemRender: {name: '$input'}},
|
|
||||||
{field: 'remark', title: '备注', span: 12, itemRender: {name: '$input'}},
|
|
||||||
{field: 'status', title: '状态', span: 12, itemRender: {name: '$select',}},
|
|
||||||
|
|
||||||
// =============================== 表单项 自动生成 End ===============================
|
// =============================== 表单项 自动生成 End ===============================
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<page-layout :desc="desc">
|
<!-- <page-layout :desc="desc"> -->
|
||||||
<div class="page-body">
|
<div class="page-body">
|
||||||
|
|
||||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||||
|
|
@ -19,19 +19,19 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</page-layout>
|
<!-- </page-layout> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BASE_URL from '@/services/Middle/transport/DriverWages/api.js';
|
import BASE_URL from '@/services/Middle/transport/DriverWages/api.js';
|
||||||
import PageLayout from '@/layouts/PageLayout'
|
// import PageLayout from '@/layouts/PageLayout'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
name: 'DriverWagesUpdate',
|
name: 'DriverWagesUpdate',
|
||||||
i18n: require('./i18n'),
|
i18n: require('./i18n'),
|
||||||
components: {PageLayout},
|
// components: {PageLayout},
|
||||||
props: {
|
props: {
|
||||||
pageMode: {
|
pageMode: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<page-layout :desc="desc">
|
<!-- <page-layout :desc="desc"> -->
|
||||||
<div class="page-body">
|
<div class="page-body">
|
||||||
|
|
||||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||||
|
|
@ -19,19 +19,19 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</page-layout>
|
<!-- </page-layout> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BASE_URL from '@/services/Middle/transport/Maintenance/api.js';
|
import BASE_URL from '@/services/Middle/transport/Maintenance/api.js';
|
||||||
import PageLayout from '@/layouts/PageLayout'
|
// import PageLayout from '@/layouts/PageLayout'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
name: 'MaintenanceUpdate',
|
name: 'MaintenanceUpdate',
|
||||||
i18n: require('./i18n'),
|
i18n: require('./i18n'),
|
||||||
components: {PageLayout},
|
// components: {PageLayout},
|
||||||
props: {
|
props: {
|
||||||
pageMode: {
|
pageMode: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -115,7 +115,7 @@ export default {
|
||||||
|
|
||||||
{field: 'code', title: '编码', span: 12, itemRender: {name: '$input'}},
|
{field: 'code', title: '编码', span: 12, itemRender: {name: '$input'}},
|
||||||
{field: 'name', title: '名称', span: 12, itemRender: {name: '$input'}},
|
{field: 'name', title: '名称', span: 12, itemRender: {name: '$input'}},
|
||||||
{field: 'description', title: '描述', span: 12, itemRender: {name: '$input'}},
|
{field: 'description', title: '描述', span: 24, itemRender: {name: '$input'}},
|
||||||
|
|
||||||
// =============================== 表单项 自动生成 End ===============================
|
// =============================== 表单项 自动生成 End ===============================
|
||||||
]
|
]
|
||||||
|
|
@ -297,6 +297,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.footerbar {
|
.footerbar {
|
||||||
|
padding-top: 20px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ export default {
|
||||||
update_uid: 0,
|
update_uid: 0,
|
||||||
},
|
},
|
||||||
// 标题宽度
|
// 标题宽度
|
||||||
titleWidth: 150,
|
titleWidth: 125,
|
||||||
// 标题对齐方式
|
// 标题对齐方式
|
||||||
titleAlign: 'right',
|
titleAlign: 'right',
|
||||||
|
|
||||||
|
|
@ -129,12 +129,12 @@ export default {
|
||||||
// 表单项
|
// 表单项
|
||||||
items: [
|
items: [
|
||||||
// =============================== 表单项 自动生成 Start ===============================
|
// =============================== 表单项 自动生成 Start ===============================
|
||||||
|
{field:'',title:'',span:24,isTitle:true,Htitle:'土质物料信息',itemRender:{}},//分割线
|
||||||
{field: 'code', title: '编码', span: 12, itemRender: {name: '$input'}},
|
{field: 'code', title: '编码', span: 8, itemRender: {name: '$input'}},
|
||||||
{field: 'name', title: '品名', span: 12, itemRender: {name: '$input'}},
|
{field: 'name', title: '品名', span: 8, itemRender: {name: '$input'}},
|
||||||
{field: 'description', title: '描述', span: 12, itemRender: {name: '$input'}},
|
{field: 'image', title: '图片', span: 8, itemRender: {name: '$input'}},
|
||||||
{field: 'image', title: '图片', span: 12, itemRender: {name: '$input'}},
|
{field: 'description', title: '描述', span: 24, itemRender: {name: '$input'}},
|
||||||
{field: 'remark', title: '备注', span: 12, itemRender: {name: '$input'}},
|
{field: 'remark', title: '备注', span: 24, itemRender: {name: '$input'}},
|
||||||
|
|
||||||
|
|
||||||
// =============================== 表单项 自动生成 End ===============================
|
// =============================== 表单项 自动生成 End ===============================
|
||||||
|
|
|
||||||
|
|
@ -77,33 +77,17 @@
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tablebox" v-if="formOptions.data.is_oil == 1">
|
<div class="tablebox">
|
||||||
<div class="Htitle" style="margin-bottom: 20px;">
|
<div class="Htitle" style="margin-bottom: 20px;">
|
||||||
<div class="left-line"></div>
|
<div class="left-line"></div>
|
||||||
<p class="Htitle-p">加油信息</p>
|
<p class="Htitle-p">加油信息</p>
|
||||||
<div class="right-line"></div>
|
<div class="right-line"></div>
|
||||||
</div>
|
</div>
|
||||||
<vxe-table border show-overflow keep-source ref="xTable3" :data="tableData"
|
<vxe-form :data="formOptions.data.oil_consumption" :title-width="formOptions.titleWidth"
|
||||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, }">
|
:title-align="formOptions.titleAlign">
|
||||||
<vxe-column width="60">
|
<vxe-form-item v-for="(item,index) in formOptions2.items" :title="item.title" :field="item.field" :span="item.span" :key="index" :item-render="item.itemRender">
|
||||||
<template #default="{ row }">
|
</vxe-form-item>
|
||||||
<div style="font-size: 18px;">
|
</vxe-form>
|
||||||
<a @click.stop="pageAdd(row)" title="新增" style="margin-right: 5px;">
|
|
||||||
<a-icon type="plus-circle" />
|
|
||||||
</a>
|
|
||||||
<a @click.stop="pageDelete(row)" title="删除">
|
|
||||||
<a-icon type="delete" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</vxe-column>
|
|
||||||
<vxe-column type="seq" width="60"></vxe-column>
|
|
||||||
<vxe-column field="name" title="加油数量" :edit-render="{ name: '$input',props: { type: 'number' }}"></vxe-column>
|
|
||||||
<vxe-column field="name1" title="油费单价" formatter="formatNumber" :edit-render="{ name: '$input',props: { type: 'number' } }"></vxe-column>
|
|
||||||
<vxe-column field="name2" title="油费总价" :edit-render="{ name: '$input',props: { type: 'number' } }"></vxe-column>
|
|
||||||
<vxe-column field="age" title="备注" :edit-render="{ name: '$input' }"></vxe-column>
|
|
||||||
|
|
||||||
</vxe-table>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tablebox">
|
<div class="tablebox">
|
||||||
<div class="Htitle" style="margin-bottom: 20px;">
|
<div class="Htitle" style="margin-bottom: 20px;">
|
||||||
|
|
@ -236,6 +220,12 @@ export default {
|
||||||
customer_warehousing_tonnage: 0,
|
customer_warehousing_tonnage: 0,
|
||||||
driver_salary: 0,
|
driver_salary: 0,
|
||||||
driver_subsidy: 0,
|
driver_subsidy: 0,
|
||||||
|
oil_consumption:{
|
||||||
|
oil_consumption_number:null,
|
||||||
|
oil_consumption_price:null,
|
||||||
|
oil_consumption_total_price:null,
|
||||||
|
oil_consumption_remark:null,
|
||||||
|
},
|
||||||
other_expenses_log:[{
|
other_expenses_log:[{
|
||||||
other_expenses_amount:null,
|
other_expenses_amount:null,
|
||||||
other_expenses_name: "",
|
other_expenses_name: "",
|
||||||
|
|
@ -533,7 +523,6 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// {field: 'income', title: '收入', span: 8, itemRender: {name: '$input', props: {type: "number"}}},
|
// {field: 'income', title: '收入', span: 8, itemRender: {name: '$input', props: {type: "number"}}},
|
||||||
// {field: 'cost', title: '成本', span: 8, itemRender: {name: '$input', props: {type: "number"}}},
|
// {field: 'cost', title: '成本', span: 8, itemRender: {name: '$input', props: {type: "number"}}},
|
||||||
// {field: 'profit', title: '利润', span: 8, itemRender: {name: '$input', props: {type: "number"}}},
|
// {field: 'profit', title: '利润', span: 8, itemRender: {name: '$input', props: {type: "number"}}},
|
||||||
|
|
@ -541,6 +530,14 @@ export default {
|
||||||
// =============================== 表单项 自动生成 End ===============================
|
// =============================== 表单项 自动生成 End ===============================
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
formOptions2:{
|
||||||
|
items: [
|
||||||
|
{field: "oil_consumption_number", title: '油耗数量', span: 4, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber } }},
|
||||||
|
{field: "oil_consumption_price", title: '油耗单价', span: 4, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber } }},
|
||||||
|
{field: "oil_consumption_total_price", title: '油耗总价', span: 4, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber }}},
|
||||||
|
{field: "oil_consumption_remark", title: '油耗备注', span: 12, itemRender: {name: '$input'}},
|
||||||
|
]
|
||||||
|
},
|
||||||
// 新增模式表单项
|
// 新增模式表单项
|
||||||
addModeItems: [],
|
addModeItems: [],
|
||||||
tableData: [
|
tableData: [
|
||||||
|
|
@ -698,7 +695,11 @@ export default {
|
||||||
},
|
},
|
||||||
handleInputNumber(e){
|
handleInputNumber(e){
|
||||||
if(e.field){
|
if(e.field){
|
||||||
|
if(e.field.includes('oil_consumption')){
|
||||||
|
this.formOptions.data.oil_consumption[e.field] = Number(this.formOptions.data.oil_consumption[e.field])
|
||||||
|
}else{
|
||||||
this.formOptions.data[e.field] = Number(this.formOptions.data[e.field])
|
this.formOptions.data[e.field] = Number(this.formOptions.data[e.field])
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue