From 5df5dba2a321098fd0fc7e18b71549f5c2312049 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期二, 27 八月 2024 17:19:13 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue |  162 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 121 insertions(+), 41 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue b/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
index f57eae1..294fc0a 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
@@ -6,13 +6,15 @@
 import {changeFilterEvent,filterChanged} from "@/hook"
 import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"
 import {useI18n} from "vue-i18n"
-import {Flag, Location} from "@element-plus/icons-vue";
+import companyInfo from "@/stores/sd/companyInfo";
 const { t } = useI18n()
 
 const router = useRouter()
 const route = useRoute()
 let dialogTableVisible = ref(false)
 let craftVisible = ref(false)
+const iconNickname = ref()
+const company = companyInfo()
 const xGrid = ref()
 const trademarkLocation=ref([t('craft.upperLeft'),t('craft.upperRight'),t('craft.lowLeft'),t('craft.lowRight')])
 const gridOptions = reactive({
@@ -22,16 +24,18 @@
   align: 'center',//鏂囧瓧灞呬腑
   stripe:true,//鏂戦┈绾规ゼ鍙�
   rowConfig: {isCurrent: true, isHover: true,height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
-  id: 'OrderList',
+  id: 'updateOrderCraft',
   printConfig: {},
   importConfig: {},
   exportConfig: {},
   scrollY:{ enabled: true,gt:13 },//寮�鍚櫄鎷熸粴鍔�
+  scrollX:{ enabled: true,gt:7 },//寮�鍚櫄鎷熸粴鍔�
   showOverflow:true,
   columnConfig: {
     resizable: true,
     useKey: true
   },
+  mouseConfig:{selected: true},
   filterConfig: {   //绛涢�夐厤缃」
    // remote: true
   },
@@ -39,16 +43,16 @@
     storage: true
   },
   editConfig: {
-    trigger: 'click',
-    mode: 'row',
+    trigger: 'dblclick',
+    mode: 'cell',
     showStatus: true
   },//琛ㄥご鍙傛暟
   columns:[
     {title: t('basicData.operate'), width: 220, slots: { default: 'button_slot' },fixed:"left",},
     {field: 'orderNumber',fixed:"left",width:120,  title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
-    {field: 'orderDetail.productId',fixed:"left",width:120,  title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+    {field: 'orderDetail.productId',fixed:"left",width:120,  title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
     {field: 'orderDetail.productName',fixed:"left",width:120,  title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
-    {field: 'technologyNumber',width:120,  title: t('craft.glassAddress'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
+    {field: 'technologyNumber',width:120, fixed:"left", title: t('craft.glassAddress'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
     {field: 'glassChild',width:120,  title: t('craft.glassChild'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
     {field: 'orderDetail.width',width:120,  title: t('craft.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
     {field: 'orderDetail.height',width:120,  title: t('craft.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
@@ -56,6 +60,7 @@
     {field: 'totalArea',width:120,  title: t('craft.totalArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
     {field: 'childWidth',width:120,  title: t('craft.childWidth'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
     {field: 'childHeight',width:120,  title: t('craft.childHeight'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
+    {field: 'arc',width:120,  title: t('craft.arc'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
     {field: 'area',width:120,  title: t('craft.area'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
     {field: 'orderDetail.quantity',width:120,  title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
     {field: 'process',width:120,  title: t('craft.process'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
@@ -80,7 +85,8 @@
             { code: 'copyChecked', name: t('basicData.selectSame'), prefixIcon: 'vxe-icon-copy', visible: true, disabled: false },
             { code: 'copyAll', name: t('basicData.sameAfterwards'), prefixIcon: 'vxe-icon-feedback', visible: true, disabled: false },
             { code: 'clearChecked', name: t('basicData.clearSelection'), prefixIcon: 'vxe-icon-indicator', visible: true, disabled: false },
-            { code: 'computedSize', name: '绉戝璁℃暟', prefixIcon: 'vxe-icon-chart-line', visible: true, disabled: false },
+            { code: 'computedSize', name: t('basicData.computedSize'), prefixIcon: 'vxe-icon-chart-line', visible: true, disabled: false },
+            { code: 'paste', name: t('basicData.paste'), prefixIcon: 'vxe-icon-paste', visible: true, disabled: false },
           ]
       ]
     }
@@ -92,7 +98,7 @@
       {'code': 'review', 'name': t('basicData.review'),status: 'primary'},
     ],
     // import: false,
-    // export: true,
+     export: true,
     // print: true,
     zoom: true,
     custom: true
@@ -125,7 +131,7 @@
       }
     }
   },
-  menuClick ({ menu, row, column }) {
+  async menuClick ({ menu, row, column }) {
     const $grid = xGrid.value
     if ($grid) {
       switch (menu.code) {
@@ -191,6 +197,37 @@
           }
           break
         }
+        case 'paste' :{
+          if(xGrid.value.getSelectedCell()===null){
+            return
+          }
+          if(xGrid.value.getSelectedCell().column.editRender===undefined){
+            return
+          }
+          const flag = xGrid.value.getSelectedCell()['_rowIndex']
+          const column =xGrid.value.getSelectedCell().column.field
+          ElMessageBox.prompt()
+              .then(({ value }) => {
+                let text = value
+                text = text.split(' ')
+                if(text===null){
+                  return
+                }
+
+                const data = xGrid.value.getTableData().visibleData
+                //let i = 0
+                for (let i=0; i<text.length; i++)  {
+                  if(i+flag>=data.length){
+                    return
+                  }
+                  data[i+flag][column] = text[i]
+                }
+              })
+
+
+
+          break
+        }
       }
     }
   }
@@ -247,6 +284,10 @@
 request.get(`/basicData/BasicDataByType/order/icon`).then((res) =>{
   if (res.code==200){
     trademarkList.value = res.data
+    trademarkList.value.forEach(item =>{
+      item.basicName
+    })
+
   }
 })
 
@@ -286,6 +327,11 @@
   if(row.icon!=null){
     trademarkAttr.value = JSON.parse(row.icon)
   }
+  trademarkList.value.forEach(item =>{
+    if(item.basicName===trademarkAttr.value.trademark){
+      iconNickname.value=item.nickname
+    }
+  })
 
   rowIndex.value = row
 }
@@ -328,6 +374,7 @@
   request.post(`/order/getOrderCraftById/${str}`).then((res) => {
     if(res.code==200){
       titleUploadData.value = res.data.order
+      console.log(res.data.orderGlassDetails)
 
       //鍙栨秷瀹℃牳鎸夐挳绂佺敤
       if(res.data.order.processReview === 2 ){
@@ -381,6 +428,22 @@
   }
 }
 
+const iconChange = () => {
+  trademarkList.value.forEach(item =>{
+    if(item.basicName===trademarkAttr.value.trademark){
+      iconNickname.value=item.nickname
+    }
+  })
+  if(trademarkAttr.value.trademark===company.icon){
+    trademarkAttr.value.yMargin=66
+  }
+
+}
+
+let enlargementFlag = ref(false)
+const trademarkenlargement = () => {
+  enlargementFlag.value = !enlargementFlag.value
+}
 
 
 </script>
@@ -502,8 +565,7 @@
         <el-row style="">
           <el-col :span="4">{{$t('craft.TrademarkOptions')}}:</el-col>
           <el-col :span="6">
-            <el-select v-model="trademarkAttr.trademark"
-                        >
+            <el-select v-model="trademarkAttr.trademark" @change ="iconChange" filterable>
               <el-option :value="item.basicName" v-for="item in trademarkList" />
             </el-select>
           </el-col>
@@ -513,8 +575,8 @@
           <el-col :span="4">{{$t('craft.xImage')}}:</el-col>
           <el-col :span="6">
             <el-select v-model="trademarkAttr.xImage">
-              <el-option :value="true" :label="'鏄�'"/>
-              <el-option :value="false" :label="'鍚�'"/>
+              <el-option :value="true" :label="$t('basicData.true')"/>
+              <el-option :value="false" :label="$t('basicData.false')"/>
             </el-select>
           </el-col>
         </el-row>
@@ -523,8 +585,8 @@
           <el-col :span="4">{{$t('craft.yImage')}}:</el-col>
           <el-col :span="6">
             <el-select v-model="trademarkAttr.yImage">
-              <el-option :value="true" :label="'鏄�'"/>
-              <el-option :value="false" :label="'鍚�'"/>
+              <el-option :value="true" :label="$t('basicData.true')"/>
+              <el-option :value="false" :label="$t('basicData.false')"/>
             </el-select>
           </el-col>
         </el-row>
@@ -533,8 +595,8 @@
           <el-col :span="4">{{$t('craft.tag')}}:</el-col>
           <el-col :span="6">
             <el-select v-model="trademarkAttr.tag">
-              <el-option :value="true" :label="'鏄�'"/>
-              <el-option :value="false" :label="'鍚�'"/>
+              <el-option :value="true" :label="$t('basicData.true')"/>
+              <el-option :value="false" :label="$t('basicData.false')"/>
             </el-select>
           </el-col>
         </el-row>
@@ -543,8 +605,8 @@
           <el-col :span="4">{{$t('craft.tag2')}}:</el-col>
           <el-col :span="6">
             <el-select v-model="trademarkAttr.tag2">
-              <el-option :value="true" :label="'鏄�'"/>
-              <el-option :value="false" :label="'鍚�'"/>
+              <el-option :value="true" :label="$t('basicData.true')"/>
+              <el-option :value="false" :label="$t('basicData.false')"/>
             </el-select>
           </el-col>
         </el-row>
@@ -553,8 +615,8 @@
           <el-col :span="4">{{$t('craft.tag3')}}:</el-col>
           <el-col :span="6">
             <el-select v-model="trademarkAttr.tag3">
-              <el-option :value="true" :label="'鏄�'"/>
-              <el-option :value="false" :label="'鍚�'"/>
+              <el-option :value="true" :label="$t('basicData.true')"/>
+              <el-option :value="false" :label="$t('basicData.false')"/>
             </el-select>
           </el-col>
         </el-row>
@@ -587,14 +649,16 @@
           </el-col>
         </el-row>
       </div>
-      <div style="width: 400px;height: 250px;border: 2px solid #000;float: left;position: relative;">
+      <div v-if="!enlargementFlag" style="width: 400px;height: 250px;border: 2px solid #000;float: left;position: relative;">
         <div
             v-if="tagCheck(t('craft.upperLeft'))"
-            style="float: left;width: 60px;height: 60px;margin-left: 1rem">
-          <el-row>
-            <el-col :span="20"><el-image :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}" src="/trademark.png"/></el-col>
+            style="float: left;width: 50px;height: 90px;margin-left: 1rem;margin-top: 15px">
+          <el-row class="icon">
+            <el-col class="icon" >
+              <el-image @dblclick="trademarkenlargement" style="width: 100%;height: 100%" :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  :src="iconNickname"/>
+            </el-col>
           </el-row>
-          <el-row style="margin-top: -25px" >
+          <el-row  >
             <el-col :span="5" >X:</el-col>
             <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col>
           </el-row>
@@ -606,11 +670,13 @@
 
         <div
             v-if="tagCheck(t('craft.upperRight'))"
-            style="float: right;width: 60px;height: 60px;margin-right: 1rem">
-          <el-row>
-            <el-col :span="20"><el-image  :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}" src="/trademark.png"/></el-col>
+            style="float: right;width: 50px;height: 90px;margin-right: 1rem;margin-top: 15px">
+          <el-row class="icon">
+            <el-col class="icon" >
+              <el-image @dblclick="trademarkenlargement" style="width: 100%;height: 100%" :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  :src="iconNickname"/>
+            </el-col>
           </el-row>
-          <el-row style="margin-top: -25px" >
+          <el-row  >
             <el-col :span="5" >X:</el-col>
             <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col>
           </el-row>
@@ -620,13 +686,12 @@
           </el-row>
         </div>
 
+
         <div
+
             v-if="tagCheck(t('craft.lowLeft'))"
-            style="width: 60px;height: 60px;margin-left: 1rem;float: left;position: absolute;bottom: 15px">
-          <el-row>
-            <el-col :span="20"><el-image :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  src="/trademark.png"/></el-col>
-          </el-row>
-          <el-row style="margin-top: -25px" >
+            style="width: 50px;height: 90px;margin-left: 1rem;float: left;position: absolute;bottom: 15px" >
+          <el-row  >
             <el-col :span="5" >X:</el-col>
             <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col>
           </el-row>
@@ -634,17 +699,19 @@
             <el-col :span="5" >Y:</el-col>
             <el-col :span="2" >{{trademarkAttr.yMargin}}</el-col>
           </el-row>
+          <el-row class="icon">
+            <el-col class="icon" >
+              <el-image @dblclick="trademarkenlargement" style="width: 100%;height: 100%" :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  :src="iconNickname"/>
+            </el-col>
+          </el-row>
+
         </div>
+
 
         <div
             v-if="tagCheck(t('craft.lowRight'))"
-            style="width: 60px;height: 60px;position: absolute;bottom: 15px;right: 1rem">
+            style="width: 50px;height: 90px;position: absolute;bottom: 15px;right: 1rem">
           <el-row>
-            <el-col :span="20">
-              <el-image :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  src="/trademark.png"/>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: -25px">
             <el-col :span="5" >X:</el-col>
             <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col>
           </el-row>
@@ -652,10 +719,19 @@
             <el-col :span="5" >Y:</el-col>
             <el-col :span="2" >{{trademarkAttr.yMargin}}</el-col>
           </el-row>
+          <el-row class="icon">
+            <el-col class="icon">
+              <el-image style="width: 100%;height: 100%"  @dblclick="trademarkenlargement" :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  :src="iconNickname"/>
+            </el-col>
+          </el-row>
+
         </div>
 
 
 
+      </div>
+      <div v-if="enlargementFlag" style="width: 400px;height: 250px;float: left;position: relative;">
+        <el-image  @dblclick="trademarkenlargement" style="z-index: 9999;max-width: 100%;max-height: 100%" :src="iconNickname"/>
       </div>
     </el-dialog>
 
@@ -700,4 +776,8 @@
 .yStyle{
   transform : rotateX(180deg)
 }
+.icon{
+  width: 50px;
+  height: 50px;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0