zhouzh 3 năm trước cách đây
mục cha
commit
1f9c5e7a94

+ 3 - 3
build/utils.js

@@ -18,9 +18,9 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 
 
 
- let devModules = ['all']
+//  let devModules = ['all']
 // let devModules = ['index','inward','SporadicManage']
-// let devModules = ['index','inward','RMS']
+ let devModules = ['index','sale','RMS']
 // let devModules = ['index','SporadicManage','RMS','statisticalReport']
 // let devModules = ['index','inward','statisticalReport']
 //  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']
@@ -28,7 +28,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // let devModules = ['index','RMS'];
 
 
-if (pathSrc.indexOf('node_modules') > -1) {
+if (pathSrc.indexOf('node_modules') > -1) {c
     devModules = require('../../../cors.js').devModules;
 }
 // 获取入口集合

+ 2 - 2
config/index.js

@@ -64,7 +64,7 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:8080",
+    target: "http://localhost:8019",
     // target: "http://localhost:8080",
     // target: "http://localhost:8019",
     ws: true,
@@ -74,7 +74,7 @@ let proxyTable = {
   },
   "/views/api/v1": {
     // target: "http://localhost:8080",
-     target: "http://172.16.33.166:8080",
+     target: "http://localhost:8019",
     // target: "http://192.168.1.115:8080",
     ws: true,
     pathRewrite: {

BIN
dist.rar


+ 1 - 0
package.json

@@ -49,6 +49,7 @@
     "vue-baidu-map": "^0.21.19",
     "vue-clipboard2": "^0.2.1",
     "vue-element-bigdata-table": "^1.3.1",
+    "vue-print-nb": "^1.7.5",
     "vue-property-decorator": "^8.2.1",
     "vue-quill-editor": "^3.0.5",
     "vue-router": "^3.0.1",

BIN
src/assets/loading_images/loading.gif


+ 3 - 0
src/views/sale/app.js

@@ -15,6 +15,9 @@ import VueApollo from 'vue-apollo'
 
 import apollo from '@/config/apolloConfig.js'
 
+import Print from 'vue-print-nb';
+Vue.use(Print);
+
 // 关闭生产模式下给出的提示
 Vue.config.productionTip = false;
 

+ 2 - 1
src/views/sale/components/saleSelfMachine/printScan.vue

@@ -49,11 +49,12 @@ export default {
         //     console.log("false")
             this.changfouce();
         //}
-        if(this.orderNumber!=null&&this.orderNumber.length==21){
+         if(this.orderNumber!=null&&this.orderNumber.length==21){
             if(this.orderNumber.startsWith('WYSDD')==true||this.orderNumber.startsWith('wysdd')==true){
             this.$router.push({
                 path:"/saleSelfMachine?orderNumber="+this.orderNumber,
             })
+        
             }   
         }
     },3000)

+ 56 - 149
src/views/sale/components/saleSelfMachine/printWarranty.vue

@@ -1,132 +1,24 @@
 <template>
-  <div class="tableAllDate">
+  <div class="tableAllDate"> 
+     <!-- <div>
+       <el-table
+       v-loading="loading"
+       style="width: 100%">
+      </el-table>
+     </div>  -->
+     <div class="loading"  v-if="urls.length==0"></div>
       <div id="pdfDom">
       <div class="blank">
       </div>
-      <div class="title">
-        <h1 align="center">达州钢铁集团有限责任公司</h1>
-        <h1 align="center">质保书</h1>
+    <div class="demo-image__lazy" v-for="(img,index) in urls" :key="index">
+       <!-- <el-image v-for="(img,index) in urls" :key="index" :src="img" lazy></el-image> -->
+       <el-image   style='width: 100%; height: 100%; justify-content: center;
+            align-items: center;' :src='img'></el-image>
+     </div> 
       </div>
-      <div>
-      <!-- tablePart0 -->
-        <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;font-size:20px;" width="1000px" class="tablePart0">
-        <tr>
-          <th style="width :14.5%">收货单位:</th>
-          <td style="width :85.5%">{{consigeeName}}</td>
-        </tr>
-        </table>
-      </div>
-      <div class="tableBody">
-        <!-- tablePart1 -->
-        <table border="1" cellpadding="10" cellspacing="0" style="margin-top: 5px;" width="1000px" class="tablePart1">
-        <tr>
-          <th style="width :5%">序号</th>
-          <th style="width :21.5%">物资(设备)名称</th>
-          <th style="width :21.5%">规格型号</th>
-          <th style="width :5%">单位</th>
-          <th style="width :14%">应发数量</th>
-          <th style="width :14%">实发数量</th>
-          <th style="width :19%">备注</th>
-        </tr>
-
-        <tr>
-          <td>1</td>
-          <td>{{materialList[0].materialName}}</td>
-          <td>{{materialList[0].materialSpe}}{{materialList[0].materialModel}}</td>
-          <td>吨</td>
-          <td></td>
-          <td>{{materialList[0].materialNumber}}</td>
-          <td></td>
-        </tr>
-        <tr>
-          <td>2</td>
-          <td>{{materialList[1].materialName}}</td>
-          <td>{{materialList[1].materialSpe}}{{materialList[1].materialModel}}</td>
-          <td>吨</td>
-          <td></td>
-          <td>{{materialList[1].materialNumber}}</td>
-          <td></td>
-        </tr>
-        <tr>
-          <td>3</td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-        </tr>
-        <tr>
-          <td>4</td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-        </tr>
-        </table>
-        <!-- tablePart2 -->
-        <table border="1" cellpadding="10" cellspacing="0" style="
-        border-top: 0px" width="1000px" class="tablePart2">
-        <tr>
-          <th style="width :10.5%">送货人</th>
-          <td style="width :16.5%">张三</td>
-          <th style="width :14%">发货时间</th>
-          <td style="width :12%">2021-12-08 11:08:32</td>
-          <th style="width :14%">收货地点</th>
-          <td style="width :33%">重庆市巴南区东温泉镇雨台村</td>
-        </tr>
-        </table>
-        <!-- tablePart3 -->
-        <table border="1" cellpadding="10" cellspacing="0" style="
-        border-top: 0px" width="1000px" class="tablePart3">
-        <tr>
-          <th style="width :10.5%">收货人</th>
-          <td style="width :56.5%">吴刚</td>
-          <th style="width :14%">收货日期</th>
-          <td style="width :19%">2021-12-09</td>
-        </tr>
-        </table>
-        <!-- tablePart4 -->
-        <table border="1" cellpadding="10" cellspacing="0" style="
-        border-top: 0px" width="1000px" class="tablePart4">
-        <tr>
-          <th style="width :10.5%">司机</th>
-          <td style="width :36.5%">张三</td>
-          <th style="width :13%">车号</th>
-          <td style="width :40%">{{capacityNumber}}</td>
-        </tr>
-        </table>
-        <!-- tablePart5 -->
-        <table border="1" cellpadding="10" cellspacing="0" style="
-        border-top: 0px" width="1000px" class="tablePart5">
-        <tr>
-          <th style="width :10.5%">备注</th>
-          <td style="width :89.5%">无</td>
-        </tr>
-        </table>
-      </div>
-      <div>
-        <!-- tablePart6 -->
-        <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;margin-top: 5px;font-size:20px;" width="1000px" class="tablePart6">
-        <tr>
-          <th style="width :14.5%">发货单位:</th>
-          <td style="width :48.5%">达州钢铁集团有限责任公司</td>
-          <th style="width :15.5%">日期:</th>
-          <td style="width :5%">{{year}}</td>
-          <th style="width :8%">年</th>
-          <td style="width :3%">{{month}}</td>
-          <th style="width :8%">月</th>
-          <td style="width :3%">{{date}}</td>
-          <th style="width :5%">日</th>
-        </tr>
-        </table>
-      </div>
-      </div>
-      <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
+      <!-- <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
         <i class="el-icon-download"></i>导出(pdf)
-      </el-button>
+      </el-button> -->
       <el-button style="margin-left: 45%;margin-top: 0.2%;" type="primary" v-print="'#pdfDom'" @click="backScan()">
         <i class="el-icon-printer"></i>打印
       </el-button>
@@ -140,42 +32,48 @@ export default {
   name: "Login",
   data() {
     return {
-      orderNumber: "WYSDD2021120200000803",
-      carrierName: null,
-      materialList: [
-        {
-            "materialName": "三级螺纹钢定尺12米",
-            "materialModel": "HRB400E",
-            "materialWeight": null,
-            "materialNumber": 12222,
-            "materialSpe": "Φ20"
-        },
-        {
-            "materialName": "五螺纹钢定尺12米",
-            "materialModel": "HRB400",
-            "materialWeight": null,
-            "materialNumber": 12000,
-            "materialSpe": "Φ14"
-        },
-      ],
-      capacityNumber: "川A10011",
-      consigeeName: null,
-      billDate: "2021-12-07",
-      year: new Date().getFullYear(),
-      month: new Date().getMonth()+1,
-      date: new Date().getDate(),
-      htmlTitle: '质保书'
+      urls:[],
+      name: 'Loading'
     };
+  }, 
+  mounted() {
+    this.information();
   },
   methods: {
+     information() {
+      //编辑
+      console.log("this.$route.query.orderNumber",this.$route.query.orderNumber)
+      this.axios
+        .post(
+          "/api/v1/uc/getWarranty?orderNumber="+this.$route.query.orderNumber 
+        )
+        .then((res) => {
+          console.log("res.data.data",res.data.data)
+          if(res.data.code==201){
+            this.$message("质保书正在紧张制作中,请耐心等待!")
+          }else{
+            res.data.data.forEach((e) => {
+              console.log(e)
+              this.urls.push(e)
+          
+            })
+          }
+        });
+        },
+       
+        
       backScan(){
         this.$router.go(-2);
-      }
+      },
+      
   },
 };
 </script>
 
 <style lang="scss" scoped>
+.demo-image__lazy{
+  position: relative;
+}
 .title{
   font-size:25px;
 }
@@ -206,4 +104,13 @@ export default {
   width: 100%;
   height: 50px;
 }
+.loading {
+  position: fixed;
+  left: 0;
+  top: 0;
+  background: url('~@/assets/loading_images/loading.gif') center center no-repeat #fff;
+  width: 100vw;
+  height: 100vh;
+  z-index: 1000;
+}
 </style>