|
|
|
<template>
|
|
|
|
<div class="page-box" v-loading="Loading.appMainLoading">
|
|
|
|
<tablePagination
|
|
|
|
:currenButtonData="currenButtonData"
|
|
|
|
:tableData="tableData"
|
|
|
|
:tableLoading="Loading.tableLoading"
|
|
|
|
:tableColumns="tableColumns"
|
|
|
|
@rowDrop="rowDrop"
|
|
|
|
:totalCount="totalCount"
|
|
|
|
:multipleSelection="multipleSelection"
|
|
|
|
:MaxResultCount="PageListParams.MaxResultCount"
|
|
|
|
@topbutton="topbutton"
|
|
|
|
@inlineDialog="inlineDialog"
|
|
|
|
@sortChange="sortChange"
|
|
|
|
@alertoldSkipCount="alertoldSkipCount"
|
|
|
|
@alterResultCount="alterResultCount"
|
|
|
|
@handleSelectionChange="handleSelectionChange"
|
|
|
|
@buttonOperationClick="buttonOperationClick"
|
|
|
|
:currentPageProps="oldSkipCount"
|
|
|
|
:quicklySearchOption="quicklySearchOption"
|
|
|
|
@quicklySearchClick="quicklySearchClick"
|
|
|
|
@quicklySearchClear="quicklySearchClear"
|
|
|
|
:primarySearchOption="primarySearchOption"
|
|
|
|
@overallSearchFormClick="overallSearchFormClick"
|
|
|
|
:httpOverallSearchData="httpOverallSearchData"
|
|
|
|
>
|
|
|
|
</tablePagination>
|
|
|
|
<!-- 新增与编辑 -->
|
|
|
|
<newAndEdiDialog
|
|
|
|
:loading="Loading.newAndEdiLoading"
|
|
|
|
:active="active"
|
|
|
|
:pageStatus="pageStatus"
|
|
|
|
:formReveal="formReveal"
|
|
|
|
:formTitle="formTitle"
|
|
|
|
:displayDialog="editDialog"
|
|
|
|
:FormData="formReveal ? CreateFormData : editFormData"
|
|
|
|
:Form="formReveal ? CreateForm : editForm"
|
|
|
|
:Options="editOptions"
|
|
|
|
:Handle="editHandle"
|
|
|
|
:Rules="formReveal ? editRules.cerateRule : editRules.editRule"
|
|
|
|
@FormSubmit="FormSubmit"
|
|
|
|
@close="FormClose"
|
|
|
|
@goBack="goBack"
|
|
|
|
></newAndEdiDialog>
|
|
|
|
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用-->
|
|
|
|
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 -->
|
|
|
|
<importFile
|
|
|
|
:loading="Loading.importLoading"
|
|
|
|
:show="displayDialog.importDialog"
|
|
|
|
:URL="URL"
|
|
|
|
:disabledMethod = {method1:false,method2:false,method3:false}
|
|
|
|
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false}
|
|
|
|
methodValue="0"
|
|
|
|
isAllowPartImportValue="1"
|
|
|
|
@importClick="postImportMergeClick(arguments)"
|
|
|
|
@postImportDown="importDown"
|
|
|
|
></importFile>
|
|
|
|
<curren-Drawer
|
|
|
|
:title="tableColumns"
|
|
|
|
:tableColumns="tableColumns"
|
|
|
|
:DrawerLoading="Loading.DrawerLoading"
|
|
|
|
:drawer="displayDialog.detailsDialog"
|
|
|
|
:dropdownData="dropdownData"
|
|
|
|
:propsData="propsData"
|
|
|
|
:tabsDesTions="tabsDesTions"
|
|
|
|
:tableLoading="tableLoading"
|
|
|
|
:dropdownTabsData="dropdownTabsData"
|
|
|
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
|
|
|
|
@drawerbutton="drawerbutton"
|
|
|
|
@handleCommand="drawerHandle"
|
|
|
|
@close-value="closeValue"
|
|
|
|
:firstTabs="firstTabs"
|
|
|
|
></curren-Drawer>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import { tableMixins } from "@/mixins/TableMixins"
|
|
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins"
|
|
|
|
import { drawerMixins } from "@/mixins/drawerMixins"
|
|
|
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"
|
|
|
|
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins"
|
|
|
|
import { mixins } from "@/mixins/mixins"
|
|
|
|
export default {
|
|
|
|
name: "Supplier",
|
|
|
|
mixins: [
|
|
|
|
tableMixins,
|
|
|
|
LoadingMixins,
|
|
|
|
drawerMixins,
|
|
|
|
TableHeaderMixins,
|
|
|
|
mixins,
|
|
|
|
newAndEdiDialogMixins
|
|
|
|
],
|
|
|
|
computed: {
|
|
|
|
editDialog: {
|
|
|
|
get: function () {
|
|
|
|
return this.displayDialog.newDialog || this.displayDialog.editDialog;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
//API路径
|
|
|
|
URL: 'basedata/supplier',
|
|
|
|
tableLoading: false,
|
|
|
|
//常用按钮数据
|
|
|
|
currenButtonData: [
|
|
|
|
this.defaultAddBtn(),//新增
|
|
|
|
this.defaultImportBtn(),//导入
|
|
|
|
this.defaultExportBtn(),//导出
|
|
|
|
this.defaultFieldSettingBtn(),//字段设置
|
|
|
|
this.defaultFreshBtn(),//刷新
|
|
|
|
this.defaultFilterBtn(),//筛选
|
|
|
|
],
|
|
|
|
//新增
|
|
|
|
CreateFormData: {
|
|
|
|
remark: null,
|
|
|
|
name: null,
|
|
|
|
address: null,
|
|
|
|
country: null,
|
|
|
|
city: null,
|
|
|
|
phone: null,
|
|
|
|
fax: null,
|
|
|
|
postID: null,
|
|
|
|
contacts: null,
|
|
|
|
bank: null,
|
|
|
|
currency: null,
|
|
|
|
isActive: true,
|
|
|
|
type: 1,
|
|
|
|
code: null,
|
|
|
|
// company: null,
|
|
|
|
shortName: null,
|
|
|
|
taxRate: 0,
|
|
|
|
},
|
|
|
|
//编辑
|
|
|
|
editFormData: {
|
|
|
|
code: null,
|
|
|
|
remark: null,
|
|
|
|
name: null,
|
|
|
|
address: null,
|
|
|
|
country: null,
|
|
|
|
city: null,
|
|
|
|
phone: null,
|
|
|
|
fax: null,
|
|
|
|
postID: null,
|
|
|
|
contacts: null,
|
|
|
|
bank: null,
|
|
|
|
currency: null,
|
|
|
|
isActive: true,
|
|
|
|
type: 1,
|
|
|
|
concurrencyStamp: null,
|
|
|
|
shortName: null,
|
|
|
|
taxRate: null,
|
|
|
|
},
|
|
|
|
editOptions: {},
|
|
|
|
CreateForm: [
|
|
|
|
{ type: "input", label: "供应商代码", prop: "code", validType:'numberLetter', colSpan: 12 },
|
|
|
|
{ type: "input", label: "供应商名称", prop: "name", colSpan: 12 },
|
|
|
|
{ type: "select", label: "状态", prop: "isActive", options: "openToCloseBit", colSpan: 12 },
|
|
|
|
{ type: "select", label: "类型", prop: "type", options: "supplierType", colSpan: 12 },
|
|
|
|
{ type: "input", label: "简称", prop: "shortName", colSpan: 12 },
|
|
|
|
{ type: "input", label: "税率", prop: "taxRate", colSpan: 12, validType: 'pointNumber' },
|
|
|
|
{ type: "input", label: "国家", prop: "country", colSpan: 12 },
|
|
|
|
{ type: "input", label: "城市", prop: "city", colSpan: 12 },
|
|
|
|
{ type: "input", label: "地址", prop: "address", colSpan: 12 },
|
|
|
|
{ type: "input", label: "联系人", prop: 'contacts', colSpan: 12 },
|
|
|
|
{ type: "input", label: "电话", prop: 'phone', colSpan: 12 },
|
|
|
|
{ type: "input", label: "传真", prop: 'fax', colSpan: 12 },
|
|
|
|
{ type: "input", label: "邮编", prop: 'postID', colSpan: 12 },
|
|
|
|
{ type: "input", label: "银行", prop: 'bank', colSpan: 12 },
|
|
|
|
{ type: "input", label: "货币", prop: 'currency', colSpan: 12 },
|
|
|
|
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 },
|
|
|
|
],
|
|
|
|
editForm: [
|
|
|
|
{ type: "input", label: "供应商代码", prop: "code", disabled:"true", colSpan: 12 },
|
|
|
|
{ type: "input", label: "供应商名称", prop: "name", colSpan: 12 },
|
|
|
|
{ type: "select", label: "状态", prop: "isActive", options: "openToCloseBit", colSpan: 12 },
|
|
|
|
{ type: "select", label: "类型", prop: "type", options: "supplierType", colSpan: 12 },
|
|
|
|
{ type: "input", label: "简称", prop: "shortName", colSpan: 12 },
|
|
|
|
{ type: "input", label: "税率", prop: "taxRate", colSpan: 12, validType: 'pointNumber' },
|
|
|
|
{ type: "input", label: "国家", prop: "country", colSpan: 12 },
|
|
|
|
{ type: "input", label: "城市", prop: "city", colSpan: 12 },
|
|
|
|
{ type: "input", label: "地址", prop: "address", colSpan: 12 },
|
|
|
|
{ type: "input", label: "联系人", prop: 'contacts', colSpan: 12 },
|
|
|
|
{ type: "input", label: "电话", prop: 'phone', colSpan: 12 },
|
|
|
|
{ type: "input", label: "传真", prop: 'fax', colSpan: 12 },
|
|
|
|
{ type: "input", label: "邮编", prop: 'postID', colSpan: 12 },
|
|
|
|
{ type: "input", label: "银行", prop: 'bank', colSpan: 12 },
|
|
|
|
{ type: "input", label: "货币", prop: 'currency', colSpan: 12 },
|
|
|
|
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 },
|
|
|
|
|
|
|
|
],
|
|
|
|
editRules: {
|
|
|
|
cerateRule: {
|
|
|
|
code: [{ required: true, trigger: "blur", message: "不可为空" }],
|
|
|
|
name: [{ required: true, trigger: "blur", message: "不可为空" }],
|
|
|
|
},
|
|
|
|
editRule: {
|
|
|
|
name: [{ required: true, trigger: "blur", message: "不可为空" }],
|
|
|
|
}
|
|
|
|
},
|
|
|
|
// 自定义详情明细汇总等table页
|
|
|
|
dropdownTabsData: [
|
|
|
|
{
|
|
|
|
label: "详情",
|
|
|
|
name: 'xq'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "供应商零件列表",
|
|
|
|
name: 'gysljlb',
|
|
|
|
url: 'basedata/supplier-item',
|
|
|
|
tableColumns: 'SupplierItem',
|
|
|
|
functionName: 'bySupplierCode'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "供应商时间窗口",
|
|
|
|
name: 'gyssjck',
|
|
|
|
url: 'basedata/supplier-time',
|
|
|
|
tableColumns: 'SupplierTimeWindow',
|
|
|
|
functionName: 'bySupplierCode'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "发货单列表",
|
|
|
|
name: 'fhdlb',
|
|
|
|
url: 'wms/store/arrive-notice',
|
|
|
|
tableColumns: 'PurchaseReceiptRequest',
|
|
|
|
functionName: 'bySupplierCode'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "到货单列表",
|
|
|
|
name: 'dhdlb',
|
|
|
|
url: 'wms/store/supplier-asn',
|
|
|
|
tableColumns: 'SupplierAsn',
|
|
|
|
functionName: 'bySupplierCode'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted () {
|
|
|
|
this.paging();
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import "../../../styles/basicData.scss";
|
|
|
|
</style>
|