Browse Source

卡顿

master_hella_20240701
yufei0306 6 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)" @click="handleDeleteTable(row, $index)"
/> />
</el-table-column> </el-table-column>
<el-table-column :label="tableFields[0].label" align="center"> <el-table-column :label="tableFields[0].label" align="center" v-slot="{ row, $index }">
<template v-slot="{ row }"> <el-form :key="'类型form'+$index"
<el-form
ref="TableBaseForm_Ref" ref="TableBaseForm_Ref"
:model="row" :model="row"
style="width: 100%;" style="width: 100%;"
:rules="tableFormRules" :rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'"> :class="tableFormRules ? '' : 'noRulesForm'">
<el-form-item :prop="tableFields[0].field"> <el-form-item :key="'类型formitem'+$index" :prop="tableFields[0].field">
<el-select :key="row.id+$index" <el-select :key="'类型select'+row.id+$index"
v-model="row.type" v-model="row.type"
:placeholder="tableFields[0].placeholder || '请输入' + tableFields[0].label" :placeholder="tableFields[0].placeholder || '请输入' + tableFields[0].label"
@change="tableFormChange(tableFields[0].field, $event, row)" @change="tableFormChange(tableFields[0].field, $event, row)"
> >
<el-option <el-option
v-for="dict in countScopeType" v-for="dict in countScopeType"
:key="dict.value" :key="'类型option'+dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:prop="tableFields[1].field" :prop="tableFields[1].field"
:label="tableFields[1].label" :label="tableFields[1].label"
align="center" align="center" v-slot="{ row, $index }"
> >
<template v-slot="{ row }"> <el-form :key="'值form'+$index"
<el-form
ref="TableBaseForm_Ref1" ref="TableBaseForm_Ref1"
:model="row" :model="row"
style="width: 100%;" style="width: 100%;"
:rules="tableFormRules" :rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'"> :class="tableFormRules ? '' : 'noRulesForm'">
<el-form-item :prop="tableFields[1].field"> <el-form-item :key="'值formitem'+$index" :prop="tableFields[1].field">
<el-select :key="row.id+$index" <el-select :key="'值select'+row.id+$index"
v-model="row.value" v-model="row.value"
:placeholder=" :placeholder="
tableFields[1].placeholder || tableFields[1].placeholder ||
'请输入' + tableFields[1].label '请输入' + tableFields[1].label
" "
v-if=" v-if="
row.type == 'OWNER' || row.type == 'OWNER' ||
row.type == 'SUPPLIER' || row.type == 'SUPPLIER' ||
row.type == 'CUSTOMER' || row.type == 'CUSTOMER' ||
row.type == 'ABC' || row.type == 'ABC' ||
row.type == 'ITEMS_TYPE' || row.type == 'ITEMS_TYPE' ||
row.type == 'ITEMS_GROUP' || row.type == 'ITEMS_GROUP' ||
row.type == 'ITEMS_CODE' || row.type == 'ITEMS_CODE' ||
row.type == 'WAREHOUSE_CODE' || row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' || row.type == 'AREABASIC_CODE' ||
row.type == 'LOCATIONGROUP_CODE' || row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE' row.type == 'LOCATION_CODE'
" "
> >
<el-option <el-option
v-for="item in currentList(row.initOptions)" v-for="item in currentList(row.initOptions)"
:key="item.value" :key="'值option'+item.value"
:label="item.label" :label="item.label"
:value="item.value" :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"> </el-form-item>
<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> </el-form>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="button flex"> <div class="button flex">
@ -132,7 +128,7 @@ const props = defineProps({
countScopeType: { countScopeType: {
type: Array, type: Array,
required: false, required: false,
default: null default: []
}, },
}) })
const tableData = props.tableData 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' row.type == 'LOCATION_CODE'
) { ) {
formTypeDetail.value = 'Select' formTypeDetail.value = 'Select'
// switch (row.type) { switch (row.type) {
// case 'OWNER': case 'OWNER':
// getOwnerAllList(null,true) getOwnerAllList(null,true)
// break break
// case 'SUPPLIER': case 'SUPPLIER':
// getSupplierAllList(null,true) getSupplierAllList(null,true)
// break break
// case 'CUSTOMER': case 'CUSTOMER':
// getCustomerAllList(null,true) getCustomerAllList(null,true)
// break break
// case 'ABC': case 'ABC':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ABC_CLASS) countPlanAllList.value = getStrDictOptions(DICT_TYPE.ABC_CLASS)
// break break
// case 'ITEMS_TYPE': case 'ITEMS_TYPE':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_TYPE) countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
// break break
// case 'ITEMS_GROUP': case 'ITEMS_GROUP':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_GROUP) countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
// break break
// case 'ITEMS_CODE': case 'ITEMS_CODE':
// getItembasicAllList(null,true) getItembasicAllList(null,true)
// break break
// case 'WAREHOUSE_CODE': case 'WAREHOUSE_CODE':
// getWarehouseAllList(null,true) getWarehouseAllList(null,true)
// break break
// case 'AREABASIC_CODE': case 'AREABASIC_CODE':
// getAreaAllList(null,true) getAreaAllList(null,true)
// break break
// case 'LOCATIONGROUP_CODE': case 'LOCATIONGROUP_CODE':
// getLocationgroupAllList(null,true) getLocationgroupAllList(null,true)
// break break
// case 'LOCATION_CODE': case 'LOCATION_CODE':
// getLocationAllList(null,true) getLocationAllList(null,true)
// break break
// } }
} else if (val == 'PROJECT') { } else if (val == 'PROJECT') {
formTypeDetail.value = 'InputString' formTypeDetail.value = 'InputString'
} }
@ -604,41 +604,41 @@ const selectChangeDetail = (field, val) => {
val == 'LOCATION_CODE' val == 'LOCATION_CODE'
) { ) {
formTypeDetail.value = 'Select' formTypeDetail.value = 'Select'
// switch (val) { switch (val) {
// case 'OWNER': case 'OWNER':
// getOwnerAllList(null,true) getOwnerAllList(null,true)
// break break
// case 'SUPPLIER': case 'SUPPLIER':
// getSupplierAllList(null,true) getSupplierAllList(null,true)
// break break
// case 'CUSTOMER': case 'CUSTOMER':
// getCustomerAllList(null,true) getCustomerAllList(null,true)
// break break
// case 'ABC': case 'ABC':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ABC_CLASS) countPlanAllList.value = getStrDictOptions(DICT_TYPE.ABC_CLASS)
// break break
// case 'ITEMS_TYPE': case 'ITEMS_TYPE':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_TYPE) countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
// break break
// case 'ITEMS_GROUP': case 'ITEMS_GROUP':
// countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_GROUP) countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
// break break
// case 'ITEMS_CODE': case 'ITEMS_CODE':
// getItembasicAllList(null,true) getItembasicAllList(null,true)
// break break
// case 'WAREHOUSE_CODE': case 'WAREHOUSE_CODE':
// getWarehouseAllList(null,true) getWarehouseAllList(null,true)
// break break
// case 'AREABASIC_CODE': case 'AREABASIC_CODE':
// getAreaAllList(null,true) getAreaAllList(null,true)
// break break
// case 'LOCATIONGROUP_CODE': case 'LOCATIONGROUP_CODE':
// getLocationgroupAllList(null,true) getLocationgroupAllList(null,true)
// break break
// case 'LOCATION_CODE': case 'LOCATION_CODE':
// getLocationAllList(null,true) getLocationAllList(null,true)
// break break
// } }
} else if (val == 'PROJECT') { } else if (val == 'PROJECT') {
formTypeDetail.value = 'InputString' formTypeDetail.value = 'InputString'
} }
@ -662,41 +662,41 @@ const tableFormChange = async (field, val, row) => {
row.type == 'LOCATION_CODE' row.type == 'LOCATION_CODE'
) { ) {
row.formType = 'Select' row.formType = 'Select'
// switch (row.type) { switch (row.type) {
// case 'OWNER': case 'OWNER':
// getOwnerAllList(row) getOwnerAllList(row)
// break break
// case 'SUPPLIER': case 'SUPPLIER':
// getSupplierAllList(row) getSupplierAllList(row)
// break break
// case 'CUSTOMER': case 'CUSTOMER':
// getCustomerAllList(row) getCustomerAllList(row)
// break break
// case 'ABC': case 'ABC':
// row.initOptions = getStrDictOptions(DICT_TYPE.ABC_CLASS) row.initOptions = getStrDictOptions(DICT_TYPE.ABC_CLASS)
// break break
// case 'ITEMS_TYPE': case 'ITEMS_TYPE':
// row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_TYPE) row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
// break break
// case 'ITEMS_GROUP': case 'ITEMS_GROUP':
// row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_GROUP) row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
// break break
// case 'ITEMS_CODE': case 'ITEMS_CODE':
// getItembasicAllList(row) getItembasicAllList(row)
// break break
// case 'WAREHOUSE_CODE': case 'WAREHOUSE_CODE':
// getWarehouseAllList(row) getWarehouseAllList(row)
// break break
// case 'AREABASIC_CODE': case 'AREABASIC_CODE':
// getAreaAllList(row) getAreaAllList(row)
// break break
// case 'LOCATIONGROUP_CODE': case 'LOCATIONGROUP_CODE':
// getLocationgroupAllList(row) getLocationgroupAllList(row)
// break break
// case 'LOCATION_CODE': case 'LOCATION_CODE':
// getLocationAllList(row) getLocationAllList(row)
// break break
// } }
} else if (row.type == 'PROJECT') { } else if (row.type == 'PROJECT') {
row.formType = 'InputString' row.formType = 'InputString'
} }

Loading…
Cancel
Save