You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
217 lines
8.9 KiB
217 lines
8.9 KiB
<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"
|
|
@push="addNewDataPush"
|
|
@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>
|
|
<!-- 搜索按钮——窗体组件 -->
|
|
<searchPage
|
|
ref="searchTable"
|
|
:tableLoading="Loading.autoTableLoading"
|
|
:advancedFilter="advancedFilter()"
|
|
:filterPageListParams="filterPageListParams"
|
|
:formTitle="searchTitle"
|
|
:displayDialog="displayDialog.AddNewDialog"
|
|
:searchTableData="searchData"
|
|
:searchTableColumns="searchColumns"
|
|
:searchTotalCount="searchTotalCount"
|
|
:supplierItemPage="searchPageListParams"
|
|
@handleSelectionChange="prepareFormData"
|
|
@SizeChange="searchAlterResultCount($event, searchPageListParams)"
|
|
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)"
|
|
@tableButtonClick="searchSubmit(arguments)"
|
|
></searchPage>
|
|
<!--抽屉-->
|
|
<curren-Drawer
|
|
:title="tableColumns"
|
|
:tableColumns="tableColumns"
|
|
:DrawerLoading="Loading.DrawerLoading"
|
|
:drawer="displayDialog.detailsDialog"
|
|
:dropdownData="dropdownData"
|
|
:propsData="propsData"
|
|
:tabsDesTions="tabsDesTions"
|
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
|
|
@drawerbutton="drawerbutton"
|
|
@handleCommand="drawerHandle"
|
|
@close-value="closeValue"
|
|
></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"
|
|
import { filterSelectMixins } from '@/mixins/filter-Select'
|
|
export default {
|
|
name: "ItemQuality",
|
|
mixins: [
|
|
tableMixins,
|
|
LoadingMixins,
|
|
drawerMixins,
|
|
TableHeaderMixins,
|
|
mixins,
|
|
filterSelectMixins,
|
|
newAndEdiDialogMixins
|
|
],
|
|
computed: {
|
|
editDialog: {
|
|
get: function () {
|
|
return this.displayDialog.newDialog || this.displayDialog.editDialog;
|
|
},
|
|
},
|
|
},
|
|
data () {
|
|
return {
|
|
URL: 'basedata/item-quality',
|
|
//常用按钮数据
|
|
currenButtonData: [
|
|
this.defaultAddBtn(),//新增
|
|
this.defaultImportBtn(),//导入
|
|
this.defaultExportBtn(),//导出
|
|
this.defaultFieldSettingBtn(),//字段设置
|
|
this.defaultFreshBtn(),//刷新
|
|
this.defaultFilterBtn(),//筛选
|
|
],
|
|
//新增
|
|
CreateFormData: {
|
|
remark: null,
|
|
itemCode: null,
|
|
name: null,
|
|
supplierCode: null,
|
|
status: 1,
|
|
description: null,
|
|
inspectType: 1,
|
|
},
|
|
//编辑
|
|
editFormData: {
|
|
remark: "",
|
|
itemCode: "",
|
|
name: "",
|
|
supplierCode: "",
|
|
status: 1,
|
|
description: "",
|
|
inspectType: 1,
|
|
concurrencyStamp: ""
|
|
},
|
|
editOptions: {},
|
|
CreateForm: [
|
|
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.CreateFormData) }, colSpan: 12 },
|
|
{ type: "filterSelect", label: "物品名称", prop: "name", optionsLabel: "code", optionsValue: "name",
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.CreateFormData) }, colSpan: 12 },
|
|
{ type: "filterSelect", label: "供应商编号", prop: "supplierCode", optionsLabel: "name", optionsValue: "code",
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Supplier")},
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Supplier', 'Supplier', '供应商选择', this.CreateFormData) }, colSpan: 12 },
|
|
{ type: "select", label: "状态", prop: "status", options: "openToClose", colSpan: 12 },
|
|
{ type: "select", label: "检验类型", prop: "inspectType", options: "inspectType", colSpan: 12 },
|
|
// { type: "select", label: "是否是破坏性检验", prop: "destructive", options: "whetherOrNot", colSpan: 12 },
|
|
{ type: "input", label: "描述", prop: "description", colSpan: 12 },
|
|
{ type: "input", label: "备注", prop: "remark", colSpan: 12 },
|
|
],
|
|
editForm: [
|
|
{ type: "input",label: "物品代码", prop: "itemCode",disabled:"true", colSpan: 12 },
|
|
{ type: "input", label: "物品名称", prop: "name", colSpan: 12,disabled:"true", },
|
|
{ type: "filterSelect", label: "供应商编号", prop: "supplierCode", optionsLabel: "name", optionsValue: "code",
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Supplier")},
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Supplier', 'Supplier', '供应商选择', this.editFormData) }, colSpan: 12 },
|
|
{ type: "select", label: "状态", prop: "status", options: "openToClose", colSpan: 12 },
|
|
{ type: "select", label: "检验类型", prop: "inspectType", options: "inspectType", colSpan: 12 },
|
|
// { type: "select", label: "是否是破坏性检验", prop: "destructive", options: "whetherOrNot", colSpan: 12 },
|
|
{ type: "input", label: "描述", prop: "description", colSpan: 12 },
|
|
{ type: "input", label: "备注", prop: "remark", colSpan: 12 },
|
|
],
|
|
editRules: {
|
|
cerateRule: {
|
|
itemCode: [{ required: true, trigger: "change", message: "不可为空" }],
|
|
name: [{ required: true, trigger: "change", message: "不可为空" }],
|
|
status: [{ required: true, trigger: "blur", message: "不可为空" }],
|
|
supplierCode: [{ required: true, trigger: "change", message: "不可为空" }],
|
|
},
|
|
editRule: {
|
|
itemCode: [{ required: true, trigger: "change", message: "不可为空" }],
|
|
// name: [{ required: true, trigger: "change", message: "不可为空" }],
|
|
status: [{ required: true, trigger: "blur", message: "不可为空" }],
|
|
supplierCode: [{ required: true, trigger: "change", message: "不可为空" }],
|
|
}
|
|
},
|
|
};
|
|
},
|
|
mounted () {
|
|
this.paging();
|
|
},
|
|
methods: {
|
|
ItemBasicPullForm () {
|
|
this.CreateFormData.itemCode = this.stagingFormData[0].code
|
|
this.CreateFormData.name = this.stagingFormData[0].name
|
|
},
|
|
addNewDataPush (val) {
|
|
if (this.theEvent = 'newly') {
|
|
if (val[1].prop === 'itemCode' || val[1].prop === 'name') {
|
|
this.CreateFormData.itemCode = val[0].code
|
|
this.CreateFormData.name = val[0].name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
@import "../../../styles/basicData.scss";
|
|
</style>
|