Browse Source

卡顿

master_hella_20240701
yufei0306 5 months ago
parent
commit
11e74df335
  1. 122
      src/components/TableFormCountPlan/src/TableFormCountPlan.vue
  2. 210
      src/views/wms/countManage/count/countPlanMain/index.vue

122
src/components/TableFormCountPlan/src/TableFormCountPlan.vue

@ -13,87 +13,83 @@
@click="handleDeleteTable(row, $index)"
/>
</el-table-column>
<el-table-column :label="tableFields[0].label" align="center">
<template v-slot="{ row }">
<el-form
<el-table-column :label="tableFields[0].label" align="center" v-slot="{ row, $index }">
<el-form :key="'类型form'+$index"
ref="TableBaseForm_Ref"
:model="row"
style="width: 100%;"
:rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'">
<el-form-item :prop="tableFields[0].field">
<el-select :key="row.id+$index"
v-model="row.type"
:placeholder="tableFields[0].placeholder || '请输入' + tableFields[0].label"
@change="tableFormChange(tableFields[0].field, $event, row)"
>
<el-option
v-for="dict in countScopeType"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<el-form-item :key="'类型formitem'+$index" :prop="tableFields[0].field">
<el-select :key="'类型select'+row.id+$index"
v-model="row.type"
:placeholder="tableFields[0].placeholder || '请输入' + tableFields[0].label"
@change="tableFormChange(tableFields[0].field, $event, row)"
>
<el-option
v-for="dict in countScopeType"
:key="'类型option'+dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column
:prop="tableFields[1].field"
:label="tableFields[1].label"
align="center"
align="center" v-slot="{ row, $index }"
>
<template v-slot="{ row }">
<el-form
<el-form :key="'值form'+$index"
ref="TableBaseForm_Ref1"
:model="row"
style="width: 100%;"
:rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'">
<el-form-item :prop="tableFields[1].field">
<el-select :key="row.id+$index"
v-model="row.value"
:placeholder="
tableFields[1].placeholder ||
'请输入' + tableFields[1].label
"
v-if="
row.type == 'OWNER' ||
row.type == 'SUPPLIER' ||
row.type == 'CUSTOMER' ||
row.type == 'ABC' ||
row.type == 'ITEMS_TYPE' ||
row.type == 'ITEMS_GROUP' ||
row.type == 'ITEMS_CODE' ||
row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' ||
row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE'
"
>
<el-option
v-for="item in currentList(row.initOptions)"
:key="item.value"
:label="item.label"
:value="item.value"
<el-form-item :key="'值formitem'+$index" :prop="tableFields[1].field">
<el-select :key="'值select'+row.id+$index"
v-model="row.value"
:placeholder="
tableFields[1].placeholder ||
'请输入' + tableFields[1].label
"
v-if="
row.type == 'OWNER' ||
row.type == 'SUPPLIER' ||
row.type == 'CUSTOMER' ||
row.type == 'ABC' ||
row.type == 'ITEMS_TYPE' ||
row.type == 'ITEMS_GROUP' ||
row.type == 'ITEMS_CODE' ||
row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' ||
row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE'
"
>
<el-option
v-for="item in currentList(row.initOptions)"
:key="'值option'+item.value"
:label="item.label"
:value="item.value"
/>
<div style="display: flex;align-items: center">
<span style="padding: 10px;">{{ pageCount }} </span>
<el-button text bg size="small" :disabled="pageCount<=1" @click="prexPage">上一页</el-button>
<el-button text bg size="small" :disabled="row.initOptions&&pageCount*15>=row.initOptions.length" @click="nextPage">下一页</el-button>
</div>
</el-select>
<el-input :key="'值input'+$index"
v-model="row.value"
:placeholder="
tableFields[1].placeholder ||
'请输入' + tableFields[1].label
"
v-else
/>
<div style="display: flex;align-items: center">
<span style="padding: 10px;">{{ pageCount }} </span>
<el-button text bg size="small" :disabled="pageCount<=1" @click="prexPage">上一页</el-button>
<el-button text bg size="small" :disabled="row.initOptions&&pageCount*15>=row.initOptions.length" @click="nextPage">下一页</el-button>
</div>
</el-select>
<el-input
v-model="row.value"
:placeholder="
tableFields[1].placeholder ||
'请输入' + tableFields[1].label
"
v-else
/>
</el-form-item>
</el-form-item>
</el-form>
</template>
</el-table-column>
</el-table>
<div class="button flex">
@ -132,7 +128,7 @@ const props = defineProps({
countScopeType: {
type: Array,
required: false,
default: null
default: []
},
})
const tableData = props.tableData

210
src/views/wms/countManage/count/countPlanMain/index.vue

