Browse Source

【nev-pc】回收料功能+filterSelect多选情况封装暂存

ag_report_nev
安虹睿 1 year ago
parent
commit
39dbbe4b4a
  1. 2
      fe/PC/src/components/filterSelect/index.vue
  2. 15
      fe/PC/src/filters/status.js
  3. 46
      fe/PC/src/mixins/filter-Select.js
  4. 16
      fe/PC/src/router/index.js
  5. 2
      fe/PC/src/utils/tableColumns/index.js
  6. 249
      fe/PC/src/views/basicData/WorkshopManage/ProductionLine-old.vue
  7. 12
      fe/PC/src/views/basicData/WorkshopManage/ProductionLine.vue
  8. 51
      fe/PC/src/views/inventoryManage/recycledMaterials/materialsAdjustmentFunc.vue

2
fe/PC/src/components/filterSelect/index.vue

@ -133,7 +133,7 @@ export default {
if(_value.length > 0 && !this.selectItem.noFilter){ if(_value.length > 0 && !this.selectItem.noFilter){
let _column = this.selectItem.optionsValue || this.selectItem.prop let _column = this.selectItem.optionsValue || this.selectItem.prop
// //
if(typeof _value == 'string'){ if(!this.selectItem.multiple){
_params.condition.filters.push({logic:"And",column:_column,action:"Like",value:_value}) _params.condition.filters.push({logic:"And",column:_column,action:"Like",value:_value})
} }
// //

15
fe/PC/src/filters/status.js

@ -1333,7 +1333,7 @@ export function nextAction(index, prop) {
} }
return Enum(type, index, prop) return Enum(type, index, prop)
} }
//客户类型 枚举为空 //客户类型
/** /**
* *
* @param {Boolean} * @param {Boolean}
@ -1380,7 +1380,18 @@ export function areaType(index, prop) {
*/ */
export function productionLineType(index, prop) { export function productionLineType(index, prop) {
let type = { let type = {
1: {
label: "注塑",
value: 1
},
2: {
label: "喷涂",
value: 2
},
3: {
label: "装配",
value: 3
},
} }
return Enum(type, index, prop) return Enum(type, index, prop)
} }

46
fe/PC/src/mixins/filter-Select.js

