| | |
| | | <a-form layout="inline"> |
| | | <a-row :gutter="48"> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户编号"> |
| | | <a-input v-model="queryParam.custCode" allow-clear placeholder="请输入客户编号" /> |
| | | <a-form-item label="编号"> |
| | | <a-input v-model="queryParam.custCode" allow-clear placeholder="请输入编号" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户中文名称"> |
| | | <a-input v-model="queryParam.custChinaName" allow-clear placeholder="请输入客户中文名称" /> |
| | | <a-form-item label="中文名称"> |
| | | <a-input v-model="queryParam.custChinaName" allow-clear placeholder="请输入中文名称" /> |
| | | </a-form-item> |
| | | </a-col><template v-if="advanced"> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户英文名称"> |
| | | <a-input v-model="queryParam.custEnglishName" allow-clear placeholder="请输入客户英文名称" /> |
| | | <a-form-item label="英文名称"> |
| | | <a-input v-model="queryParam.custEnglishName" allow-clear placeholder="请输入英文名称" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | |
| | | </a-form-item> |
| | | </a-col><a-col :md="8" :sm="24"> |
| | | <a-form-item label="类型"> |
| | | <a-input-number v-model="queryParam.custType" style="width: 100%" allow-clear |
| | | placeholder="请输入类型" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="类型名称"> |
| | | <a-input v-model="queryParam.custTypeName" allow-clear placeholder="请输入类型名称" /> |
| | | <a-select :allowClear="true" style="width: 100%" v-model="queryParam.custType" |
| | | placeholder="请选择类型"> |
| | | <a-select-option v-for="(item, index) in custTypeData" :key="index" |
| | | :value="item.code">{{ item.name }}</a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | |
| | | <a-button type="info" v-if="hasPerm('BaseCustomer:exportExcel')" icon="download" @click="BaseCustomerToExcel()"> |
| | | 导出 |
| | | </a-button> |
| | | <a-button type="primary" v-if="hasPerm('BaseCustomer:add')" icon="plus" @click="$refs.addForm.add()">新增客户档案</a-button> |
| | | <a-button type="primary" v-if="hasPerm('BaseCustomer:add')" icon="plus" @click="$refs.addForm.add()">新增往来关系</a-button> |
| | | </div> --> |
| | | </template> |
| | | <span slot="isDisabledscopedSlots" slot-scope="text"> |
| | | <div v-if="text === true"> |
| | | <a-tag color="green">是</a-tag> |
| | | </div> |
| | | <div v-else-if="text == false"> |
| | | <a-tag color="volcano">否</a-tag> |
| | | </div> |
| | | <div v-else=""></div> |
| | | </span> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <span slot="custTypescopedSlots" slot-scope="text"> |
| | | {{ 'base_customer_type' | dictType(text) }} |
| | | </span> |
| | | <span slot="isDisabledscopedSlots" slot-scope="text"> |
| | | <div v-if="text===true "> |
| | | <a-tag color="green">是</a-tag> |
| | | </div> |
| | | <div v-else-if="text==false"> |
| | | <a-tag color="volcano">否</a-tag> |
| | | </div> |
| | | <div v-else=""></div> |
| | | </span> |
| | | <!-- <span slot="action" slot-scope="text, record"> |
| | | |
| | | <a v-if="hasPerm('BaseCustomer:edit')" @click="$refs.editForm.edit(record)">编辑</a> |
| | | <a-divider type="vertical" v-if="hasPerm('BaseCustomer:edit') & hasPerm('BaseCustomer:delete')" /> |
| | |
| | | @confirm="() => BaseCustomerDelete(record)"> |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </span> --> |
| | | </s-table> |
| | | <add-form ref="addForm" @ok="handleOk" /> |
| | | <edit-form ref="editForm" @ok="handleOk" /> |
| | |
| | | customRender: (text, record, index) => `${index + 1 + (this.pageInfo.current - 1) * this.pageInfo.pageSize}` |
| | | }, |
| | | { |
| | | title: '客户编号', |
| | | title: '编号', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | dataIndex: 'custCode' |
| | | }, |
| | | { |
| | | title: '客户中文名称', |
| | | title: '中文名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | dataIndex: 'custChinaName' |
| | | }, |
| | | { |
| | | title: '客户英文名称', |
| | | title: '英文名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | customHeaderCell: () => { |
| | | return { |
| | | style: { |
| | | 'min-width': '80px'//最小列宽设置 |
| | | } |
| | | } |
| | | }, |
| | | customCell: () => { |
| | | return { |
| | | style: { |
| | | 'min-width': '80px'//最小列宽设置 |
| | | } |
| | | } |
| | | }, |
| | | sorter: true, |
| | | dataIndex: 'custType' |
| | | }, |
| | | { |
| | | title: '类型名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | | style: { |
| | | 'min-width': '120px'//最小列宽设置 |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | sorter: true, |
| | | dataIndex: 'custTypeName' |
| | | dataIndex: 'custType', |
| | | scopedSlots: { customRender: 'custTypescopedSlots' } |
| | | }, |
| | | { |
| | | title: '联系人', |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | if (this.hasPerm('BaseCustomer:edit') || this.hasPerm('BaseCustomer:delete')) { |
| | | this.columns.push({ |
| | | title: '操作', |
| | | width: '150px', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' } |
| | | }) |
| | | } |
| | | // if (this.hasPerm('BaseCustomer:edit') || this.hasPerm('BaseCustomer:delete')) { |
| | | // this.columns.push({ |
| | | // title: '操作', |
| | | // width: '150px', |
| | | // dataIndex: 'action', |
| | | // scopedSlots: { customRender: 'action' } |
| | | // }) |
| | | // } |
| | | const path = this.$route.path |
| | | const columnStr = window.localStorage.getItem(path) |
| | | if (columnStr) { |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | const custTypeOption = this.$options |
| | | this.custTypeData = custTypeOption.filters['dictData']('base_customer_type') |
| | | const isDisabledOption = this.$options |
| | | this.isDisabledData = isDisabledOption.filters['dictData']('yes_true_false') |
| | | |
| | | this.handleTableHt() //设置主表表格高度 |
| | | window.addEventListener( |
| | | 'resize', |
| | |
| | | onSelectChange(selectedRowKeys, selectedRows) { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectedRows = selectedRows |
| | | this.$emit('ok', selectedRows) |
| | | // this.$emit('ok', selectedRows) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="less"> |
| | | .table-operator { |
| | | <style lang="less">.table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | | |