From 8a2da056ef899276c163763859b8956be773a26c Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 23 十月 2024 14:06:52 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/router/index.js                                          |    5 
 north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue                     |    8 
 north-glass-erp/northglass-erp/src/views/mm/ingredientStock/CreateOutBound.vue              |    5 
 north-glass-erp/src/main/java/com/example/erp/entity/sd/GlassPriceBasic.java                |   20 ++
 north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPriceList.vue                   |  153 +++++++++++++++++
 north-glass-erp/northglass-erp/src/views/sd/glassPrice/ProductList.vue                      |    9 
 north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialOutbound.vue            |    4 
 north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue                     |    6 
 north-glass-erp/northglass-erp/src/views/sd/glassPrice/ProducePriceCompute.vue              |   50 ++--
 north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPriceSet.vue                    |   12 +
 north-glass-erp/src/main/java/com/example/erp/service/sd/GlassPriceBasicService.java        |  108 ++++++++++++
 north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPrice.vue                       |    1 
 north-glass-erp/northglass-erp/src/views/mm/ingredientStock/SelectIngredientsStock.vue      |    4 
 north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue                     |    4 
 north-glass-erp/src/main/java/com/example/erp/mapper/sd/GlassPriceBasicMapper.java          |    9 +
 north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialStoreService.java          |    4 
 north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue                           |    5 
 north-glass-erp/northglass-erp/src/views/mm/ingredient/CreateIngredients.vue                |    8 
 north-glass-erp/northglass-erp/src/views/mm/ingredientStock/ReturnToStorageCreate.vue       |    5 
 north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java |    2 
 north-glass-erp/northglass-erp/src/views/mm/ingredient/SelectIngredients.vue                |    4 
 north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java      |    8 
 north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue                     |    4 
 north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java               |    4 
 north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java               |    4 
 north-glass-erp/src/main/java/com/example/erp/controller/sd/GlassPriceBasicController.java  |   59 ++++++
 26 files changed, 465 insertions(+), 40 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/router/index.js b/north-glass-erp/northglass-erp/src/router/index.js
