| | |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <TableColumnSettings |
| | | :list1="tableColumnSettingsArray" |
| | | @tableColumnUpdate="tableColumnUpdate" |
| | | /> |
| | | <el-table |
| | | ref="tableDataRef" |
| | | :key="tableTimeStampKey" |
| | | :data="tableData" |
| | | border |
| | | class="tableFixed" |
| | |
| | | :style="{width: 100+'%',height:tableHeight+'px'}" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="code" |
| | | label="单位编码" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="name" |
| | | label="单位名称" |
| | | sortable="custom" |
| | | min-width="240px" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | label="单位属性" |
| | | show-tooltip-when-overflow |
| | | width="160" |
| | | sortable="custom" |
| | | prop="type" |
| | | > |
| | | <!-- sortable="custom"--> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.type==='226'">客户</div> |
| | | <div v-else-if="row.type==='211'">供应商</div> |
| | | <div v-else-if="row.type==='228'">客户/供应商</div> |
| | | <div v-else>/</div> |
| | | <!-- <div style="display: flex;justify-content: flex-start">--> |
| | | <!-- <div v-if="row.mtype==='211'" style="margin-right: 15px">供应商</div>--> |
| | | <!-- <div v-if="row.btype==='228'" style="margin-right: 15px;">客户/供应商</div>--> |
| | | <!-- <div v-if="row.htype==='226'">客户</div>--> |
| | | <!-- </div>--> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="conttacts" |
| | | label="联系人" |
| | | width="110" |
| | | v-for="item in tableColumnSettingsArray" |
| | | v-if="item.show" |
| | | :key="item.id" |
| | | :sortable="item.sortable" |
| | | :prop="item.prop" |
| | | :min-width="item.minWidth" |
| | | :label="item.label" |
| | | :width="item.width" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | :fixed="item.fixed?(item.fixed==='left'?'left':'right'):false" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.conttacts">{{ row.conttacts }}</div> |
| | | <div v-else>/</div> |
| | | <div v-if="!row[item.prop]">/</div> |
| | | <div v-else-if="item.prop==='type'">{{ UnitAttrArr.find(i=>i.value===row[item.prop]).label }}</div> |
| | | <div v-else>{{ row[item.prop] }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="conttphone" |
| | | label="联系方式" |
| | | show-tooltip-when-overflow |
| | | width="160" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.conttphone">{{ row.conttphone }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="addr" |
| | | min-width="160" |
| | | label="补充描述" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.addr">{{ row.addr }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="创建人员" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="创建时间" |
| | | sortable="custom" |
| | | width="160" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="操作" |
| | | fixed="right" |
| | |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="编辑" placement="top"> |
| | | <i :style="{color:$store.state.settings.theme}" class="el-icon-edit-outline" @click="edit('edit',row)" /> |
| | | <i |
| | | :style="{color:$store.state.settings.theme}" |
| | | class="el-icon-edit-outline" |
| | | @click="edit('edit',row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top"> |
| | | <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row)" /> |
| | |
| | | </el-dialog> |
| | | |
| | | <!--导入组件--> |
| | | <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" /> |
| | | <import-picker |
| | | ref="importPickerFunc" |
| | | class="importPickerClass" |
| | | :shows.sync="shows" |
| | | :title="title_value" |
| | | :colos="colos" |
| | | :code="code" |
| | | /> |
| | | |
| | | </div> |
| | | </template> |
| | |
| | | import { validateCode } from '@/utils/global' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | |
| | | export default { |
| | | name: 'WLDW', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | Pagination, ImportPicker, TableColumnSettings |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | |
| | | ], |
| | | tableData: [], |
| | | total: 10, |
| | | tableColumnSettingsArray: [ |
| | | { minWidth: 50, width: false, prop: 'id', label: 'id', id: 1, show: false, fixed: false, sortable: false }, // 隐藏列 show: false隐藏,true显示 |
| | | { minWidth: 25, width: 50, prop: 'RowNum', label: '序号', id: 2, show: true, fixed: 'left', sortable: false }, // custom |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'code', |
| | | label: '单位编码', |
| | | id: 3, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 330, |
| | | width: false, |
| | | prop: 'name', |
| | | label: '单位名称', |
| | | id: 4, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'type', |
| | | label: '单位属性', |
| | | id: 5, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'conttacts', |
| | | label: '联系人', |
| | | id: 6, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'conttphone', |
| | | label: '联系方式', |
| | | id: 7, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'addr', |
| | | label: '补充描述', |
| | | id: 8, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'lm_user', |
| | | label: '创建人员', |
| | | id: 9, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'lm_date', |
| | | label: '创建时间', |
| | | id: 10, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | } |
| | | ], |
| | | tableTimeStampKey: new Date().getTime(), // 表格key |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | id: '', // 往来单位id |
| | |
| | | // } |
| | | }, |
| | | methods: { |
| | | tableColumnUpdate(val, isCopyTrue) { |
| | | if (isCopyTrue) { |
| | | this.tableColumnSettingsArray = val |
| | | } |
| | | this.tableTimeStampKey = new Date().getTime() |
| | | this.$refs.tableDataRef.doLayout() |
| | | }, |
| | | async getCurrentUnitSearch() { |
| | | const res = await CurrentUnitSearch(this.form) |
| | | this.tableData = res.data |
| | |
| | | <!--公共页面样式--> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | .el-icon-share ,.el-icon-delete,.el-icon-edit-outline{ |
| | | .el-icon-share, .el-icon-delete, .el-icon-edit-outline { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | .el-icon-edit-outline{ |
| | | |
| | | .el-icon-edit-outline { |
| | | margin-right: 15px; |
| | | } |
| | | |
| | |
| | | background-color: #f8f8fa; |
| | | } |
| | | |
| | | ::v-deep .el-table__body .el-table__row.hover-row td{ |
| | | background-color: #eaecef ; |
| | | ::v-deep .el-table__body .el-table__row.hover-row td { |
| | | background-color: #eaecef; |
| | | } |
| | | |
| | | ::v-deep .el-form--inline .el-form-item__label { |
| | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .userDialogVisible ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | .tableFixed{ |
| | | ::v-deep .el-table__fixed-right{ |
| | | |
| | | .tableFixed { |
| | | ::v-deep .el-table__fixed-right { |
| | | height: 100% !important; |
| | | } |
| | | ::v-deep .el-table__fixed{ |
| | | |
| | | ::v-deep .el-table__fixed { |
| | | height: 100% !important; |
| | | } |
| | | } |