From 90ef20e23e11803d967582f93f58f0b52cddb3a1 Mon Sep 17 00:00:00 2001 From: gaoluyang <gaoluyang@rengu.cc> Date: 星期二, 23 七月 2024 13:44:36 +0800 Subject: [PATCH] 装备电缆-下单时样品型号根据×位置拼接 --- src/components/do/b1-ins-order/add.vue | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index fb9622e..16b48a1 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -1729,9 +1729,22 @@ str: JSON.stringify({ insOrder: this.addObj, list: JSON.stringify(sampleList.map(a => { - a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? - '' : ( - '-' + a.modelNum)) + if (this.PROJECT === '瑁呭鐢电紗') { + if (a.modelNum) { + const index = a.modelNum.indexOf('脳') + if (index === 0) { + a.model = a.model + a.modelNum + } else if (index === -1) { + a.model = a.model + '-' + a.modelNum + } else { + a.model = a.modelNum + a.model + } + } else { + a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + } + } else { + a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + } a.insProduct = a.insProduct.filter(b=>b.state === 1) return a })), -- Gitblit v1.9.3