Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
songguoqiang 5 months ago
parent
commit
d65711745b
  1. 6
      src/components/Form/src/Form.vue
  2. 15
      src/components/Search/src/Search.vue
  3. 13
      src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue
  4. 3
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts
  5. 1
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts
  6. 1
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts
  7. 24
      src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts
  8. 60
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue
  9. 20
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts
  10. 6
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

6
src/components/Form/src/Form.vue

@ -55,7 +55,7 @@ export default defineComponent({
vLoading: propTypes.bool.def(false),
labelPosition: propTypes.string.def('left'),
},
emits: ['register','opensearchTable','clearSearchInput', 'onChange', 'onBlur','onEnter','hiddenFilterButton','changeDialogWidth'],
emits: ['register','opensearchTable','clearSearchInput', 'onChange', 'onBlur','onEnter','hiddenFilterButton','changeDialogWidth','onInput'],
setup(props, { slots, expose, emit }) {
// element form
const elFormRef = ref<ComponentRef<typeof ElForm>>()
@ -204,6 +204,9 @@ export default defineComponent({
const onBlur = (field, e) => {
emit('onBlur', field, e)
}
const onInput = (field,value) => {
emit('onInput', field,value)
}
// formItem
const renderFormItem = (item: FormSchema) => {
// options
@ -382,6 +385,7 @@ export default defineComponent({
style={item.componentProps?.style}
onChange={(e)=>{onChange(item.field, e)}}
onBlur={(e)=>{onBlur(item.field, e)}}
onInput={(value)=>{onInput(item.field,value)}}
{...(notRenderOptions.includes(item?.component as string) &&
item?.componentProps?.options
? { options: item?.componentProps?.options || [] }

15
src/components/Search/src/Search.vue

@ -43,7 +43,7 @@ const props = defineProps({
}
})
const emit = defineEmits(['search', 'reset'])
const emit = defineEmits(['search', 'reset','onInput'])
const visible = ref(true)
@ -88,6 +88,14 @@ const { register, elFormRef, methods } = useForm({
model: props.model || {}
})
const onInput = (field,value) => {
emit('onInput', field,value)
}
const formRef = ref()
const setFormValues = (formData)=>{
formRef.value.setValues(formData)
}
const search = async () => {
await unref(elFormRef)?.validate(async (isValid) => {
if (isValid) {
@ -118,12 +126,14 @@ const setVisible = () => {
}
const Search = ref()
onMounted(() => {})
defineExpose({setFormValues}) // open
</script>
<template>
<!-- update by 芋艿class="-mb-15px" 用于降低和 ContentWrap 组件的底部距离避免空隙过大 -->
<div ref="Search">
<Form
<Form ref="formRef"
:inline="inline"
:is-col="isCol"
:is-custom="false"
@ -132,6 +142,7 @@ onMounted(() => {})
class="-mb-15px search"
hide-required-asterisk
@register="register"
@onInput="onInput"
>
<template #action>
<div v-if="layout === 'inline'">

13
src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SupplierUser.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search ref="seachRef" :schema="SupplierUser.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" @onInput="onInput"/>
</ContentWrap>
<!-- 列表头部 -->
@ -89,6 +89,17 @@ const tableColumns = ref(SupplierUser.allSchemas.tableColumns)
const updataTableColumns = (val) => {
tableColumns.value = val
}
const seachRef = ref()
const onInput = (field,value) => {
if('userId'==field){
value = value.replace(/[^\d]/g,'')
seachRef.value.setFormValues({
userId:value
})
}
}
//
const searchTableParams = ref([

3
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts

@ -489,7 +489,8 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
},
tableForm: {
type: 'InputNumber',
min: 1,
min: 0.000001,
default:1,
precision: 6
}
},

1
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts

@ -731,6 +731,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm:{
disabled:true,
type: 'Select'
}
},

1
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts

@ -732,6 +732,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm:{
disabled:true,
type: 'Select'
}
},

24
src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts

@ -911,18 +911,18 @@ export const ProductreceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '操作',
hiddenInMain:true,
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:false,
}
// {
// label: '操作',
// hiddenInMain:true,
// field: 'action',
// isDetail: false,
// isForm: false ,
// table: {
// width: 150,
// fixed: 'right'
// },
// isTableForm:false,
// }
]))
//表单校验

60
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue

@ -62,16 +62,37 @@
@tableFormButton="tableFormButton"
/>
<!-- bom列表 -->
<!-- Mes列表 -->
<Dialog
:title="DialogTitle"
v-model="bomModelVisible"
v-model="mesModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<Table
:columns="ProductreceiptDetailb.allSchemas.tableColumns"
:data="detatableDataMes.tableList"
:loading="detatableDataMes.loading"
:pagination="{
total: detatableDataMes.total
}"
v-model:pageSize="detatableDataMes.pageSize"
v-model:currentPage="detatableDataMes.currentPage"
v-model:sort="detatableDataMes.sort"
/>
</Dialog>
<!-- bom列表 -->
<Dialog
:title="BomDialogTitle"
v-model="bomModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<Table
:columns="BackflushRecordDetailb.allSchemas.tableColumns"
:data="detatableDataBom.tableList"
:loading="detatableDataBom.loading"
:pagination="{
@ -86,11 +107,12 @@
<script setup lang="ts">
import download from '@/utils/download'
import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules, ProductreceiptDetailb } from './productreceiptAssembleRecordMain.data'
import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules, ProductreceiptDetailb,BackflushRecordDetailb } from './productreceiptAssembleRecordMain.data'
import * as ProductreceiptRecordMainApi from '@/api/wms/productreceiptRecordMain'
import * as ProductreceiptRecordDetailApi from '@/api/wms/productreceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ProductreceiptDetailbApi from '@/api/wms/productreceiptDetailb'
import * as BackflushRecordDetailbApi from '@/api/wms/backflushRecordDetailb'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
//
@ -105,6 +127,15 @@ routeName.value = route.name
const tableColumns = ref([...ProductreceiptRecordMain.allSchemas.tableColumns,...ProductreceiptRecordDetail.allSchemas.tableMainColumns])
// table
const buttondataTable = ref([{
label: 'Mes',
name: 'mes',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},{
label: 'Bom',
name: 'bom',
hide: false,
@ -115,11 +146,20 @@ const buttondataTable = ref([{
link: true, //
}])
// Mes
const DialogTitle = ref('Mes信息')
const mesModelVisible = ref(false)
const { tableObject: detatableDataMes, tableMethods: detatableMethodsMes } =useTable({
getListApi: ProductreceiptDetailbApi.getProductreceiptDetailbPage
})
const { getList:getDetailListMes } = detatableMethodsMes
// Bom
const DialogTitle = ref('Bom信息')
const BomDialogTitle = ref('Bom信息')
const bomModelVisible = ref(false)
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: ProductreceiptDetailbApi.getProductreceiptDetailbPage
getListApi: BackflushRecordDetailbApi.getBackflushRecordDetailbPage
})
const { getList:getDetailListBom } = detatableMethodsBom
@ -220,9 +260,17 @@ const searchFormClick = (searchData) => {
// Bom
const tableFormButton = async (val , row) => {
if (val == 'mes') { // bom
mesModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Mes信息'
detatableDataMes.params = {
masterId: row.masterId
}
await getDetailListMes()
}
if (val == 'bom') { // bom
bomModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
BomDialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
masterId: row.masterId
}

20
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts

@ -1015,7 +1015,7 @@ export const ProductreceiptDetailb = useCrudSchemas(reactive<CrudSchema[]>([
label: '主表ID',
field: 'masterId',
sort: 'custom',
isSearch: true,
isTable:false,
form: {
component: 'InputNumber',
value: 0
@ -1095,13 +1095,13 @@ export const ProductreceiptDetailb = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))

6
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -2282,7 +2282,8 @@ export const PurchasereceiptRequestDetailLabel = useCrudSchemas(reactive<CrudSch
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
isTableRowValue: true, //查询当前searchTable表中行数据的值
isMainValue: false
},
{
key: 'available',
@ -2306,7 +2307,8 @@ export const PurchasereceiptRequestDetailLabel = useCrudSchemas(reactive<CrudSch
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
isTableRowValue: true, //查询当前searchTable表中行数据的值
isMainValue: false
},
{
key: 'available',

Loading…
Cancel
Save