Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo
| | |
| | | isAdd: false, |
| | | }) |
| | | |
| | | const dialogConfigForQuery = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | isAdd: false, |
| | | }) |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | |
| | | dialogConfig.title = row.name |
| | | dialogConfig.isAdd = false |
| | | sort.value = row.sort |
| | | } |
| | | |
| | | //ç¹å»æé®ãé«çº§æ¥è¯¢ã |
| | | const onAdvancedQuery = () => { |
| | | const params = tableRef.value?.getPaginationParams() |
| | | current.value = null |
| | | dialogConfigForQuery.visible = true |
| | | dialogConfigForQuery.isAdd = true |
| | | dialogConfigForQuery.title = 'é«çº§æ¥è¯¢' |
| | | } |
| | | |
| | | const contextMenu = [ |
| | |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | const onExport = () => { |
| | | const params = tableRef.value?.getParams() |
| | | exportFile( |
| | | '/api/v1/HIAWms/wmsMaterialStock/export', |
| | | params, |
| | | 'wmsMaterialStock' |
| | | ) |
| | | const onExport = (data = {}) => { |
| | | // const params = tableRef.value?.getParams() |
| | | // exportFile( |
| | | // '/api/v1/HIAWms/wmsMaterialStock/export', |
| | | // params, |
| | | // 'wmsMaterialStock' |
| | | |
| | | exportFile('/api/v1/HIAWms/wmsMaterialStock/export', data, 'HIAWms') |
| | | // ) |
| | | } |
| | | |
| | | /** |
| | |
| | | sort, |
| | | wmsMaterialStockColumns, |
| | | paginationParams, |
| | | dialogConfigForQuery, |
| | | headers, |
| | | onBeforeUpload, |
| | | onError, |
| | |
| | | onConfirmWmsMaterialStock, |
| | | onCheck, |
| | | onAddWmsMaterialStock, |
| | | onAdvancedQuery, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { |
| | | ref, |
| | | onMounted, |
| | | reactive, |
| | | computed, |
| | | Ref, |
| | | watch, |
| | | SetupContext, |
| | | h, |
| | | } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsMaterialStockDrawer } from '../Models/WmsMaterialStockDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | |
| | | export const useWmsMaterialStockDetalQueryDrawer = (props: any, ctx?: any) => { |
| | | const wmsMaterialStockDetailDrawer = injectModel<WmsMaterialStockDrawer>( |
| | | 'WmsMaterialStockDrawer' |
| | | ) |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | const initiateData: Ref<Record<string, any>> = ref({}) |
| | | const formData = ref<Record<string, any>>({}) |
| | | // ref |
| | | const formRef = ref() |
| | | |
| | | const disabled = ref(false) |
| | | |
| | | const current = computed(() => { |
| | | return props.row || null |
| | | }) |
| | | |
| | | const inputNumber = (attrs) => { |
| | | return ( |
| | | <el-input-number |
| | | min="1" |
| | | step="1" |
| | | precision="0" |
| | | {...attrs} |
| | | ></el-input-number> |
| | | ) |
| | | } |
| | | |
| | | const datePickerRange = (attrs) => { |
| | | return ( |
| | | <el-date-picker |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | {...attrs} |
| | | ></el-date-picker> |
| | | ) |
| | | } |
| | | |
| | | const dateTimePickerRange = (attrs) => { |
| | | return ( |
| | | <el-date-picker |
| | | type="datetimerange" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | {...attrs} |
| | | ></el-date-picker> |
| | | ) |
| | | } |
| | | |
| | | const visible = computed({ |
| | | get() { |
| | | return props.modelValue |
| | | }, |
| | | set(val) { |
| | | ctx.emit('update:modelValue', val) |
| | | }, |
| | | }) |
| | | /** |
| | | * é«çº§æ¥è¯¢çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | // { |
| | | // label: 'ç©æID', |
| | | // prop: 'materialId', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥ç©æID', |
| | | // }, |
| | | { |
| | | label: 'ç©æåç§°', |
| | | prop: 'materialName', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æåç§°', |
| | | }, |
| | | // { |
| | | // label: '容å¨ç¼å·', |
| | | // prop: 'containerNo', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥å®¹å¨ç¼å·', |
| | | // }, |
| | | // { |
| | | // label: '容å¨ç¶æ', |
| | | // prop: 'containerStatus', |
| | | // el: 'select', |
| | | // clearable: true, |
| | | // option: [], |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥å®¹å¨ç¶æ', |
| | | // }, |
| | | // { |
| | | // label: '容å¨ç±»å', |
| | | // prop: 'containerType', |
| | | // el: 'select', |
| | | // clearable: true, |
| | | // option: [], |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥å®¹å¨ç±»å', |
| | | // }, |
| | | { |
| | | label: 'ç©æç¼å·', |
| | | prop: 'materialNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æç¼å·', |
| | | }, |
| | | { |
| | | label: 'åºåæ°é', |
| | | prop: 'stockNumber', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 1, |
| | | precision: 0, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åºåæ°é', |
| | | }, |
| | | { |
| | | label: 'ç©ææ¹æ¬¡', |
| | | prop: 'materialBatch', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©ææ¹æ¬¡', |
| | | }, |
| | | // { |
| | | // label: 'ä¾åºåç¼å·', |
| | | // prop: 'supplierCode', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥ä¾åºåç¼å·', |
| | | // }, |
| | | { |
| | | label: 'åå·', |
| | | prop: 'materialModel', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åå·', |
| | | }, |
| | | { |
| | | label: 'åºä½ç¼å·', |
| | | prop: 'placeNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åºä½ç¼å·', |
| | | }, |
| | | { |
| | | label: 'åºä½ç¶æ;', |
| | | prop: 'placeStatus', |
| | | el: 'select', |
| | | clearable: true, |
| | | option: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åºä½ç¶æ;', |
| | | }, |
| | | { |
| | | label: 'åºä½ç±»å', |
| | | prop: 'storageTypeNo', |
| | | el: 'select', |
| | | clearable: false, |
| | | option: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åºä½ç±»å', |
| | | }, |
| | | { |
| | | label: 'åºåç¼å·', |
| | | prop: 'areaCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åºåç¼å·', |
| | | }, |
| | | // { |
| | | // label: 'åºåºåç§°', |
| | | // prop: 'areaName', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥åºåºåç§°', |
| | | // }, |
| | | // { |
| | | // label: 'æ£éªç¶æ(1:æªæ£éª,2:æ£éªéè¿,3:æ£éªä¸éè¿)', |
| | | // prop: 'checkStatus', |
| | | // el: 'select', |
| | | // clearable: true, |
| | | // option: [], |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥æ£éªç¶æ(1:æªæ£éª,2:æ£éªéè¿,3:æ£éªä¸éè¿)', |
| | | // }, |
| | | { |
| | | label: 'æ¯å¦éå®', |
| | | prop: 'isLock', |
| | | el: 'select', |
| | | clearable: true, |
| | | option: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ¯å¦éå®', |
| | | }, |
| | | // { |
| | | // label: 'æ¯å¦ç©ºæ(2:å¦,1:æ¯)', |
| | | // prop: 'emptyContainer', |
| | | // el: 'select', |
| | | // clearable: true, |
| | | // option: [], |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥æ¯å¦ç©ºæ(2:å¦,1:æ¯)', |
| | | // }, |
| | | { |
| | | label: 'å
¥åºæ¶é´', |
| | | prop: 'inStockTime', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(dateTimePickerRange, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å
¥åºæ¶é´', |
| | | }, |
| | | // { |
| | | // label: 'åä½å段1 - é¢çæ©å±ç¨é', |
| | | // prop: 'redundantField1', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥åä½å段1 - é¢çæ©å±ç¨é', |
| | | // }, |
| | | // { |
| | | // label: 'åä½å段2 - é¢çæ©å±ç¨é', |
| | | // prop: 'redundantField2', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥åä½å段2 - é¢çæ©å±ç¨é', |
| | | // }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | | prop: 'creationTime', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(dateTimePickerRange, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥', |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | const commonGetFormData = () => { |
| | | const data = { |
| | | materialId: formData.value.materialId || '', |
| | | materialName: formData.value.materialName || '', |
| | | containerNo: formData.value.containerNo || '', |
| | | containerStatus: formData.value.containerStatus || '', |
| | | containerType: formData.value.containerType || '', |
| | | materialNo: formData.value.materialNo || '', |
| | | stockNumber: formData.value.stockNumber || '', |
| | | materialBatch: formData.value.materialBatch || '', |
| | | supplierCode: formData.value.supplierCode || '', |
| | | materialModel: formData.value.materialModel || '', |
| | | placeNo: formData.value.placeNo || '', |
| | | placeStatus: formData.value.placeStatus || '', |
| | | storageTypeNo: formData.value.storageTypeNo || 1, |
| | | areaCode: formData.value.areaCode || '', |
| | | areaName: formData.value.areaName || '', |
| | | checkStatus: formData.value.checkStatus || '', |
| | | isLock: formData.value.isLock || '', |
| | | emptyContainer: formData.value.emptyContainer || '', |
| | | inStockTime: formData.value.inStockTime || '', |
| | | remark: formData.value.remark || '', |
| | | redundantField1: formData.value.redundantField1 || '', |
| | | redundantField2: formData.value.redundantField2 || '', |
| | | redundantField3: formData.value.redundantField3 || '', |
| | | creationTime: formData.value.creationTime || '', |
| | | lastModificationTime: formData.value.lastModificationTime || '', |
| | | } |
| | | return data |
| | | } |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | visible.value = false |
| | | const data = commonGetFormData() |
| | | ctx.emit('close', data) |
| | | } |
| | | } |
| | | /** |
| | | * 确认æ¥è¯¢ |
| | | */ |
| | | const onConfirmQuery = async () => { |
| | | const data = commonGetFormData() |
| | | ctx.emit('confirmQuery', data) |
| | | } |
| | | /** |
| | | * éç½®æ¥è¯¢ |
| | | */ |
| | | const onReset = async () => { |
| | | formData.value = {} |
| | | formData.value.materialId = '' |
| | | formData.value.materialName = '' |
| | | formData.value.containerNo = '' |
| | | formData.value.containerStatus = '' |
| | | formData.value.containerType = '' |
| | | formData.value.materialNo = '' |
| | | formData.value.stockNumber = '' |
| | | formData.value.materialBatch = '' |
| | | formData.value.supplierCode = '' |
| | | formData.value.materialModel = '' |
| | | formData.value.placeNo = '' |
| | | formData.value.placeStatus = '' |
| | | formData.value.storageTypeNo = 1 |
| | | formData.value.areaCode = '' |
| | | formData.value.areaName = '' |
| | | formData.value.checkStatus = '' |
| | | formData.value.isLock = '' |
| | | formData.value.emptyContainer = '' |
| | | formData.value.inStockTime = '' |
| | | formData.value.remark = '' |
| | | formData.value.redundantField1 = '' |
| | | formData.value.redundantField2 = '' |
| | | formData.value.redundantField3 = '' |
| | | formData.value.deletionTime = '' |
| | | //åç¶ç»ä»¶åéèªå®ä¹äºä»¶ |
| | | ctx.emit('restQuery') |
| | | } |
| | | |
| | | const updateCheckData = () => { |
| | | initiateData.value = { |
| | | formData: { |
| | | ...formData.value, |
| | | }, |
| | | } |
| | | } |
| | | const updateFormItemOptions = (propName: string, enumData: any[]) => { |
| | | const item = formItems.find((item) => item.prop === propName) |
| | | if (item && enumData) { |
| | | item.options = enumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | } |
| | | } |
| | | /** |
| | | * éç¨æ¥è¯¢æä¸¾ |
| | | */ |
| | | const commonQueryEnumForFrom = async () => { |
| | | const containerStatusEnumEnum = |
| | | await wmsMaterialStockDetailDrawer.getWmsEnumData({ |
| | | EnumName: 'ContainerStatusEnum', |
| | | }) |
| | | updateFormItemOptions('containerStatus', containerStatusEnumEnum) |
| | | const containerTypeEnumEnum = |
| | | await wmsMaterialStockDetailDrawer.getWmsEnumData({ |
| | | EnumName: 'ContainerTypeEnum', |
| | | }) |
| | | updateFormItemOptions('containerType', containerTypeEnumEnum) |
| | | const placeStatusEnumEnum = |
| | | await wmsMaterialStockDetailDrawer.getWmsEnumData({ |
| | | EnumName: 'PlaceStatusEnum', |
| | | }) |
| | | updateFormItemOptions('placeStatus', placeStatusEnumEnum) |
| | | const placeTypeEnumEnum = await wmsMaterialStockDetailDrawer.getWmsEnumData( |
| | | { |
| | | EnumName: 'PlaceTypeEnum', |
| | | } |
| | | ) |
| | | updateFormItemOptions('storageTypeNo', placeTypeEnumEnum) |
| | | const materialCheckStatusEnumEnum = |
| | | await wmsMaterialStockDetailDrawer.getWmsEnumData({ |
| | | EnumName: 'MaterialCheckStatusEnum', |
| | | }) |
| | | updateFormItemOptions('checkStatus', materialCheckStatusEnumEnum) |
| | | const yesNoEnumEnum = await wmsMaterialStockDetailDrawer.getWmsEnumData({ |
| | | EnumName: 'YesNoEnum', |
| | | }) |
| | | updateFormItemOptions('isLock', yesNoEnumEnum) |
| | | const yesNoEnumEnum2 = await wmsMaterialStockDetailDrawer.getWmsEnumData({ |
| | | EnumName: 'YesNoEnum', |
| | | }) |
| | | updateFormItemOptions('emptyContainer', yesNoEnumEnum2) |
| | | } |
| | | commonQueryEnumForFrom() |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | disabled.value = false |
| | | updateCheckData() |
| | | } |
| | | |
| | | watch(() => current.value, onOpen) |
| | | |
| | | return { |
| | | formItems, |
| | | formData, |
| | | visible, |
| | | formRef, |
| | | onOpen, |
| | | onClose, |
| | | onConfirmQuery, |
| | | onReset, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { |
| | | ref, |
| | | onMounted, |
| | | reactive, |
| | | computed, |
| | | Ref, |
| | | watch, |
| | | SetupContext, |
| | | h, |
| | | } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsMaterialStockDrawer } from '../Models/WmsMaterialStockDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | |
| | | export const useWmsMaterialStockQueryDrawer = (props: any, ctx?: any) => { |
| | | const wmsMaterialStockDrawer = injectModel<WmsMaterialStockDrawer>( |
| | | 'WmsMaterialStockDrawer' |
| | | ) |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | const initiateData: Ref<Record<string, any>> = ref({}) |
| | | const formData = ref<Record<string, any>>({}) |
| | | // ref |
| | | const formRef = ref() |
| | | |
| | | const disabled = ref(false) |
| | | |
| | | const current = computed(() => { |
| | | return props.row || null |
| | | }) |
| | | |
| | | const inputNumber = (attrs) => { |
| | | return ( |
| | | <el-input-number |
| | | min="1" |
| | | step="1" |
| | | precision="0" |
| | | {...attrs} |
| | | ></el-input-number> |
| | | ) |
| | | } |
| | | |
| | | const datePickerRange = (attrs) => { |
| | | return ( |
| | | <el-date-picker |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | {...attrs} |
| | | ></el-date-picker> |
| | | ) |
| | | } |
| | | |
| | | const dateTimePickerRange = (attrs) => { |
| | | return ( |
| | | <el-date-picker |
| | | type="datetimerange" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | {...attrs} |
| | | ></el-date-picker> |
| | | ) |
| | | } |
| | | |
| | | const visible = computed({ |
| | | get() { |
| | | return props.modelValue |
| | | }, |
| | | set(val) { |
| | | ctx.emit('update:modelValue', val) |
| | | }, |
| | | }) |
| | | /** |
| | | * é«çº§æ¥è¯¢çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | { |
| | | label: 'ç©æåç§°', |
| | | prop: 'materialName', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æåç§°', |
| | | }, |
| | | // { |
| | | // label: '容å¨ç¼å·', |
| | | // prop: 'containerNo', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥å®¹å¨ç¼å·', |
| | | // }, |
| | | // { |
| | | // label: '容å¨ç¶æ', |
| | | // prop: 'containerStatus', |
| | | // el: 'select', |
| | | // clearable: true, |
| | | // option: [], |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥å®¹å¨ç¶æ', |
| | | // }, |
| | | // { |
| | | // label: '容å¨ç±»å', |
| | | // prop: 'containerType', |
| | | // el: 'select', |
| | | // clearable: true, |
| | | // option: [], |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥å®¹å¨ç±»å', |
| | | // }, |
| | | { |
| | | label: 'ç©æç¼å·', |
| | | prop: 'materialNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æç¼å·', |
| | | }, |
| | | // { |
| | | // label: 'åºåæ°é', |
| | | // prop: 'stockNumber', |
| | | // el: (props: any, { attrs }: SetupContext) => { |
| | | // return h(inputNumber, { |
| | | // ...props, |
| | | // clearable: true, |
| | | // ...attrs, |
| | | // }) |
| | | // }, |
| | | // width: '100%', |
| | | // step: 1, |
| | | // precision: 0, |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥åºåæ°é', |
| | | // }, |
| | | { |
| | | label: 'ç©ææ¹æ¬¡', |
| | | prop: 'materialBatch', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©ææ¹æ¬¡', |
| | | }, |
| | | // { |
| | | // label: 'ä¾åºåç¼å·', |
| | | // prop: 'supplierCode', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥ä¾åºåç¼å·', |
| | | // }, |
| | | { |
| | | label: 'åå·', |
| | | prop: 'materialModel', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åå·', |
| | | }, |
| | | { |
| | | label: 'åºä½ç¼å·', |
| | | prop: 'placeNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åºä½ç¼å·', |
| | | }, |
| | | { |
| | | label: 'åºä½ç¶æ;', |
| | | prop: 'placeStatus', |
| | | el: 'select', |
| | | clearable: true, |
| | | option: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åºä½ç¶æ;', |
| | | }, |
| | | { |
| | | label: 'åºä½ç±»å', |
| | | prop: 'storageTypeNo', |
| | | el: 'select', |
| | | clearable: true, |
| | | option: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åºä½ç±»å', |
| | | }, |
| | | { |
| | | label: 'åºåç¼å·', |
| | | prop: 'areaCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åºåç¼å·', |
| | | }, |
| | | // { |
| | | // label: 'åºåºåç§°', |
| | | // prop: 'areaName', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥åºåºåç§°', |
| | | // }, |
| | | // { |
| | | // label: 'æ£éªç¶æ(1:æªæ£éª,2:æ£éªéè¿,3:æ£éªä¸éè¿)', |
| | | // prop: 'checkStatus', |
| | | // el: 'select', |
| | | // clearable: true, |
| | | // option: [], |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥æ£éªç¶æ(1:æªæ£éª,2:æ£éªéè¿,3:æ£éªä¸éè¿)', |
| | | // }, |
| | | { |
| | | label: 'æ¯å¦éå®', |
| | | prop: 'isLock', |
| | | el: 'select', |
| | | clearable: true, |
| | | option: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ¯å¦éå®', |
| | | }, |
| | | // { |
| | | // label: 'æ¯å¦ç©ºæ(2:å¦,1:æ¯)', |
| | | // prop: 'emptyContainer', |
| | | // el: 'select', |
| | | // clearable: true, |
| | | // option: [], |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥æ¯å¦ç©ºæ(2:å¦,1:æ¯)', |
| | | // }, |
| | | { |
| | | label: 'å
¥åºæ¶é´', |
| | | prop: 'inStockTime', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(dateTimePickerRange, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å
¥åºæ¶é´', |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | // { |
| | | // label: 'åä½å段1 - é¢çæ©å±ç¨é', |
| | | // prop: 'redundantField1', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥åä½å段1 - é¢çæ©å±ç¨é', |
| | | // }, |
| | | // { |
| | | // label: 'åä½å段2 - é¢çæ©å±ç¨é', |
| | | // prop: 'redundantField2', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥åä½å段2 - é¢çæ©å±ç¨é', |
| | | // }, |
| | | // { |
| | | // label: 'åä½å段3 - é¢çæ©å±ç¨é', |
| | | // prop: 'redundantField3', |
| | | // el: 'input', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥åä½å段3 - é¢çæ©å±ç¨é', |
| | | // }, |
| | | // { |
| | | // label: 'å建æ¶é´', |
| | | // prop: 'creationTime', |
| | | // el: (props: any, { attrs }: SetupContext) => { |
| | | // return h(dateTimePickerRange, { |
| | | // ...props, |
| | | // clearable: true, |
| | | // ...attrs, |
| | | // }) |
| | | // }, |
| | | // width: '100%', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥', |
| | | // }, |
| | | // { |
| | | // label: '', |
| | | // prop: 'lastModificationTime', |
| | | // el: (props: any, { attrs }: SetupContext) => { |
| | | // return h(dateTimePickerRange, { |
| | | // ...props, |
| | | // clearable: true, |
| | | // ...attrs, |
| | | // }) |
| | | // }, |
| | | // width: '100%', |
| | | // //disabled: disabled, |
| | | // placeholder: '请è¾å
¥', |
| | | // }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | const commonGetFormData = () => { |
| | | const data = { |
| | | materialId: formData.value.materialId || '', |
| | | materialName: formData.value.materialName || '', |
| | | containerNo: formData.value.containerNo || '', |
| | | containerStatus: formData.value.containerStatus || '', |
| | | containerType: formData.value.containerType || '', |
| | | materialNo: formData.value.materialNo || '', |
| | | stockNumber: formData.value.stockNumber || '', |
| | | materialBatch: formData.value.materialBatch || '', |
| | | supplierCode: formData.value.supplierCode || '', |
| | | materialModel: formData.value.materialModel || '', |
| | | placeNo: formData.value.placeNo || '', |
| | | placeStatus: formData.value.placeStatus || '', |
| | | storageTypeNo: formData.value.storageTypeNo || 1, |
| | | areaCode: formData.value.areaCode || '', |
| | | areaName: formData.value.areaName || '', |
| | | checkStatus: formData.value.checkStatus || '', |
| | | isLock: formData.value.isLock || '', |
| | | emptyContainer: formData.value.emptyContainer || '', |
| | | inStockTime: formData.value.inStockTime || '', |
| | | remark: formData.value.remark || '', |
| | | redundantField1: formData.value.redundantField1 || '', |
| | | redundantField2: formData.value.redundantField2 || '', |
| | | redundantField3: formData.value.redundantField3 || '', |
| | | creationTime: formData.value.creationTime || '', |
| | | lastModificationTime: formData.value.lastModificationTime || '', |
| | | } |
| | | return data |
| | | } |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | visible.value = false |
| | | const data = commonGetFormData() |
| | | ctx.emit('close', data) |
| | | } |
| | | } |
| | | /** |
| | | * 确认æ¥è¯¢ |
| | | */ |
| | | const onConfirmQuery = async () => { |
| | | const data = commonGetFormData() |
| | | ctx.emit('confirmQuery', data) |
| | | } |
| | | /** |
| | | * éç½®æ¥è¯¢ |
| | | */ |
| | | const onReset = async () => { |
| | | formData.value = {} |
| | | formData.value.materialId = '' |
| | | formData.value.materialName = '' |
| | | formData.value.containerNo = '' |
| | | formData.value.containerStatus = '' |
| | | formData.value.containerType = '' |
| | | formData.value.materialNo = '' |
| | | formData.value.stockNumber = '' |
| | | formData.value.materialBatch = '' |
| | | formData.value.supplierCode = '' |
| | | formData.value.materialModel = '' |
| | | formData.value.placeNo = '' |
| | | formData.value.placeStatus = '' |
| | | formData.value.storageTypeNo = '' |
| | | formData.value.areaCode = '' |
| | | formData.value.areaName = '' |
| | | formData.value.checkStatus = '' |
| | | formData.value.isLock = '' |
| | | formData.value.emptyContainer = '' |
| | | formData.value.inStockTime = '' |
| | | formData.value.remark = '' |
| | | formData.value.redundantField1 = '' |
| | | formData.value.redundantField2 = '' |
| | | formData.value.redundantField3 = '' |
| | | formData.value.deletionTime = '' |
| | | //åç¶ç»ä»¶åéèªå®ä¹äºä»¶ |
| | | ctx.emit('restQuery') |
| | | } |
| | | |
| | | const updateCheckData = () => { |
| | | initiateData.value = { |
| | | formData: { |
| | | ...formData.value, |
| | | }, |
| | | } |
| | | } |
| | | const updateFormItemOptions = (propName: string, enumData: any[]) => { |
| | | const item = formItems.find((item) => item.prop === propName) |
| | | if (item && enumData) { |
| | | item.options = enumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | } |
| | | } |
| | | /** |
| | | * éç¨æ¥è¯¢æä¸¾ |
| | | */ |
| | | const commonQueryEnumForFrom = async () => { |
| | | const containerStatusEnumEnum = await wmsMaterialStockDrawer.getWmsEnumData( |
| | | { |
| | | EnumName: 'ContainerStatusEnum', |
| | | } |
| | | ) |
| | | updateFormItemOptions('containerStatus', containerStatusEnumEnum) |
| | | const containerTypeEnumEnum = await wmsMaterialStockDrawer.getWmsEnumData({ |
| | | EnumName: 'ContainerTypeEnum', |
| | | }) |
| | | updateFormItemOptions('containerType', containerTypeEnumEnum) |
| | | const placeStatusEnumEnum = await wmsMaterialStockDrawer.getWmsEnumData({ |
| | | EnumName: 'PlaceStatusEnum', |
| | | }) |
| | | updateFormItemOptions('placeStatus', placeStatusEnumEnum) |
| | | const placeTypeEnumEnum = await wmsMaterialStockDrawer.getWmsEnumData({ |
| | | EnumName: 'PlaceTypeEnum', |
| | | }) |
| | | updateFormItemOptions('storageTypeNo', placeTypeEnumEnum) |
| | | const materialCheckStatusEnumEnum = |
| | | await wmsMaterialStockDrawer.getWmsEnumData({ |
| | | EnumName: 'MaterialCheckStatusEnum', |
| | | }) |
| | | updateFormItemOptions('checkStatus', materialCheckStatusEnumEnum) |
| | | const yesNoEnumEnum = await wmsMaterialStockDrawer.getWmsEnumData({ |
| | | EnumName: 'YesNoEnum', |
| | | }) |
| | | updateFormItemOptions('isLock', yesNoEnumEnum) |
| | | const yesNoEnumEnum2 = await wmsMaterialStockDrawer.getWmsEnumData({ |
| | | EnumName: 'YesNoEnum', |
| | | }) |
| | | updateFormItemOptions('emptyContainer', yesNoEnumEnum2) |
| | | } |
| | | commonQueryEnumForFrom() |
| | | formData.value.storageTypeNo = 1 |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | disabled.value = false |
| | | updateCheckData() |
| | | } |
| | | |
| | | watch(() => current.value, onOpen) |
| | | |
| | | return { |
| | | formItems, |
| | | formData, |
| | | visible, |
| | | formRef, |
| | | onOpen, |
| | | onClose, |
| | | onConfirmQuery, |
| | | onReset, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsMaterialStock = (data: any) => { |
| | | return request.post('/api/v1/HIAWms/wmsMaterialStockDetail', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWmsMaterialStock = (id: string) => { |
| | | return request.get(`/api/v1/HIAWms/wmsMaterialStockDetail/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWmsMaterialStock = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/HIAWms/wmsMaterialStockDetail/${id}`, data) |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾ |
| | | * @returns |
| | | */ |
| | | export const getWmsEnumData = (data: any) => { |
| | | return request.post('/api/v1/WareCmsUtilityApi/WmsEnum', data) |
| | | } |
| | | |
| | |
| | | ) => { |
| | | return request.put(`/api/v1/HIAWms/wmsMaterialStock/${id}`, data) |
| | | } |
| | | |
| | | export const getWmsEnumData = (data: Record<string, any>) => { |
| | | return request.post('/api/v1/HIAWms/WmsEnum', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsMaterialStock = (data: any) => { |
| | | return request.post('/api/v1/HIAWms/wmsMaterialStockDetail', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWmsMaterialStock = (id: string) => { |
| | | return request.get(`/api/v1/HIAWms/wmsMaterialStockDetail/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWmsMaterialStock = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/HIAWms/wmsMaterialStockDetail/${id}`, data) |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾ |
| | | * @returns |
| | | */ |
| | | export const getWmsEnumData = (data: any) => { |
| | | return request.post('/api/v1/WareCmsUtilityApi/WmsEnum', data) |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsMaterialStock, |
| | | getWmsMaterialStock, |
| | | updateWmsMaterialStock, |
| | | getWmsEnumData, |
| | | } from './Service/WmsMaterialStockDetailQueryDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WmsMaterialStockQueryDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | wmsMaterialStockDetail: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWmsMaterialStock(data: Record<string, any>) { |
| | | return addWmsMaterialStock(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWmsMaterialStock(id: string, data: Record<string, any>) { |
| | | return updateWmsMaterialStock(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWmsMaterialStockDetail(current: any, id?: string) { |
| | | return getWmsMaterialStock(id || current?.id) |
| | | } |
| | | |
| | | // è·åæä¸¾å¼ |
| | | async getWmsEnumData(data: Record<string, any>) { |
| | | return getWmsEnumData(data) |
| | | } |
| | | } |
| | |
| | | addWmsMaterialStock, |
| | | getWmsMaterialStock, |
| | | updateWmsMaterialStock, |
| | | getWmsEnumData, |
| | | } from './Service/WmsMaterialStockDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | |
| | | async getWmsMaterialStockDetail(current: any, materialNo?: string) { |
| | | return getWmsMaterialStock(current?.materialNo) |
| | | } |
| | | |
| | | // è·åæä¸¾å¼ |
| | | async getWmsEnumData(data: Record<string, any>) { |
| | | return getWmsEnumData(data) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsMaterialStock, |
| | | getWmsMaterialStock, |
| | | updateWmsMaterialStock, |
| | | getWmsEnumData, |
| | | } from './Service/WmsMaterialStockDetailQueryDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WmsMaterialStockQueryDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | wmsMaterialStockDetail: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWmsMaterialStock(data: Record<string, any>) { |
| | | return addWmsMaterialStock(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWmsMaterialStock(id: string, data: Record<string, any>) { |
| | | return updateWmsMaterialStock(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWmsMaterialStockDetail(current: any, id?: string) { |
| | | return getWmsMaterialStock(id || current?.id) |
| | | } |
| | | |
| | | // è·åæä¸¾å¼ |
| | | async getWmsEnumData(data: Record<string, any>) { |
| | | return getWmsEnumData(data) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * ç©æåºç¡ä¿¡æ¯æ¥è¯¢å¼¹åºæ¡ |
| | | */ |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseQueryDrawer from '@/components/BaseQueryDrawer/BaseQueryDrawer' |
| | | import styles from './WmsMaterialStockDetailQueryDrawer.module.scss' |
| | | import { useWmsMaterialStockDetalQueryDrawer } from '../../../../Controllers/WmsMaterialStockDetailQueryDrawer.tsx' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | name: 'å¼¹çª', |
| | | props: { |
| | | //æä¸¾ç±»ååå
¸ |
| | | enumListDict: { |
| | | type: Array as () => Array<{ key: string; value: object }>, // å®ä¹æ°ç»å
ç´ ç±»å |
| | | default: () => [], // é»è®¤å¼ |
| | | }, |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | }, |
| | | sort: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirmquery1'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | | onConfirmQuery, |
| | | onOpen, |
| | | onReset, |
| | | formRef, |
| | | visible, |
| | | formItems, |
| | | formData, |
| | | } = useWmsMaterialStockDetalQueryDrawer(props, ctx) |
| | | return () => ( |
| | | <BaseQueryDrawer |
| | | class={styles.drawer} |
| | | size="800px" |
| | | title={props.title || 'é«çº§æ¥è¯¢'} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | onReset={onReset} |
| | | onConfirmQueryForBase={onConfirmQuery} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | </BaseQueryDrawer> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * ç©æåºç¡ä¿¡æ¯æ¥è¯¢å¼¹åºæ¡ |
| | | */ |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseQueryDrawer from '@/components/BaseQueryDrawer/BaseQueryDrawer' |
| | | import styles from './WmsMaterialStockQueryDrawer.module.scss' |
| | | import { useWmsMaterialStockQueryDrawer } from '../../../../Controllers/WmsMaterialStockQueryDrawer.tsx' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | name: 'å¼¹çª', |
| | | props: { |
| | | //æä¸¾ç±»ååå
¸ |
| | | enumListDict: { |
| | | type: Array as () => Array<{ key: string; value: object }>, // å®ä¹æ°ç»å
ç´ ç±»å |
| | | default: () => [], // é»è®¤å¼ |
| | | }, |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | }, |
| | | sort: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirmquery1'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | | onConfirmQuery, |
| | | onOpen, |
| | | onReset, |
| | | formRef, |
| | | visible, |
| | | formItems, |
| | | formData, |
| | | } = useWmsMaterialStockQueryDrawer(props, ctx) |
| | | return () => ( |
| | | <BaseQueryDrawer |
| | | class={styles.drawer} |
| | | size="800px" |
| | | title={props.title || 'é«çº§æ¥è¯¢'} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | onReset={onReset} |
| | | onConfirmQueryForBase={onConfirmQuery} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | </BaseQueryDrawer> |
| | | ) |
| | | }, |
| | | }) |
| | |
| | | field: 'placeStatusDesc', |
| | | title: 'åºä½ç¶æ', |
| | | }, |
| | | { |
| | | field: 'containerNo', |
| | | title: '容å¨ç¼å·', |
| | | }, |
| | | // { |
| | | // field: 'containerNo', |
| | | // title: '容å¨ç¼å·', |
| | | // }, |
| | | { |
| | | field: 'stockNumber', |
| | | title: 'åºåæ°é', |
| | | }, |
| | | { |
| | | field: 'materialBatch', |
| | | title: 'ç©ææ¹æ¬¡', |
| | | }, |
| | | // { |
| | | // field: 'materialBatch', |
| | | // title: 'ç©ææ¹æ¬¡', |
| | | // }, |
| | | { |
| | | field: 'materialModel', |
| | | title: 'åå·', |
| | |
| | | field: 'areaName', |
| | | title: 'æå±åºåº', |
| | | }, |
| | | { |
| | | field: 'checkStatusDesc', |
| | | title: 'æ£éªç¶æ', |
| | | }, |
| | | { |
| | | field: 'inStockTime', |
| | | title: 'å
¥åºæ¶é´', |
| | | width: 180, |
| | | }, |
| | | // { |
| | | // field: 'checkStatusDesc', |
| | | // title: 'æ£éªç¶æ', |
| | | // }, |
| | | // { |
| | | // field: 'inStockTime', |
| | | // title: 'å
¥åºæ¶é´', |
| | | // width: 180, |
| | | // }, |
| | | { |
| | | field: 'isLockDesc', |
| | | title: 'éå®ç¶æ', |
| | |
| | | .wmsMaterialStockContent { |
| | | width: 100%; |
| | | height: 80%; |
| | | |
| | | .wmsMaterialStockList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
| | | .queryForm { |
| | | padding: 10px; |
| | | background: #f5f7fa; |
| | | margin-bottom: 0px; |
| | | border-radius: 4px; |
| | | |
| | | .el-form-item { |
| | | margin-right: 20px; |
| | | margin-bottom: 0; |
| | | |
| | | // ç»ä¸è¾å
¥æ¡åéæ©æ¡ç宽度 |
| | | .el-input, .el-select { |
| | | width: 200px; // 设置ç»ä¸ç宽度 |
| | | } |
| | | |
| | | // éæ©æ¡å
é¨è¾å
¥æ¡æ ·å¼ |
| | | .el-select .el-input__wrapper { |
| | | height: 32px; // ä¸è¾å
¥æ¡é«åº¦ä¸è´ |
| | | padding: 1px 11px; // ä¸è¾å
¥æ¡å
è¾¹è·ä¸è´ |
| | | } |
| | | |
| | | // æ¥æéæ©å¨å®½åº¦ |
| | | .el-date-editor { |
| | | width: 220px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 妿éè¦æ´ç²¾ç¡®çæ§å¶ï¼å¯ä»¥åç¬è®¾ç½® |
| | | .formItem { |
| | | width: 200px; |
| | | |
| | | &.el-input, &.el-select { |
| | | width: 100%; |
| | | } |
| | | } |
| | | .wmsMaterialStockDetailContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .wmsMaterialStockDetailList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
| | | .queryForm { |
| | | padding: 10px; |
| | | background: #f5f7fa; |
| | | margin-bottom: 0px; |
| | | border-radius: 4px; |
| | | |
| | | .el-form-item { |
| | | margin-right: 20px; |
| | | margin-bottom: 0; |
| | | |
| | | // ç»ä¸è¾å
¥æ¡åéæ©æ¡ç宽度 |
| | | .el-input, .el-select { |
| | | width: 200px; // 设置ç»ä¸ç宽度 |
| | | } |
| | | |
| | | // éæ©æ¡å
é¨è¾å
¥æ¡æ ·å¼ |
| | | .el-select .el-input__wrapper { |
| | | height: 32px; // ä¸è¾å
¥æ¡é«åº¦ä¸è´ |
| | | padding: 1px 11px; // ä¸è¾å
¥æ¡å
è¾¹è·ä¸è´ |
| | | } |
| | | |
| | | // æ¥æéæ©å¨å®½åº¦ |
| | | .el-date-editor { |
| | | width: 220px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 妿éè¦æ´ç²¾ç¡®çæ§å¶ï¼å¯ä»¥åç¬è®¾ç½® |
| | | .formItem { |
| | | width: 200px; |
| | | |
| | | &.el-input, &.el-select { |
| | | width: 100%; |
| | | } |
| | | } |
| | |
| | | import { useWmsMaterialStock } from '../../../Controllers/WmsMaterialStock' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import WmsMaterialStockDrawer from '../Dialog/WmsMaterialStockDrawer/WmsMaterialStockDrawer' |
| | | import WmsMaterialStockQueryDrawer from '../Dialog/WmsMaterialStockQuery/WmsMaterialStockQueryDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | import dayjs from 'dayjs' |
| | | import { getWmsEnumData } from '@/widgets/WmsTask/Models/Service/WmsTaskDrawer' |
| | | import { |
| | | ElInput, |
| | | ElSelect, |
| | | ElOption, |
| | | ElDatePicker, |
| | | ElForm, |
| | | ElFormItem, |
| | | ElInput, |
| | | ElOption, |
| | | ElSelect, |
| | | } from 'element-plus' |
| | | import { getWmsEnumData } from '@/widgets/HIAWms/Models/Service/WmsMaterialDrawer' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogConfigForQuery, |
| | | tableRef, |
| | | current, |
| | | search, |
| | |
| | | onConfirmWmsMaterialStock, |
| | | onCheck, |
| | | onAddWmsMaterialStock, |
| | | onAdvancedQuery, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useWmsMaterialStock(props, ctx) |
| | | |
| | | //å®ä¹é«çº§æ¥è¯¢å¼ç¨ |
| | | const wmsMaterialStockDetailQueryDrawerRef = ref(null) |
| | | // æ°å¢çæ¥è¯¢æ¡ä»¶ |
| | | const queryForm = ref({ |
| | | containerNo: '', |
| | | materialNo: '', |
| | | materialName: '', |
| | | containerType: '', |
| | | containerStatus: '', |
| | | searchVal: '', |
| | | storageTypeNo: 1, |
| | | placeStatus: '', |
| | | placeNo: '', |
| | | isLock: '', |
| | | emptyContainer: '', |
| | | dateRange: [], |
| | | filter: '', |
| | | str_searchFormInputAttrs: [], |
| | | }) |
| | | |
| | | const queryParams = computed(() => ({ |
| | | ...queryForm.value, |
| | | containerType: queryForm.value.containerType || '', // å¤ç䏿 |
| | | containerStatus: queryForm.value.containerStatus || '', |
| | | storageTypeNo: queryForm.value.storageTypeNo || 1, // å¤ç䏿 |
| | | placeStatus: queryForm.value.placeStatus || '', |
| | | islock: queryForm.value.isLock || '', |
| | | emptyContainer: queryForm.value.emptyContainer || '', |
| | | startTime: queryForm.value.dateRange[0] || '', |
| | | endTime: queryForm.value.dateRange[1] || '', |
| | | })) |
| | | //å®ä¹æ´ä½æ¨¡ç³æ¥è¯¢çåæ°ç»(注æï¼å¿
须大å°åè·å端çå®ä½ç±»å±æ§åä¸è´ï¼å¦åä¼å¯¼è´å¹é
ä¸å¯¹çé®é¢) |
| | | const _searchFormInputAttrs = ref(['OrderNo', 'MaterialNo', 'MaterialId']) |
| | | const searchFormInputAttrs_Placeholder = ref('请è¾å
¥åæ®å·/ç©æç¼å·/ç©æID') |
| | | |
| | | // 卿æä¸¾é项 |
| | | const enumOptions = reactive({ |
| | | containerType: [] as Array<{ label: string; value: any }>, |
| | | containerStatus: [] as Array<{ label: string; value: any }>, |
| | | storageTypeNo: [] as Array<{ label: string; value: any }>, |
| | | containerType: [] as Array<{ label: string; value: any }>, |
| | | placeStatus: [] as Array<{ label: string; value: any }>, |
| | | yesOrNo: [] as Array<{ label: string; value: any }>, |
| | | storageTypeNo: [] as Array<{ label: string; value: any }>, |
| | | checkStatus: [] as Array<{ label: string; value: any }>, |
| | | isLock: [] as Array<{ label: string; value: any }>, |
| | | emptyContainer: [] as Array<{ label: string; value: any }>, |
| | | }) |
| | | |
| | | // è·åæä¸¾æ°æ® |
| | | const fetchEnumData = async () => { |
| | | try { |
| | | // è·åç©æç±»åæä¸¾ |
| | | const containerTypeData = await getWmsEnumData({ |
| | | EnumName: 'ContainerTypeEnum', |
| | | }) |
| | | enumOptions.containerType = containerTypeData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | // è·åç©æç±»åæä¸¾ |
| | | const storageTypeNoData = await getWmsEnumData({ |
| | | EnumName: 'PlaceTypeEnum', |
| | | }) |
| | | enumOptions.storageTypeNo = storageTypeNoData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | |
| | | // è·åéè´ç±»åæä¸¾ |
| | | const placeStatusData = await getWmsEnumData({ |
| | | EnumName: 'PlaceStatusEnum', |
| | | }) |
| | | enumOptions.placeStatus = placeStatusData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | |
| | | // è·åéè´ç±»åæä¸¾ |
| | | const containerStatusData = await getWmsEnumData({ |
| | | const containerStatusEnumData = await getWmsEnumData({ |
| | | EnumName: 'ContainerStatusEnum', |
| | | }) |
| | | enumOptions.containerStatus = containerStatusData.map((item) => ({ |
| | | enumOptions.containerStatus = containerStatusEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | |
| | | const yesNoData = await getWmsEnumData({ |
| | | const containerTypeEnumData = await getWmsEnumData({ |
| | | EnumName: 'ContainerTypeEnum', |
| | | }) |
| | | enumOptions.containerType = containerTypeEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | const placeStatusEnumData = await getWmsEnumData({ |
| | | EnumName: 'PlaceStatusEnum', |
| | | }) |
| | | enumOptions.placeStatus = placeStatusEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | const placeTypeEnumData = await getWmsEnumData({ |
| | | EnumName: 'PlaceTypeEnum', |
| | | }) |
| | | enumOptions.storageTypeNo = placeTypeEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | const materialCheckStatusEnumData = await getWmsEnumData({ |
| | | EnumName: 'MaterialCheckStatusEnum', |
| | | }) |
| | | enumOptions.checkStatus = materialCheckStatusEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | const yesNoEnumData = await getWmsEnumData({ |
| | | EnumName: 'YesNoEnum', |
| | | }) |
| | | enumOptions.yesOrNo = yesNoData.map((item) => ({ |
| | | enumOptions.isLock = yesNoEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | enumOptions.emptyContainer = yesNoEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | |
| | | // ç»ä»¶æè½½æ¶è·åæä¸¾æ°æ® |
| | | onMounted(() => { |
| | | fetchEnumData() |
| | | handleQuery() |
| | | |
| | | tableRef.value = { |
| | | dataSource: [], |
| | | } |
| | | handleQueryForMain() |
| | | }) |
| | | |
| | | // æ°å¢çæ¥è¯¢æ¹æ³ |
| | | const handleQuery = async () => { |
| | | console.log('æ¥è¯¢æ¡ä»¶:', queryParams.value) |
| | | // tableRef.value.getTableList() |
| | | tableRef.value.getList(queryParams.value) |
| | | // å®ä¹ååºå¼æ¥è¯¢æ°æ® |
| | | const _curHighQueryData = ref({ |
| | | searchVal: '', |
| | | str_searchFormInputAttrs: [], |
| | | }) |
| | | // æ°ççæ¥è¯¢æ¹æ³ï¼ä¸»é¡µé¢ä¸çæé®ãæ¥è¯¢ãï¼ |
| | | const handleQueryForMain = async () => { |
| | | _curHighQueryData.value.searchVal = queryForm.value.searchVal |
| | | _curHighQueryData.value.str_searchFormInputAttrs = |
| | | _searchFormInputAttrs.value |
| | | if (!_curHighQueryData.value?.storageTypeNo) { |
| | | _curHighQueryData.value.storageTypeNo = 1 |
| | | } |
| | | tableRef.value.getList(_curHighQueryData.value) |
| | | } |
| | | // æ°ççæ¥è¯¢æ¹æ³ï¼é«çº§æ¥è¯¢ä¸çæé®ãæ¥è¯¢ãï¼ |
| | | const handleQuery = async (extraParams = {}) => { |
| | | let filteredData = commonGetHighQueryForm(extraParams) |
| | | commonSaveCurHighQueryData(filteredData) |
| | | tableRef.value.getList(filteredData) |
| | | } |
| | | // æ°ççæ¥è¯¢éç½® |
| | | const resetQuery = () => { |
| | | queryForm.value.searchVal = '' |
| | | queryForm.value.str_searchFormInputAttrs = _searchFormInputAttrs.value |
| | | } |
| | | //æ°ççå¯¼åºæ¹æ³ |
| | | const handleExport = () => { |
| | | onExport(_curHighQueryData.value) |
| | | } |
| | | // æ°ççæ¥è¯¢å¼¹åºæ¡å
³éæ¹æ³ |
| | | const closeQuery = (extraParams = {}) => { |
| | | let filteredData = commonGetHighQueryForm(extraParams) |
| | | console.log('closeQueryæ¹æ³') |
| | | console.log(filteredData) |
| | | commonSaveCurHighQueryData(filteredData) |
| | | } |
| | | //ä¿åæ¥è¯¢å¼ |
| | | const commonSaveCurHighQueryData = (filteredData = {}) => { |
| | | _curHighQueryData.value = { ..._curHighQueryData.value, ...filteredData } |
| | | _curHighQueryData.value.searchVal = queryForm.value.searchVal |
| | | _curHighQueryData.value.str_searchFormInputAttrs = |
| | | _searchFormInputAttrs.value |
| | | } |
| | | //è·åé«çº§æ¥è¯¢å¼¹åºæ¡çæ¥è¯¢å¼ |
| | | const commonGetHighQueryForm = (extraParams = {}) => { |
| | | // è¿æ»¤æ undefined çå¼ |
| | | let filteredData = Object.assign( |
| | | {}, |
| | | ...Object.entries(extraParams).map(([key, value]) => |
| | | value !== undefined ? { [key]: value } : {} |
| | | ) |
| | | ) |
| | | //ç»åæ¨¡ç³æ¥è¯¢ |
| | | filteredData.searchVal = queryForm.value.searchVal |
| | | filteredData.str_searchFormInputAttrs = _searchFormInputAttrs.value |
| | | return filteredData |
| | | } |
| | | |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | const resetQuery = () => { |
| | | queryForm.value = { |
| | | containerNo: '', |
| | | materialNo: '', |
| | | materialName: '', |
| | | containerType: '', |
| | | containerStatus: '', |
| | | storageTypeNo: 1, |
| | | placeStatus: '', |
| | | placeNo: '', |
| | | isLock: '', |
| | | emptyContainer: '', |
| | | dateRange: [], |
| | | filter: '', |
| | | } |
| | | } |
| | | /** |
| | | * @returns è¡¨æ ¼ |
| | | */ |
| | |
| | | params, |
| | | autoHeight, |
| | | } = props |
| | | props.params = { |
| | | ...queryParams.value, |
| | | ...params, |
| | | } |
| | | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.wmsMaterialStockList]: true, |
| | | [styles.wmsMaterialStockDetailList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/HIAWms/wmsMaterialStock/{id}/adjustsort/{sort}" |
| | | sortUrlTpl="/api/v1/HIAWms/wmsMaterialStockDetail/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | |
| | | <div> |
| | | {row.inStockTime != null |
| | | ? dayjs(row.inStockTime).format('YYYY-MM-DD HH:mm:ss') |
| | | : '-'} |
| | | </div> |
| | | ) |
| | | }, |
| | | isDisabled: ({ row }: any) => { |
| | | return ( |
| | | <div> |
| | | {row.isDisabled != null |
| | | ? row.isDisabled |
| | | ? 'æ¯' |
| | | : 'å¦' |
| | | : '-'} |
| | | </div> |
| | | ) |
| | | }, |
| | | creationTime: ({ row }: any) => { |
| | | return ( |
| | | <div> |
| | | {row.creationTime != null |
| | | ? dayjs(row.creationTime).format('YYYY-MM-DD HH:mm:ss') |
| | | : '-'} |
| | | </div> |
| | | ) |
| | | }, |
| | | lastModificationTime: ({ row }: any) => { |
| | | return ( |
| | | <div> |
| | | {row.lastModificationTime != null |
| | | ? dayjs(row.lastModificationTime).format( |
| | | 'YYYY-MM-DD HH:mm:ss' |
| | | ) |
| | | : '-'} |
| | | </div> |
| | | ) |
| | | }, |
| | | isDeleted: ({ row }: any) => { |
| | | return ( |
| | | <div> |
| | | {row.isDeleted != null |
| | | ? row.isDeleted |
| | | ? 'æ¯' |
| | | : 'å¦' |
| | | : '-'} |
| | | </div> |
| | | ) |
| | | }, |
| | | deletionTime: ({ row }: any) => { |
| | | return ( |
| | | <div> |
| | | {row.deletionTime != null |
| | | ? dayjs(row.deletionTime).format('YYYY-MM-DD HH:mm:ss') |
| | | : '-'} |
| | | </div> |
| | | ) |
| | |
| | | </div> |
| | | ) |
| | | } |
| | | |
| | | return () => { |
| | | return ( |
| | | <div class={styles.wmsMaterialStockContent}> |
| | | <div class={styles.wmsMaterialStockDetailContent}> |
| | | {/* æ·»å /ç¼è¾ */} |
| | | <WmsMaterialStockDrawer |
| | | v-model={dialogConfig.visible} |
| | |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWmsMaterialStock} |
| | | /> |
| | | {/* æ°å¢çæ¥è¯¢è¡¨å */} |
| | | <ElForm |
| | | inline |
| | | model={queryForm.value} |
| | | class={styles.queryForm} |
| | | label-width="80px" |
| | | > |
| | | <ElFormItem label="å
³é®å"> |
| | | <ElInput |
| | | v-model={queryForm.value.filter} |
| | | placeholder="请è¾å
¥å
³é®åæç´¢" |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="ç©æç¼ç "> |
| | | <ElInput |
| | | v-model={queryForm.value.materialNo} |
| | | placeholder="请è¾å
¥ç©æç¼ç " |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="ç©æåç§°"> |
| | | <ElInput |
| | | v-model={queryForm.value.materialName} |
| | | placeholder="请è¾å
¥ç©æåç§°" |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="æçç¼ç "> |
| | | <ElInput |
| | | v-model={queryForm.value.containerNo} |
| | | placeholder="请è¾å
¥æçç¼ç " |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="æçç±»å"> |
| | | <ElSelect |
| | | v-model={queryForm.value.containerType} |
| | | placeholder="è¯·éæ©æçç±»å" |
| | | clearable |
| | | loading={enumOptions.containerType.length === 0} |
| | | class={styles.formItem} |
| | | > |
| | | {enumOptions.containerType.map((option) => ( |
| | | <ElOption |
| | | key={option.value} |
| | | label={option.label} |
| | | value={option.value} |
| | | /> |
| | | ))} |
| | | </ElSelect> |
| | | </ElFormItem> |
| | | <ElFormItem label="æçç¶æ"> |
| | | <ElSelect |
| | | v-model={queryForm.value.containerStatus} |
| | | placeholder="è¯·éæ©æçç¶æ" |
| | | clearable |
| | | loading={enumOptions.containerStatus.length === 0} |
| | | class={styles.formItem} |
| | | > |
| | | {enumOptions.containerStatus.map((option) => ( |
| | | <ElOption |
| | | key={option.value} |
| | | label={option.label} |
| | | value={option.value} |
| | | /> |
| | | ))} |
| | | </ElSelect> |
| | | </ElFormItem> |
| | | <ElFormItem label="åºä½ç¼å·"> |
| | | <ElInput |
| | | v-model={queryForm.value.placeNo} |
| | | placeholder="请è¾å
¥åºä½ç¼å·" |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="åºä½ç±»å"> |
| | | <ElSelect |
| | | v-model={queryForm.value.storageTypeNo} |
| | | placeholder="è¯·éæ©æçç±»å" |
| | | loading={enumOptions.storageTypeNo.length === 0} |
| | | class={styles.formItem} |
| | | > |
| | | {enumOptions.storageTypeNo.map((option) => ( |
| | | <ElOption |
| | | key={option.value} |
| | | label={option.label} |
| | | value={option.value} |
| | | /> |
| | | ))} |
| | | </ElSelect> |
| | | </ElFormItem> |
| | | <ElFormItem label="åºä½ç¶æ"> |
| | | <ElSelect |
| | | v-model={queryForm.value.placeStatus} |
| | | placeholder="è¯·éæ©æçç¶æ" |
| | | clearable |
| | | loading={enumOptions.placeStatus.length === 0} |
| | | class={styles.formItem} |
| | | > |
| | | {enumOptions.placeStatus.map((option) => ( |
| | | <ElOption |
| | | key={option.value} |
| | | label={option.label} |
| | | value={option.value} |
| | | /> |
| | | ))} |
| | | </ElSelect> |
| | | </ElFormItem> |
| | | <ElFormItem label="æ¯å¦éå®"> |
| | | <ElSelect |
| | | v-model={queryForm.value.isLock} |
| | | placeholder="è¯·éæ©æ¯å¦éå®" |
| | | clearable |
| | | loading={enumOptions.yesOrNo.length === 0} |
| | | class={styles.formItem} |
| | | > |
| | | {enumOptions.yesOrNo.map((option) => ( |
| | | <ElOption |
| | | key={option.value} |
| | | label={option.label} |
| | | value={option.value} |
| | | /> |
| | | ))} |
| | | </ElSelect> |
| | | </ElFormItem> |
| | | <ElFormItem label="æ¯å¦ç©ºæ"> |
| | | <ElSelect |
| | | v-model={queryForm.value.emptyContainer} |
| | | placeholder="è¯·éæ©æ¯å¦ç©ºæ" |
| | | clearable |
| | | loading={enumOptions.yesOrNo.length === 0} |
| | | class={styles.formItem} |
| | | > |
| | | {enumOptions.yesOrNo.map((option) => ( |
| | | <ElOption |
| | | key={option.value} |
| | | label={option.label} |
| | | value={option.value} |
| | | /> |
| | | ))} |
| | | </ElSelect> |
| | | </ElFormItem> |
| | | <ElFormItem label="æ¥æèå´"> |
| | | <ElDatePicker |
| | | v-model={queryForm.value.dateRange} |
| | | type="datetimerange" |
| | | range-separator="è³" |
| | | show-now="true" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | valueFormat="YYYY-MM-DD HH:mm:ss" |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem> |
| | | <IconButton type="primary" icon="search" onClick={handleQuery}> |
| | | æ¥è¯¢ |
| | | </IconButton> |
| | | <IconButton |
| | | style="margin-left: 10px;" |
| | | icon="refresh" |
| | | onClick={resetQuery} |
| | | > |
| | | éç½® |
| | | </IconButton> |
| | | </ElFormItem> |
| | | </ElForm> |
| | | {/* é«çº§æ¥è¯¢ */} |
| | | <WmsMaterialStockQueryDrawer |
| | | ref="wmsMaterialStockDetailQueryDrawerRef" |
| | | v-model={dialogConfigForQuery.visible} |
| | | title={dialogConfigForQuery.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirmQuery={handleQuery} |
| | | onRestQuery={resetQuery} |
| | | onClose={closeQuery} |
| | | /> |
| | | |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="wmsMaterialStock-add" |
| | | v-permission="wmsMaterialStockDetail-add" |
| | | icon="add-p" |
| | | onClick={onAddWmsMaterialStock} |
| | | type="primary" |
| | |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="wmsMaterialStock-import" |
| | | |
| | | {/* <el-upload |
| | | v-permission="wmsMaterialStockDetail-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/HIAWms/wmsMaterialStock/import" |
| | | action="/api/v1/HIAWms/wmsMaterialStockDetail/import" |
| | | > |
| | | <IconButton icon="in">导å
¥</IconButton> |
| | | </el-upload> |
| | | </el-upload> */} |
| | | |
| | | <IconButton |
| | | v-permission="wmsMaterialStock-output" |
| | | v-permission="wmsMaterialStockDetail-output" |
| | | icon="out" |
| | | onClick={onExport} |
| | | onClick={handleExport} |
| | | > |
| | | å¯¼åº |
| | | </IconButton> |
| | | </div> |
| | | {/* <Search |
| | | placeholder="请è¾å
¥å
³é®å" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> */} |
| | | <ElFormItem style={{ marginTop: '15px' }}> |
| | | <ElFormItem label="å
³é®å"> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | content={searchFormInputAttrs_Placeholder.value} |
| | | placement="top-start" |
| | | > |
| | | <ElInput |
| | | v-model={queryForm.value.searchVal} |
| | | placeholder={searchFormInputAttrs_Placeholder.value} |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </el-tooltip> |
| | | </ElFormItem> |
| | | <IconButton |
| | | type="primary" |
| | | icon="search" |
| | | onClick={handleQueryForMain} |
| | | > |
| | | æ¥è¯¢ |
| | | </IconButton> |
| | | {/* <IconButton style="" icon="refresh" onClick={resetQuery}> |
| | | éç½® |
| | | </IconButton> */} |
| | | <IconButton |
| | | v-permission="wmsMaterialStock-add" |
| | | icon="search" |
| | | onClick={onAdvancedQuery} |
| | | type="primary" |
| | | > |
| | | é«çº§æ¥è¯¢ |
| | | </IconButton> |
| | | </ElFormItem> |
| | | </div> |
| | | |
| | | <RenderBaseTable |
| | | url="/api/v1/HIAWms/wmsMaterialStock" |
| | | url="/api/v1/HIAWms/wmsmaterialstock/" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | |
| | | field: 'placeStatusDesc', |
| | | title: 'åºä½ç¶æ', |
| | | }, |
| | | { |
| | | field: 'containerNo', |
| | | title: '容å¨ç¼å·', |
| | | }, |
| | | // { |
| | | // field: 'containerNo', |
| | | // title: '容å¨ç¼å·', |
| | | // }, |
| | | { |
| | | field: 'stockNumber', |
| | | title: 'åºåæ°é', |
| | |
| | | field: 'areaName', |
| | | title: 'æå±åºåº', |
| | | }, |
| | | { |
| | | field: 'checkStatusDesc', |
| | | title: 'æ£éªç¶æ', |
| | | }, |
| | | // { |
| | | // field: 'checkStatusDesc', |
| | | // title: 'æ£éªç¶æ', |
| | | // }, |
| | | { |
| | | field: 'inStockTime', |
| | | title: 'å
¥åºæ¶é´', |
| | |
| | | .wmsMaterialStockContent { |
| | | width: 100%; |
| | | height: 80%; |
| | | |
| | | .wmsMaterialStockList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
| | | .queryForm { |
| | | padding: 10px; |
| | | background: #f5f7fa; |
| | | margin-bottom: 0px; |
| | | border-radius: 4px; |
| | | |
| | | .el-form-item { |
| | | margin-right: 20px; |
| | | margin-bottom: 0; |
| | | |
| | | // ç»ä¸è¾å
¥æ¡åéæ©æ¡ç宽度 |
| | | .el-input, .el-select { |
| | | width: 200px; // 设置ç»ä¸ç宽度 |
| | | } |
| | | |
| | | // éæ©æ¡å
é¨è¾å
¥æ¡æ ·å¼ |
| | | .el-select .el-input__wrapper { |
| | | height: 32px; // ä¸è¾å
¥æ¡é«åº¦ä¸è´ |
| | | padding: 1px 11px; // ä¸è¾å
¥æ¡å
è¾¹è·ä¸è´ |
| | | } |
| | | |
| | | // æ¥æéæ©å¨å®½åº¦ |
| | | .el-date-editor { |
| | | width: 220px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 妿éè¦æ´ç²¾ç¡®çæ§å¶ï¼å¯ä»¥åç¬è®¾ç½® |
| | | .formItem { |
| | | width: 200px; |
| | | |
| | | &.el-input, &.el-select { |
| | | width: 100%; |
| | | } |
| | | } |
| | | .wmsMaterialStockDetailContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .wmsMaterialStockDetailList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
| | | .queryForm { |
| | | padding: 10px; |
| | | background: #f5f7fa; |
| | | margin-bottom: 0px; |
| | | border-radius: 4px; |
| | | |
| | | .el-form-item { |
| | | margin-right: 20px; |
| | | margin-bottom: 0; |
| | | |
| | | // ç»ä¸è¾å
¥æ¡åéæ©æ¡ç宽度 |
| | | .el-input, .el-select { |
| | | width: 200px; // 设置ç»ä¸ç宽度 |
| | | } |
| | | |
| | | // éæ©æ¡å
é¨è¾å
¥æ¡æ ·å¼ |
| | | .el-select .el-input__wrapper { |
| | | height: 32px; // ä¸è¾å
¥æ¡é«åº¦ä¸è´ |
| | | padding: 1px 11px; // ä¸è¾å
¥æ¡å
è¾¹è·ä¸è´ |
| | | } |
| | | |
| | | // æ¥æéæ©å¨å®½åº¦ |
| | | .el-date-editor { |
| | | width: 220px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 妿éè¦æ´ç²¾ç¡®çæ§å¶ï¼å¯ä»¥åç¬è®¾ç½® |
| | | .formItem { |
| | | width: 200px; |
| | | |
| | | &.el-input, &.el-select { |
| | | width: 100%; |
| | | } |
| | | } |
| | |
| | | import styles from './WmsMaterialStockDetail.module.scss' |
| | | import { useWmsMaterialStock } from '../../../Controllers/WmsMaterialStock' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import WmsMaterialStockDrawer from '../Dialog/WmsMaterialStockDrawer/WmsMaterialStockDrawer' |
| | | import WmsMaterialStockDetailQueryDrawer from '../Dialog/WmsMaterialStockDetailQuery/WmsMaterialStockDetailQueryDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | import dayjs from 'dayjs' |
| | | import { getWmsEnumData } from '@/widgets/WmsMaterialStock/Models/Service/WmsMaterialStockDrawer' |
| | | import { |
| | | ElInput, |
| | | ElSelect, |
| | | ElOption, |
| | | ElDatePicker, |
| | | ElForm, |
| | | ElFormItem, |
| | | ElInput, |
| | | ElOption, |
| | | ElSelect, |
| | | } from 'element-plus' |
| | | import { getWmsEnumData } from '@/widgets/HIAWms/Models/Service/WmsMaterialDrawer' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'WmsMaterialStock', |
| | | name: 'WmsMaterialStockDetail', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogConfigForQuery, |
| | | tableRef, |
| | | current, |
| | | search, |
| | |
| | | onConfirmWmsMaterialStock, |
| | | onCheck, |
| | | onAddWmsMaterialStock, |
| | | onAdvancedQuery, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useWmsMaterialStock(props, ctx) |
| | | |
| | | //å®ä¹é«çº§æ¥è¯¢å¼ç¨ |
| | | const wmsMaterialStockDetailQueryDrawerRef = ref(null) |
| | | // æ°å¢çæ¥è¯¢æ¡ä»¶ |
| | | const queryForm = ref({ |
| | | containerNo: '', |
| | | materialNo: '', |
| | | materialName: '', |
| | | containerType: '', |
| | | containerStatus: '', |
| | | storageTypeNo: 1, |
| | | placeStatus: '', |
| | | placeNo: '', |
| | | isLock: '', |
| | | emptyContainer: '', |
| | | dateRange: [], |
| | | filter: '', |
| | | searchVal: '', |
| | | str_searchFormInputAttrs: [], |
| | | }) |
| | | |
| | | const queryParams = computed(() => ({ |
| | | ...queryForm.value, |
| | | containerType: queryForm.value.containerType || '', // å¤ç䏿 |
| | | containerStatus: queryForm.value.containerStatus || '', |
| | | storageTypeNo: queryForm.value.storageTypeNo || 1, // å¤ç䏿 |
| | | placeStatus: queryForm.value.placeStatus || '', |
| | | islock: queryForm.value.isLock || '', |
| | | emptyContainer: queryForm.value.emptyContainer || '', |
| | | startTime: queryForm.value.dateRange[0] || '', |
| | | endTime: queryForm.value.dateRange[1] || '', |
| | | })) |
| | | //å®ä¹æ´ä½æ¨¡ç³æ¥è¯¢çåæ°ç»(注æï¼å¿
须大å°åè·å端çå®ä½ç±»å±æ§åä¸è´ï¼å¦åä¼å¯¼è´å¹é
ä¸å¯¹çé®é¢) |
| | | const _searchFormInputAttrs = ref(['OrderNo', 'MaterialNo', 'MaterialId']) |
| | | const searchFormInputAttrs_Placeholder = ref('请è¾å
¥åæ®å·/ç©æç¼å·/ç©æID') |
| | | |
| | | // 卿æä¸¾é项 |
| | | const enumOptions = reactive({ |
| | | containerType: [] as Array<{ label: string; value: any }>, |
| | | containerStatus: [] as Array<{ label: string; value: any }>, |
| | | storageTypeNo: [] as Array<{ label: string; value: any }>, |
| | | containerType: [] as Array<{ label: string; value: any }>, |
| | | placeStatus: [] as Array<{ label: string; value: any }>, |
| | | yesOrNo: [] as Array<{ label: string; value: any }>, |
| | | storageTypeNo: [] as Array<{ label: string; value: any }>, |
| | | checkStatus: [] as Array<{ label: string; value: any }>, |
| | | isLock: [] as Array<{ label: string; value: any }>, |
| | | emptyContainer: [] as Array<{ label: string; value: any }>, |
| | | }) |
| | | |
| | | // è·åæä¸¾æ°æ® |
| | | const fetchEnumData = async () => { |
| | | try { |
| | | // è·åç©æç±»åæä¸¾ |
| | | const containerTypeData = await getWmsEnumData({ |
| | | EnumName: 'ContainerTypeEnum', |
| | | }) |
| | | enumOptions.containerType = containerTypeData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | // è·åç©æç±»åæä¸¾ |
| | | const storageTypeNoData = await getWmsEnumData({ |
| | | EnumName: 'PlaceTypeEnum', |
| | | }) |
| | | enumOptions.storageTypeNo = storageTypeNoData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | |
| | | // è·åéè´ç±»åæä¸¾ |
| | | const placeStatusData = await getWmsEnumData({ |
| | | EnumName: 'PlaceStatusEnum', |
| | | }) |
| | | enumOptions.placeStatus = placeStatusData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | |
| | | // è·åéè´ç±»åæä¸¾ |
| | | const containerStatusData = await getWmsEnumData({ |
| | | const containerStatusEnumData = await getWmsEnumData({ |
| | | EnumName: 'ContainerStatusEnum', |
| | | }) |
| | | enumOptions.containerStatus = containerStatusData.map((item) => ({ |
| | | enumOptions.containerStatus = containerStatusEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | |
| | | const yesNoData = await getWmsEnumData({ |
| | | const containerTypeEnumData = await getWmsEnumData({ |
| | | EnumName: 'ContainerTypeEnum', |
| | | }) |
| | | enumOptions.containerType = containerTypeEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | const placeStatusEnumData = await getWmsEnumData({ |
| | | EnumName: 'PlaceStatusEnum', |
| | | }) |
| | | enumOptions.placeStatus = placeStatusEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | const placeTypeEnumData = await getWmsEnumData({ |
| | | EnumName: 'PlaceTypeEnum', |
| | | }) |
| | | enumOptions.storageTypeNo = placeTypeEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | const materialCheckStatusEnumData = await getWmsEnumData({ |
| | | EnumName: 'MaterialCheckStatusEnum', |
| | | }) |
| | | enumOptions.checkStatus = materialCheckStatusEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | const yesNoEnumData = await getWmsEnumData({ |
| | | EnumName: 'YesNoEnum', |
| | | }) |
| | | enumOptions.yesOrNo = yesNoData.map((item) => ({ |
| | | enumOptions.isLock = yesNoEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | enumOptions.emptyContainer = yesNoEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | |
| | | // ç»ä»¶æè½½æ¶è·åæä¸¾æ°æ® |
| | | onMounted(() => { |
| | | fetchEnumData() |
| | | handleQuery() |
| | | handleQueryForMain() |
| | | }) |
| | | |
| | | // æ°å¢çæ¥è¯¢æ¹æ³ |
| | | const handleQuery = async () => { |
| | | console.log('æ¥è¯¢æ¡ä»¶:', queryParams.value) |
| | | // tableRef.value.getTableList() |
| | | tableRef.value.getList(queryParams.value) |
| | | // å®ä¹ååºå¼æ¥è¯¢æ°æ® |
| | | const _curHighQueryData = ref({ |
| | | searchVal: '', |
| | | str_searchFormInputAttrs: [], |
| | | }) |
| | | // æ°ççæ¥è¯¢æ¹æ³ï¼ä¸»é¡µé¢ä¸çæé®ãæ¥è¯¢ãï¼ |
| | | const handleQueryForMain = async () => { |
| | | _curHighQueryData.value.searchVal = queryForm.value.searchVal |
| | | _curHighQueryData.value.str_searchFormInputAttrs = |
| | | _searchFormInputAttrs.value |
| | | tableRef.value.getList(_curHighQueryData.value) |
| | | } |
| | | // æ°ççæ¥è¯¢æ¹æ³ï¼é«çº§æ¥è¯¢ä¸çæé®ãæ¥è¯¢ãï¼ |
| | | const handleQuery = async (extraParams = {}) => { |
| | | let filteredData = commonGetHighQueryForm(extraParams) |
| | | commonSaveCurHighQueryData(filteredData) |
| | | tableRef.value.getList(filteredData) |
| | | } |
| | | // æ°ççæ¥è¯¢éç½® |
| | | const resetQuery = () => { |
| | | queryForm.value.searchVal = '' |
| | | queryForm.value.str_searchFormInputAttrs = _searchFormInputAttrs.value |
| | | } |
| | | //æ°ççå¯¼åºæ¹æ³ |
| | | const handleExport = () => { |
| | | onExport(_curHighQueryData.value) |
| | | } |
| | | // æ°ççæ¥è¯¢å¼¹åºæ¡å
³éæ¹æ³ |
| | | const closeQuery = (extraParams = {}) => { |
| | | let filteredData = commonGetHighQueryForm(extraParams) |
| | | console.log('closeQueryæ¹æ³') |
| | | console.log(filteredData) |
| | | commonSaveCurHighQueryData(filteredData) |
| | | } |
| | | //ä¿åæ¥è¯¢å¼ |
| | | const commonSaveCurHighQueryData = (filteredData = {}) => { |
| | | _curHighQueryData.value = { ..._curHighQueryData.value, ...filteredData } |
| | | _curHighQueryData.value.searchVal = queryForm.value.searchVal |
| | | _curHighQueryData.value.str_searchFormInputAttrs = |
| | | _searchFormInputAttrs.value |
| | | } |
| | | //è·åé«çº§æ¥è¯¢å¼¹åºæ¡çæ¥è¯¢å¼ |
| | | const commonGetHighQueryForm = (extraParams = {}) => { |
| | | // è¿æ»¤æ undefined çå¼ |
| | | let filteredData = Object.assign( |
| | | {}, |
| | | ...Object.entries(extraParams).map(([key, value]) => |
| | | value !== undefined ? { [key]: value } : {} |
| | | ) |
| | | ) |
| | | //ç»åæ¨¡ç³æ¥è¯¢ |
| | | filteredData.searchVal = queryForm.value.searchVal |
| | | filteredData.str_searchFormInputAttrs = _searchFormInputAttrs.value |
| | | return filteredData |
| | | } |
| | | |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | const resetQuery = () => { |
| | | queryForm.value = { |
| | | containerNo: '', |
| | | materialNo: '', |
| | | materialName: '', |
| | | containerType: '', |
| | | containerStatus: '', |
| | | storageTypeNo: 1, |
| | | placeStatus: '', |
| | | placeNo: '', |
| | | isLock: '', |
| | | emptyContainer: '', |
| | | dateRange: [], |
| | | filter: '', |
| | | } |
| | | } |
| | | /** |
| | | * @returns è¡¨æ ¼ |
| | | */ |
| | |
| | | params, |
| | | autoHeight, |
| | | } = props |
| | | props.params = { |
| | | ...queryParams.value, |
| | | ...params, |
| | | } |
| | | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.wmsMaterialStockList]: true, |
| | | [styles.wmsMaterialStockDetailList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/HIAWms/wmsMaterialStock/{id}/adjustsort/{sort}" |
| | | sortUrlTpl="/api/v1/HIAWms/wmsMaterialStockDetail/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | |
| | | <div> |
| | | {row.inStockTime != null |
| | | ? dayjs(row.inStockTime).format('YYYY-MM-DD HH:mm:ss') |
| | | : '-'} |
| | | </div> |
| | | ) |
| | | }, |
| | | isDisabled: ({ row }: any) => { |
| | | return ( |
| | | <div> |
| | | {row.isDisabled != null |
| | | ? row.isDisabled |
| | | ? 'æ¯' |
| | | : 'å¦' |
| | | : '-'} |
| | | </div> |
| | | ) |
| | | }, |
| | | creationTime: ({ row }: any) => { |
| | | return ( |
| | | <div> |
| | | {row.creationTime != null |
| | | ? dayjs(row.creationTime).format('YYYY-MM-DD HH:mm:ss') |
| | | : '-'} |
| | | </div> |
| | | ) |
| | | }, |
| | | lastModificationTime: ({ row }: any) => { |
| | | return ( |
| | | <div> |
| | | {row.lastModificationTime != null |
| | | ? dayjs(row.lastModificationTime).format( |
| | | 'YYYY-MM-DD HH:mm:ss' |
| | | ) |
| | | : '-'} |
| | | </div> |
| | | ) |
| | | }, |
| | | isDeleted: ({ row }: any) => { |
| | | return ( |
| | | <div> |
| | | {row.isDeleted != null |
| | | ? row.isDeleted |
| | | ? 'æ¯' |
| | | : 'å¦' |
| | | : '-'} |
| | | </div> |
| | | ) |
| | | }, |
| | | deletionTime: ({ row }: any) => { |
| | | return ( |
| | | <div> |
| | | {row.deletionTime != null |
| | | ? dayjs(row.deletionTime).format('YYYY-MM-DD HH:mm:ss') |
| | | : '-'} |
| | | </div> |
| | | ) |
| | |
| | | </div> |
| | | ) |
| | | } |
| | | |
| | | return () => { |
| | | return ( |
| | | <div class={styles.wmsMaterialStockContent}> |
| | | {/* æ·»å /ç¼è¾ */} |
| | | <WmsMaterialStockDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWmsMaterialStock} |
| | | /> |
| | | <div class={styles.wmsMaterialStockDetailContent}> |
| | | {/* é«çº§æ¥è¯¢ */} |
| | | {/* <WmsMaterialStockDetailDrawer |
| | | ref="wmsTaskQueryDrawerRef" |
| | | <WmsMaterialStockDetailQueryDrawer |
| | | ref="wmsMaterialStockDetailQueryDrawerRef" |
| | | v-model={dialogConfigForQuery.visible} |
| | | title={dialogConfigForQuery.title} |
| | | row={current.value} |
| | |
| | | onConfirmQuery={handleQuery} |
| | | onRestQuery={resetQuery} |
| | | onClose={closeQuery} |
| | | /> */} |
| | | /> |
| | | |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="wmsMaterialStock-add" |
| | | icon="add-p" |
| | | onClick={onAddWmsMaterialStock} |
| | | type="primary" |
| | | > |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="wmsMaterialStock-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | | onError={onError} |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/HIAWms/wmsMaterialStock/import" |
| | | > |
| | | <IconButton icon="in">导å
¥</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="wmsMaterialStock-output" |
| | | v-permission="wmsMaterialStockDetail-output" |
| | | icon="out" |
| | | onClick={onExport} |
| | | > |
| | | å¯¼åº |
| | | </IconButton> |
| | | </div> |
| | | {/* <Search |
| | | placeholder="请è¾å
¥å
³é®å" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> */} |
| | | <ElFormItem style={{ marginTop: '15px' }}> |
| | | <ElFormItem label="å
³é®å"> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | content={searchFormInputAttrs_Placeholder.value} |
| | | placement="top-start" |
| | | > |
| | | <ElInput |
| | | v-model={queryForm.value.searchVal} |
| | | placeholder={searchFormInputAttrs_Placeholder.value} |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </el-tooltip> |
| | | </ElFormItem> |
| | | <IconButton |
| | | type="primary" |
| | | icon="search" |
| | | onClick={handleQueryForMain} |
| | | > |
| | | æ¥è¯¢ |
| | | </IconButton> |
| | | {/* <IconButton style="" icon="refresh" onClick={resetQuery}> |
| | | éç½® |
| | | </IconButton> */} |
| | | <IconButton |
| | | v-permission="wmsMaterialStockDetail-hightQuery" |
| | | icon="search" |
| | | onClick={onAdvancedQuery} |
| | | type="primary" |
| | | > |
| | | é«çº§æ¥è¯¢ |
| | | </IconButton> |
| | | </ElFormItem> |
| | | </div> |
| | | |
| | | <RenderBaseTable |
| | | url="/api/v1/HIAWms/wmsMaterialStock" |
| | | url="/api/v1/HIAWms/wmsMaterialStock/StockDetail" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | |
| | | 'wmsMaterialStock-add': 'å表-æ·»å ', |
| | | 'wmsMaterialStock-import': 'å表-导å
¥', |
| | | 'wmsMaterialStock-output': 'å表-è¾åº', |
| | | |
| | | 'wmsMaterialStockDetail-hightQuery': 'å表-é«çº§æ¥è¯¢', |
| | | 'wmsMaterialStockDetail-query': 'å表-æ¥è¯¢', |
| | | 'wmsMaterialStockDetail-output': 'å表-导åº', |
| | | } |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsArea, |
| | | getWmsArea, |
| | | updateWmsArea, |
| | | } from './Service/WmsAreaDrawer' |
| | | import { addWmsArea, getWmsArea, updateWmsArea } from './Service/WmsAreaDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WmsAreaDrawer extends Base<{ [key: string]: any }> { |
| | |
| | | /// <summary> |
| | | /// åºä½ç±»åç¼å· |
| | | /// </summary> |
| | | public PlaceTypeEnum? StorageTypeNo { get; set; } |
| | | public PlaceTypeEnum? StorageTypeNo { get; set; } = PlaceTypeEnum.YUANLIAOKUWEI; |
| | | |
| | | /// <summary> |
| | | /// åºåç¼å· |
| | |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("StockDetail")] |
| | | public async Task<PagedResultDto<WmsMaterialStockDto>> GetStockDetailAsync(GetWmsMaterialStocksInput input) |
| | | public async Task<PagedResultDto<WmsMaterialStockDto>> GetStockDetailAsync([FromQuery]GetWmsMaterialStocksInput input) |
| | | { |
| | | return await _wmsmaterialstockAppService.GetStockDetailAsync(input); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | [表å]:scms_wmsmaterialstocks |
| | | [å®ä½ç±»å]:WmsMaterialStock |
| | | [å®ä½ç±»å¯¹è±¡å]:WmsMaterialStock |
| | | [页é¢èåå]:åºå详æ
|
| | | [页é¢èå对象缩å]:wmsMaterialStockDetail |
| | | [表çä¸ææ³¨è§£]:åºå
¥åºåæ®è¯¦æ
|
| | | [é夿§æ ¡éªå段]:MaterialId |
| | | [å é¤æç¤ºåæ®µ]:MaterialId |
| | | [æ¨¡ç³æ¥è¯¢å段]:'OrderNo', 'MaterialNo', 'MaterialId' |
| | | [æ¨¡ç³æ¥è¯¢å段å]:请è¾å
¥åæ®å·/ç©æç¼å·/ç©æID |
| | | [项ç®å½å空é´]:HIAWms |
| | | [æä¸¾ç±»ååæ®µéå]:ContainerStatus,ContainerStatusEnum&ContainerType,ContainerTypeEnum&PlaceStatus,PlaceStatusEnum&StorageTypeNo,PlaceTypeEnum&CheckStatus,MaterialCheckStatusEnum&IsLock,YesNoEnum&EmptyContainer,YesNoEnum |
| | | [åç«¯æ ¹æä»¶å¤¹åç§°]:web |
| | | [æåº]:CreationTime |