@ -415,41 +415,41 @@ const detailOpenForm = (type, row) => {
row.type == 'LOCATION_CODE'
) {
formTypeDetail.value = 'Select'
// switch (row.type) {
// case 'OWNER':
// getOwnerAllList(null,true)
// break
// case 'SUPPLIER':
// getSupplierAllList(null,true)
// break
// case 'CUSTOMER':
// getCustomerAllList(null,true)
// break
// case 'ABC':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ABC_CLASS)
// break
// case 'ITEMS_TYPE':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
// break
// case 'ITEMS_GROUP':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
// break
// case 'ITEMS_CODE':
// getItembasicAllList(null,true)
// break
// case 'WAREHOUSE_CODE':
// getWarehouseAllList(null,true)
// break
// case 'AREABASIC_CODE':
// getAreaAllList(null,true)
// break
// case 'LOCATIONGROUP_CODE':
// getLocationgroupAllList(null,true)
// break
// case 'LOCATION_CODE':
// getLocationAllList(null,true)
// break
// }
switch (row.type) {
case 'OWNER':
getOwnerAllList(null,true)
break
case 'SUPPLIER':
getSupplierAllList(null,true)
break
case 'CUSTOMER':
getCustomerAllList(null,true)
break
case 'ABC':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ABC_CLASS)
break
case 'ITEMS_TYPE':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
break
case 'ITEMS_GROUP':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
break
case 'ITEMS_CODE':
getItembasicAllList(null,true)
break
case 'WAREHOUSE_CODE':
getWarehouseAllList(null,true)
break
case 'AREABASIC_CODE':
getAreaAllList(null,true)
break
case 'LOCATIONGROUP_CODE':
getLocationgroupAllList(null,true)
break
case 'LOCATION_CODE':
getLocationAllList(null,true)
break
}
} else if (val == 'PROJECT') {
formTypeDetail.value = 'InputString'
}
@ -604,41 +604,41 @@ const selectChangeDetail = (field, val) => {
val == 'LOCATION_CODE'
) {
formTypeDetail.value = 'Select'
// switch (val) {
// case 'OWNER':
// getOwnerAllList(null,true)
// break
// case 'SUPPLIER':
// getSupplierAllList(null,true)
// break
// case 'CUSTOMER':
// getCustomerAllList(null,true)
// break
// case 'ABC':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ABC_CLASS)
// break
// case 'ITEMS_TYPE':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
// break
// case 'ITEMS_GROUP':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
// break
// case 'ITEMS_CODE':
// getItembasicAllList(null,true)
// break
// case 'WAREHOUSE_CODE':
// getWarehouseAllList(null,true)
// break
// case 'AREABASIC_CODE':
// getAreaAllList(null,true)
// break
// case 'LOCATIONGROUP_CODE':
// getLocationgroupAllList(null,true)
// break
// case 'LOCATION_CODE':
// getLocationAllList(null,true)
// break
// }
switch (val) {
case 'OWNER':
getOwnerAllList(null,true)
break
case 'SUPPLIER':
getSupplierAllList(null,true)
break
case 'CUSTOMER':
getCustomerAllList(null,true)
break
case 'ABC':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ABC_CLASS)
break
case 'ITEMS_TYPE':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
break
case 'ITEMS_GROUP':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
break
case 'ITEMS_CODE':
getItembasicAllList(null,true)
break
case 'WAREHOUSE_CODE':
getWarehouseAllList(null,true)
break
case 'AREABASIC_CODE':
getAreaAllList(null,true)
break
case 'LOCATIONGROUP_CODE':
getLocationgroupAllList(null,true)
break
case 'LOCATION_CODE':
getLocationAllList(null,true)
break
}
} else if (val == 'PROJECT') {
formTypeDetail.value = 'InputString'
}
@ -662,41 +662,41 @@ const tableFormChange = async (field, val, row) => {
row.type == 'LOCATION_CODE'
) {
row.formType = 'Select'
// switch (row.type) {
// case 'OWNER':
// getOwnerAllList(row)
// break
// case 'SUPPLIER':
// getSupplierAllList(row)
// break
// case 'CUSTOMER':
// getCustomerAllList(row)
// break
// case 'ABC':
// row.initOptions = getStrDictOptions(DICT_TYPE.ABC_CLASS)
// break
// case 'ITEMS_TYPE':
// row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
// break
// case 'ITEMS_GROUP':
// row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
// break
// case 'ITEMS_CODE':
// getItembasicAllList(row)
// break
// case 'WAREHOUSE_CODE':
// getWarehouseAllList(row)
// break
// case 'AREABASIC_CODE':
// getAreaAllList(row)
// break
// case 'LOCATIONGROUP_CODE':
// getLocationgroupAllList(row)
// break
// case 'LOCATION_CODE':
// getLocationAllList(row)
// break
// }
switch (row.type) {
case 'OWNER':
getOwnerAllList(row)
break
case 'SUPPLIER':
getSupplierAllList(row)
break
case 'CUSTOMER':
getCustomerAllList(row)
break
case 'ABC':
row.initOptions = getStrDictOptions(DICT_TYPE.ABC_CLASS)
break
case 'ITEMS_TYPE':
row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
break
case 'ITEMS_GROUP':
row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
break
case 'ITEMS_CODE':
getItembasicAllList(row)
break
case 'WAREHOUSE_CODE':
getWarehouseAllList(row)
break
case 'AREABASIC_CODE':
getAreaAllList(row)
break
case 'LOCATIONGROUP_CODE':
getLocationgroupAllList(row)
break
case 'LOCATION_CODE':
getLocationAllList(row)
break
}
} else if (row.type == 'PROJECT') {
row.formType = 'InputString'
}

Loading…
Cancel
Save