diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue
index 4d039ba7b..ba04ec367 100644
--- a/src/components/BasicForm/src/BasicForm.vue
+++ b/src/components/BasicForm/src/BasicForm.vue
@@ -21,6 +21,7 @@
v-model="formSchema.type"
placeholder="选择盘点类型"
@change="selectChange('type', $event)"
+ v-if="!isDetail"
>
+
+
+
+
+
+
+
+
+
@@ -165,11 +194,30 @@ const props = defineProps({
required: false,
default: ''
},
+ // 盘点范围类型
countScopeType: {
type: Array,
required: false,
default: null
- }
+ },
+ // 是否从详情进入
+ isDetail: {
+ type: Boolean,
+ required: false,
+ default: false
+ },
+ //盘点详情子表新增的时候判断盘点范围值显示输入框还是下拉框
+ formTypeDetail: {
+ type: String,
+ required: false,
+ default: 'InputString'
+ },
+ //盘点详情子表新增的时候判断盘点范围值的下拉列表
+ countPlanAllList: {
+ type: Array,
+ required: false,
+ default: null
+ },
})
const { t } = useI18n() // 国际化
@@ -184,7 +232,7 @@ const formRef = ref() // 表单 Ref
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
-console.log('tableAllSchemas', tableAllSchemas.value)
+console.log('fromeWhere', props.fromeWhere)
/** 弹层操作 */
// formField form表单中的字段
@@ -377,6 +425,7 @@ const emit = defineEmits([
'opensearchTable',
'submitForm',
'selectChange',
+ 'selectChangeDetail',
'tableFormChange'
])
//普通下拉改变事件
@@ -431,6 +480,12 @@ const inpuFocus = (headerItem, row, index) => {
const selectChange = (field, val) => {
emit('selectChange', field, val)
}
+// 修改盘点范围类型
+const selectChangeDetail = (field, val,formSchema) => {
+ formSchema.value = ''
+ emit('selectChangeDetail', field, val)
+}
+
const tableFormChange = (field, val, row) => {
emit('tableFormChange', field, val, row)
diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue
index 0b90a363d..d39b6d795 100644
--- a/src/components/Detail/src/Detail.vue
+++ b/src/components/Detail/src/Detail.vue
@@ -104,9 +104,14 @@
:isBusiness="false"
:apiUpdate="apiUpdate"
:apiCreate="apiCreate"
+ :fromeWhere="fromeWhere"
+ :isDetail="true"
@searchTableSuccess="searchTableSuccess"
:detailData="detailData"
@submitForm="submitForm"
+ @selectChangeDetail="selectChangeDetail"
+ :formTypeDetail="formTypeDetail"
+ :countPlanAllList="countPlanAllList"
/>
@@ -208,11 +213,24 @@ const props = defineProps({
required: true,
default: null
},
+ // 盘点范围类型
countScopeType: {
type: Array,
required: false,
default: null
- }
+ },
+ //盘点详情子表新增的时候判断盘点范围值显示输入框还是下拉框
+ formTypeDetail: {
+ type: String,
+ required: false,
+ default: 'InputString'
+ },
+ //盘点详情子表新增的时候判断盘点范围值的下拉列表
+ countPlanAllList: {
+ type: Array,
+ required: false,
+ default: null
+ },
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
@@ -465,7 +483,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
// 传递给父类
-const emit = defineEmits(['searchTableSuccessDetail', 'changeTabs'])
+const emit = defineEmits(['searchTableSuccessDetail', 'changeTabs','selectChangeDetail'])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
@@ -503,7 +521,10 @@ const searchFormClick = (searchData) => {
// }
// getList() // 刷新当前列表
}
-
+// 选择盘点类型的时候针对限值的操作
+const selectChangeDetail = (field, val) => {
+ emit('selectChangeDetail', field, val)
+}
//监视属性
watch(
() =>props.apiPage,
diff --git a/src/components/DetailTable/src/DetailTable.vue b/src/components/DetailTable/src/DetailTable.vue
index 58f5ba226..2b1216e75 100644
--- a/src/components/DetailTable/src/DetailTable.vue
+++ b/src/components/DetailTable/src/DetailTable.vue
@@ -13,6 +13,9 @@
{{ forrmatter1(scope.row) }}
+
+
+
@@ -80,9 +83,14 @@ const forrmatter1 = (item) => {
return ''
}
}
-onMounted(async () => {
- console.log('props.data',props.data)
-})
+const isShowMainButton = (row, val) => {
+ if (val.indexOf(row.status) > -1) {
+ return false
+ } else {
+ return true
+ }
+}
+
diff --git a/src/views/wms/countManage/count/countPlanMain/index.vue b/src/views/wms/countManage/count/countPlanMain/index.vue
index 47b5f6f05..927714111 100644
--- a/src/views/wms/countManage/count/countPlanMain/index.vue
+++ b/src/views/wms/countManage/count/countPlanMain/index.vue
@@ -83,7 +83,10 @@
:allList="allList"
:countScopeType="getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)"
:Echo="Echo"
+ @selectChangeDetail="selectChangeDetail"
fromeWhere="countPlan"
+ :formTypeDetail="formTypeDetail"
+ :countPlanAllList="countPlanAllList"
/>
@@ -451,6 +454,67 @@ const selectChange = (field, val) => {
}
}
}
+const formTypeDetail = ref('InputString')//盘点详情子表新增的时候判断盘点范围值显示输入框还是下拉框
+const countPlanAllList = ref([])//盘点详情子表新增的时候判断盘点范围值的下拉列表
+// 详情新增的时候选择盘点范围类型的时候针对限值的操作
+const selectChangeDetail= (field, val) => {
+ console.log('888',CountPlanDetail.allSchemas.formSchema)
+ if (field == 'type') {
+ // CountPlanDetail.allSchemas.formSchema[1].value = ''
+ if (
+ val == 'OWNER' ||
+ val == 'SUPPLIER' ||
+ val == 'CUSTOMER' ||
+ val == 'ABC' ||
+ val == 'ITEMS_TYPE' ||
+ val == 'ITEMS_GROUP' ||
+ val == 'ITEMS_CODE' ||
+ val == 'WAREHOUSE_CODE' ||
+ val == 'AREABASIC_CODE' ||
+ val == 'LOCATIONGROUP_CODE' ||
+ val== 'LOCATION_CODE'
+ ) {
+ formTypeDetail.value = 'Select'
+ switch (val) {
+ case 'OWNER':
+ countPlanAllList.value = allList.value.ownerAllList
+ break
+ case 'SUPPLIER':
+ countPlanAllList.value= allList.value.supplierAllList
+ break
+ case 'CUSTOMER':
+ countPlanAllList.value = allList.value.customerAllList
+ 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':
+ countPlanAllList.value = allList.value.itembasicAllList
+ break
+ case 'WAREHOUSE_CODE':
+ countPlanAllList.value = allList.value.warehouseAllList
+ break
+ case 'AREABASIC_CODE':
+ countPlanAllList.value = allList.value.areaAllList
+ break
+ case 'LOCATIONGROUP_CODE':
+ countPlanAllList.value = allList.value.locationgroupAllList
+ break
+ case 'LOCATION_CODE':
+ countPlanAllList.value= allList.value.locationAllList
+ break
+ }
+ } else if (val == 'PROJECT') {
+ formTypeDetail.value = 'InputString'
+ }
+ }
+}
// 选择盘点范围类型
const tableFormChange = async (field, val, row) => {
if (field == 'type') {