Ver código fonte

Merge branch 'develop_szhj' of jianguan-web/qpls-md-html into develop

李磊 3 anos atrás
pai
commit
64d36a0429

+ 3 - 2
src/libs/JGPrint.js

@@ -22,8 +22,9 @@ export const JGPrintTag = function (html, width, height, data) {
   LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
   LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true) // 可使输出以纸张边缘为基点
   LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', html)
-  console.log(data.qrCodeContent)
-  LODOP.ADD_PRINT_BARCODE('22%','55%',79,79,"QRCode",data.qrCodeContent)
+  // LODOP.ADD_PRINT_BARCODE('36%','65%',90,90,"QRCode",data.qrCodeContent)
+  // LODOP.SET_PRINT_STYLEA(0,"QRCodeVersion",5)
+  // LODOP.SET_PRINT_STYLEA(0,"QRCodeErrorLevel",'L')
   LODOP.SET_PRINT_COPIES(data.printQty)// 指定份数
   LODOP.SET_PRINT_PAGESIZE(1, width, height)
   LODOP.PRINT()

+ 1 - 1
src/utils/request.js

@@ -110,7 +110,7 @@ service.interceptors.response.use((response) => {
         })
       }
     })
-  } else if (response.data.status != 200 && response.data.status) {
+  } else if (response.data.status != 200 && response.data.status && response.data.errCode != 'VALIDATE_STOCK_LACK') {
     // 其它业务错误提示
     notification.destroy()
     notification.error({

+ 17 - 0
src/views/numsGoodsShelves/recallManagement/recallModal.vue

@@ -132,12 +132,29 @@ export default {
               _this.$emit('refresh')
               _this.cancel()
             } else {
+              if (res.errCode == 'VALIDATE_STOCK_LACK') {
+                _this.walidateStock(res.message)
+              }
               _this.spinning = false
             }
           })
         }
       })
     },
+    walidateStock (msg) {
+      const h = this.$createElement
+      const p = []
+      const m = msg.split('\n')
+      for (let i = 0; i < m.length; i++) {
+        p.push(h('div', m[i]))
+      }
+      this.$info({
+        title: '操作失败,以下配件库存不足',
+        content: h('div', {}, p),
+        centered: true,
+        onOk () {}
+      })
+    },
     getData () {
       this.spinning = true
       shelfRecallDetailList({ recallBillSn: this.currentData.recallBillSn }).then(res => {

+ 11 - 14
src/views/numsGoodsShelves/replenishmentManagement/printView.vue

@@ -14,28 +14,26 @@
         v-for="(item,index) in list"
         :key="index"
         class="print-pages"
-        style="font-size: 9px;padding:3pt 16pt;">
-        <div class="storeName" style="text-align: center;font-weight: bold;margin: 2pt 0;">
+        style="font-size: 12px;padding:3pt 5pt;">
+        <div class="storeName" style="text-align: center;margin: 2pt 0 4pt;">
           {{ nowData.dealerName }}
         </div>
         <div style="overflow: hidden;">
-          <div style="float: left;width:60%;">
-            <div class="shelfName" style="margin-bottom: 2pt;">
+          <div style="float: left;width:65%;padding-top: 5pt;">
+            <div class="shelfName" style="margin-bottom: 3pt;">
               {{ nowData.shelfInfo.shelfName }}
             </div>
-            <div class="productCode" style="font-weight: bold;">{{ item.productCode }}</div>
+            <div class="productCode" style="margin-bottom: 2pt;">{{ item.productCode }}</div>
             <div class="productName">{{ item.product.name }}</div>
-            <div class="userName" style="margin-top: 2pt;font-size: 8px;">
+            <div class="userName" style="margin-top: 4pt;">
               <span style="margin: 0 5pt 0 0;">{{ moment().format('YYYY-MM-DD HH:mm') }}</span>
-            </div>
-            <div class="userName" style="margin-top: 2pt;font-size: 8px;">
               <span>{{ nowData.parintUser }}</span>
             </div>
           </div>
-          <div style="float: right;width: 40%;">
+          <div style="float: right;width: 34%;">
             <div class="productSno" style="font-size: 15pt;text-align: center;">{{ item.shelfPlaceCode }}</div>
             <div class="qrcode" ref="qrCodeUrl" style="text-align: center;">
-              <vue-qr :text="`dealerSn=${nowData.dealerSn}&shelfSn=${item.shelfSn}&productSn=${item.productSn}&productCode=${item.productCode}&shelfPlaceCode=${item.shelfPlaceCode}&shelfPlaceSn=${item.shelfPlaceSn}`" :margin="0" :size="70"></vue-qr>
+              <vue-qr :text="`${item.shelfSn}&${item.productCode}`" :margin="0" :size="70"></vue-qr>
             </div>
           </div>
         </div>
@@ -78,11 +76,10 @@ export default {
       const printBox = document.querySelectorAll('.print-pages')
       console.log(printBox)
       for (let i = 0; i < printBox.length; i++) {
-        const htmlStr = printBox[i].outerHTML.replace(/<\s?img[^>]*>/gi, '')
+        const htmlStr = printBox[i].outerHTML
         const item = this.list[i]
-        const nowData = this.nowData
-        this.list[i].qrCodeContent = `dealerSn=${nowData.dealerSn}&shelfSn=${item.shelfSn}&productCode=${item.productCode}&shelfPlaceCode=${item.shelfPlaceCode}`
-        JGPrintTag(htmlStr, '45mm', '30mm', this.list[i])
+        this.list[i].qrCodeContent = `${item.shelfSn}&${item.productCode}`
+        JGPrintTag(htmlStr, '60mm', '40mm', this.list[i])
       }
     },
     setData (nowData, list) {

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.188:8503/qpls-md',
+        target: 'http://192.168.16.151:8503/qpls-md',
         // target: 'http://frps.chelingzhu.com:7800/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,