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