Browse Source

1. 总成模块管理-导出功能包含零件信息(目前不包含) V

导出时包含子零件:包含长描述,父零件编码,父零件描述,子零件编码,子零件描述,车型,创建日期 V
2. 总成模块管理-加长描述字段, V
3. 总成模块管理-隐藏增删改功能 V
FoShanPG
yunfeng.liu 3 years ago
parent
commit
d80e2ab2f7
  1. 10
      vue/src/router/modules/fis.js
  2. 481
      vue/src/views/pg-fis/basedate/assemblyCfg/index.vue

10
vue/src/router/modules/fis.js

@ -36,6 +36,16 @@ const pgfis = {
icon: '发货' icon: '发货'
} }
}, },
{
path: '/pg-partSwitch',
component: () => import('@/views/pg-fis/basedate/partSwitch'),
name: 'pg-partSwitch',//命名路由
meta: {
title: '零件切换管理',
roles: ['SettleAccount.Reports'],
icon: '发货'
}
},
{ {
path: '/pg-unknownAssembly', path: '/pg-unknownAssembly',
component: () => import('@/views/pg-fis/basedate/unknownAssembly'), component: () => import('@/views/pg-fis/basedate/unknownAssembly'),

481
vue/src/views/pg-fis/basedate/assemblyCfg/index.vue

@ -3,135 +3,50 @@
<div class="cr-body-content"> <div class="cr-body-content">
<div ref="box"> <div ref="box">
<flexbox class="content-header"> <flexbox class="content-header">
<el-form <el-form :model="listQuery" ref="queryForm" v-show="showSearch" :inline="true">
:model="listQuery" <el-form-item label="总成编码" prop="erpAssemblyCode" class="forimitem">
ref="queryForm" <el-input v-model="listQuery.erpAssemblyCode" placeholder="请输入总成编码" clearable size="small" style="width: 240px"
v-show="showSearch" @keyup.enter.native="handleQuery" />
:inline="true"
>
<el-form-item
label="总成编码"
prop="ErpAssemblyCode"
class="forimitem"
>
<el-input
v-model="listQuery.ErpAssemblyCode"
placeholder="请输入总成编码"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="总成名称" prop="erpAssemblyName" class="forimitem">
label="总成名称" <el-input v-model="listQuery.erpAssemblyName" placeholder="请输入总成名称" clearable size="small" style="width: 240px"
prop="ErpAssemblyName" @keyup.enter.native="handleQuery" />
class="forimitem"
>
<el-input
v-model="listQuery.ErpAssemblyName"
placeholder="请输入总成名称"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="长描述" prop="groupCode" class="forimitem">
label="车型:" <el-input v-model="listQuery.groupCode" placeholder="请输入长描述" clearable size="small" style="width: 240px"
prop="vehicleModelCode" @keyup.enter.native="handleQuery" />
class="forimitem" </el-form-item>
>
<el-select <el-form-item label="车型:" prop="vehicleModelCode" class="forimitem">
v-model="listQuery.vehicleModelCode" <el-select v-model="listQuery.vehicleModelCode" clearable placeholder="请选择" size="medium" style="margin-right: 15px"
clearable @change="valueselectChange">
placeholder="请选择" <el-option v-for="item in vehicleModelList" :key="item.id" :label="item.dicItemName" :value="item.dicItemCode" />
size="medium"
style="margin-right: 15px"
@change="valueselectChange"
>
<el-option
v-for="item in vehicleModelList"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker <el-date-picker v-model="listQuery.createTimeValue" size="small" style="width: 380px" value-format="yyyy-MM-dd HH:mm:ss"
v-model="listQuery.CreateTimeValue" type="datetimerange" :default-time="['00:00:00', '23:59:59']" range-separator="-" start-placeholder="开始日期"
size="small" end-placeholder="结束日期"></el-date-picker>
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item class="formitem"> <el-form-item class="formitem">
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleFilter">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery('queryForm')">重置</el-button>
icon="el-icon-search" <el-button type="warning" plain icon="el-icon-download" size="mini" style="margin-left: 15px" @click="handleDownload()">导出(Excel)
size="mini"
@click="handleFilter"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery('queryForm')"
>重置</el-button
>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
style="margin-left: 15px"
@click="handleDownload()"
>导出(Excel)
</el-button> </el-button>
</el-form-item> </el-form-item>
<!-- <el-divider class="divider1" ></el-divider> --> <!-- <el-divider class="divider1" ></el-divider> -->
<el-form-item style="margin-bottom: 0px; "> <el-form-item style="margin-bottom: 0px; ">
<el-button <el-button class="filter-item" size="mini" type="primary" icon="el-icon-plus" @click="handleCreate" disabled>新增
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>新增
</el-button> </el-button>
<el-button <el-button class="filter-item" size="mini" type="primary" icon="el-icon-edit" @click="handleUpdate" disabled>修改
class="filter-item"
size="mini"
type="primary"
icon="el-icon-edit"
@click="handleUpdate"
>修改
</el-button> </el-button>
<el-button <el-button class="filter-item" size="mini" type="primary" icon="el-icon-delete" @click="handleDelete" disabled>删除
class="filter-item"
size="mini"
type="primary"
icon="el-icon-delete"
@click="handleDelete"
>删除
</el-button> </el-button>
<el-button <el-button class="filter-item" size="mini" type="primary" icon="el-icon-plus" @click="handleImportSAP" disabled>导入SAP对接
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="handleImportSAP"
>导入SAP对接
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -139,51 +54,21 @@
</div> </div>
<div class="l-table"> <div class="l-table">
<!--表格渲染--> <!--表格渲染-->
<el-table <el-table ref="multipleTable" v-loading="listLoading" element-loading-text="拼命加载中..." element-loading-spinner="el-icon-loading"
ref="multipleTable" class="cr-table" :data="list" :height="tableHeight" :cell-style="cellStyle" :header-cell-style="headerRowStyle"
v-loading="listLoading" size="small" stripe border highlight-current-row style="width: 100%" @sort-change="sortChange" @selection-change="handleSelectionChange"
element-loading-text="拼命加载中..." @row-click="handleRowClick">
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeight"
:cell-style="cellStyle"
:header-cell-style="headerRowStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<el-table-column type="selection" width="44px"></el-table-column> <el-table-column type="selection" width="44px"></el-table-column>
<el-table-column <el-table-column label="ERP总成编码" prop="erpAssemblyCode" sortable="custom" align="center" width="180px">
label="ERP总成编码"
prop="erpAssemblyCode"
sortable="custom"
align="center"
width="180px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{ <span class="link-type" @click="handleDrawerOpen(scope.row)">{{
scope.row.erpAssemblyCode scope.row.erpAssemblyCode
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-for="(item, index) in getDefaultField" :key="index" :prop="item.prop" :label="item.label"
v-for="(item, index) in getDefaultField" :min-width="item.width" :formatter="fieldFormatter" sortable="custom" show-overflow-tooltip :gutter="0">
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable="custom"
show-overflow-tooltip
:gutter="0"
>
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
{{ scope.column.label }} {{ scope.column.label }}
</template> </template>
@ -191,32 +76,15 @@
</el-table> </el-table>
<!--表单渲染--> <!--表单渲染-->
<el-dialog <el-dialog :visible.sync="dialogFormVisible" :close-on-click-modal="false" :title="formTitle" width="700px" @close="closeDialog">
:visible.sync="dialogFormVisible" <el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="120px">
:close-on-click-modal="false"
:title="formTitle"
width="700px"
@close="closeDialog"
>
<el-form
ref="form"
:inline="true"
:model="form"
:rules="rules"
size="small"
label-width="120px"
>
<el-row> <el-row>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="总成编码:" required /> <el-form-item label="总成编码:" required />
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item prop="erpAssemblyCode"> <el-form-item prop="erpAssemblyCode">
<el-input <el-input style="width: 400px" v-model="form.erpAssemblyCode" :disabled="isEdit" />
style="width: 400px"
v-model="form.erpAssemblyCode"
:disabled="isEdit"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -227,11 +95,7 @@
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item prop="erpAssemblyName"> <el-form-item prop="erpAssemblyName">
<el-input <el-input style="width: 400px" v-model="form.erpAssemblyName" :disabled="isEdit" />
style="width: 400px"
v-model="form.erpAssemblyName"
:disabled="isEdit"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -257,81 +121,33 @@
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item prop="vehicleModel"> <el-form-item prop="vehicleModel">
<el-select <el-select style="width: 200px" v-model="form.vehicleModel" :disabled="isEdit">
style="width: 200px" <el-option v-for="item in vehicleModelList" :key="item.id" :label="item.dicItemName" :value="item.dicItemCode" />
v-model="form.vehicleModel"
:disabled="isEdit"
>
<el-option
v-for="item in vehicleModelList"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-table <el-table ref="DetialTable" v-loading="listLoading" element-loading-text="拼命加载中..." element-loading-spinner="el-icon-loading"
ref="DetialTable" class="cr-table" :data="form.details" :height="detailTableHeight" :cell-style="cellStyle" :header-cell-style="headerRowStyle"
v-loading="listLoading" size="small" stripe border highlight-current-row style="width: 100%" @row-click="handleRowClick">
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="form.details"
:height="detailTableHeight"
:cell-style="cellStyle"
:header-cell-style="headerRowStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@row-click="handleRowClick"
>
<!-- <el-table-column type="selection" width="44px"></el-table-column> --> <!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column <el-table-column prop="partCode" label="客户零件代码" width="150px">
prop="partCode"
label="客户零件代码"
width="150px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input v-model="scope.row.partCode" size="mini" style="width: 135px"></el-input>
v-model="scope.row.partCode"
size="mini"
style="width: 135px"
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="description" label="客户零件名称"> <el-table-column prop="description" label="客户零件名称">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input v-model="scope.row.description" size="mini"></el-input>
v-model="scope.row.description"
size="mini"
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="partNum" label="客户零件数量" width="120px">
prop="partNum"
label="客户零件数量"
width="120px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number <el-input-number v-model="scope.row.partNum" :min="1" size="mini" style="width: 100px"></el-input-number>
v-model="scope.row.partNum"
:min="1"
size="mini"
style="width: 100px"
></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="isKey" label="是否Key件" align="center" width="80px">
prop="isKey"
label="是否Key件"
align="center"
width="80px"
>
<!-- label-class-name="DisabledSelection" 去除列头全选--> <!-- label-class-name="DisabledSelection" 去除列头全选-->
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.isKey"></el-checkbox> <el-checkbox v-model="scope.row.isKey"></el-checkbox>
@ -344,18 +160,10 @@
</el-table-column> --> </el-table-column> -->
<el-table-column prop="description" width="35px"> <el-table-column prop="description" width="35px">
<template slot="header"> <template slot="header">
<el-button <el-button @click="handleAddDetails" icon="el-icon-plus" type="text"></el-button>
@click="handleAddDetails"
icon="el-icon-plus"
type="text"
></el-button>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button @click="handleDeleteDetails(scope.$index, scope.row)" icon="el-icon-minus" type="text"></el-button>
@click="handleDeleteDetails(scope.$index, scope.row)"
icon="el-icon-minus"
type="text"
></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -363,46 +171,23 @@
</el-form> </el-form>
<!--表格渲染--> <!--表格渲染-->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="text" @click="dialogFormVisible = false" <el-button type="text" @click="dialogFormVisible = false">取消</el-button>
>取消</el-button <el-button v-loading="formLoading" type="primary" @click="save()">确认</el-button>
>
<el-button v-loading="formLoading" type="primary" @click="save()"
>确认</el-button
>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
<div class="table-footer"> <div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"--> <!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination <pagination v-show="totalCount > 0" :total="totalCount" :page.sync="page" :limit.sync="listQuery.maxResultCount"
v-show="totalCount > 0" @pagination="getList" />
:total="totalCount"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
<!-- 导入Excel组件 --> <!-- 导入Excel组件 -->
<importExcel <importExcel ref="importexcel" :show="showExcelImport" :crmType="crmType" @close="importExcelData" />
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div> </div>
<!-- 抽屉控件 --> <!-- 抽屉控件 -->
<el-drawer <el-drawer title="信息详细页" size="75%" direction="rtl" :visible.sync="drawer" :before-close="handleDrawerClose">
title="信息详细页"
size="75%"
direction="rtl"
:visible.sync="drawer"
:before-close="handleDrawerClose"
>
<div> <div>
<Detail <Detail v-bind:customerInfos="customerInfos" style="margin-top: -35px"></Detail>
v-bind:customerInfos="customerInfos"
style="margin-top: -35px"
></Detail>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
@ -416,13 +201,23 @@ import importExcel from "@/components/ImportTxt";
import Lockr from "lockr"; import Lockr from "lockr";
import moment from "moment"; import moment from "moment";
import Detail from "./detail.vue"; import Detail from "./detail.vue";
import { downloadFile } from "@/utils/crmindex.js"; import {
downloadFile
} from "@/utils/crmindex.js";
// //
const bomUnit = [ const bomUnit = [{
{ key: 0, display_name: "PC" }, key: 0,
{ key: 1, display_name: "TON" }, display_name: "PC"
{ key: 2, display_name: "Other" }, },
{
key: 1,
display_name: "TON"
},
{
key: 2,
display_name: "Other"
},
]; ];
const projectTypeKeyValue = bomUnit.reduce((acc, cur) => { const projectTypeKeyValue = bomUnit.reduce((acc, cur) => {
acc[cur.key] = cur.display_name; acc[cur.key] = cur.display_name;
@ -431,8 +226,15 @@ const projectTypeKeyValue = bomUnit.reduce((acc, cur) => {
export default { export default {
name: "AssemblyCfgERP", name: "AssemblyCfgERP",
components: { Pagination, CRMTableHead, importExcel, Detail }, components: {
directives: { permission }, Pagination,
CRMTableHead,
importExcel,
Detail
},
directives: {
permission
},
filters: { filters: {
IsCustomerSignFilter(status) { IsCustomerSignFilter(status) {
// //
@ -455,9 +257,11 @@ export default {
return { return {
crmType: "AssemblyCfgERP", crmType: "AssemblyCfgERP",
rules: { rules: {
erpAssemblyName: [ erpAssemblyName: [{
{ required: true, message: "必须输入!", trigger: "blur" }, required: true,
], message: "必须输入!",
trigger: "blur"
}, ],
}, },
valueSelect: "", valueSelect: "",
customerInfos: [], customerInfos: [],
@ -480,19 +284,16 @@ export default {
}, },
}, },
listQuery: { listQuery: {
CreateTimeValue: [], createTimeValue: [],
BeginCreateTime: undefined, beginCreateTime: undefined,
EndCreateTime: undefined, endCreateTime: undefined,
SkipCount: 0, skipCount: 0,
MaxResultCount: 15, maxResultCount: 15,
ErpAssemblyName: undefined,
ErpAssemblyCode: undefined,
vehicleModel: undefined,
},
listExportQuery: {
erpAssemblyCode: undefined,
erpAssemblyName: undefined, erpAssemblyName: undefined,
erpAssemblyCode: undefined,
vehicleModel: undefined,
}, },
vehicleModelQuery: { vehicleModelQuery: {
dicTypeName: "派格车型", dicTypeName: "派格车型",
}, },
@ -505,12 +306,12 @@ export default {
bomUnit, bomUnit,
multipleSelection: [], multipleSelection: [],
drawer: false,
dialogFormVisible: false, dialogFormVisible: false,
formTitle: "", formTitle: "",
isEdit: false, isEdit: false,
formLoading: false, formLoading: false,
dialogFormVisible: false,
tableHeight: document.documentElement.clientHeight - 280, tableHeight: document.documentElement.clientHeight - 280,
detailTableHeight: 250, detailTableHeight: 250,
details: [], // details: [], //
@ -541,20 +342,21 @@ export default {
width: 180, width: 180,
}); });
tempsTabs.push({ tempsTabs.push({
label: "ERP总成版本", label: "长描述",
prop: "erpAssemblyVersion", prop: "groupCode",
width: 100, width: 240,
});
tempsTabs.push({
label: "创建时间",
prop: "creationTime",
width: 100,
}); });
tempsTabs.push({ tempsTabs.push({
label: "车型代码", label: "车型代码",
prop: "vehicleModel", prop: "vehicleModel",
width: 120, width: 120,
}); });
tempsTabs.push({
label: "创建时间",
prop: "creationTime",
width: 100,
});
return tempsTabs; return tempsTabs;
}, },
}, },
@ -563,11 +365,9 @@ export default {
handleDrawerOpen(param) { handleDrawerOpen(param) {
this.drawer = true; this.drawer = true;
var parentId = param.id; //id var parentId = param.id; //id
this.customerInfos = [ this.customerInfos = [{
{
ParentId: parentId, ParentId: parentId,
}, }, ];
];
}, },
handleDrawerClose(done) { handleDrawerClose(done) {
done(); done();
@ -668,8 +468,7 @@ export default {
// }); // });
this.$confirm( this.$confirm(
"是否删除总成" + this.multipleSelection[0].erpAssemblyCode + "?", "是否删除总成" + this.multipleSelection[0].erpAssemblyCode + "?",
"提示", "提示", {
{
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
@ -711,11 +510,10 @@ export default {
/** 导出功能 */ /** 导出功能 */
handleDownload() { handleDownload() {
this.listLoading = true; this.listLoading = true;
this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode;
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; console.log(JSON.stringify(this.listQuery));
console.log(JSON.stringify(this.listExportQuery));
this.$axios this.$axios
.posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery) .posts("/api/newjit/assembly-cfg-erp/export", this.listQuery)
.then((res) => { .then((res) => {
let filename = res.item; let filename = res.item;
this.$axios this.$axios
@ -751,11 +549,11 @@ export default {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
this.getvehicleModel(); this.getvehicleModel();
this.handleQuery(); this.handleQuery();
this.listQuery.CreateTimeValue = []; this.listQuery.createTimeValue = [];
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.listQuery.SkipCount = 1; this.listQuery.skipCount = 1;
this.getList(); this.getList();
}, },
selectValue(params) { selectValue(params) {
@ -807,7 +605,11 @@ export default {
/** 格式化字段 */ /** 格式化字段 */
fieldFormatter(row, column) { fieldFormatter(row, column) {
if (column.property === "billStatus") { if (column.property === "billStatus") {
return { 0: "未生效", 2: "已生效", 3: "已发布" }[row[column.property]]; return {
0: "未生效",
2: "已生效",
3: "已发布"
} [row[column.property]];
} }
if (column.property == "onlineTime" || column.property == "receiveTime") { if (column.property == "onlineTime" || column.property == "receiveTime") {
var date = row[column.property]; var date = row[column.property];
@ -824,10 +626,10 @@ export default {
getList() { getList() {
this.listLoading = true; this.listLoading = true;
console.log("创建时间:" + JSON.stringify(this.listQuery)); console.log("创建时间:" + JSON.stringify(this.listQuery));
this.listQuery.SkipCount = (this.page - 1) * 10; this.listQuery.skipCount = (this.page - 1) * 10;
if (this.listQuery.CreateTimeValue !== undefined) { if (this.listQuery.createTimeValue !== undefined) {
this.listQuery.BeginCreateTime = this.listQuery.CreateTimeValue[0]; this.listQuery.beginCreateTime = this.listQuery.createTimeValue[0];
this.listQuery.EndCreateTime = this.listQuery.CreateTimeValue[1]; this.listQuery.endCreateTime = this.listQuery.createTimeValue[1];
} }
this.$axios this.$axios
.gets("/api/newjit/assembly-cfg-erp/list", this.listQuery) .gets("/api/newjit/assembly-cfg-erp/list", this.listQuery)
@ -885,7 +687,10 @@ export default {
}, },
sortChange(data) { sortChange(data) {
const { prop, order } = data; const {
prop,
order
} = data;
if (!prop || !order) { if (!prop || !order) {
this.handleFilter(); this.handleFilter();
return; return;
@ -897,19 +702,39 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
/** 通过回调控制style */ /** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) { cellStyle({
row,
column,
rowIndex,
columnIndex
}) {
if (column.property === "qty") { if (column.property === "qty") {
return { textAlign: "right" }; return {
textAlign: "right"
};
} else { } else {
return { textAlign: "left" }; return {
textAlign: "left"
};
} }
}, },
/** 通过回调控制表头style */ /** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) { headerRowStyle({
row,
column,
rowIndex,
columnIndex
}) {
if (column.property === "qty") { if (column.property === "qty") {
return { textAlign: "right", background: "#FAFAFA" }; return {
textAlign: "right",
background: "#FAFAFA"
};
} else { } else {
return { textAlign: "left", background: "#FAFAFA" }; return {
textAlign: "left",
background: "#FAFAFA"
};
} }
}, },
handleRowClick(row, column, event) { handleRowClick(row, column, event) {
@ -952,8 +777,8 @@ export default {
margin: 0; margin: 0;
//width: 100%; //width: 100%;
} }
.formitem { .formitem {
margin-bottom: 0; margin-bottom: 0;
} }
</style> </style>

Loading…
Cancel
Save