From aece48b253b2e0b814bbdf5ee3d474e8cf697122 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 18 十二月 2025 16:39:48 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/sd/basicData/CreateBasicData.vue |   40 ++++++++++++++++++++++++++++++++++++----
 1 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/sd/basicData/CreateBasicData.vue b/north-glass-erp/northglass-erp/src/views/sd/basicData/CreateBasicData.vue
index c718f49..0fe60ae 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/basicData/CreateBasicData.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/basicData/CreateBasicData.vue
@@ -15,7 +15,8 @@
 let basic = ref({
   basicType : ['',''],
   input:'',
-  nickname:null
+  nickname:null,
+  sort:''
 })
 let options=ref([
   { "label": t('orderBasicData.order'),
@@ -44,6 +45,10 @@
       {
         "label": t('orderBasicData.saleMan'),
         "value": "saleMan"
+      },
+      {
+        "label": t('order.edgingType'),
+        "value": "edgingType"
       }
     ]
   },
@@ -133,12 +138,21 @@
     basic.value.basicType[1] =  props.rowIndex.basicCategory
     if(basic.value.basicType[1]==="icon"){
       basic.value.input =  props.rowIndex.basicName
-      basic.value.nickname =  JSON.parse(props.rowIndex.nickname).data
-      iconWidth.value=JSON.parse(props.rowIndex.nickname).width
-      iconHeight.value=JSON.parse(props.rowIndex.nickname).height
+      if(props.rowIndex.nickname!=null){
+        basic.value.nickname =  JSON.parse(props.rowIndex.nickname).data
+        iconWidth.value=JSON.parse(props.rowIndex.nickname).width
+        iconHeight.value=JSON.parse(props.rowIndex.nickname).height
+      }else{
+        basic.value.nickname =  null
+        iconWidth.value=null
+        iconHeight.value=null
+      }
+      basic.value.sort = props.rowIndex.sort
+
     }else{
       basic.value.input =  props.rowIndex.basicName
       basic.value.nickname =  props.rowIndex.nickname
+      basic.value.sort = props.rowIndex.sort
     }
 
   }
@@ -152,6 +166,11 @@
     }
   }
   if(basic.value.basicType[1]==="icon"){
+    const regex = /^(?:\d+|\d+\.\d)$/
+    if (!regex.test(iconWidth.value)||!regex.test(iconHeight.value) ) {
+      ElMessage.warning(t('basicData.msg.greater0Sec1'))
+      return
+    }
     let nickname=basic.value.nickname
     let data={
       width: iconWidth.value,
@@ -175,6 +194,11 @@
     }
   }
   if(basic.value.basicType[1]==="icon"){
+    const regex = /^(?:\d+|\d+\.\d)$/
+    if (!regex.test(iconWidth.value)||!regex.test(iconHeight.value) ) {
+      ElMessage.warning(t('basicData.msg.greater0Sec1'))
+      return
+    }
     let nickname=basic.value.nickname
     let data={
       width: iconWidth.value,
@@ -188,6 +212,8 @@
   submitArr.basicCategory = basic.value.basicType[1]
   submitArr.basicName = basic.value.input.trim()
   submitArr.nickname = basic.value.nickname
+  submitArr.sort = basic.value.sort
+
   request.post(`/basicData/updateBasicData`, submitArr).then(res => {
     if (res.data) {
       ElMessage.success(t('basicData.msg.saveSuccess'))
@@ -299,6 +325,12 @@
         </el-upload>
       </el-col>
     </el-row>
+    <el-row v-show="props.rowIndex">
+      <el-col :span="4">{{ $t('processCard.sorting') }}:</el-col>
+      <el-col :span="12">
+        <el-input type="number" v-model="basic.sort"/>
+      </el-col>
+    </el-row>
     <el-row>
       <el-col :span="4"></el-col>
       <el-col :span="12">

--
Gitblit v1.8.0