luobang 2 jaren geleden
bovenliggende
commit
90a55fafda

+ 1 - 1
build/utils.js

@@ -17,7 +17,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
 let devModules = ['all']
-// let devModules = ['index', 'statisticalReport', 'appoint']
+// let devModules = ['index', 'statisticalReport']
 // let devModules = ['all']
 
 // let devModules = ['index', 'ADMINISTRATORS']

+ 2 - 0
package.json

@@ -43,6 +43,7 @@
     "lay-excel": "^1.7.6",
     "mathjs": "^10.6.4",
     "object-assign": "^4.1.1",
+    "qrcodejs2": "0.0.2",
     "qs": "^6.9.3",
     "sass-loader": "^6.0.7",
     "sass-node": "^4.11.2",
@@ -62,6 +63,7 @@
     "vue-element-bigdata-table": "^1.3.1",
     "vue-print-nb": "^1.7.5",
     "vue-property-decorator": "^8.2.1",
+    "vue-qr": "^4.0.9",
     "vue-quill-editor": "^3.0.5",
     "vue-router": "^3.0.1",
     "vue-social-share": "0.0.3",

+ 69 - 3
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -833,6 +833,7 @@
               >
             </div>
             <el-button round @click="resetPrintNumber">重置打印次数</el-button>
+            <div ref="qrCodeUrl" class="qrcode"></div>
           </div>
           <div class="steelMapClass3">
             <div class="steelMapClass32">
@@ -1060,7 +1061,7 @@
         </div>
         <span slot="footer" class="dialog-footer">
           <el-button @click="centerDialogVisible = false">返 回</el-button>
-          <el-button @click="submitSteel(this.steelMap)">确定</el-button>
+          <el-button @click="submitSteelDebounce(steelMap)">确定</el-button>
         </span>
         <div>
           <vxe-modal
@@ -1580,10 +1581,13 @@ import { getCookie } from '@/utils/util.js'
 import PathView from './mapTest.vue'
 import currentLocation from './currentLocation.vue'
 import { downloadFile, creatImageFile } from '@/utils/base64ToBlob.js'
+import Qrcode from 'qrcodejs2'
+import steel_outboundStatisticsVue from '../../../WMS/components/steel/steel_outboundStatistics.vue'
 export default {
   components: {
     PathView,
-    currentLocation
+    currentLocation,
+    Qrcode
   },
   data() {
     return {
@@ -1996,6 +2000,9 @@ export default {
     this.getSteelReport = this.debounce(() => {
       this.getSteelReportDebounce()
     }, 100)
+    this.submitSteelDebounce = this.debounce(obj => {
+      this.submitSteel(obj)
+    })
     this.getSteelReport()
   },
   watch: {
@@ -2096,14 +2103,61 @@ export default {
   },
   computed: {},
   methods: {
+    creatQrCode(text) {
+      let qrcode = new QRCode(this.$refs.qrCodeUrl, {
+        text: text, // 需要转换为二维码的内容
+        width: 150,
+        height: 150,
+        colorDark: '#000000',
+        colorLight: '#ffffff',
+        correctLevel: QRCode.CorrectLevel.H
+      })
+    },
     submitSteel(obj) {
       this.$confirm('该操作会修改全部改动的内容,请确认核实后点击!', '提醒', {
         cancelButtonText: '取消',
         confirmButtonText: '确认',
         center: true
       }).then(() => {
+        let map = obj
+        map.userName = getCookie('loginName')
+        map.shipperAddressId = this.addressId
         this.axios.post('/api/v1/uc/submitSteel', this.steelMap).then(res => {
-          console.log(res)
+          console.log(res.data.responseMapFailed, 'res.data')
+          let _this = this
+          if (res.data.responseMapFailed.length > 0) {
+            let responseFailTitle = res.data.responseMapFailed.join(';')
+            this.$message({
+              type: 'error',
+              duration: 2500,
+              offset: '250',
+              message: responseFailTitle
+            })
+          }
+          if (res.data.response.length == 0) {
+            console.log('我尽力了1')
+            setTimeout(() => {
+              _this.$message({
+                type: 'success',
+                duration: 1500,
+                offset: '250',
+                message: '未发现任何修改成功的记录!'
+              })
+            }, 2500)
+          } else {
+            console.log('我尽力了2')
+            let responseTitle = res.data.response.join(';')
+            setTimeout(() => {
+              _this.$message({
+                type: 'success',
+                duration: 2500,
+                offset: '250',
+                message: responseTitle
+              })
+            }, 2500)
+          }
+          this.operation(this.steelMap)
+          this.getSteelReport()
         })
       })
     },
@@ -3161,7 +3215,14 @@ export default {
         )
         .then(res => {
           this.steelMap = res.data.data
+          this.steelMap.userName = getCookie('loginName')
           this.addressId = row.shipperAddressId
+          this.$nextTick(() => {
+            this.$refs.qrCodeUrl.innerHTML = ''
+            if (this.steelMap.orderNo != null) {
+              this.creatQrCode(this.steelMap.orderNo)
+            }
+          })
           this.getAllProvince()
           this.onchangeProvince()
           this.onchangeCity()
@@ -4458,6 +4519,11 @@ export default {
             }
           }
         }
+        .qrcode {
+          position: absolute;
+          right: 25px;
+          top: 45px;
+        }
       }
       .steelMapClass3 {
         margin-top: 20px;