feat(mes): 新增发货通知单编码和删除明细逻辑校验

pull/871/MERGE
YunaiV 2026-03-30 15:18:32 +08:00
parent 79d63523fe
commit d8dbbf156e
2 changed files with 7 additions and 3 deletions

View File

@ -425,6 +425,7 @@ export const MesAutoCodeRuleCode = {
WM_PRODUCT_ISSUE_CODE: 'WM_PRODUCT_ISSUE_CODE', // 生产领料出库单编码
WM_RETURN_ISSUE_CODE: 'WM_RETURN_ISSUE_CODE', // 生产退料单编码
PRODUCTRECPT_CODE: 'PRODUCTRECPT_CODE', // 产品入库单编码
WM_SALES_NOTICE_CODE: 'WM_SALES_NOTICE_CODE', // 发货通知单编码
WM_SN_CODE: 'WM_SN_CODE', // SN 码
WM_PACKAGE_CODE: 'WM_PACKAGE_CODE', // 装箱单编码
WM_BATCH_CODE: 'WM_BATCH_CODE', // 批次编码

View File

@ -89,10 +89,11 @@
</template>
<script setup lang="ts">
import { generateRandomStr } from '@/utils'
import { WmSalesNoticeApi, WmSalesNoticeVO } from '@/api/mes/wm/salesnotice'
import { AutoCodeRecordApi } from '@/api/mes/md/autocode/record'
import SalesNoticeLineList from './SalesNoticeLineList.vue'
import MdClientSelect from '@/views/mes/md/client/components/MdClientSelect.vue'
import { MesAutoCodeRuleCode } from '@/views/mes/utils/constants'
defineOptions({ name: 'SalesNoticeForm' })
@ -132,8 +133,10 @@ const formRules = reactive({
const formRef = ref()
/** 生成通知单编号 */
const generateCode = () => {
formData.value.noticeCode = 'SN' + generateRandomStr(10)
const generateCode = async () => {
formData.value.noticeCode = await AutoCodeRecordApi.generateAutoCode(
MesAutoCodeRuleCode.WM_SALES_NOTICE_CODE
)
}
/** 打开弹窗 */