Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

hella_online_20240829
高竟松 7 months ago
parent
commit
04c76349b9
  1. 2
      src/components/Form/src/Form.vue
  2. 4
      src/components/RouterSearch/index.vue
  3. 8
      src/layout/components/ToolHeader.vue
  4. 12
      src/layout/components/UserInfo/src/UserInfo.vue
  5. 20
      src/utils/formatTime.ts
  6. 2
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  7. 478
      src/views/wms/basicDataManage/orderManage/shift/shift.data.ts
  8. 48
      src/views/wms/countManage/count/countJobMain/countJobMain.data.ts
  9. 1
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  10. 114
      src/views/wms/countManage/count/countPlanMain/index.vue
  11. 24
      src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts
  12. 106
      src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts
  13. 24
      src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts
  14. 16
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
  15. 1
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts
  16. 35
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  17. 4
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  18. 8
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  19. 10
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
  20. 1
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts
  21. 10
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  22. 1
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  23. 8
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  24. 1
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts
  25. 19
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  26. 18
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  27. 18
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  28. 18
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
  29. 16
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  30. 16
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  31. 18
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  32. 12
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue
  33. 2
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  34. 33
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  35. 21
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  36. 1
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

2
src/components/Form/src/Form.vue

@ -126,7 +126,7 @@ export default defineComponent({
}
const clearSearchInput = (field) => {
emit('clearSearchInput')
emit('clearSearchInput',field)
}
expose({
setValues,

4
src/components/RouterSearch/index.vue

@ -17,7 +17,7 @@
/>
</el-select> -->
</ElDialog>
<div v-else class="custom-hover custom-hover1" @click.stop="showTopSearch = !showTopSearch">
<div v-else class="custom-hover custom-hover2" @click.stop="showTopSearch = !showTopSearch">
<Icon icon="ep:search" color="#ffffff"/>
<el-select
filterable
@ -170,7 +170,7 @@ defineExpose({
.w-220px {
width: 220px !important;
}
.custom-hover1{
.custom-hover2:hover{
background-color: transparent;
}
</style>

8
src/layout/components/ToolHeader.vue

@ -77,7 +77,7 @@ export default defineComponent({
></LocaleDropdown>
) : undefined} */}
{message.value ? (
<Message class="custom-hover" color="var(--top-header-text-color)"></Message>
<Message class="custom-hover custom-hover1" color="var(--top-header-text-color)"></Message>
) : undefined}
<UserInfo></UserInfo>
</div>
@ -93,4 +93,10 @@ $prefix-cls: #{$namespace}-tool-header;
.#{$prefix-cls} {
transition: left var(--transition-time-02);
}
.custom-hover1:hover{
opacity: 0.5;
background-color: transparent;
scale: 1.2;
transition: all 50ms;
}
</style>

12
src/layout/components/UserInfo/src/UserInfo.vue

@ -51,7 +51,7 @@ const toDocument = () => {
</script>
<template>
<ElDropdown class="custom-hover" :class="prefixCls" trigger="click">
<ElDropdown class="custom-hover custom-hover1" :class="prefixCls" trigger="click">
<div class="flex items-center">
<ElAvatar :src="avatar" alt="" class="w-[calc(var(--logo-height)-25px)] rounded-[50%]" />
<span class="pl-[5px] text-14px text-[var(--top-header-text-color)] <lg:hidden" style="color:#ffffff">
@ -76,3 +76,13 @@ const toDocument = () => {
</template>
</ElDropdown>
</template>
<style lang="scss" scoped>
.custom-hover1:hover{
opacity: 0.5;
background-color: transparent;
scale: 1.1;
transition: all 50ms;
}
</style>

20
src/utils/formatTime.ts

@ -26,11 +26,10 @@ export function formatDate(date: Date | number, format?: string): string {
/**
* +
*/
export function addDay(date: Date | number,addDay:number) {
return dayjs(date).add(addDay,'day')
export function addDay(date: Date | number, addDay: number) {
return dayjs(date).add(addDay, 'day')
}
/**
* +
*/
@ -163,6 +162,21 @@ export const dateFormatter = (row, column, cellValue) => {
}
return formatDate(cellValue)
}
/**
* element plus Formatter 使 YYYY-MM-DD HH:mm:ss
*
* @param row
* @param column
* @param cellValue
*/
// @ts-ignore
export const dateFormatter3 = (row, column, cellValue) => {
if (!cellValue) {
return
}
let str = formatDate(cellValue).split(' ')[1]
return str
}
// 获取时间戳
export const formatGetTime = (row, column, cellValue) => {
console.log(cellValue.getTime())

2
src/views/wms/basicDataManage/itemManage/itemarea/index.vue

@ -52,7 +52,7 @@
:tableData="tableData"
:apiUpdate="ItemareaApi.updateItemarea"
:apiCreate="ItemareaApi.createItemarea"
:isBusiness="false"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"

478
src/views/wms/basicDataManage/orderManage/shift/shift.data.ts

@ -1,283 +1,273 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { dateFormatter, dateFormatter3 } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import {validateYS} from '@/utils/validator'
import { validateYS } from '@/utils/validator'
/**
* @returns {Array}
*/
export const Shift = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
export const Shift = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
isSearch: true
},
isSearch: true,
},
{
label: '名称',
field: 'name',
sort: 'custom',
table: {
width: 150
},
},
{
label: '开始时间',
field: 'beginTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'HH:mm:ss'
},
sort: 'custom',
table: {
width: 180,
},
form: {
component: 'TimePicker',
componentProps: {
style: {width:'100%'},
type: 'time',
dateFormat: 'HH:mm:ss',
valueFormat: 'x',
{
label: '名称',
field: 'name',
sort: 'custom',
table: {
width: 150
}
},
isSearch: false,
search: {
show: false,
component: 'TimePicker',
componentProps: {
valueFormat: 'HH:mm:ss',
type: 'timeSelect',
{
label: '开始时间',
field: 'beginTime',
isTable: true,
formatter: dateFormatter3,
detail: {
dateFormat: 'HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'TimePicker',
componentProps: {
style: { width: '100%' },
type: 'time',
dateFormat: 'HH:mm:ss',
valueFormat: 'x'
}
},
isSearch: false,
search: {
show: false,
component: 'TimePicker',
componentProps: {
valueFormat: 'HH:mm:ss',
type: 'timeSelect'
}
}
}
},
{
label: '结束时间',
field: 'entTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'HH:mm:ss',
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'TimePicker',
componentProps: {
style: {width:'100%'},
type: 'time',
dateFormat: 'HH:mm:ss',
valueFormat: 'x',
{
label: '结束时间',
field: 'entTime',
isTable: true,
formatter: dateFormatter3,
detail: {
dateFormat: 'HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'TimePicker',
componentProps: {
style: { width: '100%' },
type: 'time',
dateFormat: 'HH:mm:ss',
valueFormat: 'x'
}
},
isSearch: false,
search: {
show: false,
component: 'TimePicker',
componentProps: {
valueFormat: 'HH:mm:ss',
type: 'timeSelect'
}
}
},
isSearch: false,
search: {
show: false,
component: 'TimePicker',
componentProps: {
valueFormat: 'HH:mm:ss',
type: 'timeSelect',
{
label: '是否跨天',
field: 'endAtNextDay',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
}
},
{
label: '是否跨天',
field: 'endAtNextDay',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
{
label: '生效时间',
field: 'activeTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
},
{
label: '生效时间',
field: 'activeTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '失效时间',
field: 'expireTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
},
{
label: '失效时间',
field: 'expireTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
}
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
formatter: dateFormatter,
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
}
}
]))
])
)
//表单校验
export const ShiftRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
beginTime: [
{ required: true, message: '请输入开始时间', trigger: 'blur' }
],
entTime: [
{ required: true, message: '请输入结束时间', trigger: 'blur' }
],
endAtNextDay: [
{ required: true, message: '请选择是否跨天', trigger: 'change' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
{ validator: validateYS, message: '请输入正确的代码', trigger: 'blur' }
],
name: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
beginTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }],
entTime: [{ required: true, message: '请输入结束时间', trigger: 'blur' }],
endAtNextDay: [{ required: true, message: '请选择是否跨天', trigger: 'change' }],
available: [{ required: true, message: '请选择是否可用', trigger: 'change' }]
})

48
src/views/wms/countManage/count/countJobMain/countJobMain.data.ts

@ -83,22 +83,38 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
// {
// label: '仓库代码',
// field: 'warehouseCode',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '库位代码',
// field: 'locationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库区代码',
field: 'areaCode',
sort: 'custom',
table: {
width: 150
},
},{
label: '库位组代码',
field: 'locationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '申请时间',
field: 'requestTime',

1
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -55,6 +55,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isDetail:false,
isTable:false,
form:{
componentProps:{

114
src/views/wms/countManage/count/countPlanMain/index.vue

@ -111,38 +111,36 @@ import {
CountPlanDetail,
CountPlanDetailRules,
CountPlanMain,
CountPlanMainRules,
CountPlanMainRules
} from './countPlanMain.data'
import * as CountPlanMainApi from '@/api/wms/countPlanMain'
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail'
import {Owner} from '@/views/wms/basicDataManage/orderManage/owner/owner.data'
import { Owner } from '@/views/wms/basicDataManage/orderManage/owner/owner.data'
import * as OwnerApi from '@/api/wms/owner'
import {Supplier} from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as SupplierApi from '@/api/wms/supplier'
import {Customer} from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import * as CustomerApi from '@/api/wms/customer'
import {Itembasic} from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import {Warehouse} from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import * as WarehouseApi from '@/api/wms/warehouse'
import {Area} from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
import * as AreaApi from '@/api/wms/areabasic'
import {
Locationgroup
} from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
import { Locationgroup } from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
import * as LocationgroupApi from '@/api/wms/locationgroup'
import {Location} from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as LocationApi from '@/api/wms/location'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import {DICT_TYPE, getStrDictOptions} from '@/utils/dict'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import BasicFormWmsCount from '@/components/BasicForm/src/BasicFormWmsCount.vue'
//
@ -412,11 +410,28 @@ const openForm = async (type: string, row?: any) => {
] //
row = row ? row : {}
// row.dimension = 'BY_INEVNEOTY'
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = true
// CountPlanMain.allSchemas.formSchema.forEach((item) => {
// if (item.field == 'crontab') {
// item.componentProps.disabled = true
// }
// })
if (row.type == 'CYCLE') {
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = false
item.label = '执行周期'
}
})
CountPlanMainRules.crontab[0].required = true
} else {
CountPlanMainRules.crontab[0].required = false
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = true
item.label = ''
}
})
}
})
formRef.value.open(type, row)
// Promise.all([getOwnerAllList(),
@ -572,7 +587,7 @@ const detailOpenForm = (type, row) => {
})
break
}
} else if ( row.type == 'PROJECT') {
} else if (row.type == 'PROJECT') {
formTypeDetail.value = 'InputString'
}
}
@ -635,7 +650,7 @@ const handleAddTable = () => {
//
const handleDeleteTable = (item, index) => {
let itemIndex = tableData.value.indexOf(item)
if(itemIndex>-1){
if (itemIndex > -1) {
tableData.value.splice(itemIndex, 1)
}
}
@ -644,6 +659,15 @@ const tableSelectionDelete = (selection) => {
}
//
const submitForm = async (formType, data) => {
var isHave = CountPlanMain.allSchemas.formSchema.some(function (item) {
return item.field === 'beginTime' || item.field === 'endTime'
})
if (isHave) {
if (data.beginTime && data.endTime && data.beginTime >= data.endTime) {
message.error('开始时间大于结束时间')
return
}
}
data.subList = tableData.value.map((item) => {
return {
type: item.type,
@ -721,22 +745,34 @@ const selectChange = (field, val) => {
}
})
}
  formRef.value.formRef.setValues({
       crontab:''
    })
if (val == 'DYNAMIC') {
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)'
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0
CountPlanMain.allSchemas.formSchema[3].componentProps.max = 100
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false
} else if (val == 'LOW' || val == 'RANDOM') {
CountPlanMain.allSchemas.formSchema[3].label = '限值'
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0
CountPlanMain.allSchemas.formSchema[3].componentProps.max = Infinity
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false
} else {
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = true
}
formRef.value.formRef.setValues({
crontab: ''
})
// if (val == 'DYNAMIC') {
// CountPlanMain.allSchemas.formSchema.forEach(item=>{
// if(item.field == 'limitedValue'){
// item.label = '%'
// item.componentProps.min = 0
// item.componentProps.max = 100
// item.componentProps.disabled = false
// }
// })
// } else if (val == 'LOW' || val == 'RANDOM') {
// CountPlanMain.allSchemas.formSchema.forEach(item=>{
// if(item.field == 'limitedValue'){
// item.label = '%'
// item.componentProps.min = 0
// item.componentProps.max =Infinity
// item.componentProps.disabled = false
// }
// })
// } else {
// CountPlanMain.allSchemas.formSchema.forEach(item=>{
// if(item.field == 'limitedValue'){
// item.componentProps.disabled = true
// }
// })
// }
}
}
const formTypeDetail = ref('InputString') //
@ -823,7 +859,7 @@ const selectChangeDetail = (field, val) => {
case 'ITEMS_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '物品信息'
item.componentProps.searchAllSchemas = Itembasic.allSchemas
item.componentProps.searchPage = ItembasicApi.getItembasicPage
@ -833,7 +869,7 @@ const selectChangeDetail = (field, val) => {
case 'WAREHOUSE_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '仓库信息'
item.componentProps.searchAllSchemas = Warehouse.allSchemas
item.componentProps.searchPage = WarehouseApi.getWarehousePage
@ -843,7 +879,7 @@ const selectChangeDetail = (field, val) => {
case 'AREABASIC_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库区信息'
item.componentProps.searchAllSchemas = Area.allSchemas
item.componentProps.searchPage = AreaApi.getAreaPage
@ -853,7 +889,7 @@ const selectChangeDetail = (field, val) => {
case 'LOCATIONGROUP_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库位组信息'
item.componentProps.searchAllSchemas = Locationgroup.allSchemas
item.componentProps.searchPage = LocationgroupApi.getLocationgroupPage
@ -863,7 +899,7 @@ const selectChangeDetail = (field, val) => {
case 'LOCATION_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库位组信息'
item.componentProps.searchAllSchemas = Location.allSchemas
item.componentProps.searchPage = LocationApi.getLocationPage

24
src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts

@ -482,6 +482,30 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select'
}
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库区代码',
field: 'areaCode',
sort: 'custom',
table: {
width: 150
},
},{
label: '库位组代码',
field: 'locationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',

106
src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts

@ -51,22 +51,22 @@ export const CountadjustRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable:true,
isForm: true
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '出库事务类型',
// field: 'outTransactionType',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '入库事务类型',
// field: 'inTransactionType',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '申请时间',
field: 'requestTime',
@ -164,17 +164,17 @@ export const CountadjustRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '接口类型',
// field: 'interfaceType',
// dictType: DICT_TYPE.INTERFACE_TYPE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '备注',
field: 'remark',
@ -267,9 +267,9 @@ export const CountadjustRecordMainRules =reactive({
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
interfaceType: [
{ required: true, message: '请选择接口类型', trigger: 'change' }
],
// interfaceType: [
// { required: true, message: '请选择接口类型', trigger: 'change' }
// ],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
@ -360,6 +360,30 @@ export const CountadjustRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库区代码',
field: 'areaCode',
sort: 'custom',
table: {
width: 150
},
},{
label: '库位组代码',
field: 'locationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
@ -455,17 +479,17 @@ export const CountadjustRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150
// },
// },
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '接口类型',
// field: 'interfaceType',
// dictType: DICT_TYPE.INTERFACE_TYPE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '备注',
field: 'remark',

24
src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts

@ -518,6 +518,30 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
precision: 6
}
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库区代码',
field: 'areaCode',
sort: 'custom',
table: {
width: 150
},
},{
label: '库位组代码',
field: 'locationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',

16
src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
:isOpenSearchTable="true"
fieldTableColumn="containerNumber"
@success="getList"
:rules="ContainerMainRequestRules"
:formAllSchemas="ContainerMainRequest.allSchemas"
@ -131,11 +133,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => {
if (type == 'tableForm') {
if(formField == 'containerNumber') {
row['containerNumber'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['fromLocationCode'] = val[0]['locationCode']
row['fromInventoryStatus'] = val[0]['inventoryStatus']
row['toInventoryStatus'] = 'SCRAP'
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['containerNumber'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['fromLocationCode'] = item['locationCode']
newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['toInventoryStatus'] = 'SCRAP'
tableData.value.push(newRow)
})
}else if(formField == 'toLocationCode'){
row['toLocationCode'] = val[0]['code']
}else {

1
src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts

@ -357,6 +357,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'containerNumber',
sort: 'custom',
tableForm: {
multiple: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择器具号',
searchField: 'itemCode',

35
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="packingNumber"
@success="getList"
:rules="ScrapRequestMainRules"
:formAllSchemas="ScrapRequestMain.allSchemas"
@ -104,6 +106,7 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...ScrapRequestMain.allSchemas.tableColumns,...ScrapRequestDetail.allSchemas.tableMainColumns])
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -114,16 +117,32 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['packingNumber'] = val[0]['packingNumber']
row['batch'] = val[0]['batch']
row['fromLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
// val.forEach(item=>{
// const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
// newRow[formField] = item[searchField]
// newRow['packingNumber'] = item['packingNumber']
// newRow['batch'] = item['batch']
// newRow['fromLocationCode'] = item['locationCode']
// newRow['itemCode'] = item['itemCode']
// newRow['uom'] = item['uom']
// tableData.value.push(newRow)
// })
//
let param = {'itemCode':val[0]['itemCode'] as string}
let param = {'itemCodes':val.map(item=>item.itemCode).join(',') as string}
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => {
row['singlePrice'] = res.price
val.forEach(item=>{
const itemCode = res.find(item1=>item1['itemCode']==item['itemCode'])
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['packingNumber'] = item['packingNumber']
newRow['batch'] = item['batch']
newRow['fromLocationCode'] = item['locationCode']
newRow['itemCode'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['singlePrice'] = itemCode?itemCode['price']:''
tableData.value.push(newRow)
})
// row['singlePrice'] = res.price
})
} else {
const setV = {}

4
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -396,6 +396,9 @@ export const ScrapRequestMainRules = reactive({
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
fromWarehouseCode:[
{required: true,message: '请选择从仓库代码',trigger: 'change' }
]
})
/**
@ -480,6 +483,7 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',

8
src/views/wms/issueManage/issue/issueRequestMain/index.vue

@ -61,6 +61,7 @@
@submitForm="submitForm"
@onEnter="onEnter"
@onChange="onChange"
@clearSearchInput="onChange"
/>
<!-- 详情 -->
@ -117,8 +118,15 @@ const onChange = async (field,value) => {
setV['productionLineCode'] = ''
setV['workStationCode'] = ''
formRef.value.formRef.setValues(setV)
}else if(field== 'productionLineCode'){
//线
const setV = {}
setV['workStationCode'] = ''
formRef.value.formRef.setValues(setV)
}
}
const onEnter = async (field,value) => {
if (field == 'productionLineCode') {
//线

10
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStation"
@success="getList"
:rules="PreparetoissueMainRules"
:formAllSchemas="PreparetoissueMain.allSchemas"
@ -113,8 +115,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['itemCode'] = val[0]['componentItemCode']
row['uom'] = val[0]['componentUom']
} else {
row[formField] = val[0][searchField]
row['toLocationCode'] = val[0]['rawLocationCode']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['toLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
}
} else {
const setV = {}

1
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts

@ -503,6 +503,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm: {
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

10
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList"
:rules="ProductionreturnRequestMainRules"
:formAllSchemas="ProductionreturnRequestMain.allSchemas"
@ -193,8 +195,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
})
}
} else if(formField == 'workStationCode') {
row['workStationCode'] = val[0]['code']
row['fromLocationCode'] = val[0]['rawLocationCode']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['workStationCode'] = item['code']
newRow['fromLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
} else if(formField == 'packUnit') {
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']

1
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

@ -105,6 +105,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

8
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="productionLineCode"
@success="getList"
:rules="ProductdismantleRequestMainRules"
:formAllSchemas="ProductdismantleRequestMain.allSchemas"
@ -269,7 +271,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['bomVersion'] = ''
row['childList'] = []
} else {
row[formField] = val[0][searchField]
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
tableData.value.push(newRow)
})
}
} else {
const setV = {}

1
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

@ -474,6 +474,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
width: 150
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

19
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
//
@ -119,10 +120,26 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// })
if(formField=='itemCode'){
// row[formField] = val[0][searchField]
val.forEach(item=>{
val.forEach(async item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['id'] = item['id']
// BOM
console.log(22,item)
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

18
src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductionMainAssemble' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
val.forEach(item=>{
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
// BOM
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

18
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductionMainASparePart' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
val.forEach(item=>{
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
// BOM
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

18
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductionMainPredictSparePart' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
val.forEach(item=>{
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
// BOM
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

16
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -149,6 +149,7 @@ import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth'
import dayjs from 'dayjs'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
//
//
defineOptions({ name: 'ProductreceiptRequestMain' })
@ -212,6 +213,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField]
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{

16
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -149,6 +149,7 @@ import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductreceiptRequestMainA' })
@ -213,6 +214,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField]
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{

18
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -136,6 +136,7 @@ import * as ItembasicApi from '@/api/wms/itembasic'
import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth'
import * as BomApi from "@/api/wms/bom";
import {
SupplierdeliverRequestPackage
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts'
@ -204,8 +205,21 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['uom'] = res[0]['uom']
}
row[formField] = val[0][searchField]
console.log('获取计量单位',res)
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else{
//
val.forEach(item=>{

12
src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList"
:rules="ProductrepairRequestMainRules"
:formAllSchemas="ProductrepairRequestMain.allSchemas"
@ -247,8 +249,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code']
} else if(formField == 'workStationCode'){
row['fromLocationCode'] = val[0]['rawLocationCode']
row['workStationCode'] = val[0]['code']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['fromLocationCode'] = item['rawLocationCode']
newRow['workStationCode'] =item['code']
tableData.value.push(newRow)
})
} else if(formField == 'formField'){
row['workStationCode'] = val[0]['code']
} else if(formField == 'bomVersion'){

2
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -553,6 +553,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
},
sortTableDefault:5,
tableForm:{
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -917,6 +918,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
},
sortTableDefault:17,
tableForm: {
disabled: true,
type: 'Select'
}
},

33
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -42,8 +42,6 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList"
:rules="ProductscrapRequestMainRules"
:formAllSchemas="ProductscrapRequestMain.allSchemas"
@ -85,7 +83,6 @@
<!-- BOM弹窗列表 -->
<BasicForm
ref="detailBomRef"
@success="getList"
:tableAllSchemas="ProdcutscrapBomScrap.allSchemas"
:tableFormRules="ProdcutscrapBomScrapRules"
@ -121,7 +118,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from "@/api/wms/bomDismantle"
import * as BomApi from "@/api/wms/bom";
//
//
defineOptions({ name: 'ProductscrapRequestMain' })
const message = useMessage() //
@ -303,13 +300,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code']
}else if(formField == 'workStationCode'){
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['workStationCode'] = item['code']
newRow['fromLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
row['workStationCode'] = val[0]['code']
row['fromLocationCode'] = val[0]['rawLocationCode']
}else if(formField == 'processCode'){
row['processCode'] = val[0]['code']
}else if(formField == 'itemCode'){
@ -325,22 +317,19 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['singlePrice'] = res.price
})
// BOM
console.log(formRef.formModel)
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
// row['singlePrice'] = res.price
})
}else if(formField == 'bomVersion'){
row['bomVersion'] = val[0]['version']

21
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -232,8 +232,9 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
if (formField == 'purchaseReceiptRecordNumber') {
row[formField] = val[0][searchField]
//--
row['supplierCode'] = val[0]['supplierCode']
row['poNumber'] = val[0]['poNumber']
@ -271,6 +272,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['amount'] = val[0]['amount']
row['projectCode'] = val[0]['projectCode']
} else if (formField == 'itemCode') {
row[formField] = val[0][searchField]
row['batch'] = val[0]['toBatch']
row['containerNumber'] = val[0]['toContainerNumber']
row['containerNumber'] = val[0]['containerNumber']
@ -278,6 +280,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
// row['fromLocationCode'] = val[0]['fromLocationCode']
row['toLocationCode'] = val[0]['toLocationCode']
} else if (formField == 'fromLocationCode') {
row[formField] = val[0][searchField]
// let params = {
// itemCode: row.itemCode,
// batch: row.batch,
@ -287,7 +290,21 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
// console.log('23423423',aa);
// row['inventoryBalance'] = aa//
} else if (formField == 'packingNumber') {
row['inventoryBalance'] = val[0]['qty'] //
// row[formField] = val[0][searchField]
val.forEach((item,index)=>{
if(index==0){
row[formField] = item[searchField]
row['inventoryBalance'] = item['qty'] //
}else{
let newRow = {...row}
newRow[formField] = item[searchField]
row['inventoryBalance'] = item['qty'] //
tableData.value.push(newRow)
}
})
// row['inventoryBalance'] = val[0]['qty'] //
}else{
row[formField] = val[0][searchField]
}
} else {
const setV = {}

1
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -982,6 +982,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
},
tableForm:{
multiple: true,
// labelMessage: '信息提示说明!!!',
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码、批次、从库位代码',

Loading…
Cancel
Save