✨ feat(mes): 新增采购入库单编码常量及生成逻辑
parent
cc640d8801
commit
526879fa60
|
|
@ -419,6 +419,7 @@ export const MesAutoCodeRuleCode = {
|
||||||
MD_WORKSTATION_CODE: 'MD_WORKSTATION_CODE', // 工作站编码
|
MD_WORKSTATION_CODE: 'MD_WORKSTATION_CODE', // 工作站编码
|
||||||
TM_TOOL_CODE: 'TM_TOOL_CODE', // 工具编码
|
TM_TOOL_CODE: 'TM_TOOL_CODE', // 工具编码
|
||||||
TM_TOOL_TYPE_CODE: 'TM_TOOL_TYPE_CODE', // 工具类型编码
|
TM_TOOL_TYPE_CODE: 'TM_TOOL_TYPE_CODE', // 工具类型编码
|
||||||
|
WM_ITEM_RECEIPT_CODE: 'WM_ITEM_RECEIPT_CODE', // 采购入库单编码
|
||||||
WM_SN_CODE: 'WM_SN_CODE', // SN 码
|
WM_SN_CODE: 'WM_SN_CODE', // SN 码
|
||||||
WM_PACKAGE_CODE: 'WM_PACKAGE_CODE', // 装箱单编码
|
WM_PACKAGE_CODE: 'WM_PACKAGE_CODE', // 装箱单编码
|
||||||
WM_BATCH_CODE: 'WM_BATCH_CODE', // 批次编码
|
WM_BATCH_CODE: 'WM_BATCH_CODE', // 批次编码
|
||||||
|
|
|
||||||
|
|
@ -98,12 +98,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { generateRandomStr } from '@/utils'
|
|
||||||
import { WmItemReceiptApi, WmItemReceiptVO } from '@/api/mes/wm/itemreceipt'
|
import { WmItemReceiptApi, WmItemReceiptVO } from '@/api/mes/wm/itemreceipt'
|
||||||
|
import { AutoCodeRecordApi } from '@/api/mes/md/autocode/record'
|
||||||
import MdVendorSelect from '@/views/mes/md/vendor/components/MdVendorSelect.vue'
|
import MdVendorSelect from '@/views/mes/md/vendor/components/MdVendorSelect.vue'
|
||||||
import WmArrivalNoticeSelect from '@/views/mes/wm/arrivalnotice/components/WmArrivalNoticeSelect.vue'
|
import WmArrivalNoticeSelect from '@/views/mes/wm/arrivalnotice/components/WmArrivalNoticeSelect.vue'
|
||||||
import ItemReceiptLineList from './ItemReceiptLineList.vue'
|
import ItemReceiptLineList from './ItemReceiptLineList.vue'
|
||||||
import { MesWmArrivalNoticeStatusEnum } from '@/views/mes/utils/constants'
|
import { MesAutoCodeRuleCode, MesWmArrivalNoticeStatusEnum } from '@/views/mes/utils/constants'
|
||||||
|
|
||||||
defineOptions({ name: 'ItemReceiptForm' })
|
defineOptions({ name: 'ItemReceiptForm' })
|
||||||
|
|
||||||
|
|
@ -143,8 +143,8 @@ const dialogTitle = computed(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 生成入库单编号 */
|
/** 生成入库单编号 */
|
||||||
const generateCode = () => {
|
const generateCode = async () => {
|
||||||
formData.value.code = 'IR' + generateRandomStr(10)
|
formData.value.code = await AutoCodeRecordApi.generateAutoCode(MesAutoCodeRuleCode.WM_ITEM_RECEIPT_CODE)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 到货通知单变化时,自动填充供应商 */
|
/** 到货通知单变化时,自动填充供应商 */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue