zhang_li 10 months ago
parent
commit
f8067f464d
  1. 10
      src/components/Detail/src/Detail.vue
  2. 66
      src/components/UploadFile/src/Preview.vue
  3. 2
      src/views/Home/components/material.vue
  4. 2
      src/views/Home/components/produce.vue
  5. 2
      src/views/Home/components/product.vue
  6. 3
      src/views/Home/components/supplierIndex.vue
  7. 2
      src/views/wms/basicDataManage/factoryModeling/location/location.data.ts
  8. 8
      src/views/wms/basicDataManage/itemManage/bom/bom.data.ts
  9. 10
      src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue

10
src/components/Detail/src/Detail.vue

@ -72,6 +72,9 @@
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
>
<template #photos="{ row }">
<div v-for="(item,index) in row.photos.split(',')" :key="index" style="color:#409eff ; cursor: pointer;" @click="openImage(item)">{{ item }}</div>
</template>
<template #action="{ row }">
<ButtonBase
:Butttondata="buttondata"
@ -551,7 +554,8 @@ const emit = defineEmits([
'changeTabs',
'selectChangeDetail',
'detailOpenForm',
'tableFormButton'
'tableFormButton',
'openImage'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
@ -596,6 +600,10 @@ const searchFormClick = async (searchData) => {
const selectChangeDetail = (field, val) => {
emit('selectChangeDetail', field, val)
}
//
const openImage=(item)=>{
emit('openImage', item)
}
//
watch(
() => props.apiPage,

66
src/components/UploadFile/src/Preview.vue

@ -0,0 +1,66 @@
<template>
<div class="preview">
<el-dialog v-model="dialogTableVisible" title="" min-width="80%">
<div class="dialog">
<Icon
icon="ep:close"
class="cursor-pointer close"
color="white"
size="32"
@click="dialogTableVisible = false"
/>
<img :src="chooseItem" alt=""/>
</div>
</el-dialog>
</div>
</template>
<script lang="ts" setup>
const dialogTableVisible = ref(false)
const chooseItem = ref()
const preview = async (item) => {
chooseItem.value = item
dialogTableVisible.value = true
}
defineExpose({ preview }) // open
//
const emit = defineEmits(['deleteFile'])
</script>
<style scoped lang="scss">
.file {
display: flex;
align-items: center;
cursor: pointer;
.name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 140px;
}
&:hover{
.name {
color: #409eff;
}
}
}
img {
width: 100%;
}
::v-deep(.el-dialog) {
background: none;
}
::v-deep(.el-dialog__header) {
display: none !important;
}
.dialog {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.close {
position: absolute;
right: 10px;
top: 10px;
}
</style>

2
src/views/Home/components/material.vue

@ -227,7 +227,7 @@ const getMaterialData = async () => {
})
}
const formatter = (type, dict) => {
let str = getStrDictOptions(dict).filter((item) => type == item.value)[0].label
let str = getStrDictOptions(dict).filter((item) => type == item.value)[0]?.label
return str
}
const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption

2
src/views/Home/components/produce.vue

@ -178,7 +178,7 @@ const getProduceData = async () => {
})
}
const formatter = (type, dict) => {
let str = getStrDictOptions(dict).filter((item) => type == item.value)[0].label
let str = getStrDictOptions(dict).filter((item) => type == item.value)[0]?.label
return str
}
const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption

2
src/views/Home/components/product.vue

@ -205,7 +205,7 @@ const getProductData = async () => {
})
}
const formatter = (type, dict) => {
let str = getStrDictOptions(dict).filter((item) => type == item.value)[0].label
let str = getStrDictOptions(dict).filter((item) => type == item.value)[0]?.label
return str
}
const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption

3
src/views/Home/components/supplierIndex.vue

@ -350,8 +350,7 @@ const getList = async () => {
}
}
const formatter = (type,dict) => {
let str = getStrDictOptions(dict).filter((item) => type == item.value)[0]
.label
let str = getStrDictOptions(dict).filter((item) => type == item.value)[0]?.label
return str
}
onMounted(async () => {

2
src/views/wms/basicDataManage/factoryModeling/location/location.data.ts

@ -118,7 +118,7 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: 'ERP库位代码',
label: 'ERP库位类型',
field: 'erpLocationCode',
dictType: DICT_TYPE.ERP_LOCATION,
dictClass: 'string',

8
src/views/wms/basicDataManage/itemManage/bom/bom.data.ts

@ -37,6 +37,12 @@ export const Bom = useCrudSchemas(reactive<CrudSchema[]>([
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'enableMake',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
@ -88,7 +94,7 @@ export const Bom = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
componentProps: {
min: 1,
min: 0,
precision: 6
}
},

10
src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue

@ -57,7 +57,10 @@
:detailAllSchemas="InspectRecordDetail.allSchemas"
:detailAllSchemasRules="InspectRecordDetailRules"
:apiPage="InspectRecordDetailApi.getInspectRecordDetailPage"
fromeWhere="inspectRecordMain"
@openImage="openImage"
/>
<Preview ref="preview"/>
</template>
<script setup lang="ts">
@ -66,6 +69,7 @@ import { InspectRecordMain,InspectRecordMainRules,InspectRecordDetail,InspectRec
import * as InspectRecordMainApi from '@/api/wms/inspectRecordMain'
import * as InspectRecordDetailApi from '@/api/wms/inspectRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import Preview from '@/components/UploadFile/src/Preview.vue'
//
defineOptions({ name: 'InspectRecordMain' })
@ -159,7 +163,11 @@ const searchFormClick = (searchData) => {
}
getList() //
}
//
const preview = ref()
const openImage=(item)=>{
preview.value.preview(item)
}
/** 初始化 **/
onMounted(async () => {
getList()

Loading…
Cancel
Save