diff --git a/src/views/goods/goods/detail.vue b/src/views/goods/goods/detail.vue index ae25e2e..d2b8274 100644 --- a/src/views/goods/goods/detail.vue +++ b/src/views/goods/goods/detail.vue @@ -1,18 +1,57 @@ @@ -144,7 +154,7 @@ import { apiGoodsclassLists } from "@/api/goodsclass"; import { apiBrandLists } from "@/api/brand"; import { apiUnitLists } from "@/api/unit"; import { apiWarehouseLists } from "@/api/warehouse"; -import { timeFormat } from "@/utils/util"; +import { goods_label } from "@/components/dialogTable/dialogTableConfig" import type { PropType } from "vue"; defineProps({ dictData: { @@ -156,6 +166,7 @@ const emit = defineEmits(["success", "close"]); const formRef = shallowRef(); const popupRef = shallowRef>(); const mode = ref("add"); +const showDialog = ref(false) // 弹窗标题 const popupTitle = computed(() => { @@ -182,6 +193,8 @@ const formData = reactive({ location: "", stocktip: "", retail_name: "", + sys_labels_text: "", + sys_labels: "", imgs: "", details: "", data: "", @@ -189,6 +202,20 @@ const formData = reactive({ sort: "", }); + +const customEvent = (e) => { + formData.sys_labels = [] + let text = [] + e.forEach(item => { + formData.sys_labels.push(item.id) + text.push(item.name) + }); + formData.sys_labels_text = text.join(',') + formData.sys_labels = formData.sys_labels.join(',') + showDialog.value = false +} + + // 表单验证 const formRules = reactive({ name: [ diff --git a/src/views/goods/goods/index.vue b/src/views/goods/goods/index.vue index e551f40..74a3173 100644 --- a/src/views/goods/goods/index.vue +++ b/src/views/goods/goods/index.vue @@ -52,8 +52,8 @@ - - + + @@ -61,11 +61,12 @@ + - - + + - + @@ -73,12 +74,12 @@ 编辑 - - 详情 - 删除 + + 详情 + @@ -99,7 +100,7 @@ import { apiGoodsLists, apiGoodsDelete } from '@/api/goods' import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' -import DetailPopup from './details.vue' +import DetailPopup from './detail.vue' const editRef = shallowRef>() const detailRef = shallowRef>() @@ -156,8 +157,8 @@ const handleEdit = async (data: any) => { const handleDetail = async (data: any) => { showDetail.value = true await nextTick() - detailRef.value?.open() - detailRef.value?.getDetail(data) + detailRef.value?.open('edit') + detailRef.value?.setFormData(data) } // 删除 diff --git a/src/views/retail/cashierclass/detail.vue b/src/views/retail/cashierclass/detail.vue index 8163fc0..7d8fca6 100644 --- a/src/views/retail/cashierclass/detail.vue +++ b/src/views/retail/cashierclass/detail.vue @@ -39,6 +39,28 @@ {{ formData.auditingtime }} + +
+ + + + + + + + + + + + + + + +
+
+ +
+ @@ -46,6 +68,8 @@