10 changed files with 424 additions and 47 deletions
@ -0,0 +1,260 @@ |
|||
<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> |
|||
<!--新增--> |
|||
<stepsForm |
|||
:formTitle="formTitle" |
|||
:displayDialog="displayDialog" |
|||
:CreateFormData="CreateFormData" |
|||
:previewFormData="previewFormData" |
|||
:CreateForm="CreateForm" |
|||
:Rules="editRules.cerateRule" |
|||
:Options="editOptions" |
|||
:detailsTableColumns="AddDetailsTableColumns" |
|||
:childTableData="childTableData" |
|||
@close="stepsClose(arguments)" |
|||
@detailsDataPush="detailsDataPush" |
|||
@detailsClear="detailsClear" |
|||
></stepsForm> |
|||
<!-- @DataPush="DataPush" --> |
|||
<!-- @detailsDataPush="detailsDataPush" |
|||
@autocompleteChange="autocompleteChange" |
|||
@typeSelectOptionClick="typeSelectOptionClick" --> |
|||
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用--> |
|||
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 --> |
|||
<importFile |
|||
:loading="Loading.importLoading" |
|||
:show="displayDialog.importDialog" |
|||
:URL="URL" |
|||
:disabledMethod = {method1:false,method2:false,method3:false} |
|||
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false} |
|||
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="drawerbuttonHandle" |
|||
@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: "Kitting", |
|||
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: { |
|||
code:null, |
|||
remark:null, |
|||
details:[] |
|||
}, |
|||
editOptions: {}, |
|||
CreateForm: [ |
|||
{ type: "input", label: "编码", prop: "code",colSpan: 12 }, |
|||
{ type: "input", label: "备注", prop: "remark", colSpan: 12 }, |
|||
], |
|||
editRules: { |
|||
cerateRule: { |
|||
code: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
}, |
|||
}, |
|||
AddDetailsTableColumns: [ |
|||
{ type:"input", label: "包装数量", prop: 'stdPack',width:"auto" }, |
|||
{ 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) }, |
|||
width: "auto",searchButton:false |
|||
}, |
|||
{ label: "物料名称", prop: "itemName",width:"auto" }, |
|||
{ label: "物料描述1", prop: "itemDesc1",width:"auto" }, |
|||
{ label: "物料描述2", prop: "itemDesc2",width:"auto" }, |
|||
{ label: "配置", prop: 'configuration',width:"auto" }, |
|||
], |
|||
childTableData:[{ |
|||
stdPack:null, |
|||
itemCode:null, |
|||
itemName:null, |
|||
itemDesc1:null, |
|||
itemDesc2:null, |
|||
configuration:null, |
|||
}], |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
methods: { |
|||
addNewDataPush(val){ |
|||
console.log(201,val) |
|||
}, |
|||
drawerbuttonHandle(val){ |
|||
if(val == "edit"){ |
|||
this.formTitle = this.$route.meta.title + "编辑"; |
|||
this.displayDialog.newDialog = true |
|||
this.CreateFormData = this.propsData |
|||
this.childTableData = [{ |
|||
stdPack:null, |
|||
itemCode:null, |
|||
itemName:null, |
|||
itemDesc1:null, |
|||
itemDesc2:null, |
|||
configuration:null, |
|||
}] |
|||
// this.formReveal = false |
|||
// this.theEvent = "edit" |
|||
}else{ |
|||
this.drawerbutton(val) |
|||
} |
|||
}, |
|||
FormSubmitHandle(val){ |
|||
this.$nextTick(()=>{ |
|||
this.FormSubmit(val) |
|||
}) |
|||
}, |
|||
PalletlFunction (val) { |
|||
return new Promise((resolve, reject) => { |
|||
let array = [] |
|||
let _isEmpty = 0 |
|||
this.CreateFormData.details.forEach(item => { |
|||
array.push(item.itemCode) |
|||
if(!item.itemCode || item.itemCode.length <= 0 || !item.stdPack || item.stdPack.length <= 0 || Number(item.stdPack) == 0){ |
|||
_isEmpty ++ |
|||
} |
|||
}) |
|||
if(_isEmpty > 0){ |
|||
this.$errorMsg('【包装数量】与【物料代码】不能为空!') |
|||
reject() |
|||
} |
|||
let arraySort = array.sort() |
|||
for(let i=0; i<arraySort.length; i++){ |
|||
if(arraySort[i] == arraySort[i+1]){ |
|||
this.$errorMsg('物料:【' + arraySort[i] + '】重复,请删除后,再操作!') |
|||
reject() |
|||
break |
|||
} |
|||
} |
|||
this.previewFormData = this.CreateFormData; |
|||
resolve(); |
|||
}); |
|||
}, |
|||
stepsSubmit (val) { |
|||
return new Promise((resolve, reject) => { |
|||
console.log(259,this.previewFormData) |
|||
console.log(260,this.CreateFormData) |
|||
reject(); |
|||
// postCreate(this.previewFormData, this.URL).then((res) => { |
|||
// this.stepsPrint = res |
|||
// this.propsData = res |
|||
// resolve(); |
|||
// }).catch(err => { |
|||
// reject(); |
|||
// }); |
|||
}); |
|||
}, |
|||
detailsDataPush(data){ |
|||
if(data[1].prop == "itemCode"){ |
|||
this.CreateFormData.details[data[3].$index].itemName = data[0].name |
|||
this.CreateFormData.details[data[3].$index].itemDesc1 = data[0].desc1 |
|||
this.CreateFormData.details[data[3].$index].itemDesc2 = data[0].desc2 |
|||
this.CreateFormData.details[data[3].$index].configuration = data[0].configuration |
|||
} |
|||
}, |
|||
detailsClear(data){ |
|||
if(data[0].prop == "itemCode"){ |
|||
this.CreateFormData.details[data[1].$index].itemName = "" |
|||
this.CreateFormData.details[data[1].$index].itemDesc1 = "" |
|||
this.CreateFormData.details[data[1].$index].itemDesc2 = "" |
|||
this.CreateFormData.details[data[1].$index].configuration = "" |
|||
} |
|||
} |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/basicData.scss"; |
|||
</style> |
Loading…
Reference in new issue