index 2361f9a..20a39a7 100644
--- a/north-glass-erp/northglass-erp/src/router/index.js
+++ b/north-glass-erp/northglass-erp/src/router/index.js
@@ -100,6 +100,11 @@
               component: () => import('../views/sd/glassPrice/GlassPriceSet.vue')
             },
             {
+              path: 'glassPriceList',
+              name: 'glassPriceList',
+              component: () => import('../views/sd/glassPrice/GlassPriceList.vue')
+            },
+            {
               name: 'GlassPrice1',
               path: '',
               redirect:'/main/glassPrice/producePriceCompute'
diff --git a/north-glass-erp/northglass-erp/src/views/mm/ingredient/CreateIngredients.vue b/north-glass-erp/northglass-erp/src/views/mm/ingredient/CreateIngredients.vue
index e0e7e70..3903ae2 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/ingredient/CreateIngredients.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/ingredient/CreateIngredients.vue
@@ -10,11 +10,13 @@
 import GlassType from "@/components/sd/product/GlassType.vue"
 import useProductGlassTypeStore from "@/stores/sd/product/productGlassType"
 import {useI18n} from "vue-i18n";
+import useUserInfoStore from "@/stores/userInfo";
 
 const { t } = useI18n()
 const router = useRouter()
 const route = useRoute()
 const value = ref('')
+const userStore = useUserInfoStore()
 const options = [
   {
     value: t('ingredients.originalFilm'),
@@ -107,13 +109,17 @@
       type:value.value,
       json:productName,
       width:BasicData.value[0].Type,
-      height:BasicData.value[1].Type
+      height:BasicData.value[1].Type,
+       userName:userStore.user.userName,
+       userId:userStore.user.userId
     }
   }else if(value.value===t('ingredients.accessories')){
      materialStore={
       id:ruleForm.value.id,
       type:value.value,
       json:productName,
+       userName:userStore.user.userName,
+       userId:userStore.user.userId
     }
   }
 
diff --git a/north-glass-erp/northglass-erp/src/views/mm/ingredient/SelectIngredients.vue b/north-glass-erp/northglass-erp/src/views/mm/ingredient/SelectIngredients.vue
index f92032f..ca99afc 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/ingredient/SelectIngredients.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/ingredient/SelectIngredients.vue
@@ -23,7 +23,9 @@
     }
     case 'delete':{
       let flowData = ref({
-        id: row.id
+        id: row.id,
+        userName:userStore.user.userName,
+        userId:userStore.user.userId
       })
       request.post("/materialStore/deleteMaterialStore",flowData.value).then((res) => {
         if(res.code==200 && res.data==="true"){
diff --git a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/CreateOutBound.vue b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/CreateOutBound.vue
index 79c48b5..1fc4def 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/CreateOutBound.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/CreateOutBound.vue
@@ -313,7 +313,9 @@
           let flowData = ref({
             materialOutboundDetail: selectRecords,
             title: titleUploadData.value,
-            materialOutboundId: route.query.materialOutboundId
+            materialOutboundId: route.query.materialOutboundId,
+            userName:userStore.user.userName,
+            userId:userStore.user.userId
 
           })
           request.post("/materialInventory/saveMaterialOutbound", flowData.value).then((res) => {
@@ -354,6 +356,7 @@
         case 'CounterExamination': {
           let flowData = ref({
             materialOutboundId: route.query.materialOutboundId,
+            reviewed:userStore.user.userName,
             type: 0
 
           })
diff --git a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialOutbound.vue b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialOutbound.vue
index 8fb2f43..c2b2298 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialOutbound.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialOutbound.vue
@@ -35,7 +35,9 @@
     }
     case 'delete':{
       let flowData = ref({
-        materialOutboundId:row.materialOutboundId
+        materialOutboundId:row.materialOutboundId,
+        userName:userStore.user.userName,
+        userId:userStore.user.userId
       })
       request.post("/materialInventory/deleteMaterialOutbound",flowData.value).then((res) => {
         if(res.code==200 && res.data===true){
diff --git a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/ReturnToStorageCreate.vue b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/ReturnToStorageCreate.vue
index e9507bc..b4dfa21 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/ReturnToStorageCreate.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/ReturnToStorageCreate.vue
@@ -338,7 +338,9 @@
           let flowData = ref({
             returningWarehouseDetail: selectRecords,
             title: titleUploadData.value,
-            returningId: route.query.returningId
+            returningId: route.query.returningId,
+            userName:userStore.user.userName,
+            userId:userStore.user.userId
 
           })
           request.post("/materialInventory/saveReturningWarehouse", flowData.value).then((res) => {
@@ -377,6 +379,7 @@
         case 'CounterExamination': {
           let flowData = ref({
             returningId: route.query.returningId,
+            reviewed:userStore.user.userName,
             type: 0
 
           })
diff --git a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/SelectIngredientsStock.vue b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/SelectIngredientsStock.vue
index add65bc..c281202 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/SelectIngredientsStock.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/SelectIngredientsStock.vue
@@ -588,7 +588,9 @@
             totalArea: selectRecords.height*selectRecords.width/100000*titleUploadData.value.inventoryQuantity,
             singlePieceArea: selectRecords.height*selectRecords.width/100000,
             title: titleUploadData.value,
-            materialCode: selectRecords.id
+            materialCode: selectRecords.id,
+            userName:userStore.user.userName,
+            userId:userStore.user.userId
 
           })
 
diff --git a/north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue b/north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue
index 7a2af7b..d072897 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue
@@ -5,12 +5,14 @@
 import {ElMessage} from "element-plus";
 import deepClone from "@/utils/deepClone"
 import { useI18n } from 'vue-i18n'
+import useUserInfoStore from "@/stores/userInfo";
 
 //璇█鑾峰彇
 const { t } = useI18n()
 const router = useRouter()
 const route = useRoute()
 let produceList = ref([])
+const userStore = useUserInfoStore()
 
 
 
@@ -86,7 +88,9 @@
   }*/
 
   let flowData = ref({
-    customer: ruleForm
+    customer: ruleForm,
+    userName:userStore.user.userName,
+    userId:userStore.user.userId
   })
   request.post("/customer/insertCustomer", flowData.value).then((res) => {
     if(res.code==200 && res.data===true){
diff --git a/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue b/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
index 1401b77..4763dc1 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
@@ -43,7 +43,9 @@
       })
       ruleForm.value.id=row.id
       let flowData = ref({
-        customer: ruleForm.value
+        customer: ruleForm.value,
+        userName:userStore.user.userName,
+        userId:userStore.user.userId
       })
 
       request.post("/customer/deleteCustomer", flowData.value).then((res) => {
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
index 8bc84bc..5cd38b6 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
@@ -450,7 +450,9 @@
         case 'toExamine': {
           let flowData = ref({
             deliveryId: route.query.deliveryID,
-            type: 2
+            type: 2,
+            userName:userStore.user.userName,
+            userId:userStore.user.userId
 
           })
           request.post("/delivery/updateDeliveryToExamine", flowData.value).then((res) => {
@@ -472,7 +474,9 @@
         case 'CounterExamination': {
           let flowData = ref({
             deliveryId: route.query.deliveryID,
-            type: 0
+            type: 0,
+            userName:userStore.user.userName,
+            userId:userStore.user.userId
 
           })
           request.post("/delivery/updateDeliveryToExamine", flowData.value).then((res) => {
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
index 97125bc..867f3b9 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -39,7 +39,9 @@
     }
     case 'delete':{
       let flowData = ref({
-        deliveryId:row.deliveryId
+        deliveryId:row.deliveryId,
+        userName:userStore.user.userName,
+        userId:userStore.user.userId
       })
       request.post("/delivery/deleteDelivery",flowData.value).then((res) => {
         if(res.code==200 && res.data===true){
diff --git a/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPrice.vue b/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPrice.vue
index 08c5461..d85183c 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPrice.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPrice.vue
@@ -22,6 +22,7 @@
       <el-breadcrumb :separator-icon="ArrowRight">
         <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/glassPrice/producePriceCompute' }">{{'鐜荤拑鎶ヤ环'}}</el-breadcrumb-item>
         <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/glassPrice/glassPriceSet' }">{{'浠锋牸璁剧疆'}}</el-breadcrumb-item>
+        <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/glassPrice/glassPriceList' }">{{'浠锋牸鍒楄〃'}}</el-breadcrumb-item>
         <!--       <el-breadcrumb-item :to="{ path: '/main/product/test' }">娴嬭瘯</el-breadcrumb-item>-->
         <!--       <el-breadcrumb-item :to="{ path: '/main/product/testSort11' }">娴嬭瘯</el-breadcrumb-item>-->
         <el-breadcrumb-item v-show="false"  />
diff --git a/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPriceList.vue b/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPriceList.vue
new file mode 100644
index 0000000..7952fa3
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPriceList.vue
@@ -0,0 +1,153 @@
+<script setup>
+import {onMounted, reactive, ref} from "vue"
+import {useI18n} from "vue-i18n";
+import {changeFilterEvent, filterChanged} from "@/hook";
+import {useRouter,useRoute} from "vue-router"
+import request from "@/utils/request";
+import {ElMessage, ElMessageBox} from "element-plus";
+const router = useRouter()
+const route = useRoute()
+
+
+const { t } = useI18n()
+const xGrid = ref()
+const gridOptions = reactive({
+  loading:false,
+  showHeaderOverflow: false,
+  showFooterOverflow: false,
+  border:  "full",//琛ㄦ牸鍔犺竟妗�
+  keepSource: true,//淇濇寔婧愭暟鎹�
+  align: 'center',//鏂囧瓧灞呬腑
+  stripe:true,//鏂戦┈绾�
+  rowConfig: {isCurrent: true, isHover: true,height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  //virtualScroll: true, // 寮�鍚櫄鎷熸粴鍔ㄥ姛鑳�
+  id: 'glassPriceList',
+  printConfig: {},
+  importConfig: {},
+  exportConfig: {},
+  showOverflow:true,
+  columnConfig: {
+    resizable: true,
+    useKey: true
+  },
+  filterConfig: {   //绛涢�夐厤缃」
+    //remote: true  //杩滅绛涢��
+  },
+  customConfig: {
+    storage: true
+  },
+  mouseConfig:{selected: true},//榧犳爣閫変腑
+  keyboardConfig:{
+    isArrow: true,
+    isDel: true,
+    isEnter: true,
+    isTab: true,
+    isEdit: true,
+    isChecked: true
+  },
+  editConfig: {
+    trigger: 'dblclick',
+    mode: 'cell',
+    showStatus: true,
+    showIcon:false
+  },//琛ㄥご鍙傛暟
+  columns:[
+    {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left",},
+    {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 },
+    {field: 'type',  title: '绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
+    {field: 'name',  title: '鍚嶇О',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
+    {field: 'price',  title: '浠锋牸' ,editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
+    {field: 'createTime',  title: '鍒涘缓鏃堕棿',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}
+
+  ],
+
+  toolbarConfig: {
+    zoom: true,
+    custom: true
+  }
+
+
+})
+
+onMounted(() => {
+  request.post('/glassPriceBasic/searchGlassPrice').then(res => {
+    xGrid.value.reloadData(res.data)
+  })
+})
+
+const getTableRow =  (row,type) => {
+  switch (type) {
+    case 'edit': {
+      ElMessageBox.prompt( '', {
+        confirmButtonText: t('basicData.save'),
+        cancelButtonText: t('basicData.cancelButtonText'),
+        inputPattern:/^.{1,20}$/,
+        inputErrorMessage: t('components.message')
+      }).then(({ value }) => {
+        alert(value)
+      })
+      break
+    }
+    case 'delete': {
+      request.post(`/glassPriceBasic/deleteGlassPriceById/${row.id}`).then((res) => {
+        if(res.code==200){
+          ElMessage.success(t('searchOrder.msgDeleteSuccess'))
+          router.push({path:'/main/glassPrice/glassPriceList',query:{random:Math.random()}})
+        }else{
+          ElMessage.warning(t('searchOrder.msgDeleteFail'))
+        }
+      })
+      break
+    }
+
+  }
+}
+</script>
+
+<template>
+  <div id="main-div">
+    <vxe-grid
+        height="100%"
+        class="mytable-scrollbar"
+        ref="xGrid"
+        v-bind="gridOptions"
+        v-on="gridEvents"
+    >
+
+      <template #num1_filter="{ column, $panel }">
+        <div>
+          <div v-for="(option, index) in column.filters" :key="index">
+            <input type="text"
+                   v-model="option.data"
+                   @keyup.enter.native="$panel.confirmFilter()"
+                   @input="changeFilterEvent($event, option, $panel)"/>
+          </div>
+        </div>
+      </template>
+
+      <template #button_slot="{ row }">
+        <el-button @click="getTableRow(row,'edit')"
+                   link
+                   type="primary"
+                   size="small">
+          {{ $t('basicData.edit') }}
+        </el-button>
+        <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
+          <template #reference>
+            <el-button  link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
+          </template>
+        </el-popconfirm>
+      </template>
+
+
+    </vxe-grid>
+  </div>
+</template>
+
+<style scoped>
+#main-div{
+  width: 100%;
+  height: 100%;
+}
+
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPriceSet.vue b/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPriceSet.vue
index 85ab2f4..ee980da 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPriceSet.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/glassPrice/GlassPriceSet.vue
@@ -5,6 +5,7 @@
 import {onMounted, ref} from "vue";
 import request from "@/utils/request";
 import {ElMessage} from "element-plus";
+import {useRouter,useRoute} from "vue-router"
 let BasicData = ref({
   stuffColor:null,
   stuffCraft:null,
@@ -25,6 +26,8 @@
 
 })
 let tabsValue = ref(1)
+const router = useRouter()
+const route = useRoute()
 
 onMounted( async () => {
   await request.get(`/basicData/BasicDataByType/product`).then((res) => {
@@ -43,6 +46,15 @@
       return
     }
   }
+
+  request.post(`/glassPriceBasic/save`,value).then((res) => {
+    if(res.code==='200' && res.data===true){
+      ElMessage.success("鏁版嵁淇濆瓨鎴愬姛")
+      router.push({path:'/main/glassPrice/glassPriceList'})
+    }else{
+      ElMessage.warning("姝よ啘绯诲凡缁忓瓨鍦紝璇烽噸鏂伴�夋嫨")
+    }
+  })
 }
 
 </script>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/glassPrice/ProducePriceCompute.vue b/north-glass-erp/northglass-erp/src/views/sd/glassPrice/ProducePriceCompute.vue
index e035132..4b51f7c 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/glassPrice/ProducePriceCompute.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/glassPrice/ProducePriceCompute.vue
@@ -6,6 +6,7 @@
 import {VXETable} from "vxe-table";
 import {ElMessage} from "element-plus";
 import request from "@/utils/request";
+import router from "@/router";
 const { t } = useI18n()
 let dialogVisible = ref(false)
 const xGrid = ref()
@@ -19,31 +20,11 @@
   stripe:true,//鏂戦┈绾�
   rowConfig: {isCurrent: true, isHover: true,height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   //virtualScroll: true, // 寮�鍚櫄鎷熸粴鍔ㄥ姛鑳�
-  id: 'CreateOrder',
+  id: 'CreateOrder123',
   printConfig: {},
   importConfig: {},
   exportConfig: {},
   showOverflow:true,
-  menuConfig: {
-    body: {
-      options: [
-        [
-          { code: 'addRow', name: t('basicData.add'), prefixIcon: 'vxe-icon-square-plus', visible: true, disabled: false },
-          { code: 'deleteRow', name: t('basicData.delete'), prefixIcon: 'vxe-icon-delete', visible: true, disabled: false },
-          { 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: 'computedMoney', name: t('basicData.calculateAmount'), prefixIcon: 'vxe-icon-chart-bar-x', visible: true, disabled: true },
-          { code: 'incrementalAll', name: t('basicData.incrementalAll'), prefixIcon: 'vxe-icon-feedback', visible: true, disabled: false },
-          { code: 'incrementalChecked', name: t('basicData.incrementalChecked'), prefixIcon: 'vxe-icon-copy', visible: true, disabled: false },
-          { code: 'errorArea', name: t('basicData.errorSettlementArea'), prefixIcon: 'vxe-icon-chart-bar-x', visible: true, disabled: false },
-          { code: 'otherMoney', name: t('basicData.otherAmounts'), prefixIcon: 'vxe-icon-chart-bar-x', visible: true, disabled: false },
-          { code: 'sizeCheck', name: t('basicData.sizeReview'), prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false },
-          { code: 'updateOrderId', name: '淇敼璁㈠崟鍙�', prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false }
-        ]
-      ]
-    }
-  },
   columnConfig: {
     resizable: true,
     useKey: true
@@ -84,7 +65,7 @@
   toolbarConfig: {
     buttons: [
       {'code': 'addProducts', 'name': '閫夋嫨浜у搧',disabled: false},
-      {'code': 'saveOrder', 'name': '杞鍗�',status: 'primary',icon: 'vxe-icon-save',disabled: false},
+      {'code': 'reorder', 'name': '杞鍗�',status: 'primary',icon: 'vxe-icon-save',disabled: false},
 
     ],
     zoom: true,
@@ -102,14 +83,35 @@
           dialogVisible.value = true
           break
         }
+        case 'reorder': {
+          if($grid.getTableData().fullData.length === 0){
+            ElMessage.warning("璇峰厛娣诲姞浜у搧")
+            return
+          }
+          router.push({
+            path: '/main/order/createOrder',
+            query:{
+              produceList: JSON.stringify($grid.getTableData().fullData)
+            }
+          })
+          break
+        }
 
       }
     }
   }
 }
 
-const getChildData = (data) => {
-  alert(1)
+const getChildData = (data,product) => {
+  data.productId = product.id
+  data.productName =product.productName
+  request.post(`/glassPriceBasic/glassPriceComputed/${product.id}`).then(res => {
+    if (res.code === '200' ) {
+      data.price = res.data
+      xGrid.value.insertAt(data)
+      dialogVisible.value = false
+    }
+  })
 }
 
 </script>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/glassPrice/ProductList.vue b/north-glass-erp/northglass-erp/src/views/sd/glassPrice/ProductList.vue
index 2896688..708cb94 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/glassPrice/ProductList.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/glassPrice/ProductList.vue
@@ -178,8 +178,7 @@
       }
     }
     let datas = data.data
-    datas.id = xGrid.value.getRadioRecord().id
-    emit('getChildData',datas)
+    emit('getChildData',datas,xGrid.value.getRadioRecord())
   }
 }
 
@@ -217,9 +216,9 @@
   },
   formConfig: {
     data: {
-      name: '',
-      role: '',
-      age: ''
+      width: '',
+      height: '',
+      quantity: ''
     },
     items: [
       { field: 'width', title: '瀹�:', itemRender: { name: 'VxeInput' } },
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
index f8a2ea1..6b550b5 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -744,6 +744,11 @@
 
   //鍚敤琛ㄦ牸鎷栧姩閫変腑
   addListener(xGrid.value,gridOptions)
+  let productData = route.query.produceList
+  if (!(typeof productData === 'undefined' || productData == null || productData === '' || productData === '\n' || productData === '\r')){
+    xGrid.value.insertAt(JSON.parse(productData))
+  }
+
   const str = route.query.orderId || history.state.orderId
   if (typeof str === 'undefined' || str === null || str === '' || str === '\n' || str === '\r'){
     gridOptions.menuConfig.body.options[0][11].disabled = true
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/GlassPriceBasicController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/GlassPriceBasicController.java
new file mode 100644
index 0000000..b4379f0
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/GlassPriceBasicController.java
@@ -0,0 +1,59 @@
+package com.example.erp.controller.sd;
+
+import com.example.erp.common.Result;
+import com.example.erp.entity.sd.GlassPriceBasic;
+import com.example.erp.service.sd.GlassPriceBasicService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+/**
+ * 浜у搧浠锋牸璁$畻
+ */
+@RestController
+@RequestMapping("/glassPriceBasic")
+@Api(value="浜у搧浠锋牸controller",tags={"浜у搧浠锋牸璁$畻鎿嶄綔鎺ュ彛"})
+public class GlassPriceBasicController {
+    private final GlassPriceBasicService glassPriceBasicService;
+
+    public GlassPriceBasicController(GlassPriceBasicService glassPriceBasicService) {
+        this.glassPriceBasicService = glassPriceBasicService;
+    }
+
+    @ApiOperation("淇濆瓨浜у搧浠锋牸鏁版嵁")
+    @PostMapping("/save")
+    public Result save(@RequestBody Map<String,Object> prams ){
+
+        return Result.seccess(glassPriceBasicService.save(prams));
+    }
+
+    @ApiOperation("璁$畻鎴愬搧浠锋牸")
+    @PostMapping("/glassPriceComputed/{productId}")
+    public Result glassPriceComputed(@PathVariable String productId){
+        return Result.seccess(glassPriceBasicService.glassPriceComputed(productId));
+    }
+
+    @ApiOperation("鐜荤拑浠锋牸鏌ヨ")
+    @PostMapping("/searchGlassPrice")
+    public Result searchGlassPrice(){
+        return Result.seccess(glassPriceBasicService.searchGlassPrice());
+    }
+
+    @ApiOperation("鐜荤拑浠锋牸淇敼")
+    @PostMapping("/updateGlassPriceById")
+    public Result updateGlassPriceById(@RequestBody GlassPriceBasic glassPriceBasic){
+        return Result.seccess(glassPriceBasicService.updateGlassPriceById(glassPriceBasic));
+    }
+
+    @ApiOperation("鐜荤拑浠锋牸鍒犻櫎")
+    @PostMapping("/deleteGlassPriceById/{id}")
+    public Result deleteGlassPriceById(@PathVariable String id){
+        return Result.seccess(glassPriceBasicService.deleteGlassPriceById(id));
+    }
+
+
+
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/entity/sd/GlassPriceBasic.java b/north-glass-erp/src/main/java/com/example/erp/entity/sd/GlassPriceBasic.java
new file mode 100644
index 0000000..4d673ea
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/entity/sd/GlassPriceBasic.java
@@ -0,0 +1,20 @@
+package com.example.erp.entity.sd;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+@Data
+public class GlassPriceBasic {
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+    private String type;
+    private Double thickness;
+    private String name;
+    private Double price;
+    private String json;
+    private LocalDateTime createTime;
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/GlassPriceBasicMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/GlassPriceBasicMapper.java
new file mode 100644
index 0000000..e1c1972
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/GlassPriceBasicMapper.java
@@ -0,0 +1,9 @@
+package com.example.erp.mapper.sd;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.example.erp.entity.sd.GlassPriceBasic;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface GlassPriceBasicMapper extends BaseMapper<GlassPriceBasic> {
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java b/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
index e415ab2..edf883a 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
@@ -679,6 +679,8 @@
         Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
         try {
             Log log = new Log();
+            log.setOperatorId(object.get("userId").toString());
+            log.setOperator(object.get("userName").toString());
             log.setContent(object.toString());
             //鑾峰彇瀵硅薄闆嗗悎寰幆杩涜鏂板淇敼
             List<FinishedOperateLog> finishedOperateLogslist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), FinishedOperateLog.class);
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java b/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
index 3d4c4e8..09719d5 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
@@ -55,6 +55,8 @@
             materialOutboundId = object.get("materialOutboundId").toString();
         }
         Log log = new Log();
+        log.setOperatorId(object.get("userId").toString());
+        log.setOperator(object.get("userName").toString());
         log.setContent(object.toString());
         try {
             MaterialOutbound materialOutbound = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), MaterialOutbound.class);
@@ -154,6 +156,8 @@
                 materialCode = Long.valueOf(object.get("materialCode").toString());
             }
             Log log = new Log();
+            log.setOperatorId(object.get("userId").toString());
+            log.setOperator(object.get("userName").toString());
             log.setContent(object.toString());
 
             MaterialInventory materialInventory = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), MaterialInventory.class);
@@ -269,6 +273,8 @@
             }
             Log log = new Log();
             log.setContent(object.toString());
+            log.setOperatorId(object.get("userId").toString());
+            log.setOperator(object.get("userName").toString());
             log.setFunction("deleteMaterialOutbound鍒犻櫎:"+materialOutboundId);
             logService.saveLog(log);
 
@@ -405,6 +411,8 @@
                 returningId = object.get("returningId").toString();
             }
             Log log = new Log();
+            log.setOperatorId(object.get("userId").toString());
+            log.setOperator(object.get("userName").toString());
             log.setContent(object.toString());
 
             ReturningWarehouse returningWarehouse = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), ReturningWarehouse.class);
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialStoreService.java b/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialStoreService.java
index 31d79e7..4877ddd 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialStoreService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialStoreService.java
@@ -60,6 +60,8 @@
             }
 
             Log log = new Log();
+            log.setOperatorId(object.get("userId").toString());
+            log.setOperator(object.get("userName").toString());
             log.setContent(object.toString());
 
             DecimalFormat decimalFormat = new DecimalFormat("#0.00");
@@ -123,6 +125,8 @@
 
             }
             Log log = new Log();
+            log.setOperatorId(object.get("userId").toString());
+            log.setOperator(object.get("userName").toString());
             log.setContent(object.toString());
             log.setFunction("deleteMaterialStore鍒犻櫎锛�"+id);
             logService.saveLog(log);
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
index 6863176..59f2b87 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
@@ -47,6 +47,8 @@
     public Boolean insertCustomer(Map<String,Object> object) {
         boolean saveState = true;
         Log log = new Log();
+        log.setOperatorId(object.get("userId").toString());
+        log.setOperator(object.get("userName").toString());
         log.setContent(object.toString());
         //璁剧疆鍥炴粴鐐�
         Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
@@ -89,6 +91,8 @@
                     customerMapper.deleteCustomer(customer);
                 }
                 Log log = new Log();
+                log.setOperatorId(object.get("userId").toString());
+                log.setOperator(object.get("userName").toString());
                 log.setContent(object.toString());
                 log.setFunction("deleteCustomer鍒犻櫎");
                 logService.saveLog(log);
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
index 361fe0d..9ef6fd6 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
@@ -411,6 +411,8 @@
         deliveryMapper.updateDeliveryToExamine(deliveryId,type);
 
         Log log = new Log();
+        log.setOperatorId(object.get("userId").toString());
+        log.setOperator(object.get("userName").toString());
         log.setContent(object.toString());
         log.setFunction("updateDeliveryToExamine淇敼:"+deliveryId);
         logService.saveLog(log);
@@ -443,6 +445,8 @@
             deliveryMapper.deleteDelivery(deliveryId);
 
             Log log = new Log();
+            log.setOperatorId(object.get("userId").toString());
+            log.setOperator(object.get("userName").toString());
             log.setContent(object.toString());
             log.setFunction("deleteDelivery鍒犻櫎:"+deliveryId);
             logService.saveLog(log);
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/GlassPriceBasicService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/GlassPriceBasicService.java
new file mode 100644
index 0000000..784f57f
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/GlassPriceBasicService.java
@@ -0,0 +1,108 @@
+package com.example.erp.service.sd;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.example.erp.entity.sd.GlassPriceBasic;
+import com.example.erp.entity.sd.ProductDetail;
+import com.example.erp.mapper.sd.GlassPriceBasicMapper;
+import com.example.erp.mapper.sd.ProductDetailMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+@Service
+@DS("sd")
+public class GlassPriceBasicService {
+    private final GlassPriceBasicMapper glassPriceBasicMapper;
+    @Autowired
+    private ProductDetailMapper productDetailMapper;
+
+    public GlassPriceBasicService(GlassPriceBasicMapper glassPriceBasicMapper) {
+        this.glassPriceBasicMapper = glassPriceBasicMapper;
+    }
+
+    //淇濆瓨鐜荤拑浠锋牸
+    public Boolean save(Map<String, Object> prams) {
+        GlassPriceBasic glassPriceBasic = new GlassPriceBasic();
+        glassPriceBasic.setThickness(
+                Double.parseDouble(prams.get("thickness").toString().replaceAll("[^0-9\\.]", ""))
+        );
+        glassPriceBasic.setPrice(Double.parseDouble(prams.get("price").toString()));
+        glassPriceBasic.setJson(prams.toString());
+        glassPriceBasic.setType(prams.get("type").toString());
+        String type = prams.get("type").toString();
+        //鍒ゆ柇 鏄摢绉嶇被鍨�
+        if(Objects.equals(type, "glass")) {
+            glassPriceBasic.setName(prams.get("thickness").toString() + prams.get("color").toString());
+        }else if(Objects.equals(type, "hollow")){
+            glassPriceBasic.setName(
+                    prams.get("thickness").toString()
+                            + prams.get("gasType").toString()
+                            + prams.get("types").toString());
+        } else if (Objects.equals(type, "interlayer"))  {
+            glassPriceBasic.setName(
+                    prams.get("thickness").toString()
+                            + prams.get("color").toString()
+                            + prams.get("types").toString());
+        }
+        GlassPriceBasic glassPriceBasic1 = glassPriceBasicMapper.selectOne(new QueryWrapper<GlassPriceBasic>().eq("name", glassPriceBasic.getName()));
+        if(glassPriceBasic1 != null){
+            return false;
+        }
+        return glassPriceBasicMapper.insert(glassPriceBasic)>0;
+    }
+
+    public Double glassPriceComputed(String productId) {
+        List<ProductDetail> productDetails = productDetailMapper
+                .selectList(new QueryWrapper<ProductDetail>().eq("prod_id", productId));
+
+        final Double[] money = {0.0};
+        productDetails.forEach(productDetail -> {
+            Map<String,String> separation =  JSON.parseObject(
+                    productDetail.getSeparation(), new TypeReference<Map<String, String>>(){});
+            String name = "";
+            switch (productDetail.getDetailType()) {
+                case "glass":
+                    name = separation.get("thickness") + separation.get("color");
+                    break;
+                case "hollow":
+                    name = separation.get("thickness") + separation.get("gasType") + separation.get("type");
+                    break;
+                case "interlayer":
+                    name = separation.get("thickness") + separation.get("color") + separation.get("type");
+                    break;
+            }
+            GlassPriceBasic glassPriceBasic = glassPriceBasicMapper
+                    .selectOne(new QueryWrapper<GlassPriceBasic>().eq("name", name));
+            if(glassPriceBasic == null) {
+                money[0]= 0.0;
+                return;
+            }
+            money[0] += glassPriceBasic.getPrice();
+        });
+        return money[0];
+    }
+
+    public List<GlassPriceBasic> searchGlassPrice() {
+        return glassPriceBasicMapper.selectList(null);
+    }
+
+    public Boolean updateGlassPriceById(GlassPriceBasic glassPriceBasic) {
+        return glassPriceBasicMapper.update(
+                null,
+                new LambdaUpdateWrapper<>(GlassPriceBasic.class)
+                        .setSql("price = " + glassPriceBasic.getPrice())
+                        .eq(GlassPriceBasic::getId, glassPriceBasic.getId())
+                )>0;
+    }
+
+    public Boolean deleteGlassPriceById(String id) {
+        return glassPriceBasicMapper.deleteById(id)>0;
+    }
+}

--
Gitblit v1.8.0