@ -37,10 +37,11 @@ export const filterSelectMixins = {
} }
}, },
methods: { methods: {
getFilterList(type,params,url,newFilter){ getFilterList(type,params,url,newFilter,resultCount){
// 正常过滤条件获取列表(getPageList) // 正常过滤条件获取列表(getPageList)
return new Promise(resolve => { return new Promise(resolve => {
if(!type || type == "getPageList"){ if(!type || type == "getPageList"){
if(resultCount)params.MaxResultCount = resultCount
if(newFilter)params.condition.filters = params.condition.filters.concat(newFilter) if(newFilter)params.condition.filters = params.condition.filters.concat(newFilter)
getPageList(params, url).then(res => { getPageList(params, url).then(res => {
resolve(res.items) resolve(res.items)
@ -90,31 +91,29 @@ export const filterSelectMixins = {
getList(val, SkipCount, URL) { getList(val, SkipCount, URL) {
this.Loading.autoTableLoading = true; this.Loading.autoTableLoading = true;
val.SkipCount = (SkipCount - 1) * val.MaxResultCount val.SkipCount = (SkipCount - 1) * val.MaxResultCount
let _select = []
getPageList(val, URL).then(res => { getPageList(val, URL).then(res => {
// 给搜索列表赋值 // 给搜索列表赋值
this.searchData = res.items this.searchData = res.items
this.searchTotalCount = res.totalCount this.searchTotalCount = res.totalCount
// 回显 // 回显
this.$nextTick(() => { if (this.mainData[this.searchFormData.prop]) {
if (this.mainData[this.searchFormData.prop]) { // 多选回显处理
// 多选回显处理 let mainDataArry = this.mainData[this.searchFormData.prop]
let mainDataArry = this.mainData[this.searchFormData.prop] // 单选处理回显处理
// 单选处理回显处理 if(typeof this.mainData[this.searchFormData.prop] == 'string'){
if(typeof this.mainData[this.searchFormData.prop] == 'string'){ mainDataArry = this.mainData[this.searchFormData.prop].split(',')
mainDataArry = this.mainData[this.searchFormData.prop].split(',')
}
mainDataArry.forEach(mainDataArryItem => {
let hxRs = res.items.filter((item => (item[this.searchFormData.optionsValue] == mainDataArryItem)))
hxRs.forEach(item => {
this.$refs.searchTable.$refs.searchTable.$refs.multipleTable.toggleRowSelection([
{
row: item
}])
})
})
} }
}) mainDataArry.forEach(mainDataArryItem => {
let hxRs = res.items.filter((item => (item[this.searchFormData.optionsValue] == mainDataArryItem)))
_select = [..._select,...hxRs]
})
this.$nextTick(() => {
_select.forEach(item => {
this.$refs.searchTable.$refs.searchTable.$refs.multipleTable.toggleRowSelection([{row: item,selected:true}])
})
})
}
this.Loading.autoTableLoading = false; this.Loading.autoTableLoading = false;
}).catch(err => { }).catch(err => {
this.Loading.autoTableLoading = false; this.Loading.autoTableLoading = false;
@ -136,6 +135,7 @@ export const filterSelectMixins = {
if (val[0] == 'cancel') { if (val[0] == 'cancel') {
this.displayDialog.AddNewDialog = false this.displayDialog.AddNewDialog = false
} else { } else {
// 多选
if (this.isMoreSelectTable) { if (this.isMoreSelectTable) {
if (this.stagingFormData.length >= 1) { if (this.stagingFormData.length >= 1) {
const { const {
@ -152,7 +152,7 @@ export const filterSelectMixins = {
this.mainData[prop] += item[optionsValue[0]][optionsValue[1]] + ',' this.mainData[prop] += item[optionsValue[0]][optionsValue[1]] + ','
} }
}) })
this.mainData[prop] = this.mainData[prop].substring(0,(this.mainData[prop].length-1)) this.mainData[prop] = (this.mainData[prop].substring(0,(this.mainData[prop].length-1))).split(",")
} else { } else {
this.mainData[prop][showProp] = '' this.mainData[prop][showProp] = ''
this.stagingFormData.forEach(item => { this.stagingFormData.forEach(item => {
@ -168,7 +168,9 @@ export const filterSelectMixins = {
} else { } else {
this.$warningMsg('请选择数据!') this.$warningMsg('请选择数据!')
} }
} else { }
// 单选
else {
if (this.stagingFormData.length == 1) { if (this.stagingFormData.length == 1) {
const { const {
prop, prop,

16
fe/PC/src/router/index.js

@ -190,6 +190,22 @@ export const constantRoutes = [
} }
}] }]
}, },
{
path: '/',
component: Layout,
redirect: '/gridlayout',
hidden: true,
children: [{
path: 'ProductionLine',
component: () => import('@/views/basicData/WorkshopManage/ProductionLine.vue'),
name: 'ProductionLine',
meta: {
keepAlive : true,
title: '生产线信息',
icon: '生产线信息',
}
}]
},
] ]
/** /**

2
fe/PC/src/utils/tableColumns/index.js

@ -712,7 +712,7 @@ export const Workshop = [
export const ProductionLine = [ export const ProductionLine = [
{ label: "生产线代码", prop: "code", fixed: "left", type: "name" }, { label: "生产线代码", prop: "code", fixed: "left", type: "name" },
{ label: "生产线名称", prop: 'name' }, { label: "生产线名称", prop: 'name' },
{ label: "类型", prop: "type" }, { label: "类型", prop: "type", type: "filter", filters: "productionLineType"},
{ label: "车间代码", prop: "workshopCode" }, { label: "车间代码", prop: "workshopCode" },
{ label: "原料库位", prop: "rawLocationCode" }, { label: "原料库位", prop: "rawLocationCode" },
{ label: "成品库位", prop: "productLocationCode" }, { label: "成品库位", prop: "productLocationCode" },

249
fe/PC/src/views/basicData/WorkshopManage/ProductionLine-old.vue

@ -0,0 +1,249 @@
<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>
<!-- 搜索按钮窗体组件 -->
<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)"
:isMoreSelectTable="true"
></searchPage>
<!-- 新导入 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>
<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: "ProductionLine",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
newAndEdiDialogMixins
],
computed: {
editDialog: {
get: function () {
return this.displayDialog.newDialog || this.displayDialog.editDialog;
},
},
},
data () {
return {
URL: 'basedata/productionline',
//
currenButtonData: [
this.defaultAddBtn(),//
this.defaultImportBtn(),//
this.defaultExportBtn(),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
//
CreateFormData: {
remark: null,
name: null,
description: null,
type: 1,
workshopCode: null,
rawLocationCode: null,
productLocationCode: null,
rawLocationGroupCode: null,
code: null,
// company: null,
},
//
editFormData: {
code: null,
remark: null,
name: null,
description: null,
type: 1,
workshopCode: null,
rawLocationCode: null,
rawLocationGroupCode: null,
productLocationCode: null,
concurrencyStamp: null,
},
editOptions: {
type: []
},
CreateForm: [
{ type: "input", label: "生产线代码", prop: "code", validType:'numberLetter', colSpan: 12 },
{ type: "input", label: "生产线名称", prop: 'name', colSpan: 12 },
{ type: "select", label: "类型", prop: "type", options: "productionLineType", colSpan: 12 },
{ type: "filterSelect", label: "车间代码", prop: "workshopCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/workshop")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/workshop', 'Workshop', '车间选择', this.CreateFormData) },
colSpan: 12
},
{ type: "filterSelect", label: "原料库位", prop: "rawLocationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[{logic:"And",column:"type",action:"==",value:"2"}])},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,[{logic:"And",column:"type",action:"==",value:"2"},]) },
colSpan: 12,multiple:true
},
{ type: "filterSelect", label: "原料库位组", prop: "rawLocationGroupCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location-group",[
{logic:"And",column:"groupType",action:"==",value:"2"},
])},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location-group', 'LocationGroup', '库位组选择', this.CreateFormData,[
{logic:"And",column:"groupType",action:"==",value:"2"},
]) }, colSpan: 12 },
{ type: "filterSelect", label: "成品库位", prop: "productLocationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[
{logic:"And",column:"type",action:"==",value:"4"},
])},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,[
{logic:"And",column:"type",action:"==",value:"4"},
]) }, colSpan: 12 },
{ type: "input", label: "描述", prop: "description", colSpan: 12 },
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 },
],
editForm: [
{ type: "input", label: "生产线代码", disabled:"true", prop: "code", validType:'numberLetter', colSpan: 12 },
{ type: "input", label: "生产线名称", prop: 'name', colSpan: 12 },
{ type: "select", label: "类型", prop: "type", options: "productionLineType", colSpan: 12 },
{ type: "filterSelect", label: "车间代码", prop: "workshopCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/workshop")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/workshop', 'Workshop', '车间选择', this.editFormData) }, colSpan: 12 },
{ type: "filterSelect", label: "原料库位", prop: "rawLocationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[
{logic:"And",column:"type",action:"==",value:"2"},
])},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData,[
{logic:"And",column:"type",action:"==",value:"2"},
]) }, colSpan: 12 },
{ type: "filterSelect", label: "原料库位组", prop: "rawLocationGroupCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location-group",[
{logic:"And",column:"groupType",action:"==",value:"2"},
])},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location-group', 'LocationGroup', '库位组选择', this.editFormData,[
{logic:"And",column:"groupType",action:"==",value:"2"},
]) }, colSpan: 12 },
{ type: "filterSelect", label: "成品库位", prop: "productLocationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[
{logic:"And",column:"type",action:"==",value:"4"},
])},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData,[
{logic:"And",column:"type",action:"==",value:"4"},
]) }, colSpan: 12 },
{ type: "input", label: "描述", prop: "description", colSpan: 12 },
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 },
],
editRules: {
cerateRule: {
code: [{ required: true, trigger: "blur", message: "不可为空" }],
workshopCode: [{ required: true, trigger: "change", message: "不可为空" }],
rawLocationCode: [{ required: true, trigger: "change", message: "不可为空" }],
productLocationCode: [{ required: true, trigger: "change", message: "不可为空" }],
},
editRule: {
workshopCode: [{ required: true, trigger: "change", message: "不可为空" }],
rawLocationCode: [{ required: true, trigger: "change", message: "不可为空" }],
productLocationCode: [{ required: true, trigger: "change", message: "不可为空" }],
}
},
};
},
mounted () {
this.paging();
},
};
</script>
<style lang="scss" scoped>
@import "../../../styles/basicData.scss";
</style>

12
fe/PC/src/views/basicData/WorkshopManage/ProductionLine.vue

@ -130,9 +130,9 @@ export default {
remark: null, remark: null,
name: null, name: null,
description: null, description: null,
type: 1, type: null,
workshopCode: null, workshopCode: null,
rawLocationCode: null, rawLocationCode: [],
productLocationCode: null, productLocationCode: null,
rawLocationGroupCode: null, rawLocationGroupCode: null,
code: null, code: null,
@ -144,9 +144,9 @@ export default {
remark: null, remark: null,
name: null, name: null,
description: null, description: null,
type: 1, type: null,
workshopCode: null, workshopCode: null,
rawLocationCode: null, rawLocationCode: [],
rawLocationGroupCode: null, rawLocationGroupCode: null,
productLocationCode: null, productLocationCode: null,
concurrencyStamp: null, concurrencyStamp: null,
@ -165,7 +165,7 @@ export default {
}, },
{ type: "filterSelect", label: "原料库位", prop: "rawLocationCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "原料库位", prop: "rawLocationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[{logic:"And",column:"type",action:"==",value:"2"}])}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[{logic:"And",column:"type",action:"==",value:"2"}])},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,[{logic:"And",column:"type",action:"==",value:"2"},]) }, searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,[{logic:"And",column:"type",action:"==",value:"2"}])},
colSpan: 12,multiple:true colSpan: 12,multiple:true
}, },
@ -227,11 +227,13 @@ export default {
editRules: { editRules: {
cerateRule: { cerateRule: {
code: [{ required: true, trigger: "blur", message: "不可为空" }], code: [{ required: true, trigger: "blur", message: "不可为空" }],
type: [{ required: true, trigger: "blur", message: "不可为空" }],
workshopCode: [{ required: true, trigger: "change", message: "不可为空" }], workshopCode: [{ required: true, trigger: "change", message: "不可为空" }],
rawLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], rawLocationCode: [{ required: true, trigger: "change", message: "不可为空" }],
productLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], productLocationCode: [{ required: true, trigger: "change", message: "不可为空" }],
}, },
editRule: { editRule: {
type: [{ required: true, trigger: "blur", message: "不可为空" }],
workshopCode: [{ required: true, trigger: "change", message: "不可为空" }], workshopCode: [{ required: true, trigger: "change", message: "不可为空" }],
rawLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], rawLocationCode: [{ required: true, trigger: "change", message: "不可为空" }],
productLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], productLocationCode: [{ required: true, trigger: "change", message: "不可为空" }],

51
fe/PC/src/views/inventoryManage/recycledMaterials/materialsAdjustmentFunc.vue

@ -67,6 +67,7 @@
:flexSearchOptions="editOptions" :flexSearchOptions="editOptions"
:flexTableColumns="addPopColumns_FS" :flexTableColumns="addPopColumns_FS"
@detailsDataPush="pushFS" @detailsDataPush="pushFS"
@clearHandle="clearHandle_FS"
></currenTableFlex> ></currenTableFlex>
</div> </div>
<div class="addPopContent addPopContent_YL"> <div class="addPopContent addPopContent_YL">
@ -89,6 +90,7 @@
:showAddBtn="false" :showAddBtn="false"
:showAllDeleteButton="false" :showAllDeleteButton="false"
@detailsDataPush="pushHB" @detailsDataPush="pushHB"
@clearHandle="clearHandle_HB"
></currenTableFlex> ></currenTableFlex>
</div> </div>
</div> </div>
@ -150,26 +152,26 @@ export default {
// //
addPopColumns_FS:[ addPopColumns_FS:[
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},//this.isFilter("isRecycled","true") focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic",this.isFilter("isRecycled","true"),1000)},
// searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '', this.addPopData_HB) }, // searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '', this.addPopData_HB) },
width:"auto" width:"auto"
}, },
{ {
type: "filterSelect", label: "供应商代码", prop: "supplierCode", optionsLabel: "supplierSimpleName", optionsValue: "supplierCode", clearable:true, type: "filterSelect", label: "供应商代码", prop: "supplierCode", optionsLabel: "supplierSimpleName", optionsValue: "supplierCode", clearable:true,
beforeFocus:(tableScope)=>{if(!this.addPopData_FS[tableScope.$index].itemCode || this.addPopData_FS[tableScope.$index].length <= 0){this.$message.error('请选择物品代码'); return false}else{return true}}, beforeFocus:(tableScope)=>{if(!this.addPopData_FS[tableScope.$index].itemCode || this.addPopData_FS[tableScope.$index].length <= 0){this.$message.error('请选择物品代码'); return false}else{return true}},
focus: (type,val,tableScope) => { return this.getFilterList(type, val, "basedata/supplier-item",this.isFilter("itemCode", this.addPopData_FS[tableScope.$index].itemCode))}, focus: (type,val,tableScope) => { return this.getFilterList(type, val, "basedata/supplier-item",this.isFilter("itemCode", this.addPopData_FS[tableScope.$index].itemCode),1000)},
width:"auto", width:"auto",
}, },
{ {
type: "filterSelect", label: "采购订单号", prop: "poNumber",optionsValue: "poNumber", clearable:true, type: "filterSelect", label: "采购订单号", prop: "poNumber",optionsValue: "poNumber", clearable:true,
beforeFocus:(tableScope)=>{if(!this.addPopData_FS[tableScope.$index].itemCode || this.addPopData_FS[tableScope.$index].itemCode.length <= 0 || !this.addPopData_FS[tableScope.$index].supplierCode || this.addPopData_FS[tableScope.$index].supplierCode.length <= 0){this.$message.error('请选择物品代码和供应商代码'); return false}else{return true}}, beforeFocus:(tableScope)=>{if(!this.addPopData_FS[tableScope.$index].itemCode || this.addPopData_FS[tableScope.$index].itemCode.length <= 0 || !this.addPopData_FS[tableScope.$index].supplierCode || this.addPopData_FS[tableScope.$index].supplierCode.length <= 0){this.$message.error('请选择物品代码和供应商代码'); return false}else{return true}},
focus: (type,val,tableScope) => { return this.getFilterList(type, val, "wms/store/supplier-asn",this.isFilter("supplierCode", this.addPopData_FS[tableScope.$index].supplierCode))}, focus: (type,val,tableScope) => { return this.getFilterList(type, val, "wms/store/supplier-asn",this.isFilter("supplierCode", this.addPopData_FS[tableScope.$index].supplierCode),1000)},
width:"auto", width:"auto",
}, },
{ type: "filterSelect", label: "目标库位", prop: "locationCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "目标库位", prop: "locationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Location",this.isFilter("type", "2"))}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/Location",this.isFilter("type", "2"),1000)},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Location', 'InventoryBalance', '库位选择', this.addPopData_HB) }, // searchButton: (val) => { this.showSerarchPage(val, 'basedata/Location', 'InventoryBalance', '', this.addPopData_HB) },
width:"auto", searchButton:false width:"auto"
}, },
{ type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto", { type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto",
rules: [{ rules: [{
@ -198,12 +200,12 @@ export default {
// //
addPopColumns_YL:[ addPopColumns_YL:[
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic",this.isFilter("type", "10C02"))}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic",this.isFilter("type", "10C02"),1000)},
width:"auto" width:"auto"
}, },
{ type: "filterSelect", label: "箱标签", prop: "packingCode", optionsLabel: "packingCode", optionsValue: "packingCode", clearable:true, { type: "filterSelect", label: "箱标签", prop: "packingCode", optionsLabel: "packingCode", optionsValue: "packingCode", clearable:true,
beforeFocus:(tableScope)=>{if(!this.addPopData_YL[tableScope.$index].itemCode || this.addPopData_YL[tableScope.$index].length <= 0){this.$message.error('请选择物品代码'); return false}else{return true}}, beforeFocus:(tableScope)=>{if(!this.addPopData_YL[tableScope.$index].itemCode || this.addPopData_YL[tableScope.$index].length <= 0){this.$message.error('请选择物品代码'); return false}else{return true}},
focus: (type,val,tableScope) => { return this.getFilterList(type, val, "wms/inventory/Inventory-Balance",this.isFilter("itemCode", this.addPopData_YL[tableScope.$index].itemCode))}, focus: (type,val,tableScope) => { return this.getFilterList(type, val, "wms/inventory/Inventory-Balance",this.isFilter("itemCode", this.addPopData_YL[tableScope.$index].itemCode),1000)},
width:"auto", width:"auto",
}, },
// //
@ -241,26 +243,26 @@ export default {
// //
addPopColumns_HB:[ addPopColumns_HB:[
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic",this.isFilterForHB())}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic",this.isFilterForHB(),1000)},
// searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '', this.addPopData_HB) }, // searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '', this.addPopData_HB) },
width:"auto", width:"auto",
}, },
{ {
type: "filterSelect", label: "供应商代码", prop: "supplierCode", optionsLabel: "supplierSimpleName", optionsValue: "supplierCode", clearable:true, type: "filterSelect", label: "供应商代码", prop: "supplierCode", optionsLabel: "supplierSimpleName", optionsValue: "supplierCode", clearable:true,
beforeFocus:(tableScope)=>{if(!this.addPopData_FS[tableScope.$index].itemCode || this.addPopData_FS[tableScope.$index].length <= 0){this.$message.error('请选择物品代码'); return false}else{return true}}, beforeFocus:(tableScope)=>{if(!this.addPopData_HB[tableScope.$index].itemCode || this.addPopData_HB[tableScope.$index].length <= 0){this.$message.error('请选择物品代码'); return false}else{return true}},
focus: (type,val,tableScope) => { return this.getFilterList(type, val, "basedata/supplier-item",this.isFilter("itemCode", this.addPopData_FS[tableScope.$index].itemCode))}, focus: (type,val,tableScope) => { return this.getFilterList(type, val, "basedata/supplier-item",this.isFilter("itemCode", this.addPopData_HB[tableScope.$index].itemCode),1000)},
width:"auto", width:"auto",
}, },
{ {
type: "filterSelect", label: "采购订单号", prop: "poNumber",optionsValue: "poNumber", clearable:true, type: "filterSelect", label: "采购订单号", prop: "poNumber",optionsValue: "poNumber", clearable:true,
beforeFocus:(tableScope)=>{if(!this.addPopData_FS[tableScope.$index].itemCode || this.addPopData_FS[tableScope.$index].itemCode.length <= 0 || !this.addPopData_FS[tableScope.$index].supplierCode || this.addPopData_FS[tableScope.$index].supplierCode.length <= 0){this.$message.error('请选择物品代码和供应商代码'); return false}else{return true}}, beforeFocus:(tableScope)=>{if(!this.addPopData_HB[tableScope.$index].itemCode || this.addPopData_HB[tableScope.$index].itemCode.length <= 0 || !this.addPopData_HB[tableScope.$index].supplierCode || this.addPopData_HB[tableScope.$index].supplierCode.length <= 0){this.$message.error('请选择物品代码和供应商代码'); return false}else{return true}},
focus: (type,val,tableScope) => { return this.getFilterList(type, val, "wms/store/supplier-asn",this.isFilter("supplierCode", this.addPopData_FS[tableScope.$index].supplierCode))}, focus: (type,val,tableScope) => { return this.getFilterList(type, val, "wms/store/supplier-asn",this.isFilter("supplierCode", this.addPopData_HB[tableScope.$index].supplierCode),1000)},
width:"auto", width:"auto",
}, },
{ type: "filterSelect", label: "目标库位", prop: "locationCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "目标库位", prop: "locationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Location")}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/Location",false,1000)},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Location', 'InventoryBalance', '库位选择', this.addPopData_HB) }, // searchButton: (val) => { this.showSerarchPage(val, 'basedata/Location', 'InventoryBalance', '', this.addPopData_HB) },
width:"auto", searchButton:false width:"auto"
}, },
{ type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto", { type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto",
rules: [{ rules: [{
@ -369,7 +371,7 @@ export default {
let _prop_yl = prop_yl ? prop_yl : prop; let _prop_yl = prop_yl ? prop_yl : prop;
return item.remark == '原料' ? this.packingStagingLists[item.packingCode][_prop_yl] : this.newPackArr[index][prop] return item.remark == '原料' ? this.packingStagingLists[item.packingCode][_prop_yl] : this.newPackArr[index][prop]
}, },
// todo: //
lastCommitHttp(){ lastCommitHttp(){
this.addPopData_YL.forEach(item=>{ this.addPopData_YL.forEach(item=>{
item.remark = '原料' item.remark = '原料'
@ -609,6 +611,9 @@ export default {
this.addPopData_FS[data[3].$index].itemCode = null this.addPopData_FS[data[3].$index].itemCode = null
}) })
} }
this.addPopData_FS[data[3].$index].supplierCode = null
this.addPopData_FS[data[3].$index].poNumber = null
this.addPopData_FS[data[3].$index].locationCode = null
} }
if(data[1].prop == "supplierCode"){ if(data[1].prop == "supplierCode"){
this.supplierStagingLists[data[2]] = data[0] this.supplierStagingLists[data[2]] = data[0]
@ -620,6 +625,11 @@ export default {
this.locationStagingLists[data[2]] = data[0] this.locationStagingLists[data[2]] = data[0]
} }
}, },
//
clearHandle_FS(item,scope){
this.addPopData_FS[scope.$index].supplierCode = null
this.addPopData_FS[scope.$index].poNumber = null
},
// //
pushYL(data){ pushYL(data){
if(data[1].prop=="itemCode"){ if(data[1].prop=="itemCode"){
@ -666,6 +676,8 @@ export default {
pushHB(data){ pushHB(data){
if(data[1].prop == "itemCode"){ if(data[1].prop == "itemCode"){
this.itemStagingLists[data[2]] = data[0] this.itemStagingLists[data[2]] = data[0]
this.addPopData_HB[data[3].$index].supplierCode = null
this.addPopData_HB[data[3].$index].poNumber = null
} }
if(data[1].prop == "supplierCode"){ if(data[1].prop == "supplierCode"){
this.supplierStagingLists[data[2]] = data[0] this.supplierStagingLists[data[2]] = data[0]
@ -677,6 +689,11 @@ export default {
this.locationStagingLists[data[2]] = data[0] this.locationStagingLists[data[2]] = data[0]
} }
}, },
//
clearHandle_HB(item,scope){
this.addPopData_HB[scope.$index].supplierCode = null
this.addPopData_HB[scope.$index].poNumber = null
},
} }
}; };
</script> </script>

Loading…
Cancel
Save