feat(storegoods): 新增加工进仓模块并适配智盛ERP
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -69,8 +69,8 @@ export const BILL_TYPES = [
|
||||
/** 列表分页拉取每页条数 */
|
||||
export const LIST_PAGE_SIZE = 100;
|
||||
|
||||
/** 往来单位类型:织厂(接收单位下拉筛选) */
|
||||
export const BUSINESS_UNIT_TYPE_KNITTING_FACTORY = 11;
|
||||
/** 往来单位类型:染厂(染厂下拉筛选) */
|
||||
export const BUSINESS_UNIT_TYPE_DYE_FACTORY = 12;
|
||||
|
||||
export function getStatusOptions() {
|
||||
return Object.keys(AUDIT_STATUS_MAP).map((value) => ({
|
||||
@@ -157,13 +157,12 @@ export const SCAN_DETAIL_TABLE_COLUMNS = [
|
||||
{ label: '重量', key: 'weight', width: 100 },
|
||||
];
|
||||
|
||||
/** 扫码详情区汇总维度(勾选后参与表格分组;带 lock 的维度会随扫码请求传给后端) */
|
||||
/** 扫码详情区可勾选锁定维度(对应 PDAScanGfmOtherDeliveryOrderParam 的 *_lock;勾选后参与表格分组并随扫码请求传给后端) */
|
||||
export const SCAN_GROUP_OPTIONS = [
|
||||
{ key: 'produce_order_no', label: '合同' },
|
||||
{ key: 'grey_fabric_code', label: '布编' },
|
||||
{ key: 'yarn_batch', label: '纱批' },
|
||||
{ key: 'machine_number', label: '机号' },
|
||||
{ key: 'volume_number', label: '布号' },
|
||||
{ key: 'grey_fabric_level_name', label: '等级' },
|
||||
];
|
||||
|
||||
@@ -176,6 +175,32 @@ export const SCAN_MERGE_FIELD_MAP = {
|
||||
grey_fabric_level_name: 'grey_fabric_level_id_lock',
|
||||
};
|
||||
|
||||
/** 扫码锁定维度不匹配时的语音文案(按匹配优先级排列) */
|
||||
const SCAN_MISMATCH_VOICE_RULES = [
|
||||
{ patterns: ['机台', '机号', 'machine_number'], voice: '机台不同' },
|
||||
{ patterns: ['纱批', 'yarn_batch'], voice: '纱批不同' },
|
||||
{ patterns: ['合同号', '合同', '生产通知单', 'produce_order'], voice: '合同号不同' },
|
||||
{ patterns: ['布编', 'grey_fabric_code'], voice: '布编不同' },
|
||||
{ patterns: ['等级', 'grey_fabric_level', 'level'], voice: '等级不同' },
|
||||
];
|
||||
|
||||
/**
|
||||
* 根据后端错误信息解析锁定维度不匹配的播报文案
|
||||
* @param {string} message
|
||||
* @returns {string} 如「机台不同」;无法识别则返回空串
|
||||
*/
|
||||
export function resolveScanMismatchVoice(message) {
|
||||
const msg = String(message || '');
|
||||
if (!msg) return '';
|
||||
for (let i = 0; i < SCAN_MISMATCH_VOICE_RULES.length; i++) {
|
||||
const rule = SCAN_MISMATCH_VOICE_RULES[i];
|
||||
if (rule.patterns.some((p) => msg.indexOf(p) !== -1)) {
|
||||
return rule.voice;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/** 构建扫码新增/删除请求参数(勾选锁定维度时附带当前详情区字段值) */
|
||||
export function buildScanUpdateParams({ id, scanCode, scanType, groupKeys = [], detail = {} }) {
|
||||
const params = {
|
||||
|
||||
Reference in New Issue
Block a user